:root{--paper:#eee4c9;--ink:#29271f;--line:#625b49;--sea:#9eb3ad;--p:#2e6474;--n:#984e43;--e:#687746;--x:#aa9c7c}
*{box-sizing:border-box}html,body{height:100%;margin:0}body{font:14px Georgia,serif;color:var(--ink);background:#c9ba95;overflow:hidden}
header{height:58px;display:flex;align-items:center;gap:18px;padding:0 14px;background:var(--paper);border-bottom:1px solid #8d8063}header strong{font-size:20px}#res{margin-left:auto}
button{font:inherit;padding:.42rem .65rem;background:#efe5ca;border:1px solid #8f8265;border-radius:4px;cursor:pointer}button:hover{background:#faf1dd}button:disabled{opacity:.45}
main{height:calc(100% - 58px);display:grid;grid-template-columns:minmax(0,1fr) 310px}section{min-width:0;display:flex;flex-direction:column}nav{height:46px;padding:7px 10px;background:#d9ccaa;border-bottom:1px solid #8d8063}nav button.active{background:#555044;color:white}
#wrap{flex:1;overflow:hidden;background:var(--sea)}#map{width:100%;height:100%;display:block;cursor:grab;touch-action:none}#map.dragging{cursor:grabbing}
aside{background:#f2ead4;border-left:1px solid #8d8063;padding:18px;overflow:auto}aside h2{margin:.1rem 0}.muted{color:#6e6859}.stats{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:12px 0}.stat{background:#e3d7ba;border:1px solid #bbaa87;padding:7px}.stat b{display:block;font-size:18px}.actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.actions button{text-align:left;font-size:12px}
.d{stroke:#504a3b;stroke-width:2;vector-effect:non-scaling-stroke}.d:hover{filter:brightness(1.08)}.d.sel{stroke:#211f18;stroke-width:5}.d.src{stroke:#e1b94f;stroke-width:6}.d.can{stroke:#fff0a7;stroke-width:5;stroke-dasharray:7 5}
.river{fill:none;stroke:#4f8092;stroke-width:5;opacity:.9}.road{fill:none;stroke:#8d6d46;stroke-width:2;stroke-dasharray:8 4;opacity:.65}.contour{fill:none;stroke:#8a7d61;stroke-width:1;opacity:.35}.town{fill:#392f22;stroke:#eee2c4;stroke-width:2}.label{font-size:9px;fill:#3d362a;paint-order:stroke;stroke:#eadfc4;stroke-width:2;pointer-events:none}.army{font-size:12px;font-weight:bold;fill:white;paint-order:stroke;stroke:#27251e;stroke-width:4;pointer-events:none}
@media(max-width:800px){body{overflow:auto}header{height:auto;min-height:58px;flex-wrap:wrap;padding:8px}#res{width:100%;margin:0}main{height:auto;grid-template-columns:1fr;grid-template-rows:65vh auto}aside{border-left:0;border-top:1px solid #8d8063}}