/* ===== MUNIMUSIC — SF AESTHETIC REDESIGN ===== */
:root {
  /* Type scale */
  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2.2rem, 1.5rem + 2.5vw, 3.8rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Fonts */
  --font-body: 'Satoshi', 'Inter', 'Helvetica Neue', sans-serif;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Sidebar */
  --sidebar-width: 260px;

  /* Muni Metro line colors */
  --line-j: #e18813;
  --line-k: #549dbf;
  --line-l: #932290;
  --line-m: #008851;
  --line-n: #004988;
  --line-t: #d40843;
  --line-s: #ffcc00;
  --line-f: #c4a94d;
  --line-e: #777777;
  --line-bus: #d41144;
  --line-cable: #8B4513;

  /* Muni identity */
  --muni-red: #d41144;
  --muni-red-dim: #8a0a2d;
  --muni-sunset-orange: #e18813;
  --muni-poppy: #ff6b35;
}

/* ===== LIGHT MODE ===== */
:root, [data-theme='light'] {
  --color-bg: #f4f1eb;
  --color-bg-deep: #eae6de;
  --color-surface: #faf8f4;
  --color-surface-glass: rgba(250, 248, 244, 0.8);
  --color-surface-raised: #ffffff;
  --color-text: #2c2825;
  --color-text-secondary: #5a554e;
  --color-text-muted: #8a847b;
  --color-text-faint: #bdb7ae;
  --color-border: rgba(44, 40, 37, 0.08);
  --color-border-strong: rgba(44, 40, 37, 0.14);
  --color-track: #e0dbd3;
  --color-water: #c8d8e4;
  --color-canvas-bg: #efecea;
  --shadow-sm: 0 1px 3px rgba(44, 40, 37, 0.05);
  --shadow-md: 0 4px 16px rgba(44, 40, 37, 0.07);
  --shadow-lg: 0 8px 32px rgba(44, 40, 37, 0.1);
  --splash-left-bg: linear-gradient(160deg, #1a1210 0%, #2c1520 40%, #1a1018 100%);
  --splash-left-overlay: radial-gradient(ellipse at 30% 50%, rgba(212,17,68,0.15) 0%, transparent 60%);
}

/* ===== DARK MODE ===== */
[data-theme='dark'] {
  --color-bg: #111010;
  --color-bg-deep: #0a0909;
  --color-surface: #1a1817;
  --color-surface-glass: rgba(26, 24, 23, 0.85);
  --color-surface-raised: #222020;
  --color-text: #e4dfda;
  --color-text-secondary: #b0aaa2;
  --color-text-muted: #7a746c;
  --color-text-faint: #4a4640;
  --color-border: rgba(228, 223, 218, 0.06);
  --color-border-strong: rgba(228, 223, 218, 0.1);
  --color-track: #1e1c1a;
  --color-water: #0f1318;
  --color-canvas-bg: #151312;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
  --splash-left-bg: linear-gradient(160deg, #0a0808 0%, #1a0d14 40%, #0c0a10 100%);
  --splash-left-overlay: radial-gradient(ellipse at 30% 50%, rgba(212,17,68,0.12) 0%, transparent 60%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #111010;
    --color-bg-deep: #0a0909;
    --color-surface: #1a1817;
    --color-surface-glass: rgba(26, 24, 23, 0.85);
    --color-surface-raised: #222020;
    --color-text: #e4dfda;
    --color-text-secondary: #b0aaa2;
    --color-text-muted: #7a746c;
    --color-text-faint: #4a4640;
    --color-border: rgba(228, 223, 218, 0.06);
    --color-border-strong: rgba(228, 223, 218, 0.1);
    --color-track: #1e1c1a;
    --color-water: #0f1318;
    --color-canvas-bg: #151312;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
    --splash-left-bg: linear-gradient(160deg, #0a0808 0%, #1a0d14 40%, #0c0a10 100%);
    --splash-left-overlay: radial-gradient(ellipse at 30% 50%, rgba(212,17,68,0.12) 0%, transparent 60%);
  }
}

/* ===== APP SHELL ===== */
#app {
  width: 100vw;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}

/* ========================================
   SPLASH SCREEN — Split layout
   ======================================== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

.splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Left panel — dark gradient with logo */
.splash-left {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--splash-left-bg);
}

.splash-gradient-bg {
  position: absolute;
  inset: 0;
  background: var(--splash-left-overlay);
  pointer-events: none;
}

.splash-logo-wrap {
  position: relative;
  z-index: 2;
  width: clamp(180px, 50%, 300px);
}

.splash-logo svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(212, 17, 68, 0.2));
}

/* Animated transit line decorations on left panel */
.splash-transit-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.4;
  pointer-events: none;
}

.splash-transit-lines svg {
  width: 100%;
  height: 100%;
}

.transit-line {
  fill: none;
  stroke-width: 2;
  stroke-dasharray: 8 16;
  stroke-linecap: round;
  opacity: 0.5;
  animation: transit-flow 8s linear infinite;
}

.tl-1 { animation-delay: 0s; }
.tl-2 { animation-delay: -1.5s; }
.tl-3 { animation-delay: -3s; }
.tl-4 { animation-delay: -4.5s; }
.tl-5 { animation-delay: -6s; }

@keyframes transit-flow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -48; }
}

/* Right panel — text content */
.splash-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: var(--color-bg);
  position: relative;
}

.splash-content {
  max-width: 420px;
}

.splash-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muni-red);
  margin-bottom: var(--space-4);
  opacity: 0;
  animation: fade-in-up 0.6s var(--ease-out) 0.3s forwards;
}

.splash-headline {
  font-family: var(--font-body);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  opacity: 0;
  animation: fade-in-up 0.7s var(--ease-out) 0.5s forwards;
}

.splash-divider {
  width: 40px;
  height: 3px;
  background: var(--muni-red);
  border-radius: 2px;
  margin-bottom: var(--space-6);
  opacity: 0;
  animation: scale-in-x 0.5s var(--ease-out) 0.8s forwards;
}

.splash-body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-4);
  opacity: 0;
  animation: fade-in-up 0.6s var(--ease-out) 1s forwards;
}

.splash-body--emphasis {
  font-weight: 500;
  font-style: italic;
  color: var(--color-text-muted);
  animation-delay: 1.15s;
}

.splash-actions {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-top: var(--space-8);
  opacity: 0;
  animation: fade-in-up 0.6s var(--ease-out) 1.4s forwards;
}

.splash-enter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-6);
  background: var(--muni-red);
  cursor: pointer;
  transition:
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive),
    background var(--transition-interactive);
  box-shadow: 0 2px 12px rgba(212, 17, 68, 0.3);
}

.splash-enter:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(212, 17, 68, 0.4);
  background: #c00e3d;
}

.splash-enter:active {
  transform: translateY(0) scale(0.97);
}

.splash-enter svg {
  transition: transform 0.2s var(--ease-out);
}

.splash-enter:hover svg {
  transform: translateX(3px);
}

.splash-vehicle-hint {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.splash-pulse {
  width: 6px;
  height: 6px;
  background: var(--muni-red);
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(212,17,68,0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(212,17,68,0); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in-x {
  from { opacity: 0; transform: scaleX(0); transform-origin: left; }
  to { opacity: 1; transform: scaleX(1); transform-origin: left; }
}

/* ========================================
   MAIN EXPERIENCE — Sidebar + Canvas
   ======================================== */
.experience {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: 100dvh;
  width: 100vw;
}

/* --- Sidebar --- */
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: var(--space-4);
  overflow-y: auto;
  overflow-x: hidden;
  gap: var(--space-4);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo {
  height: 28px;
}

.sidebar-logo svg {
  height: 100%;
  width: auto;
}

.sidebar-theme-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: transparent;
  transition:
    color var(--transition-interactive),
    border-color var(--transition-interactive);
}

.sidebar-theme-btn:hover {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

/* Status */
.sidebar-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--muni-red);
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}

.status-mode {
  margin-left: auto;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

/* Sidebar sections */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.sidebar-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

/* Line legend */
.line-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.line-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  opacity: 0.9;
  transition:
    opacity var(--transition-interactive),
    transform var(--transition-interactive);
}

.line-badge:hover {
  opacity: 1;
  transform: scale(1.15);
}

.line-badge.dimmed {
  opacity: 0.2;
  transform: scale(0.85);
}

.line-badge.solo {
  opacity: 1;
  transform: scale(1.2);
  box-shadow: 0 0 0 3px var(--color-surface), 0 0 12px 2px currentColor;
}

.line-badge-all {
  background: var(--color-text) !important;
  color: var(--color-surface);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.5px;
  opacity: 0.4;
}
.line-badge-all.active {
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(212, 17, 68, 0.3);
}

/* Now Playing */
.now-playing {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.np-instrument {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  padding: 3px var(--space-2);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  pointer-events: none;
  user-select: none;
}

.np-instrument::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-text-faint);
  opacity: 0.25;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.np-instrument.active {
  color: var(--color-text);
}

.np-instrument.active::before {
  opacity: 1;
  background: var(--muni-red);
  box-shadow: 0 0 6px var(--muni-red);
}

.np-icon {
  font-size: 12px;
  width: 16px;
  text-align: center;
}

.np-instrument.active .np-icon {
  animation: note-bounce 0.4s var(--ease-out);
}

@keyframes note-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Sidebar controls */
.sidebar-controls {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.view-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 2px;
}

.vt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  border: none;
  background: transparent;
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive);
}

.vt-btn.active {
  color: var(--color-text);
  background: var(--color-surface-raised);
  box-shadow: var(--shadow-sm);
}

.vt-btn:hover:not(.active) {
  color: var(--color-text-secondary);
}

.vt-btn svg {
  width: 14px;
  height: 14px;
}

.ctrl-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  border: none;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive);
}

.ctrl-btn:hover {
  color: var(--color-text);
}

.ctrl-btn.active {
  color: var(--muni-red);
  background: rgba(212, 17, 68, 0.06);
}

.ctrl-btn svg {
  width: 16px;
  height: 16px;
}

/* --- Canvas Area --- */
.canvas-area {
  position: relative;
  overflow: hidden;
  background: var(--color-canvas-bg);
}

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

#maplibre-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* MapLibre overrides for theme integration */
.maplibregl-map {
  font-family: var(--font-body);
}

.maplibregl-ctrl-attrib {
  background: var(--color-surface-glass) !important;
  font-size: 10px;
}

.maplibregl-ctrl-attrib a {
  color: var(--color-text-muted) !important;
}

.maplibregl-ctrl-group {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border) !important;
  box-shadow: var(--shadow-sm) !important;
}

.maplibregl-ctrl-group button {
  color: var(--color-text) !important;
}

.maplibregl-ctrl-group button + button {
  border-top: 1px solid var(--color-border) !important;
}

@media (max-width: 768px) {
  .maplibregl-ctrl-attrib {
    font-size: 8px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.bars-container {
  position: absolute;
  inset: 0;
  display: none;
}

.bars-container.active {
  display: block;
}

#bars-canvas {
  width: 100%;
  height: 100%;
}

/* Activity strip — bottom of canvas */
.activity-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  display: flex;
  gap: 0;
  pointer-events: none;
  overflow: hidden;
}

.activity-pip {
  height: 100%;
  flex: 1;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.activity-pip.active {
  opacity: 0.7;
  animation: pip-fade 2s ease forwards;
}

@keyframes pip-fade {
  from { opacity: 0.8; }
  to { opacity: 0; }
}

/* Route tooltip */
.route-tooltip {
  position: fixed;
  z-index: 200;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s, transform 0.12s;
}

.route-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.route-tooltip .route-color {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: var(--space-1);
  vertical-align: middle;
}

/* ===== INFO OVERLAY ===== */
.info-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--space-6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}

.info-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.info-content {
  max-width: 480px;
  background: var(--color-surface-raised);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.info-title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.info-content p {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.info-close-btn {
  margin-top: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-6);
  background: var(--muni-red);
  cursor: pointer;
  transition:
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.info-close-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 17, 68, 0.35);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .splash {
    grid-template-columns: 1fr;
    grid-template-rows: 40vh 1fr;
  }

  .splash-left {
    min-height: 0;
  }

  .splash-logo-wrap {
    width: clamp(120px, 35%, 200px);
  }

  .splash-headline {
    font-size: clamp(1.6rem, 1rem + 3vw, 2.4rem);
  }

  .splash-right {
    padding: var(--space-6) var(--space-4);
    align-items: flex-start;
  }

  .splash-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .experience {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: auto;
    max-height: 50vh;
    border-right: none;
    border-top: 1px solid var(--color-border);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  }

  .sidebar-header { order: -1; width: 100%; }
  .sidebar-section { display: none; }
  .sidebar-status { flex: 1; }
  .sidebar-controls {
    flex-direction: row;
    margin-top: 0;
    width: 100%;
    gap: var(--space-2);
  }
  .view-toggle { flex: 1; }
  .ctrl-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; }

  .canvas-area {
    grid-row: 1;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .transit-line,
  .splash-pulse,
  .status-dot,
  .np-instrument.active .np-icon {
    animation: none;
  }
  .splash-eyebrow,
  .splash-headline,
  .splash-divider,
  .splash-body,
  .splash-actions {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ===== STOP ARRIVAL POPUP ===== */
.maplibregl-popup-content {
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  font-family: var(--font-body);
  overflow: hidden;
}
.maplibregl-popup-tip {
  border-top-color: var(--bg-card);
}
.maplibregl-popup-close-button {
  color: var(--text-secondary);
  font-size: 18px;
  padding: 4px 8px;
  right: 2px;
  top: 2px;
}
.maplibregl-popup-close-button:hover {
  background: transparent;
  color: var(--text-primary);
}
.stop-popup-content {
  padding: 10px 14px 8px;
  min-width: 160px;
}
.stop-popup-content strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.stop-arrivals-loading,
.stop-arrivals-none {
  font-size: 11px;
  color: var(--text-secondary);
  padding: 4px 0 2px;
}
.stop-arrival-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  border-top: 1px solid var(--border);
}
.stop-arrival-row:first-of-type {
  border-top: none;
}
.stop-arrival-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 20px;
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.stop-arrival-dest {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 11px;
}
.stop-arrival-time {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  font-size: 12px;
}
