:root {
  color-scheme: light;
  --brand-navy: #004977;
  --brand-navy-strong: #003b61;
  --brand-blue: #0067a6;
  --brand-red: #d03027;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --surface-3: #e4ebf1;
  --text: #172b3a;
  --muted: #5f7282;
  --border: #d8e1e8;
  --focus: #1976b9;
  --green: #14784d;
  --green-soft: #e6f4ec;
  --amber: #93610b;
  --amber-soft: #fff3d6;
  --red: #b62c34;
  --red-soft: #fdebec;
  --shadow: 0 10px 28px rgba(0, 48, 78, .09);
  --radius: 18px;
  --header-bg: linear-gradient(110deg, #003b61 0%, #004977 72%, #005e91 100%);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1722;
  --surface: #122534;
  --surface-2: #182f40;
  --surface-3: #213a4c;
  --text: #f4f7fa;
  --muted: #a9bac7;
  --border: #294355;
  --focus: #58b4eb;
  --green: #6ed3a0;
  --green-soft: #153c2d;
  --amber: #f1c368;
  --amber-soft: #3c3119;
  --red: #ff8e94;
  --red-soft: #49242a;
  --shadow: 0 12px 30px rgba(0, 0, 0, .24);
  --header-bg: linear-gradient(110deg, #081a28 0%, #0c2940 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, select { -webkit-tap-highlight-color: transparent; }
a { color: var(--brand-blue); }
html[data-theme="dark"] a { color: #79c5ef; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  color: white;
  background: var(--header-bg);
  border-bottom: 3px solid var(--brand-red);
  box-shadow: 0 5px 18px rgba(0, 35, 58, .18);
}
.brand-wrap { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 22, 42, .28);
}
.brand-copy { min-width: 0; }
h1 { margin: 0; font-size: clamp(17px, 3vw, 23px); line-height: 1.15; letter-spacing: -.02em; }
.subtitle { margin: 3px 0 0; color: #d7e6f0; font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.live-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255,255,255,.07);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #61d59a; box-shadow: 0 0 0 4px rgba(97,213,154,.14); }
.header-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  cursor: pointer;
  color: white;
  background: rgba(255,255,255,.10);
  font-size: 20px;
  font-weight: 700;
  transition: background .18s ease, transform .18s ease;
}
.header-button:hover { background: rgba(255,255,255,.18); }
.header-button:active { transform: scale(.95); }
.header-button:focus-visible, .line-tab:focus-visible, select:focus-visible, .primary-button:focus-visible, .dialog-close:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.header-button.spinning span { display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.shell { width: min(1080px, calc(100% - 28px)); margin: 18px auto 34px; }
.status-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 17px 19px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.eyebrow { color: var(--muted); font-size: 10.5px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.status-main { margin-top: 4px; font-size: 15px; font-weight: 780; }
.refresh-meta { color: var(--muted); font-size: 12.5px; text-align: right; white-space: nowrap; }
.status-side { display: flex; align-items: center; gap: 12px; }
.planner-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--brand-navy);
  background: var(--surface-2);
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.planner-link:hover { background: var(--surface-3); border-color: #b6c8d6; }
.planner-link:active { transform: scale(.98); }
.planner-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
html[data-theme="dark"] .planner-link { color: #9ed8fa; }
.separator { margin: 0 5px; }

.filter-panel {
  margin: 12px 0;
  padding: 13px 14px 11px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}
.filter-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.filter-hint { display: none; margin-top: 3px; color: var(--muted); font-size: 11px; }
.status-select-wrap { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 750; }
select {
  min-height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background-color: var(--surface-2);
  outline: none;
}
.line-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  padding: 2px 1px 3px;
  overscroll-behavior-inline: contain;
}
.line-tabs::-webkit-scrollbar { display: none; }
.line-tab {
  min-height: 42px;
  scroll-snap-align: start;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 760;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.line-tab.active {
  color: white;
  border-color: var(--brand-navy);
  background: var(--brand-navy);
  box-shadow: inset 0 -2px 0 var(--brand-red);
}
html[data-theme="dark"] .line-tab.active { border-color: #1c75aa; background: #175d87; }

.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 0 0 22px; }
.summary-card {
  position: relative;
  overflow: hidden;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
}
.summary-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand-blue); }
.summary-card.has-attention::before { background: var(--brand-red); }
.summary-card strong { display: block; font-size: 23px; line-height: 1.1; letter-spacing: -.03em; }
.summary-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 11.5px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 2px 10px; }
.section-heading h2, .legend-card h2, .seo-content h2 { margin: 2px 0 0; font-size: 20px; letter-spacing: -.02em; }
.result-count { color: var(--muted); font-size: 12.5px; }
.departure-list { display: grid; gap: 9px; }
.departure-card {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(220px, 1.25fr) 154px;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  padding: 15px 17px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 4px 15px rgba(0, 47, 77, .035);
}
.departure-primary { display: flex; align-items: center; gap: 14px; min-width: 0; }
.departure-time { min-width: 72px; font-size: 23px; font-weight: 860; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.line-info { min-width: 0; }
.line-code {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 28px;
  padding: 0 7px;
  margin-right: 7px;
  border-radius: 8px;
  color: white;
  background: var(--brand-navy);
  box-shadow: inset 0 -2px 0 var(--brand-red);
  font-size: 11.5px;
  font-weight: 900;
}
.line-name { font-weight: 770; }
.destination-label, .platform-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.destination { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 720; }
.platform { justify-self: end; min-width: 132px; text-align: right; }
.platform-number { display: block; margin-bottom: 5px; font-size: 20px; font-weight: 860; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 8px; font-size: 10.5px; font-weight: 850; }
.status-badge.confirmed { color: var(--green); background: var(--green-soft); }
.status-badge.predicted { color: var(--amber); background: var(--amber-soft); }
.status-badge.tbd, .status-badge.unknown { color: var(--muted); background: var(--surface-2); }
.status-badge.delayed, .status-badge.cancelled, .status-badge.ask-staff { color: var(--red); background: var(--red-soft); }

.empty-state { padding: 38px 20px; border: 1px dashed var(--border); border-radius: 17px; text-align: center; background: var(--surface); }
.empty-state strong, .empty-state span { display: block; }
.empty-state span { margin-top: 5px; color: var(--muted); font-size: 12.5px; }
.hidden { display: none !important; }

.legend-card { margin-top: 20px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.legend-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px 20px; margin-top: 13px; }
.legend-grid > div { display: grid; grid-template-columns: 12px auto 1fr; align-items: center; gap: 8px; font-size: 11.5px; }
.legend-grid span:last-child { color: var(--muted); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.status-dot.confirmed { background: var(--green); }
.status-dot.predicted { background: #d49a28; }
.status-dot.tbd { background: #8294a2; }
.status-dot.delayed { background: var(--red); }
.notice { margin-top: 11px; padding: 14px 16px; border-left: 4px solid #d49a28; border-radius: 12px; background: var(--amber-soft); color: var(--text); font-size: 12.5px; line-height: 1.55; }

.seo-content {
  margin-top: 26px;
  padding: 22px;
  border-top: 1px solid var(--border);
  color: var(--text);
}
.seo-content h3 { margin: 22px 0 7px; font-size: 15px; }
.seo-content p { margin: 8px 0 0; max-width: 860px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.faq-list { display: grid; gap: 8px; margin-top: 18px; }
.faq-list details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.faq-list summary { cursor: pointer; padding: 13px 14px; font-size: 13px; font-weight: 760; }
.faq-list details p { padding: 0 14px 13px; margin: 0; }


.install-dialog {
  width: min(420px, calc(100% - 30px));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(0,0,0,.3);
}
.install-dialog::backdrop { background: rgba(0, 20, 34, .55); backdrop-filter: blur(3px); }
.install-dialog form { position: relative; padding: 24px; text-align: center; }
.install-dialog h2 { margin: 10px 0 8px; font-size: 20px; }
.install-dialog p { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.dialog-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto; border-radius: 16px; background: var(--brand-navy); color: white; box-shadow: inset 0 -4px 0 var(--brand-red); font-weight: 900; }
.dialog-close { position: absolute; right: 10px; top: 8px; width: 38px; height: 38px; border: 0; border-radius: 10px; cursor: pointer; background: transparent; color: var(--muted); font-size: 25px; }
.primary-button { min-height: 44px; width: 100%; border: 0; border-radius: 12px; color: white; background: var(--brand-navy); cursor: pointer; font-weight: 800; }

@media (max-width: 760px) {
  .topbar { min-height: 66px; padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 8px; }
  .brand-mark { width: 40px; height: 40px; flex-basis: 40px; border-radius: 11px; }
  h1 { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .subtitle { font-size: 10.5px; }
  .live-pill { min-height: 36px; padding: 0 8px; }
  .live-pill span:last-child { display: none; }
  .header-button { width: 38px; height: 38px; }
  .shell { width: min(100% - 18px, 680px); margin-top: 10px; }
  .status-strip { display: block; padding: 13px 14px; border-radius: 15px; }
  .status-side { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 8px; }
  .refresh-meta { margin-top: 0; text-align: left; white-space: normal; }
  .planner-link { min-height: 40px; padding: 0 12px; }
  .filter-panel { padding: 11px 10px 9px; margin: 9px 0; }
  .filter-heading { align-items: center; }
  .filter-hint { display: block; }
  .status-select-wrap > span { display: none; }
  select { min-height: 40px; max-width: 148px; font-size: 12px; }
  .line-tab { min-height: 42px; padding: 0 13px; }
  .summary-grid { grid-template-columns: repeat(4, minmax(82px, 1fr)); gap: 7px; overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
  .summary-grid::-webkit-scrollbar { display: none; }
  .summary-card { min-width: 82px; padding: 11px 10px 10px; }
  .summary-card strong { font-size: 20px; }
  .summary-card span { font-size: 10px; }
  .departure-card { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 13px; min-height: 0; }
  .departure-primary { gap: 10px; min-width: 0; }
  .departure-time { min-width: 62px; font-size: 21px; }
  .line-info { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .line-name { font-size: 13px; }
  .line-code { min-width: 28px; height: 26px; margin-right: 5px; font-size: 10.5px; }
  .platform { grid-column: 2; grid-row: 1 / 3; min-width: 88px; align-self: center; }
  .platform-number { font-size: 18px; }
  .destination-wrap { grid-column: 1; grid-row: 2; padding-top: 8px; border-top: 1px solid var(--border); }
  .destination { white-space: normal; font-size: 13px; line-height: 1.35; }
  .legend-grid { grid-template-columns: 1fr; gap: 9px; }
  .seo-content { margin-top: 22px; padding: 18px 4px 0; }
}

@media (max-width: 430px) {
  .brand-wrap { gap: 8px; max-width: calc(100vw - 160px); }
  .subtitle { display: none; }
  .top-actions { gap: 5px; }
  .status-side { grid-template-columns: 1fr; }
  .planner-link { width: 100%; }
  .live-pill { min-width: 28px; padding: 0 9px; }
  .header-button { width: 36px; height: 36px; border-radius: 11px; }
  .section-heading h2, .legend-card h2, .seo-content h2 { font-size: 18px; }
  .filter-heading { gap: 8px; }
  .status-select-wrap { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}


/* v8 commuter features */
.filter-actions { display: flex; align-items: center; gap: 8px; }
.favorite-line-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
.favorite-line-button > span:first-child { color: #c78412; font-size: 17px; line-height: 1; }
.favorite-line-button.active { border-color: #c6942a; background: var(--amber-soft); }
.tab-star { margin-right: 5px; color: #f1b944; }

.favorite-section { margin: 0 0 10px; }
.favorite-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(115deg, var(--surface) 0%, var(--surface) 64%, var(--surface-2) 100%);
  box-shadow: var(--shadow);
}
.favorite-card-main { display: grid; grid-template-columns: minmax(0,1fr) 174px; align-items: stretch; min-height: 142px; }
.favorite-card-copy { padding: 18px 20px; min-width: 0; }
.favorite-kicker { color: var(--brand-blue); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
html[data-theme="dark"] .favorite-kicker { color: #79c5ef; }
.favorite-kicker span { color: #e0a529; margin-right: 4px; }
.favorite-destination { margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(23px,3.5vw,30px); font-weight: 880; letter-spacing: -.035em; line-height: 1.08; }
.favorite-meta { display: grid; grid-template-columns: minmax(96px,auto) minmax(96px,auto) minmax(122px,1fr); align-items: stretch; gap: 9px; margin-top: 13px; }
.favorite-detail { display: flex; min-height: 58px; flex-direction: column; justify-content: center; padding: 7px 10px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }
.favorite-detail-label { display: block; color: var(--muted); font-size: 9.5px; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; }
.favorite-detail-value { display: block; margin-top: 2px; color: var(--text); font-size: 24px; line-height: 1.02; font-weight: 900; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.favorite-status { align-items: flex-start; }
.favorite-status .status-badge { margin-top: 5px; padding: 5px 9px; font-size: 10.5px; white-space: nowrap; }
.favorite-countdown-wrap {
  min-width: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 22px;
  color: white;
  background: linear-gradient(140deg, var(--brand-navy-strong), var(--brand-blue));
  border-left: 4px solid var(--brand-red);
}
.countdown-label { font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; opacity: .78; }
.favorite-countdown { margin-top: 4px; font-size: 29px; line-height: 1; font-weight: 900; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.favorite-countdown.urgent { color: #ffe07a; }
.favorite-countdown.due { color: white; animation: gentlePulse 1.5s ease-in-out infinite; }
.favorite-empty { display: flex; align-items: center; gap: 15px; min-height: 104px; padding: 17px 20px; }
.favorite-empty .favorite-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px; color: #b77b08; background: var(--amber-soft); font-size: 25px; }
.favorite-empty .favorite-icon.active { color: #c68a10; }
.favorite-empty strong { display: block; margin-top: 3px; font-size: 16px; }
.favorite-empty p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.leaving-soon-section { margin: 0 0 23px; }
.soon-heading { margin-bottom: 9px; }
.soon-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.soon-card {
  display: grid;
  grid-template-columns: 74px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-red);
  border-radius: 15px;
  background: var(--surface);
}
.soon-countdown { display: grid; place-items: center; min-height: 48px; padding: 6px; border-radius: 11px; background: var(--surface-2); color: var(--brand-navy); text-align: center; font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .soon-countdown { color: #8bd0f5; }
.soon-countdown.urgent { color: var(--red); background: var(--red-soft); }
.soon-info { min-width: 0; }
.soon-line { display: flex; align-items: center; min-width: 0; font-size: 12px; }
.soon-line strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soon-line .line-code { height: 24px; min-width: 26px; margin-right: 6px; font-size: 10px; }
.soon-destination { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11.5px; }
.soon-platform { text-align: right; }
.soon-platform span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.soon-platform strong { display: block; margin-top: 2px; font-size: 18px; }

.time-stack { min-width: 76px; }
.countdown.compact { display: inline-block; margin-top: 3px; color: var(--muted); font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.countdown.compact.urgent { color: var(--red); }
.countdown.compact.due { font-weight: 900; }
.dialog-app-icon { display: block; width: 58px; height: 58px; margin: 0 auto; border-radius: 16px; object-fit: cover; }

@keyframes gentlePulse { 50% { opacity: .7; } }

@media (max-width: 760px) {
  .filter-actions { gap: 6px; }
  .favorite-line-button { min-height: 40px; padding: 0 10px; }
  .favorite-line-button span:last-child { display: none; }
  .favorite-line-button > span:first-child { font-size: 19px; }
  .favorite-card-main { grid-template-columns: 1fr; min-height: 0; }
  .favorite-card-copy { padding: 15px 14px 13px; }
  .favorite-destination { margin-top: 5px; font-size: 23px; white-space: normal; line-height: 1.08; }
  .favorite-meta { grid-template-columns: 1fr 1fr 1.12fr; gap: 7px; margin-top: 10px; }
  .favorite-detail { min-height: 56px; padding: 7px 8px; }
  .favorite-detail-label { font-size: 9px; }
  .favorite-detail-value { font-size: 23px; }
  .favorite-status .status-badge { margin-top: 5px; max-width: 100%; padding: 5px 7px; font-size: 9.5px; }
  .favorite-countdown-wrap { min-width: 0; min-height: 60px; flex-direction: row; gap: 10px; padding: 10px 14px; border-left: 0; border-top: 3px solid var(--brand-red); }
  .favorite-countdown { margin-top: 0; font-size: 24px; }
  .favorite-empty { padding: 14px; }
  .soon-list { grid-template-columns: 1fr; }
  .soon-card { grid-template-columns: 66px minmax(0,1fr) 58px; min-height: 70px; padding: 9px 10px; }
  .soon-countdown { min-height: 46px; font-size: 15px; }
  .time-stack { min-width: 64px; }
  .departure-time { min-width: 0; }
}

@media (max-width: 430px) {
  .favorite-meta { grid-template-columns: 1fr 1fr; }
  .favorite-status { grid-column: 1 / -1; min-height: 48px; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
  .favorite-status .status-badge { margin-top: 0; font-size: 10px; }
  .favorite-detail-value { font-size: 22px; }
  .soon-heading { align-items: center; }
  .soon-heading .result-count { max-width: 145px; text-align: right; font-size: 11px; }
}
