:root {
  --bg: #ffffff; --fg: #111827; --muted: #6b7280; --panel: #f9fafb; --border: #e5e7eb;
  --accent: #0f766e; --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b0f14; --fg: #e5e7eb; --muted: #9ca3af; --panel: #111827; --border: #1f2937;
          --accent: #2dd4bf; --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { display: flex; flex-direction: column; }
header { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; border-bottom: 1px solid var(--border); }
h1 { font-size: 18px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 13px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--muted); white-space: nowrap; }
.pill.live { color: var(--ok); border-color: currentColor; }
.pill.stale { color: var(--warn); border-color: currentColor; }
.pill.off { color: var(--muted); }
main { padding: 16px; }
#route-list a { color: var(--accent); font-size: 18px; line-height: 2; }
#map { flex: 1; min-height: 240px; }
#panel { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--panel);
  border-top: 1px solid var(--border); display: grid; gap: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
select, button { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); max-width: 100%; }
button { background: var(--accent); color: #fff; border-color: var(--accent); }
button[disabled] { opacity: .6; }
.eta { font-size: 24px; font-weight: 600; }
.eta.soon { color: var(--warn); }
.eta.here { color: var(--ok); }
.meta, .hint { color: var(--muted); font-size: 14px; margin: 0; }
.bus-icon { font-size: 28px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
