:root {
  --bg: rgba(255, 255, 255, 0.92);
  --fg: #16202b;
  --muted: #5b6b7b;
  --line: rgba(20, 30, 40, 0.12);
  --obs: #2b6cb0;
  --fc: #c05621;
  --track-obs: #9bbbe0;
  --track-fc: #f2c49b;
  --ok: #22a06b;
  --warn: #e0a106;
  --bad: #d64545;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: rgba(22, 28, 36, 0.92);
    --fg: #e8eef4;
    --muted: #93a3b3;
    --line: rgba(255, 255, 255, 0.12);
    --obs: #7fb0ec;
    --fc: #f3a36b;
    --track-obs: #3d5a80;
    --track-fc: #8a5a33;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #0f1720; color: var(--fg);
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
#map { position: fixed; inset: 0; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }

.card { background: var(--bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 16px; box-shadow: var(--shadow); }

#topbar { position: fixed; top: calc(env(safe-area-inset-top) + 10px); left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: center; pointer-events: none; z-index: 2; }
#topbar > * { pointer-events: auto; }
.chip { display: flex; gap: 8px; align-items: center; border: 0; padding: 8px 12px;
  border-radius: 999px; background: var(--bg); box-shadow: var(--shadow); font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
.round { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--bg);
  box-shadow: var(--shadow); display: grid; place-items: center; flex: none; }
#locate.active { color: #1a73e8; }

#health-pop { position: fixed; z-index: 3; top: calc(env(safe-area-inset-top) + 58px); left: 12px;
  padding: 12px 14px; font-size: 13px; max-width: 320px; }
#health-pop dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; }
#health-pop dt { color: var(--muted); }
#health-pop dd { margin: 0; }

#panel { position: fixed; z-index: 2; left: 10px; right: 10px;
  bottom: calc(env(safe-area-inset-bottom) + 10px); padding: 12px 14px 8px;
  max-width: 640px; margin: 0 auto; }
.row { display: flex; gap: 12px; align-items: center; }
#play { box-shadow: none; border: 1px solid var(--line); }
.timewrap { flex: 1; min-width: 0; }
.timeline { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
#time-label { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  color: #fff; background: var(--muted); }
.badge.observed { background: var(--obs); } .badge.forecast { background: var(--fc); }

#track { position: relative; height: 28px; }
#track-bg { position: absolute; left: 0; right: 0; top: 11px; height: 6px; border-radius: 3px; }
#slider { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent;
  -webkit-appearance: none; appearance: none; height: 28px; }
#slider::-webkit-slider-runnable-track { height: 28px; background: transparent; }
#slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: 3px;
  border-radius: 50%; background: #fff; border: 2px solid var(--fg); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
#slider::-moz-range-track { height: 6px; background: transparent; }
#slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--fg); }
#ticks { position: relative; height: 14px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
#ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

#legend { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--muted); }
#legend .bar { flex: 1; height: 8px; border-radius: 4px; }
#attrib { margin-top: 4px; font-size: 10.5px; color: var(--muted); }

#point { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 10px; }
#point-summary { font-weight: 600; margin-bottom: 4px; }
#point-chart { width: 100%; height: 70px; display: block; }

.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { display: none; }
.maplibregl-ctrl-top-right { top: calc(env(safe-area-inset-top) + 60px); }
.maplibregl-ctrl-attrib { font-size: 10px; }
.user-dot { width: 16px; height: 16px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(26,115,232,.25); }
