/* Shared native-style shell for every authenticated page and auth flow. */
:root {
  --ui-panel: rgba(23, 31, 42, .82);
  --ui-panel-raised: rgba(31, 41, 54, .9);
  --ui-line: rgba(190, 210, 231, .15);
  --ui-text: #f1f5fa;
  --ui-muted: #a5b4c7;
  --ui-dock: rgba(26, 35, 47, .78);
  --ui-blue: #64caff;
  --ui-suggestion-bg: #1f2936;
  --app-mobile-dock-clearance: calc(116px + env(safe-area-inset-bottom, 0px));
}
html[data-theme="light"] {
  --ui-panel: rgba(255, 255, 255, .78);
  --ui-panel-raised: rgba(255, 255, 255, .94);
  --ui-line: rgba(84, 105, 130, .16);
  --ui-text: #172337;
  --ui-muted: #5b6b80;
  --ui-dock: rgba(250, 252, 255, .8);
  --ui-blue: #007aff;
  --ui-suggestion-bg: #ffffff;
}
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] {
    --ui-panel: rgba(255, 255, 255, .78);
    --ui-panel-raised: rgba(255, 255, 255, .94);
    --ui-line: rgba(84, 105, 130, .16);
    --ui-text: #172337;
    --ui-muted: #5b6b80;
    --ui-dock: rgba(250, 252, 255, .8);
    --ui-blue: #007aff;
    --ui-suggestion-bg: #ffffff;
  }
}
html { scroll-padding-bottom: var(--app-mobile-dock-clearance); }
html body,
html body h1, html body h2, html body h3,
html body h4, html body h5, html body h6,
html body button, html body input, html body select, html body textarea {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}
html body {
  min-height: 100dvh;
  font-weight: 400;
  color: var(--ui-text);
}
html body h1, html body h2, html body h3,
html body h4, html body h5, html body h6 {
  letter-spacing: -.025em;
  color: var(--ui-text);
}
html body .app-page {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding-inline: clamp(14px, 2vw, 32px);
  padding-bottom: var(--app-mobile-dock-clearance);
}
html body .app-page-train { max-width: none; }
html body .app-page-shell { min-width: 0; }
html body .app-page-shell > .app-surface {
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
}
html body .app-page-shell > .app-surface::before { display: none; }
html body .app-surface,
html body .app-page .w3-card,
html body .app-page .w3-card-2,
html body .app-page .w3-card-4 {
  border: 1px solid var(--ui-line) !important;
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .12) !important;
}
html body .app-surface { background: var(--ui-panel) !important; }
html body .app-page-train #train.app-surface {
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}
html body .app-page .w3-white,
html body .app-page .w3-card.w3-white {
  background: var(--ui-panel) !important;
  color: var(--ui-text) !important;
}
html body .app-surface-header { border-bottom-color: var(--ui-line); }
html body .app-surface-title { color: var(--ui-text); }
html body .app-surface-subtitle { color: var(--ui-muted); }
html body .app-inline-form-label { color: var(--ui-muted); }
html body .w3-input,
html body .w3-select,
html body input[type="search"] {
  min-height: 48px;
  border: 1px solid var(--ui-line) !important;
  border-radius: 13px;
  background: var(--ui-panel-raised) !important;
  color: var(--ui-text) !important;
  font-size: 16px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
}
html body .w3-button,
html body .w3-btn { border-radius: 13px; }
html body .w3-button.w3-dark-grey,
html body .w3-btn.w3-dark-grey {
  background: var(--ui-blue) !important;
  color: #071420 !important;
  border: 1px solid rgba(255, 255, 255, .15) !important;
  font-weight: 700;
  min-height: 44px;
  box-shadow: 0 5px 14px rgba(0, 122, 255, .2);
}
html[data-theme="light"] body .w3-button.w3-dark-grey,
html[data-theme="light"] body .w3-btn.w3-dark-grey { color: #fff !important; }
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] body .w3-button.w3-dark-grey,
  html[data-theme="auto"] body .w3-btn.w3-dark-grey { color: #fff !important; }
}
html body a { -webkit-tap-highlight-color: transparent; }
html body :focus-visible {
  outline: 3px solid var(--ui-blue);
  outline-offset: 3px;
}

html body .app-mobile-dock {
  display: grid !important;
  left: 50%;
  right: auto;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 24px), 640px);
  transform: translateX(-50%);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--ui-line);
  border-radius: 25px;
  background: var(--ui-dock) !important;
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .22);
}
html body #myOverlay {
  z-index: 830 !important;
  background: rgba(5, 11, 18, .46);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
html body.app-dock-search-page .app-page #search { display: none !important; }
html body .app-mobile-dock-panel {
  grid-column: 1 / -1;
  min-width: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(22px) scale(.98);
  transform-origin: bottom center;
  transition: max-height .34s cubic-bezier(.2, .8, .2, 1),
    opacity .2s ease, transform .34s cubic-bezier(.2, .8, .2, 1), visibility .34s;
}
html body .app-mobile-dock.is-expanded .app-mobile-dock-panel {
  max-height: min(calc(100dvh - 110px - env(safe-area-inset-bottom, 0px)), 760px);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
html body .app-mobile-dock-panel-content {
  max-height: min(calc(100dvh - 110px - env(safe-area-inset-bottom, 0px)), 760px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px 10px 12px;
  scrollbar-width: thin;
}
html body .app-mobile-dock .app-sidebar,
html body .app-mobile-dock #search,
html body .app-mobile-dock .map-filters {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  opacity: 1 !important;
  overflow: visible !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html body .app-mobile-dock .app-sidebar-sheet-handle,
html body .app-mobile-dock .app-sidebar-header,
html body .app-mobile-dock .map-filter-header { display: none; }
html body .app-mobile-dock .app-sidebar .app-nav-link,
html body .app-mobile-dock .app-theme-toggle-sidebar {
  min-height: 40px;
  margin: 0 0 2px !important;
  padding: 6px 9px !important;
  font-size: 14px;
  border: 1px solid var(--ui-line) !important;
  border-radius: 13px;
  background: var(--ui-panel-raised) !important;
}
html body .app-mobile-dock .app-sidebar .app-nav-icon,
html body .app-mobile-dock .app-theme-toggle-icon { width: 28px; height: 28px; border-radius: 9px; }
html body .app-mobile-dock .app-sidebar-group-label { margin: 5px 8px 4px; }
html body .app-mobile-dock .app-sidebar-divider { margin: 5px 4px; }
html body .app-mobile-dock #search .app-surface-header { margin-top: 0; }
html body .app-mobile-dock .app-actions { margin-bottom: 2px; }
html body .app-dock-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 2px 2px 8px;
}
html body .app-dock-search-form label {
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 700;
}
html body .app-dock-search-form input:not([type="hidden"]),
html body .app-dock-search-form select { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
html body .app-dock-date-field {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  box-sizing: border-box;
  border: 1px solid var(--ui-line);
  border-radius: 13px;
  background: var(--ui-panel-raised);
  color: var(--ui-text);
  font-size: 16px;
}
html body .app-dock-date-field:focus-within { outline: 3px solid var(--ui-blue); outline-offset: 3px; }
html body .app-dock-date-field i { color: var(--ui-muted); }
html body .app-dock-date-field input[type="date"] {
  position: absolute;
  z-index: 1;
  inset: 0;
  inline-size: 100% !important;
  block-size: 100% !important;
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
  box-sizing: border-box !important;
  opacity: 0;
  cursor: pointer;
}
html body .app-dock-search-form button { margin-top: 8px; }
html body .app-dock-station-field { position: relative; min-width: 0; }
html body .app-dock-search-form .w3-input[type="search"] { border-radius: 13px; }
html body .app-dock-station-suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  max-height: min(25dvh, 145px);
  overflow-y: auto;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-suggestion-bg);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .2);
}
html body .app-dock-station-suggestions[hidden] { display: none; }
html body .app-dock-search-form .app-dock-station-suggestion { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: 0; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--ui-line); border-radius: 0; background: transparent; color: var(--ui-text); text-align: left; }
html body .app-dock-station-suggestion:last-child { border-bottom: 0; }
html body .app-dock-station-suggestion:hover,
html body .app-dock-station-suggestion:focus-visible { background: rgba(100, 202, 255, .15); }
html body .app-dock-station-suggestion small { color: var(--ui-muted); }
html body .app-mobile-dock-item {
  min-height: 60px;
  gap: 3px;
  border-radius: 18px;
  font-size: 12px;
  color: var(--ui-muted) !important;
}
html body .app-mobile-dock-icon {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 17px;
}
html body .app-mobile-dock-label { font-size: 10px; letter-spacing: 0; }
html body .app-mobile-dock-item.is-active {
  background: rgba(100, 202, 255, .17) !important;
  color: var(--ui-blue) !important;
  box-shadow: none;
}
html body .app-mobile-dock-item.is-active .app-mobile-dock-icon {
  background: transparent;
  border: 0;
}
html body .app-sidebar {
  background: var(--ui-panel-raised) !important;
  -webkit-backdrop-filter: blur(28px) saturate(155%);
  backdrop-filter: blur(28px) saturate(155%);
  border-color: var(--ui-line) !important;
}
html body .app-sidebar .app-nav-link,
html body .app-theme-toggle-sidebar {
  min-height: 48px;
  border: 0 !important;
  border-radius: 13px;
  background: transparent !important;
  box-shadow: none;
  color: var(--ui-text) !important;
}
html body .app-sidebar .app-nav-link.is-active {
  background: rgba(100, 202, 255, .15) !important;
  color: var(--ui-blue) !important;
}
html body .app-sidebar .app-nav-icon,
html body .app-theme-toggle-icon {
  background: rgba(100, 202, 255, .1) !important;
  border: 0 !important;
  color: var(--ui-blue);
}
html body .app-sidebar .app-nav-label { font-weight: 600; }
html body .app-sidebar-group-label,
html body .app-sidebar-kicker { color: var(--ui-muted); }
html body .app-sidebar-divider { background: var(--ui-line); }
html body .app-sidebar-close { color: var(--ui-text) !important; }
body .map-page { bottom: 0 !important; }
body .map-page .leaflet-bottom.leaflet-right,
body .map-page .leaflet-bottom.leaflet-left {
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

/* Train: one continuous page with a map and a compact timetable. */
html body .app-page-train { padding-inline: 0; }
html body .app-page-train .app-page-shell { min-height: 0; }
html body .app-page-train #train.app-surface { overflow: visible; }
html body .app-train-experience {
  display: block;
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}
html body .app-train-map-sheet--main {
  display: block;
  height: auto;
  min-height: 100dvh;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
}
html body .app-train-map-sheet--main .app-train-map-sheet-header {
  padding: 0;
  border-bottom: 1px solid var(--ui-line);
}
html body .app-train-map-summary-block .app-train-summary.app-surface {
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
}
html body .app-train-map-summary-block .app-train-summary-header { padding: 15px clamp(16px, 2vw, 32px); }
html body .app-train-map-summary-block .app-train-contact-list { padding-inline: clamp(16px, 2vw, 32px); }
html body .app-train-map-sheet-meta { padding-inline: clamp(16px, 2vw, 32px); }
html body .app-train-map-alternatives { padding-inline: clamp(16px, 2vw, 32px); gap: 6px; }
html body .app-train-map-alternative { min-width: 0; border-radius: 12px; padding: 7px 11px; }
html body .app-train-map-sheet--main .app-train-map-sheet-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(390px, .9fr);
  align-items: start;
  height: auto;
  max-height: none;
  min-height: calc(100dvh - 130px);
  overflow: visible;
}
html body .app-train-map-sheet--main .app-train-map-canvas {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  min-height: 520px;
}
html body .app-train-map-sheet--main .app-train-map-stops {
  min-height: 100dvh;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  padding: 12px clamp(16px, 2vw, 32px) 24px;
  border-left: 1px solid var(--ui-line);
}
html body .app-train-map-sheet--main.is-map-collapsed .app-train-map-sheet-body { grid-template-columns: 1fr; }
html body .app-train-map-sheet--main.is-map-collapsed .app-train-map-stops { max-width: 960px; width: 100%; margin-inline: auto; border-left: 0; }
html body .app-train-time-legend,
html body .app-train-time-row {
  display: grid;
  grid-template-columns: 35px repeat(2, minmax(0, 1fr));
  column-gap: 6px;
  align-items: baseline;
}
html body .app-train-time-legend {
  padding: 8px 0 11px;
  border-bottom: 1px solid var(--ui-line);
  color: var(--ui-muted);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
}
html body .app-train-map-stop {
  display: block;
  margin: 0;
  padding: 13px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--ui-line);
  border-radius: 0;
  background: transparent;
}
html body .app-train-map-stop.is-next-stop,
html body .app-train-map-stop.is-current,
html body .app-train-map-stop.is-latest-passed {
  margin: 0;
  padding: 13px 0 12px 10px;
  border: 0;
  border-bottom: 1px solid var(--ui-line);
  border-left: 3px solid var(--ui-blue);
  border-radius: 0;
  background: rgba(100, 202, 255, .06);
}
html body .app-train-map-stop.is-canceled { border-left: 3px solid #f87171; padding-left: 10px; }
html body .app-train-map-stop-heading { display: flex; align-items: baseline; gap: 8px; }
html body .app-train-map-stop-name { color: var(--ui-text); font-size: .95rem; font-weight: 650; }
html body .app-train-station-link { color: inherit; text-decoration: underline; text-decoration-color: var(--ui-blue); text-underline-offset: 3px; }
html body .app-train-station-link:hover,
html body .app-train-station-link:focus-visible { color: var(--ui-blue); }
html body .app-train-map-stop-meta { margin-top: 2px; color: var(--ui-muted); font-size: .72rem; }
html body .app-train-map-stop-time { display: block; margin-top: 7px; color: var(--ui-text); font-size: .82rem; font-weight: 600; }
html body .app-train-time-row + .app-train-time-row { margin-top: 2px; }
html body .app-train-time-kind { color: var(--ui-muted); font-size: .7rem; font-weight: 600; }
html body .app-train-time-value { min-width: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
html body .app-train-time-value.is-empty { color: var(--ui-muted); opacity: .45; }
html body .app-train-time-value.is-planned { color: var(--ui-text); }
html body .app-train-time-value.is-ontime { color: #67e8a3; }
html body .app-train-time-value.is-minor-delay { color: #fbbf24; }
html body .app-train-time-value.is-major-delay { color: #f87171; }
html body .app-train-time-value.is-unknown { color: var(--ui-muted); }
html body .app-train-time-value small { display: block; font-size: .67rem; line-height: 1.1; }
html body .app-train-map-stop-reason { margin-top: 7px; color: var(--ui-text); font-size: .76rem; line-height: 1.35; }
html body .app-train-map-stop-reason span { margin-right: 6px; color: var(--ui-muted); font-weight: 600; }

/* Auth pages share one layout and one set of controls. */
html body.app-auth-page { background: #0d1724 !important; }
html[data-theme="light"] body.app-auth-page { background: #eaf1f8 !important; }
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] body.app-auth-page { background: #eaf1f8 !important; }
}
html body .app-auth-screen.bg {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: max(28px, env(safe-area-inset-top, 0px)) 18px max(28px, env(safe-area-inset-bottom, 0px));
  background: radial-gradient(circle at 18% 15%, rgba(80, 160, 255, .24), transparent 36%),
              radial-gradient(circle at 88% 78%, rgba(104, 198, 255, .15), transparent 30%),
              linear-gradient(160deg, #13243a, #0d1724 70%) !important;
}
html[data-theme="light"] body .app-auth-screen.bg {
  background: radial-gradient(circle at 18% 15%, rgba(0, 122, 255, .16), transparent 36%),
              linear-gradient(160deg, #f5f9fd, #e5edf5) !important;
}
@media (prefers-color-scheme: light) {
  html[data-theme="auto"] body .app-auth-screen.bg {
    background: radial-gradient(circle at 18% 15%, rgba(0, 122, 255, .16), transparent 36%),
                linear-gradient(160deg, #f5f9fd, #e5edf5) !important;
  }
}
html body .app-auth-screen.bg::before { display: none; }
html body .app-auth-card.w3-card {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  margin: 0;
  padding: clamp(24px, 5vw, 36px);
  border: 1px solid var(--ui-line) !important;
  border-radius: 28px;
  background: var(--ui-panel) !important;
  color: var(--ui-text) !important;
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  backdrop-filter: blur(30px) saturate(150%);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .2) !important;
}
html body .app-auth-brand {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 15px;
  background: linear-gradient(145deg, #82d5ff, #007aff);
  color: #fff;
  font-size: 28px;
  font-weight: 750;
  box-shadow: 0 9px 24px rgba(0, 122, 255, .25);
}
html body .app-auth-card h1 { margin: 0 0 8px; font-size: clamp(27px, 5vw, 34px); }
html body .app-auth-description { margin: 0 0 24px; color: var(--ui-muted); line-height: 1.5; }
html body .app-auth-card .app-inline-form-label { display: block; margin: 16px 0 7px !important; }
html body .app-auth-card .w3-input { width: 100%; }
html body .app-auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 24px 0 0; }
html body .app-auth-actions .w3-button { min-width: 120px; }
html body .app-auth-link { color: var(--ui-blue); font-weight: 600; text-decoration: none; }
html body .app-auth-link:hover { text-decoration: underline; }
html body .app-auth-feedback { margin: 18px 0 0; padding: 12px 14px; border-radius: 13px; }
html body .app-auth-card .debug-link { word-break: break-all; }

@media (max-width: 600px) {
  html.app-standalone body {
    padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
    padding-bottom: 0;
  }
  html.app-standalone body::before {
    content: '';
    position: fixed;
    z-index: 849;
    inset: 0 0 auto;
    height: calc(env(safe-area-inset-top, 0px) + 12px);
    background: var(--app-bg);
    pointer-events: none;
  }
  html.app-standalone body.app-map-view .map-page { top: calc(env(safe-area-inset-top, 0px) + 12px); }
  html body .app-mobile-dock {
    width: 100%;
    bottom: var(--app-dock-viewport-bottom, 0px) !important;
    padding: 5px 5px max(6px, env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
  }
  html.app-standalone body.app-map-view .app-mobile-dock {
    bottom: calc(var(--app-dock-viewport-bottom, 0px) - var(--app-map-screen-gap, 0px)) !important;
    padding-bottom: calc(max(6px, env(safe-area-inset-bottom, 0px)) + var(--app-map-screen-gap, 0px));
  }
  html body .app-mobile-dock.is-expanded .app-mobile-dock-panel,
  html body .app-mobile-dock-panel-content {
    max-height: min(calc(var(--app-dock-visual-height, 100dvh) - 108px), 760px);
  }
  html body .app-mobile-dock-item { min-height: 58px; padding: 6px 1px; border-radius: 17px; }
  html body .app-mobile-dock-label { font-size: 9px; }
  html body .app-sidebar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
  html body .app-page { padding-inline: 10px; }
  html body .app-surface { padding: 18px 15px; border-radius: 20px; }
  html body .app-page .w3-card { border-radius: 18px; }
  html body .app-auth-screen.bg { align-items: center; padding-inline: 14px; }
  html body .app-auth-card.w3-card { padding: 26px 22px; border-radius: 24px; }
  html body.app-station-page .app-page { padding-inline: 0; padding-top: 0; }
  html body.app-station-page .app-station-surface { padding-inline: 0; }
  html body.app-station-page #station-results > br { display: none; }
  html body.app-station-page .app-station-board-header,
  html body.app-station-page .app-station-board-grid {
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
  }
  html body.app-station-page .app-station-board-header { margin-bottom: 8px; padding-block: 0 12px; }
  html body.app-station-page .app-station-board-header h3 { margin: 4px 0 8px; }
  html body.app-station-page .app-station-board-grid { padding-top: 0; }
  html body.app-station-page .app-station-section-heading { display: none; }
  html body.app-station-page .app-station-mobile-item,
  html body.app-station-page .app-station-mobile-item + .app-station-mobile-item {
    margin-top: 0;
    padding: 12px 2px;
    border: 0;
    border-bottom: 1px solid var(--ui-line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body .map-page .map-filters {
    max-height: calc(100% - var(--app-mobile-dock-clearance) - 68px);
  }
}
@media (max-width: 900px) {
  html body .app-page-train { padding-inline: 0 !important; overflow-x: clip; }
  html body .app-train-map-sheet--main .app-train-map-sheet-body { grid-template-columns: minmax(0, 1fr); }
  html body .app-train-map-sheet--main .app-train-map-canvas {
    position: relative;
    top: auto;
    width: 100%;
    height: clamp(300px, 42dvh, 500px);
    min-height: 0;
  }
  html body .app-train-map-sheet--main .app-train-map-stops {
    min-height: 0;
    max-height: none;
    overflow: visible;
    border-left: 0;
    border-top: 1px solid var(--ui-line);
  }
}
@media (max-width: 360px) {
  html body .app-mobile-dock-label { font-size: 8px; }
  html body .app-mobile-dock-icon { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html body *, html body *::before, html body *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Vy palette. Arial is the substitute specified in Vy's typography guide. */
html[data-theme="vy"] {
  --app-bg: #f2f2f3;
  --app-surface: #f2f2f3;
  --app-surface-alt: #e7ebe9;
  --app-border: #c7c9c7;
  --app-border-strong: #a7b7cd;
  --app-text: #212721;
  --app-text-muted: #383e42;
  --app-accent: #00957a;
  --app-accent-strong: #00685e;
  --app-accent-soft: rgba(0, 149, 122, .12);
  --ui-panel: #f2f2f3;
  --ui-panel-raised: #f2f2f3;
  --ui-line: #c7c9c7;
  --ui-text: #212721;
  --ui-muted: #383e42;
  --ui-dock: #383e42;
  --ui-blue: #00685e;
  --ui-suggestion-bg: #f2f2f3;
  background: #f2f2f3;
}
html[data-theme="vy"] body,
html[data-theme="vy"] body.w3-light-grey {
  background: linear-gradient(180deg, #f2f2f3, #e7ebe9) !important;
  color: #212721 !important;
}
html[data-theme="vy"] body,
html[data-theme="vy"] body h1, html[data-theme="vy"] body h2,
html[data-theme="vy"] body h3, html[data-theme="vy"] body h4,
html[data-theme="vy"] body h5, html[data-theme="vy"] body h6,
html[data-theme="vy"] body button, html[data-theme="vy"] body input,
html[data-theme="vy"] body select, html[data-theme="vy"] body textarea {
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: normal;
}
html[data-theme="vy"] body .app-surface,
html[data-theme="vy"] body .w3-white,
html[data-theme="vy"] body .w3-card,
html[data-theme="vy"] body .w3-card-2,
html[data-theme="vy"] body .w3-card-4,
html[data-theme="vy"] body .app-subnav {
  background-color: #f2f2f3 !important;
  background-image: none !important;
  border-color: #c7c9c7 !important;
  color: #212721 !important;
  box-shadow: 0 10px 28px rgba(33, 39, 33, .09) !important;
}
html[data-theme="vy"] body .app-page-shell > .app-surface,
html[data-theme="vy"] body .app-page-train #train.app-surface {
  background: transparent !important;
  box-shadow: none !important;
}
html[data-theme="vy"] body .app-mobile-dock {
  background: #383e42 !important;
  border-color: #00685e;
  box-shadow: 0 14px 36px rgba(33, 39, 33, .25);
}
html[data-theme="vy"] body .app-mobile-dock-item { color: #f2f2f3 !important; }
html[data-theme="vy"] body .app-mobile-dock-item.is-active {
  background: #00957a !important;
  color: #f2f2f3 !important;
}
html[data-theme="vy"] body .app-mobile-dock-item:hover,
html[data-theme="vy"] body .app-mobile-dock-item:focus-visible { background: rgba(0, 149, 122, .34) !important; }
html[data-theme="vy"] body .app-mobile-dock-item.is-active:hover,
html[data-theme="vy"] body .app-mobile-dock-item.is-active:focus-visible { background: #00957a !important; }
html[data-theme="vy"] body .app-mobile-dock-panel .app-dock-search-form label { color: #f2f2f3; }
html[data-theme="vy"] body .app-sidebar .app-nav-link,
html[data-theme="vy"] body .app-theme-toggle-sidebar,
html[data-theme="vy"] body .app-mobile-dock .app-sidebar .app-nav-link,
html[data-theme="vy"] body .app-mobile-dock .app-theme-toggle-sidebar {
  background: #f2f2f3 !important;
  color: #212721 !important;
  border-color: #c7c9c7 !important;
}
html[data-theme="vy"] body .app-sidebar .app-nav-icon,
html[data-theme="vy"] body .app-theme-toggle-icon { color: #00685e; background: rgba(0, 149, 122, .12) !important; }
html[data-theme="vy"] body .app-subnav .app-subnav-item { color: #383e42 !important; }
html[data-theme="vy"] body .app-subnav .app-subnav-item.is-active {
  background: #00685e !important;
  border-color: #00685e !important;
  color: #f2f2f3 !important;
  box-shadow: 0 6px 18px rgba(0, 104, 94, .2) !important;
}
html[data-theme="vy"] body .w3-input,
html[data-theme="vy"] body .w3-select,
html[data-theme="vy"] body input[type="search"] {
  background: #f2f2f3 !important;
  color: #212721 !important;
  border-color: #a7b7cd !important;
}
html[data-theme="vy"] body .w3-button.w3-dark-grey,
html[data-theme="vy"] body .w3-btn.w3-dark-grey {
  background: #00685e !important;
  color: #f2f2f3 !important;
  border-color: #00685e !important;
  box-shadow: 0 5px 14px rgba(0, 104, 94, .2);
}
html[data-theme="vy"] body .map-action-button { color: #f2f2f3; }
html[data-theme="vy"] body a,
html[data-theme="vy"] body .app-results-shell a { color: #00685e; }
html[data-theme="vy"] body a:hover,
html[data-theme="vy"] body .app-results-shell a:hover { color: #00957a; }
html[data-theme="vy"] body .app-surface-title,
html[data-theme="vy"] body .app-train-summary-title,
html[data-theme="vy"] body .app-train-contact-name,
html[data-theme="vy"] body .app-train-map-stop-name,
html[data-theme="vy"] body .w3-table td,
html[data-theme="vy"] body .w3-table th { color: #212721 !important; }
html[data-theme="vy"] body .w3-table th,
html[data-theme="vy"] body .w3-table-all th { background: #c7c9c7 !important; }
html[data-theme="vy"] body .app-train-map-sheet,
html[data-theme="vy"] body .app-train-map-alternative,
html[data-theme="vy"] body .app-station-mobile-item,
html[data-theme="vy"] body .app-station-mobile-empty,
html[data-theme="vy"] body .app-station-suggestion {
  background: #f2f2f3 !important;
  border-color: #c7c9c7 !important;
  color: #212721 !important;
}
html[data-theme="vy"] body .app-train-map-alternative.is-active {
  background: rgba(0, 149, 122, .12) !important;
  border-color: #00957a !important;
}
html[data-theme="vy"] body .app-station-suggestions { background: #f2f2f3 !important; border-color: #c7c9c7 !important; }
html[data-theme="vy"] body .app-station-section-count,
html[data-theme="vy"] body .app-station-mobile-toggle.is-active {
  background: rgba(0, 149, 122, .14) !important;
  color: #00685e !important;
  border-color: #00957a !important;
}
html[data-theme="vy"] body .app-train-map-stop.is-next-stop,
html[data-theme="vy"] body .app-train-map-stop.is-current,
html[data-theme="vy"] body .app-train-map-stop.is-latest-passed {
  background: rgba(0, 149, 122, .08);
}
html[data-theme="vy"] body .app-train-time-value.is-ontime,
html[data-theme="vy"] body .app-train-map-stop-time-row.is-ontime,
html[data-theme="vy"] body .app-train-map-stop.is-passed .app-train-map-stop-time { color: #00685e; }
html[data-theme="vy"] body .app-train-time-value.is-minor-delay,
html[data-theme="vy"] body .app-train-map-stop-time-row.is-minor-delay { color: #be6a14; }
html[data-theme="vy"] body .app-train-time-value.is-major-delay,
html[data-theme="vy"] body .app-train-map-stop-time-row.is-major-delay { color: #aa3025; }
html[data-theme="vy"] body .app-station-mobile-time,
html[data-theme="vy"] body .app-station-mobile-route-row,
html[data-theme="vy"] body .app-station-mobile-position,
html[data-theme="vy"] body .app-station-mobile-train { color: #212721 !important; }
html[data-theme="vy"] body .app-station-mobile-track,
html[data-theme="vy"] body .app-station-mobile-estimated,
html[data-theme="vy"] body .app-station-mobile-route-label { color: #383e42 !important; }
html[data-theme="vy"] body.app-auth-page,
html[data-theme="vy"] body .app-auth-screen.bg {
  background: linear-gradient(160deg, #f2f2f3, #c7c9c7) !important;
}
html[data-theme="vy"] body .app-auth-brand { background: #00957a; color: #f2f2f3; box-shadow: 0 9px 24px rgba(0, 104, 94, .2); }
html[data-theme="vy"]:root {
  --map-bg: #e7ebe9;
  --map-panel-bg: #f2f2f3;
  --map-panel-border: #c7c9c7;
  --map-text: #212721;
  --map-text-muted: #383e42;
  --map-pill-bg: #f2f2f3;
  --map-pill-text: #212721;
  --map-button-bg: #00685e;
  --map-button-hover: #00957a;
}
@media (max-width: 600px) {
  html body, html body.w3-light-grey { background: #091018 !important; }
  html[data-theme="light"] body,
  html[data-theme="light"] body.w3-light-grey { background: #f7fbff !important; }
  html[data-theme="vy"] body,
  html[data-theme="vy"] body.w3-light-grey { background: #f2f2f3 !important; }
}
@media (max-width: 600px) and (prefers-color-scheme: light) {
  html[data-theme="auto"] body,
  html[data-theme="auto"] body.w3-light-grey { background: #f7fbff !important; }
}
@media (max-width: 600px) {
  html.app-map-view,
  html.app-map-view body,
  html.app-map-view body.w3-light-grey { background: var(--ui-dock) !important; }
}
