:root{--bg:#f4f6fb;--card:#fff;--ink:#111827;--muted:#667085;--line:#e4e7ec;--accent:#0f766e;--warn:#92400e;--red:#b91c1c;--blue:#2563eb;--purple:#7c3aed}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif}header{padding:14px 16px;background:#0f172a;color:#fff;display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.kicker{font-size:10px;letter-spacing:.15em;opacity:.75}h1{font-size:22px;line-height:1.15;margin:4px 0}.badge{font-size:10px;font-weight:800;border:1px solid rgba(255,255,255,.3);padding:8px 10px;border-radius:999px}.startup{padding:7px 12px;background:#ecfdf5;border-bottom:1px solid #bbf7d0;display:flex;justify-content:space-between;gap:10px;font-size:12px}.startup.warn{background:#fffbeb;border-color:#fde68a}.controls{display:grid;grid-template-columns:minmax(260px,1fr) auto repeat(6,minmax(100px,auto));gap:7px;padding:8px;background:#fff;border-bottom:1px solid var(--line);position:relative;z-index:1000}.controls input,.controls select,.controls button{min-height:42px}.controls input,select,button{font:inherit;border:1px solid #d0d5dd;border-radius:8px;padding:10px 12px;background:#fff}button{background:var(--accent);color:#fff;border-color:var(--accent);font-weight:750;cursor:pointer}.secondary{background:#fff;color:var(--accent)}button:disabled{opacity:.5;cursor:not-allowed}.layout{display:grid;grid-template-columns:minmax(0,1fr) 390px;height:calc(100vh - 170px)}.mapWrap{position:relative;min-height:520px;background:#eaf1f6}.leaflet-container,#map,#svgMap{height:100%;min-height:520px}.mapWrap #map{display:none}.mapControls{position:absolute;left:10px;bottom:10px;z-index:1200;display:flex;gap:6px;flex-wrap:wrap;background:rgba(255,255,255,.92);padding:6px;border-radius:10px;box-shadow:0 2px 12px rgba(0,0,0,.16)}.mapControls button{min-height:38px;padding:7px 10px}.panel-card{background:var(--card);border-bottom:1px solid var(--line);padding:12px 14px}.panel-card h2{font-size:13px;margin:0 0 8px}.metric{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px solid #f0f1f3;font-size:12px}.metric strong{text-align:right}.smallmapnote{font-size:11px;color:var(--muted);line-height:1.45}.warn{color:var(--warn)}.ok{color:#166534}.statusPass{color:#166534;font-weight:800}.statusWarn{color:#92400e;font-weight:800}.statusFail{color:#b91c1c;font-weight:800}.source{padding:7px 0;border-bottom:1px solid #f0f1f3;font-size:12px}.scenarioGrid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:7px}.measureButtons{display:flex;gap:6px}.full{width:100%;margin-top:7px}.map-pin{cursor:pointer}.popupCard{min-width:240px}.popupCard h3{margin:0 0 6px;font-size:14px}.kv{display:grid;grid-template-columns:125px 1fr;gap:7px;padding:3px 0}.coverageGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.coverageCell{padding:5px;border:1px solid var(--line);border-radius:6px;font-size:10px}.matrix{overflow:auto}.matrix table{border-collapse:collapse;font-size:9px;min-width:100%}.matrix th,.matrix td{border:1px solid var(--line);padding:3px 4px;text-align:center;white-space:nowrap}.matrix th:first-child,.matrix td:first-child{text-align:left;position:sticky;left:0;background:#fff}.legendDot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px}.leaflet-popup-content{font-size:12px}.popup-seed{margin-top:8px;width:100%}
#svgMap{display:block;overflow:hidden;touch-action:none;position:relative}.svgViewport{width:100%;height:100%;display:block}.svgState{fill:#e6edf4;stroke:#7b8794;stroke-width:.8;vector-effect:non-scaling-stroke}.svgState:hover{fill:#dce7f1}.svgEvent{fill:#b91c1c;stroke:#7f1d1d;stroke-width:.8;cursor:pointer}.svgEvent.low{opacity:.58}.svgSummary{fill:#9ca3af;stroke:#4b5563;stroke-width:.7;fill-opacity:.18}.svgExtent{fill:#7c3aed;stroke:#4c1d95;stroke-width:.8;fill-opacity:.18}.svgSelected{fill:#0f766e;stroke:#064e3b;stroke-width:1.5}.svgPropagation{fill:#60a5fa;stroke:#1d4ed8;stroke-width:.7;fill-opacity:.32}.svgRiver{fill:none;stroke:#0284c7;stroke-width:1.2;opacity:.8}.svgContour{fill:none;stroke:#6b7280;stroke-width:.7;opacity:.7}.mapFallbackLabel{position:absolute;right:10px;top:10px;background:rgba(255,255,255,.92);border-radius:8px;padding:6px 8px;font-size:10px;color:#667085;z-index:1100}
@media(max-width:980px){header{position:sticky;top:0;z-index:1400}.controls{grid-template-columns:1fr 1fr}.controls input{grid-column:1/-1}.layout{display:block;height:auto}.mapWrap{height:58vh;min-height:430px}.mapWrap #map,.mapWrap #svgMap{height:100%;min-height:430px}#panel{max-height:none}.badge{display:none}}
@media(max-width:560px){h1{font-size:18px}.controls{grid-template-columns:1fr}.controls input{grid-column:auto}.controls button,.controls select{width:100%}.mapWrap{height:55vh;min-height:410px}.mapControls{left:6px;right:6px;bottom:6px;overflow-x:auto;flex-wrap:nowrap}.mapControls button{white-space:nowrap;flex:0 0 auto}.scenarioGrid{grid-template-columns:1fr}.coverageGrid{grid-template-columns:1fr 1fr}}
.svgPopup{position:absolute;background:#fff;border:1px solid #d0d5dd;border-radius:10px;box-shadow:0 8px 30px rgba(0,0,0,.18);padding:10px;z-index:2000;max-width:300px;max-height:75%;overflow:auto}.muted{color:var(--muted);font-size:10px}.popupCard .kv{font-size:10px}.popupCard .popup-seed{min-height:42px}.svgPropagation{fill:#3b82f6;stroke:#1d4ed8;stroke-width:1.2;fill-opacity:.38;vector-effect:non-scaling-stroke}.svgEvent{fill:#dc2626;stroke:#7f1d1d;stroke-width:1;cursor:pointer;vector-effect:non-scaling-stroke}.svgSelected{fill:#0f766e;stroke:#064e3b;stroke-width:2;vector-effect:non-scaling-stroke}.svgState{vector-effect:non-scaling-stroke}.mapWrap{touch-action:none}.mapControls button{touch-action:manipulation}@media(max-width:560px){.popupCard{max-width:260px;font-size:11px}.metric{font-size:11px}}
