.wizardry-stage{position:relative}.wizardry-arcade{pointer-events:none;justify-content:space-between;align-items:end;gap:10px;padding:12px;display:flex;position:absolute;inset:auto 0 0}.wizardry-arcade>*{pointer-events:auto}.wizardry-viewport{touch-action:none;-webkit-user-select:none;user-select:none}.wizardry-map-svg{touch-action:none}.wizardry-stick{border:1px solid var(--primary);background:var(--wizardry-map-surface);touch-action:none;-webkit-user-select:none;user-select:none;border-radius:50%;flex:none;width:150px;height:150px;position:relative}.wizardry-stick .wizardry-stick-forward,.wizardry-stick .wizardry-stick-backward,.wizardry-stick .wizardry-stick-left,.wizardry-stick .wizardry-stick-right{width:52px;height:52px;color:var(--foreground);touch-action:none;border-radius:50%;padding:0;position:absolute}.wizardry-stick-forward{top:0;left:49px}.wizardry-stick-backward{bottom:0;left:49px}.wizardry-stick-left{top:49px;left:0}.wizardry-stick-right{top:49px;right:0}.wizardry-stick-center{color:var(--primary);pointer-events:none;place-items:center;display:grid;position:absolute;inset:57px}.wizardry-stick[data-direction=forward] .wizardry-stick-forward,.wizardry-stick[data-direction=backward] .wizardry-stick-backward,.wizardry-stick[data-direction=left] .wizardry-stick-left,.wizardry-stick[data-direction=right] .wizardry-stick-right{background:var(--primary);color:var(--primary-foreground);box-shadow:var(--dungeon-shadow)}.wizardry-actions{grid-template-columns:repeat(2,52px);align-items:center;gap:6px;margin-left:auto;display:grid}.wizardry-actions .wizardry-action-small{touch-action:manipulation;background:var(--wizardry-map-surface);border:1px solid var(--border);border-radius:50%;width:52px;height:52px;padding:0}.wizardry-actions .wizardry-action-primary{white-space:normal;touch-action:manipulation;border-radius:50%;flex-direction:column;grid-column:span 2;gap:3px;width:110px;min-height:68px;padding:8px;font-size:11px;display:flex}.wizardry-arcade button:active{transform:scale(.94)}.wizardry-enemy-hud{flex-direction:column;gap:5px;width:min(180px,46%);display:flex;position:absolute;top:12px;left:12px}.wizardry-enemy-hud button{background:var(--wizardry-map-surface);white-space:normal;text-align:left;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:2px 6px;height:auto;min-height:48px;padding:6px 8px;font-size:11px;display:grid}.wizardry-enemy-hud .wizardry-enemy-portrait{object-fit:cover;border-radius:4px;grid-area:1/1/4;width:44px;height:44px}.wizardry-enemy-hud span,.wizardry-enemy-hud small,.wizardry-enemy-hud progress{grid-column:2}.wizardry-enemy-hud small{color:var(--muted-foreground);font-size:10px}.wizardry-enemy-hud progress{width:100%;height:4px;accent-color:var(--destructive)}.wizardry-target-selected{border-color:var(--primary)}.wizardry-tactical-arcade{grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin-top:8px;display:grid}.wizardry-tactical-arcade button{width:100%;min-width:44px;height:44px;padding:5px}.wizardry-reward{border-block:1px solid var(--primary);align-items:center;gap:8px;padding:10px;font-size:12px;display:flex}.wizardry-active .wizardry-context{min-height:0;padding:5px 0}.wizardry-active .wizardry-manual-orders:not(:has(details[open])){display:none}@media (pointer:coarse){.wizardry-active{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}.wizardry-active>div{padding:6px max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left))}.wizardry-active header{gap:2px;margin-bottom:6px}.wizardry-active header p{display:none}.wizardry-active header h1{margin-top:0;font-size:16px}.wizardry-active header a{font-size:10px}.wizardry-active .wizardry-save-row,.wizardry-active footer,.wizardry-active .wizardry-chronicle{display:none}.wizardry-active .wizardry-play{margin-top:0}.wizardry-active .wizardry-location{margin-bottom:5px;font-size:10px}.wizardry-active .wizardry-world{height:max(400px,calc(100dvh - 205px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))}.wizardry-active:has(.wizardry-tactical-arcade) .wizardry-world{height:max(350px,calc(100dvh - 249px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))}.wizardry-active .wizardry-viewport{aspect-ratio:auto;height:100%;min-height:0;max-height:none}.wizardry-active .wizardry-minimap{width:106px;top:8px;right:8px}.wizardry-active .wizardry-portrait-party{gap:3px;margin:5px 0}.wizardry-active .wizardry-hero{min-height:64px;display:block;position:relative}.wizardry-active .wizardry-hero img{object-fit:cover;object-position:center 20%;width:100%;height:64px}.wizardry-active .wizardry-hero-info{background:var(--wizardry-map-surface);width:100%;padding:3px;position:absolute;bottom:0}.wizardry-active .wizardry-hero-info strong{font-size:9px}.wizardry-active .wizardry-hero-info>span{display:none}.wizardry-active .wizardry-hp{margin:2px 0}.wizardry-modal-backdrop{padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}.wizardry-modal{max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:14px}}@media (pointer:coarse) and (orientation:landscape){.wizardry-active header{height:36px;margin-bottom:0}.wizardry-active header h1{font-size:14px}.wizardry-active .wizardry-world{height:max(240px,calc(100dvh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))}.wizardry-active:has(.wizardry-tactical-arcade) .wizardry-world{height:max(240px,calc(100dvh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom)))}.wizardry-active .wizardry-portrait-party{z-index:2;width:min(44%,410px);position:absolute;bottom:12px;left:50%;transform:translate(-50%)}.wizardry-active .wizardry-play>div{position:relative}.wizardry-active .wizardry-hero{min-height:44px}.wizardry-active .wizardry-hero img{height:44px}.wizardry-active .wizardry-tactical-arcade{z-index:3;grid-template-columns:repeat(4,minmax(0,1fr));width:200px;position:absolute;bottom:12px;left:12px}.wizardry-active .wizardry-tactical-arcade button{min-width:44px;height:44px}.wizardry-active .wizardry-context{background:var(--wizardry-map-surface);pointer-events:none;border:0;max-width:40%;padding:4px 8px;position:absolute;top:30px;left:190px}.wizardry-active .wizardry-context p{font-size:11px}.wizardry-active .wizardry-stick{width:138px;height:138px}.wizardry-active .wizardry-stick-forward,.wizardry-active .wizardry-stick-backward{left:43px}.wizardry-active .wizardry-stick-left,.wizardry-active .wizardry-stick-right{top:43px}.wizardry-active .wizardry-stick-center{inset:51px}}@media (prefers-reduced-motion:reduce){.wizardry-arcade button:active{transform:none}}.wizardry-castle{min-height:min(760px,92dvh)}.wizardry-castle .wizardry-castle-content{pointer-events:none;min-height:min(760px,92dvh)}.wizardry-castle .wizardry-castle-content>*{pointer-events:auto}.wizardry-castle-shade{background:var(--dungeon-shade);pointer-events:none;-webkit-mask-image:linear-gradient(#0000 40%,#000 70% 100%);mask-image:linear-gradient(#0000 40%,#000 70% 100%)}.wizardry-courtyard{z-index:2;pointer-events:none;position:absolute;inset:0}.wizardry-courtyard>*{pointer-events:auto}.wizardry-court-map{border:1px solid var(--border);background:var(--wizardry-map-surface);border-radius:6px;grid-template-columns:repeat(7,17px);gap:1px;padding:6px;display:grid;position:absolute;top:12px;right:12px}.wizardry-court-map span{width:17px;height:17px;color:var(--primary);place-items:center;font-size:8px;line-height:1;display:grid}.wizardry-court-map [data-tile=wall]{background:var(--border)}.wizardry-court-map [data-tile=door]{background:var(--primary);color:var(--primary-foreground);font-weight:700}.wizardry-court-map [data-tile=fountain]{background:var(--dungeon-water);border-radius:50%}.wizardry-court-map [data-tile=party]{color:var(--foreground);font-size:11px}.wizardry-court-pad{grid-template-rows:repeat(2,44px);grid-template-columns:repeat(3,44px);gap:4px;display:grid;position:absolute;top:12px;left:12px}.wizardry-court-pad button{touch-action:manipulation;width:44px;height:44px}.wizardry-court-forward{grid-area:1/2}.wizardry-court-left{grid-area:2/1}.wizardry-court-backward{grid-area:2/2}.wizardry-court-right{grid-area:2/3}.wizardry-court-enter{min-height:48px;box-shadow:var(--dungeon-shadow);position:absolute;top:46%;left:50%;transform:translate(-50%)}.wizardry-modal-backdrop:has(.wizardry-modal-scene){pointer-events:none;background:0 0;justify-content:flex-end;align-items:stretch}.wizardry-modal-scene{pointer-events:auto;background:color-mix(in oklab,var(--card) 92%,transparent);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);width:min(100%,440px);max-height:none}@media (width<=640px){.wizardry-modal-backdrop:has(.wizardry-modal-scene){align-items:flex-end}.wizardry-modal-scene{width:100%;max-height:58dvh}}.wizardry-inspector{width:min(100%,560px)}.wizardry-item-stage{border:1px solid var(--border);background:radial-gradient(circle at 50% 40%,var(--wizardry-map-surface),var(--dungeon-void));border-radius:6px;height:min(320px,42dvh);position:relative;overflow:hidden}.wizardry-item-stage canvas{cursor:grab;width:100%;height:100%;display:block}.wizardry-ceremony{left:50%;top:max(16px,env(safe-area-inset-top));z-index:140;text-align:center;border:1px solid var(--primary);background:color-mix(in oklab,var(--card) 88%,transparent);width:min(92vw,520px);box-shadow:var(--dungeon-shadow);pointer-events:none;border-radius:6px;padding:14px 18px;animation:.5s ease-out wizardry-ceremony-in;position:fixed;transform:translate(-50%)}.wizardry-ceremony-resurrect-fail{border-color:var(--destructive)}.wizardry-ceremony-rest{animation:.5s ease-out wizardry-ceremony-in,3.2s ease-in-out wizardry-night}@keyframes wizardry-ceremony-in{0%{opacity:0;transform:translate(-50%,-8px)}}@keyframes wizardry-night{0%,to{box-shadow:var(--dungeon-shadow)}45%{box-shadow:0 0 0 100vmax color-mix(in oklab,var(--dungeon-void) 70%,transparent)}}@media (prefers-reduced-motion:reduce){.wizardry-ceremony,.wizardry-ceremony-rest{animation:none}}.wizardry-castle[data-inside] .wizardry-courtyard,.wizardry-castle[data-inside] .wizardry-castle-content,.wizardry-castle[data-inside] .wizardry-castle-shade{display:none}
