/* 車站發車屏：夜間 LED 屏／日間紙本列車時刻表。點陣字只用 12px 的整數倍（24/36/48/72）才會清楚。 */
@font-face {
  font-family: "ArkPixel";
  src: url("/vendor/fonts/ark-pixel-12px-zh_tw.woff2") format("woff2");
  font-display: swap;
}
@property --lit { syntax: "<length>"; inherits: false; initial-value: 3px; }

:root {
  --px: "ArkPixel", "Microsoft JhengHei", monospace;
  --sans: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif;
  --sans-cn: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Heiti SC", system-ui, sans-serif;
  --gutter: 16px;
  --row-pad: 10px;
  --col-time: 5.5rem;
  --col-status: 4.25rem;
  --rail: 64px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

html[data-theme="led"] {
  color-scheme: dark;
  --bg: #0B0D0C;
  --bg-row: #0F1211;
  --bg-sunk: #070808;
  --frame: #1B211E;
  --line: #242C28;
  --text: #E9ECEA;
  --muted: #9CA7A1;
  --red: #FF3B2F;
  --green: #36D66B;
  --amber: #F2C94C;
  --on-accent: #0B0D0C;
  --head-bg: #151A17;
  --head-text: #9CA7A1;
  --dot: rgba(233, 236, 234, .045);
  --panel-dot: rgba(233, 236, 234, .06);
  --map-filter: invert(1) hue-rotate(180deg) brightness(.82) contrast(.92) saturate(.6);
}

html[data-theme="paper"] {
  color-scheme: light;
  --bg: #FAFAF8;
  --bg-row: #FFFFFF;
  --bg-sunk: #EEF0EC;
  --frame: #111311;
  --line: #CDD1CB;
  --text: #111311;
  --muted: #464D48;
  --red: #C8102E;
  --green: #0B7A3B;
  --amber: #8A5200;
  --on-accent: #FFFFFF;
  --head-bg: #C8102E;
  --head-text: #FFFFFF;
  --dot: transparent;
  --panel-dot: transparent;
  --map-filter: grayscale(1) contrast(1.08) brightness(1.02);
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: env(safe-area-inset-top, 0) calc(var(--gutter) + env(safe-area-inset-right, 0)) calc(var(--rail) + 24px + env(safe-area-inset-bottom, 0)) calc(var(--gutter) + env(safe-area-inset-left, 0));
  background-color: var(--bg);
  background-image: radial-gradient(circle at 1.5px 1.5px, var(--dot) 1px, transparent 1.3px);
  background-size: 4px 4px;
  color: var(--text);
  font: 16px/1.6 var(--sans);
  font-variant-numeric: tabular-nums;
  caret-color: var(--amber);
  scrollbar-color: var(--line) var(--bg);
}
::selection { background: var(--amber); color: var(--on-accent); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }
.px { font-family: var(--px); font-size: 24px; line-height: 1.25; letter-spacing: 0; font-weight: 400; -webkit-font-smoothing: none; font-synthesis: none; }
.num { font-variant-numeric: tabular-nums; }
.ico { width: 24px; height: 24px; flex: none; shape-rendering: crispEdges; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 50; background: var(--amber); color: var(--on-accent); padding: 8px 12px; }
.late { color: var(--red); }

/* ---------- 實體按鍵 ---------- */
.key {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  background: var(--frame); color: var(--text);
  border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 2px;
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .12s var(--ease-out), border-color .12s, background-color .12s;
}
:where(html[data-theme="paper"]) .key { background: #FFFFFF; border-color: var(--frame); }
.key:hover { border-color: var(--muted); }
.key:active { transform: translateY(2px); border-bottom-width: 1px; margin-bottom: 2px; }
.key[disabled] { opacity: .45; cursor: not-allowed; }
.key .ico { width: 18px; height: 18px; }
.key-sq { width: 44px; padding: 0; }
.key-go { background: var(--green); color: var(--on-accent); border-color: var(--green); }
.key-taxi { background: var(--amber); color: var(--on-accent); border-color: var(--amber); }
:where(html[data-theme="paper"]) .key-go { background: var(--green); color: #fff; border-color: #064d25; }
:where(html[data-theme="paper"]) .key-taxi { background: var(--amber); color: #fff; border-color: #5c3700; }
.key.is-on, .key.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- 刊頭 ---------- */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 10px; }
.masthead-title { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.masthead-meta { display: flex; flex-wrap: wrap; gap: 0 14px; color: var(--muted); font-size: 14px; }
#countdown { color: var(--amber); font-weight: 600; }

/* ---------- 錨點大屏 ---------- */
.anchor-board {
  border: 1px solid var(--frame); margin-bottom: 12px; cursor: pointer;
  background-color: var(--bg-sunk);
  background-image: radial-gradient(circle at 1.5px 1.5px, var(--panel-dot) 1px, transparent 1.3px);
  background-size: 4px 4px;
}
:where(html[data-theme="paper"]) .anchor-board { border: 2px solid var(--frame); background: #fff; }
.ab-head, .ab-row { display: grid; grid-template-columns: 4.5rem 4.25rem minmax(0, 1fr) auto; gap: 0 10px; align-items: baseline; padding: 6px 12px; }
.ab-head { background: var(--head-bg); color: var(--head-text); font: 600 13px/1.4 var(--sans); letter-spacing: .08em; }
.ab-head span:last-child, .ab-state { justify-self: end; }
.ab-row { padding-top: 10px; padding-bottom: 2px; }
.ab-code { color: var(--red); }
.ab-code.is-pending { color: var(--amber); }
.ab-dest { overflow-wrap: anywhere; }
.ab-state { color: var(--green); }
.ab-state.is-boarding { color: var(--red); animation: blink 1s steps(2, jump-none) infinite; }
.ab-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 14px; padding: 2px 12px 10px; color: var(--muted); font-size: 14px; }
.ab-foot b { color: var(--text); font-weight: 600; }
.ab-left { display: inline-flex; align-items: baseline; gap: 8px; }
.ab-left .px { font-size: 36px; color: var(--red); line-height: 1; }
.ab-left .px small { font-size: 24px; }
html[data-theme="led"] .anchor-board .px { text-shadow: 0 0 3px color-mix(in srgb, currentColor 55%, transparent); }
.anchor-board.is-tight { border-color: var(--red); }

/* ---------- 月台（日期分頁） ---------- */
.platforms {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin: 0 calc(var(--gutter) * -1); padding: 8px var(--gutter);
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.day-tab {
  position: relative; display: grid; justify-items: start; min-height: 60px; padding: 5px 9px;
  background: var(--frame); color: var(--text); border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer; text-align: left; font: 13px/1.3 var(--sans);
}
:where(html[data-theme="paper"]) .day-tab { background: #fff; border-color: var(--frame); }
.day-tab-label { font-family: var(--px); font-size: 24px; line-height: 1.1; }
.day-tab-date, .day-tab-city { color: var(--muted); }
.day-tab.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.day-tab.is-active .day-tab-date, .day-tab.is-active .day-tab-city { color: var(--bg); opacity: .8; }
.day-tab.is-today::after { content: ""; position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; background: var(--red); }

/* ---------- 一天的表頭 ---------- */
.layout { display: block; }
.board { min-width: 0; }
.dayhead { padding: 14px 0 8px; }
.day-name { margin: 0; font-family: var(--px); font-size: 36px; line-height: 1.15; font-weight: 400; word-break: keep-all; }
.day-summary { margin: 4px 0 0; max-width: 62ch; color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.variant { flex: 1 1 9rem; justify-content: flex-start; gap: 10px; min-height: 48px; }
.variant .variant-id { font-family: var(--px); font-size: 24px; font-weight: 400; }
.day-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-top: 8px; font-size: 14px; }
.day-hotel b { font-weight: 600; }
.progress { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.progress-bar { display: inline-flex; gap: 2px; height: 8px; }
.progress-bar i { width: 5px; background: var(--line); }
.progress-bar i.is-on { background: var(--green); }

.board-cols {
  display: grid; grid-template-columns: var(--col-time) minmax(0, 1fr) var(--col-status); gap: 0 12px;
  padding: 6px var(--row-pad); margin-top: 6px;
  background: var(--head-bg); color: var(--head-text);
  font: 600 13px/1.5 var(--sans); letter-spacing: .1em;
}
.board-cols span:last-child { text-align: right; }

/* ---------- 發車行 ---------- */
.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-top: 0; }
:where(html[data-theme="paper"]) .rows { border-color: var(--frame); }
.stop, .variants, .leg { scroll-margin-top: 96px; scroll-margin-bottom: calc(var(--rail) + 16px); }
.stop {
  display: grid; grid-template-columns: var(--col-time) minmax(0, 1fr) var(--col-status); gap: 0 12px; align-items: start;
  padding: 9px var(--row-pad); background: var(--bg-row); border-top: 1px solid var(--line); cursor: pointer;
}
:where(html[data-theme="paper"]) .stop {
  background-image: linear-gradient(var(--line), var(--line)), linear-gradient(var(--line), var(--line));
  background-repeat: no-repeat; background-size: 1px 100%, 1px 100%;
  background-position: calc(var(--row-pad) + var(--col-time) + 6px) 0, calc(100% - var(--row-pad) - var(--col-status) - 6px) 0;
}
.rows > :first-child { border-top: 0; }
.stop-time { display: grid; gap: 1px; min-width: 0; }
.stop-clock { display: inline-flex; align-items: center; gap: 4px; }
.stop-no { display: inline-grid; place-items: center; min-width: 18px; height: 20px; padding: 0 2px; border: 1px solid var(--line); color: var(--muted); font: 600 12px/1 var(--sans); }
.stop-kind, .stop-code { font-size: 13px; line-height: 1.35; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-code { color: var(--red); font-weight: 600; }
.stop-main { min-width: 0; }
.stop-hours { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin-top: 2px; font-size: 15px; line-height: 1.45; color: var(--muted); }
.stop-hours b { font-weight: 700; }
.hrs-tight b { color: var(--amber); }
.hrs-closed b, .hrs-closed span { color: var(--red); }
.hrs-unknown { color: var(--muted); font-style: normal; }
.hrs-src { font-size: 13px; border: 1px solid var(--line); padding: 0 5px; }
.stop-title { margin: 0; min-width: 0; font-family: var(--px); font-size: 24px; line-height: 1.25; font-weight: 400; }
.stop-title button { all: unset; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; box-sizing: border-box; width: 100%; max-width: 100%; cursor: pointer; overflow: hidden; overflow-wrap: anywhere; }
.stop.is-open .stop-title button { display: block; -webkit-line-clamp: none; }
.stop-title button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.stop-status { display: grid; justify-items: end; text-align: right; }
.stop-status-sub { font: 600 13px/1.3 var(--sans); }
.st-ok { color: var(--green); }
.st-late, .st-board { color: var(--red); }
.st-now { color: var(--amber); }
.st-done, .st-skip { color: var(--muted); }
.st-now .px, .st-board .px { animation: blink 1.2s steps(2, jump-none) infinite; }
.stop.is-optional .stop-title, .stop.is-done .stop-title, .stop.is-done .stop-time .px { color: var(--muted); }
.stop.is-now { background-color: color-mix(in srgb, var(--amber) 9%, var(--bg-row)); }
.stop.is-focus { outline: 2px solid var(--amber); outline-offset: -2px; }
.stop.is-anchor .stop-time .px { color: var(--red); }

/* 展開內容 */
.stop-detail { grid-column: 1 / -1; display: grid; gap: 10px; margin-top: 10px; cursor: auto; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--muted); font-size: 14px; }
.detail-meta [lang="zh-CN"] { font-family: var(--sans-cn); }
.detail-note { margin: 0; max-width: 62ch; }
.detail-tips { margin: 0; max-width: 62ch; color: var(--amber); font-size: 15px; }
.ticket { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); margin: 0; border: 1px solid var(--red); }
.ticket div { padding: 6px 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ticket dt { color: var(--muted); font-size: 13px; }
.ticket dd { margin: 0; font-family: var(--px); font-size: 24px; line-height: 1.2; }
.ticket dd.is-pending { color: var(--amber); font: 600 15px/1.6 var(--sans); }
.ticket .ticket-wide { grid-column: 1 / -1; }
.ticket dd.ticket-seat { font: 600 16px/1.5 var(--sans); }
.must-label { color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.must { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; padding: 0; list-style: none; }
.must li { padding: 3px 8px; border: 1px solid var(--line); font-size: 15px; }
.alts { font-size: 15px; color: var(--muted); }
.alts a { color: var(--text); }
.voice { border-top: 1px dashed var(--line); padding-top: 6px; }
.voice summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; min-height: 40px; list-style: none; }
.voice summary::-webkit-details-marker { display: none; }
.voice summary::before { content: ""; width: 8px; height: 8px; background: var(--muted); clip-path: polygon(0 0, 100% 50%, 0 100%); transition: transform .2s var(--ease-out); }
.voice[open] summary::before { transform: rotate(90deg); }
.voice p { margin: 6px 0; max-width: 62ch; }
.verdict { font-size: 13px; padding: 0 6px; border: 1px solid currentColor; }
.verdict-good { color: var(--green); }
.verdict-warn { color: var(--amber); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 8px 0 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.sources { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* 移動段（軌道） */
.leg {
  display: grid; grid-template-columns: var(--col-time) minmax(0, 1fr); gap: 0 12px; align-items: center;
  padding: 2px var(--row-pad); background: var(--bg); border-top: 1px solid var(--line);
}
.leg-track { align-self: stretch; justify-self: center; width: 0; border-left: 2px dotted var(--line); min-height: 26px; }
.leg-body { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 48px; padding: 4px 0; font-size: 14px; min-width: 0; }
.leg-body .ico { width: 20px; height: 20px; }
.leg-what { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.leg-walk .leg-what { color: var(--green); }
.leg-taxi .leg-what { color: var(--amber); }
.leg-train .leg-what, .leg-flight .leg-what, .leg-ferry .leg-what { color: var(--red); white-space: normal; }
.leg-here .leg-what, .leg-none .leg-what { color: var(--muted); }
.leg-walk .leg-track { border-left-color: var(--green); }
.leg-taxi .leg-track { border-left: 2px dashed var(--amber); }
.leg-train .leg-track, .leg-flight .leg-track, .leg-ferry .leg-track { border-left: 2px solid var(--red); }
.leg-note { color: var(--muted); white-space: nowrap; }
.leg-src { color: var(--muted); font-size: 12px; border: 1px solid var(--line); padding: 0 5px; }
.leg-warn { color: var(--red); font-weight: 700; }
.leg-actions { display: inline-flex; gap: 6px; margin-left: auto; }
.leg-actions .key { min-height: 40px; padding: 0 10px; font-size: 14px; gap: 6px; }

.warnings { margin-top: 12px; border: 1px solid var(--red); padding: 8px 12px; }
.warnings summary { cursor: pointer; color: var(--red); font-weight: 600; }
.board-foot { margin: 20px 0 0; color: var(--muted); font-size: 14px; max-width: 70ch; }
.board-foot p { margin: 4px 0; }
.empty { padding: 24px; color: var(--muted); }

/* 換日時整面屏逐行亮起：每一行由點陣遮罩從暗到亮，從上到下 */
.board.is-lighting .stop, .board.is-lighting .leg {
  -webkit-mask-image: radial-gradient(circle, #000 var(--lit), transparent calc(var(--lit) + .5px));
  mask-image: radial-gradient(circle, #000 var(--lit), transparent calc(var(--lit) + .5px));
  -webkit-mask-size: 4px 4px; mask-size: 4px 4px;
  animation: led-lit .36s steps(4, end) backwards; animation-delay: calc(var(--i, 0) * 28ms);
}
@keyframes led-lit { from { --lit: 0px; } to { --lit: 3px; } }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- 底部軌道與地圖 ---------- */
.rail {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; gap: 8px; padding: 8px calc(var(--gutter) + env(safe-area-inset-right, 0)) calc(8px + env(safe-area-inset-bottom, 0)) calc(var(--gutter) + env(safe-area-inset-left, 0));
  background: var(--bg); border-top: 1px solid var(--frame);
}
.rail .key { flex: 1; min-height: 48px; }
body.map-open .rail .key { background: var(--text); color: var(--bg); border-color: var(--text); }
.mapwrap {
  position: fixed; left: 0; right: 0; bottom: calc(var(--rail) + env(safe-area-inset-bottom, 0)); z-index: 30; height: min(58vh, 540px);
  background: var(--bg); border-top: 2px solid var(--frame);
  transform: translateY(calc(100% + var(--rail) + 40px)); transition: transform .34s var(--ease-out);
  display: grid; grid-template-rows: auto 1fr auto;
}
body.map-open .mapwrap { transform: none; }
.map-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px var(--gutter); }
.map-cities { display: flex; gap: 6px; }
.map-city { min-height: 40px; }
.map { min-height: 0; background: var(--bg-sunk); }
.map .leaflet-tile-pane { filter: var(--map-filter); }
.map-note { margin: 0; padding: 4px var(--gutter) 6px; color: var(--muted); font-size: 13px; }
.leaflet-container { font: 14px/1.4 var(--sans); background: var(--bg-sunk); }
.leaflet-control-attribution { background: var(--bg) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar { border: 1px solid var(--frame) !important; border-radius: 0 !important; box-shadow: none !important; }
.leaflet-bar a { width: 36px !important; height: 36px !important; line-height: 36px !important; background: var(--bg-row) !important; color: var(--text) !important; border-color: var(--line) !important; border-radius: 0 !important; }
.pin-wrap { background: none; border: 0; }
.pin { display: grid; place-items: center; width: 30px; height: 30px; background: var(--bg); color: var(--text); border: 2px solid var(--text); font: 700 14px/1 var(--sans); }
.pin-station, .pin-transit, .pin-flight { border-color: var(--red); color: var(--red); }
.pin-hotel { background: var(--text); color: var(--bg); }
.pin.is-optional { border-style: dashed; color: var(--muted); }
.is-focus .pin { background: var(--amber); color: var(--on-accent); border-color: var(--amber); transform: scale(1.15); }
.route-line { stroke: var(--muted); }
.route-walk { stroke: var(--green); }
.route-taxi { stroke: var(--amber); stroke-dasharray: 6 6; }
:where(html[data-theme="paper"]) .route-walk, :where(html[data-theme="paper"]) .route-taxi { stroke: var(--red); }

/* ---------- 給司機看 ---------- */
.driver { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--text); }
.driver::backdrop { background: rgba(0, 0, 0, .7); }
.driver-inner { min-height: 100%; display: flex; flex-direction: column; gap: 12px; padding: calc(16px + env(safe-area-inset-top, 0)) calc(var(--gutter) + 4px) calc(24px + env(safe-area-inset-bottom, 0)); max-width: 46rem; margin: 0 auto; }
.driver-band { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 8px 12px; background: var(--amber); color: #0B0D0C; margin-bottom: 6vh; }
.driver-band .px { font-size: 24px; }
.driver-band span:last-child { font: 700 16px/1.4 var(--sans-cn); }
.driver-hello { margin: 0; font: 600 22px/1.4 var(--sans-cn); color: var(--muted); }
.driver-name { margin: 0; font: 700 clamp(34px, 10vw, 64px)/1.2 var(--sans-cn); color: var(--amber); overflow-wrap: anywhere; }
.driver-addr { margin: 0; font: 600 clamp(22px, 6vw, 34px)/1.4 var(--sans-cn); }
.driver-extra { margin: 0; font: 500 clamp(20px, 5vw, 28px)/1.45 var(--sans-cn); color: var(--green); }
.driver-tw { margin: 0; color: var(--muted); }
.driver-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .board.is-lighting .stop, .board.is-lighting .leg { animation: none; -webkit-mask-image: none; mask-image: none; }
  .st-now .px, .st-board .px, .ab-state.is-boarding { animation: none; }
  .mapwrap, .key { transition: none; }
}

@media (max-width: 999px) {
  /* 手機：軌道線對齊站號，讓移動資訊與按鍵有足夠寬度 */
  .leg { grid-template-columns: 20px minmax(0, 1fr); }
}
@media (max-width: 420px) {
  :root { --col-time: 5.25rem; --col-status: 3.75rem; }
  .leg-why, .progress-bar { display: none; }
  .day-line { flex-wrap: nowrap; }
  .day-hotel { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .progress { flex: none; }
  .day-tab { padding: 5px 7px; }
}

/* ---------- 寬螢幕：左屏右圖 ---------- */
@media (min-width: 1000px) {
  :root { --gutter: 28px; --row-pad: 14px; --col-time: 7rem; --col-status: 6rem; }
  body { padding-bottom: 32px; }
  .masthead { padding-top: 18px; }
  .rail { display: none; }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 40%); gap: 24px; align-items: start; }
  .mapwrap { position: sticky; top: 100px; bottom: auto; transform: none; height: calc(100vh - 116px); border: 1px solid var(--frame); z-index: 1; }
  .day-name { font-size: 48px; }
  .day-summary { white-space: normal; }
  .day-tab { min-height: 72px; padding: 6px 12px; }
  .day-tab-label { font-size: 36px; }
  .stop { padding-top: 12px; padding-bottom: 12px; }
  .stop-detail { grid-column: 2 / -1; }
  /* 桌面錨點大屏：真正的發車屏尺度，倒數是焦點 */
  .ab-head, .ab-row { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 0 36px; padding-left: 20px; padding-right: 20px; }
  .ab-head { font-size: 14px; }
  .ab-row .px { font-size: 48px; line-height: 1.15; }
  .ab-foot { padding: 4px 20px 16px; font-size: 16px; align-items: center; }
  .ab-left .px { font-size: 72px; }
  .ab-left .px small { font-size: 36px; }
}
