/* Woodland field controls: quiet status above, deliberate actions below. */
.hud{top:max(14px,env(safe-area-inset-top));left:16px;display:flex;align-items:center;gap:22px;max-width:none;padding:12px 18px;background:#f5ebd0f5;border:1px solid #a3ad87;border-radius:5px;box-shadow:inset 0 2px #fff8df,0 3px 0 #425b3933;backdrop-filter:blur(5px)}
.hud-brand{display:flex;gap:10px;align-items:center;padding-right:22px;border-right:1px solid #b8bea0;color:#375d48}.hud-brand>svg{width:28px;height:28px}.hud-brand>span{font:700 15px/1.1 'Courier New',monospace;letter-spacing:-.5px}.hud-brand small{margin-top:4px;font:10px/1.2 'Trebuchet MS',sans-serif;color:#6c795c}
.hud .vital-stat,.hud .wave-stat{display:flex;gap:9px;align-items:center}.stat-symbol{color:#6d8152;display:grid;place-items:center}.stat-symbol svg{width:22px;height:22px}.stat-symbol.life-symbol{color:#af6348}.hud small{font:10px/1.2 'Trebuchet MS',sans-serif;color:#657256;margin-bottom:3px}.hud strong{font:700 18px/1.1 'Courier New',monospace;letter-spacing:-.5px;display:block;padding:0;white-space:nowrap}.hud #lives{color:#375d48}.hud .life-track{display:block;width:64px;height:3px;background:#d4d6b6;margin-top:5px;overflow:hidden;border-radius:1px}.life-track i{display:block;height:100%;background:#63845a}.hud.low-lives #lives{color:#ad533e}.hud.low-lives .life-track i{background:#ad533e}
.playback{position:fixed;top:max(14px,env(safe-area-inset-top));right:72px;display:flex;gap:6px;z-index:3;padding:5px;background:#f5ebd0ef;border:1px solid #a3ad87;border-radius:5px;box-shadow:0 3px 0 #425b3933}.playback button{min-width:44px;height:44px;padding:4px;background:#e8e3c8;border:1px solid #b3b99a;box-shadow:none;font:700 15px 'Courier New',monospace;color:#456447}.playback button:hover{background:#d7dfbc}.playback button:disabled{opacity:.45}.game-menu{right:16px;top:max(20px,env(safe-area-inset-top))}.game-menu>summary{width:44px;height:44px;border:1px solid #a3ad87;border-radius:4px;background:#f5ebd0f5;color:#456447;box-shadow:0 3px 0 #425b3933;font-size:21px}.game-menu>div{top:54px;border:1px solid #a3ad87;border-radius:5px;box-shadow:0 8px 28px #294b4033;padding:20px}.game-menu>div h2{font-size:20px}.game-menu>div>p:first-of-type{line-height:1.6}
.wave-controls{left:50%;right:auto;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(760px,calc(100vw - 32px));display:grid;grid-template-columns:170px minmax(0,1fr) 194px;align-items:center;gap:16px;padding:8px;background:#f5ebd0f5;border:1px solid #a3ad87;border-radius:5px;box-shadow:inset 0 2px #fff8df,0 3px 0 #425b3933;backdrop-filter:blur(5px)}
.wave-controls #build-mode{display:flex;flex-direction:row;align-items:center;gap:9px;justify-content:center;min-height:50px;padding:7px 10px;background:#e8e4c9;border:1px solid #aab591;border-radius:3px;box-shadow:none}.build-symbol{display:grid;place-items:center;color:#63845a}.build-symbol svg{width:23px;height:23px}#build-mode small{font:700 13px/1.2 'Trebuchet MS',sans-serif;color:#375d48;white-space:nowrap}#build-mode strong{display:grid;place-items:center;min-width:23px;height:25px;padding:0 4px;background:#d7dfbc;border:1px solid #b3c19b;border-radius:2px;font:700 15px 'Courier New',monospace;color:#375d48}#build-mode:hover{background:#dae1c0}#build-mode[aria-pressed=true]{background:#376b59;border-color:#244d40;box-shadow:inset 0 0 0 2px #7b9a72}#build-mode[aria-pressed=true] small,#build-mode[aria-pressed=true] .build-symbol{color:#fff4ce}#build-mode[aria-pressed=true] strong{background:#244d40;color:#fff4ce;border-color:#7b9a72}
.wave-status{min-width:0;padding:0 4px}.wave-controls #status{display:block;margin:0;padding:0;background:transparent;border:0;box-shadow:none;max-width:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 12px/1.4 'Trebuchet MS',sans-serif;color:#375d48}.wave-status #status-detail{display:block;color:#70805f;font:11px/1.4 'Trebuchet MS',sans-serif;margin-top:3px}.wave-controls #start{min-height:50px;padding:8px 10px;border:1px solid #244d40;border-radius:3px;background:#376b59;color:#fff4ce;box-shadow:inset 0 2px #71936f;font:700 13px/1.3 'Trebuchet MS',sans-serif}.wave-controls #start:hover{background:#2e5c4d}.wave-controls #start:disabled{opacity:1;color:#788966;background:#dee2c6;border-color:#bac5a3;box-shadow:none}.build-active .wave-status #status-detail{color:#376b59}
#notice{top:92px;border:1px solid #a7ad83;border-radius:4px;background:#f8edcc;box-shadow:0 3px 12px #294b4033;font:12px/1.4 'Trebuchet MS',sans-serif;padding:10px 14px}
@media(max-width:900px){.hud-brand{display:none}.hud{gap:20px}.wave-controls{grid-template-columns:154px minmax(0,1fr) 175px;gap:12px}.wave-status #status-detail{font-size:10px}.wave-controls #build-mode{gap:7px}}
@media(max-width:540px){.hud{top:max(10px,env(safe-area-inset-top));left:10px;display:flex;gap:15px;padding:8px 11px;max-width:calc(100vw - 152px)}.hud .vital-stat,.hud .wave-stat{gap:6px}.hud strong{font-size:15px}.hud small{font-size:9px}.stat-symbol svg{width:16px;height:16px}.hud .life-track{width:48px}.playback{top:max(10px,env(safe-area-inset-top));right:60px;padding:3px;gap:3px}.playback button{min-width:44px;width:44px;height:44px;font-size:13px}.game-menu{right:10px;top:max(14px,env(safe-area-inset-top))}.game-menu>summary{width:44px;height:44px}.wave-controls{width:calc(100vw - 20px);bottom:max(10px,env(safe-area-inset-bottom));grid-template-columns:1fr 1.13fr;gap:8px;padding:6px}.wave-controls #build-mode,.wave-controls #start{min-height:44px;height:44px;font-size:12px;padding:5px 6px}.wave-controls #build-mode{grid-column:1;gap:6px}.wave-controls #start{grid-column:2}.wave-controls #build-mode small{font-size:12px}.build-symbol svg{width:20px;height:20px}#build-mode strong{font-size:13px;min-width:20px;height:23px}.wave-status{position:fixed;left:0;right:0;bottom:calc(100dvh - 111px);transform:translateY(100%);background:#f5ebd0df;border:1px solid #b3bb99;border-radius:3px;padding:7px 11px;pointer-events:none;backdrop-filter:blur(4px)}.wave-controls #status{font-size:11px}.wave-status #status-detail{display:none}.wave-controls.build-active .wave-status #status{display:none}.wave-controls.build-active .wave-status #status-detail{display:block;font-size:11px;margin:0}#notice{top:115px}}
@media(max-width:360px){.hud{gap:10px;padding:8px;max-width:none}.hud .stat-symbol{display:none}.hud strong{font-size:14px}.hud .life-track{width:48px}.hud small{font-size:9px}.playback button{min-width:44px}.wave-controls #build-mode{gap:5px}.wave-controls #build-mode small{font-size:11px}.wave-controls #start{font-size:11px}}
@media(orientation:landscape) and (max-height:500px){.hud{top:8px;left:10px;padding:6px 12px;gap:18px}.hud-brand{display:none}.hud strong{font-size:15px}.hud small{font-size:9px}.hud .life-track{margin-top:3px}.playback{top:8px;right:62px;padding:3px}.game-menu{top:12px;right:10px}.wave-controls{bottom:8px;padding:5px;width:min(710px,calc(100vw - 20px));grid-template-columns:145px minmax(0,1fr) 166px;gap:12px}.wave-controls #start,.wave-controls #build-mode{min-height:44px;height:44px}.wave-status #status-detail{font-size:10px}.wave-controls #status{font-size:11px}#notice{top:66px}}
.wave-controls .build-symbol{padding:0;background:transparent;border:0;box-shadow:none;border-radius:0;max-width:none}
@media(max-width:540px){.wave-status{transform:none;bottom:calc(100dvh - 114px)}}
/* A small field journal, with fixed navigation and a scrolling page. */
.game-menu[open]>summary{background:#376b59;color:#fff4ce;border-color:#244d40}.game-menu>.menu-panel{position:fixed;right:16px;top:80px;width:min(360px,calc(100vw - 20px));height:min(620px,calc(100dvh - 100px));max-height:none;display:flex;flex-direction:column;overflow:hidden;padding:0;background:#f5ebd0;border:2px solid #a3ad87;box-shadow:inset 0 2px #fff8df,0 12px 38px #203d3355}.menu-heading{display:flex;align-items:center;justify-content:space-between;padding:17px 18px 14px;border-bottom:1px solid #bdc3a2;background:#eae4c9}.menu-heading small{font:11px 'Trebuchet MS',sans-serif;color:#6d7d5d;margin:0 0 4px}.menu-heading h2{margin:0;font-size:22px}.menu-heading button{background:transparent;border:0;box-shadow:none;font-size:19px;width:44px;height:44px}.menu-tabs{display:grid;grid-template-columns:repeat(3,1fr);background:#e4e2c6;border-bottom:1px solid #bdc3a2;padding:0 8px}.menu-tabs button{border:0;border-bottom:3px solid transparent;background:transparent;box-shadow:none;border-radius:0;min-height:46px;font-size:12px;padding:8px 3px;color:#718261}.menu-tabs button[aria-selected=true]{border-bottom-color:#376b59;color:#294f40;background:#f5ebd0;font-weight:bold}.menu-content{flex:1;min-height:0;overflow:auto;padding:18px;scrollbar-color:#9bab80 #f5ebd0}.menu-content[hidden]{display:none}.menu-run-snapshot{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:18px;padding-bottom:16px;border-bottom:1px solid #c5c8a9}.menu-run-snapshot small{font-size:10px;margin:0 0 5px;color:#718261}.menu-run-snapshot strong{font:700 18px 'Courier New',monospace;color:#375d48}.menu-panel .menu-actions{display:grid;gap:8px;margin:0}.menu-actions button{text-align:left;min-height:46px;padding:10px 12px;font-size:13px;border:1px solid #b6bf9b;background:#e8e5cb;box-shadow:none}.menu-actions button.primary{background:#376b59;border-color:#244d40;color:#fff4ce}.menu-restart{width:100%;margin-top:18px;background:transparent;border:0;border-top:1px solid #c5c8a9;box-shadow:none;border-radius:0;text-align:left;color:#975f46;font-size:12px;padding:16px 0 0}.menu-footer{flex-shrink:0;padding:11px 18px;border-top:1px solid #bdc3a2;background:#eae4c9}.menu-footer #save-status,.menu-footer #seed{font-size:10px;line-height:1.4;margin:0;color:#70805f}.menu-footer #seed{margin-top:4px;color:#889275}.menu-content h3{font-size:13px;margin:0 0 12px}.menu-content p{font-size:12px;line-height:1.6;color:#6a7b59}.menu-content article+article{border-top:1px solid #c5c8a9;margin-top:18px;padding-top:18px}#menu-team{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}#menu-team span{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px 4px;background:#e4e3c6;border:1px solid #c5c8a9;border-radius:3px}#menu-team img{width:34px;height:42px;object-fit:contain}#menu-team small{font-size:10px;line-height:1.3;text-align:center;margin:0}#menu-run #relic-list{list-style:none;padding:0;margin:0 0 14px}#relic-list li{margin-bottom:6px}.menu-bonus{display:flex;gap:10px;align-items:center;text-align:left;width:100%;padding:9px 8px;border:1px solid #c5c8a9;box-shadow:none;background:#eee7ce;min-height:54px}.menu-bonus>.upgrade-icon{width:30px;height:30px;flex-shrink:0;float:none;margin:0!important}.menu-bonus>span{flex:1;min-width:0;font-size:12px;font-weight:bold;line-height:1.3}.menu-bonus small{font-size:10px;font-weight:normal;margin:4px 0 0}.menu-bonus>b{font:12px Georgia,serif;width:20px;height:20px;border:1px solid #b2be95;border-radius:50%;text-align:center;line-height:18px;color:#74855e}.menu-panel .upgrade-catalogue>summary{background:transparent;border:0;box-shadow:none;border-top:1px solid #c5c8a9;border-radius:0;width:auto;height:auto;min-height:44px;display:flex;align-items:center;font-size:12px;color:#486847;list-style:none}.menu-panel #upgrade-catalogue{display:grid;gap:6px;padding-top:8px}.menu-content button:focus-visible,.menu-tabs button:focus-visible{outline-offset:-3px}
@media(max-width:540px){.game-menu>.menu-panel{right:10px;top:72px;height:calc(100dvh - 84px);width:min(360px,calc(100vw - 20px))}.menu-heading{padding:12px 14px}.menu-heading h2{font-size:20px}.menu-content{padding:14px}.menu-footer{padding:10px 14px}}
@media(orientation:landscape) and (max-height:500px){.game-menu>.menu-panel{top:66px;right:10px;height:calc(100dvh - 76px);width:340px}.menu-heading{padding:8px 12px}.menu-heading h2{font-size:18px}.menu-heading small{display:none}.menu-content{padding:12px}.menu-footer{padding:7px 12px}.menu-footer #seed{display:none}.menu-run-snapshot{margin-bottom:12px;padding-bottom:12px}}
/* Tower field notes: fixed identity and controls, scrollable detail pages. */
#inspector{width:360px;height:410px;max-width:calc(100vw - 20px);max-height:calc(100dvh - 160px);border:1px solid #9b9f75;border-radius:12px;overflow:hidden;box-shadow:0 12px 36px #203c3555,inset 0 1px #fff9e7;background:#f5ebd0}
#inspector .tower-menu-head{background:#315c4c;color:#f5ebd0;grid-template-columns:56px minmax(0,1fr) 36px;min-height:88px;gap:12px;padding:13px 48px 13px 14px}
#inspector .tower-portrait{height:60px;border-radius:8px;background:#e7dfba;border:1px solid #bfbd90;display:grid;place-items:center}
#inspector .tower-portrait img{width:48px;height:58px;object-fit:contain}
#inspector .tower-menu-head h3{color:#fff1cb;font-size:19px;margin:3px 0 6px;line-height:1.15}
#inspector .tower-menu-head small{color:#c5d3b7;font-size:11px}
#inspector .tower-menu-head p{color:#e0d5a6;font-size:12px}
#inspector .tower-level-badge{font:700 27px/1.1 Georgia,serif;color:#ffe0a0}
#inspector .tower-level-badge small{font:11px/1.4 'Trebuchet MS',sans-serif;margin:0 0 3px}
#inspector .close-inspector{top:8px;right:7px;width:40px;height:40px;background:transparent;border:0;color:#f3e8c9;box-shadow:none}
#inspector .tower-progress{order:0;display:flex;gap:4px;flex-shrink:0;padding:0 14px 12px;background:#315c4c}
#inspector .tower-progress span{height:4px;flex:1;border-radius:2px;background:#79927a}
#inspector .tower-progress .active{background:#e9cc83}
#inspector .tower-tabs{order:1;background:#e9e2c4;padding:0 10px;border-bottom:1px solid #b9bb94;gap:0}
#inspector .tower-tabs button{min-height:46px;font-size:12px;color:#617153;border-radius:0;background:transparent}
#inspector .tower-tabs button[aria-selected="true"]{color:#294f40;border-bottom-color:#315c4c;background:#f5ebd0}
#inspector .tower-content{order:2;padding:14px 16px;scrollbar-color:#9fa77b #f5ebd0;background:#f5ebd0}
#inspector .tower-description{font-size:12px;color:#657255;margin:0 0 13px}
#inspector .target-priority-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:#52654e;margin:0 0 14px}
#inspector #target-priority{width:168px;max-width:60%;min-height:42px;padding:8px 10px;border:1px solid #aab18b;border-radius:6px;background:#fff5d9;color:#315c4c;font:700 12px 'Trebuchet MS',sans-serif}
#inspector .tower-stats{border:0;border-radius:7px;overflow:hidden;gap:1px;background:#c5c6a1;margin:0 0 14px}
#inspector .tower-stats>div{border:0;background:#e9e4c9;padding:10px 3px}
#inspector .tower-stats strong{font:700 22px/1.15 Georgia,serif;color:#315c4c}
#inspector .tower-stats span{font-size:10px;color:#677253;margin-top:5px}
#inspector .compact-upgrade{border-left:3px solid #9eaa75;padding:3px 0 3px 11px}
#inspector .compact-upgrade h4{font:700 15px/1.3 Georgia,serif;color:#315c4c;margin-top:4px}
#inspector .compact-upgrade p{font-size:12px;line-height:1.5;margin-top:5px}
#inspector .tower-actions{order:3!important;display:block;background:#e9e2c4;border-top:1px solid #bdbe97;border-bottom:0;padding:9px 16px}
#inspector .tower-actions p{font-size:10px;line-height:1.5;color:#667254;margin:0}
#inspector .tower-path-picker{gap:7px}
#inspector .tower-path-picker button{background:#e9e4cc;border:1px solid #b0b58c;border-radius:7px;padding:8px 4px}
#inspector .tower-path-picker button[aria-pressed="true"]{background:#dce5c8;border:2px solid #648664;padding:7px 3px;color:#294f40}
#inspector .tower-path-picker strong{font-size:11px;margin-top:4px}
#inspector .tower-path-intro{border-bottom-color:#c1c2a0;padding:14px 0}
#inspector .tower-stage-list li{padding:13px 0;border-bottom-color:#d3d0ad;gap:12px}
#inspector .tower-stage-list .installed{background:#e3e8c866;margin:0 -7px;padding-left:7px;padding-right:7px}
#inspector .tower-stage-list h4{font-family:Georgia,serif;font-size:14px}
#inspector .tower-stage-list .installed h4,#inspector .tower-stage-list .installed .tower-stage-state{color:#315c4c}
#inspector .tower-connections{background:#e9e4c9;border:0;border-radius:7px;padding:10px}
#inspector .tower-synergy{border-color:#d3d0ad;padding:13px 0}
#inspector .tower-synergy.owned{background:#e3e8c8;border:1px solid #b8c092;border-radius:7px;padding:11px;margin:7px 0}
#inspector .tower-synergy-title h4{font:700 15px Georgia,serif;color:#315c4c}
@media(max-width:540px){#inspector{width:340px;max-width:calc(100vw - 20px);height:400px}#inspector .tower-menu-head{gap:9px;padding-left:12px;grid-template-columns:48px minmax(0,1fr) 30px}#inspector .tower-menu-head h3{font-size:17px}#inspector .tower-content{padding:12px}#inspector .tower-stats strong{font-size:20px}}
@media(orientation:landscape) and (max-height:500px){#inspector{height:calc(100dvh - 140px);max-height:calc(100dvh - 140px)}#inspector .tower-menu-head{min-height:64px;padding-top:7px;padding-bottom:7px}#inspector .tower-portrait{height:44px}#inspector .tower-portrait img{height:42px}#inspector .tower-progress{padding-bottom:7px}#inspector .tower-tabs button{min-height:42px}}
#inspector{position:fixed;left:50%!important;right:auto;top:auto!important;bottom:max(12px,env(safe-area-inset-bottom));transform:translateX(-50%);width:390px;height:auto!important;max-height:calc(100dvh - 100px)}
#inspector .tower-content{flex:0 1 auto;padding:14px 16px}
#inspector .active-synergies{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid #c5c6a1}
#inspector .active-synergies button{display:grid;place-items:center;width:46px;height:46px;padding:5px;background:#e0e7c7;border:1px solid #97ab7b;border-radius:8px;box-shadow:none}
#inspector .active-synergies .upgrade-icon{width:32px;height:32px}
#inspector .tower-content .compact-upgrade{margin-top:10px}
@media(max-width:540px){#inspector{width:calc(100vw - 20px);bottom:max(10px,env(safe-area-inset-bottom))}}
@media(orientation:landscape) and (max-height:500px){#inspector{max-height:calc(100dvh - 84px)}#inspector .tower-content{padding:10px 14px}}
#inspector[data-dock="top"]{top:96px!important;bottom:auto}
#inspector .radius-legend{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px;font-size:10px;color:#53664f}
.radius-legend span::before{content:'';display:inline-block;width:15px;vertical-align:middle;margin-right:4px;border-top:2px solid #315c4c}
.radius-legend .link::before{border-top:2px dashed #47969c}
.radius-legend .terrain::before{border-top:2px dashed #b89740}
@media(orientation:landscape) and (max-height:500px){#inspector[data-dock="top"]{top:72px!important}}
.reward-selection #choices[data-count="4"]{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:800px){.reward-selection #choices[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.reward-selection #choices[data-count="4"]{grid-template-columns:1fr}}
.reward-selection .modal:has(#choices[data-count="4"]){width:min(1040px,calc(100vw - 28px));max-width:1040px}
.reward-selection #choices[data-count="4"] .reward-card strong{font-size:17px;overflow-wrap:normal;hyphens:auto}
.wave-buttons{display:flex;gap:8px;align-items:stretch}.wave-buttons #wave-preview{min-height:46px;padding:8px 12px;background:#e9e2c4;color:#315c4c;font-size:11px}.wave-buttons #start{height:auto}
.build-synergy-preview{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid #bdbe97;padding-top:8px;margin-top:8px}.build-synergy-preview>small{width:100%}.build-synergy-preview span{display:flex;align-items:center;gap:4px}.build-synergy-preview .upgrade-icon{width:26px;height:26px}
.wave-preview-list article{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid #c5c6a1}.wave-preview-list img{width:40px;height:48px;object-fit:contain}.wave-preview-list p{margin:5px 0;font-size:12px}
.run-summary{text-align:left;margin:18px 0}.run-summary h3{font:700 17px Georgia,serif;margin:20px 0 10px}.run-summary p{font-size:12px;line-height:1.5}.run-total{display:grid;grid-template-columns:repeat(3,1fr);text-align:center}.run-total strong{font:700 25px Georgia,serif;grid-row:1}.run-total span{font-size:11px}.summary-rewards{display:flex;gap:6px;flex-wrap:wrap}.summary-rewards span{background:#e4e7c9;border:1px solid #bec49a;padding:5px 8px;font-size:11px;border-radius:5px}
@media(max-width:540px){.wave-buttons{gap:4px}.wave-buttons #wave-preview{font-size:10px;padding:6px}.wave-buttons #start{font-size:11px;padding:8px}}
@media(min-width:901px){.wave-controls{width:min(880px,calc(100vw - 32px));grid-template-columns:170px minmax(0,1fr) 270px}}
@media(min-width:541px) and (max-width:900px){.wave-controls{grid-template-columns:154px minmax(0,1fr) 235px}}
.wave-buttons #start{flex:1;min-width:0}
@media(max-width:540px){.wave-controls{grid-template-columns:1fr}.wave-controls #build-mode{grid-column:1;grid-row:1;width:100%}.wave-buttons{grid-column:1;grid-row:2}.wave-buttons #start{width:auto}.wave-buttons #wave-preview{min-width:95px}.wave-status{position:absolute}}
.run-complete .modal{width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 40px);overflow:auto}
.run-complete #choices{display:block}.run-complete #again{width:100%;min-height:48px;margin-top:16px}
#build-panel,#build-info{overflow:auto;overscroll-behavior:contain}
#build-panel .build-icon[aria-pressed="true"]{background:#d8e3bb;border-color:#5c875f;box-shadow:inset 0 0 0 1px #5c875f}
#build-info{width:min(300px,calc(100vw - 16px))}
#build-panel{width:auto;max-width:calc(100vw - 16px);padding:6px;gap:0;background:transparent;border:0;box-shadow:none;border-radius:0;overflow:visible}
#build-panel #tower-shop{gap:10px}
#build-panel .build-icon{width:64px;height:64px;min-width:64px;padding:8px;border-radius:50%;background:#eee6c9;border:2px solid #879b72;box-shadow:inset 0 2px #fff8df,0 4px 10px #203c3540}
#build-panel .build-icon img{width:38px;height:46px}
#build-panel .build-icon[aria-pressed="true"]{background:#315c4c;color:#fff0bd;border-color:#e7d59b;box-shadow:0 0 0 3px #315c4c33,0 4px 10px #203c3540}
#build-panel .build-check{width:32px;height:32px;pointer-events:none}
#build-panel #close-shop,#build-panel #build-confirm{display:none!important}
#build-panel .build-icon:focus-visible{outline:3px solid #edc56b;outline-offset:4px;border-radius:50%}

/* Compact touch controls leave the map visible. */
@media(max-width:800px),(pointer:coarse){
 .wave-status,#notice,#mobile-help,footer{display:none!important}
 .wave-controls{left:auto;right:12px;bottom:max(12px,env(safe-area-inset-bottom));width:auto;display:flex;gap:8px;padding:0;background:transparent;border:0;box-shadow:none;transform:none}
 .wave-buttons{display:flex;gap:8px;width:auto}
 .wave-controls #build-mode,.wave-controls #start,.wave-controls #wave-preview{width:46px;min-width:46px;height:46px;min-height:46px;padding:10px;border-radius:50%;display:grid;place-items:center;position:relative}
 .wave-controls #build-mode small{display:none}
 .wave-controls #build-mode.unavailable{display:none}
 #build-mode strong{position:absolute;right:-3px;top:-5px;min-width:18px;height:18px;font-size:10px;padding:0 3px;border-radius:50%}
 .wave-buttons svg{width:23px;height:23px}
 .wave-controls #wave-preview{background:#eee6c9;border:1px solid #879b72;color:#375d48;box-shadow:0 3px 9px #203c3540}
 canvas.building{touch-action:none}
 .board.placing .pad-input{pointer-events:none}
 #build-panel .build-icon{width:52px;height:52px;min-width:52px;padding:6px}
 #build-panel .build-icon img{width:30px;height:36px}
 #tower-shop{gap:8px}
}
