@charset "UTF-8";
:root{color-scheme:dark;--bg:#08151d;--panel:#10232d;--line:#28414a;--text:#eff7f6;--muted:#9db5bd;--human:#87e2bf;--ai:#f5ac76;--yellow:#ffe399;font:14px system-ui,-apple-system,"Segoe UI",sans-serif}
*{box-sizing:border-box}[hidden]{display:none!important}html,body{margin:0;height:100%;overflow:hidden}body{height:100dvh;display:flex;flex-direction:column;background:radial-gradient(ellipse at 50% 35%,#17333b,var(--bg) 80%);color:var(--text)}button,input{font:inherit}button{border:1px solid var(--line);border-radius:8px;background:#1b333e;color:var(--text);cursor:pointer;min-height:36px;padding:7px 12px;transition:background .15s,transform .15s,border-color .15s}button:hover:enabled{background:#2b4b56;border-color:#6e9a9c}button:active:enabled{transform:scale(.97)}button:disabled{opacity:.32;cursor:default}button:focus-visible,input:focus-visible{outline:3px solid var(--yellow);outline-offset:2px}.primary{background:var(--human);color:#092b24;font-weight:750;border-color:var(--human)}button.primary:hover:enabled{background:#b0f1d6}h1,h2,h3,p{margin:0}.human-text{color:var(--human)}.ai-text{color:var(--ai)}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.masthead{height:54px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;max-width:1250px;width:100%;padding:7px 20px;margin:auto;border-bottom:1px solid #29414977}.brand{display:flex;align-items:center;gap:9px}.brandmark{font-size:24px;color:var(--human);font-weight:900}h1{font-size:18px;letter-spacing:1.3px}h1 small{display:block;font-size:8px;letter-spacing:2.8px;color:var(--muted);font-weight:500}.header-right{display:flex;gap:6px}.header-right button{background:transparent;font-size:11px;padding:6px 10px;min-height:34px}.arena{width:100%;max-width:1250px;min-height:0;flex:1;display:flex;flex-direction:column;gap:7px;padding:8px 20px 10px;margin:auto}.statusbar{flex-shrink:0;display:flex;align-items:center;gap:22px;min-height:34px}.turn{display:flex;align-items:center;gap:9px;flex:1}.turn>span{font-size:8px;letter-spacing:1px;color:var(--muted)}.turn>strong{font-size:15px}.mini-score{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--human)}.mini-score.ai{color:var(--ai)}.mini-score b{font-size:19px}.mini-score small{color:var(--muted);font-size:10px}.mini-score>span:last-of-type{border-left:1px solid var(--line);padding-left:6px;color:var(--muted)}.round{display:flex;align-items:center;gap:6px}.round small{font-size:8px;color:var(--muted)}.round b{font-size:12px}.objective{font-size:11px;color:var(--muted);height:17px;flex-shrink:0}.coach{flex-shrink:0;border:1px solid #d2c38466;border-left:3px solid var(--yellow);border-radius:8px;background:linear-gradient(100deg,#2a3c31,#1f332e);padding:9px 12px}.coach-top{display:flex;align-items:center;gap:10px}.coach-top>span{font-size:8px;color:var(--yellow);white-space:nowrap}.coach h2{font-size:15px;flex:1;min-width:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.coach-top button{min-height:26px;padding:3px 7px;background:transparent;font-size:10px}.coach p{font-size:12px;line-height:1.5;margin-top:4px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.coach button.primary{min-height:30px;padding:5px 10px;font-size:11px;margin-top:5px}.battlefield{flex:1;min-height:0;position:relative;display:flex;flex-direction:column;border:1px solid #3b5b6280;border-radius:12px;background:radial-gradient(ellipse at 48% 55%,#1c3c3d,#0c1e29 85%);overflow:hidden;box-shadow:0 15px 38px #0003,inset 0 1px #b5ffff0c}.board-heading{display:flex;align-items:center;justify-content:space-between;padding:9px 13px 2px;gap:8px;flex-shrink:0}.board-heading h2{font-size:12px;font-weight:650;letter-spacing:.4px}.map-legend{display:flex;gap:9px;font-size:9px;color:var(--muted)}#mapHint{font-size:10px;color:var(--muted);padding:2px 13px 4px;min-height:18px;flex-shrink:0}.map{flex:1;min-height:0;position:relative}.map svg{width:100%;height:100%;display:block;touch-action:manipulation}.landmass{fill:#233c34;stroke:#617568;stroke-width:1;stroke-dasharray:4 6}.map-compass{font:12px system-ui;fill:#9ab2b7}.map-road{stroke:#92acb0;stroke-width:3;stroke-dasharray:5 6;opacity:.55}.map-road.active-road{stroke:var(--yellow);stroke-width:4;opacity:1;stroke-dasharray:none}.region{cursor:pointer;outline:none}.region polygon{fill:#334851;stroke:#7c929b;stroke-width:2;stroke-linejoin:round;transition:fill .45s,stroke .3s}.region.human polygon{fill:#285d4b;stroke:#8bcab3}.region.ai polygon{fill:#684534;stroke:#cf9c71}.region:hover polygon,.region:focus-visible polygon{stroke:#fff;stroke-width:4}.region.selected polygon{fill:#367d60;stroke:#c9ffe9;stroke-width:4}.region.target polygon{stroke:#ffe399;stroke-width:4}.region.reachable polygon{stroke:#dec887;stroke-dasharray:5 3}.region text{text-anchor:middle;font-family:system-ui;fill:#f3f8f2;pointer-events:none}.region-id{font-size:10px;letter-spacing:1px;opacity:.85}.region-name{font-size:17px;font-weight:650}.region-units{font-size:27px;font-weight:800}.region-units-label{font-size:11px;font-weight:500;fill:#c3d7d4}.region.human .region-units{fill:#c6ffe1}.region.ai .region-units{fill:#ffcfaa}.region.tutorial-highlight polygon{stroke:var(--yellow);stroke-width:5;filter:drop-shadow(0 0 6px #e6cd7b88)}.region.training-unavailable{opacity:.74}.tutorial-highlight:not(.region){outline:2px solid var(--yellow);outline-offset:2px}.drone-switch:has(.tutorial-highlight){outline:2px solid var(--yellow);outline-offset:2px}.scene-bar{display:flex;align-items:center;gap:7px;min-height:28px;padding:5px 12px;border-top:1px solid #617d7a33;background:#08182099;flex-shrink:0}.scene-light{height:6px;width:6px;flex-shrink:0;border-radius:50%;background:var(--human);box-shadow:0 0 8px var(--human)}#sceneMessage{font-size:11px;line-height:1.35;flex:1}.scene-bar button{min-height:25px;font-size:10px;padding:3px 7px}.scene-running .scene-light{animation:lightPulse .7s infinite alternate}.ai-turn .scene-light{background:var(--ai);box-shadow:0 0 8px var(--ai)}.scene-route{stroke-width:6;stroke-linecap:round;fill:none;stroke-dasharray:7 7;animation:roadFlow .5s linear infinite;filter:drop-shadow(0 0 4px currentColor)}.scene-token{filter:drop-shadow(0 0 4px #fff6)}.scene-halo{fill:none;stroke-width:3;transform-box:fill-box;transform-origin:center;animation:haloPulse .7s ease-out infinite}.scene-change{font:800 26px system-ui;text-anchor:middle;paint-order:stroke;stroke:#07171b;stroke-width:4px;animation:floatGain .9s ease-out both}.region.scene-source polygon{stroke-width:5;filter:drop-shadow(0 0 7px #9ceac466)}.region.scene-target polygon{stroke-width:5;stroke-dasharray:none;animation:targetPulse .6s alternate infinite}.region.just-captured polygon{animation:captureFlash .9s ease-out}.match-result{position:absolute;inset:30% 10% auto;background:#163d30f2;border:1px solid var(--human);border-radius:12px;padding:18px;text-align:center;font-size:16px;line-height:1.5;z-index:5;box-shadow:0 15px 40px #0008}.combat-panel{flex-shrink:0;border:1px solid var(--line);border-radius:10px;background:#10242d;padding:7px 12px;position:relative}.combat-heading{display:flex;align-items:center;gap:8px;min-height:22px}.combat-heading h3{font-size:8px;letter-spacing:1px;color:var(--muted)}#battleTag{font-size:8px;color:var(--human)}#battleResult{font-size:10px;flex:1;text-align:right;color:#dbe9e5}.speed-buttons{display:flex;gap:3px;margin-left:auto}.speed-buttons button{min-height:25px;padding:3px 7px;font-size:9px;border-radius:4px;background:transparent}.speed-buttons button[aria-pressed=true]{border-color:#70ba9f;color:var(--human);background:#234a3c}.battle-route{font-size:9px;color:var(--muted);margin:2px 0 5px}.dice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.duel{display:flex;align-items:center;justify-content:center;gap:7px;padding:3px;background:#092029;border-radius:6px}.dice-pair{display:flex;align-items:center;gap:4px}.die{width:32px;height:35px;display:grid;place-items:center;clip-path:polygon(50% 0,94% 25%,94% 75%,50% 100%,6% 75%,6% 25%);background:#285044;color:#bcebd8;font-size:19px;font-weight:800}.die.defender{background:#5e4233;color:#ffcfaa}.die.won{background:var(--human);color:#153b2b}.die.defender.won{background:var(--ai);color:#39261c}.versus{font-size:8px;color:var(--muted)}.duel-info{font-size:9px;color:var(--muted);line-height:1.5;white-space:nowrap}.duel-info b{color:var(--text);font-size:11px}.rolling .die{animation:dieShake .15s alternate infinite}.dice-pending .die{opacity:.4}.combat-details{position:absolute;right:7px;bottom:1px;min-height:18px;border:0;background:transparent;font-size:8px;color:var(--muted);padding:1px 5px}.command-dock{flex-shrink:0;background:#112932;border:1px solid #41626577;border-radius:11px;padding:8px 12px}.command-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}#selection{font-size:11px;line-height:1.3;flex:1;min-width:0}.action-count{display:flex;gap:7px;align-items:center;white-space:nowrap}.action-count b{font-size:10px;color:var(--human)}#actionDots{display:flex;gap:3px}#actionDots i{width:5px;height:5px;background:var(--human);border-radius:50%}#actionDots i.spent{background:#455a64}.action-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.action-grid button{min-height:44px;padding:6px;font-size:12px}.action-grid small{display:block;font-size:9px;font-weight:400;margin-top:3px}.dock-options{display:flex;align-items:center;gap:10px;margin-top:6px;min-height:36px}.drone-switch{display:flex;align-items:center;gap:6px;font-size:11px;min-height:32px}.drone-switch input{width:18px;height:18px;accent-color:var(--human);margin:0}.drone-switch span{font-size:9px;color:var(--muted)}.amount-label{display:flex;align-items:center;gap:4px;font-size:10px}input[type=number]{width:48px;min-height:32px;background:#091b25;color:var(--text);border:1px solid var(--line);border-radius:5px;padding:5px}#end{margin-left:auto;min-height:34px;padding:5px 10px;background:#21443e;font-size:11px}#feedback{font-size:10px;color:var(--muted);line-height:1.3;margin-top:3px;min-height:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.ai-turn .action-count b{color:var(--ai)}dialog{width:min(650px,calc(100% - 24px));max-height:88dvh;overflow:auto;color:var(--text);background:#11232c;border:1px solid #517374;border-radius:14px;padding:24px;box-shadow:0 15px 60px #0009}dialog::backdrop{background:#020c14bb;backdrop-filter:blur(5px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.dialog-heading h2{font-size:22px}.dialog-heading button{font-size:22px;width:36px;padding:0;background:transparent}dialog p{font-size:13px;line-height:1.7;margin:10px 0}dialog .eyebrow{font-size:10px;letter-spacing:1px;color:var(--muted)}.rules-content h3{color:var(--human);font-size:15px;margin-top:20px}.rules-content code{font-size:11px;color:var(--yellow);overflow-wrap:anywhere}.rules-content table{width:100%;border-collapse:collapse;font-size:11px;text-align:left}.rules-content td,.rules-content th{padding:8px;border-bottom:1px solid var(--line)}.deck{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:16px 0}.card{border:1px solid var(--line);border-radius:8px;padding:12px 8px;background:#18333b}.card.special{border-color:#837643}.card.used{opacity:.4}.card-symbol{font-size:25px;color:var(--human);display:block;margin-bottom:10px}.card strong{font-size:11px}.card p{font-size:10px;line-height:1.5}.provisional{color:var(--yellow);font-size:10px!important}.history-tools{display:flex;gap:7px}.history-tools button{font-size:11px;flex:1}#history{padding:0;list-style:none}#history li{padding:10px 0;border-bottom:1px solid var(--line);font-size:12px}#history summary{cursor:pointer;min-height:28px}#history pre{font:10px/1.7 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--muted)}.session-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:14px}.session-tools span{color:var(--muted);font-size:10px}.welcome-dialog{max-width:480px}.welcome-symbol{color:var(--human);font-size:28px;letter-spacing:12px;margin-bottom:20px}.welcome-dialog h2{font-size:28px;margin:9px 0 16px}.welcome-points{display:flex;flex-direction:column;gap:13px;margin:20px 0}.welcome-points div{display:flex;align-items:center;gap:12px;font-size:13px}.welcome-points b{display:grid;place-items:center;height:26px;width:26px;background:#2b4e3e;border-radius:50%;color:var(--human)}.welcome-dialog button{width:100%;margin-top:7px;min-height:42px}.welcome-dialog #skipTutorial{background:transparent;border:0;color:var(--muted)}.welcome-safe,.welcome-replay{font-size:11px!important}.seed-label{display:block;font-size:12px;color:var(--muted);margin:18px 0}.seed-label input{width:100%;margin-top:7px}#confirmNew{width:100%}.no-script{position:fixed;inset:20px;padding:30px;background:#1f392f;border:1px solid var(--human);z-index:100}
@keyframes roadFlow{to{stroke-dashoffset:-28}}@keyframes haloPulse{from{opacity:1;transform:scale(.9)}to{opacity:0;transform:scale(1.5)}}@keyframes floatGain{from{opacity:0;transform:translateY(10px)}25%{opacity:1}to{opacity:.15;transform:translateY(-30px)}}@keyframes captureFlash{20%{fill:#d5ffd6;stroke:#fff}100%{stroke-width:2}}@keyframes targetPulse{to{stroke:#fff;filter:drop-shadow(0 0 9px #f9c28b99)}}@keyframes dieShake{from{transform:translateY(-1px) rotate(-7deg)}to{transform:translateY(1px) rotate(7deg)}}@keyframes lightPulse{to{opacity:.35}}
@media(max-width:700px){.masthead{height:44px;padding:5px 12px}.brandmark{font-size:20px}h1{font-size:14px;letter-spacing:.6px}h1 small{font-size:7px}.header-right{gap:3px}.header-right button{font-size:9px;padding:4px 7px;min-height:30px}.arena{padding:6px 10px 8px;gap:5px}.statusbar{gap:10px;min-height:30px}.turn{flex-direction:column;align-items:flex-start;gap:1px}.turn strong{font-size:12px}.turn span{font-size:7px}.mini-score{gap:3px;font-size:8px}.mini-score b{font-size:17px}.mini-score small{font-size:8px}.mini-score>span:last-of-type{display:none}.round{flex-direction:column;gap:1px}.round b{font-size:10px}.round small{font-size:7px}.objective{font-size:10px;height:14px}.coach{padding:7px 10px}.coach-top{gap:6px}.coach h2{font-size:13px}.coach-top>span{font-size:7px}.coach-top button{font-size:9px;padding:3px 5px}.coach p{font-size:11px;line-height:1.45}.board-heading{padding:6px 9px 1px}.board-heading h2{font-size:10px}.map-legend{font-size:8px;gap:6px}#mapHint{font-size:9px;padding:2px 9px 3px;min-height:16px}.scene-bar{padding:4px 9px;min-height:25px}#sceneMessage{font-size:10px}.combat-panel{padding:5px 9px 9px}.combat-heading{gap:5px;flex-wrap:wrap}.combat-heading h3{font-size:7px}#battleTag{font-size:7px}#battleResult{font-size:9px}.speed-buttons button{font-size:8px;padding:3px 5px;min-height:24px}.speed-buttons{margin-left:auto}.battle-route{font-size:8px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.dice-grid{gap:5px}.duel{gap:4px;flex-direction:column;padding:3px 1px}.die{height:30px;width:28px;font-size:17px}.duel-info{font-size:7px;line-height:1.25}.duel-info b{font-size:9px}.command-dock{padding:7px 9px}.command-heading{margin-bottom:5px}#selection{font-size:10px}.action-count{gap:5px}.action-count b{font-size:9px}.action-grid{gap:5px}.action-grid button{font-size:11px;padding:5px 2px;min-height:44px}.action-grid small{font-size:7px}.dock-options{gap:7px;margin-top:4px}.drone-switch{font-size:10px;gap:4px}.drone-switch span{font-size:8px}#end{font-size:10px;padding:5px 8px}#feedback{font-size:9px;margin-top:1px}.deck{gap:5px}.card{padding:9px 5px}.card strong{font-size:9px}.card p{font-size:8px}.welcome-dialog{padding:22px}.welcome-dialog h2{font-size:24px}.welcome-dialog p{font-size:12px}.welcome-points div{font-size:12px}}
@media(max-height:640px){.masthead{height:38px}.arena{gap:4px;padding-top:4px;padding-bottom:5px}.statusbar{min-height:25px}.coach{padding:5px 9px}.coach p{font-size:10px;line-height:1.35}.coach-top button{min-height:22px}.coach button.primary{min-height:26px;padding:4px 8px;margin-top:3px}.objective{display:none}.board-heading{padding-top:4px}#mapHint{display:none}.scene-bar{min-height:23px}.combat-panel{padding-top:4px;padding-bottom:6px}.battle-route{margin:1px 0 2px}.die{height:27px;width:25px;font-size:16px}.duel-info{font-size:7px}.command-dock{padding:5px 8px}.action-grid button{min-height:40px}.dock-options{min-height:30px}#feedback{display:none}}
@media(max-width:360px){h1{font-size:12px}.brand{gap:5px}.header-right button{font-size:8px;padding:4px 5px}.arena{padding-left:7px;padding-right:7px}.mini-score small{display:none}.coach h2{font-size:12px}.coach-top{gap:4px}.drone-switch span{display:none}.combat-heading #battleResult{display:none}.speed-buttons{margin-left:auto}.command-heading{gap:5px}#selection{font-size:9px}.action-grid button{font-size:10px}.duel-info{font-size:7px}.match-result{font-size:13px;padding:12px}.deck{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Compact HUD keeps the map large inside short desktop panels and phones. */
.coach{padding:6px 10px}.coach p{font-size:11px;line-height:1.35;margin-top:3px}.coach-top button{min-height:24px}.coach h2{font-size:14px}
.statusbar{min-height:27px}.board-heading{padding:5px 10px 2px}#mapHint{display:none}
.region-name{font-size:20px}.region-units{font-size:31px}.region-units-label{font-size:11px}
.combat-panel{padding:4px 10px 8px}.combat-heading{min-height:20px}.battle-route{margin:1px 0 3px;font-size:8px}.duel{flex-direction:row;min-height:36px;padding:2px 1px}.duel-info{font-size:8px;line-height:1.25}.die{width:28px;height:30px;font-size:17px}.duel-info b{font-size:10px}
.command-dock{padding:6px 10px}.command-heading{margin-bottom:4px}.action-grid button{min-height:43px}.dock-options{margin-top:3px;min-height:32px}.drone-switch{min-height:30px}#end{min-height:32px}#feedback{display:none}
.scene-route{animation-duration:calc(.5s / var(--fx-rate,1))}.scene-halo{animation-duration:calc(.7s / var(--fx-rate,1))}.rolling .die{animation-duration:calc(.15s / var(--fx-rate,1))}
@media(max-width:700px){.coach{padding:6px 9px}.coach h2{font-size:12px}.coach p{font-size:10px;line-height:1.4}.coach-top button{min-height:23px}.statusbar{min-height:26px}.combat-panel{padding:4px 8px 8px}.duel{flex-direction:row;gap:3px}.duel-info{font-size:7px}.duel-info b{font-size:9px}.die{width:26px;height:28px;font-size:16px}.command-dock{padding:6px 8px}.board-heading{padding:5px 9px 2px}}
@media(max-width:360px){.die{width:23px;height:26px;font-size:15px}.dice-pair{gap:2px}.duel-info{font-size:6px}.duel-info b{font-size:8px}.versus{font-size:6px}}
@media(min-width:700px) and (max-height:500px){.arena{display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:auto auto auto minmax(0,1fr);gap:6px}.statusbar{grid-column:1/-1;grid-row:1}.coach{grid-column:2;grid-row:2}.battlefield{grid-column:1;grid-row:2/5}.combat-panel{grid-column:2;grid-row:3}.command-dock{grid-column:2;grid-row:4;align-self:end}.objective{display:none}.coach-top>span{display:none}.duel{flex-direction:column}.duel-info{font-size:8px}.combat-heading #battleResult{display:none}.action-grid button{font-size:10px}.action-grid small{font-size:7px}.drone-switch span{display:none}.turn>span{display:none}}
@media(max-width:700px){.mini-score>span:last-of-type{display:inline;border-left:0;padding-left:2px;font-size:8px}}
.dock-options{flex-wrap:wrap}.turn-buttons{display:flex;gap:6px;margin-left:auto;align-items:center}.turn-buttons #end{margin-left:0}#newGame{min-height:32px;padding:5px 8px;font-size:10px;background:transparent}.restart-actions{display:flex;gap:8px;margin-top:20px}.restart-actions button{flex:1;font-size:12px}#seedOptions{font-size:12px;color:var(--muted);margin-top:15px}#seedOptions summary{cursor:pointer;padding:8px 0}@media(max-width:360px){.turn-buttons{gap:4px}#newGame{font-size:9px;padding:5px 6px}#end{font-size:9px;padding:5px 6px}}
