/* Field interface: world first, one surface, physical controls and contextual decisions. */
:root{--field-amber:#d6ae66;--field-cloth:#333e2b;--field-ink:#142017}
.game-shell :is(button,input,select):focus-visible,dialog :is(button,input,select):focus-visible{outline:2px solid #f6e5b3;outline-offset:3px}
.game-shell :is(.action.primary),dialog .action.primary{border-radius:0;clip-path:polygon(6px 0,100% 0,100% calc(100% - 6px),calc(100% - 6px) 100%,0 100%,0 6px);background:linear-gradient(115deg,#ae894b,#d9b46e 75%,#c1a061);color:#1c241b;border:0;border-top:1px solid #f2d29a;box-shadow:0 3px 9px #0005;font:650 13px/1.35 ui-monospace,monospace;min-height:48px}
.game-shell .action.primary::before,dialog .action.primary::before{display:none}
.game-shell button:disabled,dialog button:disabled{cursor:default}
.interior-screen{position:relative}
.map-first-top.scene-top{height:64px;padding:12px 16px;background:linear-gradient(#101b14ed,#101b1400);align-items:center}
.map-first-top .scene-wordmark{font:9px ui-monospace,monospace;letter-spacing:1.5px;color:#c7c6a8}
.map-first-top button,.scene-options summary{min-height:44px;border-radius:2px;border:1px solid #6f746058;background:linear-gradient(135deg,#3b4234,#19231b);box-shadow:inset 0 1px #a1a18533;color:#d7d7b8}
.map-first-top [data-open-bag]{font:11px ui-monospace,monospace;transform:rotate(2deg);border-top:2px solid #999879;background:repeating-linear-gradient(90deg,#343c2d 0 2px,#30392a 2px 4px)}
.scene-options-panel{border-radius:0;border-color:#7d8564;background:#222e21;gap:0;padding:8px 14px;box-shadow:0 8px 30px #0008}
.scene-options-panel button{border:0;border-bottom:1px solid #9da07933;background:none;box-shadow:none;border-radius:0;padding:11px 0;font-size:11px}
.scene-location{top:68px;left:18px;right:18px}.scene-location h1{font-size:25px;margin:3px 0}.scene-location .scene-eyebrow{font:9px/1.5 ui-monospace,monospace;letter-spacing:1px;color:#babf9f}.scene-location>p:last-child{font-size:10px;color:#aab397}
.map-first-stage.scene-stage{background:radial-gradient(ellipse,#303b2b,#111d16 85%)}
.map-first-stage .scene-map{inset:130px 0 70px}
.scene-object .object-tag,.scene-object>text{display:none}
.object-aura{fill:#d6aa5d15;stroke:#e5c77c;stroke-width:.05;stroke-dasharray:.15 .1}
.scene-object:focus-visible .object-hit,[data-world-exit]:focus-visible rect{stroke:#f4e4b7;stroke-width:.08}
.map-first-stage .scene-camera{right:10px;bottom:78px;gap:2px}
.map-first-stage .scene-camera button,.map-first-stage .scene-camera button:first-child{border:0;border-radius:0;background:#142018e8;color:#b8c0a8;box-shadow:none}
.map-first-stage .scene-floors{left:16px;bottom:20px;gap:0;border-radius:0;border-left:2px solid #87936a;background:#1b281ee8;transform:rotate(-1deg)}
.map-first-stage .scene-floors button{border-radius:0;font:11px ui-monospace,monospace;padding:6px 10px;border:0}
.map-first-stage .scene-floors [aria-pressed=true]{background:#4c4d32;border-bottom:2px solid var(--field-amber);color:#ecd9ab}
.map-first-stage .scene-credit{font-size:7px;right:16px;bottom:4px}
.field-context.map-first-tray{position:absolute;z-index:6;top:var(--context-y,50%);left:var(--context-x,12px);bottom:auto;width:min(300px,calc(100% - 24px));margin:0;max-height:min(55%,350px);overflow:auto;padding:11px 13px;border:0;border-left:2px solid #c6ab70;border-radius:0;background:linear-gradient(115deg,#1e2c20f5,#162219ee);box-shadow:0 5px 20px #0007;flex:none}
.field-context .scene-action-row{gap:10px;min-height:42px}.field-context h2{font-size:19px}.field-context .selected-state{font:10px/1.5 system-ui,sans-serif!important;max-width:170px}.field-context .action.primary{border-radius:0;padding:10px 12px;min-height:46px;font:650 12px/1.3 ui-monospace,monospace;background:linear-gradient(115deg,#b28c4c,#d9b46e);clip-path:polygon(5px 0,100% 0,100% calc(100% - 5px),calc(100% - 5px) 100%,0 100%,0 5px)}
.field-context:has(.scene-challenge){max-height:55%;width:min(340px,calc(100% - 24px))}.field-context .scene-challenge>p,.scene-stair-confirm p{font-size:11px;line-height:1.5;color:#c8ceb5;margin:6px 0 10px}.scene-stair-confirm .text-button{min-height:44px;margin:0}
.scene-pins button,.scene-debris button{border-radius:0;background:linear-gradient(130deg,#4a5038,#202d22);box-shadow:inset 0 1px #d2cc8c33}
.field-belt{position:absolute;bottom:14px;left:16px;right:16px;z-index:4;display:flex;justify-content:flex-end;gap:16px;border:0;pointer-events:none;margin:0;padding:0}.field-belt button{pointer-events:auto;flex:0 0 auto;min-height:48px;padding:8px 12px;border-radius:0;background:#19271de8;font-size:10px;max-width:48%}.field-belt [data-journal]{order:2;transform:rotate(2deg);border:1px solid #7e80624d;border-top:3px solid #8d8d68;background:repeating-linear-gradient(90deg,#343c2d 0 2px,#30392a 2px 4px);box-shadow:inset 0 -4px #17201799,0 5px 12px #0005;color:#ded7b5;font:11px ui-monospace,monospace}.field-belt .scene-leave{background:none;max-width:150px;margin-right:auto;padding-left:0;color:#bcc4aa;font-size:10px}
.map-first-tray:not(.field-context){border-radius:0;border:0;border-top:1px solid #aaa98255;background:linear-gradient(130deg,#253323f5,#111e16fa);box-shadow:none;margin:0 12px 10px;padding:12px}.map-first-tray .scene-dock-links{margin-top:6px}.scene-dock-links button{border-radius:0}
:is(.world-panel,.detail-dialog){inset:auto 12px 78px auto;margin:0;width:min(430px,calc(100% - 24px));max-width:none;max-height:calc(100dvh - 170px);height:auto;padding:26px 20px 22px;border:1px solid #7d8560;border-top:4px solid #969b76;border-radius:2px;background:repeating-linear-gradient(0deg,#30392918 0 2px,#0d170f18 2px 4px),linear-gradient(120deg,#35402d,#19251c 85%);box-shadow:0 12px 45px #0008;overflow:auto;color:#e2dfc6;transform-origin:bottom right}
:is(.world-panel,.detail-dialog)::backdrop{background:#050b073d;backdrop-filter:none}
.world-panel[data-surface=bag]{border-top:7px solid #797f59;background:repeating-linear-gradient(90deg,#40483112 0 2px,#17231512 2px 4px),linear-gradient(130deg,#3b452d,#1c291e)}
:is(.panel-close,.dialog-close){position:absolute;top:8px;right:8px;width:44px;height:44px;min-height:44px;border:1px solid #87916b55;border-radius:0;background:#17251a88;color:#dfddbd;font-size:25px;box-shadow:none}
.world-panel .panel-screen{padding:0;overflow:visible;background:none}.world-panel .screen-heading,.bag-screen .screen-heading{background:none;min-height:0;margin:0 0 20px;padding:8px 34px 18px 0;border-bottom:1px solid #b6b69644}.world-panel .screen-heading h1{font-size:28px}.world-panel .screen-heading p{font-size:11px;line-height:1.6}.world-panel .capacity-card{padding:10px 0;border:0;border-radius:0;box-shadow:none;background:none}.world-panel progress{height:4px;border-radius:0}.world-panel .item-grid{gap:8px}.world-panel .item-slot{border-radius:0;border:1px solid #9aa07a55;background:linear-gradient(145deg,#4a513499,#19251b);box-shadow:inset 0 2px 8px #0004}.world-panel .item-name{font-size:10px}.world-panel .item-slot small{font-size:9px;color:#c6bc94}.world-panel .recipe-card,.survivor-equipment button{border-radius:0;border-color:#7e8b5e55;box-shadow:none;background:#1e2d20aa}
.field-inspector{border-block:1px solid #a1a07977;padding:16px 0;margin-bottom:18px}.field-inspector .detail-art{width:65px;height:65px;margin:0 12px 8px 0;float:left}.field-inspector h2{font-size:24px;margin:4px 0 12px}.field-inspector .overline{font-size:9px}.field-inspector .detail-note{clear:both;text-align:left;line-height:1.6}.field-inspector .action{width:100%;margin-top:10px}.field-inspector input{min-height:44px;border-radius:0}.field-inspector label{display:block;clear:both;font-size:12px}.field-inspector .ingredient-list{clear:both}.field-inspector:focus-within{border-color:#cab57d}
.detail-dialog h2{text-align:left;font-size:27px;padding-right:22px}.detail-dialog .overline,.detail-dialog .detail-description,.detail-dialog .detail-note{text-align:left}.detail-dialog .survivor-menu-items button,.detail-dialog .signal-row{border-radius:0;background:#1c2d20a8;box-shadow:none}.detail-dialog .action{font-size:13px}.detail-dialog .survivor-menu-items b{font-size:18px}
.field-receipt{position:absolute;z-index:15;left:50%;bottom:90px;transform:translateX(-50%);width:min(410px,calc(100% - 32px));padding:15px 18px;border-left:2px solid var(--field-amber);background:#14271df5;box-shadow:0 7px 25px #0007;pointer-events:none;color:#dfdfbe}.field-receipt h2{font:23px Georgia,serif;margin:5px 0 10px}.field-receipt p{font-size:11px;line-height:1.5}.field-receipt .overline{font-size:8px}.field-receipt-items{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:10px}.field-receipt-items>span{display:flex;align-items:center;gap:5px;font-size:10px}.field-receipt-items .game-art{width:32px;height:32px}.field-receipt .reward-hero{min-height:0}.field-receipt .reward-hero .game-art{width:60px;height:60px}.field-receipt .reward-hero::before{display:none}
body:has(.interior-mode) .toast,.toast{border-radius:0;border:0;border-left:2px solid #c7ad70;background:#16291ef5;backdrop-filter:none;max-width:calc(100% - 32px);width:max-content;bottom:100px;white-space:normal;pointer-events:none}.loot-reveal .loot-find{border-radius:0;box-shadow:none}
@media(min-width:761px){.map-first-stage .scene-map{inset:115px 60px 70px}.scene-location{left:26px}.map-first-top.scene-top{padding-inline:24px}.field-context{max-width:300px}:is(.world-panel,.detail-dialog){right:max(20px,calc((100vw - 1280px)/2));bottom:90px;max-height:calc(100dvh - 150px)}}
@media(max-height:650px){.map-first-top.scene-top{height:56px;padding-block:7px}.scene-location{top:57px}.scene-location h1{font-size:22px}.map-first-stage .scene-map{inset:110px 0 68px}.field-context .selected-state{font-size:9px!important}.field-context.map-first-tray{padding:8px 10px;max-height:55%}:is(.world-panel,.detail-dialog){max-height:calc(100dvh - 145px);padding:21px 16px}.world-panel .screen-heading{margin-bottom:12px}.field-belt{bottom:10px}}
@media(prefers-reduced-motion:no-preference){dialog[data-surface][open]{animation:field-unfold 180ms ease-out both}@keyframes field-unfold{from{opacity:0;transform:translateY(15px) scale(.98)}to{opacity:1;transform:none}}}
@media(prefers-reduced-motion:reduce){dialog[data-surface][open]{animation:none}}
.world-panel[data-surface=bag]{max-height:min(62dvh,calc(100dvh - 150px))}.bag-screen:has(.field-inspector:not([hidden])) #backpack{display:none}.world-panel .screen-heading{padding-bottom:12px;margin-bottom:12px}.bag-screen .field-inspector .action.secondary{border:0;background:none;color:#c6c9b0;border-radius:0;font:12px system-ui,sans-serif}.bag-screen .item-slot{min-height:105px}.bag-screen .item-slot .game-art{width:58px;height:58px}.world-panel .workshop-banner{background:none;min-height:0;padding:8px 30px 16px 0;border-bottom:1px solid #9fa57944}.world-panel .workshop-banner h1{font-size:28px}.world-panel .workshop-banner p{font-size:11px}.world-panel .segmented{border-radius:0;background:none;border-bottom:1px solid #a5af8944}.world-panel .segmented button{border-radius:0;font:11px ui-monospace,monospace}.world-panel .segmented [aria-pressed=true]{background:#4c4d32;color:#e7d2a2;border-bottom:2px solid #d6ae66}
/* The belt and floor controls occupy separate touch rows. */
.interior-screen:has(.field-belt) .scene-floors{bottom:78px}
.scene-action-error{font:11px/1.6 system-ui,sans-serif;color:#e7bd9b;margin:9px 0 0;padding-top:8px;border-top:1px solid #b09a6c55}.game-shell .action.primary:focus-visible,dialog .action.primary:focus-visible{outline-offset:-3px}
/* In a short landscape view the action occupies the reserved grid column. */
@media(max-height:500px) and (min-width:600px){
 .field-context.map-first-tray{position:relative;top:auto;left:auto;width:calc(100% - 24px);margin:12px;max-height:calc(100dvh - 24px);align-self:center}
}

/* Walking is explicit; an empty selection leaves the plan unobstructed. */
.field-context[hidden]{display:none!important}.field-context{padding-right:38px!important}.selection-clear{position:absolute;right:4px;top:2px;width:36px;height:36px;background:none;border:0;color:#c7ccae;font-size:23px}.walk-instruction{position:absolute;bottom:130px;left:14px;right:64px;color:#d1d2ab;font:11px/1.5 system-ui;pointer-events:none;text-align:center;text-shadow:0 1px 4px #000}.scene-controls-plan{position:absolute;left:208px;bottom:78px;z-index:5;min-height:44px;padding:6px 11px;border:1px solid #98a17a55;background:#17281fe8;font:11px system-ui}.scene-location .scene-eyebrow{max-width:100%;font-size:8px;letter-spacing:1px;line-height:1.6}.scene-noise{white-space:nowrap;display:inline-block}.walker-overlay{stroke:none;fill:none}.scene-plan:focus-visible{outline:1px solid #c7c18e88;outline-offset:-3px}
@media(max-height:500px) and (min-width:600px){
 .game-shell.interior-mode .interior-screen.walking-scene{display:block}
 .walking-scene .map-first-stage{width:calc(100% - 260px);overflow:visible}
 .walking-scene .map-first-stage .scene-map{inset:60px 10px 48px}
 .walking-scene .scene-location{left:calc(100% + 12px);right:auto;top:8px;width:236px}
 .walking-scene .scene-location h1{font-size:22px}
 .walking-scene .field-context.map-first-tray{position:absolute;left:auto;right:12px;top:95px;width:236px;margin:0;max-height:calc(100% - 110px)}
 .walking-scene .scene-floors{bottom:8px;left:12px}
 .walking-scene .scene-controls-plan{left:auto;right:12px;bottom:8px}
 .walking-scene .scene-camera{top:auto;bottom:60px;right:10px}
 .walking-scene .walk-instruction{bottom:8px;left:170px;right:70px;font-size:9px}
}
