:root{--accent: #3f7fd8;--accent-light: #8fbaf2;--panel: #1a1f1c;--panel-2: #232a26;--edge: #3a443d;--text: #d8e2d6;--muted: #8a9a8c;--good: #5fdc6a;--bad: #e45a4a;--sidebar-w: 248px;--font: "Rajdhani", "Segoe UI", system-ui, sans-serif;font-family:var(--font);color:var(--text)}*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden;background:#050707;user-select:none}button{font:inherit;cursor:pointer}#app{position:fixed;top:0;left:0;right:0;height:100%;height:var(--app-h, 100dvh);display:flex}body.pregame #app{visibility:hidden}#game-area{position:relative;flex:1;min-width:0;min-height:0}#game{display:block;position:absolute;inset:0;width:100%;height:100%}#sidebar{width:var(--sidebar-w);flex-shrink:0;display:flex;flex-direction:column;gap:8px;padding:10px;background:linear-gradient(180deg,rgba(255,255,255,.04),transparent 40%),repeating-linear-gradient(45deg,#1b201d 0 6px,#191e1b 6px 12px);border-left:2px solid var(--edge);box-shadow:inset 2px 0 #ffffff0a;overflow:hidden}.radar-frame{border:2px solid var(--edge);border-radius:4px;background:#050807;padding:3px;box-shadow:inset 0 0 12px #000000e6}#minimap{display:block;width:100%;aspect-ratio:2 / 1.08;cursor:pointer}#credits{font-size:26px;font-weight:700;letter-spacing:1px;color:#ffd75e;text-align:center;text-shadow:0 0 8px rgba(255,200,60,.35);background:#0c100e;border:1px solid var(--edge);border-radius:4px;padding:2px 0}#power{font-size:12px;color:var(--muted)}#weather-line{font-size:13px;font-weight:700;letter-spacing:1px;text-align:center;color:#f0d49a;background:#0c100e;border:1px solid var(--edge);border-radius:4px;padding:2px 4px}#weather-line.blizzard{color:#d8ecff}.power-label{display:flex;justify-content:space-between;font-weight:600;letter-spacing:1px}#power-bar{position:relative;height:9px;margin-top:2px;background:#0c100e;border:1px solid var(--edge);border-radius:3px;overflow:hidden}#power-fill{height:100%;background:linear-gradient(90deg,#2e9a3b,var(--good));transition:width .3s}#power-use{position:absolute;top:0;bottom:0;width:2px;background:#fff;box-shadow:0 0 4px #fff}#power.low #power-fill{background:linear-gradient(90deg,#9a2e2e,var(--bad));animation:blink .8s infinite alternate}#power.low .power-label{color:var(--bad)}@keyframes blink{to{opacity:.45}}#superweapons:empty{display:none}.sw-row{display:grid;grid-template-columns:1fr auto;gap:2px 6px;align-items:center;font-size:13px;font-weight:700;margin-bottom:4px}.sw-bar{grid-column:1;height:6px;background:#0c100e;border:1px solid var(--edge);border-radius:3px;overflow:hidden}.sw-bar div{height:100%;background:linear-gradient(90deg,#6aa8e8,#bfe6ff)}.sw-row.ready .sw-bar div{background:#ffd75e}.sw-fire{grid-column:2;grid-row:1 / span 2;background:#b8352c;color:#fff;border:1px solid #ff8a7a;border-radius:4px;font-weight:700;letter-spacing:1px;padding:4px 10px;animation:blink .6s infinite alternate}.actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.actions button,#topbar button{background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:4px;padding:4px 8px;font-weight:600;letter-spacing:.5px}.actions button:hover,#topbar button:hover{border-color:var(--accent)}.actions button.active{background:var(--accent);border-color:var(--accent-light);color:#fff}#tabs{display:grid;grid-template-columns:repeat(6,1fr);gap:2px}.tab{position:relative;background:var(--panel-2);color:var(--muted);border:1px solid var(--edge);border-radius:4px 4px 0 0;padding:4px 0 3px;line-height:0;overflow:hidden}.tab svg{width:20px;height:20px}.tab:hover:not(.active){color:var(--text)}.tab.active{color:#fff;background:linear-gradient(180deg,var(--accent),var(--panel-2));border-color:var(--accent)}.tab.disabled{opacity:.4}.tab.busy:after,.tab.ready:after{content:"";position:absolute;top:3px;right:3px;width:6px;height:6px;border-radius:50%;background:#ffd75e}.tab.ready:after{background:var(--good);animation:blink .5s infinite alternate}#build-grid{padding-bottom:8px;overscroll-behavior:contain;display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:max-content;gap:6px;align-content:start;overflow-y:auto;min-height:140px;flex:1;padding-right:2px}.grid-empty{grid-column:span 2;color:var(--muted);font-size:14px;padding:16px 8px;text-align:center}.item{position:relative;aspect-ratio:4 / 3;border:1px solid var(--edge);border-radius:4px;overflow:hidden;cursor:pointer;background:#101512}.item:hover{border-color:var(--accent-light)}.item img{width:100%;height:100%;display:block}.item .clock{position:absolute;inset:0;display:none}.item .label{position:absolute;left:0;right:0;bottom:0;padding:1px 4px;font-size:12px;font-weight:700;line-height:1.15;background:linear-gradient(0deg,#000000d9,#0000004d);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item .cost{position:absolute;top:2px;left:4px;font-size:12px;font-weight:700;color:#ffd75e;text-shadow:0 1px 2px #000}.item .status{position:absolute;top:38%;left:0;right:0;text-align:center;font-size:15px;font-weight:700;letter-spacing:1px;color:#fff;text-shadow:0 0 4px #000,0 0 4px #000}.item .status.ready{color:var(--good);animation:blink .5s infinite alternate}.item .hotkey{position:absolute;top:20px;left:4px;font-size:11px;opacity:.85;pointer-events:none}.stances{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;margin-top:6px}.stances button{background:var(--panel-2);color:var(--muted);border:1px solid var(--edge);border-radius:3px;padding:2px 0;font-size:12px;font-weight:700}.stances button:hover{border-color:var(--accent-light)}.stances button.active{background:var(--accent);border-color:var(--accent-light);color:#fff}.item .count{position:absolute;top:2px;right:5px;font-size:16px;font-weight:700;color:#fff;text-shadow:0 0 3px #000}.item.blocked,.item.poor{filter:saturate(.4) brightness(.75)}#selection-panel{min-height:112px;background:#00000059;border:1px solid var(--edge);border-radius:4px;padding:6px 8px;font-size:13px}.sel-empty{color:var(--muted);text-align:center;padding-top:36px}.sel-head{display:flex;gap:8px;align-items:center}.sel-head img{width:54px;height:40px;border:1px solid var(--edge);border-radius:3px}.sel-name{font-size:16px;font-weight:700}.sel-owner{font-size:12px;font-weight:600}.hp{height:5px;margin:5px 0 2px;background:#000;border-radius:2px;overflow:hidden}.hp div{height:100%}.sel-line{color:var(--muted)}.sel-line.rank-1{color:#e8e8e8}.sel-line.rank-2{color:#ffd75e}.sel-line.hint{color:var(--accent-light)}.sel-desc{margin-top:3px;color:#aab8ab;font-size:12px;line-height:1.2}.sel-group{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.sel-chip{position:relative}.sel-chip img{width:48px;height:36px;border:1px solid var(--edge);border-radius:3px;display:block}.sel-chip span{position:absolute;right:3px;bottom:0;font-weight:700;text-shadow:0 0 3px #000}#hud-left{position:absolute;top:12px;left:14px;max-width:46%;display:flex;flex-direction:column;gap:8px;pointer-events:none}#messages{display:flex;flex-direction:column;gap:2px}#objectives{background:#080c0ab8;border:1px solid var(--edge);border-left:3px solid var(--accent);border-radius:4px;padding:6px 10px;font-size:15px;font-weight:600;pointer-events:auto}#objectives h4{margin:0 0 3px;font-size:12px;letter-spacing:2px;color:var(--muted)}.obj{display:flex;gap:6px;line-height:1.3}.obj .box{flex-shrink:0;width:14px;text-align:center}.obj.done{color:var(--good)}.obj.failed{color:var(--bad);text-decoration:line-through}.obj.optional{font-style:italic;opacity:.85}.msg{font-size:17px;font-weight:700;letter-spacing:1px;color:#b9f5c0;text-shadow:0 0 6px rgba(0,0,0,.9),0 1px 2px #000;transition:opacity .6s}#mode-hint{position:absolute;bottom:14px;left:50%;transform:translate(-50%);pointer-events:none;background:#000000a6;border:1px solid var(--edge);border-radius:4px;padding:4px 12px;font-weight:600;letter-spacing:.5px}#mode-hint:empty{display:none}#topbar{position:absolute;top:10px;right:10px;display:flex;gap:6px}#topbar button{background:#141a16d9;font-size:13px}#paused-banner{position:absolute;top:40%;left:0;right:0;text-align:center;font-size:54px;font-weight:700;letter-spacing:8px;color:#fff;text-shadow:0 0 20px #000;pointer-events:none}.overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 40%,#1e3c23bf,#000000eb);z-index:10;padding:16px}.overlay[hidden]{display:none}.panel{background:linear-gradient(180deg,#202722,#141916);border:2px solid var(--edge);border-radius:8px;padding:24px 28px;max-width:760px;width:100%;max-height:100%;overflow-y:auto;box-shadow:0 20px 60px #0009;text-align:center}.panel h1{margin:0;font-size:46px;letter-spacing:6px;color:#e9f5e6;text-shadow:0 0 18px rgba(255,150,60,.35)}.subtitle{color:#f0a24a;letter-spacing:8px;font-weight:700;margin-bottom:8px}.intro{color:#aebdae;font-size:16px;line-height:1.35}.faction-pick{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}.faction-card{position:relative;text-align:left;border:2px solid var(--edge);border-radius:6px;padding:12px 14px 12px 50px;cursor:pointer;background:#00000040}.faction-card input{position:absolute;opacity:0}.faction-card:has(input:checked){border-color:#e9f5e6;background:#ffffff0f}.swatch{position:absolute;left:14px;top:14px;width:24px;height:24px;border-radius:4px;transform:rotate(45deg)}.swatch.bulwark{background:#3f7fd8}.swatch.kindled{background:#d8403f}.fname{font-size:19px;font-weight:700}.fdesc{color:#9fb0a0;font-size:14px;line-height:1.25}.options-row{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin-bottom:16px}.options-row label{display:flex;flex-direction:column;gap:3px;font-weight:600;color:var(--muted);text-align:left}.options-row select,.options-row input{font:inherit;font-size:15px;background:#0e1210;color:var(--text);border:1px solid var(--edge);border-radius:4px;padding:4px 8px;width:130px}button.big{font-size:20px;font-weight:700;letter-spacing:2px;padding:10px 28px;color:#fff;background:linear-gradient(180deg,#3e9a4b,#23642e);border:1px solid #6fdc7a;border-radius:6px}button.big:hover{filter:brightness(1.15)}#mission-list{display:grid;gap:8px;text-align:left}.mission{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;border:2px solid var(--edge);border-radius:6px;padding:10px 12px;background:#00000040;cursor:pointer}.mission:hover:not(.locked){border-color:#e9f5e6}.mission.locked{opacity:.45;cursor:not-allowed}.mission .num{font-size:26px;font-weight:700;color:#6fdc7a;text-align:center}.mission .mname{font-size:18px;font-weight:700}.mission .mloc{color:var(--muted);font-size:14px}.mission .mstate{font-weight:700;font-size:13px;letter-spacing:1px;color:var(--muted)}.mission.done .mstate{color:var(--good)}.campaign-note{color:var(--muted);font-size:13px;margin-bottom:0}.briefing-panel{text-align:left;max-width:640px}.briefing-panel h1{font-size:38px}.briefing-panel .subtitle{letter-spacing:3px}.brief-kicker{color:var(--muted);font-weight:700;letter-spacing:3px;font-size:13px}#brief-text p{color:#c8d4c6;font-size:16px;line-height:1.4}.briefing-panel h3{color:#6fdc7a;margin:12px 0 4px}#brief-objectives{margin:0 0 16px;padding-left:20px;font-size:15px}#brief-objectives .optional{font-style:italic;color:var(--muted)}.brief-buttons{display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap}.brief-buttons>button:not(.big){background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:6px;font-size:17px;font-weight:700;padding:9px 20px}.saves-panel h2{margin-top:0;letter-spacing:3px}#save-slots{display:grid;gap:8px;margin-bottom:8px;text-align:left}.slot{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;border:1px solid var(--edge);border-radius:6px;padding:8px 12px;background:#00000040}.slot .slot-title{font-weight:700}.slot .slot-desc{color:var(--muted);font-size:13px}.slot button{background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:4px;padding:6px 14px;font-weight:700}.slot button:hover:not(:disabled){border-color:var(--accent-light)}.slot button:disabled{opacity:.4;cursor:not-allowed}#save-status{min-height:1.2em;color:var(--good)}.help-panel{text-align:left}.help-panel h2{margin-top:0;text-align:center;letter-spacing:3px}.help-panel h3{color:#6fdc7a;margin:10px 0 4px}.help-cols{display:grid;grid-template-columns:1fr 1fr;gap:20px;font-size:15px}.help-cols ol,.help-cols ul{padding-left:18px;margin:0}.help-cols td{padding:2px 6px 2px 0;vertical-align:top}.help-cols td:first-child{white-space:nowrap;color:#e9f5e6}kbd{font-family:inherit;font-weight:700;background:#0e1210;border:1px solid var(--edge);border-bottom-width:2px;border-radius:3px;padding:0 4px}.help-list{padding-left:18px;margin:0;font-size:15px}.tip{color:#9fb0a0;font-style:italic}.help-panel .big{display:block;margin:0 auto}#gameover-stats{margin:16px auto 20px;display:grid;grid-template-columns:auto auto auto;gap:4px 20px;justify-content:center;align-items:baseline;font-size:17px}#gameover-stats .h{color:var(--muted);font-weight:700;text-align:left}#gameover-stats .v{text-align:right;font-variant-numeric:tabular-nums}#gameover-stats .side{font-weight:700;text-align:right;line-height:1.15}#gameover-stats .side span{display:block;font-size:13px;font-weight:600;opacity:.8}#gameover-stats .time{grid-column:1 / -1;color:var(--muted);margin-top:6px}@media(max-width:700px){.faction-pick,.help-cols{grid-template-columns:1fr}:root{--sidebar-w: 200px}}#gameover .panel{max-width:800px}#gameover-charts{margin:0 auto 18px;text-align:left}.chart-legend{display:flex;gap:16px;justify-content:center;margin-bottom:6px;font-size:14px;font-weight:600;color:var(--text)}.chart-legend span,.chart-tip div{display:inline-flex;align-items:center;gap:6px}.chart-legend i,.chart-tip i{display:inline-block;width:14px}.chart-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.chart-card{position:relative;background:#171c19;border:1px solid var(--edge);border-radius:6px;padding:8px 8px 2px}.chart-title{font-size:13px;font-weight:700;letter-spacing:1px;color:var(--muted);text-transform:uppercase}.chart{display:block;width:100%;height:auto}.chart .grid{stroke:#ffffff14}.chart .axis{stroke:#ffffff40}.chart .tick{fill:var(--muted);font-size:10px}.chart .end-label{fill:var(--text);font-size:11px;font-weight:700}.chart .crosshair{stroke:#ffffff73;stroke-width:1}.chart-tip{position:absolute;top:26px;display:flex;flex-direction:column;gap:2px;background:#0b0f0d;border:1px solid var(--edge);border-radius:4px;padding:4px 8px;font-size:13px;color:var(--muted);pointer-events:none;white-space:nowrap}.chart-tip[hidden]{display:none}.chart-tip b{color:#fff}.chart-tip .tip-time{font-weight:700;color:var(--text)}@media(max-width:700px){.chart-row{grid-template-columns:1fr}}.sw-fire:disabled{background:#4a3d6e;border-color:#8f7fd8;animation:none;cursor:not-allowed}#mp-pane .options-row input{width:170px}#mp-code{text-transform:uppercase;letter-spacing:2px}.mp-share{display:flex;gap:8px;align-items:flex-end;justify-content:center;margin-bottom:12px}.mp-share label{display:flex;flex-direction:column;gap:3px;font-weight:600;color:var(--muted);text-align:left}.mp-share input{font:inherit;font-size:14px;width:min(420px,60vw);background:#0e1210;color:var(--text);border:1px solid var(--edge);border-radius:4px;padding:5px 8px}.mp-share button,#mp-pane .brief-buttons>button:not(.big){background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:6px;font-size:16px;font-weight:700;padding:7px 18px}#mp-players{display:grid;gap:6px;margin:0 auto 12px;max-width:520px}.mp-player{display:grid;grid-template-columns:22px 1fr auto auto;gap:10px;align-items:center;border:1px solid var(--edge);border-radius:6px;padding:8px 12px;background:#00000040;text-align:left}.mp-player.empty{color:var(--muted);font-style:italic;grid-template-columns:1fr}.mp-player .mp-name{font-weight:700;font-size:17px}.mp-player .mp-faction{font-weight:700}.mp-player .mp-ready{font-size:13px;font-weight:700;letter-spacing:1px;color:var(--muted)}.mp-player .mp-ready.on{color:var(--good)}#btn-mp-ready.on{background:#2e6b37;border-color:#6fdc7a;color:#fff}#btn-mp-start:disabled{filter:grayscale(1) brightness(.6);cursor:not-allowed}#mp-options select:disabled{opacity:.7}#net-banner{position:absolute;top:46px;left:50%;transform:translate(-50%);background:#000000c0;border:1px solid var(--edge);border-radius:4px;padding:4px 14px;font-weight:700;letter-spacing:1px;pointer-events:none}#net-banner[hidden]{display:none}#replay-list{display:grid;gap:8px;margin-bottom:8px;text-align:left}.replay-row{display:grid;grid-template-columns:1fr auto auto auto;gap:8px;align-items:center;border:1px solid var(--edge);border-radius:6px;padding:8px 12px;background:#00000040}.replay-row .slot-title{font-weight:700}.replay-row .slot-desc{color:var(--muted);font-size:13px}.replay-row button,.file-button{background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:4px;padding:6px 14px;font-weight:700;cursor:pointer}.file-button{border-radius:6px;font-size:17px;padding:9px 20px}#replay-bar{position:absolute;left:50%;bottom:14px;transform:translate(-50%);display:flex;gap:8px;align-items:center;background:#0b0f0dee;border:1px solid var(--edge);border-radius:8px;padding:6px 10px;max-width:calc(100% - 28px);flex-wrap:wrap;justify-content:center;row-gap:6px}#replay-bar[hidden]{display:none}#replay-bar button,#replay-bar select{background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:4px;padding:3px 9px;font:inherit;font-weight:700}#replay-bar .rp-speeds{display:flex;gap:2px}#replay-bar .rp-speeds button.active{background:var(--accent);border-color:var(--accent-light);color:#fff}#rp-seek{width:min(320px,30vw);accent-color:var(--accent)}#rp-time{font-variant-numeric:tabular-nums;font-weight:700;min-width:92px;text-align:center}#replay-note{position:absolute;left:50%;bottom:62px;transform:translate(-50%);background:#000000c0;border:1px solid var(--edge);border-radius:4px;padding:4px 14px;font-weight:700;pointer-events:none}#replay-note[hidden]{display:none}#map-list{display:grid;gap:8px;margin-bottom:8px;text-align:left}.maps-new-title{margin:18px 0 10px;letter-spacing:2px;color:var(--muted)}#map-status{min-height:1.2em}#editor{position:fixed;inset:0;display:flex;z-index:5;background:#050707;font-family:var(--font);color:var(--text)}#editor[hidden]{display:none}#editor-area{position:relative;flex:1;min-width:0}#editor-canvas{display:block;width:100%;height:100%;cursor:crosshair}#editor-hint{position:absolute;left:12px;bottom:10px;padding:4px 10px;background:#0b0f0dcc;border:1px solid var(--edge);border-radius:6px;font-size:14px;color:var(--muted);pointer-events:none}#editor-panel{width:270px;flex-shrink:0;display:flex;flex-direction:column;gap:8px;padding:10px;overflow-y:auto;background:linear-gradient(180deg,rgba(255,255,255,.04),transparent 40%),repeating-linear-gradient(45deg,#1b201d 0 6px,#191e1b 6px 12px);border-left:2px solid var(--edge)}#editor-minimap{display:block;width:100%;aspect-ratio:2 / 1.08;cursor:pointer}.ed-row{display:flex;gap:6px;align-items:center}.ed-row>*{flex:1;min-width:0}#editor-panel input,#editor-panel select{font:inherit;font-size:15px;background:#0e1210;color:var(--text);border:1px solid var(--edge);border-radius:4px;padding:3px 6px}#editor-panel button{background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:4px;padding:4px 6px;font-weight:600;font-size:14px}#editor-panel button:hover:not(:disabled){border-color:var(--accent-light)}#editor-panel button:disabled{opacity:.4;cursor:not-allowed}#editor-panel button.active{background:var(--accent);border-color:var(--accent-light);color:#fff}.ed-group-title{margin-top:2px;font-size:12px;font-weight:700;letter-spacing:2px;color:var(--muted)}.ed-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:3px}.ed-grid button{display:flex;align-items:center;gap:4px;justify-content:center;padding:4px 2px!important;font-size:13px!important}.ed-swatch{width:10px;height:10px;border-radius:2px;flex-shrink:0;border:1px solid #0006}.ed-brush{font-weight:700;color:var(--muted)}.ed-brush>span{display:flex;gap:3px;flex:3}.ed-brush button{flex:1}#ed-issues{font-size:13px;line-height:1.3;display:grid;gap:4px}#ed-issues .issue{padding:4px 8px;border-radius:4px;border-left:3px solid var(--bad);background:#e45a4a1a}#ed-issues .issue.warning{border-left-color:#e0b84a;background:#e0b84a14}#ed-issues .issue.ok{border-left-color:var(--good);background:#5fdc6a14}.ed-actions{flex-wrap:wrap;margin-top:auto}.ed-actions>*{flex:1 1 40%}.ed-tabs{display:none}@media(orientation:portrait)and (max-width:600px){#editor{flex-direction:column}#editor-area{min-height:0}#editor-hint{right:12px}#editor-panel{width:auto;max-height:calc(46vh / var(--ui-scale, 1));padding:8px;gap:6px;border-left:0;border-top:2px solid var(--edge)}#editor-panel .radar-frame,.ed-section .ed-group-title{display:none}.ed-tabs{display:flex;gap:3px;overflow-x:auto;flex-shrink:0}#editor-panel .ed-tabs button{flex:1 0 auto;padding:5px 7px;font-size:13px}#editor-panel .ed-tabs button.on{background:#2b3a31;border-color:var(--accent-light)}#ed-tools{display:grid;gap:6px}.ed-section:not(.on){display:none}.ed-section{display:grid;gap:3px}.ed-grid{grid-template-columns:repeat(auto-fill,minmax(84px,1fr))}#ed-tools{order:1}.ed-brush{order:2}.ed-undo-row{order:3}.ed-name-row{order:4}.ed-sym{order:5}#ed-issues{order:6}.ed-actions{order:7;margin-top:0}.ed-actions>*{flex-basis:28%}}#editor-panel button.ed-play{background:linear-gradient(180deg,#3e9a4b,#23642e);border-color:#6fdc7a;color:#fff}.map-preview{display:flex;justify-content:center;margin:4px 0 10px}.map-preview[hidden]{display:none}.map-row{display:grid;grid-template-columns:auto 1fr auto auto auto auto;gap:8px;align-items:center;border:1px solid var(--edge);border-radius:6px;padding:6px 12px 6px 6px;background:#00000040}.map-row .slot-title{font-weight:700}.map-row .slot-desc{color:var(--muted);font-size:13px}.map-row button,.share-panel .brief-buttons>button:not(.big),#maps .brief-buttons>button:not(.big){background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:4px;padding:6px 12px;font-weight:700}.share-panel .brief-buttons>button:not(.big),#maps .brief-buttons>button:not(.big){border-radius:6px;font-size:17px;padding:9px 20px}.share-panel #shared-name{font-size:20px;margin-bottom:4px}#ed-make-symmetric{flex:0 0 auto}#chat-log{display:flex;flex-direction:column;gap:2px}.chat-line{font-size:16px;font-weight:600;color:#e8efe6;text-shadow:0 0 6px rgba(0,0,0,.9),0 1px 2px #000;transition:opacity .6s;overflow-wrap:anywhere}.chat-line b{margin-right:6px}#chat-box{position:absolute;left:14px;bottom:60px;width:min(520px,60%)}#chat-box[hidden]{display:none}#chat-input,#mp-chat-input{width:100%;box-sizing:border-box;font:inherit;font-size:15px;background:#0b0f0df0;color:var(--text);border:1px solid var(--accent);border-radius:6px;padding:7px 10px}#mp-chat{max-width:560px;margin:0 auto 10px;text-align:left}#mp-chat-log{max-height:110px;overflow-y:auto;margin-bottom:6px;font-size:14px;display:flex;flex-direction:column;gap:2px}#mp-chat-log:empty{display:none}#mp-chat-input{border-color:var(--edge)}#net-banner button{pointer-events:auto;margin-left:8px;background:linear-gradient(180deg,#3e9a4b,#23642e);border:1px solid #6fdc7a;border-radius:4px;color:#fff;font-weight:700;padding:2px 10px}html{touch-action:pan-x pan-y;-webkit-tap-highlight-color:transparent;overscroll-behavior:none}body{-webkit-touch-callout:none}#game,#minimap,#editor-canvas,#editor-minimap{touch-action:none}#app{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.touch-only,body:not(.touch) .touch-only,#touch-bar{display:none}body.touch .touch-only{display:revert}body.touch #touch-bar:not([hidden]){position:absolute;left:8px;bottom:8px;display:flex;gap:5px;z-index:2}#touch-bar button{min-width:52px;min-height:40px;padding:4px 8px;background:#141a16e0;color:var(--text);border:1px solid var(--edge);border-radius:6px;font-weight:700;font-size:14px;letter-spacing:.5px}#touch-bar button.active{background:#6e2a22;border-color:#ff7a5a;color:#fff}#touch-bar button[data-touch=queue].active{background:#24456e;border-color:var(--accent-light)}#touch-bar button:disabled{opacity:.4}#touch-bar button[data-touch=force].active{background:#6e4a12;border-color:#ffc04a}#touch-groups{display:none}body.touch #touch-groups:not([hidden]){position:absolute;right:8px;top:56px;bottom:calc(var(--touchbar-h, 48px) / var(--ui-scale, 1) + 12px);display:flex;flex-direction:column;justify-content:center;gap:5px;z-index:2}#touch-groups button{position:relative;flex:0 1 40px;min-height:26px;width:40px;padding:0;background:#141a16e0;color:var(--text);border:1px solid var(--edge);border-radius:6px;font-weight:700;font-size:16px}#touch-groups button.empty{opacity:.45}#touch-groups button span{position:absolute;right:2px;bottom:1px;font-size:10px;color:var(--accent-light)}#touch-groups button.saved{animation:group-saved .5s ease-out}@keyframes group-saved{0%{background:var(--accent)}}#touch-bar .touch-cancel{min-width:44px;font-size:18px}body.touch #mode-hint{inset:48px 8px auto auto;transform:none;max-width:58%;text-align:right}@media(max-height:560px){:root{--sidebar-w: 216px}#sidebar{gap:4px;padding:6px}.radar-frame{padding:2px}#credits{font-size:18px;padding:0}#power{font-size:11px}#power-bar{height:6px}.actions button{padding:2px 6px;font-size:13px}.tab{padding:2px 0 1px}.tab svg{width:17px;height:17px}#build-grid{min-height:0;gap:4px}#selection-panel{position:fixed;left:calc(env(safe-area-inset-left) + 8px);bottom:calc((env(safe-area-inset-bottom) + var(--touchbar-h, 0px) + 16px) / var(--ui-scale, 1));width:220px;min-height:0;max-height:42vh;overflow-y:auto;background:#080c0adb;font-size:12px;z-index:2}#selection-panel:has(.sel-empty),#selection-panel .sel-desc{display:none}#topbar{top:6px;right:6px;gap:4px}#topbar button{font-size:12px;padding:3px 6px}#hud-left{top:42px;left:8px;max-width:40%}body.touch #mode-hint{top:40px;font-size:13px;padding:3px 8px}.msg{font-size:13px}#objectives{font-size:12px;padding:4px 8px}.panel{padding:14px 16px}.panel h1{font-size:30px}.intro{font-size:14px}}@media(orientation:portrait)and (max-width:600px){#app{flex-direction:column}#sidebar{width:100%;height:auto;max-height:44%;border-left:none;border-top:2px solid var(--edge);display:grid;grid-template-columns:44% 1fr;grid-template-rows:auto auto auto auto auto auto auto;column-gap:8px;row-gap:3px;padding:5px 6px calc(env(safe-area-inset-bottom) + 5px)}.radar-frame{padding:2px}#power{font-size:11px}#power-bar{height:6px}.actions{gap:4px}.actions button{padding:2px 6px;font-size:13px}.tab{padding:2px 0 1px}.tab svg{width:17px;height:17px}.radar-frame{grid-area:1 / 1 / 3 / 2}.status-row{grid-area:3 / 1}#power{grid-area:4 / 1}#weather-line{grid-area:5 / 1}#superweapons{grid-area:6 / 1;min-height:0;overflow-y:auto}.actions{grid-area:7 / 1}#tabs{grid-area:1 / 2}#build-grid{grid-area:2 / 2 / 8 / 3;min-height:0;contain:size;gap:4px}#credits{font-size:18px;padding:0}#selection-panel{position:fixed;left:8px;bottom:calc((var(--sidebar-h, 44vh) + var(--touchbar-h, 48px) + 16px) / var(--ui-scale, 1));width:min(250px,calc(80vw / var(--ui-scale, 1)));min-height:0;max-height:30vh;overflow-y:auto;background:#080c0adb;font-size:12px;z-index:2}body.touch #selection-panel{width:min(250px,calc(100vw / var(--ui-scale, 1) - 72px))}#selection-panel:has(.sel-empty),#selection-panel .sel-desc{display:none}#topbar{top:6px;right:6px;left:6px;gap:4px;flex-wrap:wrap;justify-content:flex-end}#topbar button{font-size:12px;padding:3px 6px}#hud-left{top:64px;left:8px;max-width:70%}.msg{font-size:13px}body.touch #mode-hint{inset:auto 8px 56px;max-width:none;text-align:center;font-size:13px}body.touch:has(#mode-hint:not(:empty)) #selection-panel{display:none}#touch-bar button{min-width:0;flex:1;padding:4px 3px;font-size:12px}body.touch #touch-bar:not([hidden]){right:8px}}@media(max-height:560px),(orientation:portrait)and (max-width:600px){#selection-panel{pointer-events:none}#selection-panel button{pointer-events:auto}#selection-panel .sel-head img{width:40px;height:30px}#selection-panel .sel-name{font-size:14px}}#game-menu{background:#0000008c}.game-menu-panel{max-width:340px}.game-menu-panel h2{margin-top:0}.game-menu-panel h3{margin:10px 0 0;font-size:13px;letter-spacing:2px;text-transform:uppercase;color:var(--muted);text-align:left}.game-menu-buttons{display:flex;flex-direction:column;gap:8px}.game-menu-buttons button:not(.big){min-height:44px;padding:8px 12px;background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:6px;font-size:16px;font-weight:600;letter-spacing:.5px}.game-menu-buttons button:not(.big):hover{border-color:var(--accent)}.game-menu-buttons button[hidden]{display:none}.game-menu-buttons button.leave{margin-top:12px;border-color:#8a3a32;color:#ffb4a8}.volume-rows{display:grid;gap:6px}#a11y-sound{margin-bottom:10px}.volume-row{display:grid;text-align:left;grid-template-columns:7.5em 1fr 3em;align-items:center;gap:10px;font-size:15px;font-weight:600}.volume-row input[type=range]{width:100%;min-width:0;height:28px;accent-color:var(--accent)}.volume-value{text-align:right;color:var(--muted);font-variant-numeric:tabular-nums}@media(max-height:560px){.game-menu-panel h2{font-size:20px;margin-bottom:6px}.game-menu-buttons{gap:5px}.game-menu-buttons button.big{padding:6px 16px;font-size:17px}.game-menu-buttons button:not(.big){min-height:34px;padding:4px 10px;font-size:14px}.game-menu-panel h3{margin-top:4px;font-size:11px}.game-menu-buttons button.leave{margin-top:6px}}#sidebar,#topbar,#touch-bar,#touch-groups,#hud-left,#mode-hint,#chat-box,#replay-bar,#net-banner,#replay-note,#alert-banner,.overlay>.panel,#editor-panel,#editor-hint{zoom:var(--ui-scale, 1)}.a11y-panel{max-width:520px;text-align:left}.a11y-panel h2,.a11y-panel>.campaign-note,.a11y-panel>button{text-align:center}.a11y-panel>button.big{display:block;margin:14px auto 0}#a11y-rows{display:flex;flex-direction:column;gap:10px}.a11y-row{border-top:1px solid var(--edge);padding-top:8px}.a11y-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.a11y-label{font-size:17px;font-weight:700}.a11y-note{color:var(--muted);font-size:14px;line-height:1.3;margin-top:2px}.a11y-controls{display:flex;gap:4px;flex-wrap:wrap}.a11y-controls button{min-width:52px;min-height:36px;padding:4px 10px;background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:6px;font-weight:700}.a11y-controls button.active{background:var(--accent);border-color:var(--accent-light);color:#fff}button:focus-visible,[role=button]:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ffd75e;outline-offset:2px}#a11y-keys{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:4px 16px;margin-bottom:8px;text-align:left}.key-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:14px}.key-button{min-width:64px;min-height:32px;padding:2px 8px;background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:6px;font-weight:700;font-family:ui-monospace,monospace}.key-button.active{background:var(--accent);border-color:var(--accent-light);color:#fff;font-family:inherit}#btn-keys-reset{justify-self:start;min-height:34px;padding:4px 12px;margin-bottom:12px;background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:6px;font-weight:700}body.touch #touch-bar:not([hidden]){flex-wrap:wrap;max-width:calc(100% - 16px)}@media(orientation:portrait)and (max-width:600px){#touch-bar button{flex:1 0 auto}}body.plain-font{--font: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;font-family:var(--font)}body.cb{--good: #3d9bff;--bad: #ff8a1f}body.cb #power-fill{background:linear-gradient(90deg,#1f5fae,var(--good))}body.cb #power.low #power-fill{background:linear-gradient(90deg,#a2520f,var(--bad))}body.hc{--text: #ffffff;--muted: #d2ddd0;--edge: #8fa392;--panel: #000;--panel-2: #111}body.hc .panel,body.hc #sidebar{background:#050505}body.hc #topbar button,body.hc #touch-bar button,body.hc #touch-groups button{background:#000;border-color:#cfd9cd}body.hc .msg,body.hc .chat-line{background:#000000d9;padding:1px 6px;border-radius:3px;width:fit-content;text-shadow:none}body.hc #selection-panel,body.hc #mode-hint,body.hc #objectives{background:#000;border-color:#cfd9cd}body.hc #build-grid .item{border-color:#8fa392}body.hc #build-grid .item .label,body.hc #build-grid .item .cost{background:#000}body.reduce-motion *,body.reduce-motion *:before,body.reduce-motion *:after{animation:none!important;transition:none!important}body.big-buttons #touch-bar button{min-width:64px;min-height:54px;font-size:17px}body.big-buttons #touch-groups button{flex-basis:52px;width:52px;font-size:20px}body.big-buttons #topbar button{min-height:44px;padding:6px 12px;font-size:15px}body.big-buttons .tab{padding:8px 0 7px}#alert-banner{position:absolute;top:28%;left:50%;transform:translate(-50%);max-width:90%;z-index:3;pointer-events:none;padding:6px 18px;font-size:22px;font-weight:700;letter-spacing:1px;text-align:center;color:#fff;background:#000000e0;border:2px solid #ffd75e;border-radius:6px}#alert-banner[hidden]{display:none}body:not(.show-keys) .item .hotkey{display:none}.item .label>span{display:inline-block}.item .label.marquee{text-overflow:clip}.item .label.marquee>span{animation:label-slide var(--marquee-time, 6s) ease-in-out infinite}@keyframes label-slide{0%,25%{transform:translate(0)}55%,80%{transform:translate(calc(-1 * var(--over, 0px)))}to{transform:translate(0)}}body.reduce-motion .item .label.marquee{white-space:normal;font-size:11px;line-height:1.1}body.reduce-motion .item .label.marquee>span{display:inline}@media(max-width:700px),(max-height:560px){#replay-bar{left:8px;right:8px;bottom:8px;transform:none;max-width:none;padding:5px 8px;gap:6px}#rp-seek{flex:1 1 140px;width:auto;min-width:120px}#rp-time{min-width:0}}.overlay>.panel{container-type:inline-size;padding:calc(22px / var(--ui-scale, 1)) calc(24px / var(--ui-scale, 1))}@container (max-width: 420px){.panel h1{font-size:30px;letter-spacing:3px}.subtitle{letter-spacing:3px;font-size:13px}.faction-pick{grid-template-columns:1fr}.options-row{gap:8px}.options-row label{flex:1 1 120px}.options-row select,.options-row input{width:100%}button.big{padding:8px 16px;font-size:17px;letter-spacing:1px;max-width:100%}.brief-buttons>button:not(.big){padding:7px 12px}.help-cols{grid-template-columns:minmax(0,1fr)}.help-cols>div{min-width:0}.help-panel table{width:100%;table-layout:fixed}.help-panel table td{word-break:break-word}.a11y-controls button{min-width:0;padding:4px 7px}.mission{grid-template-columns:30px 1fr;padding:8px 10px}.mission .mstate{grid-column:2}.slot{grid-template-columns:1fr 1fr}.slot>div:first-child{grid-column:1 / -1}.help-panel ol,.help-panel ul{padding-left:18px}.panel{overflow-wrap:anywhere}}@container (max-width: 260px){.panel h1{font-size:24px;letter-spacing:2px}.faction-card{padding:10px 10px 10px 42px}}.menu-buttons{display:flex;flex-direction:column;gap:10px;max-width:320px;margin:18px auto 4px}.menu-buttons button:not(.big){min-height:48px;padding:8px 14px;background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:6px;font-size:18px;font-weight:700;letter-spacing:1px}.menu-buttons button:not(.big):hover{border-color:var(--accent)}.menu-buttons button.big{min-height:56px;font-size:22px}.menu-buttons button.back{margin-top:8px;background:none;color:var(--muted)}.menu-screen h2{margin:14px 0 0}.setup-head{display:flex;align-items:center;gap:10px;margin:14px 0 12px}.setup-head h2{margin:0;flex:1;text-align:center;padding-right:70px}.setup-head button.back{background:var(--panel-2);color:var(--text);border:1px solid var(--edge);border-radius:6px;padding:6px 12px;font-weight:700;white-space:nowrap}@container (max-width: 420px){.setup-head h2{padding-right:0;font-size:20px}}.a11y-heading{margin:4px 0 0;text-align:center;color:var(--muted);letter-spacing:2px;text-transform:uppercase;font-size:13px}@container (max-width: 420px){#gameover-title{font-size:26px;letter-spacing:2px}#gameover-stats{font-size:15px;gap:3px 12px}.chart-row{grid-template-columns:minmax(0,1fr)}}.check-row{display:flex;align-items:center;gap:8px;margin:6px 0 10px;font-size:15px;text-align:left;cursor:pointer}.check-row[hidden]{display:none}.check-row input{width:20px;height:20px;flex-shrink:0;accent-color:var(--accent)}.gallery-search{width:100%;margin-bottom:8px;padding:6px 10px;font:inherit;font-size:15px;background:#0e1210;color:var(--text);border:1px solid var(--edge);border-radius:6px}#gallery-list,#gallery-mine{display:grid;gap:6px}.mp-share[hidden]{display:none}#gallery-list .map-row{grid-template-columns:auto 1fr auto;text-align:left}#gallery-mine .map-row{grid-template-columns:1fr auto auto auto;padding-left:12px;text-align:left}
