[data-theme="dark"]{
  --bg:#0b0f17;--surface:#151b26;--surface2:#1c2433;--text:#f1f5f9;--muted:#94a3b8;--border:#273042;
  --accent-blue:#3b82f6;--accent-yellow:#facc15;--map-stroke:#334155;--no-data:#475569;
  --red:#ef4444;--yellow:#eab308;--green:#22c55e;--grid:#1a2130;--label:#ffffff;
}
[data-theme="light"]{
  --bg:#f5f7fb;--surface:#ffffff;--surface2:#eef2f8;--text:#0f172a;--muted:#475569;--border:#d8dee9;
  --accent-blue:#0057b7;--accent-yellow:#ffd700;--map-stroke:#ffffff;--no-data:#cbd5e1;
  --red:#dc2626;--yellow:#eab308;--green:#16a34a;--grid:#e3e8f1;--label:#0f172a;
}
html,body{background:var(--bg);color:var(--text);font-family:'IBM Plex Sans',system-ui,sans-serif;margin:0}
body,.surface,.btn,.region,.chip{transition:background-color .2s,color .2s,border-color .2s,fill .2s}
@media (prefers-reduced-motion: reduce){*{transition:none!important;animation:none!important}}
.mono{font-family:'JetBrains Mono',monospace}
.surface{background:var(--surface);border:1px solid var(--border);border-radius:12px}
.muted{color:var(--muted)}
.btn{background:var(--surface2);color:var(--text);border:1px solid var(--border);padding:.5rem .8rem;border-radius:8px;font-size:.85rem;font-weight:500;white-space:nowrap;cursor:pointer}
.btn:hover{border-color:var(--accent-blue)}
.btn:focus-visible,.region:focus-visible{outline:2px solid var(--accent-yellow);outline-offset:2px}
.btn.on{background:var(--accent-blue);color:#fff;border-color:var(--accent-blue)}
.input{background:var(--surface2);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:.5rem .7rem;width:100%}
.region{cursor:pointer;stroke:var(--map-stroke);stroke-width:3}
.region:hover{stroke:var(--accent-yellow)}
.region.sel{stroke:var(--accent-yellow);stroke-width:4}
.s-red{fill:var(--red)}.s-yellow{fill:var(--yellow)}.s-green{fill:var(--green)}.s-gray{fill:var(--no-data)}
.bg-s-red{background:var(--red)}.bg-s-yellow{background:var(--yellow)}.bg-s-green{background:var(--green)}.bg-s-gray{background:var(--no-data)}
.pulse{animation:pulse 2s ease-in-out infinite}
@keyframes pulse{50%{opacity:.55}}
.live-dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:6px}
.theme-icon{display:inline-block;transition:transform .35s}
.theme-icon.spin{transform:rotate(360deg)}
.flagbar{height:4px;background:linear-gradient(90deg,var(--accent-blue) 50%,var(--accent-yellow) 50%)}
.ctrl{position:sticky;top:0;z-index:20}
@media (max-width:767px){.ctrl{position:fixed;bottom:0;top:auto;left:0;right:0}body{padding-bottom:72px}}
.label{fill:var(--label);font-size:11px;font-weight:700;pointer-events:none;paint-order:stroke;stroke:rgba(0,0,0,.25);stroke-width:2px}
[data-theme="light"] .label{stroke:rgba(255,255,255,.5)}