:root{color-scheme:dark;--bg:#111c21;--panel:#1d2c32;--line:#3d5659;--text:#eff3eb;--muted:#afc3bf;--green:#9ac9ad;--amber:#f2cc8e}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.45 'Segoe UI',Arial,sans-serif}button,select,input{font:inherit}button{cursor:pointer;border:1px solid #638078;border-radius:5px;background:#acd5b7;color:#173026;padding:7px 10px;font-weight:700}button:hover{filter:brightness(1.13)}button:disabled{opacity:.38;cursor:default}button:focus-visible,select:focus-visible,.province:focus-visible,.unit:focus-visible{outline:3px solid #fff0b8;outline-offset:2px}h1,h2,h3,p{margin:0}h1,h2{font-family:Georgia,serif}header{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:13px 2vw;background:#1b2a30;border-bottom:1px solid var(--line)}.brand span,.brand small,.time small,.miniWrap span{display:block;font:700 10px Consolas,monospace;letter-spacing:.16em;color:#a5c9b4}.brand h1{font-size:clamp(25px,3vw,38px);line-height:1.05}.brand small{color:#91a8a9;margin-top:4px}.headerRight{display:flex;align-items:center;gap:10px}.time{min-width:130px}.time small{font-size:12px;white-space:nowrap}.time b{display:block;height:4px;margin-top:7px;background:#91c1a7;border-radius:3px;width:0}#helpButton{border-radius:50%;width:34px;height:34px;padding:0}#resources{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--line);border-bottom:1px solid var(--line)}#resources>div{padding:7px 11px;background:#263940;min-width:0}#resources b{display:block;font-size:11px;color:#bacbc8;text-transform:capitalize}#resources strong{font:20px Georgia,serif}#resources small{display:block;color:#a7d1b2;font-size:11px}main{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,29%);gap:10px;padding:10px 2vw;max-width:2100px;margin:auto}.mapPanel,.side,.dispatch{background:var(--panel);border:1px solid var(--line);border-radius:7px;overflow:hidden}.mapToolbar,.mapFooter{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 13px}.mapToolbar h2{font-size:21px}.mapToolbar p,.dispatch p{font-size:12px;color:var(--muted)}.mapControls{display:flex;align-items:center;gap:5px;white-space:nowrap}.mapControls button{background:#334b4d;color:#e5f0e8;border-color:#52706c;min-width:31px}.mapControls span{font:12px Consolas,monospace;min-width:42px;text-align:center}#mapViewport{position:relative;overflow:hidden;background:#315b67;touch-action:none;cursor:grab}#mapViewport.dragging{cursor:grabbing}#map{display:block;width:100%;height:min(67vh,850px);min-height:450px;user-select:none}#map .province{stroke:#d8e3cb;stroke-width:2;fill-opacity:.28;cursor:pointer}#map .province:hover{stroke:#fff;stroke-width:5;fill-opacity:.48}#map .province.selected{stroke:#ffecaf;stroke-width:7;fill-opacity:.48}#map .province.vale{fill:#3bd082}#map .province.ember{fill:#e7614e}#map .province.neutral{fill:#e5dfae;fill-opacity:.12}.road{fill:none;stroke:#e9debe;stroke-opacity:.58;stroke-width:7;stroke-linecap:round;stroke-dasharray:2 12}.river{fill:none;stroke:#75b5be;stroke-width:12;opacity:.62}.mapLabel{font:700 20px Georgia,serif;fill:#fff9e6;paint-order:stroke;stroke:#26383a;stroke-width:5;text-anchor:middle;pointer-events:none}.mapLabel.minor{font-size:16px;font-weight:400}.cityDot{fill:#ffedbf;stroke:#33443c;stroke-width:4;pointer-events:none}.terrainMark{pointer-events:none;opacity:.48}.route{fill:none;stroke:#fff0b1;stroke-width:6;stroke-dasharray:17 11;filter:url(#shadow);pointer-events:none}.route.enemy{stroke:#ffb8a4}.unit{cursor:pointer;filter:url(#shadow)}.unit .plate{fill:#1e3937;stroke:#e8f2d7;stroke-width:3}.unit.ember .plate{fill:#673b39;stroke:#ffc5ae}.unit.selected .plate{stroke:#ffe18c;stroke-width:6}.unit .shape{fill:#f2f2dc;stroke:#152526;stroke-width:1.5}.unit.ember .shape{fill:#ffd0b6}.unit .count{font:700 17px Consolas,monospace;fill:white;text-anchor:middle;paint-order:stroke;stroke:#18302c;stroke-width:4}.unit .name{font:700 15px 'Segoe UI',sans-serif;fill:#fff;paint-order:stroke;stroke:#152b2b;stroke-width:4;text-anchor:middle}.unit .health{fill:#77d99d}.unit.ember .health{fill:#f3a58f}.battlePulse{fill:#ffdd9b;opacity:.8;pointer-events:none;animation:pulse 1.5s ease-out forwards}.damageText{font:700 26px Consolas,monospace;fill:#fff1cb;paint-order:stroke;stroke:#6f2f24;stroke-width:5;animation:rise 2.5s ease-out forwards;pointer-events:none}@keyframes pulse{from{r:10;opacity:.9}to{r:90;opacity:0}}@keyframes rise{to{transform:translateY(-45px);opacity:0}}#mapTooltip{position:absolute;z-index:5;max-width:240px;padding:7px 9px;background:#142326ec;border:1px solid #8fa9a0;border-radius:4px;color:#fff;pointer-events:none;font-size:12px}.miniWrap{position:absolute;right:10px;bottom:10px;width:175px;padding:5px;background:#13262bc9;border:1px solid #8ca9a0;border-radius:5px}.miniWrap svg{display:block;width:100%;height:auto;cursor:pointer}.miniWrap span{text-align:center;font-size:9px}.mapFooter{border-top:1px solid var(--line);min-height:40px;font-size:12px}.mapFooter span:last-child{font-weight:700;color:#c6e8c8}.side{display:flex;flex-direction:column;min-height:0}nav{display:flex;flex-wrap:wrap;gap:4px;padding:8px;border-bottom:1px solid var(--line)}nav button{background:#30464c;color:#d8e7dd;border-color:#466067;padding:5px 8px;font-size:11px}nav button[aria-current=true]{background:#acd5b7;color:#173026}#panel{padding:14px;overflow:auto;max-height:calc(67vh + 88px);min-height:450px}#panel h2{margin-bottom:8px}#panel h3{font-size:15px;margin-bottom:6px}#panel p{margin:6px 0;color:#d2dfda}#panel .muted{font-size:12px;color:var(--muted)}#panel .section{padding:11px 0;border-top:1px solid var(--line);margin-top:9px}#panel .row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 0;border-bottom:1px solid #33494c}#panel .row>div{min-width:0}#panel .row small{display:block;color:var(--muted);font-size:11px}#panel button{padding:5px 8px;font-size:11px}#panel select{max-width:100%;background:#30464c;color:#fff;border:1px solid #64817b;border-radius:4px;padding:6px}.tag{display:inline-block;padding:2px 6px;background:#3b5850;border-radius:3px;font-size:11px;text-transform:uppercase}.tag.ember{background:#75433b}.tag.neutral{background:#70684f}.queue{padding:8px;background:#30444a;border-radius:4px;margin:5px 0}.queue small{color:var(--muted)}.statLine{display:flex;gap:10px;flex-wrap:wrap}.statLine span{background:#30434a;border-radius:4px;padding:5px 8px}.unitCard{padding:9px;border:1px solid #45615c;border-radius:5px;margin:7px 0;background:#26383e}.unitCard.selected{border-color:#ffe19f}.unitCard strong{display:block}.unitCard small{color:var(--muted)}.dispatch{display:grid;grid-template-columns:170px 1fr;gap:15px;margin:0 2vw 12px;padding:12px;max-width:2016px}.dispatch h2{font-size:19px}#reports p{margin:0;padding:3px 0}#reports b{color:#e4ce9e}footer{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:0 2vw 20px;color:#afc2bc;font-size:11px}footer button{background:transparent;color:#d5e5da;border-color:#5d7871;margin-right:5px}dialog{background:#22343a;color:#fff;border:1px solid #829b8e;border-radius:8px;padding:24px;max-width:450px}dialog::backdrop{background:#061114ca}dialog ol{padding-left:22px}dialog li{margin:10px 0}dialog p{margin:10px 0;color:#b9cfc6}dialog button{margin-top:12px}#confirmReset button{margin-right:8px}@media(max-width:1000px){main{grid-template-columns:1fr}#panel{max-height:none;min-height:0}.side{min-height:0}}@media(max-width:640px){header{align-items:flex-start;flex-wrap:wrap}.headerRight{width:100%;justify-content:space-between}#resources{grid-template-columns:repeat(4,1fr)}#resources strong{font-size:16px}.mapToolbar{flex-wrap:wrap}.mapToolbar p{display:none}#map{height:60vh;min-height:400px}.miniWrap{width:125px}.mapLabel{font-size:17px}.dispatch{grid-template-columns:1fr;gap:5px}footer{align-items:flex-start;flex-direction:column}}@media(prefers-reduced-motion:reduce){.battlePulse,.damageText{animation:none}*{scroll-behavior:auto!important}}
.unitBase{fill:#111d1b;stroke:#e9d7a4;stroke-width:3;opacity:.95}.unit.selected .unitBase{stroke:#ffe08a;stroke-width:6}.unit.ember .unitBase{stroke:#fa9b80}.unit.neutral .unitBase{stroke:#a9b9bd}.unitArt{pointer-events:none}.unitCountBack{fill:#1b302a;stroke:#f0e8ce;stroke-width:2}.unit.ember .unitCountBack{fill:#6b3732}.unit.neutral .unitCountBack{fill:#40545b}.unit .count{font:700 18px Consolas,monospace;fill:white;text-anchor:middle;paint-order:stroke;stroke:#152526;stroke-width:2}.unit .name{font:700 15px 'Segoe UI',sans-serif;fill:#fff;paint-order:stroke;stroke:#152b2b;stroke-width:4;text-anchor:middle}.unit .health{fill:#77d99d}.unit.ember .health{fill:#f3a58f}.unit.neutral .health{fill:#abc2cb}#panel:has(#destination){display:flex;flex-direction:column}#panel:has(#destination)>.section{order:-1;margin-bottom:12px;border-top:0;border-bottom:1px solid var(--line)}#panel:has(#destination)>.unitCard{order:1}.mapLabel{font-size:24px}.mapLabel.minor{font-size:19px}
#battleCallout{position:absolute;left:12px;top:12px;max-width:min(440px,65%);padding:11px 14px;background:#162529ed;border:1px solid #e2bc82;border-radius:6px;color:#fff2d3;font-weight:700;box-shadow:0 8px 20px #06111599;z-index:4}.battleFlash{fill:#ffe5a4;opacity:.9;pointer-events:none;animation:flash 1.3s ease-out forwards}@keyframes flash{from{opacity:.95;transform:scale(.4)}to{opacity:0;transform:scale(1.6)}}@media(prefers-reduced-motion:reduce){.battleFlash{animation:none;opacity:0}}
.mapEvent{cursor:help;filter:url(#shadow)}.mapEvent circle{fill:#a74436;stroke:#ffe0b2;stroke-width:3}.mapEvent.capture circle{fill:#377d56}
.audioControls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.audioControls label{display:flex;align-items:center;gap:6px}.audioControls input{accent-color:#acd5b7;width:95px}
