:root {
  color-scheme: light;
  --bg-top: #f4f0dd;
  --bg-bottom: #dbe7d8;
  --panel: rgba(255, 252, 245, 0.9);
  --panel-strong: #fffaf0;
  --line: #0b6b53;
  --line-soft: #d0e4d9;
  --text: #18312b;
  --muted: #5e766d;
  --warn: #d97a27;
  --danger: #b54e3d;
  --shadow: 0 18px 48px rgba(24, 49, 43, 0.12);
  --radius: 24px;
  --font-display: "Avenir Next", "Hiragino Sans", sans-serif;
  --font-body: "IBM Plex Sans JP", "Hiragino Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 30%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body.train-page {
  overflow: hidden;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #e8a92f;
  outline-offset: 3px;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px 12px 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.app-footer a,
.location-notice a {
  color: inherit;
  text-underline-offset: 3px;
}

.location-notice {
  max-width: 720px;
  margin: 12px 0 0;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  line-height: 1.65;
}

.map-legal-links {
  position: fixed;
  z-index: 1000;
  right: 12px;
  bottom: 28px;
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 15px rgba(20, 40, 35, 0.16);
  font-size: 0.68rem;
}

.map-legal-links a {
  padding: 4px 6px;
  color: #36564e;
  text-decoration: none;
}

.home-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Legal */
.legal-page {
  background: #f4f0e4;
}

.legal-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(18, 61, 52, 0.15);
}

.legal-back {
  color: #123d34;
  font-size: 0.86rem;
  font-weight: 700;
  text-underline-offset: 4px;
}

.legal-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 210px minmax(0, 820px);
  gap: clamp(40px, 8vw, 100px);
  padding: 64px 0 100px;
}

.legal-nav {
  position: sticky;
  top: 30px;
  align-self: start;
  display: grid;
  gap: 4px;
}

.legal-nav strong {
  margin-bottom: 14px;
  color: #a37627;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
}

.legal-nav a {
  padding: 11px 12px;
  border-left: 2px solid rgba(18, 61, 52, 0.16);
  color: #536c65;
  text-decoration: none;
  font-size: 0.84rem;
}

.legal-nav a:hover {
  border-color: #123d34;
  color: #123d34;
}

.legal-intro {
  padding-bottom: 60px;
}

.legal-intro h1 {
  margin: 18px 0 20px;
  color: #123d34;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.legal-intro > p:last-of-type {
  max-width: 660px;
  color: #536c65;
  line-height: 1.9;
}

.legal-intro dl {
  display: flex;
  gap: 28px;
  margin: 28px 0 0;
}

.legal-intro dl div {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
}

.legal-intro dt { color: #7b8e89; }
.legal-intro dd { margin: 0; font-weight: 700; }

.legal-section {
  position: relative;
  padding: 58px 0;
  border-top: 1px solid rgba(18, 61, 52, 0.16);
  scroll-margin-top: 20px;
}

.legal-number {
  display: block;
  margin-bottom: 8px;
  color: #a37627;
  font: 700 0.68rem/1 var(--font-display);
  letter-spacing: 0.18em;
}

.legal-section h2 {
  margin: 0 0 34px;
  color: #123d34;
  font: 700 clamp(1.7rem, 4vw, 2.4rem)/1.25 var(--font-display);
  letter-spacing: -0.03em;
}

.legal-section h3 {
  margin: 32px 0 8px;
  color: #244b41;
  font-size: 0.98rem;
}

.legal-section p,
.legal-section li {
  color: #536c65;
  font-size: 0.9rem;
  line-height: 1.95;
}

.legal-section li + li { margin-top: 10px; }
.legal-section a { color: #146b58; text-underline-offset: 3px; }

.privacy-summary {
  margin: 0 0 36px;
  padding: 22px 24px;
  border-left: 4px solid #b5852d;
  background: rgba(255, 255, 255, 0.58);
}

.privacy-summary strong { color: #8a6420; font-size: 0.76rem; letter-spacing: 0.08em; }
.privacy-summary p { margin: 7px 0 0; color: #244b41; }

.legal-contact {
  margin-top: 20px;
  padding-inline: 34px;
  background: #123d34;
  border-radius: 4px;
}

.legal-contact h2,
.legal-contact p { color: #f5f0e3; }
.legal-contact a { color: #f4c86f; }

.legal-footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px 20px;
  background: #0e332b;
  color: rgba(255,255,255,.7);
  font-size: .75rem;
}

.legal-footer a { color: inherit; }

@media (max-width: 760px) {
  .legal-header,
  .legal-layout { width: min(100% - 28px, 680px); }
  .legal-layout { grid-template-columns: 1fr; padding-top: 36px; }
  .legal-nav { position: static; display: flex; overflow-x: auto; gap: 0; }
  .legal-nav strong { display: none; }
  .legal-nav a { flex: 0 0 auto; border-left: 0; border-bottom: 2px solid rgba(18,61,52,.16); }
  .legal-intro { padding-bottom: 30px; }
  .legal-intro dl { display: grid; gap: 8px; }
  .legal-section { padding-block: 42px; }
  .legal-contact { padding-inline: 22px; }
  .map-legal-links { right: 6px; bottom: 26px; }
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.train-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-bottom));
}

.hero-card,
.panel {
  backdrop-filter: blur(18px);
  border: 1px solid rgba(11, 107, 83, 0.12);
  box-shadow: var(--shadow);
}

.hero-card {
  background:
    linear-gradient(135deg, rgba(11, 107, 83, 0.92), rgba(52, 121, 92, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  color: #f8fffb;
  border-radius: 30px;
  padding: 22px 20px 20px;
  position: relative;
  overflow: hidden;
}

.train-hero-card {
  background:
    linear-gradient(135deg, rgba(11, 107, 83, 0.9), rgba(18, 48, 70, 0.84)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -8% -42% auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-meta,
.panel-header,
.hero-stats,
.eta-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.compact-stats {
  margin-top: 14px;
}

.line-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 0.8rem;
}

.line-switcher select {
  border: 0;
  background: transparent;
  color: inherit;
  min-width: 180px;
}

.line-switcher option {
  color: var(--text);
}

.eyebrow,
.panel-caption,
.hint-text,
.label,
.eta-label,
.map-tag,
.status-pill {
  letter-spacing: 0.04em;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.8;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.8rem;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
}

h1 {
  margin-top: 18px;
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.hero-subtitle,
.panel-caption,
.hint-text {
  margin: 10px 0 0;
  line-height: 1.55;
}

.hero-stats {
  margin-top: 22px;
  flex-wrap: wrap;
}

.stat {
  min-width: 120px;
}

.label,
.eta-label,
.map-tag {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.hero-card .label {
  color: rgba(248, 255, 251, 0.72);
}

.stat strong,
.eta-time {
  font-size: 1.1rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-top: 18px;
}

.train-content-grid {
  grid-template-columns: minmax(320px, 460px) minmax(260px, 360px);
  align-content: end;
  margin-top: 14px;
}

.train-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  overflow: auto;
  background: linear-gradient(180deg, rgba(13, 22, 26, 0.2), rgba(13, 22, 26, 0.4));
}

.train-overlay .app-shell,
.train-overlay .panel,
.train-overlay .hero-card {
  pointer-events: auto;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
}

.schedule-panel,
.telemetry-panel {
  backdrop-filter: blur(18px);
  background: rgba(255, 252, 245, 0.9);
}

.map-panel {
  grid-column: 1 / -1;
  background: rgba(246, 251, 246, 0.82);
}

.map-shell {
  width: min(1240px, 100%);
}

.map-page {
  overflow: hidden;
}

.map-page #map {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: 0;
}

.map-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
}

.map-side-panel,
.map-legend-floating {
  pointer-events: auto;
}

.map-side-panel {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  width: min(392px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(252, 252, 247, 0.96), rgba(243, 249, 244, 0.9)),
    rgba(248, 251, 248, 0.92);
  border: 1px solid rgba(11, 107, 83, 0.16);
  box-shadow: 0 24px 56px rgba(24, 49, 43, 0.2);
  backdrop-filter: blur(22px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: calc(100vh - 32px);
  max-height: calc(100vh - max(32px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 20px));
  overflow: hidden;
  transition:
    width 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
  -webkit-user-select: none;
  user-select: none;
}

.map-side-panel.is-collapsed {
  width: min(296px, calc(100vw - 32px));
  background:
    linear-gradient(180deg, rgba(252, 252, 247, 0.94), rgba(243, 249, 244, 0.86)),
    rgba(248, 251, 248, 0.86);
  box-shadow: 0 16px 36px rgba(24, 49, 43, 0.16);
}

.map-side-header,
.map-side-overview-card,
.map-detail,
.map-legend-floating {
  border: 1px solid rgba(11, 107, 83, 0.1);
  background: rgba(255, 255, 255, 0.52);
}

.map-side-header {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.map-side-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.map-side-summary-copy {
  min-width: 0;
}

.map-side-summary-title,
.map-panel-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
}

.map-side-summary-title {
  margin-top: 2px;
  font-size: 1.1rem;
  line-height: 1.24;
  text-wrap: balance;
}

.map-panel-title {
  margin: 6px 0 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.2;
}

.map-side-summary-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 94, 120, 0.12), rgba(11, 107, 83, 0.08));
  color: var(--muted);
}

.map-side-summary-meta strong {
  color: var(--text);
  font-size: 1.08rem;
}

.map-side-toggle {
  flex: 0 0 auto;
  align-self: flex-start;
  min-height: 42px;
  min-width: 0;
  padding: 0 12px 0 14px;
  border: 1px solid rgba(15, 94, 120, 0.12);
  border-radius: 999px;
  background: rgba(15, 94, 120, 0.08);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.map-side-toggle:hover {
  background: rgba(15, 94, 120, 0.18);
}

.map-side-toggle-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.map-side-toggle-icon {
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.map-side-panel.is-expanded .map-side-toggle-icon {
  transform: rotate(45deg);
}

.map-side-pulse {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0f5e78, #0b6b53);
  box-shadow: 0 0 0 5px rgba(15, 94, 120, 0.12);
  flex: 0 0 auto;
}

.map-side-summary-metric {
  display: grid;
  gap: 2px;
}

.map-side-summary-label,
.map-side-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.map-side-summary-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, rgba(11, 107, 83, 0.16), transparent);
}

.map-dashboard-card {
  padding: 14px;
  border: 1px solid rgba(11, 107, 83, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.56);
}
.map-dashboard-card[hidden] { display: none; }

.map-dashboard-card-head,
.map-dashboard-card-toggle,
.map-route-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-dashboard-card-toggle {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.map-dashboard-card-toggle > span:first-child {
  display: grid;
  gap: 3px;
}

.map-dashboard-kicker {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.map-dashboard-card-title {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
}

.map-dashboard-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 94, 120, 0.1);
  color: #0f5e78;
  font-size: 0.72rem;
  font-weight: 800;
}

.map-card-chevron {
  color: var(--muted);
  font-size: 1.2rem;
  transition: transform 160ms ease;
}

.map-dashboard-card-toggle[aria-expanded="false"] .map-card-chevron { transform: rotate(-90deg); }
.map-dashboard-card-toggle[aria-expanded="false"] + .map-dashboard-card-body { display: none; }

.map-dashboard-card-body { margin-top: 12px; }

.map-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.map-overview-stat {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 94, 120, 0.07);
}

.map-overview-stat strong { color: var(--text); font-size: 1.15rem; }
.map-overview-stat span { color: var(--muted); font-size: 0.7rem; }

.map-line-status-list,
.map-train-status-list { display: grid; gap: 7px; }

.map-line-status-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-radius: 13px;
  background: rgba(248, 251, 248, 0.8);
}

.map-line-color { width: 5px; align-self: stretch; border-radius: 99px; background: var(--line-status-color); }
.map-line-status-main { min-width: 0; display: grid; gap: 2px; flex: 1; }
.map-line-status-main strong { color: var(--text); font-size: 0.78rem; }
.map-line-status-main span, .map-line-status-count span { color: var(--muted); font-size: 0.68rem; }
.map-line-status-count { display: grid; justify-items: end; gap: 2px; white-space: nowrap; }
.map-line-status-count b { color: #0f5e78; font-size: 0.88rem; }

.map-train-status-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(11, 107, 83, 0.08);
  border-radius: 13px;
  background: rgba(248, 251, 248, 0.8);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.map-train-status-item:hover { background: rgba(236, 248, 244, 0.95); border-color: rgba(11, 107, 83, 0.24); }
.map-train-status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #0f5e78; }
.map-train-status-item.is-stopped .map-train-status-dot { background: #b54e3d; }
.map-train-status-main { min-width: 0; display: grid; gap: 2px; flex: 1; }
.map-train-status-main strong { overflow: hidden; color: var(--text); font-size: 0.73rem; text-overflow: ellipsis; white-space: nowrap; }
.map-train-status-main span, .map-train-status-main small, .map-train-status-meta span { color: var(--muted); font-size: 0.67rem; }
.map-train-status-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-train-status-meta { display: grid; justify-items: end; gap: 2px; white-space: nowrap; }
.map-train-status-meta b { color: #0f5e78; font-size: 0.69rem; }
.map-train-status-item.is-stopped .map-train-status-meta b { color: #b54e3d; }
.map-dashboard-empty { padding: 8px; color: var(--muted); font-size: 0.78rem; }

.map-side-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.map-side-overview-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 20px;
  min-width: 0;
}

.map-side-overview-card-accent {
  background: linear-gradient(135deg, rgba(15, 94, 120, 0.16), rgba(11, 107, 83, 0.1));
}

.map-side-card-value {
  display: block;
  font-size: 0.96rem;
  line-height: 1.35;
  color: var(--text);
  word-break: break-word;
}

.map-side-content {
  display: grid;
  gap: 12px;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding-right: 4px;
  padding-bottom: 28px;
}

.map-side-panel.is-collapsed .map-side-content {
  display: grid;
  gap: 0;
}

.map-side-panel.is-collapsed .map-side-header {
  padding-bottom: 12px;
}

.map-side-panel.is-collapsed .map-side-toggle {
  min-width: 0;
  padding-inline: 12px;
}

.map-side-panel.is-collapsed .map-float-links,
.map-side-panel.is-collapsed .map-float-subtitle,
.map-side-panel.is-collapsed .map-detail-body,
.map-side-panel.is-collapsed .map-schedule {
  display: none;
}

.map-side-panel.is-collapsed .map-detail {
  margin-top: 0;
}

.map-side-panel.is-collapsed .map-detail-head {
  padding-bottom: 0;
  background: transparent;
}

.map-float-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.map-float-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.map-detail {
  margin-top: 10px;
  padding: 12px;
  border-radius: 22px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.map-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 1;
  padding-bottom: 10px;
  background: linear-gradient(180deg, rgba(249, 252, 248, 0.98), rgba(249, 252, 248, 0.92));
}

.map-detail-title {
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
}

.map-detail-kicker {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 94, 120, 0.1);
  color: #0f5e78;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.map-detail-head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.map-detail-back {
  padding: 5px 9px;
  border: 1px solid rgba(11, 107, 83, 0.14);
  border-radius: 999px;
  background: rgba(11, 107, 83, 0.07);
  color: #0f5e78;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.map-detail-body {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  overflow-y: auto;
  max-height: min(46vh, 420px);
  padding-right: 6px;
}

.map-schedule {
  margin-top: 8px;
  padding: 12px;
  border-radius: 22px;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow-y: auto;
  max-height: min(30vh, 280px);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  padding-right: 6px;
  border: 1px solid rgba(11, 107, 83, 0.1);
  background: rgba(255, 255, 255, 0.52);
}

.map-float-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.map-legend-floating {
  position: absolute;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  padding: 10px 12px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(24, 49, 43, 0.16);
  backdrop-filter: blur(16px);
}

@media (min-width: 721px) {
  .map-legend-floating {
    left: min(424px, calc(100vw - 220px));
  }
}

.map-hero {
  background:
    linear-gradient(135deg, rgba(15, 94, 120, 0.94), rgba(11, 107, 83, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
}

.map-layout {
  display: grid;
  margin-top: 18px;
}

.map-panel-large {
  padding-bottom: 16px;
}

.legend-dot-line {
  background: #0f5e78;
}

.legend-dot-station {
  background: #0b6b53;
}

.legend-dot-running {
  background: #d97a27;
}

.legend-dot-stopped {
  background: #b54e3d;
}

.train-marker-icon {
  background: transparent;
  border: 0;
}

.station-marker-icon {
  background: transparent;
  border: 0;
}

.station-marker-wrap {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 4px rgba(24, 49, 43, 0.22));
}

.station-marker-core {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  background: var(--station-color);
  color: #fffdf6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 0 0 1px rgba(24, 49, 43, 0.12);
}

.train-marker-wrap {
  --train-heading-rad: calc(var(--train-heading, 0deg) * 0.01745329252);
  position: relative;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 4px rgba(24, 49, 43, 0.24));
}

.train-marker-core {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--train-fill);
  border: 3px solid var(--train-border);
  box-shadow: 0 0 0 1px rgba(24, 49, 43, 0.12);
}

.train-marker-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  transform:
    translate(-50%, -50%)
    translate(
      calc(sin(var(--train-heading-rad)) * 11px),
      calc(cos(var(--train-heading-rad)) * -11px)
    )
    rotate(var(--train-heading, 0deg));
  color: var(--train-fill);
  background: var(--train-fill);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 2px 2px 8px 8px;
  clip-path: polygon(50% 0, 100% 100%, 50% 72%, 0 100%);
  box-shadow: 0 1px 3px rgba(24, 49, 43, 0.2);
  pointer-events: none;
}

.train-marker-stopped .train-marker-core {
  box-shadow: 0 0 0 1px rgba(24, 49, 43, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.train-marker-rapid .train-marker-core {
  width: 18px;
  height: 18px;
}

.train-marker-local .train-marker-core {
  width: 15px;
  height: 15px;
}

.station-label {
  border: 0;
  background: rgba(248, 251, 248, 0.96);
  color: var(--text);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(24, 49, 43, 0.18);
}

.station-label::before {
  content: "";
}

.map-caption {
  margin-top: 0;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(24, 49, 43, 0.16);
}

.legend-dot-station {
  border-radius: 4px;
}

.legend-dot-local {
  background: #d97a27;
}

.legend-dot-local-train {
  background: #0b6b53;
}

.legend-dot-highlight {
  background: #b54e3d;
}

.panel-header {
  margin-bottom: 10px;
}

.action-button {
  border: 0;
  border-radius: 999px;
  background: var(--line);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
}

.ride-settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.floating-select {
  display: grid;
  gap: 6px;
}

.floating-select span {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.floating-select select {
  width: 100%;
  border: 1px solid rgba(11, 107, 83, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  padding: 12px 14px;
}

.action-button:hover {
  background: #095640;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #f8fffb;
  text-decoration: none;
  border: 1px solid rgba(248, 255, 251, 0.3);
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 3;
}

.map-ghost-link {
  min-height: 34px;
  padding: 7px 12px;
  color: var(--text);
  border-color: rgba(11, 107, 83, 0.18);
  background: rgba(255, 255, 255, 0.42);
}

.map-train-detail,
.map-station-detail {
  display: grid;
  gap: 14px;
}

.map-detail-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(11, 107, 83, 0.1);
}

.map-detail-section-title {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f5e78;
}

.map-train-location {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.map-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.map-detail-grid-item dt {
  font-size: 0.76rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.map-detail-grid-item dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 700;
}

.map-train-stop-list,
.map-station-line-list {
  display: grid;
  gap: 8px;
}

.map-train-stop-item,
.map-station-line-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(248, 251, 248, 0.86);
  border: 1px solid rgba(11, 107, 83, 0.08);
}

.map-train-stop-topline,
.map-station-line-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.map-train-stop-time,
.map-station-line-name {
  color: var(--text);
  font-weight: 700;
}

.map-train-stop-meta,
.map-station-line-meta,
.map-station-line-note {
  margin-top: 4px;
  font-size: 0.82rem;
}

.map-detail-empty {
  color: var(--muted);
}

.map-detail-empty strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.96rem;
  color: var(--text);
}

.map-route-section { gap: 10px; }
.map-route-heading { align-items: baseline; }
.map-route-heading > span { color: var(--muted); font-size: 0.72rem; text-align: right; }
.map-route-history-toggle {
  justify-self: start;
  padding: 5px 9px;
  border: 1px solid rgba(15, 94, 120, 0.16);
  border-radius: 999px;
  background: rgba(15, 94, 120, 0.07);
  color: #0f5e78;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.map-route-timeline { display: grid; gap: 0; position: relative; padding-left: 4px; }
.map-route-timeline::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: 10px; width: 2px; background: rgba(15, 94, 120, 0.16); }
.map-route-station, .map-route-between { position: relative; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 5px 0 5px 24px; }
.map-route-station-dot, .map-route-current-dot { position: absolute; left: 5px; z-index: 1; width: 12px; height: 12px; border: 3px solid rgba(249, 252, 248, 0.98); border-radius: 50%; background: #b8c8c2; box-shadow: 0 0 0 1px rgba(15, 94, 120, 0.14); }
.map-route-station > div, .map-route-between > div { display: grid; gap: 1px; min-width: 0; flex: 1; }
.map-route-station small, .map-route-between small, .map-route-between strong { color: var(--muted); font-size: 0.66rem; }
.map-route-station strong { color: var(--text); font-size: 0.82rem; }
.map-route-station time { color: var(--muted); font-size: 0.7rem; }
.map-route-station.is-past { opacity: 0.55; }
.map-route-station.is-next .map-route-station-dot { background: #0f5e78; }
.map-route-station.is-next strong { color: #0f5e78; }
.map-route-between { margin: 3px 0; padding-block: 9px; border-radius: 11px; background: rgba(15, 94, 120, 0.09); }
.map-route-current-dot { left: 5px; width: 13px; height: 13px; background: #0f5e78; box-shadow: 0 0 0 4px rgba(15, 94, 120, 0.15); }
.map-route-between strong { color: #0f5e78; font-size: 0.76rem; }
.map-route-between span { color: var(--text); font-size: 0.78rem; }
.map-route-between em { padding-right: 8px; color: #0f5e78; font-size: 0.68rem; font-style: normal; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .map-card-chevron, .map-side-toggle-icon { transition: none; }
}

.ghost-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.train-card {
  background: var(--panel-strong);
  border: 1px solid rgba(11, 107, 83, 0.12);
  border-radius: 20px;
  padding: 18px;
}

.manual-train-picker {
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
}

.selector-note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.selection-kicker,
.station-label-text {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.train-line {
  font-weight: 700;
  font-size: 1.08rem;
  margin-top: 8px;
}

.train-speed,
.train-route {
  margin-top: 10px;
  font-weight: 700;
  font-size: 1rem;
}

.train-route {
  color: var(--text);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-soft), transparent);
  margin: 14px 0;
}

.station-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.station-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 8px 0;
}

.station-item.between {
  padding: 6px 0;
}

.station-timeline {
  position: relative;
  min-height: 100%;
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.station-timeline-rail {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffbb27, #f39c12);
}

.station-timeline-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin-top: 6px;
  border-radius: 50%;
  border: 3px solid #f39c12;
  background: #fffdf6;
  box-shadow: 0 0 0 2px rgba(255, 187, 39, 0.12);
}

.station-timeline-dot.is-filled {
  background: #f39c12;
}

.station-item-main {
  display: grid;
  gap: 10px;
}

.station-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.station-name {
  font-weight: 700;
  margin-top: 4px;
}

.station-meta {
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

.station-item.current .station-name {
  color: var(--line);
}

.station-item.current .station-meta {
  color: var(--line);
}

.station-item-subline {
  color: var(--warn);
  font-size: 0.92rem;
  font-weight: 700;
}

.station-between {
  display: grid;
  gap: 2px;
  padding: 12px 0 12px 2px;
  min-height: 74px;
  align-content: center;
}

.station-between-label {
  color: var(--warn);
  font-weight: 700;
  font-size: 0.96rem;
}

.station-between-meta {
  color: var(--warn);
  font-size: 0.92rem;
}

.station-item.current .station-name,
.station-item.current .station-meta {
  color: var(--line);
}

.eta-block {
  align-items: flex-end;
}

.map-eta-block .eta-label {
  color: var(--muted);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  margin: 0;
}

.telemetry-grid dt {
  font-size: 0.78rem;
  color: var(--muted);
}

.telemetry-grid dd {
  margin: 4px 0 0;
  font-weight: 700;
}

#map {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  overflow: hidden;
  border: 0;
}

.hint-text {
  color: var(--muted);
}

.timetable-layout {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.timetable-controls-header { align-items: flex-start; }
.timetable-controls-header h2, .timetable-panel h2 { margin: 3px 0 0; }
.timetable-count, .timetable-list-note { color: var(--muted); font-size: .8rem; }
.timetable-count { padding: 7px 10px; border-radius: 999px; background: rgba(11, 107, 83, .09); color: var(--line); font-weight: 800; }
.timetable-control-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, .55fr); gap: 16px; align-items: end; margin-top: 14px; }
.timetable-filter-group, .station-filter { display: grid; gap: 7px; }
.timetable-control-label, .station-filter > span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.station-filter input { width: 100%; min-height: 42px; border: 1px solid rgba(11, 107, 83, .18); border-radius: 12px; background: rgba(255, 255, 255, .8); color: var(--text); padding: 9px 12px; font: inherit; }
.station-filter input::placeholder { color: #82968f; }
.station-filter input:focus { border-color: var(--line); }

.timetable-hero {
  background:
    linear-gradient(135deg, rgba(31, 58, 95, 0.94), rgba(11, 107, 83, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.route-search { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.route-search-fields { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); flex: 1 1 620px; gap: 10px; }
.route-search label { display: grid; gap: 5px; font-size: .8rem; color: var(--muted); }
.route-search input { min-width: 0; border: 1px solid rgba(11, 107, 83, .14); border-radius: 12px; background: rgba(255,255,255,.82); color: var(--text); padding: 10px 12px; }
.route-result { margin-bottom: 16px; }
.route-loading { padding: 16px; border: 1px solid rgba(11, 107, 83, .14); border-radius: 16px; background: rgba(255,255,255,.7); }
.route-loading-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--text); font-size: .9rem; }
.route-loading-heading span { color: var(--line, #0b6b53); font-variant-numeric: tabular-nums; font-weight: 800; }
.route-progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(11, 107, 83, .12); }
.route-progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--line, #0b6b53), #4bbf91); transition: width .35s ease; }
.route-result-list { display: grid; gap: 12px; }
.route-option-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: .78rem; }
.route-option-badge { padding: 5px 9px; border-radius: 999px; background: rgba(11, 107, 83, .12); color: #0b6b53; font-weight: 800; }
.route-message { margin: 0; padding: 12px 14px; border-radius: 14px; background: rgba(181, 78, 61, .1); color: #793126; }
.route-result-card { padding: 14px; border: 1px solid rgba(11, 107, 83, .14); border-radius: 18px; background: rgba(255,255,255,.7); }
.route-result-summary { display: flex; gap: 22px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid rgba(11, 107, 83, .1); }
.route-result-summary div { display: grid; gap: 2px; }.route-result-summary span { color: var(--muted); font-size: .78rem; }.route-result-summary strong { font-size: 1.05rem; }
.route-itinerary { display: grid; gap: 10px; list-style: none; margin: 14px 0 0; padding: 0; }.route-itinerary li { display: grid; grid-template-columns: minmax(75px, .8fr) minmax(130px, 1.4fr) minmax(75px, .8fr); gap: 10px; align-items: center; }.route-time { display: grid; gap: 2px; }.route-time span, .route-ride span { font-size: .82rem; color: var(--muted); }.route-ride { border-left: 4px solid var(--route-color); padding-left: 10px; display: grid; gap: 2px; }.route-transfer { grid-column: 1 / -1; margin: 0; font-size: .84rem; color: var(--muted); }

.filter-button {
  border: 1px solid rgba(11, 107, 83, 0.18);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.9);
  color: var(--text);
  min-height: 42px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.filter-button.is-active {
  background: var(--line);
  color: #fff;
}

.timetable-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.trip-card {
  background: var(--panel-strong);
  border: 1px solid rgba(11, 107, 83, 0.12);
  border-radius: 20px;
  padding: 16px;
}

.station-card {
  background: var(--panel-strong);
  border: 1px solid rgba(11, 107, 83, 0.12);
  border-radius: 20px;
  padding: 17px;
  box-shadow: 0 5px 16px rgba(24, 49, 43, .05);
}

.trip-topline,
.trip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.trip-title {
  margin: 0;
  font-weight: 700;
  font-size: 1.13rem;
}

.trip-badge {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(11, 107, 83, 0.1);
  color: var(--line);
  font-size: 0.85rem;
  font-weight: 700;
}

.trip-meta { margin-top: 9px; color: var(--muted); font-size: .8rem; }
.timetable-direction-summary { font-weight: 700; }
.timetable-source { padding: 4px 7px; border-radius: 6px; background: rgba(11,107,83,.08); color: var(--line); font-size: .72rem; font-weight: 700; }

@media (max-width: 720px) {
  .map-side-panel,
  .map-side-panel.is-collapsed {
    width: min(100vw - 24px, 380px);
    left: 12px;
    top: max(12px, env(safe-area-inset-top));
    height: calc(100vh - 24px);
    max-height: calc(100vh - max(24px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 16px));
  }

  .map-side-overview {
    grid-template-columns: 1fr;
  }

  .map-float-topline,
  .map-train-stop-topline,
  .map-station-line-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-detail-grid {
    grid-template-columns: 1fr;
  }

  .map-detail-body {
    max-height: min(44vh, 360px);
  }

  .map-schedule {
    max-height: min(26vh, 240px);
  }
}

.stop-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.stop-table th,
.stop-table td {
  text-align: left;
  padding: 10px 0;
  border-bottom: 1px solid rgba(11, 107, 83, 0.08);
}

.stop-table th {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
}

.stop-table tr:last-child td {
  border-bottom: 0;
}

.timetable-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.timetable-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 11px 13px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(11, 107, 83, 0.1);
}

.timetable-link-main { display: grid; gap: 3px; min-width: 0; }
.timetable-link-main strong { font-size: .91rem; line-height: 1.35; }
.timetable-link-main small { color: var(--muted); font-size: .73rem; }
.timetable-pdf, .timetable-time-range { flex: 0 0 auto; text-align: right; font-size: .78rem; font-weight: 800; }
.timetable-pdf { color: var(--line); }
.timetable-time-range { max-width: 52%; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.4; }
.timetable-empty { grid-column: 1 / -1; display: grid; gap: 5px; padding: 30px 20px; border: 1px dashed rgba(11,107,83,.28); border-radius: 16px; text-align: center; color: var(--muted); }
.timetable-empty strong { color: var(--text); }

.timetable-link:hover {
  border-color: rgba(11, 107, 83, 0.28);
  background: rgba(236, 248, 244, 0.92);
}

.status-good {
  background: rgba(255, 255, 255, 0.16);
}

.status-warn {
  background: rgba(217, 122, 39, 0.18);
}

.status-danger {
  background: rgba(181, 78, 61, 0.2);
}

@media (max-width: 860px) {
  .timetable-control-grid { grid-template-columns: 1fr; }
  .timetable-list { grid-template-columns: 1fr; }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .train-shell {
    justify-content: flex-start;
  }

  .train-content-grid {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .map-panel {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding-inline: 12px;
  }

  .hero-card,
  .panel {
    border-radius: 22px;
  }

  .telemetry-grid {
    grid-template-columns: 1fr;
  }

  .hero-meta,
  .panel-header,
  .eta-block,
  .trip-topline,
  .trip-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-float-card {
    width: calc(100vw - 24px);
    left: 12px;
    top: 12px;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .ride-settings {
    grid-template-columns: 1fr;
  }

  .route-search-fields { grid-template-columns: 1fr; flex-basis: 100%; }
  .route-search .action-button { width: 100%; }
  .route-itinerary li { grid-template-columns: 1fr 1fr; }.route-ride { grid-column: 1 / -1; grid-row: 2; }.route-transfer { grid-column: 1 / -1; }

  .map-float-topline {
    flex-direction: column;
  }

  .map-side-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-side-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .map-side-summary-meta {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .map-side-summary-divider {
    display: none;
  }

  .map-legend-floating {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

/* Ride tracker: a scrollable, mobile-first trip view rather than a map overlay. */
body.ride-page { overflow-x: hidden; background: linear-gradient(180deg, #edf6f3 0%, #f7f3e9 48%, #edf5ef 100%); }
.ride-shell { width: min(720px, 100%); padding: max(14px, env(safe-area-inset-top)) 14px max(30px, env(safe-area-inset-bottom)); }
.ride-main { display: grid; gap: 14px; margin-top: 14px; }
.ride-status-card, .arrival-card, .ride-map-card, .timeline-card, .candidate-card, .telemetry-details { border: 1px solid rgba(11,107,83,.12); box-shadow: 0 12px 30px rgba(24,49,43,.09); }
.ride-status-card { padding: 18px; border-radius: 26px; background: linear-gradient(135deg, #075f4c, #0f556e); color: #f8fffb; }
.ride-topline, .section-heading, .arrival-grid { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.ride-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.ride-status-card .eyebrow { color: rgba(248,255,251,.72); }
.ride-status-card .status-pill { display: inline-block; margin-top: 6px; padding: 5px 9px; font-size: .72rem; }
.ride-status-card .action-button { border: 0; border-radius: 999px; padding: 9px 12px; background: rgba(255,255,255,.17); color: #fff; font-weight: 700; cursor: pointer; }
.ride-status-card .action-button-secondary { background: rgba(255,255,255,.1); }
.ride-kicker { margin: 22px 0 5px; color: #aee8d4; font-size: .76rem; font-weight: 800; letter-spacing: .09em; }
.ride-status-card h1 { margin: 0; font-size: clamp(1.45rem, 7vw, 2rem); line-height: 1.25; }
.ride-subtitle { margin: 8px 0 0; color: rgba(248,255,251,.8); line-height: 1.55; font-size: .9rem; }
.ride-route-chip { display: inline-flex; margin-top: 16px; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.12); font-size: .88rem; font-weight: 800; }
.ride-section { margin: 10px 0 0; color: #fff; font-size: 1rem; font-weight: 700; }
.arrival-card, .ride-map-card, .timeline-card, .candidate-card { padding: 17px; border-radius: 22px; background: rgba(255,253,247,.92); }
.section-heading h2 { margin: 3px 0 0; font-size: 1.12rem; }
.estimate-note, .line-name { align-self: center; padding: 5px 8px; border-radius: 999px; background: rgba(11,107,83,.09); color: var(--line); font-size: .68rem; font-weight: 800; text-align: right; }
.arrival-primary { display: grid; gap: 4px; margin-top: 18px; padding: 15px; border-radius: 18px; background: linear-gradient(135deg, rgba(11,107,83,.12), rgba(15,94,120,.08)); }
.arrival-primary strong { color: var(--line); font-size: 1.65rem; line-height: 1.2; }
.arrival-label, .arrival-grid span, .arrival-eta, .ride-summary { color: var(--muted); font-size: .8rem; }
.arrival-eta { font-weight: 700; }
.arrival-grid { margin-top: 12px; }
.arrival-grid > div { display: grid; flex: 1; gap: 4px; padding: 10px 2px; }
.arrival-grid strong { font-size: .98rem; }
.ride-summary { margin: 12px 0 0; line-height: 1.5; }
.ride-map-card #map { position: relative; inset: auto; width: 100%; height: 220px; margin-top: 13px; border: 1px solid rgba(11,107,83,.12); border-radius: 16px; z-index: 0; }
.ride-map-card .map-caption { margin: 0; max-width: 45%; color: var(--muted); font-size: .72rem; text-align: right; }
.selected-train-tooltip { border: 0; border-radius: 9px; padding: 5px 7px; background: #b54e3d; color: #fff; box-shadow: 0 4px 12px rgba(91,39,31,.22); font-size: .7rem; font-weight: 800; text-align: center; }
.selected-train-tooltip::before { border-top-color: #b54e3d; }
.ride-timeline { position: relative; display: grid; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; }
.ride-timeline::before { content: ""; position: absolute; top: 16px; bottom: 16px; left: 8px; width: 2px; background: rgba(11,107,83,.16); }
.ride-stop { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 51px; }
.ride-stop-dot { position: relative; z-index: 1; width: 12px; height: 12px; border: 3px solid #fffdf7; border-radius: 50%; background: #b6c8c0; box-shadow: 0 0 0 1px rgba(11,107,83,.18); }
.ride-stop > div { display: grid; gap: 2px; min-width: 0; }
.ride-stop strong { font-size: .94rem; }
.ride-stop-state, .ride-stop time { color: var(--muted); font-size: .71rem; }
.ride-stop.is-past { opacity: .55; }
.ride-stop.is-current .ride-stop-dot { background: #0b6b53; box-shadow: 0 0 0 5px rgba(11,107,83,.14); }
.ride-stop.is-current strong, .ride-stop.is-current .ride-stop-state { color: #0b6b53; }
.ride-current-segment { grid-column: 2 / -1; display: flex !important; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 9px; padding: 8px 10px; border-radius: 10px; background: rgba(11,107,83,.09); color: var(--line); font-size: .74rem; }
.ride-current-segment strong { font-size: .72rem; white-space: nowrap; }
.candidate-card[hidden] { display: none; }
.candidate-card .selector-note { margin: 8px 0 12px; }
.floating-select { display: grid; gap: 5px; color: var(--muted); font-size: .76rem; font-weight: 700; }
.floating-select select { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid rgba(11,107,83,.2); border-radius: 12px; background: #fffdf8; color: var(--text); }
.telemetry-details { padding: 14px 16px; border-radius: 18px; background: rgba(255,253,247,.72); color: var(--text); }
.telemetry-details summary { cursor: pointer; font-weight: 800; }
.telemetry-details .telemetry-grid { margin-top: 14px; }
@media (min-width: 680px) { .ride-main { grid-template-columns: 1fr 1fr; } .ride-status-card, .timeline-card, .telemetry-details { grid-column: 1 / -1; } .ride-map-card #map { height: 270px; } }

/* Transfer search: compact blue-and-white rail search layout. */
body:has(.transfer-search-panel) {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 30%), linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  color: var(--text);
}
body:has(.transfer-search-panel) .app-shell { width: min(980px, 100%); padding-top: 0; }
.transfer-hero {
  margin-inline: -16px;
  border-radius: 0 0 18px 18px;
  padding: 18px max(20px, calc((100% - 948px) / 2));
  background: linear-gradient(135deg, rgba(11, 107, 83, 0.92), rgba(52, 121, 92, 0.88));
  box-shadow: var(--shadow);
}
.transfer-hero h1 { margin-top: 22px; font-size: clamp(1.65rem, 4vw, 2.3rem); }
.transfer-hero .hero-subtitle { color: rgba(255,255,255,.84); font-size: .9rem; }
.transfer-search-panel { margin-top: 18px; padding: 0; border-radius: 10px; background: var(--panel-strong); box-shadow: var(--shadow); }
.transfer-tabs { display: flex; border-bottom: 1px solid var(--line-soft); padding: 0 20px; }
.transfer-tab { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); text-decoration: none; font-weight: 700; cursor: pointer; }
.transfer-tab.is-active { border-color: var(--line); color: var(--line); }
.transfer-panel-heading { padding: 22px 24px 12px; }
.section-kicker { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .12em; }
.transfer-panel-heading h2 { margin-top: 4px; font-size: 1.18rem; }
.search-help { color: var(--muted); font-size: .76rem; }
.route-search { align-items: stretch; gap: 14px; padding: 0 24px 22px; margin-bottom: 0; }
.route-search-fields { position: relative; display: grid; grid-template-columns: 1fr 38px 1fr; align-items: end; gap: 10px; flex: 1 1 440px; }
.route-search label { color: #52616d; font-size: .76rem; font-weight: 700; }
.station-field { gap: 7px !important; }
.station-field input { min-height: 50px; border: 1px solid rgba(11, 107, 83, .18); border-radius: 5px; padding: 10px 13px; background: rgba(255,255,255,.82); color: var(--text); font-size: 1rem; }
.station-field input:focus, .route-search-options input:focus { outline: 2px solid rgba(11,107,83,.2); border-color: var(--line); }
.swap-stations { align-self: end; width: 38px; height: 38px; margin-bottom: 6px; border: 1px solid rgba(11,107,83,.18); border-radius: 50%; background: var(--panel-strong); color: var(--line); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.swap-stations:hover { background: var(--line-soft); }
.route-search-options { display: flex; align-items: end; gap: 10px; flex: 0 1 260px; }
.route-search-options label { display: grid; gap: 7px; width: 100%; }
.route-search-options input { min-height: 50px; min-width: 0; border: 1px solid rgba(11,107,83,.18); border-radius: 5px; padding: 10px; color: var(--text); background: rgba(255,255,255,.82); }
.route-option-note { display: none; }
.transfer-submit { align-self: end; display: grid; min-width: 130px; min-height: 50px; padding: 7px 17px; border: 0; border-radius: 5px; background: var(--line); color: #fff; cursor: pointer; }
.transfer-submit:hover { background: #075640; }
.transfer-submit small { font-size: .67rem; opacity: .82; }
.transfer-search-panel .route-result, .transfer-search-panel #timetable-summary { margin-inline: 24px; }
.transfer-search-panel #timetable-summary { padding-bottom: 20px; }
.route-result-card { border: 1px solid rgba(11,107,83,.14); border-radius: 6px; background: rgba(255,255,255,.7); box-shadow: 0 2px 8px rgba(24,55,80,.05); }
.route-option-badge { border-radius: 3px; background: rgba(11,107,83,.12); color: var(--line); }
.route-result-summary strong { color: var(--line); }
.route-ride { border-left-width: 4px; }
@media (max-width: 700px) {
  .transfer-hero { margin-inline: -16px; padding-inline: 20px; }
  .transfer-panel-heading { align-items: flex-start; flex-direction: column; }
  .route-search { display: grid; }
  .route-search-options { max-width: none; }
  .transfer-submit { width: 100%; }
}

/* Keep the home page search form unchanged. */
body:has(.home-route-search) .route-search {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 0;
}
body:has(.home-route-search) .route-search-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  flex: 1 1 620px;
  gap: 10px;
}
body:has(.home-route-search) .route-search label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 400;
}
body:has(.home-route-search) .route-search input {
  min-height: 0;
  border: 1px solid rgba(11, 107, 83, .14);
  border-radius: 12px;
  background: rgba(255,255,255,.82);
  color: var(--text);
  padding: 10px 12px;
  font-size: inherit;
}

/* Search-result train links and scheduled train detail page. */
.route-ride-link {
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
  transition: background .18s ease, box-shadow .18s ease;
}
.route-ride-link small { color: var(--route-color); font-size: .7rem; font-weight: 800; }
.route-ride-link:hover { background: color-mix(in srgb, var(--route-color) 9%, transparent); }
.route-ride-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--route-color) 35%, transparent); outline-offset: 3px; }

.train-detail-page { --detail-line-color: var(--line, #0b6b53); }
.train-detail-shell { max-width: 920px; }
.train-detail-hero { border-bottom: 5px solid var(--detail-line-color); }
.train-detail-line { margin: 14px 0 5px; color: var(--detail-line-color); font-weight: 800; }
.train-detail-main { display: grid; gap: 16px; margin-top: 18px; }
.train-detail-loading, .train-detail-error { padding: 24px; }
.train-detail-error { display: grid; justify-items: start; gap: 16px; }
.train-detail-error p { margin: 0; color: #793126; }
.train-detail-summary { display: grid; gap: 16px; padding: 20px; }
.train-detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.train-detail-stats > div { display: grid; gap: 3px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.72); }
.train-detail-stats span, .train-detail-stats small, .train-detail-selection span, .train-detail-selection small { color: var(--muted); font-size: .76rem; }
.train-detail-stats strong { color: var(--detail-line-color); font-size: 1.2rem; }
.train-detail-selection { display: grid; gap: 4px; padding: 16px; border-left: 5px solid var(--detail-line-color); border-radius: 8px; background: color-mix(in srgb, var(--detail-line-color) 9%, white); }
.train-detail-selection strong { font-size: 1.05rem; }
.train-detail-stops { padding: 20px; }
.train-detail-timeline { position: relative; display: grid; margin: 18px 0 0; padding: 0; list-style: none; }
.train-detail-timeline::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 85px; width: 3px; background: rgba(82,97,109,.2); }
.train-detail-stop { position: relative; display: grid; grid-template-columns: 66px 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 50px; padding: 7px 10px; border-radius: 9px; }
.train-detail-stop time { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.train-detail-stop strong { font-size: .95rem; }
.train-detail-dot { z-index: 1; width: 13px; height: 13px; border: 3px solid #fff; border-radius: 50%; background: #a9b7b3; box-shadow: 0 0 0 1px rgba(82,97,109,.25); }
.train-detail-stop.is-selected { background: color-mix(in srgb, var(--detail-line-color) 8%, transparent); }
.train-detail-stop.is-selected .train-detail-dot { background: var(--detail-line-color); }
.train-detail-stop.is-boarding, .train-detail-stop.is-alighting { background: color-mix(in srgb, var(--detail-line-color) 14%, white); }
.train-detail-stop.is-boarding strong, .train-detail-stop.is-alighting strong { color: var(--detail-line-color); }
.train-detail-marker { padding: 4px 7px; border-radius: 999px; background: var(--detail-line-color); color: #fff; font-size: .68rem; font-weight: 800; }

@media (max-width: 620px) {
  .train-detail-stats { grid-template-columns: 1fr; }
  .train-detail-stats > div { grid-template-columns: 70px 1fr auto; align-items: baseline; }
  .train-detail-timeline::before { left: 70px; }
  .train-detail-stop { grid-template-columns: 52px 18px minmax(0, 1fr) auto; gap: 8px; padding-inline: 4px; }
  .train-detail-stop time { font-size: .78rem; }
}
body:has(.home-route-search) .route-search .action-button {
  width: auto;
}

/* Home dashboard */
.home-page { background: #f1f0e9; color: #17312b; }
.home-shell { width: min(1240px, 100%); margin: auto; padding: 0 28px 34px; }
.home-header { min-height: 86px; display: flex; align-items: center; gap: 34px; border-bottom: 1px solid rgba(23,49,43,.13); }
.home-brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #123d34; color: #fff; font: 800 .76rem var(--font-display); }
.home-brand > span:last-child { display: grid; line-height: 1; }.home-brand strong { font: 800 1.05rem var(--font-display); }.home-brand small { margin-top: 5px; color: #71827c; font-size: .56rem; letter-spacing: .22em; }
.home-nav { display: flex; gap: 28px; }.home-nav a { color: #52675f; font-size: .84rem; font-weight: 700; text-decoration: none; }.home-nav a:hover { color: #0b6b53; }
.header-tracker { padding: 11px 15px; border: 1px solid #123d34; color: #123d34; font-size: .78rem; font-weight: 800; text-decoration: none; }.header-tracker span { margin-left: 8px; }
.home-hero { display: grid; grid-template-columns: 1.45fr .75fr; gap: 52px; align-items: end; min-height: 430px; padding: 70px 3% 60px; }
.home-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 21px; color: #668078; font-size: .68rem; font-weight: 800; letter-spacing: .18em; }.home-kicker span { width: 34px; height: 2px; background: #d17635; }
.hero-copy h1 { margin: 0; color: #16362e; font-size: clamp(3rem, 7vw, 6.4rem); font-weight: 700; line-height: .95; letter-spacing: -.06em; }.hero-copy h1 em { color: #cf7135; font-style: normal; }
.hero-copy > p:not(.home-kicker) { max-width: 580px; margin: 28px 0 0; color: #5b6f68; font-size: 1rem; line-height: 1.9; }.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }.hero-chips span { padding: 7px 10px; border: 1px solid #cbd3ce; border-radius: 2px; color: #546861; font-size: .68rem; font-weight: 700; }
.service-board { padding: 24px; background: #123d34; color: white; box-shadow: 16px 16px 0 #dfddd2; }.board-top { display: flex; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.16); color: #b9cdc6; font-size: .72rem; font-weight: 800; letter-spacing: .08em; }.board-top span:last-child { color: white; font-size: 1rem; font-variant-numeric: tabular-nums; }
.service-status { display: flex; align-items: center; gap: 14px; margin-top: 22px; }.service-status i { width: 10px; height: 10px; border-radius: 50%; background: #79d4a5; box-shadow: 0 0 0 5px rgba(121,212,165,.12); }.service-status div { display: grid; gap: 4px; }.service-status small { color: #b9cdc6; font-size: .68rem; }.service-status strong { font-size: 1rem; }.service-board p { margin: 18px 0; color: #b9cdc6; font-size: .7rem; line-height: 1.7; }.service-board > a { display: flex; justify-content: space-between; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.16); color: white; font-size: .75rem; font-weight: 800; text-decoration: none; }
.home-search-card { padding: 27px 30px 22px; background: #fff; border-top: 4px solid #cf7135; box-shadow: 0 12px 38px rgba(24,49,43,.08); }.search-heading,.home-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }.search-heading span,.home-section-head > div > span { color: #cf7135; font-size: .61rem; font-weight: 900; letter-spacing: .16em; }.search-heading h2,.home-section-head h2 { margin-top: 5px; font-size: 1.3rem; }.search-heading p,.home-section-head > p { margin: 0; color: #71827c; font-size: .72rem; }
.home-page .home-route-search { align-items: stretch !important; margin: 20px 0 0 !important; }.home-page .home-route-search .route-search-fields { grid-template-columns: 1fr 38px 1fr 1fr !important; align-items: end; flex-basis: 720px; }.home-page .home-route-search label { gap: 7px; font-weight: 700; }.home-page .home-route-search input { min-height: 52px !important; border-radius: 2px !important; background: #f7f7f3 !important; font-size: .94rem !important; }.home-swap { width: 38px; height: 38px; margin-bottom: 7px; border: 0; border-radius: 50%; background: #e9efeb; color: #0b6b53; cursor: pointer; }.home-search-button { display: flex; align-items: center; justify-content: space-between; min-width: 160px; padding: 0 18px; border: 0; border-radius: 2px; background: #cf7135; color: white; font-weight: 800; cursor: pointer; }.home-search-button b { font-size: 1.2rem; }.quick-routes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; }.quick-routes span { color: #71827c; font-size: .65rem; }.quick-routes button { padding: 5px 9px; border: 1px solid #dde2df; background: white; color: #52675f; font-size: .65rem; cursor: pointer; }
.home-dashboard { display: grid; grid-template-columns: 1.65fr .75fr; gap: 22px; margin-top: 24px; }.weekday-board,.feature-panel,.network-section { padding: 28px 30px; background: rgba(255,255,255,.74); border: 1px solid #dedfd8; }.home-section-head a { color: #0b6b53; font-size: .72rem; font-weight: 800; text-decoration: none; }
.today-card { display: grid; grid-template-columns: 130px minmax(260px,1.3fr) minmax(390px,1fr); align-items: stretch; margin-top: 22px; background: #e7e6dc; border: 1px solid #d8d8cf; }
.today-date-block { display: grid; place-items: center; align-content: center; padding: 24px; background: #cf7135; color: #fff; }.today-date-block span,.today-date-block small { font-size: .62rem; font-weight: 900; letter-spacing: .18em; }.today-date-block strong { font: 700 3.3rem/1 var(--font-display); margin: 7px 0; }
.today-main { padding: 24px 28px; border-right: 1px solid #d2d4cc; }.today-label { color: #8a6a52; font-size: .58rem; font-weight: 900; letter-spacing: .16em; }.today-main h2 { margin-top: 5px; font-size: .9rem; color: #697b74; }.today-main > strong { display: block; margin-top: 14px; font-size: 1.22rem; }.today-main p { max-width: 610px; margin: 8px 0 0; color: #61736c; font-size: .72rem; line-height: 1.75; }
.today-facts { display: grid; grid-template-columns: repeat(3,1fr); padding: 19px 10px; }.today-facts > div { display: grid; align-content: center; gap: 5px; padding: 8px 15px; border-right: 1px solid #ced2cc; }.today-facts > div:last-child { border: 0; }.today-facts small { color: #8a9893; font-size: .52rem; font-weight: 900; letter-spacing: .1em; }.today-facts strong { font-size: .76rem; }.today-facts span { color: #75857f; font-size: .59rem; }
.departure-tabs { display: flex; gap: 3px; margin-top: 20px; border-bottom: 1px solid #dce1de; }.departure-tabs button { padding: 9px 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #71827c; font-size: .7rem; font-weight: 800; cursor: pointer; }.departure-tabs button.is-active { border-color: #cf7135; color: #17312b; }
.departure-list { min-height: 320px; }.departure-row { display: grid; grid-template-columns: 64px 5px 1.2fr 1fr 46px; align-items: center; gap: 14px; min-height: 58px; border-bottom: 1px solid #e1e4e1; color: inherit; text-decoration: none; }.departure-row time { font-size: 1.08rem; font-weight: 800; font-variant-numeric: tabular-nums; }.departure-row > i { width: 5px; height: 26px; background: var(--train-color); }.departure-line,.departure-destination { display: grid; gap: 2px; font-size: .8rem; font-weight: 800; }.departure-row small { color: #7c8b86; font-size: .62rem; font-weight: 500; }.departure-row > b { color: #779087; font-size: .62rem; text-align: right; }.departure-row:first-child > b { padding: 4px; background: #cf7135; color: white; text-align: center; }.departure-loading { padding: 30px 0; color: #71827c; }.board-note { margin: 13px 0 0; color: #84918c; font-size: .61rem; line-height: 1.6; }
.feature-links { display: grid; margin-top: 18px; }.feature-links a { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 18px 2px; border-bottom: 1px solid #dde2df; color: inherit; text-decoration: none; }.feature-links a:last-child { border: 0; }.feature-icon { display: grid; place-items: center; width: 34px; height: 34px; background: #e6eee9; color: #0b6b53; font-style: normal; font-weight: 900; }.feature-links span { display: grid; gap: 4px; }.feature-links strong { font-size: .82rem; }.feature-links small { color: #7c8b86; font-size: .63rem; }.feature-links b { color: #8a9a94; }
.network-section { margin-top: 22px; }.line-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 20px; }.line-cards a { position: relative; display: grid; grid-template-columns: 6px 1fr; column-gap: 12px; min-height: 84px; padding: 17px; border: 1px solid #e0e2dd; background: #fff; color: inherit; text-decoration: none; }.line-cards i { grid-row: 1 / 3; width: 6px; height: 100%; background: var(--lc); }.line-cards strong { font-size: .82rem; }.line-cards span { color: #75857f; font-size: .66rem; }.line-cards a:hover { border-color: var(--lc); }
.home-footer { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; margin-top: 22px; padding: 22px 4px; border-top: 1px solid #d6dad6; color: #778780; font-size: .62rem; }.home-footer span { color: #17312b; font-weight: 900; }.home-footer p { margin: 0; }.home-footer a { color: #52675f; }
@media (max-width: 860px) { .home-shell { padding-inline: 16px; }.home-nav { display: none; }.home-hero { grid-template-columns: 1fr; gap: 36px; padding: 54px 2% 44px; }.service-board { max-width: 460px; }.today-card { grid-template-columns: 110px 1fr; }.today-facts { grid-column: 1 / -1; border-top: 1px solid #d2d4cc; }.home-dashboard { grid-template-columns: 1fr; }.line-cards { grid-template-columns: repeat(2,1fr); }.home-page .home-route-search .route-search-fields { grid-template-columns: 1fr 38px 1fr !important; }.home-page .home-route-search label:last-child { grid-column: 1 / -1; }.home-search-button { min-height: 52px; } }
@media (max-width: 560px) { .home-header { min-height: 72px; }.header-tracker { padding: 9px; font-size: 0; }.header-tracker span { margin: 0; font-size: .9rem; }.hero-copy h1 { font-size: 3.5rem; }.home-hero { min-height: 0; padding-top: 44px; }.home-search-card,.weekday-board,.feature-panel,.network-section { padding: 22px 18px; }.search-heading p { display: none; }.today-card { grid-template-columns: 82px 1fr; }.today-date-block { padding: 14px 8px; }.today-date-block strong { font-size: 2.4rem; }.today-main { padding: 18px 16px; border: 0; }.today-main p { font-size: .68rem; }.today-facts { grid-template-columns: 1fr; padding: 8px 16px; }.today-facts > div { grid-template-columns: 1fr 1fr; padding: 10px 0; border-right: 0; border-bottom: 1px solid #ced2cc; }.today-facts span { text-align: right; }.home-page .home-route-search .route-search-fields { grid-template-columns: 1fr !important; }.home-swap { margin: -2px auto; transform: rotate(90deg); }.home-page .home-route-search label:last-child { grid-column: auto; }.home-search-button { width: 100%; }.departure-tabs { overflow-x: auto; }.departure-tabs button { white-space: nowrap; }.departure-row { grid-template-columns: 52px 4px 1fr 1fr; gap: 9px; }.departure-row > b { display: none; }.line-cards { grid-template-columns: 1fr; }.home-footer { grid-template-columns: 1fr; gap: 8px; } }
@media (max-width: 680px) {
  body:has(.home-route-search) .route-search-fields { grid-template-columns: 1fr; flex-basis: 100%; }
  body:has(.home-route-search) .route-search .action-button { width: 100%; }
}
