/* 発車案内板のように、駅名と「あと何分」を大きく見せる。 */
:root {
  --bg: #eef2f4;
  --panel: #ffffff;
  --ink: #10222c;
  --muted: #5b6e79;
  --rule: #d4dde2;
  --accent: #0b5c9e;
  --accent-ink: #ffffff;
  --soon: #c2410c;
  --sans: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1317;
    --panel: #15212a;
    --ink: #e8eff2;
    --muted: #8fa3ae;
    --rule: #25363f;
    --accent: #ffb000;
    --accent-ink: #1a1200;
    --soon: #ff7a45;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-left, 0px)) 32px max(16px, env(safe-area-inset-right, 0px));
  display: grid;
  gap: 16px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.top { display: grid; gap: 8px; }
h1 { margin: 0; font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.status { margin: 0; font-size: 0.875rem; color: var(--muted); }
.status.warn { color: var(--soon); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  border: 1px solid var(--rule);
  background: var(--panel);
  border-radius: 8px;
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }

.picker { display: grid; gap: 8px; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px; padding: 12px; }
.search {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
}
.picker-list { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow-y: auto; display: grid; }
.picker-list button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 10px 4px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  cursor: pointer;
}

.station { background: var(--panel); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.station-head { padding: 16px 16px 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.station-name { margin: 0; font-size: 2rem; line-height: 1.15; font-weight: 700; }
.station-dist { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }

.board { display: grid; }
.row { padding: 12px 16px; border-top: 1px solid var(--rule); display: grid; gap: 6px; }
.row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; }
.dir { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.next { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.eta { font-size: 1.75rem; font-weight: 700; line-height: 1.2; color: var(--accent); }
.eta.soon { color: var(--soon); }
.eta small { font-size: 0.875rem; font-weight: 600; margin-left: 2px; }
.at { font-size: 1.125rem; font-weight: 600; }
.dest { font-size: 0.8125rem; font-weight: 600; color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; padding: 0 6px; }
.later { color: var(--muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.ended { color: var(--muted); font-size: 0.9375rem; }

.sec { margin: 0 0 8px; font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; }
.others { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.other {
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 44px;
  display: grid;
  gap: 4px;
  cursor: pointer;
}
.other-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.other-name { font-weight: 700; }
.other-dist { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.other-next { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.empty { background: var(--panel); border: 1px dashed var(--rule); border-radius: 12px; padding: 20px 16px; color: var(--muted); }

.foot { display: grid; gap: 8px; padding-top: 4px; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; justify-self: start; background: var(--panel); }
.seg-btn { background: none; border: 0; padding: 8px 16px; min-height: 44px; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--rule); }
.seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.note { margin: 0; font-size: 0.8125rem; color: var(--muted); overflow-wrap: anywhere; }

