/* Battlefield-first interface: restrained olive steel, warm brass and clear command hierarchy. */
@font-face{font-family:Barlow;src:url('Barlow-Regular.ttf')}@font-face{font-family:Condensed;src:url('BarlowCondensed-SemiBold.ttf');font-weight:600}
:root{--ink:#ece8d8;--muted:#c0cbb7;--panel:#202a25;--deep:#18201d;--brass:#d6b16b;--line:#526052;--danger:#dd8572;color-scheme:dark;font-family:Barlow,sans-serif;color:var(--ink);background:#18201d}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input,select{font:inherit}button{color:var(--ink);background:#344037;border:1px solid #64705c;border-radius:3px;padding:11px 18px;min-height:44px;cursor:pointer;transition:background .15s,border-color .15s}button:hover{background:#465343;border-color:#c4c9ae}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--brass);outline-offset:3px}button:disabled{opacity:.42;cursor:not-allowed}button.primary{background:var(--brass);color:#20271f;border-color:var(--brass);font-weight:bold}button.primary:hover{background:#ebc785}button.quiet,.text-button,.back{background:transparent;border-color:transparent}button.danger{color:#f0a694;border-color:#976a5b}button.text-button{padding:0 5px;min-height:24px;color:var(--muted);font-size:12px}h1,h2,h3,p{margin-top:0}h1,h2,h3,.hud-brand,.loading-mark{font-family:Condensed,sans-serif;font-weight:600}h2{font-size:40px;margin-bottom:12px}h3{font-size:24px;margin-bottom:9px}p{line-height:1.5;color:var(--muted)}[hidden]{display:none!important}#canvas{position:fixed;inset:0;width:100%;height:100%;display:block;outline:none;touch-action:none}#vignette{position:fixed;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(16,24,20,.94) 0%,rgba(16,24,20,.79) 28%,rgba(16,24,20,.06) 68%),linear-gradient(0deg,rgba(12,21,17,.7),transparent 25%)}body.playing #vignette{background:linear-gradient(0deg,rgba(12,21,17,.4),transparent 27%)}.screen{position:fixed;inset:0}#menu{padding:56px 5vw 34px;overflow:auto}.menu-content{max-width:460px}.brand-line{display:flex;align-items:center;gap:13px;font-family:Condensed;font-size:25px;margin-bottom:38px}.brand-emblem{color:var(--brass);font-size:34px}#menu h1{font-size:clamp(60px,6.5vw,96px);line-height:.95;letter-spacing:-.02em;margin-bottom:25px}#menu h1 span{color:#d6b16b}.intro{max-width:350px;font-size:17px;margin-bottom:28px}.menu-actions{display:flex;flex-direction:column;gap:10px;max-width:340px}.menu-actions button{display:flex;justify-content:space-between;align-items:center;text-align:left;font-family:Condensed;font-size:24px;min-height:58px;padding:12px 19px}.menu-actions button span{font:12px Barlow;opacity:.85}.menu-bottom{display:flex;align-items:center;gap:8px;margin-top:25px;font-size:12px;color:var(--muted)}.status-dot{width:6px;height:6px;border-radius:50%;background:var(--brass)}.scene-caption{position:absolute;right:6vw;bottom:100px;text-align:right}.scene-caption span{font-size:14px;color:#d3dbc9}.scene-caption strong{display:block;font:32px/1.15 Condensed;margin-top:12px;text-shadow:0 2px 12px #17211b}footer{position:absolute;bottom:24px;left:5vw;right:5vw;display:flex;justify-content:space-between;color:#b8c3af;font-size:12px}.sheet-screen{display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(12,20,16,.72);overflow:auto}.sheet{width:540px;max-width:100%;max-height:calc(100dvh - 48px);overflow:auto;padding:32px;background:#202a25;border:1px solid #65705b;border-radius:5px}.sheet>button.primary{width:100%;margin-top:20px}.back{padding:0;min-height:32px;margin-bottom:24px;color:var(--muted)}label{display:block;color:#dbe0d1;font-size:14px;margin:18px 0 0}input,select{display:block;width:100%;margin-top:8px;background:#17201a;border:1px solid #5b6958;border-radius:3px;color:var(--ink);padding:12px;min-height:46px;caret-color:var(--brass)}.form-row{display:flex;gap:18px}.form-row label{flex:1}.help{font-size:13px;margin-top:12px}.map-brief{display:flex;align-items:center;gap:18px;padding:20px 0;border-top:1px solid #485548;border-bottom:1px solid #485548;margin-top:23px}.map-stamp{display:grid;place-items:center;width:58px;height:58px;border:1px solid #859176;color:#d6b16b;font:27px Condensed;flex-shrink:0}.map-brief p{font-size:13px;margin:5px 0 0}.or{text-align:center;color:var(--muted);font-size:13px;margin:24px 0 0}.join-row{display:flex;gap:10px}.join-row input{text-transform:uppercase;letter-spacing:.15em}.join-row button{margin-top:8px}.room-code-row{display:flex;align-items:center;justify-content:space-between;padding:20px 0}.room-code-row strong{font:42px Condensed;letter-spacing:.12em;color:var(--brass)}.player-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #465242}.player-dot{width:10px;height:10px;border-radius:50%}.player-row small{margin-left:auto;color:var(--muted)}.manual-sheet{width:800px}.manual-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px 30px}.manual-grid p{font-size:14px}.small-sheet{width:350px;display:flex;flex-direction:column;gap:10px}.small-sheet>button.primary{margin:0}.topbar{position:absolute;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;height:62px;background:#18201df2;border-bottom:1px solid #607055;padding:0 24px;box-shadow:0 3px 18px #10180e66}.hud-brand{font-size:30px;color:var(--brass);display:flex;align-items:center;gap:18px}.hud-brand span{font:15px Barlow;color:var(--ink)}.economy{display:flex;gap:40px}.economy>span{display:flex;align-items:center;gap:10px}.economy strong{font:24px Condensed;min-width:48px}.economy small{font-size:12px;color:var(--muted)}.resource-icon{font-style:normal;color:var(--brass)}.battle-meta{display:flex;align-items:center;gap:22px}.battle-meta>span{font-variant-numeric:tabular-nums;color:var(--muted)}.battle-meta button{padding:8px 14px;min-height:34px;font-size:13px}.objective{position:absolute;left:24px;top:84px;display:flex;align-items:center;gap:12px;background:#18201dde;padding:13px 18px;border-radius:3px;pointer-events:none}.objective-mark{width:10px;height:10px;border:2px solid var(--brass);transform:rotate(45deg)}.objective strong{font-size:14px;display:block}.objective small{display:block;font-size:12px;margin-top:4px;color:var(--muted)}.camera-controls{position:absolute;right:22px;top:85px;display:flex;flex-direction:column;gap:5px}.camera-controls button{background:#202a25e8;width:40px;min-height:38px;padding:4px;font:20px Condensed}.bottom-hud{position:absolute;bottom:16px;left:20px;right:20px;display:flex;gap:12px;align-items:flex-end;pointer-events:none}.bottom-hud>section{background:#18201df5;border:1px solid #617058;border-radius:4px;pointer-events:auto}.panel-heading{padding:10px 14px;border-bottom:1px solid #45503e;display:flex;align-items:center;justify-content:space-between;color:#ccd4c2;font-size:13px;min-height:37px}.map-panel{width:234px;flex-shrink:0}.map-panel #minimap{display:block;width:210px;height:180px;margin:9px 11px;cursor:crosshair;background:#444d36}.map-footer{padding:0 12px 9px;display:flex;justify-content:space-between;font-size:10px;color:#b2bda4}.selection-panel{width:280px;min-height:176px}.selection-panel #selection-description{font-size:13px;line-height:1.4;color:var(--muted);padding:13px 14px 10px;min-height:54px}.command-row{display:flex;padding:9px;gap:5px;flex-wrap:wrap}.command-row button{font-size:11px;padding:5px 8px;min-height:32px;flex:1;white-space:nowrap}.actions-panel{margin-left:auto;width:420px}.actions-panel #actions{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;padding:11px}.action{position:relative;min-width:0;padding:11px 5px 8px!important;min-height:86px;background:#303d30;display:flex;flex-direction:column;align-items:center;gap:5px}.action svg{width:32px;height:25px;stroke:#c9d1b9;fill:none;stroke-width:1.5}.action strong{font:16px Condensed}.action small{font-size:11px;color:var(--brass)}.action.active{border-color:var(--brass);background:#52513a}#health{height:4px;background:#495140;margin:0 14px}#health-fill{height:100%;background:#97be80}#queue{display:flex;gap:5px;padding:0 10px}#queue:empty{display:none}#queue button{font-size:10px;min-height:27px;padding:5px;position:relative;overflow:hidden;background:#374b35}#placement-hint{position:absolute;left:50%;top:84px;transform:translateX(-50%);padding:12px 16px;background:#202a25f5;color:#edd39d;font-size:14px;max-width:55%}#placement-hint button{padding:4px 10px;min-height:28px;margin-left:12px}#toast{position:fixed;top:74px;left:50%;transform:translateX(-50%);background:#263329;border:1px solid #bda370;color:#f0dfb9;padding:13px 22px;border-radius:4px;z-index:50;max-width:90%;text-align:center;font-size:14px;pointer-events:none}#drag-box{position:fixed;border:1px solid #b6d7b0;background:#90bd841c;pointer-events:none}#order-marker{position:fixed;width:22px;height:22px;border:2px solid var(--brass);border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}.result-sheet{text-align:center}.result-emblem{font-size:60px;color:var(--brass)}.result-sheet h2{font-size:60px;margin:12px 0}.result-stats-row{display:flex;justify-content:space-between;margin-top:12px;color:var(--muted)}#loading{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;background:#18201d;z-index:100}#loading h1{font-size:46px;margin:16px 0 10px}.loading-mark{width:76px;height:76px;display:grid;place-items:center;border:1px solid #8f986f;color:var(--brass);font-size:40px}progress{width:240px;height:4px;accent-color:var(--brass)}::selection{background:#d6b16b;color:#18201d}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-thumb{background:#66725e}::-webkit-scrollbar-track{background:#202a25}
@media(max-width:1100px){.selection-panel{width:220px}.actions-panel{width:340px}.hud-brand span{display:none}.bottom-hud{left:12px;right:12px;gap:8px}.map-panel{width:204px}.map-panel #minimap{width:180px;height:154px}.command-row{gap:4px}.command-row button{padding:5px}.economy{gap:24px}}
@media(max-width:700px){#menu{padding:30px 24px}.brand-line{margin-bottom:30px}#menu h1{font-size:62px}.intro{font-size:15px;max-width:300px}.menu-actions{max-width:310px}.scene-caption{display:none}footer{left:24px;right:24px;font-size:10px}footer span{display:none}#vignette{background:linear-gradient(90deg,#18201de8,#18201d99 75%,#18201d55)}.sheet-screen{padding:12px}.sheet{padding:23px;max-height:calc(100dvh - 24px)}h2{font-size:34px}.manual-grid{grid-template-columns:1fr;gap:10px}.form-row{gap:10px}.topbar{height:52px;padding:0 10px}.hud-brand{font-size:24px}.economy{gap:12px}.economy>span{gap:5px}.economy small{display:none}.economy strong{font-size:21px}.battle-meta{gap:8px;font-size:12px}.battle-meta button{padding:5px 9px}.objective{left:10px;top:64px;padding:9px 11px;max-width:calc(100% - 65px)}.objective strong{font-size:12px}.objective small{font-size:10px}.camera-controls{right:9px;top:65px}.bottom-hud{bottom:8px;left:8px;right:8px;gap:6px;flex-wrap:wrap}.map-panel{width:110px;position:absolute;bottom:158px;left:0;background:#18201dc9!important}.map-panel .panel-heading{display:none}.map-panel #minimap{width:96px;height:83px;margin:6px}.map-footer{padding:0 6px 6px;font-size:8px}.map-footer #room-indicator{display:none}.selection-panel{width:100%;min-height:0;border-bottom:none!important;border-radius:4px 4px 0 0!important}.selection-panel .panel-heading{padding:5px 10px;min-height:27px}.selection-panel #selection-description{display:none}.selection-panel #health{display:none!important}.command-row{position:absolute;right:6px;bottom:125px;padding:0}.command-row button{flex:initial;min-height:32px;padding:4px 7px;background:#273827}.actions-panel{width:100%;margin-top:-6px;border-radius:0 0 4px 4px!important}.actions-panel .panel-heading{display:none}.actions-panel #actions{padding:7px;gap:5px}.action{min-height:80px;padding:7px 3px!important}.action strong{font-size:15px}.action svg{height:22px}.action small{font-size:10px}#placement-hint{top:120px;max-width:calc(100% - 20px);width:calc(100% - 20px);font-size:12px}#queue{position:absolute;bottom:155px;right:0;background:#18201d}#toast{top:56px;font-size:12px;padding:10px 15px}#loading h1{font-size:36px}}
@media(max-height:650px) and (min-width:701px){#menu{padding-top:28px}.brand-line{margin-bottom:20px}#menu h1{font-size:60px}.intro{margin-bottom:18px}.menu-actions button{min-height:48px}.menu-bottom{margin-top:14px}.scene-caption{bottom:75px}.map-panel #minimap{height:120px}.bottom-hud{bottom:8px}.sheet{padding:22px}.objective{top:70px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Dialogs must cover the live command HUD, including the manual earlier in DOM order. */
.sheet-screen{z-index:20}

@media(max-width:700px){.command-row{bottom:136px}.command-row button{min-height:44px;padding:8px 9px}.battle-meta button{min-height:44px}.camera-controls button{width:44px;min-height:44px}.map-panel #minimap{touch-action:manipulation}.map-footer{font-size:9px}}
