:root {
  color-scheme: light dark;
  --bg: #f6f7f9; --card: #ffffff; --text: #16191d; --muted: #5d6670; --line: #e3e6ea;
  --brand: #0f766e; --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --idle: #6b7280;
  --chip: #eef1f4; --stale-bg: #f1f2f4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1215; --card: #181c20; --text: #e8eaed; --muted: #9aa3ad; --line: #2a3036;
    --brand: #2dd4bf; --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; --idle: #9ca3af;
    --chip: #222830; --stale-bg: #1d2125;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: var(--bg); color: var(--text);
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
a { color: var(--brand); }
button { font: inherit; color: inherit; }
.topbar { padding: 14px 16px 6px; }
.topbar h1 { margin: 0; font-size: 20px; }
.topbar .sub { color: var(--muted); font-size: 13px; }
.fxbar { margin: 4px 16px; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 8px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fxbar a { text-decoration: none; padding: 2px 8px; border-radius: 999px; background: var(--chip); }
.fxbar a.on { background: var(--brand); color: var(--card); }
main { padding: 8px 16px 16px; max-width: 640px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.card.link { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.card h2 { margin: 0 0 6px; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card.stale { background: var(--stale-bg); }
.card.stale .big, .card.stale .chips { opacity: .7; }
.meta { color: var(--muted); font-size: 12px; margin-top: 8px; }
.meta .lag { color: var(--warn); font-weight: 600; }
.big { font-size: 34px; font-weight: 700; line-height: 1.1; }
.big small { font-size: 15px; font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { background: var(--chip); border-radius: 999px; padding: 3px 10px; font-size: 13px; white-space: nowrap; }
.chip.stale { outline: 1px dashed var(--warn); color: var(--muted); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 7px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.badge.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.badge.bad { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.badge.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.alert { border-left: 4px solid var(--bad); }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; }
.row .desc { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--idle); }
.dot.available { background: var(--ok); }
.dot.charging { background: var(--warn); }
.dot.maintenance, .dot.commError { background: var(--bad); }
.star { border: 0; background: none; font-size: 20px; cursor: pointer; padding: 4px; color: var(--muted); }
.star[aria-pressed="true"] { color: #eab308; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.toggle { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.toggle:first-of-type { border-top: 0; }
.toggle span { flex: 1; }
.floorhead { display: flex; justify-content: space-between; font-weight: 700; margin: 14px 2px 6px; }
.zone h3 { margin: 0; font-size: 15px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; text-align: center; font-size: 12px; }
.week div { border-radius: 8px; padding: 6px 0; background: var(--chip); }
.week .put { background: color-mix(in srgb, var(--brand) 22%, transparent); font-weight: 700; }
.week .today { outline: 2px solid var(--brand); }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--card); text-decoration: none; color: var(--text); cursor: pointer; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.notice { color: var(--muted); font-size: 12px; text-align: center; margin: 18px 0 6px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(6, 1fr);
  background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 9px; font-size: 11px; text-decoration: none; color: var(--muted); }
.tabbar a .ic { font-size: 19px; line-height: 1; }
.tabbar a[aria-current="page"] { color: var(--brand); font-weight: 700; }
