:is(html:has(.wizardry-screen),body:has(.wizardry-screen)){overscroll-behavior:none;overflow:clip}.wizardry-screen{--game-height:100vh;--game-width:100%;--game-top:0px;--game-left:0px;left:var(--game-left);top:var(--game-top);width:var(--game-width);height:var(--game-height);z-index:100;background:var(--background);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);position:fixed;overflow:hidden;container-type:size}@supports (height:100svh){.wizardry-screen{--game-height:100svh}}@supports (height:100dvh){.wizardry-screen{--game-height:100dvh}}.wizardry-screen *,.wizardry-screen :before,.wizardry-screen :after{min-width:0}.wizardry-screen .wizardry-screen-content{grid-template-rows:44px minmax(0,1fr);width:100%;max-width:none;height:100%;padding:0;display:grid;position:relative}.wizardry-screen .wizardry-screen-header{background:var(--wizardry-map-surface);z-index:6;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:4px;margin:0;padding:0 4px;display:grid}.wizardry-screen-header button{width:40px;height:44px}.wizardry-screen-header h1,.wizardry-screen-header p{margin:0}.wizardry-screen .wizardry-save-row{display:none}.wizardry-screen .wizardry-start{height:100%;min-height:0}.wizardry-screen .wizardry-start-content{overscroll-behavior:contain;height:100%;min-height:0;padding:20px;overflow:auto}.wizardry-screen .wizardry-start-content h2{font-size:30px}.wizardry-screen .wizardry-castle{height:100%;min-height:0}.wizardry-screen .wizardry-castle-world,.wizardry-screen .wizardry-viewport{aspect-ratio:auto;width:100%;height:100%;min-height:0;max-height:none;position:absolute;inset:0}.wizardry-screen .wizardry-castle-shade{display:none}.wizardry-screen .wizardry-castle-tools{z-index:3;gap:6px;display:grid;position:absolute;bottom:90px;right:12px}.wizardry-screen .wizardry-court-pad{top:auto;bottom:90px;left:12px}.wizardry-screen .wizardry-court-enter{max-width:calc(100% - 24px);font-size:12px;top:auto;bottom:215px}.wizardry-screen .wizardry-play{height:100%;margin:0;display:block;position:relative}.wizardry-screen .wizardry-play>div:first-child{height:100%}.wizardry-screen .wizardry-stage{position:absolute;inset:0}.wizardry-screen .wizardry-world{height:100%;position:absolute;inset:0}.wizardry-screen .wizardry-location{z-index:2;pointer-events:none;margin:0;font-size:10px;display:block;position:absolute;top:8px;left:12px;right:125px}.wizardry-screen .wizardry-location h2{display:none}.wizardry-screen .wizardry-location span{overflow-wrap:anywhere;display:block}.wizardry-screen .wizardry-minimap{width:108px;top:8px;right:8px}.wizardry-screen .wizardry-minimap svg{width:100%;height:auto;display:block}.wizardry-screen .wizardry-minimap button{width:32px;height:32px}.wizardry-screen .wizardry-portrait-party{z-index:4;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;width:auto;height:72px;margin:0;display:grid;position:absolute;bottom:8px;left:12px;right:12px;transform:none}.wizardry-screen .wizardry-hero{background:var(--wizardry-map-surface);height:72px;min-height:0;padding:0;display:block;position:relative}.wizardry-screen .wizardry-hero img{aspect-ratio:auto;object-fit:cover;object-position:center 20%;width:100%;height:100%;position:absolute;inset:0}.wizardry-screen .wizardry-hero-info{background:var(--wizardry-map-surface);width:100%;padding:3px;display:block;position:absolute;bottom:0}.wizardry-screen .wizardry-hero-info strong{white-space:nowrap;text-overflow:ellipsis;font-size:10px;display:block;overflow:hidden}.wizardry-screen .wizardry-hero-info>span{display:none}.wizardry-screen .wizardry-hp{width:100%;height:4px;margin:3px 0 0;display:block}.wizardry-screen .wizardry-arcade{padding:12px;bottom:86px}.wizardry-screen .wizardry-actions{grid-template-columns:repeat(2,44px);gap:5px}.wizardry-screen .wizardry-action-small{width:44px;height:44px}.wizardry-screen .wizardry-action-primary{width:93px;min-height:60px}.wizardry-screen .wizardry-stick{width:138px;height:138px}.wizardry-screen .wizardry-stick-forward,.wizardry-screen .wizardry-stick-backward{left:43px}.wizardry-screen .wizardry-stick-left,.wizardry-screen .wizardry-stick-right{top:43px}.wizardry-screen .wizardry-stick-center{inset:51px}.wizardry-screen [aria-label=Dungeon\ controls] button{width:52px;height:52px}.wizardry-combat-status{text-transform:capitalize;background:var(--wizardry-map-surface);white-space:nowrap;padding:3px 5px;font-size:10px;position:absolute;bottom:100%;left:0}.wizardry-screen .wizardry-hero-info>.wizardry-hero-magic{color:var(--primary);background:var(--wizardry-map-surface);border-radius:3px;padding:1px 3px;font-size:9px;display:block;position:absolute;bottom:100%;right:2px}.wizardry-screen .wizardry-context{z-index:3;pointer-events:none;border:0;max-width:420px;padding:0;position:absolute;top:36px;left:12px;right:125px}.wizardry-screen .wizardry-context p{max-width:100%;margin:0;font-size:11px;line-height:1.35}.wizardry-screen .wizardry-context [role=group]{pointer-events:auto;margin-top:8px}.wizardry-screen .wizardry-context [role=group] button{height:44px;min-height:44px;padding:4px;font-size:11px}.wizardry-screen .wizardry-secondary-tools{z-index:3;gap:5px;display:flex;position:absolute;bottom:285px;right:12px}.wizardry-screen .wizardry-secondary-tools button{width:44px;height:44px}.wizardry-screen .wizardry-play>.wizardry-secondary-tools,.wizardry-screen .wizardry-play>.wizardry-latest{width:auto;height:auto;position:absolute}.wizardry-screen .wizardry-enemy-hud{overscroll-behavior:contain;width:min(200px,100% - 140px);max-height:calc(100% - 320px);top:40px;left:12px;overflow:auto}.wizardry-screen .wizardry-tactical-arcade{z-index:3;flex-wrap:wrap;gap:5px;width:auto;max-width:420px;margin:0;display:flex;position:absolute;bottom:90px;left:12px;right:12px}.wizardry-screen .wizardry-tactical-arcade button{width:44px;min-width:44px;height:44px}.wizardry-screen .wizardry-treasure-actions{border:1px solid var(--border);background:var(--wizardry-map-surface);z-index:4;border-radius:6px;max-width:430px;margin:0;padding:10px;position:absolute;bottom:88px;left:12px;right:12px}.wizardry-treasure-actions h3{margin:0}.wizardry-screen .wizardry-treasure-actions p{margin:4px 0;font-size:11px}.wizardry-screen .wizardry-treasure-actions>div{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-top:6px;display:grid}.wizardry-screen[data-interface=chest] .wizardry-actions,.wizardry-screen[data-interface=combat] .wizardry-actions{display:none}.wizardry-screen .wizardry-latest{z-index:2;pointer-events:none;max-width:460px;font-size:11px;position:absolute;bottom:110px;left:170px;right:122px}.wizardry-screen .wizardry-latest p{-webkit-line-clamp:2;background:var(--wizardry-map-surface);border-radius:4px;-webkit-box-orient:vertical;padding:5px 8px;display:-webkit-box;overflow:hidden}.wizardry-screen[data-interface=chest] .wizardry-latest,.wizardry-screen[data-interface=combat] .wizardry-latest{bottom:210px;left:12px;right:125px}.wizardry-screen .wizardry-reward{background:var(--wizardry-map-surface);z-index:5;border:1px solid var(--primary);border-radius:6px;width:min(430px,100% - 24px);padding:8px;font-size:11px;position:absolute;top:155px;left:12px;transform:none}.wizardry-screen .wizardry-modal-backdrop{background:color-mix(in oklab,var(--dungeon-void) 65%,transparent);pointer-events:auto;justify-content:center;align-items:center;padding:10px;position:absolute;inset:0;overflow:hidden}.wizardry-screen .wizardry-bounded{grid-template-rows:auto minmax(0,1fr) auto;width:min(650px,100%);height:min(680px,100%);min-height:0;max-height:100%;padding:0;display:grid;overflow:hidden}.wizardry-screen .wizardry-overlay-heading{border-bottom:1px solid var(--border);grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:8px;margin:0;padding:8px 12px;display:grid}.wizardry-overlay-heading button{width:44px;height:44px}.wizardry-screen .wizardry-overlay-body{overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0;padding:12px;overflow:auto}.wizardry-screen .wizardry-overlay-footer{border-top:1px solid var(--border);background:var(--card);flex-wrap:wrap;align-items:center;gap:6px;margin:0;padding:8px 12px;display:flex}.wizardry-overlay-footer button{white-space:normal;height:auto;min-height:44px}.wizardry-screen .wizardry-scene-backdrop{background:0 0;justify-content:flex-end}.wizardry-screen .wizardry-modal-scene{width:min(420px,46%);height:100%;max-height:100%}.wizardry-panel-tabs{flex-wrap:wrap;gap:5px;margin-bottom:12px;display:flex}.wizardry-panel-tabs button{text-transform:capitalize;min-height:44px;padding:5px 10px}.wizardry-service-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.wizardry-service-grid button{white-space:normal;height:auto;min-height:60px}.wizardry-item-filters{grid-template-columns:minmax(0,1fr) minmax(100px,auto);gap:8px;margin-bottom:10px;display:grid}.wizardry-pagination{justify-content:space-between;align-items:center;gap:8px;margin-top:12px;font-size:12px;display:flex}.wizardry-screen .wizardry-select{max-width:100%;min-height:40px}.wizardry-screen .wizardry-expanded-map{width:100%;margin:0}.wizardry-screen .wizardry-expanded-map svg{aspect-ratio:1;width:100%;max-height:44dvh;display:block}.wizardry-screen .wizardry-item-stage{height:min(260px,35dvh)}.wizardry-monster-stage{height:min(300px,32dvh);min-height:110px;position:relative}.wizardry-monster-stage canvas{touch-action:none;width:100%;height:100%;display:block}.wizardry-monster-portrait{aspect-ratio:1;object-fit:contain;border-radius:6px;width:min(100%,460px);height:auto;margin-inline:auto;display:block}.wizardry-screen .wizardry-modal-backdrop:has(.wizardry-inspector){z-index:130}.wizardry-screen:has(.wizardry-inspector) .wizardry-modal-backdrop:not(:has(.wizardry-inspector)){visibility:hidden}.wizardry-screen .wizardry-ceremony{z-index:140;width:min(92%,520px);max-height:30%;padding:10px;position:absolute;top:56px;overflow:hidden}.wizardry-screen .wizardry-ceremony p{font-size:12px}.wizardry-screen .wizardry-ceremony p:first-child{font-size:18px}.wizardry-screen-content>p[role=alert]{z-index:8;position:absolute;top:48px;left:12px;right:12px}.wizardry-screen [hidden]{display:none!important}@container (width<=600px) and (height>=501px){.wizardry-screen .wizardry-modal-scene{width:100%;height:65%}.wizardry-screen .wizardry-scene-backdrop{align-items:flex-end}.wizardry-screen .wizardry-shop-item{grid-template-columns:minmax(0,1fr)}.wizardry-shop-item>span:last-child{justify-content:flex-end}.wizardry-screen .wizardry-latest{bottom:258px;left:12px;right:12px}.wizardry-screen .wizardry-start-content h2{font-size:26px}}@container (width>=601px){.wizardry-screen .wizardry-portrait-party{width:min(46%,650px);height:68px;left:50%;right:auto;transform:translate(-50%)}.wizardry-screen .wizardry-hero{height:68px}.wizardry-screen .wizardry-arcade{bottom:8px}.wizardry-screen .wizardry-court-pad,.wizardry-screen .wizardry-castle-tools{bottom:12px}.wizardry-screen .wizardry-court-enter{bottom:158px}.wizardry-screen .wizardry-secondary-tools{bottom:205px}.wizardry-screen .wizardry-tactical-arcade{bottom:90px}.wizardry-screen .wizardry-treasure-actions{width:285px;bottom:90px;left:auto}.wizardry-screen .wizardry-treasure-actions>div{grid-template-columns:repeat(2,minmax(0,1fr))}.wizardry-screen .wizardry-latest{margin:auto;bottom:100px;left:180px;right:180px}.wizardry-screen[data-interface=chest] .wizardry-latest{bottom:12px;left:12px;right:320px}}@container (height<=500px){.wizardry-screen .wizardry-reward{width:auto;top:8px;left:190px;right:110px}.wizardry-screen .wizardry-screen-content{grid-template-rows:44px minmax(0,1fr)}.wizardry-screen .wizardry-portrait-party{width:44%;height:54px;bottom:6px}.wizardry-screen .wizardry-hero{height:54px}.wizardry-screen .wizardry-minimap{width:88px}.wizardry-screen .wizardry-enemy-hud{width:170px;max-height:calc(100% - 125px);top:24px}.wizardry-screen .wizardry-stick{width:138px;height:138px}.wizardry-screen .wizardry-arcade{padding:6px;bottom:0}.wizardry-screen .wizardry-secondary-tools{top:8px;bottom:auto;right:105px}.wizardry-screen .wizardry-tactical-arcade{max-width:none;bottom:70px;left:190px;right:115px}.wizardry-screen .wizardry-tactical-arcade button{width:44px}.wizardry-screen .wizardry-treasure-actions{width:270px;padding:6px;bottom:65px}.wizardry-screen .wizardry-treasure-actions h3{display:none}.wizardry-screen .wizardry-treasure-actions p{margin:0 0 4px}.wizardry-screen .wizardry-context{top:6px;left:170px;right:105px}.wizardry-screen .wizardry-context [role=group]{grid-template-columns:repeat(4,minmax(0,1fr))}.wizardry-screen .wizardry-court-enter{bottom:70px}.wizardry-screen .wizardry-castle-tools{bottom:8px;right:8px}.wizardry-screen .wizardry-latest{font-size:10px;bottom:70px}.wizardry-screen[data-interface=combat] .wizardry-latest{bottom:170px;left:190px;right:110px}.wizardry-screen .wizardry-court-map{grid-template-columns:repeat(7,12px);padding:3px;top:6px;right:6px}.wizardry-screen .wizardry-court-map span{width:12px;height:12px}.wizardry-screen .wizardry-start-content{padding:12px 24px}.wizardry-screen .wizardry-start-content h2{font-size:24px}.wizardry-screen .wizardry-overlay-heading{padding:2px 10px}.wizardry-screen .wizardry-overlay-footer{padding:4px 10px}.wizardry-screen .wizardry-modal-scene{width:47%}}@media (pointer:fine){.wizardry-screen .wizardry-stick,.wizardry-screen .wizardry-court-pad{opacity:.4}.wizardry-screen .wizardry-stick:hover,.wizardry-screen .wizardry-court-pad:hover{opacity:1}}.wizardry-screen[data-interface=camp] .wizardry-play .wizardry-portrait-party,.wizardry-screen[data-interface=camp] .wizardry-arcade,.wizardry-screen[data-interface=camp] .wizardry-context,.wizardry-screen[data-interface=camp] .wizardry-location,.wizardry-screen[data-interface=camp] .wizardry-latest,.wizardry-screen[data-interface=camp] .wizardry-minimap{visibility:hidden}.wizardry-camp-interface{pointer-events:none;z-index:8;position:absolute;inset:44px 0 0}.wizardry-camp-interface button{pointer-events:auto}.wizardry-camp-title{background:var(--wizardry-map-surface);border-radius:6px;grid-template-columns:minmax(0,1fr) 44px;align-items:center;max-width:calc(100% - 32px);padding:8px 12px;display:grid;position:absolute;top:12px;left:16px}.wizardry-camp-title h2{font-family:var(--font-display);font-size:20px}.wizardry-camp-title span{color:var(--primary);grid-column:1;font-size:11px}.wizardry-camp-title button{grid-area:1/2/3}.wizardry-camp-actions{pointer-events:auto;gap:8px;width:min(340px,100% - 32px);display:grid;position:absolute;bottom:100px;right:16px}.wizardry-camp-actions>button{white-space:normal;height:auto;min-height:48px}.wizardry-camp-actions p{overflow-wrap:anywhere;font-size:12px;line-height:1.4}.wizardry-camp-sleep{font-size:17px;min-height:56px!important}.wizardry-camp-secondary{grid-template-columns:1fr 1fr;gap:6px;display:grid}.wizardry-camp-secondary button{white-space:normal;height:auto;min-height:48px;padding:6px;font-size:12px}.wizardry-camp-summary,.wizardry-camp-progress{background:var(--wizardry-map-surface);border:1px solid var(--border);border-radius:6px;padding:12px}.wizardry-camp-summary h3{color:var(--primary);margin-bottom:4px;font-size:18px}.wizardry-camp-summary button{height:28px;padding:0;font-size:12px}.wizardry-camp-progress{gap:8px;display:grid}.wizardry-camp-progress progress{width:100%;height:5px;accent-color:var(--primary)}.wizardry-camp-sleeping .wizardry-hp{transition:all .18s linear}@container (width<=600px) and (height>=501px){.wizardry-camp-actions{gap:5px;width:calc(100% - 24px);bottom:88px;right:12px}.wizardry-camp-summary{padding:8px 10px}.wizardry-camp-title{top:8px;left:12px}}@container (height<=500px){.wizardry-camp-actions{gap:4px;width:38%;bottom:8px;right:10px}.wizardry-camp-interface .wizardry-portrait-party{width:56%;bottom:8px;left:12px;right:auto;transform:none}.wizardry-camp-actions>button,.wizardry-camp-secondary button{font-size:12px;min-height:44px!important}.wizardry-camp-summary{padding:6px 8px}.wizardry-camp-summary h3{font-size:15px}.wizardry-camp-actions p{font-size:10px}.wizardry-camp-title{top:6px;left:12px}}@media (prefers-reduced-motion:reduce){.wizardry-camp-sleeping .wizardry-hp{transition:none}}.wizardry-train-button{min-height:56px;box-shadow:0 0 18px color-mix(in oklab, var(--primary) 45%, transparent);font-size:1rem}.wizardry-train-card{text-align:left;border:1px solid var(--border);background:color-mix(in oklab, var(--card) 85%, transparent);border-radius:6px;width:100%;padding:8px;font-size:12px;display:block}.wizardry-train-card[data-ready]{border-color:var(--primary);box-shadow:0 0 12px color-mix(in oklab, var(--primary) 40%, transparent)}.wizardry-xp{width:100%;height:6px;accent-color:var(--primary);margin:4px 0;display:block}.wizardry-train-cinematic{text-align:center;background:radial-gradient(circle, color-mix(in oklab, var(--primary) 30%, transparent), transparent 70%);padding:16px 8px}.wizardry-train-cinematic ul{gap:6px;margin:12px 0;font-size:12px;display:grid}.wizardry-train-cinematic li{flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;animation:.5s ease-out both wizardry-rise;display:flex}.wizardry-train-cinematic li:nth-child(2){animation-delay:.25s}.wizardry-train-cinematic li:nth-child(3){animation-delay:.5s}.wizardry-train-cinematic li:nth-child(4){animation-delay:.75s}.wizardry-train-cinematic li:nth-child(5){animation-delay:1s}.wizardry-train-cinematic li:nth-child(6){animation-delay:1.25s}.wizardry-levelup{font-family:var(--font-display,serif);color:var(--primary);letter-spacing:.2em;font-size:2rem;animation:1.2s ease-in-out infinite alternate wizardry-glow}.wizardry-level-tick{color:var(--primary);font-weight:700;animation:.6s ease-out .6s both wizardry-pop;display:inline-block}@keyframes wizardry-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes wizardry-glow{0%{text-shadow:0 0 6px var(--primary)}to{text-shadow:0 0 24px var(--primary)}}@keyframes wizardry-pop{0%{opacity:0;transform:scale(.4)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.wizardry-train-cinematic *,.wizardry-levelup{animation:none!important}}.wizardry-screen .wizardry-enemy-hud{z-index:3;grid-template-columns:repeat(auto-fit,minmax(120px,240px));grid-auto-rows:minmax(150px,300px);place-content:center;gap:12px;width:auto;max-height:none;display:grid;inset:130px 130px 220px 220px;overflow:auto}.wizardry-screen .wizardry-enemy-hud button{text-align:center;border-radius:4px;grid-template-rows:minmax(70px,1fr) auto 4px auto;grid-template-columns:minmax(0,1fr);gap:4px;height:100%;min-height:150px;padding:0;display:grid;overflow:hidden}.wizardry-screen .wizardry-enemy-hud .wizardry-enemy-portrait{object-fit:contain;image-rendering:auto;filter:none;border-radius:0;grid-area:1/1;width:100%;height:100%;transform:none}.wizardry-screen .wizardry-enemy-hud span,.wizardry-screen .wizardry-enemy-hud small,.wizardry-screen .wizardry-enemy-hud progress{grid-column:1}.wizardry-screen .wizardry-enemy-hud span,.wizardry-screen .wizardry-enemy-hud small{padding:0 4px}.wizardry-screen .wizardry-enemy-hud small{padding-bottom:4px}@container (width<=600px) and (height>=501px){.wizardry-screen .wizardry-enemy-hud{grid-template-columns:repeat(auto-fit,minmax(120px,180px));grid-auto-rows:minmax(150px,240px);align-content:start;gap:8px;inset:130px 12px 280px}}@container (height<=500px){.wizardry-screen .wizardry-enemy-hud{grid-template-columns:repeat(auto-fit,minmax(110px,160px));grid-auto-rows:140px;align-content:start;gap:6px;inset:28px 110px 175px 190px}.wizardry-screen .wizardry-enemy-hud button{min-height:140px}}.wizardry-screen .wizardry-enemy-hud{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));grid-auto-rows:1fr;place-content:stretch;gap:14px;inset:44px 12px 52px}.wizardry-screen .wizardry-enemy-hud button{color:#f3e3b5;background:linear-gradient(145deg,#3a2a12,#1a1209 60%,#3a2a12);border:3px solid #c9a24a;border-radius:6px;gap:6px;min-height:0;padding:10px;box-shadow:inset 0 0 0 2px #6b4e1c,inset 0 0 0 6px #e6c977,inset 0 0 0 8px #4a3510,0 6px 18px #0009}.wizardry-screen .wizardry-enemy-hud .wizardry-enemy-portrait{object-fit:contain;background:#000;border:2px solid #2a1d0a;min-height:0;padding:0;box-shadow:0 0 0 1px #e6c977}.wizardry-screen .wizardry-enemy-hud button[aria-pressed=true]{border-color:#ffe08a;box-shadow:inset 0 0 0 2px #6b4e1c,inset 0 0 0 6px #ffe08a,inset 0 0 0 8px #4a3510,0 0 22px #ffd25e}@container (width<=600px) and (height>=501px){.wizardry-screen .wizardry-enemy-hud{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;inset:40px 8px 48px}}@container (height<=500px){.wizardry-screen .wizardry-enemy-hud{grid-template-columns:repeat(auto-fit,minmax(120px,1fr));grid-auto-rows:1fr;gap:6px;inset:24px 104px 40px}.wizardry-screen .wizardry-enemy-hud button{min-height:0;padding:6px}}
