:root {
  --bg: #f8fbff;
  --text: #17212b;
  --header: #ffffff;
  --border: #d7e2ef;
  --viewport-pad: 10px;
}

html,
body {
  height: 100%;
}

html {
  height: -webkit-fill-available;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}

.app-header {
  display: none !important;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: -webkit-fill-available;
}

.map-overlay {
  position: absolute;
  z-index: 3000;
  pointer-events: none;
}

.map-overlay > * {
  pointer-events: auto;
}

.map-overlay-top-left {
  top: calc(var(--viewport-pad) + 22px);
  left: calc(var(--viewport-pad) + 22px);
}

.map-overlay-top-right {
  top: calc(var(--viewport-pad) + 22px);
  right: calc(var(--viewport-pad) + 22px);
}

.map-panel {
  background: #ffffff;
  border: 1px solid #d7e2ef;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(12, 30, 46, 0.14);
  padding: 0.75rem;
}

.controls-panel {
  width: auto;
  max-width: calc(100vw - (var(--viewport-pad) * 2) - 8px);
  padding: 0.4rem;
  border-radius: 22px;
  border: 1px solid rgba(201, 220, 237, 0.95);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 34px rgba(12, 30, 46, 0.12);
}

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

.app-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #eff5ff;
  border: 1px solid #cfdded;
  color: #0f4c81;
  text-decoration: none;
  font-weight: 600;
}

.app-nav a:hover {
  background: #ffffff;
}

.refresh-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  color: #2f4a64;
  font-size: 0.9rem;
}

.refresh-status,
#manual-refresh-btn,
.route-overlay-status,
#route-overlay-status {
  display: none !important;
}

.api-status {
  margin-top: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #eef5ff;
  color: #1f3b57;
}

.map-overlay-status {
  left: 12px;
  bottom: 42px;
  max-width: min(420px, calc(100vw - 24px));
}

.api-status[hidden] {
  display: none;
}

.api-status[data-tone="warning"] {
  background: #fff4d6;
  color: #7a4b00;
}

.api-status[data-tone="error"] {
  background: #fde8e8;
  color: #8a1c1c;
}

#manual-refresh-btn {
  border: 1px solid var(--border);
  background: #ffffff;
  color: #16324b;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

#manual-refresh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.route-filter {
  position: relative;
  margin-top: 0;
}

#route-filter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-width: 210px;
  border: 1px solid #c4d8eb;
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  color: #14314a;
  border-radius: 999px;
  padding: 0.72rem 1rem 0.72rem 0.9rem;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 10px 20px rgba(27, 78, 126, 0.12);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

#route-filter-toggle::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2d87cc 0%, #15568b 100%);
  box-shadow: 0 0 0 5px rgba(21, 86, 139, 0.1);
  flex: 0 0 auto;
}

#route-filter-toggle::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid #315676;
  border-bottom: 2px solid #315676;
  transform: translateY(-1px) rotate(45deg);
  flex: 0 0 auto;
  transition: transform 120ms ease;
}

#route-filter-summary {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: left;
}

#route-filter-toggle:hover {
  background: linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
  border-color: #afcde5;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 14px 26px rgba(27, 78, 126, 0.16);
  transform: translateY(-1px);
}

#route-filter-toggle[aria-expanded="true"] {
  background: linear-gradient(180deg, #ffffff 0%, #e2efff 100%);
  border-color: #9fc1de;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 14px 28px rgba(27, 78, 126, 0.2);
}

#route-filter-toggle[aria-expanded="true"]::after {
  transform: translateY(2px) rotate(225deg);
}

#route-filter-toggle:focus-visible {
  outline: none;
  border-color: #7caed4;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 4px rgba(57, 126, 184, 0.18),
    0 14px 28px rgba(27, 78, 126, 0.18);
}

#route-filter-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  right: 0;
  width: min(240px, calc(100vw - (var(--viewport-pad) * 2) - 8px));
  max-height: 240px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(204, 220, 235, 0.95);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 36px rgba(9, 28, 44, 0.16);
  padding: 0.5rem;
  z-index: 3000;
}

#route-filter-menu:not([hidden]) {
  animation: route-filter-menu-in 140ms ease-out;
}

#route-filter-options {
  margin-top: 0.3rem;
}

.route-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.92rem;
  border-radius: 14px;
  color: #183650;
  transition:
    background 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}

.route-option:hover {
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(183, 210, 233, 0.8);
}

.route-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1466a3;
}

.route-option input:checked + span {
  color: #0f4c81;
}

.route-option span {
  font-weight: 600;
}

@keyframes route-filter-menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bus-marker-icon {
  width: 110px;
  height: 110px;
  background: transparent;
}

.bus-marker-svg-icon {
  width: 110px;
  height: 110px;
  background: transparent;
}

.bus-marker-svg {
  display: block;
  width: 110px;
  height: 110px;
  overflow: visible;
  transform: scale(var(--bus-marker-scale, 1));
  transform-origin: center center;
}

.bus-marker-svg-bus-art {
  filter: drop-shadow(0 1px 2px rgba(15, 35, 52, 0.2));
}

.bus-marker-svg-arrow-art {
  filter: drop-shadow(0 0 6px rgba(220, 38, 38, 0.22));
}

.bus-marker-svg-arrow-art-static {
  opacity: 0.76;
}

.bus-marker-svg-label {
  paint-order: stroke fill;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 0.85px;
  stroke-linejoin: round;
}

.bus-marker-inner {
  position: relative;
  width: 110px;
  height: 110px;
  transform: scale(var(--bus-marker-scale, 1));
  transform-origin: center center;
}

.bus-marker-glyph {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(15, 35, 52, 0.28));
  transform: translate(-50%, -50%);
}

.bus-marker-direction {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 28px;
  transform: translate(-50%, -50%) rotate(var(--bearing, 0deg)) translateY(-46px);
  transform-origin: center center;
}

.bus-marker-direction-glow {
  position: absolute;
  inset: -1px;
  background: rgba(220, 38, 38, 0.5);
  box-shadow: 0 0 9px rgba(220, 38, 38, 0.26);
  filter: blur(6px);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  animation: bus-marker-direction-pulse 1.8s ease-in-out infinite;
}

.bus-marker-direction-face {
  position: absolute;
  inset: 0;
  background: #dc2626;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 1px 1px rgba(15, 35, 52, 0.28));
}

.bus-marker-direction-label {
  position: absolute;
  top: 72%;
  left: 50%;
  max-width: 22px;
  color: #ffffff;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  text-shadow: 0 1px 1px rgba(112, 19, 19, 0.45);
  transform: translate(-50%, -50%) rotate(var(--inverse-bearing, 0deg));
}

.bus-marker-direction-static .bus-marker-direction-glow {
  opacity: 0.72;
}

.marker-density-high .bus-marker-direction-glow {
  animation: none;
  filter: none;
  box-shadow: 0 0 4px rgba(220, 38, 38, 0.18);
  opacity: 0.45;
}

.marker-density-high .bus-marker-direction-face,
.marker-density-high .bus-marker-glyph {
  filter: none;
}

.marker-density-high .bus-marker-svg-arrow-art {
  filter: none;
  opacity: 0.68;
}

.marker-density-high .bus-marker-svg-bus-art {
  filter: none;
}

@keyframes bus-marker-direction-pulse {
  0% {
    opacity: 0.62;
    transform: scale(0.94);
  }
  50% {
    opacity: 0.92;
    transform: scale(1.12);
  }
  100% {
    opacity: 0.62;
    transform: scale(0.94);
  }
}

.vehicle-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border: 1px solid rgba(201, 220, 237, 0.95);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(10, 29, 45, 0.18);
  overflow: hidden;
}

.vehicle-popup .leaflet-popup-content {
  margin: 0;
  min-width: 220px;
}

.vehicle-popup .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
}

.vehicle-popup .leaflet-popup-close-button {
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  color: #6b8296;
  font-size: 20px;
}

.vehicle-popup .leaflet-popup-close-button:hover {
  color: #16324b;
}

.vehicle-popup-card {
  padding: 0.95rem 1rem 1rem;
  background:
    radial-gradient(circle at top left, rgba(33, 123, 191, 0.14), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  color: #14314a;
}

.vehicle-popup-meta {
  margin-bottom: 0.55rem;
}

.vehicle-popup-route {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: #e9f4ff;
  color: #0f4c81;
  border: 1px solid #c8ddf0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.vehicle-popup-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #6d8397;
}

.vehicle-popup-stop {
  margin-top: 0.3rem;
  font-size: 1.04rem;
  line-height: 1.3;
  font-weight: 700;
  color: #183650;
}

.vehicle-popup-eta {
  margin-top: 0.85rem;
  font-size: 1.15rem;
  line-height: 1.1;
  font-weight: 800;
  color: #0f5f9a;
}

.vehicle-popup-time {
  margin-top: 0.18rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #688096;
}

.vehicle-popup-card-unavailable .vehicle-popup-stop {
  color: #4f667a;
  font-size: 0.98rem;
  font-weight: 600;
}

.stop-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border: 1px solid rgba(201, 220, 237, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 30px rgba(10, 29, 45, 0.15);
  overflow: hidden;
}

.stop-popup .leaflet-popup-content {
  margin: 0;
  width: 228px !important;
}

.stop-popup .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
}

.stop-popup .leaflet-popup-close-button {
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  color: #72879a;
  font-size: 18px;
}

.stop-popup .leaflet-popup-close-button:hover {
  color: #16324b;
}

.stop-popup-card {
  padding: 0.78rem 0.85rem 0.82rem;
  background:
    radial-gradient(circle at top left, rgba(20, 102, 163, 0.1), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  color: #14314a;
}

.stop-popup-card-quiet .stop-popup-status {
  color: #50687c;
}

.stop-popup-title {
  padding-right: 1.25rem;
  font-size: 0.94rem;
  line-height: 1.25;
  font-weight: 700;
  color: #17334c;
}

.stop-popup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.48rem;
}

.stop-popup-route,
.stop-popup-id {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.stop-popup-route {
  background: #e8f3ff;
  border: 1px solid #c7dcf0;
  color: #0f4c81;
}

.stop-popup-id {
  background: #f3f7fb;
  border: 1px solid #d9e4ee;
  color: #607789;
}

.stop-popup-section-label {
  margin-top: 0.72rem;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6e8498;
}

.stop-popup-status {
  margin-top: 0.28rem;
  font-size: 0.86rem;
  line-height: 1.35;
  font-weight: 600;
}

.stop-popup-arrivals {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.38rem;
  max-height: 170px;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.stop-popup-arrival {
  padding: 0.5rem 0.55rem;
  border-radius: 12px;
  background: rgba(238, 246, 255, 0.8);
  border: 1px solid #d6e5f3;
}

.stop-popup-arrival-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.stop-popup-arrival-route {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f4c81;
}

.stop-popup-arrival-minutes {
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 800;
  color: #13639f;
}

.stop-popup-arrival-bottom {
  margin-top: 0.22rem;
  font-size: 0.8rem;
  line-height: 1.32;
  color: #486174;
}

.user-marker-icon {
  width: 16px;
  height: 16px;
}

.user-marker-dot {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #dc2626;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(127, 29, 29, 0.45);
  animation: user-marker-pulse 1.6s ease-in-out infinite;
}

.user-marker-icon .user-marker-dot {
  text-align: center;
}

@keyframes user-marker-pulse {
  0% {
    background: #dc2626;
    box-shadow: 0 0 0 1px rgba(127, 29, 29, 0.45), 0 0 0 0 rgba(220, 38, 38, 0.35);
  }
  50% {
    background: #ef4444;
    box-shadow: 0 0 0 1px rgba(127, 29, 29, 0.55), 0 0 0 8px rgba(220, 38, 38, 0.12);
  }
  100% {
    background: #dc2626;
    box-shadow: 0 0 0 1px rgba(127, 29, 29, 0.45), 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

#map {
  position: absolute;
  inset: var(--viewport-pad);
  width: auto;
  height: auto;
  min-height: 0;
  z-index: 1;
  border-radius: 16px;
  overflow: hidden;
}

#map .leaflet-top {
  top: 20px;
}

#map .leaflet-control-recenter {
  margin-top: 10px;
  border: none;
  background: transparent;
  box-shadow: none;
}

.leaflet-control-recenter-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(196, 216, 235, 0.98);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 12px 24px rgba(12, 30, 46, 0.14);
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

.leaflet-control-recenter-button:hover {
  transform: translateY(-1px);
  border-color: rgba(164, 194, 220, 0.98);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 16px 28px rgba(12, 30, 46, 0.16);
}

.leaflet-control-recenter-button:focus-visible {
  outline: none;
  border-color: #7caed4;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 4px rgba(57, 126, 184, 0.18),
    0 16px 28px rgba(12, 30, 46, 0.16);
}

.leaflet-control-recenter-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid #15568b;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(21, 86, 139, 0.08);
}

.leaflet-control-recenter-icon::before,
.leaflet-control-recenter-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #15568b;
  transform: translate(-50%, -50%);
}

.leaflet-control-recenter-icon::before {
  width: 2px;
  height: 14px;
}

.leaflet-control-recenter-icon::after {
  width: 14px;
  height: 2px;
}

@media (max-width: 720px) {
  .app-shell {
    min-height: 100svh;
    min-height: 100dvh;
  }

  #map {
    bottom: calc(var(--viewport-pad) + 2px);
  }

  #map .leaflet-control-zoom {
    display: none;
  }

  #map .leaflet-top.leaflet-left {
    top: auto;
    bottom: calc(var(--viewport-pad) + 37px + env(safe-area-inset-bottom, 0px));
  }

  #map .leaflet-control-recenter {
    margin-top: 0;
  }

  .map-overlay-top-left {
    top: calc(var(--viewport-pad) + 12px);
    left: calc(var(--viewport-pad) + 12px);
    right: calc(var(--viewport-pad) + 12px);
  }

  .map-overlay-top-right {
    top: auto;
    bottom: calc(var(--viewport-pad) + 48px + env(safe-area-inset-bottom, 0px));
    left: calc(var(--viewport-pad) + 56px);
    right: auto;
  }

  .map-overlay-status {
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }

  .app-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .controls-panel {
    width: auto;
    padding: 0.18rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
  }

  #route-filter-toggle {
    justify-content: center;
    min-width: 60px;
    width: auto;
    height: 30px;
    gap: 0.24rem;
    padding: 0 0.25rem;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.98),
      0 8px 18px rgba(27, 78, 126, 0.12);
  }

  #route-filter-toggle::before {
    width: 6px;
    height: 6px;
    box-shadow: 0 0 0 2px rgba(21, 86, 139, 0.12);
  }

  #route-filter-toggle::after {
    display: none;
  }

  #route-filter-summary {
    display: inline;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  #route-filter-menu {
    top: auto;
    bottom: calc(100% + 0.55rem);
    left: 0;
    right: auto;
    width: min(176px, calc(100vw - (var(--viewport-pad) * 2) - 72px));
    max-height: min(240px, 42vh);
    transform-origin: bottom left;
  }

  .vehicle-popup .leaflet-popup-content-wrapper {
    border-radius: 14px;
  }

  .vehicle-popup .leaflet-popup-content {
    width: 136px !important;
    min-width: 0;
  }

  .vehicle-popup .leaflet-popup-close-button {
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    font-size: 15px;
  }

  .vehicle-popup-card {
    padding: 0.5rem 0.55rem 0.55rem;
  }

  .vehicle-popup-meta {
    margin-bottom: 0.32rem;
  }

  .vehicle-popup-route {
    min-height: 20px;
    padding: 0.08rem 0.38rem;
    font-size: 0.55rem;
    letter-spacing: 0.04em;
  }

  .vehicle-popup-label {
    font-size: 0.5rem;
    letter-spacing: 0.08em;
  }

  .vehicle-popup-stop {
    margin-top: 0.18rem;
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .vehicle-popup-eta {
    margin-top: 0.45rem;
    font-size: 0.78rem;
  }

  .vehicle-popup-time {
    margin-top: 0.1rem;
    font-size: 0.58rem;
  }

  .vehicle-popup-card-unavailable .vehicle-popup-stop {
    font-size: 0.66rem;
  }

  .stop-popup .leaflet-popup-content-wrapper {
    border-radius: 14px;
  }

  .stop-popup .leaflet-popup-content {
    width: 138px !important;
  }

  .stop-popup .leaflet-popup-close-button {
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    font-size: 15px;
  }

  .stop-popup-card {
    padding: 0.48rem 0.55rem 0.52rem;
  }

  .stop-popup-title {
    padding-right: 0.9rem;
    font-size: 0.68rem;
    line-height: 1.18;
  }

  .stop-popup-meta {
    gap: 0.22rem;
    margin-top: 0.28rem;
  }

  .stop-popup-route,
  .stop-popup-id {
    min-height: 18px;
    padding: 0.02rem 0.3rem;
    font-size: 0.5rem;
  }

  .stop-popup-section-label {
    margin-top: 0.42rem;
    font-size: 0.48rem;
    letter-spacing: 0.07em;
  }

  .stop-popup-status {
    margin-top: 0.16rem;
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .stop-popup-arrivals {
    margin-top: 0.28rem;
    gap: 0.22rem;
    max-height: 108px;
    padding-right: 0.05rem;
  }

  .stop-popup-arrival {
    padding: 0.28rem 0.34rem;
    border-radius: 9px;
  }

  .stop-popup-arrival-top {
    gap: 0.28rem;
  }

  .stop-popup-arrival-route {
    font-size: 0.52rem;
    letter-spacing: 0.03em;
  }

  .stop-popup-arrival-minutes {
    font-size: 0.58rem;
  }

  .stop-popup-arrival-bottom {
    margin-top: 0.12rem;
    font-size: 0.58rem;
    line-height: 1.16;
  }
}
