:root {
  color-scheme: light;
  --ink: #2a3553;
  --muted: #7d7166;
  --faint: #a8998a;
  --line: #ead9c5;
  --panel: #fbf4ea;
  --panel-2: #f2e5d4;
  --card: #fdf8f1;
  --hover: #f6eadb;
  --accent: #c8643b;
  --accent-ink: #fff7ef;
  --focus: #c8643b;
  --chip: #2a3553;
  --chip-ink: #fbf4ea;
  --map-bg: #efe4d4;
  --map-land: #fbf6ee;
  --station-fill: #fffaf3;
  --station-ink: #2a3553;
  --label-ink: #2a3553;
  --label-halo: rgba(251, 246, 238, 0.95);
  --dim-opacity: 0.14;
  --shadow: 0 12px 32px rgba(92, 62, 34, 0.16);
  --shadow-soft: 0 2px 6px rgba(92, 62, 34, 0.1);
  --radius: 12px;
  --rail-width: 350px;
  --serif: "Playfair Display", "Didot", "Bodoni 72", Georgia, "Songti SC", "STSong", serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f2e6d6;
  --muted: #b9aa98;
  --faint: #8a7d70;
  --line: #3a3a4c;
  --panel: #1f2335;
  --panel-2: #282c40;
  --card: #242839;
  --hover: #2e3348;
  --accent: #e0845a;
  --accent-ink: #1f2335;
  --focus: #e0845a;
  --chip: #f2e6d6;
  --chip-ink: #1f2335;
  --map-bg: #151827;
  --map-land: #1b1f30;
  --station-fill: #1b1f30;
  --station-ink: #f2e6d6;
  --label-ink: #f2e6d6;
  --label-halo: rgba(27, 31, 48, 0.92);
  --dim-opacity: 0.16;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 2px 6px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--map-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}

/* ---- side panel ---------------------------------------------------------- */

.rail {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(180deg, var(--panel) 0%, color-mix(in srgb, var(--panel) 92%, var(--panel-2)) 100%);
  border-right: 1px solid var(--line);
  box-shadow: 4px 0 18px rgba(92, 62, 34, 0.06);
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 18px 16px 12px;
}

.brand-text {
  flex: 1;
  min-width: 0;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.title-accent {
  font-weight: 500;
  font-style: italic;
  color: var(--accent);
}

:lang(zh) .title-accent {
  font-style: normal;
  font-weight: 600;
}

.brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  margin-top: 10px;
  padding: 3px;
  border-radius: 10px;
  background: var(--panel-2);
}

.segmented button {
  min-width: 38px;
  padding: 4px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button.is-active {
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.icon-button {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
}

.icon-button:hover {
  background: var(--hover);
}

.rail-toggle {
  display: none;
}

.rail-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 0 16px 12px;
  padding: 4px;
  border-radius: 12px;
  background: var(--panel-2);
}

.tab {
  padding: 9px 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  opacity: 0.72;
  font-weight: 600;
  font-size: 14px;
}

.tab:hover {
  opacity: 1;
}

.tab.is-active {
  background: var(--card);
  color: var(--ink);
  opacity: 1;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.tab-panel {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 0 16px 16px;
  overflow: auto;
}

.tab-panel[hidden] {
  display: none;
}

.field {
  position: relative;
}

.field input[type="search"] {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  outline: none;
}

.field input[type="search"]::placeholder {
  color: var(--faint);
}

.field input[type="search"]:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent);
}

.suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.suggestion.is-active,
.suggestion:hover {
  background: var(--hover);
}

.suggestion-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-name mark {
  background: transparent;
  color: var(--focus);
}

.badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
}

.suggestion .badges {
  flex: none;
  flex-wrap: nowrap;
  max-width: 45%;
  overflow: hidden;
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  padding: 0 5px;
  border: 0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.badge.metro {
  min-width: 20px;
  border-radius: 50%;
  padding: 0 3px;
}

.badge.rer,
.badge.train {
  border-radius: 4px;
}

.badge.large {
  min-width: 28px;
  height: 26px;
  font-size: 13px;
}

.badge.metro.large {
  width: 26px;
  min-width: 26px;
}

button.badge {
  cursor: pointer;
  transition: transform 120ms ease;
}

button.badge:hover {
  transform: translateY(-1px);
}

/* ---- details --------------------------------------------------------------- */

.details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
  line-height: 1.55;
  box-shadow: var(--shadow-soft);
}

.empty-state strong {
  color: var(--ink);
  font-size: 15px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 14px 0 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.kbd {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-size: 11px;
  text-align: center;
}

.card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.card-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.pill-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
}

.pill-button:hover {
  background: var(--hover);
}

.pill-button.primary {
  border-color: transparent;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent);
}

.pill-button.primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, black);
}

.section-label {
  margin: 14px 0 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.neighbors {
  display: grid;
  gap: 6px;
}

.neighbor-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.neighbor-row .links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  color: var(--muted);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

.link-button:hover {
  text-decoration-color: currentColor;
}

/* line station list */

.stop-list {
  position: relative;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.stop-list li {
  position: relative;
  padding: 3px 0 3px 26px;
}

.stop-list li::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 5px;
  background: var(--line-color);
}

.stop-list li:first-child::before {
  top: 50%;
}

.stop-list li:last-child::before {
  bottom: 50%;
}

.stop-list li::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 5px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--line-color);
  border-radius: 50%;
  background: var(--station-fill);
  transform: translateY(-50%);
}

.stop-list li.interchange::after {
  border-color: var(--station-ink);
}

.stop-list .stop-name {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 3px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-size: 13px;
}

.stop-list .stop-name:hover {
  background: var(--hover);
}

.stop-list .mini-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
}

.stop-list .mini-badges .badge {
  min-width: 16px;
  height: 15px;
  padding: 0 3px;
  font-size: 9px;
}

.reset-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
}

.reset-button:hover {
  background: var(--hover);
}

/* ---- route planner --------------------------------------------------------------- */

.route-form {
  position: relative;
  display: grid;
  gap: 8px;
}

.route-field input[type="search"] {
  padding-left: 30px;
}

.route-dot {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 12px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  pointer-events: none;
}

.route-dot.from {
  border: 3px solid var(--focus);
}

.route-dot.to {
  background: var(--accent);
}

.swap {
  position: absolute;
  z-index: 2;
  top: 28px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.route-result {
  display: grid;
  gap: 10px;
}

.route-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  font-size: 13px;
  color: var(--muted);
}

.route-summary strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 28px;
}

.route-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.route-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
}

.route-option.is-active {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--focus) 20%, transparent);
}

.legs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.leg {
  position: relative;
  padding: 0 0 14px 34px;
}

.leg::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 0;
  left: 11px;
  width: 5px;
  border-radius: 3px;
  background: var(--leg-color, var(--line));
}

.leg.walk::before {
  width: 0;
  border-left: 3px dotted var(--faint);
  background: none;
}

.leg .leg-badge {
  position: absolute;
  top: 0;
  left: 0;
}

.leg-head {
  font-weight: 700;
  line-height: 1.3;
}

.leg-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.leg details {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.leg details summary {
  cursor: pointer;
}

.leg details ol {
  margin: 4px 0 0;
  padding-left: 16px;
}

.leg-end {
  padding-left: 34px;
  font-weight: 700;
}

/* ---- line filters ----------------------------------------------------------------- */

.lines-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

.text-button {
  flex: none;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-weight: 650;
  font-size: 12px;
}

.text-button:hover {
  background: var(--hover);
}

.line-filters {
  display: grid;
  gap: 12px;
}

.line-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.line-group-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.line-chip {
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border: 2px solid transparent;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  font-weight: 800;
  font-size: 13px;
  transition: opacity 120ms ease, transform 120ms ease;
}

.line-chip.metro {
  width: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: 50%;
}

.line-chip.construction {
  border: 2px dashed var(--panel);
  outline: 1px dashed var(--faint);
}

.line-chip.is-dimmed {
  opacity: 0.28;
}

.line-chip.is-active {
  border-color: var(--ink);
  transform: scale(1.06);
}

/* ---- map --------------------------------------------------------------------------- */

.map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--map-bg);
}

#metroMap {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#metroMap:active {
  cursor: grabbing;
}

.map-land {
  fill: var(--map-land);
  stroke: var(--line);
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}

.future-line {
  fill: none;
  stroke-dasharray: 6 5;
  stroke-linecap: butt;
  opacity: 0.8;
  pointer-events: none;
}

.route-casing {
  fill: none;
  stroke: var(--map-land);
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.route-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  cursor: pointer;
  transition: opacity 160ms ease;
}

.route-line.tram {
  stroke-dasharray: none;
}

.route-hit {
  fill: none;
  stroke: transparent;
  stroke-linecap: round;
  stroke-linejoin: round;
  cursor: pointer;
}

.route-inner {
  fill: none;
  stroke: var(--map-land);
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.is-dim {
  opacity: var(--dim-opacity);
}

.transfer-link {
  fill: none;
  stroke: var(--faint);
  stroke-linecap: round;
  pointer-events: none;
}

.station {
  cursor: pointer;
}

.station-shape {
  fill: var(--station-fill);
  stroke: var(--station-ink);
}

.station-shape.simple {
  stroke-width: 1.2;
}

.station.is-dim {
  opacity: 0.15;
}

.station.is-hover .station-shape,
.station.is-selected .station-shape {
  stroke: var(--focus);
}

.station-pulse {
  fill: none;
  stroke: var(--accent);
  pointer-events: none;
  animation: pulse 1.6s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes pulse {
  0% {
    opacity: 0.9;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(2.4);
  }
}

.focus-layer {
  pointer-events: none;
}

.focus-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3px;
  transform-box: fill-box;
  transform-origin: center;
  animation: focus-ring 1.8s ease-out infinite;
}

.focus-ring.delay {
  animation-delay: 0.9s;
}

.focus-halo {
  fill: color-mix(in srgb, var(--accent) 22%, transparent);
  stroke: var(--accent);
  stroke-width: 2.5px;
}

.focus-pin {
  animation: pin-drop 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}

.focus-pin-shadow {
  fill: rgba(42, 53, 83, 0.25);
}

.focus-pin-body {
  fill: var(--accent);
  stroke: var(--map-land);
  stroke-width: 2.5px;
  filter: drop-shadow(0 3px 4px rgba(92, 62, 34, 0.35));
}

.focus-pin-dot {
  fill: var(--map-land);
}

.focus-tag {
  animation: tag-in 0.4s 0.15s ease-out both;
}

.focus-tag rect {
  fill: var(--chip);
  filter: drop-shadow(0 3px 6px rgba(42, 53, 83, 0.3));
}

.focus-tag text {
  fill: var(--chip-ink);
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

@keyframes focus-ring {
  0% {
    opacity: 0.9;
    transform: scale(0.7);
  }
  100% {
    opacity: 0;
    transform: scale(3.4);
  }
}

@keyframes pin-drop {
  0% {
    opacity: 0;
    transform: translateY(-28px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tag-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.journey-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.journey-casing {
  fill: none;
  stroke: var(--station-ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0.85;
}

.journey-walk {
  fill: none;
  stroke: var(--station-ink);
  stroke-linecap: round;
  pointer-events: none;
}

.endpoint {
  pointer-events: none;
}

.endpoint.from {
  fill: var(--map-land);
  stroke: var(--focus);
}

.endpoint.to {
  fill: var(--accent);
  stroke: var(--map-land);
}

.labels {
  pointer-events: none;
}

.line-badge {
  cursor: pointer;
}

.line-badge .badge-shape {
  stroke: var(--map-land);
  stroke-width: 1.5px;
}

.line-badge text {
  font-weight: 800;
  font-size: 11px;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.line-badge.construction .badge-shape {
  stroke-dasharray: 3 2;
  stroke: var(--station-ink);
}

.line-badge.is-dim {
  opacity: 0.18;
}

.label {
  fill: var(--label-ink);
  paint-order: stroke;
  stroke: var(--label-halo);
  stroke-linejoin: round;
  font-weight: 560;
  letter-spacing: 0.005em;
}

.label.major {
  font-weight: 750;
}

.label.is-dim {
  opacity: 0.25;
}

.label.is-focus {
  font-weight: 800;
}

.map-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  gap: 6px;
}

.map-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font-size: 18px;
  line-height: 1;
}

.map-button:hover {
  background: var(--hover);
}

.status-chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
  color: var(--muted);
  font-size: 12px;
  backdrop-filter: blur(6px);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-ink);
  font-size: 13px;
  font-weight: 600;
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}

.tooltip {
  position: fixed;
  z-index: 20;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 13px;
  pointer-events: none;
}

.tooltip strong {
  display: block;
  margin-bottom: 4px;
}

/* ---- mobile: panel becomes a bottom sheet --------------------------------------------- */

@media (max-width: 760px) {
  .app-shell {
    display: block;
    position: relative;
  }

  .map-stage {
    position: absolute;
    inset: 0;
  }

  .rail {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 62dvh;
    border-right: 0;
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.16);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .brand {
    padding: 10px 14px 8px;
  }

  .rail-toggle {
    display: inline-grid;
  }

  .rail.is-collapsed .rail-body {
    display: none;
  }

  .rail.is-collapsed .rail-toggle {
    transform: rotate(180deg);
  }

  .map-controls {
    top: 12px;
  }

  .status-chip {
    display: none;
  }

  .toast {
    top: 56px;
    bottom: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .station-pulse,
  .focus-ring,
  .focus-pin,
  .focus-tag {
    animation: none;
  }
}
