:root{font-family:'DM Sans',sans-serif;color:#26312f;background:#f4f2ed;font-synthesis:none;font-optical-sizing:auto;--ink:#26312f;--muted:#7b8781;--line:#e5e4dd;--paper:#fffefa;--accent:#2f685b;--accent-dark:#244f46;--soft:#edf4ef}*{box-sizing:border-box}body{margin:0;height:100vh;overflow:hidden}.topbar{height:72px;background:#fffefa;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 26px;position:relative;z-index:2}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:inherit;width:265px}.brand-mark{height:36px;width:36px;border-radius:11px;background:#315f54;color:#fff;display:grid;place-items:center;font:800 20px Manrope, sans-serif}.brand b{display:block;font:700 15px Manrope,sans-serif;letter-spacing:-.2px}.brand small{display:block;font-size:8px;font-weight:700;letter-spacing:1.5px;color:#8a938d;margin-top:2px}.turn-heading{position:absolute;left:50%;transform:translateX(-50%);text-align:center}.eyebrow{font-size:9px;letter-spacing:1.5px;color:#87928b;font-weight:700}.turn-heading strong{display:block;font:700 15px Manrope,sans-serif;margin-top:3px}.top-actions{margin-left:auto;display:flex;gap:8px}.quiet-btn{border:1px solid #e4e4dd;background:transparent;border-radius:8px;color:#56625c;padding:8px 12px;font:600 11px 'DM Sans';cursor:pointer}.quiet-btn:hover,.zoom-controls button:hover{background:#f0f3ee}.workspace{height:calc(100vh - 72px);display:grid;grid-template-columns:minmax(0,1fr) 326px;gap:16px;padding:16px}.map-shell{min-width:0;min-height:0;border:1px solid #e5e2d8;border-radius:14px;background:#e8efed;overflow:hidden;position:relative;display:flex;flex-direction:column}.map-toolbar{height:48px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 16px;background:#fffefa;border-bottom:1px solid #e2e6df}.map-caption{font-size:9px;letter-spacing:1.45px;font-weight:700;color:#6f7d75;display:flex;align-items:center;gap:8px}.map-caption i{width:7px;height:7px;background:#69a081;border-radius:50%;box-shadow:0 0 0 3px #e8f3e9}.zoom-controls{display:flex;gap:4px}.zoom-controls button{width:29px;height:27px;border:1px solid #e5e6df;border-radius:6px;background:white;color:#485750;font-size:17px;cursor:pointer}.zoom-controls button:nth-child(2){font-size:14px}.map-stage{position:relative;min-height:0;flex:1;overflow:hidden;background:#cddfdd;background-image:radial-gradient(ellipse at 53% 45%,#dce9e5 0%,#c8d9d6 75%)}#map{width:100%;height:100%;display:block;touch-action:none;user-select:none}.map-hint{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);border:1px solid #ffffffb8;background:#fffefaeb;border-radius:18px;padding:8px 14px;color:#65736d;font-size:10px;box-shadow:0 5px 16px #49625912;pointer-events:none;white-space:nowrap}.map-footer{height:33px;flex:none;background:#fffefa;border-top:1px solid #e2e6df;display:flex;align-items:center;justify-content:space-between;padding:0 14px;font-size:9px;color:#77847c}.legend-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin:0 5px 0 9px;background:#899b8d}.fleet-dot{background:#728b9c}.sidebar{border:1px solid #e5e2d8;border-radius:14px;background:#fffefa;min-height:0;display:flex;flex-direction:column;overflow:hidden}.side-scroll{overflow:auto;min-height:0;flex:1}.order-section,.power-section,.history-section{padding:17px 17px 15px;border-bottom:1px solid #eeede7}.section-title{display:flex;align-items:center;justify-content:space-between}.section-title h1{font:800 21px Manrope,sans-serif;letter-spacing:-.7px;margin:3px 0 0}.order-count{font-size:10px;font-weight:700;color:#6c7b73;background:#f0f2ed;padding:5px 8px;border-radius:7px}.section-copy{font-size:11px;line-height:1.45;color:#87918c;margin:8px 0 11px}.selected-card{min-height:46px;border:1px solid #e8e8e0;background:#fbfbf7;border-radius:9px;padding:8px 10px;display:flex;align-items:center;gap:9px;font-size:11px;color:#4e5d56}.selected-card.empty{color:#a0a8a2;justify-content:center;border-style:dashed}.power-badge{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;color:#fff;font-size:9px;font-weight:800;flex:none}.selected-main{flex:1}.selected-main strong{font-size:11px;color:#34413b}.selected-main small{display:block;color:#89938d;font-size:9px;margin-top:2px}.mode-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-top:9px}.mode-grid button{border:1px solid #e8e8e0;background:#fff;border-radius:7px;padding:7px 2px;color:#67736c;font:600 9px 'DM Sans';cursor:pointer}.mode-grid button:hover,.mode-grid button.active{border-color:#a7c3b6;color:#2d6254;background:#f0f6f1}.order-list{display:grid;gap:6px;margin-top:11px}.order-row{border:1px solid #eeede7;border-radius:8px;padding:8px 9px;display:flex;align-items:center;gap:8px}.order-row .power-badge{width:19px;height:19px;border-radius:6px}.order-text{flex:1;min-width:0;font-size:10px;color:#59665f}.order-text strong{color:#35423b;font-weight:700}.order-type{font-size:8px;text-transform:uppercase;letter-spacing:.7px;color:#9ba39d}.remove-order{border:0;background:none;color:#a1a9a3;cursor:pointer;font-size:15px}.section-heading{display:flex;align-items:center;justify-content:space-between}.section-heading h2{font:700 12px Manrope,sans-serif;margin:0}.section-heading>span{font-size:9px;color:#89958d}.power-list{display:grid;gap:7px;margin-top:12px}.power-item{display:grid;grid-template-columns:18px 1fr 25px 25px 32px;align-items:center;gap:5px;font-size:9px;color:#69766f}.power-item .power-name{font-weight:600;color:#55635b}.power-item .power-count{text-align:right;font-variant-numeric:tabular-nums}.power-item .power-scs{font-weight:700;color:#42534b;text-align:right}.power-track{height:4px;background:#eff0eb;border-radius:5px;overflow:hidden;grid-column:2/6;margin-top:-1px}.power-track i{display:block;height:100%;border-radius:5px}.history-note{font-size:8px!important;letter-spacing:.8px}.history-list{display:grid;gap:5px;margin-top:10px}.history-item{display:flex;align-items:center;justify-content:space-between;border:1px solid #eeede7;border-radius:7px;padding:7px 9px;background:#fff;text-align:left;cursor:pointer;color:#69766f;font:500 9px 'DM Sans'}.history-item:hover{background:#f7f8f4}.history-item.active{border-color:#c5d5cc;background:#f0f5f1;color:#376354}.history-item small{font-size:8px;color:#a0a8a2}.side-bottom{flex:none;padding:12px 16px 15px;background:#fffefa}.save-state{display:flex;gap:6px;align-items:center;color:#98a19b;font-size:9px;margin:0 0 10px}.save-dot{width:6px;height:6px;border-radius:50%;background:#72a283}.primary-btn,.secondary-btn{border:0;border-radius:9px;padding:11px 14px;font:700 11px 'DM Sans';cursor:pointer}.primary-btn{background:#315f54;color:white;width:100%;box-shadow:0 4px 9px #315f5418;display:flex;justify-content:space-between;align-items:center}.primary-btn:hover:not(:disabled){background:#244f46}.primary-btn:disabled{opacity:.4;cursor:not-allowed}.primary-btn span{font-size:16px;font-weight:400}.secondary-btn{background:#f1f2ed;color:#5d6962}.review-dialog{width:min(460px,calc(100vw - 28px));border:1px solid #e5e5dd;border-radius:16px;background:#fffefa;padding:0;color:var(--ink);box-shadow:0 24px 80px #1b312f38}.review-dialog::backdrop{background:#24383367;backdrop-filter:blur(2px)}.review-dialog form{padding:20px}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between}.dialog-head h2{font:800 21px Manrope,sans-serif;margin:3px 0 0}.icon-button{border:0;background:#f2f3ee;border-radius:7px;width:28px;height:28px;font-size:19px;color:#65716a;cursor:pointer}.dialog-copy{font-size:11px;color:#828d86;line-height:1.5}.result-list{display:grid;gap:6px;max-height:45vh;overflow:auto;margin:14px 0}.result-row{display:flex;align-items:center;gap:9px;padding:8px 9px;border:1px solid #ecece5;border-radius:8px;font-size:10px}.result-status{margin-left:auto;font-size:9px;font-weight:700;color:#527a5f}.result-status.failed{color:#a75f4f}.dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.dialog-actions .primary-btn{justify-content:center;gap:10px}.toast{position:absolute;left:50%;top:14px;transform:translate(-50%,-8px);opacity:0;transition:.2s;pointer-events:none;padding:8px 12px;border-radius:8px;background:#344b43;color:white;font-size:10px;box-shadow:0 5px 14px #1c302b2a}.toast.show{opacity:1;transform:translate(-50%,0)}.province{stroke:#f4f2ea;stroke-width:1.3;stroke-linejoin:round;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .16s}.province:hover{filter:brightness(.94)}.province.sea{stroke:#c7dad7;stroke-width:.5;cursor:default}.province.selected{stroke:#2d6856;stroke-width:2.4;filter:brightness(.93)}.province.targetable{stroke:#fff;stroke-width:2.5;filter:drop-shadow(0 0 2px #397660)}.province-name{font:500 8px 'DM Sans',sans-serif;fill:#40534b;pointer-events:none;text-anchor:middle;paint-order:stroke;stroke:#f1f2e9;stroke-width:2.7px;stroke-linejoin:round}.province-name.sea-label{fill:#70918f;stroke:#d2e3df;font-style:italic}.unit-token{cursor:pointer}.unit-token circle{stroke:#fffefa;stroke-width:1.7;vector-effect:non-scaling-stroke;filter:drop-shadow(0 1px 2px #293b353d)}.unit-token text{fill:#fff;font:800 8px 'DM Sans';text-anchor:middle;dominant-baseline:central;pointer-events:none}.unit-token.selected circle{stroke:#1f4338;stroke-width:3}.unit-token.pending circle{stroke:#edc96f;stroke-width:3}.center-mark{fill:#fffefa;stroke:#65766d;stroke-width:1.2;vector-effect:non-scaling-stroke;pointer-events:none}.order-line{fill:none;stroke:#294f48;stroke-width:2;stroke-dasharray:5 3;marker-end:url(#arrow);pointer-events:none;vector-effect:non-scaling-stroke}.order-line.support{stroke:#967047;stroke-dasharray:2 3}.order-line.convoy{stroke:#527d95;stroke-dasharray:7 3}.order-line.failed{stroke:#ad675d;opacity:.6}.map-hint.hidden{display:none}
@media(max-width:900px){.workspace{grid-template-columns:minmax(0,1fr) 290px;gap:10px;padding:10px}.brand{width:205px}.sidebar{border-radius:11px}.order-section,.power-section,.history-section{padding:14px}}
@media(max-width:680px){body{height:auto;min-height:100vh;overflow:auto}.topbar{height:60px;padding:0 13px}.brand{width:auto}.brand-mark{height:32px;width:32px}.brand b{font-size:13px}.brand small{font-size:7px}.turn-heading{position:static;transform:none;margin-left:auto;margin-right:10px;text-align:right}.turn-heading .eyebrow{font-size:7px}.turn-heading strong{font-size:12px}.top-actions{gap:4px}.quiet-btn{padding:7px 8px;font-size:9px}.workspace{height:auto;min-height:calc(100vh - 60px);display:flex;flex-direction:column;padding:8px;gap:8px}.map-shell{height:min(62vh,530px);min-height:330px;flex:none}.sidebar{min-height:400px;flex:1}.map-hint{bottom:10px;font-size:9px}.side-scroll{overflow:visible}.side-bottom{position:sticky;bottom:0}.power-section{display:none}.history-section{padding-bottom:12px}}
@media(max-width:400px){.turn-heading{display:none}.top-actions{margin-left:auto}.workspace{padding:6px}.map-shell{min-height:300px}.mode-grid button{font-size:8px}}

.history-wrap{display:flex;gap:4px}.history-wrap .history-item{flex:1}.branch-btn{border:1px solid #e5e8df;border-radius:7px;background:#fafbf7;padding:0 7px;color:#738078;font:600 8px 'DM Sans';cursor:pointer}.branch-btn:hover{color:#315f54;background:#f0f5f1}
.province-name{font-size:7.1px;stroke:#f8f7ee;stroke-width:3.4px}

/* The original region geometry is stored as one-pixel scanlines. Stroking each
   scanline hides its fill; the separate borders.png supplies the outlines. */
.province,.province.sea,.province.selected,.province.targetable{stroke:none}
.province.selected{filter:brightness(.84)}
.province.targetable{filter:brightness(1.12)}

.order-type.failed{color:#a75f4f}

.order-line.success{stroke:#2f8468}.order-line.failed{stroke:#bd5c4f}.order-marker.hold-marker{fill:none;stroke:#77837b;stroke-width:2;vector-effect:non-scaling-stroke;pointer-events:none}.order-marker.hold-marker.success{stroke:#2f8468}.order-marker.hold-marker.failed{stroke:#bd5c4f}.order-marker.remove-marker{fill:none;stroke:#b9695c;stroke-width:2.8;vector-effect:non-scaling-stroke;pointer-events:none}.order-marker.remove-marker.success{stroke:#2f8468}.order-marker.remove-marker.failed{stroke:#bd5c4f}.build-marker{pointer-events:none}.build-marker circle{fill:#fffefa;stroke:#77837b;stroke-width:2;vector-effect:non-scaling-stroke}.build-marker text{fill:#41544b;font:800 8px 'DM Sans';text-anchor:middle;dominant-baseline:central}.build-marker .marker-plus{font-size:9px;fill:#fffefa;stroke:#52635a;stroke-width:.7px;paint-order:stroke}.build-marker.success circle{stroke:#2f8468;fill:#e5f2e8}.build-marker.success text{fill:#2f8468}.build-marker.failed circle{stroke:#bd5c4f;fill:#fae9e4}.build-marker.failed text{fill:#bd5c4f}

.victory-banner{flex:none;min-height:38px;padding:7px 15px;display:flex;align-items:center;gap:9px;background:#f3ead0;border-bottom:1px solid #dfd0a5;color:#5b4b22}.victory-banner[hidden]{display:none}.victory-banner span{font-size:8px;font-weight:800;letter-spacing:1.2px;color:#9a7729}.victory-banner strong{font:800 13px Manrope,sans-serif}.victory-banner small{margin-left:auto;font-size:9px;color:#8a7747}.order-line.convoy-route{stroke:#527d95;stroke-dasharray:7 3}.order-marker[data-order-marker=hold]{pointer-events:none}.order-marker[data-order-marker=build],.order-marker[data-order-marker=remove]{pointer-events:none}
.order-line,.order-line.support-link,.order-line.convoy-link,.order-line.convoy-route{stroke-dasharray:none;marker-end:url(#arrow)}
.order-line.support-link,.order-line.convoy-link{marker-end:none}
.order-line.failed,.order-line.support-link.failed,.order-line.convoy-link.failed,.order-line.convoy-route.failed{stroke-dasharray:5 3}
.order-dot{fill:#294f48;stroke:#fffefa;stroke-width:.7;pointer-events:none}.order-dot.failed{fill:#bd5c4f}
.build-marker rect{fill:#fffefa;stroke:#2f8468;stroke-width:2;vector-effect:non-scaling-stroke}.build-marker.failed rect{stroke:#bd5c4f}
.demo-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.demo-actions[hidden]{display:none}.demo-actions .primary-btn{justify-content:center}
.locale-wrap select{border:1px solid #e4e4dd;border-radius:8px;background:#fffefa;color:#56625c;padding:7px;font-size:11px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.history-wrap{display:flex;gap:4px}.history-wrap .history-item{flex:1}.branch-btn{border:1px solid #c5d5cc;border-radius:7px;background:#f0f5f1;color:#376354;font-size:9px;cursor:pointer}
