:root {
  color-scheme: light;
  --bg: #e7e2d7;
  --surface: #e7e2d7;
  --text: #171717;
  --muted: #5d5a52;
  --outline: #171717;
  --glass-bg: rgba(231, 226, 215, 0.52);
  --glass-strong: rgba(231, 226, 215, 0.68);
  --glass-border: rgba(23, 23, 23, 0.16);
  --glass-shadow: 0 18px 60px rgba(20, 20, 20, 0.12);
  --panel-surface: #0d0d0d;
  --panel-text: #f3f0e7;
  --panel-muted: #cbc5b9;
  --panel-outline: #f3f0e7;
  --panel-bg: rgba(10, 10, 10, 0.74);
  --panel-strong: rgba(10, 10, 10, 0.84);
  --panel-border: rgba(255, 255, 255, 0.14);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --panel-width: min(30rem, calc(100vw - 2rem));
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #000000;
  --text: #f1efe6;
  --muted: #b6b2a8;
  --outline: #f1efe6;
  --glass-bg: rgba(10, 10, 10, 0.58);
  --glass-strong: rgba(12, 12, 12, 0.74);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 22px 72px rgba(0, 0, 0, 0.48);
  --panel-surface: #f2efe5;
  --panel-text: #141414;
  --panel-muted: #5d5a52;
  --panel-outline: #141414;
  --panel-bg: rgba(242, 239, 229, 0.82);
  --panel-strong: rgba(244, 241, 232, 0.9);
  --panel-border: rgba(20, 20, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
}

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  font-size: 1.05rem;
  line-height: 1;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
}

.map-shell {
  position: absolute;
  inset: 0;
  background: var(--bg);
}

.maplibregl-map {
  width: 100%;
  height: 100%;
  background: var(--bg);
  font-family: "Space Grotesk", sans-serif;
}

.maplibregl-canvas-container.maplibregl-interactive,
.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,
.maplibregl-canvas-container.maplibregl-touch-drag-pan {
  cursor: grab;
}

.maplibregl-canvas-container.maplibregl-interactive:active,
.maplibregl-canvas-container.maplibregl-touch-zoom-rotate:active,
.maplibregl-canvas-container.maplibregl-touch-drag-pan:active {
  cursor: grabbing;
}

.maplibregl-ctrl-top-right,
.maplibregl-ctrl-top-left {
  display: none;
}

.maplibregl-ctrl-bottom-right {
  right: 0.4rem;
  bottom: 0.4rem;
}

.maplibregl-ctrl-attrib {
  padding: 0.15rem 0.35rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  color: var(--muted);
  font: 500 0.55rem/1.25 "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
}

.maplibregl-ctrl-attrib a {
  color: inherit;
}

.hud {
  position: absolute;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
}

.hud,
.info-panel,
.route-legend-panel,
.key-panel,
.overlay-card,
.bus-panel-header,
.bus-panel-meta-card,
.bus-panel-spotlight,
.bus-panel-grid,
.bus-panel-upcoming {
  color: var(--panel-text);
  --text: var(--panel-text);
  --muted: var(--panel-muted);
  --outline: var(--panel-outline);
  --surface: var(--panel-surface);
  --glass-bg: var(--panel-bg);
  --glass-strong: var(--panel-strong);
  --glass-border: var(--panel-border);
}

.hud-left {
  top: 1rem;
  left: 1rem;
  flex-direction: column;
  align-items: flex-start;
  min-width: 12rem;
}

.hud-planner {
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  gap: 0.4rem;
  padding: 0.38rem 0.45rem;
}

.hud-legend {
  left: 1rem;
  bottom: 1rem;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
}

.hud-left span {
  display: block;
  line-height: 1;
}

#status-primary {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#status-secondary {
  font-size: 0.69rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-right {
  top: 1rem;
  right: 1rem;
  padding: 0.35rem;
}

.hud-zoom {
  right: 1rem;
  bottom: 5.1rem;
  padding: 0.35rem 0.42rem;
}

.info-panel {
  position: absolute;
  z-index: 910;
  top: 4.45rem;
  right: 1rem;
  width: min(20rem, calc(100vw - 2rem));
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-strong);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
}

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

.info-panel-kicker,
.info-panel-copy {
  margin: 0;
}

.info-panel-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.info-panel-copy {
  font-size: 0.76rem;
  line-height: 1.4;
}

.info-panel-toggles {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.info-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.58rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 22%, transparent);
  color: inherit;
  text-align: left;
}

.info-toggle-row:hover,
.info-toggle-row:focus-visible {
  border-color: var(--outline);
  outline: none;
}

.info-toggle-row[aria-pressed="true"] {
  background: color-mix(in srgb, var(--surface) 34%, transparent);
}

.info-toggle-copy,
.info-toggle-pill {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-toggle-pill {
  color: var(--muted);
}

.route-legend-panel {
  position: absolute;
  z-index: 910;
  top: 4.45rem;
  right: 1rem;
  width: min(14rem, calc(100vw - 2rem));
  max-height: calc(100vh - 12.5rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.45rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass-strong);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
  overflow: hidden;
}

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

.route-legend-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.route-legend-list {
  display: grid;
  gap: 0.34rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--outline) 24%, transparent) transparent;
}

.route-legend-list::-webkit-scrollbar {
  width: 8px;
}

.route-legend-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--outline) 24%, transparent);
}

.route-legend-item {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  width: 100%;
  padding: 0.45rem 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 18%, transparent);
  color: inherit;
  text-align: left;
}

.route-legend-item:hover,
.route-legend-item:focus-visible {
  border-color: var(--outline);
  outline: none;
}

.route-legend-item[aria-pressed="true"] {
  border-color: var(--outline);
  background: color-mix(in srgb, var(--surface) 30%, transparent);
}

.route-legend-swatch {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.route-legend-copy {
  display: grid;
  min-width: 0;
  flex: 1;
}

.route-legend-title,
.route-legend-subtitle {
  margin: 0;
}

.route-legend-title {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
}

.route-legend-subtitle {
  display: none;
}

.route-legend-flags {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  flex: 0 0 auto;
}

.route-legend-flag {
  display: inline-grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 28%, transparent);
  color: var(--muted);
}

.route-legend-flag .material-symbols-rounded {
  font-size: 0.82rem;
}

.zoom-stack {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.2rem;
}

.icon-button,
.text-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
}

.icon-button:hover,
.icon-button:focus-visible,
.text-button:hover,
.text-button:focus-visible {
  border-color: var(--outline);
  outline: none;
}

.icon-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.icon-button .material-symbols-rounded {
  font-size: 1.1rem;
}

.heat-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 28%, transparent);
}

.heat-toggle-button[aria-pressed="false"] {
  color: var(--muted);
  background: transparent;
}

.planner-action-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 28%, transparent);
}

.planner-action-button[aria-pressed="true"] {
  border: 1px solid var(--outline);
}

.planner-action-button[id^="planner-mode-"][aria-pressed="true"] {
  background: color-mix(in srgb, var(--surface) 40%, transparent);
}

.planner-action-button.ghost {
  background: transparent;
}

.planner-hint {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.35rem 0 0.15rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.heat-legend-items {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.heat-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.heat-swatch {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--outline) 18%, transparent);
}

.heat-swatch-pink {
  background: #d8779d;
}

.heat-swatch-green {
  background: #6ca97a;
}

.zoom-slider {
  appearance: none;
  width: 8.25rem;
  height: 1.2rem;
  background: transparent;
  margin: 0;
}

.zoom-slider::-webkit-slider-runnable-track {
  height: 2px;
  background: color-mix(in srgb, var(--outline) 60%, transparent);
}

.zoom-slider::-moz-range-track {
  height: 2px;
  background: color-mix(in srgb, var(--outline) 60%, transparent);
}

.zoom-slider::-webkit-slider-thumb {
  appearance: none;
  width: 0.8rem;
  height: 0.8rem;
  margin-top: -0.3rem;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
}

.zoom-slider::-moz-range-thumb {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
}

.zoom-slider:focus-visible {
  outline: none;
}

.key-panel {
  position: absolute;
  z-index: 950;
  top: 4.4rem;
  right: 1rem;
  display: grid;
  gap: 0.75rem;
  width: var(--panel-width);
  padding: 0.95rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(1.08);
  -webkit-backdrop-filter: blur(24px) saturate(1.08);
}

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

.bus-panel {
  position: absolute;
  z-index: 950;
  inset: 0;
  padding: 0.85rem;
  pointer-events: none;
  --focus-tint: rgba(255, 255, 255, 0.08);
  --focus-tint-strong: rgba(255, 255, 255, 0.12);
}

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

.bus-panel-card {
  display: grid;
  grid-template-columns: minmax(18rem, 25vw) minmax(0, 1fr) minmax(18rem, 25vw);
  gap: 0.9rem;
  height: calc(100vh - 1.7rem);
  min-height: 0;
  pointer-events: none;
}

.bus-pane {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  min-height: 0;
}

.bus-pane-left,
.bus-pane-right {
  pointer-events: auto;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--outline) 24%, transparent) transparent;
}

.bus-pane-right {
  grid-column: 3;
  align-self: stretch;
}

.bus-pane-left::-webkit-scrollbar,
.bus-pane-right::-webkit-scrollbar {
  width: 8px;
}

.bus-pane-left::-webkit-scrollbar-thumb,
.bus-pane-right::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--outline) 24%, transparent);
}

.bus-panel-header,
.bus-panel-meta-card,
.bus-panel-spotlight,
.bus-panel-grid,
.bus-panel-upcoming {
  padding: 0.85rem 0.9rem;
  min-height: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(26px) saturate(1.08);
  -webkit-backdrop-filter: blur(26px) saturate(1.08);
  pointer-events: auto;
}

.bus-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.bus-panel-kicker,
.bus-panel-title,
.bus-panel-section-label {
  margin: 0;
}

.bus-panel-kicker,
.bus-panel-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.bus-panel-kicker,
.bus-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.bus-panel-kicker .material-symbols-rounded,
.bus-panel-title .material-symbols-rounded {
  font-size: 1rem;
}

.bus-panel-title {
  margin-top: 0.2rem;
  font-size: 1.2rem;
  line-height: 1.04;
}

.bus-panel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.bus-panel-meta-extra {
  margin-top: 0.7rem;
}

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

.bus-spotlight-card {
  display: grid;
  gap: 0.34rem;
  padding: 0.78rem 0.82rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--focus-tint-strong) 42%, color-mix(in srgb, var(--surface) 24%, transparent));
}

.bus-spotlight-kicker,
.bus-spotlight-title,
.bus-spotlight-detail {
  margin: 0;
}

.bus-spotlight-kicker {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.bus-spotlight-title {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
}

.bus-spotlight-title .material-symbols-rounded {
  font-size: 1rem;
}

.bus-spotlight-detail {
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--muted);
}

.bus-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--focus-tint-strong) 44%, color-mix(in srgb, var(--surface) 22%, transparent));
}

.bus-chip .material-symbols-rounded {
  font-size: 0.82rem;
}

.bus-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  align-content: start;
}

.bus-stat {
  min-height: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--focus-tint-strong) 38%, color-mix(in srgb, var(--surface) 22%, transparent));
}

.bus-stat-label,
.bus-stat-value,
.bus-stop-item,
.bus-stop-meta {
  margin: 0;
}

.bus-stat-label,
.bus-stop-meta {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.bus-stat-label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.bus-stat-label-row .material-symbols-rounded {
  font-size: 0.86rem;
}

.bus-stat-value {
  margin-top: 0.2rem;
  font-size: 0.95rem;
  line-height: 1.18;
}

.bus-panel-upcoming {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  overflow: hidden;
}

.bus-stop-list {
  display: grid;
  gap: 0.45rem;
  min-height: 0;
  padding-right: 0.25rem;
}

.bus-stop-item {
  display: grid;
  gap: 0.2rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--focus-tint) 28%, color-mix(in srgb, var(--surface) 22%, transparent));
}

.plan-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--focus-tint) 18%, color-mix(in srgb, var(--surface) 26%, transparent));
}

.plan-card-header,
.plan-card-meta,
.plan-card-leg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}

.plan-card-title,
.plan-card-copy,
.plan-card-kicker,
.plan-leg-copy {
  margin: 0;
}

.plan-card-kicker {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.plan-card-title {
  font-size: 0.96rem;
  line-height: 1.14;
}

.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.24rem 0.42rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: color-mix(in srgb, var(--surface) 28%, transparent);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-card-copy,
.plan-leg-copy {
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--muted);
}

.plan-card-legs {
  display: grid;
  gap: 0.45rem;
}

.plan-card-timeline {
  min-height: 0;
}

.plan-card-legs {
  max-height: min(56vh, 38rem);
  overflow-y: auto;
  padding-right: 0.24rem;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--outline) 24%, transparent) transparent;
}

.plan-card-legs::-webkit-scrollbar {
  width: 8px;
}

.plan-card-legs::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--outline) 24%, transparent);
}

.plan-card-leg {
  position: relative;
  align-items: flex-start;
  padding: 0.55rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: color-mix(in srgb, var(--surface) 24%, transparent);
}

.plan-card-leg::before {
  content: "";
  position: absolute;
  left: 1.32rem;
  top: calc(100% - 0.1rem);
  width: 1px;
  height: 0.65rem;
  background: color-mix(in srgb, var(--outline) 18%, transparent);
}

.plan-card-leg:last-child::before {
  display: none;
}

.plan-card-leg-anchor,
.plan-card-leg-transfer {
  background: color-mix(in srgb, var(--focus-tint) 22%, color-mix(in srgb, var(--surface) 28%, transparent));
}

.plan-card-leg-ride {
  background: color-mix(in srgb, var(--surface) 24%, transparent);
}

.plan-leg-index {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--outline) 10%, transparent);
  font-size: 0.68rem;
  font-weight: 700;
}

.plan-leg-index.material-symbols-rounded {
  font-size: 1rem;
  line-height: 1;
}

.plan-leg-content {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.bus-stop-item-button {
  cursor: pointer;
}

.bus-stop-item-button:hover,
.bus-stop-item-button:focus-visible {
  border-color: var(--outline);
  outline: none;
}

.bus-stop-group {
  display: grid;
  gap: 0.45rem;
}

.bus-stop-group-title {
  margin: 0;
  padding: 0.2rem 0.1rem 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.spark-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--focus-tint-strong) 34%, color-mix(in srgb, var(--surface) 20%, transparent));
}

.spark-card-pressure {
  background: color-mix(in srgb, rgba(191, 97, 128, 0.34) 68%, color-mix(in srgb, var(--surface) 32%, transparent));
}

.spark-card-relief {
  background: color-mix(in srgb, rgba(95, 151, 109, 0.34) 68%, color-mix(in srgb, var(--surface) 32%, transparent));
}

.spark-card-balanced {
  background: color-mix(in srgb, rgba(214, 206, 188, 0.24) 58%, color-mix(in srgb, var(--surface) 42%, transparent));
}

.spark-card-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.spark-card-label,
.spark-card-value {
  margin: 0;
}

.spark-card-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.spark-card-value {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.sparkline {
  display: block;
  width: 100%;
  height: 3rem;
}

.sparkline-occupancy {
  height: 4rem;
}

.planner-selection-box {
  position: absolute;
  z-index: 980;
  border: 1px solid var(--outline);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 16%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 42%, transparent) inset;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.bus-stop-name {
  font-size: 0.88rem;
  line-height: 1.16;
}

.bus-stop-name-row {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.bus-stop-name-row .material-symbols-rounded {
  font-size: 0.95rem;
}

.route-color-dot {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 0.72rem;
  border-radius: 999px;
  background: var(--route-dot);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--surface) 38%, transparent) inset;
}

.route-color-dot-small {
  width: 0.62rem;
  height: 0.62rem;
  flex-basis: 0.62rem;
}

.key-panel input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 500 0.95rem/1.4 "Space Grotesk", sans-serif;
  letter-spacing: 0.05em;
}

.key-panel input::placeholder {
  color: var(--muted);
}

.key-actions {
  display: flex;
  gap: 0.5rem;
}

.text-button {
  padding: 0.2rem 0.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.overlay {
  position: absolute;
  inset: 0;
  z-index: 920;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.overlay[hidden] {
  display: none;
}

.overlay-card {
  padding: 0.95rem 1rem;
  text-align: center;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(1.08);
  -webkit-backdrop-filter: blur(24px) saturate(1.08);
}

.overlay-card p {
  margin: 0;
}

#overlay-primary {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#overlay-secondary {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stop-marker {
  width: 4px;
  height: 4px;
  margin-left: -2px;
  margin-top: -2px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #111111;
}

.bus-marker {
  width: 18px;
  height: 10px;
  border-radius: 0;
  border: 0;
  display: grid;
  place-items: center;
  position: relative;
  will-change: transform;
  pointer-events: auto;
  overflow: hidden;
}

.bus-shell {
  width: 18px;
  height: 10px;
  will-change: transform;
  pointer-events: auto;
  cursor: pointer;
}

.bus-marker-label {
  display: block;
  font-size: 6px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
  opacity: 0;
}

.route-highlighted {
  z-index: 700;
}

.maplibregl-marker {
  pointer-events: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .hud-left {
    top: auto;
    bottom: 4.8rem;
    left: 1rem;
    right: 1rem;
    min-width: 0;
  }

  .hud-planner {
    top: auto;
    bottom: 8.65rem;
    left: 1rem;
    right: 1rem;
    transform: none;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .planner-hint {
    width: 100%;
    min-height: 0;
    padding-top: 0.1rem;
  }

  .hud-legend {
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
    justify-content: space-between;
  }

  .hud-zoom {
    right: 1rem;
    left: 1rem;
    bottom: 4.8rem;
    justify-content: center;
  }

  .info-panel {
    top: 4.25rem;
    right: 1rem;
    left: 1rem;
    width: auto;
  }

  .route-legend-panel {
    top: 8.9rem;
    right: 1rem;
    left: 1rem;
    width: min(14rem, calc(100vw - 2rem));
    max-height: 11rem;
  }

  .key-panel {
    top: auto;
    bottom: 5.25rem;
    left: 1rem;
    right: 1rem;
    width: auto;
  }

  .bus-panel {
    inset: 0;
    padding: 0.75rem;
  }

  .bus-panel-card {
    grid-template-columns: 1fr;
    align-content: start;
    height: calc(100vh - 1.5rem);
  }

  .bus-pane-right {
    grid-column: auto;
  }

  .bus-panel-grid {
    grid-template-columns: 1fr;
  }

  .bus-pane-left,
  .bus-pane-right {
    padding-right: 0;
  }
}
