:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-2: #eef4fb;
  --line: #c8d4e2;
  --text: #17212f;
  --muted: #526173;
  --accent: #006fd6;
  --accent-2: #0b7a3b;
  --danger: #b42318;
  --shadow: 0 14px 34px rgba(21, 39, 64, 0.13);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101722;
  --panel: #17212f;
  --panel-2: #202c3b;
  --line: #334457;
  --text: #eef4fb;
  --muted: #aab7c6;
  --accent: #66b7ff;
  --accent-2: #6ee7a7;
  --danger: #ff8a80;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .ghost.active,
:root[data-theme="dark"] .station.active,
:root[data-theme="dark"] .favorite-stop-btn.active,
:root[data-theme="dark"] .map-test-point-control.active,
:root[data-theme="dark"] .map-fullscreen-control.active {
  background: #213a52;
}

:root[data-theme="dark"] .transport-filter-chip {
  background: var(--panel-2);
  color: var(--muted);
}

:root[data-theme="dark"] .transport-filter-chip.nearby-filter--bus.active,
:root[data-theme="dark"] .route-pill--bus,
:root[data-theme="dark"] .transport-button--bus,
:root[data-theme="dark"] .transport-group--bus {
  border-color: #8f4248;
  background: #3a2226;
  color: #ff9f9a;
}

:root[data-theme="dark"] .transport-filter-chip.nearby-filter--trolley.active,
:root[data-theme="dark"] .route-pill--trolley,
:root[data-theme="dark"] .transport-button--trolley,
:root[data-theme="dark"] .transport-group--trolley {
  border-color: #3d6f9b;
  background: #1d3148;
  color: #8dccff;
}

:root[data-theme="dark"] .transport-filter-chip.nearby-filter--tram.active,
:root[data-theme="dark"] .route-pill--tram,
:root[data-theme="dark"] .transport-button--tram,
:root[data-theme="dark"] .transport-group--tram {
  border-color: #3c7d58;
  background: #1d3828;
  color: #80e4a6;
}

:root[data-theme="dark"] .picker-letter {
  background: #22354a;
}

:root[data-theme="dark"] .distance,
:root[data-theme="dark"] .meta,
:root[data-theme="dark"] .nearby,
:root[data-theme="dark"] .small {
  color: #b8c5d4;
}

:root[data-theme="dark"] .direction {
  color: #dce8f5;
}

:root[data-theme="dark"] input::placeholder {
  color: #7f8fa3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 20px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.is-hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.shell {
  display: flex;
  flex-direction: column;
  width: min(1160px, calc(100% - 28px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 16px 0 44px;
}

.hero {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0 12px;
}

.hero > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  max-width: 100%;
  font-size: clamp(26px, 7.2vw, 58px);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title-locate-btn {
  display: grid;
  place-items: center;
  width: clamp(48px, 13vw, 62px);
  min-width: clamp(48px, 13vw, 62px);
  padding: 0;
  color: var(--accent);
}

.title-locate-btn svg {
  width: clamp(26px, 7vw, 32px);
  height: clamp(26px, 7vw, 32px);
}

.title-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.muted {
  color: var(--muted);
}

.small {
  margin: 6px 0 0;
  font-size: 18px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary,
.ghost,
.icon {
  min-height: 58px;
  border-radius: 8px;
  padding: 0 22px;
  color: var(--text);
  font-weight: 800;
}

.primary {
  background: var(--accent);
  color: #ffffff;
}

.ghost,
.icon {
  background: var(--panel);
  border: 2px solid var(--line);
}

.ghost.active {
  border-color: var(--accent);
  background: #e8f3ff;
  color: var(--accent);
}

.favorite-stop-btn {
  width: 58px;
  min-width: 58px;
  padding: 0;
  color: var(--muted);
}

.favorite-stop-btn svg {
  width: 32px;
  height: 32px;
}

.favorite-stop-btn.active {
  border-color: #d49a00;
  background: #fff5d6;
  color: #b77900;
}

.icon.title-locate-btn {
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--accent);
}

.panel {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.controls,
.map-panel {
  margin-bottom: 12px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: max-content;
  gap: 10px;
  position: relative;
  overflow: visible;
  padding: 14px;
  background: var(--panel);
}

.controls label {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

input {
  display: block;
  width: 100%;
  height: 52px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  background: var(--panel);
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 111, 214, 0.14);
}

.status {
  min-height: 28px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.status.error {
  color: var(--danger);
  font-weight: 800;
}

.choose-stop {
  display: block;
  width: 100%;
  min-height: 58px;
  margin: 0;
  border-radius: 8px;
}

.controls > :last-child,
.controls > .choose-stop:last-of-type {
  margin-bottom: 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px;
  border-bottom: 2px solid var(--line);
}

.nearby-geo-hint {
  margin: 0;
  padding: 12px 18px;
  border-bottom: 2px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.badge {
  min-width: 44px;
  border-radius: 999px;
  padding: 6px 12px;
  text-align: center;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
}

.transport-filter-chips {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
}

.transport-filter-chip {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  opacity: 0.55;
}

.transport-filter-chip.active {
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(0, 111, 214, 0.1);
}

.transport-filter-chip .route-icon {
  width: 28px;
  height: 28px;
}

.transport-filter-chip.nearby-filter--bus.active {
  border-color: #f09a9a;
  background: #ffeceb;
  color: #c62828;
}

.transport-filter-chip.nearby-filter--trolley.active {
  border-color: #91c8f8;
  background: #e8f3ff;
  color: #006fd6;
}

.transport-filter-chip.nearby-filter--tram.active {
  border-color: #8bd5a6;
  background: #e9f8ef;
  color: #128044;
}

.map {
  width: 100%;
  max-width: 100%;
  height: min(48vh, 460px);
  min-height: 330px;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
  background: var(--panel-2);
}

:root[data-theme="dark"] .leaflet-container {
  background: #101722;
}

:root[data-theme="dark"] .leaflet-tile {
  filter: brightness(0.72) saturate(0.78) contrast(1.08);
}

:root[data-theme="dark"] .leaflet-control-zoom a,
:root[data-theme="dark"] .leaflet-control-attribution {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.leaflet-popup-content {
  margin: 10px;
}

.map.is-hidden {
  display: none;
}

.map-panel {
  overflow: hidden;
}

body.map-fullscreen-active {
  overflow: hidden;
}

.map-panel--fullscreen {
  position: fixed;
  inset: 0;
  z-index: 7000;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--bg);
}

.map-panel--fullscreen .map-actions-under {
  display: none;
}

.map-panel--fullscreen .map {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  border-radius: 0;
}

.map-actions-under {
  display: grid;
  gap: 10px;
  padding: 8px;
  background: var(--panel);
}

.map-actions-under .primary,
.map-actions-under .ghost {
  width: 100%;
}

.modal-map-actions {
  border-bottom: 2px solid var(--line);
}

.modal-map {
  height: 280px;
  min-height: 240px;
  border-radius: 0;
  border-bottom: 2px solid var(--line);
}

.list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.empty {
  color: var(--muted);
}

.station-empty {
  display: grid;
  gap: 12px;
}

.station-empty .primary {
  width: 100%;
}

.nearby-geo-card {
  color: var(--text);
}

.nearby-geo-card > strong {
  font-size: 20px;
  line-height: 1.2;
}

.nearby-geo-card > span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.nearby-geo-actions {
  display: grid;
  gap: 10px;
}

.nearby-geo-actions .primary,
.nearby-geo-actions .ghost {
  width: 100%;
}

.about-entry {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.about-entry .primary {
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
}

.station,
.arrival,
.route-fallback {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.map-popup-card {
  display: grid;
  gap: 6px;
  width: 210px;
  border: 0;
  padding: 2px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.map-popup-title {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}

.map-popup-meta {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.station {
  position: relative;
  display: block;
  overflow: hidden;
}

.station-main {
  display: block;
  min-width: 0;
}

.station-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.station-title {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.station-distance-wrap {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.station--no-forecast {
  background: var(--panel-2);
}

.station-side {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  justify-items: end;
  gap: 6px;
  white-space: nowrap;
}

.station .distance {
  position: static;
  padding-top: 2px;
  white-space: nowrap;
}

.favorite-station .distance {
  position: static;
  padding-top: 0;
}

.favorite-station-star {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: #b77900;
}

.favorite-station-star svg {
  width: 100%;
  height: 100%;
}

.station > span:first-child {
  display: block;
  min-width: 0;
}

.station .station-name {
  padding-right: 0;
  line-height: 1.08;
}

.station .direction {
  max-width: 100%;
  padding-right: 0;
}

.station.active {
  border-color: var(--accent);
  background: #edf6ff;
}

.station-name,
.route-name {
  display: block;
  min-width: 0;
  max-width: 100%;
  font-size: 22px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

#forecastTitle {
  max-width: 100%;
  font-size: 26px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.distance,
.meta {
  display: block;
  color: var(--muted);
  font-size: 18px;
}

.nearby {
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
}

.direction {
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
}

.station-location-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-location-pin {
  display: inline-flex;
  width: 20px;
  height: 20px;
  color: #4b5563;
  flex: 0 0 auto;
}

.station-location-pin svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.station-location-arrow {
  color: #4b5563;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.station-location-end {
  min-width: 0;
}

.station-location-nowrap {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.station-location-street,
.station-location-target {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-location-target {
  flex: 1 1 auto;
}

.loading-line {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  color: var(--muted);
  font-size: 20px;
  font-weight: 800;
}

.loader {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 4px solid #c8d4e2;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.arrival {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.arrival:active {
  transform: translateY(1px);
}

.arrival--route {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.arrival-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.route-no-data {
  background: var(--panel-2);
}

.route-no-data--silent {
  grid-template-columns: auto minmax(0, 1fr);
}

.route-pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  border-radius: 8px;
  padding: 12px 14px;
  background: #e8f3ff;
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
  text-align: center;
  font-weight: 900;
}

.arrival > .route-pill {
  flex-direction: column;
  gap: 5px;
  width: 74px;
  min-width: 74px;
  padding: 10px 8px;
  font-size: 22px;
}

.arrival-main > .route-pill {
  flex-direction: column;
  gap: 5px;
  width: 74px;
  min-width: 74px;
  padding: 10px 8px;
  font-size: 22px;
}

.arrival > .route-pill .route-icon {
  width: 30px;
  height: 30px;
}

.arrival-main > .route-pill .route-icon {
  width: 30px;
  height: 30px;
}

.station-routes {
  display: block;
  line-height: 2.3;
  margin-top: 10px;
}

.station-route-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 9px;
  vertical-align: middle;
  white-space: normal;
}

.station-route-item--pill-only {
  margin-right: 6px;
}

.station-route-pills {
  display: inline-flex;
  flex: 0 1 auto;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.station-route-terminal {
  display: inline;
  min-width: 0;
  overflow: visible;
  font-size: 13px;
  font-weight: 750;
  hyphens: auto;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-overflow: clip;
  vertical-align: middle;
  -webkit-hyphens: auto;
  white-space: normal;
  word-break: normal;
}

.station-route-terminal--bus {
  color: #c62828;
}

.station-route-terminal--trolley {
  color: #006fd6;
}

.station-route-terminal--tram {
  color: #128044;
}

.search-suggestions {
  position: absolute;
  z-index: 30;
  top: 102px;
  right: 14px;
  left: 14px;
  max-height: min(52vh, 420px);
  overflow: auto;
  margin: 0;
  border: 2px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-suggestion {
  min-height: 78px;
}

#searchInput[readonly] {
  cursor: pointer;
}

.search-screen-fixed {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--panel);
}

.search-screen-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 2px solid var(--line);
}

.search-screen-actions {
  display: flex;
  justify-content: flex-end;
}

.search-screen-head h2 {
  margin: 0;
}

.search-screen-tools {
  padding: 14px;
  border-bottom: 2px solid var(--line);
}

#searchScreenSuggestions {
  position: static;
  width: 100%;
  max-width: 100%;
  max-height: none;
  overflow-x: hidden;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#searchScreen .screen-card {
  overflow-x: hidden;
}

#favoritesScreen {
  background: #f4c542;
}

.about-content {
  display: grid;
  gap: 12px;
  padding: 18px;
  font-size: 16px;
}

.about-card {
  width: min(720px, 100%);
}

.about-card .search-screen-head {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px 16px;
}

.about-card .search-screen-head h2 {
  font-size: 26px;
}

.about-card .icon {
  min-height: 46px;
  padding: 0 16px;
  font-size: 16px;
}

.about-section {
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

:root[data-theme="dark"] .about-section {
  background: linear-gradient(180deg, #1b2635, #16202d);
}

.about-section h3 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 18px;
}

.about-section p {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
}

.about-section p:last-child {
  margin-bottom: 0;
}

.about-section ul {
  margin: 10px 0 0;
  padding-left: 22px;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.about-section code {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.about-section li {
  overflow-wrap: anywhere;
}

.about-section a {
  color: var(--accent);
}

.install-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.install-button {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 16px;
  background: #2f3a45;
  color: #ffffff;
  font-size: 16px;
  font-weight: 850;
}

.install-button:disabled {
  opacity: 0.6;
}

.install-note {
  color: var(--muted) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.feedback-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.feedback-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 650;
}

.feedback-form textarea {
  resize: vertical;
  min-height: 118px;
}

.feedback-form input:focus,
.feedback-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}

:root[data-theme="dark"] .install-button {
  background: #d9e2ec;
  color: #111827;
}

.about-memory {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  opacity: 0.78;
  text-align: right;
}

#searchScreenSuggestions .station {
  max-width: 100%;
  min-width: 0;
}

#searchScreenSuggestions .station > span {
  min-width: 0;
}

.route-pill--small {
  min-width: auto;
  gap: 6px;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 18px;
  line-height: 1.1;
  vertical-align: middle;
}

.route-pill--small .route-icon {
  width: 22px;
  height: 22px;
}

.route-pill--bus {
  background: #ffeceb;
  color: #c62828;
}

.route-pill--trolley {
  background: #e8f3ff;
  color: #006fd6;
}

.route-pill--tram {
  background: #e9f8ef;
  color: #128044;
}

.route-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.route-pill--small .route-icon {
  width: 22px;
  height: 22px;
}

.route-direction {
  display: inline-flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.32em;
  align-items: baseline;
}

.route-direction-from {
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 750;
}

.route-direction-arrow {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  font-size: 0.82em;
  font-weight: 850;
  line-height: 1;
}

.route-direction-nowrap {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.route-direction-end {
  display: inline;
  align-items: center;
  white-space: nowrap;
}

.arrival .route-direction-end {
  flex-basis: 100%;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}

.route-direction-to {
  min-width: 0;
  color: var(--text);
  font-weight: 950;
  overflow-wrap: break-word;
}

.vehicle-route-title {
  min-width: 0;
  vertical-align: middle;
}

.route-title-type {
  color: currentColor;
  font-size: 0.72em;
  font-weight: 950;
}

.minutes {
  color: var(--accent-2);
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
}

.arrival--route .minutes {
  justify-self: start;
}

.arrival-time-block {
  display: grid;
  gap: 2px;
  justify-items: start;
}

.route-change-inline {
  color: var(--danger);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}

.station-marker {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--marker-bg, #7c8a99);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.user-location-marker {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #005bd1;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 91, 209, 0.36);
}

.user-location-marker svg {
  width: 23px;
  height: 23px;
}

.vehicle-marker {
  display: grid;
  place-items: center;
  width: 46px;
  height: 52px;
  background: transparent !important;
  color: #ffffff;
  filter: drop-shadow(0 5px 14px rgba(0, 0, 0, 0.34));
}

.vehicle-div-icon {
  border: 0 !important;
  background: transparent !important;
}

.leaflet-div-icon {
  border: 0 !important;
  background: transparent !important;
}

.vehicle-marker-drop {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50% 50% 50% 8px;
  transform: rotate(-45deg);
}

.vehicle-marker.route-pill--bus .vehicle-marker-drop {
  background: #c62828;
}

.vehicle-marker.route-pill--tram .vehicle-marker-drop {
  background: #128044;
}

.vehicle-marker.route-pill--trolley .vehicle-marker-drop {
  background: #006fd6;
}

.vehicle-marker-drop strong {
  display: block;
  max-width: 30px;
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  transform: rotate(45deg);
}

.map-locate-control,
.map-test-point-control,
.map-fullscreen-control {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  border: 2px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  padding: 0;
  background: var(--panel);
  color: var(--accent);
  line-height: 0;
  box-shadow: 0 3px 10px rgba(21, 39, 64, 0.24);
}

.map-test-point-control,
.map-fullscreen-control {
  color: var(--muted);
}

.map-test-point-control.active,
.map-fullscreen-control.active {
  border-color: var(--accent);
  background: #e8f3ff;
  color: var(--accent);
}

.map-locate-control svg,
.map-test-point-control svg,
.map-fullscreen-control svg {
  display: block;
  width: 22px;
  height: 22px;
}

#mainMap .leaflet-top.leaflet-left {
  top: 50%;
  transform: translateY(-50%);
}

#mainMap .leaflet-top.leaflet-left .leaflet-control {
  margin-top: 0;
  margin-left: 8px;
}

#mainMap .leaflet-bottom.leaflet-left .leaflet-control {
  margin-bottom: 8px;
  margin-left: 8px;
}

#mainMap .leaflet-bottom.leaflet-right .leaflet-control {
  margin-right: 8px;
  margin-bottom: 8px;
}

.leaflet-top.leaflet-right {
  top: 50%;
  transform: translateY(-50%);
}

.leaflet-top.leaflet-right .leaflet-control {
  margin-top: 0;
  margin-right: 8px;
}

.leaflet-top.leaflet-right .map-zoom-value {
  margin-bottom: 6px;
  margin-right: 8px;
}

.map-zoom-value {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 34px;
  height: 44px;
  min-width: 34px;
  max-width: 34px;
  min-height: 44px;
  max-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.map-zoom-number {
  display: block;
  min-height: 16px;
  order: 2;
}

.map-zoom-loader {
  position: static;
  display: block;
  order: 1;
  width: 10px;
  height: 10px;
  margin-bottom: 4px;
  border: 2px solid #c8d4e2;
  border-top-color: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.8s linear infinite;
}

.map-zoom-value.is-loading .map-zoom-loader {
  opacity: 1;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 8000;
  overflow: auto;
  padding: 18px;
  background: var(--bg);
}

.modal[hidden] {
  display: none;
}

.modal {
  background: var(--station-screen-bg, var(--bg));
}

.screen {
  position: fixed;
  inset: 0;
  z-index: 7900;
  overflow: auto;
  padding: 18px;
  background: var(--bg);
}

.geo-prompt {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 23, 34, 0.48);
}

.geo-prompt-card {
  width: min(420px, 100%);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.geo-prompt-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.geo-prompt-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

.geo-prompt-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.vehicle-screen {
  z-index: 8100;
}

.vehicle-screen.route-screen--bus {
  background: #c62828;
}

.vehicle-screen.route-screen--trolley {
  background: #006fd6;
}

.vehicle-screen.route-screen--tram {
  background: #128044;
}

:root[data-theme="dark"] .vehicle-screen.route-screen--bus {
  background: #ff9f9a;
}

:root[data-theme="dark"] .vehicle-screen.route-screen--trolley {
  background: #8dccff;
}

:root[data-theme="dark"] .vehicle-screen.route-screen--tram {
  background: #80e4a6;
}

.vehicle-map {
  width: auto;
  max-width: calc(100% - 28px);
  margin: 0 14px 14px;
  height: 430px;
}

.vehicle-arrival {
  margin: 0 14px 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  color: var(--accent-2);
  font-size: 26px;
  font-weight: 950;
}

.vehicle-destination {
  display: inline-flex;
  min-width: 0;
  gap: 0.34em;
  align-items: baseline;
  font-weight: 950;
}

.vehicle-destination.route-pill--bus {
  color: #c62828;
}

.vehicle-destination.route-pill--tram {
  color: #128044;
}

.vehicle-destination.route-pill--trolley {
  color: #006fd6;
}

.vehicle-destination-arrow {
  font-weight: 950;
}

.route-change-note {
  display: block;
  margin-top: 10px;
  padding: 0;
  background: transparent;
  color: var(--danger);
  font-size: 17px;
  font-weight: 850;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.route-change-details {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 10px 0 0 22px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.route-change-details[hidden] {
  display: none;
}

.route-change-details li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.route-change-details span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.route-change-details strong {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.future-stop {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
}

.route-stop--no-time {
  grid-template-columns: 1fr;
}

.past-stops {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
}

.past-stops summary {
  padding: 14px 18px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}

.route-stop--past {
  margin: 0 12px 12px;
  border-color: var(--line);
  background: var(--bg);
  color: var(--muted);
}

.route-stop--past .station-name,
.route-stop--past .minutes {
  font-size: 18px;
}

.reverse-stops summary {
  color: var(--text);
}

.screen[hidden] {
  display: none;
}

.screen-card {
  width: min(940px, 100%);
  min-height: calc(100vh - 36px);
  margin: 0 auto;
  overflow-x: hidden;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.picker-tools {
  padding: 14px;
  border-bottom: 2px solid var(--line);
}

.station-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 2px solid var(--line);
}

.station-picker-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.station-picker-actions #closeStationPickerBtn {
  margin-left: auto;
}

.station-picker-head h2 {
  margin: 0;
  min-width: 0;
}

.letter-button {
  min-height: 86px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--accent);
  font-size: 38px;
  font-weight: 950;
  text-align: center;
  padding: 16px;
}

.letter-grid {
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
}

.transport-button {
  min-height: 110px;
  font-size: 26px;
}

.transport-list-button {
  width: 100%;
  min-height: 78px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  font-size: 28px;
  font-weight: 950;
}

.transport-button--bus {
  background: #ffeceb;
  color: #c62828;
}

.transport-button--tram {
  background: #e9f8ef;
  color: #128044;
}

.transport-button--trolley {
  background: #e8f3ff;
  color: #006fd6;
}

.picker-letter {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 12px 0 2px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #dce9f7;
  color: var(--accent);
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}

.picker-station {
  min-height: 76px;
  padding: 20px;
}

.picker-station .station-name {
  font-size: 28px;
}

.transport-group-title {
  margin: 14px 0 2px;
  border-radius: 8px;
  padding: 14px 18px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 28px;
  font-weight: 950;
}

.transport-group--bus {
  background: #ffeceb;
  color: #c62828;
}

.transport-group--trolley {
  background: #e8f3ff;
  color: #006fd6;
}

.transport-group--tram {
  background: #e9f8ef;
  color: #128044;
}

.transport-group--mixed,
.transport-group--loading,
.transport-group--empty {
  color: var(--muted);
}

.modal-card {
  width: min(940px, 100%);
  min-height: calc(100vh - 36px);
  margin: 0 auto;
  overflow-x: hidden;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#modal .modal-actions {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 0;
  gap: 8px;
}

#modal .section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 0;
}

#modal .section-head > div:first-child {
  min-width: 0;
}

#closeModalBtn {
  min-width: 0;
  padding: 0 14px;
}

#modal .favorite-stop-btn {
  width: 52px;
  min-width: 52px;
}

.modal-subhead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 18px 14px;
  border-bottom: 2px solid var(--line);
}

#modal .selected-station-location {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  padding: 0;
  border-bottom: 0;
  color: var(--text);
  line-height: 1.2;
  overflow: visible;
  white-space: normal;
}

#modal .selected-station-location .station-location-street,
#modal .selected-station-location .station-location-end,
#modal .selected-station-location .station-location-target {
  color: var(--text);
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

#vehicleScreen .modal-actions {
  flex-direction: column-reverse;
  align-items: flex-end;
}

.leaflet-control-attribution {
  font-size: 12px;
}

@media (max-width: 820px) {
  body {
    font-size: 19px;
  }

  .shell {
    width: min(100% - 20px, 1160px);
    padding-top: 8px;
  }

  .actions {
    display: grid;
    justify-content: stretch;
  }

  .map {
    height: 390px;
  }

  .arrival {
    grid-template-columns: auto 1fr;
  }

  .arrival--route {
    grid-template-columns: minmax(0, 1fr);
  }

  .vehicle-map {
    height: 390px;
  }

  .minutes {
    grid-column: 2;
  }

  .arrival--route .minutes {
    grid-column: auto;
  }

  .search-screen-head {
    grid-template-columns: 1fr;
  }

  .search-screen-actions {
    justify-content: flex-end;
  }

  .search-screen-head h2 {
    overflow-wrap: anywhere;
  }

  .about-card .search-screen-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .about-card .search-screen-head h2 {
    font-size: 26px;
  }

  #modal .section-head {
    gap: 10px;
    padding: 14px;
  }

  .modal-subhead {
    padding: 0 14px 12px;
  }

  #forecastTitle {
    font-size: 24px;
  }

  #closeModalBtn {
    padding: 0 12px;
  }

  #modal .favorite-stop-btn {
    width: 50px;
    min-width: 50px;
  }
}

#searchScreen .search-screen-head {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 8px 10px;
}

#searchScreen .search-screen-head h2 {
  min-width: 0;
  font-size: 22px;
  line-height: 1.08;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#searchScreen .search-screen-actions .icon {
  min-height: 38px;
  padding: 0 10px;
  font-size: 16px;
}

#searchScreen .search-screen-tools {
  padding: 8px 10px;
}
