:root {
  --bg: #eef3f8;
  --surface: #ffffff;
  --surface-soft: rgba(255,255,255,.92);
  --text: #132033;
  --muted: #6b7788;
  --line: #dce4ed;
  --brand: #0b5fff;
  --brand-dark: #064bc7;
  --tram: #d94b4b;
  --trol: #1478c9;
  --bus: #15915d;
  --shadow: 0 14px 40px rgba(26, 48, 78, .12);
  --radius: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
body { overscroll-behavior-y: none; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.transport-app { min-height: 100vh; padding-bottom: calc(22px + var(--safe-bottom)); }
.topbar { position: sticky; top: 0; z-index: 900; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 70px; padding: calc(10px + var(--safe-top)) 14px 10px; background: rgba(255,255,255,.94); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(220,228,237,.86); }
.brand { min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { flex: 0 0 auto; border-radius: 12px; box-shadow: 0 6px 18px rgba(11,95,255,.18); }
.brand span { min-width: 0; display: grid; }
.brand strong { font-size: 16px; line-height: 1.15; }
.brand small { margin-top: 3px; max-width: 175px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 11px; }
.topbar__actions { display: flex; align-items: center; gap: 7px; }
.header-btn, .icon-btn { border: 0; border-radius: 13px; min-height: 40px; padding: 0 12px; background: #edf3fb; color: #21405f; font-weight: 800; cursor: pointer; }
.header-btn--primary { background: var(--brand); color: white; }
.icon-btn { width: 40px; padding: 0; font-size: 22px; }
.icon-btn.is-loading { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.main { width: min(1180px, 100%); margin: 0 auto; padding: 14px; }
.live-head { background: linear-gradient(135deg, #0b5fff, #0b79d0); color: white; border-radius: var(--radius); padding: 17px; box-shadow: var(--shadow); }
.live-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.eyebrow { margin: 0 0 5px; font-size: 11px; line-height: 1.2; letter-spacing: .09em; text-transform: uppercase; font-weight: 900; opacity: .72; }
.live-title-row h1 { margin: 0; font-size: clamp(22px, 6vw, 31px); line-height: 1.1; }
.live-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 8px 10px; background: rgba(255,255,255,.15); font-size: 11px; font-weight: 800; }
.live-pill i { width: 8px; height: 8px; border-radius: 50%; background: #74f3a2; box-shadow: 0 0 0 4px rgba(116,243,162,.14); }
.live-pill.is-error i { background: #ff9e9e; }
.stats-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 17px; }
.stats-row > div { min-width: 0; padding: 10px; background: rgba(255,255,255,.12); border-radius: 14px; }
.stats-row strong { display: block; font-size: 20px; line-height: 1; }
.stats-row span { display: block; margin-top: 5px; color: rgba(255,255,255,.82); font-size: 10px; }

.filter-wrap { position: sticky; top: calc(70px + var(--safe-top)); z-index: 810; padding: 10px 0 8px; background: linear-gradient(var(--bg) 72%, rgba(238,243,248,0)); }
.filters { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; min-height: 39px; padding: 0 13px; background: white; color: #33455b; font-weight: 800; cursor: pointer; box-shadow: 0 4px 12px rgba(24,44,70,.04); }
.filter.is-active { border-color: var(--brand); background: var(--brand); color: white; }

.map-card { position: relative; overflow: hidden; min-height: 470px; height: min(68vh, 720px); border-radius: var(--radius); background: #dfe8ef; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map { width: 100%; height: 100%; background: #dfe8ef; }
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 9px !important; }
.leaflet-control-zoom { border: 0 !important; box-shadow: 0 5px 18px rgba(27,49,77,.14) !important; }
.leaflet-control-zoom a { border: 0 !important; color: #27435f !important; }
.locate-btn, .all-routes-btn { position: absolute; z-index: 550; border: 0; cursor: pointer; box-shadow: 0 8px 24px rgba(29,47,72,.16); }
.locate-btn { right: 12px; top: 12px; width: 46px; height: 46px; border-radius: 15px; background: rgba(255,255,255,.96); color: #21405f; font-size: 25px; }
.all-routes-btn { left: 12px; bottom: 14px; min-height: 43px; padding: 0 14px; border-radius: 14px; background: #142033; color: white; font-weight: 900; }
.map-error { position: absolute; z-index: 600; inset: auto 12px 14px 12px; padding: 12px 14px; border-radius: 15px; background: rgba(132,32,32,.94); color: white; box-shadow: var(--shadow); }
.map-error strong, .map-error span { display: block; }
.map-error span { margin-top: 3px; font-size: 11px; opacity: .85; }

.vehicle-leaflet-icon { background: transparent !important; border: 0 !important; }
.vehicle-marker { position: relative; width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; border: 2px solid white; color: white; box-shadow: 0 7px 20px rgba(17,31,49,.26); user-select: none; }
.vehicle-marker--tram { background: var(--tram); }
.vehicle-marker--trol { background: var(--trol); }
.vehicle-marker--bus { background: var(--bus); }
.vehicle-marker__number { position: relative; z-index: 2; max-width: 34px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1; font-weight: 950; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.vehicle-marker__arrow { position: absolute; z-index: 1; top: -10px; left: 15px; width: 10px; height: 15px; transform-origin: 5px 31px; color: #17263b; font-size: 13px; line-height: 1; text-shadow: 0 1px 1px white, 0 -1px 1px white, 1px 0 1px white, -1px 0 1px white; }
.vehicle-marker__count { position: absolute; z-index: 3; right: -7px; bottom: -6px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: #17263b; color: white; border: 2px solid white; font-size: 9px; font-weight: 900; }
.vehicle-marker.is-selected { outline: 4px solid rgba(11,95,255,.22); }


.stop-leaflet-icon { background: transparent !important; border: 0 !important; display: grid !important; place-items: center; cursor: pointer; }
.stop-marker { width: 11px; height: 11px; display: block; border-radius: 50%; background: var(--stop-color, var(--brand)); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(16,36,62,.30), 0 0 0 2px rgba(255,255,255,.40); transition: transform .12s ease; }
.stop-leaflet-icon:hover .stop-marker, .stop-leaflet-icon:focus .stop-marker { transform: scale(1.28); }
.stop-marker.is-terminal { width: 14px; height: 14px; box-shadow: 0 2px 9px rgba(16,36,62,.34), 0 0 0 3px rgba(255,255,255,.55); }
.stop-tooltip { padding: 4px 7px !important; border: 0 !important; border-radius: 9px !important; font-weight: 800; font-size: 11px; box-shadow: 0 5px 16px rgba(20,38,61,.14); }
.stop-popup, .vehicle-popup { min-width: 165px; }
.stop-popup strong, .stop-popup span, .vehicle-popup strong, .vehicle-popup span { display: block; }
.stop-popup strong, .vehicle-popup strong { padding-right: 12px; color: var(--text); font-size: 14px; line-height: 1.25; }
.stop-popup > span:last-child, .vehicle-popup span { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.stop-popup__kind { margin-bottom: 4px; color: var(--brand) !important; font-size: 9px !important; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.transport-stop-popup .leaflet-popup-content-wrapper, .transport-vehicle-popup .leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: 0 10px 30px rgba(17,36,62,.18); }
.transport-stop-popup .leaflet-popup-content, .transport-vehicle-popup .leaflet-popup-content { margin: 11px 13px; }
.transport-stop-popup .leaflet-popup-tip, .transport-vehicle-popup .leaflet-popup-tip { box-shadow: 3px 3px 8px rgba(17,36,62,.08); }

.selected-card { margin-top: 12px; padding: 15px; border-radius: var(--radius); background: white; border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(27,48,75,.07); }
.selected-card__head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.selected-route-badge { min-width: 54px; height: 54px; padding: 0 9px; display: grid; place-items: center; border-radius: 17px; background: var(--brand); color: white; font-size: 18px; font-weight: 950; }
.selected-card__title { min-width: 0; }
.selected-card__title h2 { margin: 0; font-size: 20px; }
.selected-card__title span { display: block; margin-top: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 11px; }
.close-btn { width: 38px; height: 38px; border: 0; border-radius: 12px; background: #eef3f8; color: #43536a; font-size: 25px; cursor: pointer; }
.selected-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 14px; }
.selected-stats > div { padding: 10px; border-radius: 14px; background: #f5f8fb; }
.selected-stats strong { display: block; font-size: 18px; }
.selected-stats span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.selected-note { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

.drawer-backdrop { position: fixed; z-index: 1190; inset: 0; background: rgba(14,25,40,.35); backdrop-filter: blur(3px); }
.routes-drawer { position: fixed; z-index: 1200; left: 0; right: 0; bottom: 0; max-height: min(82vh, 780px); padding: 10px 14px calc(14px + var(--safe-bottom)); transform: translateY(105%); transition: transform .22s ease; background: white; border-radius: 24px 24px 0 0; box-shadow: 0 -18px 60px rgba(18,35,58,.2); }
.routes-drawer.is-open { transform: translateY(0); }
.drawer-handle { width: 44px; height: 5px; margin: 0 auto 12px; border-radius: 99px; background: #d8e0e8; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drawer-head h2 { margin: 0; font-size: 22px; }
.route-search { display: grid; gap: 5px; margin-top: 13px; color: var(--muted); font-size: 10px; font-weight: 800; }
.route-search input { width: 100%; height: 45px; border: 1px solid var(--line); border-radius: 14px; padding: 0 13px; outline: none; background: #f7f9fc; color: var(--text); font-size: 15px; }
.route-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,95,255,.1); }
.drawer-filters { display: flex; gap: 7px; margin-top: 10px; }
.drawer-filter { min-width: 48px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: white; font-weight: 900; cursor: pointer; }
.drawer-filter.is-active { border-color: var(--brand); background: var(--brand); color: white; }
.route-list { margin-top: 11px; max-height: calc(min(82vh, 780px) - 205px); overflow: auto; border-top: 1px solid var(--line); }
.route-row { width: 100%; min-height: 61px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; border: 0; border-bottom: 1px solid #edf1f5; padding: 8px 2px; background: white; color: inherit; text-align: left; cursor: pointer; }
.route-row__badge { min-width: 45px; height: 39px; padding: 0 8px; display: grid; place-items: center; border-radius: 12px; color: white; font-weight: 950; }
.route-row__badge--tram { background: var(--tram); }
.route-row__badge--trol { background: var(--trol); }
.route-row__badge--bus { background: var(--bus); }
.route-row__body strong, .route-row__body span { display: block; }
.route-row__body strong { font-size: 13px; }
.route-row__body span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.route-row__live { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 6px 8px; background: #eef8f3; color: #08744a; font-size: 10px; font-weight: 900; }
.route-row__live.is-offline { background: #f3f5f7; color: #7b8795; }
.route-list-empty { padding: 30px 12px; text-align: center; color: var(--muted); font-size: 12px; }

.install-banner[hidden] { display: none !important; }
.install-banner { position: fixed; z-index: 1300; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); display: grid; grid-template-columns: 1fr auto auto; gap: 9px; align-items: center; padding: 12px; border-radius: 18px; background: #132033; color: white; box-shadow: 0 16px 50px rgba(16,29,46,.28); }
.install-banner strong, .install-banner span { display: block; }
.install-banner strong { font-size: 12px; }
.install-banner span { margin-top: 3px; color: #b9c5d3; font-size: 10px; }
.install-banner button { border: 0; border-radius: 12px; min-height: 38px; padding: 0 11px; background: var(--brand); color: white; font-weight: 900; }
.install-banner .install-banner__close { width: 42px; min-width: 42px; height: 42px; padding: 0; background: rgba(255,255,255,.1); font-size: 21px; line-height: 1; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.toast { position: fixed; z-index: 1400; left: 50%; bottom: calc(18px + var(--safe-bottom)); transform: translateX(-50%); max-width: min(92vw, 520px); padding: 10px 13px; border-radius: 13px; background: #17263b; color: white; box-shadow: var(--shadow); font-size: 11px; font-weight: 800; }

@media (min-width: 760px) {
  .topbar { padding-left: 24px; padding-right: 24px; }
  .main { padding: 20px 24px 28px; }
  .live-head { padding: 22px; }
  .stats-row { max-width: 560px; }
  .map-card { min-height: 590px; }
  .routes-drawer { left: auto; right: 18px; bottom: 18px; width: 430px; border-radius: 24px; max-height: min(84vh, 760px); transform: translateX(112%); }
  .routes-drawer.is-open { transform: translateX(0); }
  .drawer-backdrop { background: rgba(14,25,40,.2); }
}

@media (max-width: 520px) {
  .header-btn { padding: 0 9px; font-size: 11px; }
  .header-btn--primary { display: none; }
  .map-card { height: 62vh; min-height: 455px; border-radius: 19px; }
  .main { padding: 11px; }
  .live-head { border-radius: 19px; padding: 15px; }
  .brand strong { font-size: 14px; }
  .brand small { max-width: 130px; }
  .stats-row strong { font-size: 18px; }
  .selected-card { border-radius: 19px; }
  .vehicle-marker { width: 40px; height: 40px; border-radius: 14px; }
}

/* v2.2: longer install action label */
.install-banner > button:not(.install-banner__close){white-space:nowrap;padding-left:13px;padding-right:13px;}


/* ==========================================================
   v2.3 Route preview -> fullscreen route flow
   ========================================================== */

.route-preview-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
}
.route-preview-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.route-preview-kind {
  margin: 0 48px 5px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.route-preview-card h2 {
  margin: 0 48px 0 0;
  font-size: clamp(22px, 5vw, 29px);
  line-height: 1.12;
}
.route-preview-endpoints {
  margin: 8px 46px 0 0;
  color: #3c4a5d;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}
.route-preview-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.route-preview-online {
  color: #08744a;
  font-size: 11px;
  font-weight: 900;
}
.open-full-route-btn {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 0 15px;
  background: var(--brand);
  color: #fff;
  font-weight: 950;
  cursor: pointer;
  white-space: nowrap;
}
.open-full-route-btn span {
  display: inline-block;
  margin-left: 5px;
  font-size: 18px;
  transform: translateY(1px);
}

.fullscreen-route-bar[hidden],
.fullscreen-hint[hidden] {
  display: none !important;
}
.map-card.is-fullscreen {
  position: fixed;
  z-index: 2000;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #e9eef4;
}
.map-card.is-fullscreen .map {
  height: 100%;
  min-height: 100%;
  border-radius: 0;
}
.route-fullscreen {
  overflow: hidden;
}
.route-fullscreen .topbar,
.route-fullscreen .live-head,
.route-fullscreen .filter-wrap,
.route-fullscreen .selected-card,
.route-fullscreen .install-banner {
  visibility: hidden;
}
.fullscreen-route-bar {
  position: absolute;
  z-index: 850;
  top: calc(10px + env(safe-area-inset-top));
  left: 10px;
  right: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.fullscreen-route-bar > * {
  pointer-events: auto;
}
.fullscreen-back,
.fullscreen-routes {
  min-height: 43px;
  border: 1px solid rgba(216,226,237,.9);
  border-radius: 14px;
  padding: 0 12px;
  background: rgba(255,255,255,.96);
  color: #142033;
  box-shadow: 0 8px 28px rgba(22,39,61,.16);
  font-weight: 950;
  backdrop-filter: blur(9px);
}
.fullscreen-route-title {
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid rgba(216,226,237,.9);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 28px rgba(22,39,61,.16);
  backdrop-filter: blur(9px);
}
.fullscreen-route-title span,
.fullscreen-route-title strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.fullscreen-route-title span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}
.fullscreen-route-title strong {
  margin-top: 2px;
  font-size: 12px;
}
.fullscreen-hint {
  position: absolute;
  z-index: 820;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 118px);
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(20,32,51,.88);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
}
.map-card.is-fullscreen .locate-btn {
  bottom: calc(16px + env(safe-area-inset-bottom));
  right: 14px;
}
.map-card.is-fullscreen .all-routes-btn {
  display: none !important;
}
.route-fullscreen .drawer-backdrop {
  z-index: 2190;
}
.route-fullscreen .routes-drawer {
  z-index: 2200;
}
.route-fullscreen .toast {
  z-index: 2300;
}
.vehicle-popup__technical {
  margin-top: 6px !important;
  padding-top: 5px;
  border-top: 1px solid #edf1f5;
  color: #627084 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px !important;
  word-break: break-all;
}

@media (max-width: 520px) {
  .route-preview-bottom {
    align-items: stretch;
    flex-direction: column;
  }
  .open-full-route-btn {
    width: 100%;
  }
  .fullscreen-route-bar {
    grid-template-columns: auto minmax(0,1fr);
  }
  .fullscreen-routes {
    grid-column: 1 / -1;
    justify-self: end;
    min-height: 38px;
  }
  .fullscreen-route-title strong {
    font-size: 11px;
  }
  .fullscreen-hint {
    max-width: calc(100% - 108px);
    font-size: 9px;
  }
}


/* ==========================================================
   v2.3.1 Cooperative gestures for the embedded mobile map
   ========================================================== */

.map-gesture-hint[hidden] {
  display: none !important;
}

.map-gesture-hint {
  position: absolute;
  z-index: 830;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: calc(100% - 36px);
  padding: 10px 13px;
  border-radius: 13px;
  background: rgba(20, 32, 51, .88);
  color: #fff;
  box-shadow: 0 8px 28px rgba(22, 39, 61, .22);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

@media (max-width: 760px) and (pointer: coarse) {
  /*
   * Embedded map:
   * - one finger scrolls the page or taps a marker/stop;
   * - JS disables Leaflet dragging;
   * - two-finger touchZoom remains active and also pans the map.
   */
  .map-card:not(.is-fullscreen) .leaflet-container.map-cooperative-touch {
    touch-action: pan-y !important;
    -ms-touch-action: pan-y !important;
  }

  /* Tappable objects remain normal one-tap controls. */
  .map-card:not(.is-fullscreen) .leaflet-container.map-cooperative-touch .leaflet-marker-icon,
  .map-card:not(.is-fullscreen) .leaflet-container.map-cooperative-touch .leaflet-interactive,
  .map-card:not(.is-fullscreen) .leaflet-container.map-cooperative-touch .leaflet-control {
    touch-action: manipulation;
  }

  /* Fullscreen route has no page scroll, so one-finger map control returns. */
  .map-card.is-fullscreen .leaflet-container {
    touch-action: none;
    -ms-touch-action: none;
  }
}




/* ==========================================================
   v2.3.5 Route UX cleanup
   ========================================================== */

.map-expand-btn[hidden],
.route-stops-panel[hidden] {
  display: none !important;
}

.map-expand-btn {
  position: absolute;
  z-index: 575;
  left: 12px;
  bottom: 14px;
  min-height: 43px;
  border: 1px solid rgba(216,226,237,.94);
  border-radius: 14px;
  padding: 0 13px;
  background: rgba(255,255,255,.96);
  color: #142033;
  box-shadow: 0 8px 24px rgba(29,47,72,.16);
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.map-expand-btn span {
  margin-right: 5px;
  font-size: 16px;
  vertical-align: -1px;
}

.map-card.is-fullscreen .map-expand-btn {
  display: none !important;
}

/* Fullscreen top bar: only useful controls, no GPS hint / duplicate type. */
.fullscreen-route-bar {
  grid-template-columns: auto minmax(0, 1fr) auto !important;
}

.fullscreen-route-title {
  padding: 10px 12px !important;
}

.fullscreen-route-title strong {
  margin: 0 !important;
  font-size: 12px !important;
}

.fullscreen-hint {
  display: none !important;
}

.route-preview-card {
  scroll-margin-top: 10px;
}

.route-preview-bottom {
  margin-bottom: 13px;
}

.route-stops-toggle {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 13px;
  background: #f8fafc;
  color: #142033;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.route-stops-toggle:disabled {
  opacity: .58;
  cursor: default;
}

.route-stops-toggle__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.route-stops-toggle__meta strong {
  color: #142033;
}

.route-stops-chevron {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  transition: transform .18s ease;
}

.route-stops-toggle.is-open .route-stops-chevron {
  transform: rotate(180deg);
}

.route-stops-panel {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: #fff;
}

.route-direction-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.route-direction-btn {
  min-height: 39px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.route-direction-btn.is-active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 2px 9px rgba(22,39,61,.10);
}

.route-stops-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(48vh, 430px);
  overflow: auto;
  overscroll-behavior: contain;
}

.route-stops-list li + li {
  border-top: 1px solid #edf1f5;
}

.route-stop-row {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 8px 11px;
  background: #fff;
  color: #142033;
  text-align: left;
  cursor: pointer;
}

.route-stop-row:active {
  background: #f3f7fb;
}

.route-stop-index {
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #edf3f8;
  color: #536274;
  font-size: 10px;
  font-weight: 950;
}

.route-stop-name {
  min-width: 0;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}

.route-stop-badge {
  padding: 4px 6px;
  border-radius: 8px;
  background: #e7f7ef;
  color: #08744a;
  font-size: 8px;
  font-weight: 950;
}

.route-stop-badge--end {
  background: #fff1e7;
  color: #a44b10;
}

/* Exactly two route terminals are always labelled on the map. */
.terminal-stop-label {
  max-width: 156px;
  padding: 5px 8px !important;
  border: 1px solid rgba(213,225,236,.95) !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,.96) !important;
  color: #142033 !important;
  box-shadow: 0 4px 14px rgba(26,44,68,.15);
  white-space: normal !important;
  text-align: center;
  font-size: 9px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
  pointer-events: none !important;
}

.terminal-stop-label::before {
  display: none !important;
}

@media (max-width: 760px) {
  .fullscreen-route-bar {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
  }

  .fullscreen-routes {
    grid-column: auto !important;
    justify-self: auto !important;
    min-height: 43px !important;
    padding-inline: 10px !important;
    font-size: 10px !important;
  }

  .fullscreen-back {
    padding-inline: 10px !important;
    font-size: 10px !important;
  }

  .fullscreen-route-title strong {
    font-size: 10px !important;
  }

  .terminal-stop-label {
    max-width: 128px;
    font-size: 8px !important;
    padding: 4px 6px !important;
  }
}


/* ==========================================================
   v2.4.0 Stable fullscreen: all routes <-> selected route
   ========================================================== */

.fullscreen-route-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.fullscreen-all,
.fullscreen-routes {
  min-height: 43px;
  border: 1px solid rgba(216,226,237,.9);
  border-radius: 14px;
  padding: 0 10px;
  background: rgba(255,255,255,.96);
  color: #142033;
  box-shadow: 0 8px 28px rgba(22,39,61,.16);
  font-size: 10px;
  font-weight: 950;
  backdrop-filter: blur(9px);
}

.fullscreen-all:disabled {
  color: #0b5fff;
  background: #eef4ff;
  opacity: 1;
}

.fullscreen-filters[hidden],
.fullscreen-route-info[hidden] {
  display: none !important;
}

.fullscreen-filters {
  position: absolute;
  z-index: 840;
  top: calc(67px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(216,226,237,.9);
  border-radius: 14px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 8px 26px rgba(22,39,61,.14);
  backdrop-filter: blur(9px);
}

.fullscreen-filter {
  min-width: 38px;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  padding: 0 9px;
  background: transparent;
  color: #516174;
  font-size: 11px;
  font-weight: 950;
}

.fullscreen-filter.is-active {
  background: #0b5fff;
  color: #fff;
}

.fullscreen-route-info {
  position: absolute;
  z-index: 835;
  left: 50%;
  bottom: calc(15px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(560px, calc(100% - 132px));
  padding: 10px 13px;
  border: 1px solid rgba(216,226,237,.92);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  color: #142033;
  box-shadow: 0 8px 28px rgba(22,39,61,.16);
  backdrop-filter: blur(9px);
  pointer-events: none;
}

.fullscreen-route-info strong,
.fullscreen-route-info span {
  display: block;
}

.fullscreen-route-info strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 950;
}

.fullscreen-route-info span {
  margin-top: 3px;
  color: #657487;
  font-size: 9px;
  font-weight: 850;
}

/* +/- in left bottom; locate is the third map control above them. */
.leaflet-bottom.leaflet-left {
  bottom: calc(10px + env(safe-area-inset-bottom));
}

.map-card .locate-btn {
  top: auto !important;
  right: auto !important;
  left: 12px !important;
  bottom: 116px !important;
}

.map-card.is-fullscreen .locate-btn {
  right: auto !important;
  left: 12px !important;
  bottom: calc(116px + env(safe-area-inset-bottom)) !important;
}

.map-card:not(.is-fullscreen) .map-expand-btn {
  left: auto;
  right: 12px;
  bottom: 14px;
}

.route-fullscreen .app-footer {
  display: none;
}

.app-footer {
  margin: 12px auto 24px;
  width: min(1180px, calc(100% - 24px));
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  color: #6b798a;
  text-align: center;
  font-size: 10px;
}

.app-footer > span {
  display: block;
  margin-bottom: 7px;
  color: #405064;
  font-weight: 950;
}

.app-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
}

.app-footer a {
  color: #4f6278;
  font-weight: 850;
  text-decoration: none;
}

@media (max-width: 760px) {
  .fullscreen-route-bar {
    grid-template-columns: auto minmax(0,1fr) !important;
    align-items: start !important;
  }

  .fullscreen-route-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .fullscreen-filters {
    top: calc(111px + env(safe-area-inset-top));
  }

  .fullscreen-route-title strong {
    font-size: 11px !important;
  }

  .fullscreen-route-info {
    width: calc(100% - 122px);
    left: auto;
    right: 10px;
    transform: none;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
}


/* v2.4.1 Embedded selected-route reset button */
.map-card:not(.is-fullscreen) .all-routes-btn {
  left: 12px !important;
  top: 12px !important;
  bottom: auto !important;
  min-height: 41px;
  padding-inline: 12px;
  background: rgba(20,32,51,.94);
  backdrop-filter: blur(8px);
}


/* ==========================================================
   v2.4.2 Clean fullscreen controls
   ========================================================== */

.fullscreen-filters {
  display: none !important;
}

.fullscreen-all[hidden] {
  display: none !important;
}

.fullscreen-all {
  min-width: 0;
  min-height: 39px;
  padding: 0 9px;
  border-radius: 12px;
  font-size: 10px;
  white-space: nowrap;
}

.fullscreen-route-actions {
  gap: 5px;
}

.fullscreen-routes {
  min-height: 39px;
  padding: 0 11px;
  border-radius: 12px;
}

@media (max-width: 760px) {
  .fullscreen-route-bar {
    grid-template-columns: auto minmax(0,1fr) auto !important;
    align-items: center !important;
  }

  .fullscreen-route-actions {
    grid-column: auto !important;
    justify-self: auto !important;
  }

  .fullscreen-all,
  .fullscreen-routes {
    min-height: 38px !important;
    padding-inline: 8px !important;
    font-size: 9px !important;
  }
}


/* ==========================================================
   v2.5.0 Destination planner / boarding points
   ========================================================== */

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

.trip-planner {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(11,95,255,.08), transparent 34%),
    #fff;
  box-shadow: 0 10px 28px rgba(24,43,67,.06);
  scroll-margin-top: 12px;
}

.trip-planner__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trip-planner__head h2 {
  margin: 2px 0 0;
  font-size: 21px;
  line-height: 1.15;
}

.trip-planner__lead {
  margin: 8px 0 13px;
  color: #5c6b7d;
  font-size: 12px;
  line-height: 1.45;
}

.trip-clear {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  background: #eef3f8;
  color: #536274;
  font-size: 10px;
  font-weight: 900;
}

.trip-clear[hidden] {
  display: none !important;
}

.destination-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.destination-input {
  display: block;
}

.destination-input input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d8e2ec;
  border-radius: 14px;
  padding: 0 13px;
  background: #f9fbfd;
  color: #142033;
  outline: none;
  font-size: 13px;
}

.destination-input input:focus {
  border-color: rgba(11,95,255,.58);
  box-shadow: 0 0 0 3px rgba(11,95,255,.09);
  background: #fff;
}

.destination-submit {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 15px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.destination-submit:disabled {
  opacity: .65;
}

.trip-origin-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
}

.trip-location-btn {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid #dce6ef;
  border-radius: 12px;
  padding: 0 11px;
  background: #fff;
  color: #0b5fff;
  font-size: 10px;
  font-weight: 950;
}

.trip-origin-row > span {
  min-width: 0;
  color: #748294;
  font-size: 9px;
  line-height: 1.35;
}

.geocode-results {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid #dce5ee;
  border-radius: 14px;
  background: #fff;
}

.geocode-results[hidden] {
  display: none !important;
}

.geocode-result {
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr);
  gap: 8px;
  align-items: center;
  border: 0;
  padding: 10px 11px;
  background: #fff;
  color: #142033;
  text-align: left;
}

.geocode-result + .geocode-result {
  border-top: 1px solid #edf1f5;
}

.geocode-result:active {
  background: #f5f8fb;
}

.geocode-result__pin {
  color: #e94e4e;
  font-size: 18px;
  text-align: center;
}

.geocode-result strong,
.geocode-result small {
  display: block;
}

.geocode-result strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}

.geocode-result small {
  margin-top: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #748294;
  font-size: 8px;
}

.trip-destination {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) auto;
  gap: 9px;
  align-items: center;
  margin-top: 11px;
  padding: 10px 11px;
  border: 1px solid #f0d5d5;
  border-radius: 14px;
  background: #fff8f8;
}

.trip-destination[hidden] {
  display: none !important;
}

.trip-destination__pin {
  color: #e94e4e;
  font-size: 20px;
  text-align: center;
}

.trip-destination small,
.trip-destination strong {
  display: block;
}

.trip-destination small {
  color: #8a7474;
  font-size: 8px;
  font-weight: 850;
}

.trip-destination strong {
  margin-top: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}

.trip-destination button {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  padding: 0 9px;
  background: #fff;
  color: #59697b;
  font-size: 9px;
  font-weight: 900;
}

.trip-results {
  margin-top: 12px;
}

.trip-results[hidden] {
  display: none !important;
}

.trip-results__head {
  margin-bottom: 8px;
}

.trip-results__head strong,
.trip-results__head span {
  display: block;
}

.trip-results__head strong {
  font-size: 13px;
}

.trip-results__head span {
  margin-top: 3px;
  color: #748294;
  font-size: 9px;
  line-height: 1.35;
}

.trip-route-list {
  display: grid;
  gap: 8px;
}

.trip-route-card {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid #dce5ee;
  border-radius: 15px;
  padding: 10px;
  background: #fff;
  color: #142033;
  text-align: left;
}

.trip-route-card.is-direct {
  border-color: rgba(123,76,226,.28);
  background: linear-gradient(135deg, rgba(123,76,226,.045), #fff 46%);
}

.trip-route-card:active {
  transform: scale(.995);
}

.trip-route-badge {
  width: 42px;
  min-height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.trip-route-badge--tram { background: #d94b4b; }
.trip-route-badge--trol { background: #1478c9; }
.trip-route-badge--bus  { background: #15915d; }

.trip-route-card__body {
  min-width: 0;
}

.trip-route-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.trip-route-card__top strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}

.trip-route-card__top em {
  flex: 0 0 auto;
  color: #08744a;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.trip-route-card__top em.is-offline {
  color: #8793a2;
}

.trip-route-direction {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #748294;
  font-size: 8px;
}

.trip-route-step {
  display: grid;
  grid-template-columns: 10px minmax(0,1fr);
  gap: 7px;
  align-items: start;
  margin-top: 7px;
}

.trip-route-step__dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #aeb8c4;
}

.trip-route-step__dot--board { background: #7b4ce2; }
.trip-route-step__dot--exit  { background: #ef8b2c; }

.trip-route-step small,
.trip-route-step strong {
  display: block;
}

.trip-route-step small {
  color: #7b8998;
  font-size: 8px;
}

.trip-route-step strong {
  margin-top: 1px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 9px;
}

.trip-route-step--muted strong {
  color: #718094;
}

.trip-route-open {
  align-self: center;
  color: #0b5fff;
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
}

.trip-empty {
  padding: 13px;
  color: #718094;
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.trip-attribution {
  margin: 11px 0 0;
  color: #9aa5b2;
  font-size: 8px;
  text-align: right;
}

.trip-destination-label,
.trip-point-label {
  padding: 4px 7px !important;
  border: 1px solid #dce5ee !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,.96) !important;
  color: #142033 !important;
  box-shadow: 0 5px 16px rgba(25,44,68,.15);
  font-size: 8px !important;
  font-weight: 950 !important;
  white-space: nowrap;
}

.trip-destination-label::before,
.trip-point-label::before {
  display: none !important;
}

.trip-point-label--board {
  border-color: rgba(123,76,226,.25) !important;
  color: #6540bf !important;
}

.trip-point-label--exit {
  border-color: rgba(239,139,44,.28) !important;
  color: #a75d17 !important;
}

@media (max-width: 520px) {
  .trip-planner {
    padding: 15px;
    border-radius: 16px;
  }

  .destination-form {
    grid-template-columns: minmax(0,1fr) 78px;
  }

  .destination-submit {
    padding-inline: 8px;
  }

  .trip-origin-row {
    align-items: flex-start;
  }

  .trip-route-card {
    grid-template-columns: 38px minmax(0,1fr);
  }

  .trip-route-badge {
    width: 38px;
  }

  .trip-route-open {
    grid-column: 2;
    justify-self: end;
    margin-top: -2px;
  }
}


/* ==========================================================
   v2.6.0 Fullscreen trip search + local address autocomplete
   ========================================================== */

.fullscreen-search-btn {
  min-height: 39px;
  border: 1px solid rgba(216,226,237,.9);
  border-radius: 12px;
  padding: 0 10px;
  background: rgba(255,255,255,.96);
  color: #0b5fff;
  box-shadow: 0 8px 28px rgba(22,39,61,.16);
  font-size: 10px;
  font-weight: 950;
  backdrop-filter: blur(9px);
}

.address-suggest-list[hidden],
.trip-search-backdrop[hidden],
.trip-search-sheet[hidden],
.full-trip-status[hidden],
.full-trip-results[hidden] {
  display: none !important;
}

.address-suggest-list,
.geocode-results {
  position: relative;
  z-index: 20;
}

.address-suggest-item {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 26px minmax(0,1fr);
  gap: 8px;
  align-items: center;
  border: 0;
  padding: 8px 10px;
  background: #fff;
  color: #142033;
  text-align: left;
}

.address-suggest-item + .address-suggest-item {
  border-top: 1px solid #edf1f5;
}

.address-suggest-item:active {
  background: #f4f8fb;
}

.address-suggest-item__icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef4ff;
  color: #0b5fff;
  font-size: 12px;
}

.address-suggest-item__text {
  min-width: 0;
}

.address-suggest-item__text strong,
.address-suggest-item__text small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.address-suggest-item__text strong {
  font-size: 11px;
}

.address-suggest-item__text small {
  margin-top: 2px;
  color: #8995a4;
  font-size: 8px;
}

.trip-search-backdrop {
  position: fixed;
  z-index: 2380;
  inset: 0;
  background: rgba(15,28,44,.40);
  backdrop-filter: blur(2px);
}

.trip-search-sheet {
  position: fixed;
  z-index: 2390;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(620px, 100%);
  max-height: min(88dvh, 760px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce5ee;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.985);
  box-shadow: 0 -18px 60px rgba(15,28,44,.22);
}

.trip-search-open {
  overflow: hidden;
}

.trip-search-sheet__handle {
  width: 42px;
  height: 4px;
  margin: 0 auto 9px;
  border-radius: 999px;
  background: #d5dde6;
}

.trip-search-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trip-search-sheet__head h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.trip-search-sheet__close {
  width: 42px;
  min-width: 42px;
  height: 42px;
}

.trip-search-sheet__lead {
  margin: 7px 46px 13px 0;
  color: #667588;
  font-size: 11px;
  line-height: 1.4;
}

.full-trip-form {
  display: grid;
  gap: 8px;
}

.full-trip-field {
  position: relative;
}

.full-trip-field > label {
  display: block;
  margin: 0 0 5px 3px;
  color: #526276;
  font-size: 9px;
  font-weight: 950;
}

.full-trip-field > input,
.full-trip-input-row input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d8e2ec;
  border-radius: 14px;
  padding: 0 13px;
  background: #f9fbfd;
  color: #142033;
  outline: none;
  font-size: 13px;
}

.full-trip-field > input:focus,
.full-trip-input-row input:focus {
  border-color: rgba(11,95,255,.58);
  box-shadow: 0 0 0 3px rgba(11,95,255,.09);
  background: #fff;
}

.full-trip-input-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 7px;
}

.full-trip-location {
  min-height: 48px;
  border: 1px solid #d8e2ec;
  border-radius: 14px;
  padding: 0 11px;
  background: #fff;
  color: #0b5fff;
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
}

.full-trip-swap {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin: -2px 0 -2px 13px;
  border-radius: 50%;
  background: #eef4ff;
  color: #0b5fff;
  font-size: 14px;
  font-weight: 950;
}

.full-trip-submit {
  min-height: 48px;
  margin-top: 3px;
  border: 0;
  border-radius: 14px;
  background: #0b5fff;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.full-trip-submit:disabled {
  opacity: .65;
}

.full-trip-field .address-suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  z-index: 50;
  max-height: 250px;
  overflow: auto;
  border: 1px solid #dce5ee;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(20,38,61,.16);
}

.full-trip-status {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  background: #f3f7fb;
  color: #607084;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.full-trip-results {
  margin-top: 13px;
}

.full-trip-results__head {
  margin-bottom: 8px;
}

.full-trip-results__head strong,
.full-trip-results__head span {
  display: block;
}

.full-trip-results__head strong {
  font-size: 13px;
}

.full-trip-results__head span {
  margin-top: 3px;
  color: #748294;
  font-size: 9px;
  line-height: 1.35;
}

.trip-point-label--origin {
  border-color: rgba(11,95,255,.25) !important;
  color: #0b5fff !important;
}

@media (max-width: 760px) {
  .fullscreen-route-actions {
    gap: 4px !important;
  }

  .fullscreen-search-btn,
  .fullscreen-all,
  .fullscreen-routes {
    min-height: 38px !important;
    padding-inline: 8px !important;
    font-size: 9px !important;
  }

  .trip-search-sheet {
    width: 100%;
    max-height: 90dvh;
    border-radius: 20px 20px 0 0;
  }
}

@media (min-width: 761px) {
  .trip-search-sheet {
    bottom: 50%;
    transform: translate(-50%, 50%);
    max-height: min(82vh, 760px);
    border-bottom: 1px solid #dce5ee;
    border-radius: 22px;
  }
}


/* ==========================================================
   v2.6.1 Stable mobile map gestures
   ========================================================== */

.route-fullscreen {
  overscroll-behavior: none;
}

.map-card.is-fullscreen,
.map-card.is-fullscreen .map,
.map-card.is-fullscreen .leaflet-container {
  overscroll-behavior: none;
}

@media (max-width: 760px) and (pointer: coarse) {
  /*
   * One finger on the embedded map belongs to page scrolling.
   * Map pan/zoom is still available with two fingers.
   */
  .map-card:not(.is-fullscreen) .leaflet-container.map-cooperative-touch {
    touch-action: pan-y pinch-zoom !important;
    -ms-touch-action: pan-y !important;
  }

  /*
   * A route marker/stop can still be tapped, but beginning a vertical
   * gesture on it must not trap the page.
   */
  .map-card:not(.is-fullscreen) .leaflet-container.map-cooperative-touch
  .leaflet-marker-icon,
  .map-card:not(.is-fullscreen) .leaflet-container.map-cooperative-touch
  .leaflet-interactive {
    touch-action: pan-y pinch-zoom !important;
  }
}


/* ==========================================================
   v2.7.0 Complete trip planner: exact A → B + transfers
   ========================================================== */

/* Fullscreen is search-first: Back · SEARCH · Routes */
.fullscreen-route-bar {
  grid-template-columns: auto minmax(118px, 1fr) auto !important;
  align-items: center !important;
  gap: 7px !important;
}

.fullscreen-search-main {
  min-width: 0;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  background: #0b5fff;
  color: #fff;
  box-shadow: 0 9px 28px rgba(11,95,255,.28);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .01em;
  cursor: pointer;
  white-space: nowrap;
}

.fullscreen-search-main:active {
  transform: translateY(1px);
}

.fullscreen-route-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.fullscreen-all {
  display: none !important;
}

.fullscreen-routes {
  min-height: 43px !important;
  padding: 0 11px !important;
  white-space: nowrap;
}

.trip-planner--route {
  overflow: visible;
}

.quick-trip-form,
.full-trip-form {
  display: grid;
  gap: 9px;
}

.smart-address {
  position: relative;
  min-width: 0;
}

.smart-address__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.smart-address > label,
.smart-address__label-row > label {
  display: block;
  margin: 0 0 5px 3px;
  color: #526276;
  font-size: 10px;
  font-weight: 950;
}

.smart-address__label-row > label {
  margin-bottom: 0;
}

.smart-address__inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 7px;
}

.smart-address__inputs input {
  width: 100%;
  min-width: 0;
  min-height: 49px;
  border: 1px solid #d8e2ec;
  border-radius: 14px;
  padding: 0 13px;
  background: #f9fbfd;
  color: #142033;
  outline: none;
  font-size: 13px;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}

.smart-address__inputs input:focus {
  border-color: rgba(11,95,255,.58);
  box-shadow: 0 0 0 3px rgba(11,95,255,.09);
  background: #fff;
}

.smart-address__inputs input:disabled {
  color: #0b5fff;
  background: #eef4ff;
  opacity: 1;
}

.smart-address__house {
  padding-inline: 9px !important;
  text-align: center;
  font-weight: 900;
}

.smart-address__gps,
.full-trip-location {
  min-height: 35px;
  border: 1px solid #d8e2ec;
  border-radius: 11px;
  padding: 0 10px;
  background: #fff;
  color: #0b5fff;
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
}

.smart-address__gps.is-active,
.full-trip-location.is-active {
  border-color: rgba(11,95,255,.25);
  background: #eaf2ff;
  color: #0b5fff;
}

.quick-trip-arrow,
.full-trip-swap {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin: -2px 0 -2px 13px;
  border-radius: 50%;
  background: #eef4ff;
  color: #0b5fff;
  font-size: 14px;
  font-weight: 950;
}

.quick-trip-submit,
.full-trip-submit {
  width: 100%;
  min-height: 49px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  background: #0b5fff;
  color: #fff;
  box-shadow: 0 8px 22px rgba(11,95,255,.18);
  font-size: 12px;
  font-weight: 950;
}

.quick-trip-submit:disabled,
.full-trip-submit:disabled {
  opacity: .62;
}

.quick-trip-status[hidden] {
  display: none !important;
}

.quick-trip-status {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  background: #fff5e8;
  color: #8d5918;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.4;
}

.smart-address .address-suggest-list {
  position: absolute;
  z-index: 120;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  max-height: min(292px, 42vh);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #dce5ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(20,38,61,.18);
}

.smart-address .address-suggest-list--house {
  left: auto;
  width: min(280px, 100%);
}

.address-suggest-item {
  cursor: pointer;
}

.address-suggest-item:hover {
  background: #f6f9fc;
}

/* Fullscreen planner sheet stays understandable even with many alternatives. */
.trip-search-sheet--planner {
  display: flex;
  flex-direction: column;
  width: min(650px, 100%);
  max-height: min(91dvh, 820px);
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.trip-search-sheet--planner .trip-search-sheet__head {
  position: sticky;
  z-index: 90;
  top: -8px;
  margin: 0 -4px;
  padding: 8px 4px 7px;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(10px);
}

.trip-search-sheet--planner .trip-search-sheet__lead {
  flex: 0 0 auto;
}

.full-trip-form {
  flex: 0 0 auto;
}

.full-trip-status {
  flex: 0 0 auto;
}

.full-trip-results {
  min-height: 0;
  padding-bottom: 4px;
}

.full-trip-results__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

.route-planner-note {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 9px;
  background: #f1f4f7;
  color: #738093 !important;
  font-size: 8px !important;
  font-weight: 900;
  white-space: nowrap;
}

.journey-list {
  display: grid;
  gap: 9px;
  padding-bottom: 8px;
}

.journey-card {
  width: 100%;
  display: block;
  border: 1px solid #dce5ee;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  color: #142033;
  text-align: left;
  box-shadow: 0 6px 18px rgba(22,39,61,.045);
  cursor: pointer;
}

.journey-card.is-best {
  border-color: rgba(11,95,255,.28);
  background:
    linear-gradient(135deg, rgba(11,95,255,.055), rgba(255,255,255,1) 44%);
  box-shadow: 0 9px 26px rgba(11,95,255,.09);
}

.journey-card.is-selected {
  outline: 2px solid rgba(11,95,255,.20);
  outline-offset: -2px;
}

.journey-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.journey-card__head > span {
  min-width: 0;
}

.journey-best,
.journey-alt {
  display: block;
  margin-bottom: 6px;
  font-size: 9px;
  font-weight: 950;
}

.journey-best {
  color: #0b5fff;
}

.journey-alt {
  color: #728093;
}

.journey-routes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.journey-route-chip {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 9px;
  padding: 0 8px;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}

.journey-route-chip i {
  min-width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  font-size: 7px;
  font-style: normal;
}

.journey-route-chip--tram { background: #d94b4b; }
.journey-route-chip--trol { background: #1478c9; }
.journey-route-chip--bus  { background: #15915d; }

.journey-route-arrow {
  color: #8995a4;
  font-size: 11px;
  font-weight: 950;
}

.journey-time {
  flex: 0 0 auto;
  color: #142033;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.journey-meta {
  display: block;
  margin-top: 8px;
  color: #68778a;
  font-size: 9px;
  font-weight: 850;
}

.journey-steps {
  display: grid;
  gap: 5px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #edf1f5;
}

.journey-step {
  display: grid;
  grid-template-columns: 26px minmax(0,1fr);
  gap: 7px;
  align-items: start;
}

.journey-step__icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f5f8;
  font-size: 11px;
}

.journey-step > span:last-child {
  min-width: 0;
}

.journey-step small,
.journey-step strong {
  display: block;
}

.journey-step small {
  color: #7a8797;
  font-size: 8px;
  line-height: 1.25;
}

.journey-step strong {
  margin-top: 1px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #28384b;
  font-size: 9px;
  line-height: 1.3;
}

.journey-step--ride .journey-step__icon {
  background: #eef4ff;
}

.journey-step--transfer .journey-step__icon {
  background: #fff3e6;
  color: #a45c14;
}

/* Keep alternatives compact so the next options never "disappear". */
.journey-card:not(.is-best):not(.is-selected) .journey-steps {
  display: none;
}

.journey-card__action {
  display: block;
  margin-top: 9px;
  color: #0b5fff;
  font-size: 9px;
  font-weight: 950;
  text-align: right;
}

.trip-empty {
  border: 1px dashed #d8e2ec;
  border-radius: 13px;
  background: #f9fbfd;
}

/* A/B and transfer markers on the real journey map. */
.journey-map-icon-wrap {
  background: transparent !important;
  border: 0 !important;
}

.journey-map-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 5px 16px rgba(20,38,61,.25);
  font-size: 10px;
  font-weight: 950;
}

.journey-map-icon--origin { background: #0b5fff; }
.journey-map-icon--destination { background: #e94e4e; }
.journey-map-icon--board { background: #7b4ce2; }
.journey-map-icon--transfer { background: #ef8b2c; }
.journey-map-icon--exit { background: #142033; }

.journey-map-label {
  max-width: 150px;
  padding: 4px 7px !important;
  border: 1px solid #dce5ee !important;
  border-radius: 9px !important;
  background: rgba(255,255,255,.97) !important;
  color: #142033 !important;
  box-shadow: 0 5px 16px rgba(20,38,61,.15);
  white-space: normal !important;
  text-align: center;
  font-size: 8px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
  pointer-events: none !important;
}

.journey-map-label::before {
  display: none !important;
}

.journey-map-label--origin { color: #0b5fff !important; }
.journey-map-label--destination { color: #c63e3e !important; }
.journey-map-label--board { color: #6540bf !important; }
.journey-map-label--transfer { color: #a75d17 !important; }

.trip-search-open .map-card.is-fullscreen .fullscreen-route-bar {
  opacity: .22;
  pointer-events: none;
}

/* A visible route summary remains on the map after closing the planner. */
.map-card.is-fullscreen .fullscreen-route-info {
  max-width: calc(100% - 126px);
}

@media (max-width: 760px) {
  .fullscreen-route-bar {
    grid-template-columns: 76px minmax(112px,1fr) auto !important;
    top: calc(8px + env(safe-area-inset-top)) !important;
    left: 8px !important;
    right: 8px !important;
  }

  .fullscreen-back {
    min-height: 42px !important;
    padding-inline: 8px !important;
    font-size: 9px !important;
  }

  .fullscreen-search-main {
    min-height: 42px;
    padding-inline: 11px;
    font-size: 11px;
  }

  .fullscreen-routes {
    min-height: 42px !important;
    padding-inline: 8px !important;
    font-size: 9px !important;
  }

  .smart-address__inputs {
    grid-template-columns: minmax(0,1fr) 72px;
  }

  .smart-address__inputs input {
    min-height: 47px;
    font-size: 12px;
  }

  .trip-search-sheet--planner {
    max-height: 92dvh;
    padding-left: 14px;
    padding-right: 14px;
  }

  .trip-search-sheet--planner .trip-search-sheet__head {
    top: -8px;
  }

  .journey-card {
    padding: 11px;
    border-radius: 15px;
  }

  .journey-route-chip {
    min-height: 28px;
    padding-inline: 7px;
    font-size: 9px;
  }

  .journey-time {
    font-size: 12px;
  }

  .journey-step strong {
    font-size: 9px;
  }
}

@media (max-width: 390px) {
  .fullscreen-route-bar {
    grid-template-columns: 68px minmax(96px,1fr) auto !important;
    gap: 5px !important;
  }

  .fullscreen-routes {
    padding-inline: 7px !important;
  }

  .fullscreen-search-main {
    padding-inline: 8px;
  }

  .smart-address__gps,
  .full-trip-location {
    padding-inline: 8px;
    font-size: 8px;
  }

  .journey-card__head {
    gap: 6px;
  }
}


/* ==========================================================
   v2.7.1 Address precision / manual point refinement
   ========================================================== */

.address-point-picker[hidden],
.address-center-pin[hidden] {
  display: none !important;
}

.address-point-picker {
  position: absolute;
  z-index: 950;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(520px, calc(100% - 28px));
  padding: 13px 48px 13px 14px;
  border: 1px solid rgba(215,225,235,.96);
  border-radius: 17px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 14px 40px rgba(20,37,60,.22);
  backdrop-filter: blur(10px);
}

.address-point-picker small,
.address-point-picker strong,
.address-point-picker span {
  display: block;
}

.address-point-picker small {
  color: #0b5fff;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.address-point-picker strong {
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #142033;
  font-size: 12px;
}

.address-point-picker > span {
  margin-top: 4px;
  color: #657487;
  font-size: 9px;
  line-height: 1.35;
}

.address-point-picker__close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #eef3f8;
  color: #536274;
  font-size: 18px;
  font-weight: 900;
}

.address-point-picker__use {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  border: 0;
  border-radius: 12px;
  background: #0b5fff;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.address-center-pin {
  position: absolute;
  z-index: 940;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 50px;
  transform: translate(-50%, -100%);
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(20,37,60,.28));
}

.address-center-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(11,95,255,.18);
  transform: translate(-50%, 50%) scaleX(1.8);
}

.address-center-pin span {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 12px;
  background: #0b5fff;
  color: #fff;
  transform: rotate(-45deg);
  font-size: 19px;
  font-weight: 950;
}

.address-center-pin span::first-letter {
  transform: rotate(45deg);
}

.address-point-picking .fullscreen-route-info,
.address-point-picking .fullscreen-all,
.address-point-picking .fullscreen-routes,
.address-point-picking .fullscreen-search-main {
  display: none !important;
}

.address-point-picking .locate-btn {
  display: none !important;
}

@media (max-width: 760px) {
  .address-point-picker {
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: calc(100% - 20px);
    padding: 12px 45px 12px 12px;
  }
}


/* ==========================================================
   v2.8.0 Human-first UX: compact results, persistent route,
   journey dock, keyboard-safe forms, broader address fallback
   ========================================================== */

.header-btn--about {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.fullscreen-routes--icon {
  min-width: 39px;
  width: 39px;
  padding: 0 !important;
  font-size: 17px !important;
}

.address-suggest-message {
  padding: 12px;
  color: #657487;
  background: #fbfcfe;
  font-size: 10px;
  line-height: 1.4;
}

.address-suggest-more {
  width: 100%;
  min-height: 43px;
  border: 0;
  border-top: 1px solid #edf1f5;
  padding: 8px 11px;
  background: #f7faff;
  color: #0b5fff;
  text-align: left;
  font-size: 10px;
  font-weight: 900;
}

.address-suggest-item--remote .address-suggest-item__icon {
  background: #fff4e8;
  color: #b25e10;
}

/* Every result starts compact. A tap expands details; map opening is explicit. */
.journey-card {
  padding: 0 !important;
  overflow: hidden;
  cursor: default !important;
}

.journey-card__toggle {
  width: 100%;
  display: block;
  border: 0;
  padding: 11px 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.journey-card__compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}

.journey-card__compact-row .journey-meta {
  margin-top: 0;
}

.journey-card__chevron {
  flex: 0 0 auto;
  color: #7b8998;
  font-size: 18px;
  line-height: 1;
  transition: transform .16s ease;
}

.journey-card.is-expanded .journey-card__chevron {
  transform: rotate(180deg);
}

.journey-card__details[hidden] {
  display: none !important;
}

.journey-card__details {
  padding: 0 12px 12px;
  border-top: 1px solid #edf1f5;
}

.journey-card__details .journey-steps {
  display: grid !important;
  margin-top: 0;
  padding-top: 10px;
  border-top: 0;
}

.journey-card__map {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: 0;
  border-radius: 12px;
  background: #0b5fff;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

/* Old auto-expanded rule is neutralized. */
.journey-card:not(.is-best):not(.is-selected) .journey-steps {
  display: grid;
}

/* Persistent trip card on fullscreen map: 3/4 width, ~1/4 height compact. */
.journey-map-dock[hidden] {
  display: none !important;
}

.journey-map-dock {
  position: absolute;
  z-index: 850;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(75vw, 590px);
  max-height: 25vh;
  overflow: hidden;
  border: 1px solid rgba(216,226,237,.96);
  border-radius: 17px;
  background: rgba(255,255,255,.975);
  box-shadow: 0 12px 38px rgba(18,36,58,.20);
  backdrop-filter: blur(10px);
}

.journey-map-dock.is-expanded {
  max-height: min(58vh, 620px);
}

.journey-map-dock__summary {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 28px;
  align-items: center;
  gap: 7px;
  border: 0;
  padding: 10px 11px;
  background: transparent;
  color: #142033;
  text-align: left;
}

.journey-map-dock__copy {
  min-width: 0;
}

.journey-map-dock__copy > small,
.journey-map-dock__copy > strong,
.journey-map-dock__copy > span {
  display: block;
}

.journey-map-dock__copy > small {
  margin-bottom: 5px;
  color: #758396;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.journey-map-dock__copy > strong .journey-routes,
.journey-map-dock__copy > strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.journey-map-dock__copy > span {
  margin-top: 5px;
  color: #617084;
  font-size: 9px;
  font-weight: 850;
}

.journey-map-dock__chevron {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eef3f8;
  color: #506074;
  font-size: 15px;
  transition: transform .16s ease;
}

.journey-map-dock.is-expanded .journey-map-dock__chevron {
  transform: rotate(180deg);
}

.journey-map-dock__details[hidden] {
  display: none !important;
}

.journey-map-dock__details {
  max-height: calc(min(58vh, 620px) - 82px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 10px 12px;
  border-top: 1px solid #edf1f5;
}

.journey-dock-addresses {
  display: grid;
  gap: 6px;
  padding: 9px 0;
}

.journey-dock-addresses > span {
  min-width: 0;
  display: grid;
  grid-template-columns: 23px minmax(0,1fr);
  gap: 7px;
  align-items: center;
}

.journey-dock-addresses b {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef4ff;
  color: #0b5fff;
  font-size: 9px;
}

.journey-dock-addresses strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 9px;
}

.journey-dock-leg + .journey-dock-leg {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf1f5;
}

.journey-dock-leg__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.journey-dock-leg__head > strong {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #405064;
  font-size: 9px;
}

.journey-dock-stops {
  display: grid;
  gap: 2px;
}

.journey-dock-stop {
  width: 100%;
  min-height: 35px;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) auto;
  gap: 7px;
  align-items: center;
  border: 0;
  border-radius: 9px;
  padding: 4px 7px;
  background: transparent;
  color: #26374a;
  text-align: left;
}

.journey-dock-stop:active {
  background: #f2f6fa;
}

.journey-dock-stop > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf2f6;
  color: #657487;
  font-size: 8px;
  font-weight: 900;
}

.journey-dock-stop > strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 9px;
}

.journey-dock-stop > small {
  color: #0b5fff;
  font-size: 8px;
  font-weight: 900;
}

.journey-dock-stop.is-exit > small {
  color: #a85c15;
}

/* Search sheet tracks the real visual viewport so the keyboard stays below fields. */
@media (max-width: 760px) {
  .trip-search-sheet,
  .trip-search-sheet--planner {
    bottom: var(--keyboard-inset, 0px) !important;
    max-height: calc(var(--visual-vh, 90dvh) - 8px) !important;
  }

  .full-trip-field .address-suggest-list,
  .smart-address .address-suggest-list {
    max-height: min(230px, 32vh);
  }

  .topbar__actions {
    gap: 5px;
  }

  .header-btn--about,
  #installBtn {
    min-height: 36px;
    padding-inline: 8px;
    font-size: 9px;
  }

  .journey-map-dock {
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: 75vw;
    max-height: 25vh;
    border-radius: 15px;
  }

  .journey-map-dock.is-expanded {
    max-height: 58vh;
  }

  .journey-map-dock__details {
    max-height: calc(58vh - 82px);
  }
}


/* ==========================================================
   v2.8.1 Boss-test fixes
   ========================================================== */

/* Use the real visible browser viewport, not the hidden area under mobile UI. */
.map-card.is-fullscreen {
  inset: auto 0 auto 0 !important;
  top: var(--visual-offset-top, 0px) !important;
  height: var(--visual-vh, 100dvh) !important;
  min-height: 0 !important;
}

/* Journey card must never hide under Android/browser navigation bars. */
@media (max-width: 760px) {
  .journey-map-dock {
    right: 8px !important;
    bottom: calc(54px + env(safe-area-inset-bottom)) !important;
    width: min(86vw, 560px) !important;
    max-height: 29vh !important;
  }

  .journey-map-dock.is-expanded {
    max-height: min(58vh, calc(var(--visual-vh, 100dvh) - 170px)) !important;
  }

  .journey-map-dock__details {
    max-height: calc(min(58vh, calc(var(--visual-vh, 100dvh) - 170px)) - 100px) !important;
  }

  .address-point-picker {
    bottom: calc(58px + env(safe-area-inset-bottom)) !important;
    max-height: calc(var(--visual-vh, 100dvh) - 120px);
    overflow: auto;
  }

  .leaflet-bottom.leaflet-left {
    bottom: calc(48px + env(safe-area-inset-bottom)) !important;
  }
}

.journey-map-dock__board-exit {
  margin-top: 4px !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #27384b !important;
  font-size: 9px !important;
  font-weight: 950 !important;
}

.journey-dock-leg__copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.journey-dock-leg__copy strong,
.journey-dock-leg__copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.journey-dock-leg__copy strong {
  color: #26374a;
  font-size: 9px;
}

.journey-dock-leg__copy small {
  color: #748294;
  font-size: 8px;
  font-weight: 800;
}

.journey-dock-all-stops-title {
  margin: 7px 0 4px;
  color: #536274;
  font-size: 8px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.journey-dock-stop.is-board {
  background: rgba(123,76,226,.08);
}

.journey-dock-stop.is-exit {
  background: rgba(239,139,44,.09);
}

.journey-dock-stop .is-board-label {
  color: #6c40cf !important;
}

.journey-dock-stop .is-exit-label {
  color: #c66b14 !important;
}

.vehicle-popup__route,
.vehicle-popup__journey {
  display: block;
  margin-top: 6px;
  color: #536274;
  font-size: 10px;
  line-height: 1.35;
}

.vehicle-popup__journey {
  padding-top: 6px;
  border-top: 1px solid #edf1f5;
  color: #25384d;
  font-weight: 850;
}

/* Old technical GPS/bort styles are intentionally neutralized. */
.vehicle-popup__technical {
  display: none !important;
}

.address-point-picker__coords {
  display: block;
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 10px;
  background: #f1f6fb;
  color: #31506f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

/* User position visibly stays live while watchPosition updates it. */
.user-location-live {
  animation: user-location-pulse 1.6s ease-out infinite;
}

@keyframes user-location-pulse {
  0% { box-shadow: 0 0 0 0 rgba(11,95,255,.28); }
  70% { box-shadow: 0 0 0 12px rgba(11,95,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(11,95,255,0); }
}


/* ==========================================================
   v2.8.2 Manual-route reset vs protected trip search
   ========================================================== */

.header-install-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.trip-search-sheet__head-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.trip-search-reset {
  min-height: 42px;
  border: 1px solid #d9e3ed;
  border-radius: 12px;
  padding: 0 11px;
  background: #f3f7fb;
  color: #405269;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
}

.trip-search-reset:active {
  background: #e9f0f7;
}

@media (max-width: 760px) {
  .header-install-main {
    min-height: 36px !important;
    padding-inline: 9px !important;
    font-size: 9px !important;
  }

  .trip-search-sheet__head-actions {
    gap: 5px;
  }

  .trip-search-reset {
    min-height: 40px;
    padding-inline: 9px;
    font-size: 9px;
  }
}

@media (max-width: 390px) {
  .header-install-main {
    max-width: 142px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


/* ==========================================================
   v2.8.3 Feedback footer
   ========================================================== */

.app-feedback {
  display: grid;
  gap: 10px;
  margin: 0 auto 14px;
  padding: 15px;
  border: 1px solid #dfe8f1;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(11,95,255,.08), transparent 36%),
    #fff;
  text-align: left;
}

.app-feedback__copy strong,
.app-feedback__copy span,
.app-feedback small {
  display: block;
}

.app-feedback__copy strong {
  color: #162235;
  font-size: 13px;
  font-weight: 950;
}

.app-feedback__copy span {
  margin-top: 4px;
  color: #647487;
  font-size: 10px;
  line-height: 1.45;
}

.app-feedback__button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0 14px;
  background: #0b5fff;
  color: #fff !important;
  font-size: 10px;
  font-weight: 950;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(11,95,255,.15);
}

.app-feedback__button:active {
  transform: translateY(1px);
}

.app-feedback small {
  color: #8895a4;
  font-size: 9px;
  text-align: center;
}

@media (min-width: 760px) {
  .app-feedback {
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
  }

  .app-feedback small {
    grid-column: 1 / -1;
  }

  .app-feedback__button {
    min-width: 210px;
  }
}


/* ==========================================================
   v2.8.6 Planner coverage fallback
   ========================================================== */

.planner-nearby {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid #dfe8f1;
  border-radius: 14px;
  background: #f9fbfd;
}

.planner-nearby > p {
  margin: 0;
  color: #42546a;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.4;
}

.planner-nearby-group {
  display: grid;
  gap: 5px;
}

.planner-nearby-group > strong {
  color: #17263a;
  font-size: 10px;
  font-weight: 950;
}

.planner-nearby-stop {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid #e4ebf2;
  border-radius: 11px;
  background: #fff;
}

.planner-nearby-stop__distance {
  color: #0b5fff;
  font-size: 10px;
  font-weight: 950;
}

.planner-nearby-stop strong,
.planner-nearby-stop small {
  display: block;
}

.planner-nearby-stop strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #203149;
  font-size: 10px;
}

.planner-nearby-stop small {
  margin-top: 2px;
  color: #718095;
  font-size: 8px;
  line-height: 1.35;
}

.planner-nearby__note {
  color: #8a97a6;
  font-size: 8px;
  line-height: 1.35;
}


/* ==========================================================
   v2.8.9 Journey follow-navigation + clean control layout
   ========================================================== */

.journey-map-dock__actions {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 7px;
  padding: 0 10px 9px;
}

.journey-nav-btn,
.journey-change-btn {
  min-height: 39px;
  border: 1px solid #dce6ef;
  border-radius: 11px;
  padding: 0 9px;
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
}

.journey-nav-btn {
  background: #eef4ff;
  color: #0b5fff;
}

.journey-nav-btn.is-active {
  border-color: rgba(11,95,255,.34);
  background: #0b5fff;
  color: #fff;
  box-shadow: 0 7px 18px rgba(11,95,255,.20);
}

.journey-change-btn {
  background: #f5f8fb;
  color: #405269;
}

.journey-nav-btn:disabled,
.journey-change-btn:disabled {
  opacity: .55;
}

.journey-map-dock__details {
  /* summary + action row now take more vertical space */
  max-height: calc(min(58vh, 620px) - 128px);
}

/* Keep the left Leaflet / GPS controls in their own gutter.
   The journey card starts to the right of that gutter, so nothing overlaps. */
@media (max-width: 760px) {
  .journey-active .journey-map-dock {
    right: 8px !important;
    width: calc(100% - 82px) !important;
    max-width: 560px !important;
    bottom: calc(52px + env(safe-area-inset-bottom)) !important;
  }

  .journey-active .journey-map-dock.is-expanded {
    max-height: min(60vh, calc(var(--visual-vh, 100dvh) - 160px)) !important;
  }

  .journey-active .journey-map-dock__details {
    max-height: calc(min(60vh, calc(var(--visual-vh, 100dvh) - 160px)) - 128px) !important;
  }

  .journey-active .map-card.is-fullscreen .locate-btn {
    left: 12px !important;
    right: auto !important;
    bottom: calc(190px + env(safe-area-inset-bottom)) !important;
  }

  .journey-dock-expanded .map-card.is-fullscreen .locate-btn {
    display: none !important;
  }

  .journey-active .leaflet-bottom.leaflet-left {
    left: 10px !important;
    bottom: calc(48px + env(safe-area-inset-bottom)) !important;
  }

  .journey-map-dock__summary {
    min-height: 78px;
  }

  .journey-map-dock__copy > span {
    margin-top: 3px;
  }

  .fullscreen-search-main {
    padding-inline: 10px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 390px) {
  .journey-active .journey-map-dock {
    width: calc(100% - 76px) !important;
  }

  .journey-nav-btn,
  .journey-change-btn {
    min-height: 37px;
    padding-inline: 6px;
    font-size: 8px;
  }
}


/* ==========================================================
   v2.9.2 Form validation + mobile network resilience
   ========================================================== */

.smart-address__house.is-next-required {
  border-color: rgba(11,95,255,.48) !important;
  background: #f3f7ff !important;
  box-shadow: 0 0 0 3px rgba(11,95,255,.08);
}

.smart-address__house.is-required-missing,
.smart-address__inputs input.is-required-missing {
  border-color: #e08a18 !important;
  background: #fff8eb !important;
  box-shadow: 0 0 0 3px rgba(224,138,24,.12) !important;
  animation: required-field-pulse .45s ease-out 1;
}

@keyframes required-field-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.035); }
  100% { transform: scale(1); }
}


/* Planner V2 complex-route badge */
.journey-complex {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(216, 117, 24, .11);
  color: #9a4d08;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}
.journey-complex--very {
  background: rgba(176, 42, 55, .10);
  color: #9b2430;
}
.journey-card.is-complex {
  border-color: rgba(216, 117, 24, .28);
}


/* ==========================================================
   v3.0.7 Saved routes — local only
   ========================================================== */

.saved-trips-block[hidden],
.saved-route-backdrop[hidden],
.saved-route-sheet[hidden] {
  display: none !important;
}

.saved-trips-block {
  margin: 11px 0;
  padding: 10px;
  border: 1px solid #dfe7ef;
  border-radius: 15px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
}

.saved-trips-block--sheet {
  margin-top: 10px;
  margin-bottom: 12px;
}

.saved-trips-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.saved-trips-block__head strong {
  color: #24384f;
  font-size: 11px;
  font-weight: 950;
}

.saved-trips-block__head span {
  color: #8090a2;
  font-size: 9px;
  font-weight: 850;
}

.saved-trips-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  padding: 1px 1px 3px;
}

.saved-trips-list::-webkit-scrollbar {
  display: none;
}

.saved-trip-item {
  position: relative;
  flex: 0 0 min(236px, 78vw);
  min-width: 0;
  border: 1px solid #dce6ef;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(27,45,68,.05);
}

.saved-trip-open {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  gap: 9px;
  align-items: center;
  border: 0;
  border-radius: 13px;
  padding: 9px 32px 9px 9px;
  background: transparent;
  color: #1d3047;
  text-align: left;
}

.saved-trip-open:active {
  background: #f4f8ff;
}

.saved-trip-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eef4ff;
  font-size: 17px;
}

.saved-trip-copy {
  min-width: 0;
}

.saved-trip-copy strong,
.saved-trip-copy small {
  display: block;
}

.saved-trip-copy strong {
  overflow: hidden;
  color: #1a2e46;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.saved-trip-copy small {
  margin-top: 4px;
  overflow: hidden;
  color: #77879a;
  font-size: 8px;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.saved-trip-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #f1f4f7;
  color: #718095;
  font-size: 14px;
  font-weight: 900;
}

.journey-map-dock__actions {
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(74px,.88fr) !important;
}

.journey-nav-btn,
.journey-change-btn,
.journey-save-btn {
  min-width: 0;
}

.journey-save-btn {
  min-height: 39px;
  border: 1px solid rgba(11,95,255,.18);
  border-radius: 11px;
  padding: 0 7px;
  background: #fff;
  color: #0b5fff;
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
}

.journey-save-btn.is-suggested {
  background: #eef4ff;
}

.journey-save-btn.is-saved {
  border-color: rgba(21,145,93,.22);
  background: #eefaf4;
  color: #137447;
}

.saved-route-backdrop {
  position: fixed;
  z-index: 2480;
  inset: 0;
  background: rgba(16,30,48,.38);
  backdrop-filter: blur(2px);
}

.saved-route-sheet {
  position: fixed;
  z-index: 2490;
  left: 50%;
  bottom: 0;
  width: min(100%, 520px);
  max-height: min(88dvh, 720px);
  overflow: auto;
  transform: translateX(-50%);
  border: 1px solid #dbe5ee;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  padding: 9px 15px calc(18px + env(safe-area-inset-bottom));
  background: #fff;
  box-shadow: 0 -18px 50px rgba(17,36,60,.20);
  overscroll-behavior: contain;
}

.saved-route-sheet__handle {
  width: 46px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 99px;
  background: #d8e0e8;
}

.saved-route-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saved-route-sheet__head h2 {
  margin: 2px 0 0;
  color: #15283f;
  font-size: 20px;
}

.saved-route-sheet__close {
  flex: 0 0 auto;
}

.saved-route-sheet__lead {
  margin: 9px 0 12px;
  color: #66778b;
  font-size: 10px;
  line-height: 1.5;
}

.saved-route-points {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #e3eaf1;
  border-radius: 14px;
  background: #f8fafc;
}

.saved-route-points > div {
  display: grid;
  grid-template-columns: 26px minmax(0,1fr);
  gap: 8px;
  align-items: center;
}

.saved-route-points > div > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: #0b5fff;
  font-size: 9px;
  font-weight: 950;
}

.saved-route-points p,
.saved-route-points small,
.saved-route-points strong {
  min-width: 0;
  margin: 0;
}

.saved-route-points small,
.saved-route-points strong {
  display: block;
}

.saved-route-points small {
  color: #8090a2;
  font-size: 8px;
  font-weight: 850;
}

.saved-route-points strong {
  margin-top: 2px;
  overflow: hidden;
  color: #273a50;
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.saved-route-name {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.saved-route-name > span {
  margin-left: 2px;
  color: #526276;
  font-size: 10px;
  font-weight: 950;
}

.saved-route-name input {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  border: 1px solid #d8e2ec;
  border-radius: 14px;
  padding: 0 13px;
  background: #f9fbfd;
  color: #142033;
  outline: none;
  font-size: 13px;
  font-weight: 850;
}

.saved-route-name input:focus {
  border-color: rgba(11,95,255,.58);
  box-shadow: 0 0 0 3px rgba(11,95,255,.09);
  background: #fff;
}

.saved-route-icons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.saved-route-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  background: #fff;
  font-size: 18px;
}

.saved-route-icon.is-active {
  border-color: rgba(11,95,255,.34);
  background: #eef4ff;
  box-shadow: 0 0 0 2px rgba(11,95,255,.08);
}

.saved-route-reverse {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 11px;
  border: 1px solid #e1e8ef;
  border-radius: 13px;
  background: #fafcfe;
}

.saved-route-reverse input {
  width: 18px;
  height: 18px;
  accent-color: #0b5fff;
}

.saved-route-reverse span,
.saved-route-reverse strong,
.saved-route-reverse small {
  display: block;
}

.saved-route-reverse strong {
  color: #2b3e54;
  font-size: 10px;
}

.saved-route-reverse small {
  margin-top: 2px;
  color: #8492a4;
  font-size: 8px;
}

.saved-route-confirm {
  width: 100%;
  min-height: 49px;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  background: #0b5fff;
  color: #fff;
  box-shadow: 0 8px 22px rgba(11,95,255,.18);
  font-size: 12px;
  font-weight: 950;
}

.saved-route-local-note {
  display: block;
  margin-top: 8px;
  color: #8896a7;
  font-size: 8px;
  line-height: 1.45;
  text-align: center;
}

@media (min-width: 761px) {
  .saved-route-sheet {
    bottom: 50%;
    max-height: min(82vh, 720px);
    transform: translate(-50%, 50%);
    border-bottom: 1px solid #dbe5ee;
    border-radius: 22px;
  }
}

@media (max-width: 420px) {
  .journey-map-dock__actions {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) 72px !important;
    gap: 5px !important;
  }

  .journey-nav-btn,
  .journey-change-btn,
  .journey-save-btn {
    padding-inline: 5px !important;
    font-size: 8px !important;
  }
}


/* v3.0.7.1 — saved-route sheet must stay above fullscreen map UI. */
.route-fullscreen .saved-route-backdrop {
  z-index: 2480;
}

.route-fullscreen .saved-route-sheet {
  z-index: 2490;
  pointer-events: auto;
}

.saved-route-open .map-card.is-fullscreen {
  pointer-events: none;
}

.saved-route-open .saved-route-backdrop,
.saved-route-open .saved-route-sheet {
  pointer-events: auto;
}

/* ==========================================================
   v3.0.9 Journey companion / safer step-by-step guidance
   ========================================================== */

.journey-guide {
  padding: 10px 0 12px;
  border-bottom: 1px solid #edf1f5;
}

.journey-guide__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.journey-guide__head strong,
.journey-guide__head small {
  display: block;
}

.journey-guide__head strong {
  color: #203149;
  font-size: 10px;
  font-weight: 950;
}

.journey-guide__head small {
  max-width: 58%;
  color: #8090a2;
  text-align: right;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.25;
}

.journey-guide__steps {
  display: grid;
  gap: 6px;
}

.journey-guide-step {
  display: grid;
  grid-template-columns: 22px 28px minmax(0,1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 52px;
  padding: 7px;
  border: 1px solid #e4ebf2;
  border-radius: 12px;
  background: #fbfcfe;
}

.journey-guide-step--ride {
  background: #f7faff;
  border-color: #dce7fb;
}

.journey-guide-step--transfer {
  background: #fffaf4;
  border-color: #f3e2cc;
}

.journey-guide-step__no {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eaf0f6;
  color: #56677b;
  font-size: 8px;
  font-weight: 950;
}

.journey-guide-step__icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(22,39,61,.06);
  font-size: 12px;
}

.journey-guide-step__copy {
  min-width: 0;
}

.journey-guide-step__copy small,
.journey-guide-step__copy strong,
.journey-guide-step__copy em {
  display: block;
  min-width: 0;
}

.journey-guide-step__copy small {
  overflow: hidden;
  color: #66778a;
  font-size: 8px;
  font-weight: 850;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.journey-guide-step__copy strong {
  margin-top: 2px;
  overflow: hidden;
  color: #203149;
  font-size: 9px;
  font-weight: 950;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.journey-guide-step__copy em {
  margin-top: 2px;
  overflow: hidden;
  color: #7b8999;
  font-size: 7px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.journey-guide-step__map,
.journey-guide-step__maps button {
  min-height: 31px;
  border: 1px solid #dbe5ef;
  border-radius: 9px;
  padding: 0 8px;
  background: #fff;
  color: #0b5fff;
  font-size: 8px;
  font-weight: 950;
  white-space: nowrap;
}

.journey-guide-step__maps {
  display: grid;
  gap: 4px;
}

.journey-guide-step__maps button {
  min-height: 25px;
  padding-inline: 6px;
  font-size: 7px;
}

.journey-map-dock__board-exit {
  color: #203149 !important;
}

/* GPS companion is intentionally distinct from turn-by-turn navigation. */
.journey-nav-btn.is-active {
  background: #0b5fff;
  color: #fff;
}

.locate-btn.is-recenter {
  outline: 3px solid rgba(11,95,255,.16);
  box-shadow: 0 8px 24px rgba(29,47,72,.16), 0 0 0 6px rgba(11,95,255,.07);
}

@media (max-width: 760px) {
  .journey-guide-step {
    grid-template-columns: 20px 25px minmax(0,1fr) auto;
    gap: 5px;
    padding: 6px;
  }

  .journey-guide-step__no {
    width: 19px;
    height: 19px;
    font-size: 7px;
  }

  .journey-guide-step__icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 11px;
  }

  .journey-guide-step__map {
    padding-inline: 6px;
  }

  .journey-guide__head small {
    max-width: 62%;
  }
}

@media (max-width: 390px) {
  .journey-guide-step {
    grid-template-columns: 19px 24px minmax(0,1fr);
  }

  .journey-guide-step__map,
  .journey-guide-step__maps {
    grid-column: 3;
    justify-self: start;
  }

  .journey-guide-step__maps {
    grid-template-columns: auto auto;
  }
}


/* ==========================================================
   v3.0.11 Feedback pass: compact Live, smaller stops, Favorites
   ========================================================== */
.live-head {
  padding: 13px 15px;
}
.live-title-row h1 {
  font-size: clamp(20px, 5.2vw, 27px);
}
.stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 14px;
  margin-top: 8px;
}
.stats-row > div {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.stats-row strong {
  display: inline;
  font-size: 13px;
  line-height: 1.2;
}
.stats-row span {
  display: inline;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 10px;
}
.stop-marker {
  width: 8px;
  height: 8px;
  border-width: 1.5px;
  box-shadow: 0 1px 5px rgba(16,36,62,.26), 0 0 0 1px rgba(255,255,255,.34);
}
.stop-marker.is-terminal {
  width: 11px;
  height: 11px;
  box-shadow: 0 2px 7px rgba(16,36,62,.30), 0 0 0 2px rgba(255,255,255,.48);
}
.favorite-routes {
  margin: 8px 0 10px;
  padding: 8px 10px 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.94);
}
.favorite-routes__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}
.favorite-routes__head strong {
  font-size: 12px;
}
.favorite-routes__head span,
.favorite-routes__empty {
  color: var(--muted);
  font-size: 9px;
}
.favorite-routes__list {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
.favorite-routes__list::-webkit-scrollbar { display: none; }
.favorite-route-chip {
  flex: 0 0 auto;
  min-width: 82px;
  min-height: 42px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.favorite-route-chip span,
.favorite-route-chip small { display: block; white-space: nowrap; }
.favorite-route-chip span { font-size: 11px; font-weight: 950; }
.favorite-route-chip small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.favorite-route-chip:active { transform: scale(.98); }
.route-favorite-btn {
  position: absolute;
  top: 13px;
  right: 56px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #dfe7f0;
  border-radius: 11px;
  background: #f5f8fb;
  color: #52637a;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.route-favorite-btn.is-active {
  border-color: #f0c353;
  background: #fff8df;
  color: #8b6400;
}
.route-preview-kind { margin-right: 145px; }
@media (max-width: 520px) {
  .live-head { padding: 11px 12px; }
  .live-title-row h1 { font-size: 20px; }
  .live-pill { padding: 6px 8px; font-size: 10px; }
  .stats-row { margin-top: 6px; gap: 4px 11px; }
  .stats-row strong { font-size: 12px; }
  .stats-row span { font-size: 9px; }
  .favorite-routes { margin-top: 7px; }
  .route-favorite-btn { right: 51px; padding: 0 8px; }
  .route-preview-kind { margin-right: 130px; }
}


/* v3.0.26 — address refinement must never look like a resolved house marker. */
.address-point-picking--approx .address-center-pin {
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 2px 6px rgba(20,37,60,.20));
}

.address-point-picking--approx .address-center-pin::before,
.address-point-picking--approx .address-center-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(11,95,255,.92);
  border-radius: 2px;
  transform: translate(-50%, -50%);
}

.address-point-picking--approx .address-center-pin::before {
  width: 52px;
  height: 2px;
}

.address-point-picking--approx .address-center-pin::after {
  width: 2px;
  height: 52px;
}

.address-point-picking--approx .address-center-pin span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #0b5fff;
  color: transparent;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(11,95,255,.30);
}

.address-point-picking--approx .address-point-picker small {
  color: #b25300;
}

/* ==========================================================
   v3.0.27 Journey Live vehicles
   ========================================================== */
.vehicle-leaflet-icon--journey {
  z-index: 1200 !important;
}

.vehicle-marker.is-journey-live {
  outline: 4px solid rgba(255,255,255,.92);
  box-shadow: 0 0 0 3px rgba(20,32,51,.18), 0 10px 24px rgba(17,31,49,.34);
}

.vehicle-marker.is-journey-live::after {
  content: '';
  position: absolute;
  right: -3px;
  top: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #20b96b;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(17,31,49,.24);
}

.journey-map-dock__live {
  margin-top: 4px !important;
  padding-top: 4px;
  border-top: 1px solid rgba(216,226,237,.78);
  color: #506074 !important;
  font-size: 9px !important;
  font-weight: 900 !important;
}

.journey-map-dock__live.is-live {
  color: #137c4c !important;
}

.journey-map-dock__live.is-warning {
  color: #9a6219 !important;
}

.vehicle-popup__live {
  display: block;
  margin-top: 7px;
  color: #137c4c;
  font-size: 11px;
  font-weight: 850;
}

/* v3.0.42 — nearest vehicle + arrival notification */
.journey-approach {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0 10px 8px;
  padding: 8px 9px;
  border: 1px solid rgba(11,95,255,.15);
  border-radius: 11px;
  background: #f6f9ff;
}
.journey-approach[hidden] { display: none !important; }
.journey-approach__text {
  min-width: 0;
  color: #30445c;
  font-size: 9px;
  line-height: 1.35;
  font-weight: 900;
}
.journey-alert-btn {
  min-height: 31px;
  border: 1px solid rgba(11,95,255,.22);
  border-radius: 9px;
  padding: 0 8px;
  background: #fff;
  color: #0b5fff;
  font-size: 8px;
  font-weight: 950;
  white-space: nowrap;
}
.journey-alert-btn.is-active {
  border-color: rgba(21,145,93,.25);
  background: #eefaf4;
  color: #137447;
}
.journey-alert-btn:disabled { opacity: .55; }
@media (max-width: 420px) {
  .journey-approach { gap: 6px; padding: 7px 8px; }
  .journey-approach__text { font-size: 8px; }
  .journey-alert-btn { padding-inline: 7px; font-size: 7.5px; }
}


/* v3.0.45 — searchable dropdown route picker under transport type filters */
.filter[data-filter="tram"]::after,
.filter[data-filter="trol"]::after,
.filter[data-filter="bus"]::after {
  content: "⌄";
  display: inline-block;
  margin-left: 4px;
  font-size: 12px;
  line-height: 1;
  opacity: .72;
  transform: translateY(-1px);
}
.inline-route-picker {
  margin: -1px 0 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.99);
  box-shadow: 0 7px 18px rgba(24,44,70,.06);
}
.inline-route-picker[hidden],
.inline-route-picker__routes[hidden] { display: none !important; }
.inline-route-combo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 6px;
  align-items: center;
}
.inline-route-picker__search { min-width: 0; }
.inline-route-picker__search input {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid #d9e2ea;
  border-radius: 10px;
  padding: 0 12px;
  background: #f8fafc;
  color: #1f3146;
  font: inherit;
  font-size: 16px;
  font-weight: 750;
  outline: none;
}
.inline-route-picker__search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20,120,201,.10);
  background: #fff;
}
.inline-route-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid #d9e2ea;
  border-radius: 10px;
  background: #f8fafc;
  color: #41556d;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.inline-route-toggle.is-open { transform: rotate(180deg); background: #eef5fb; }
.inline-route-picker__routes {
  max-height: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  margin-top: 6px;
  border: 1px solid #e2e9ef;
  border-radius: 10px;
  background: #fff;
}
.inline-route-option {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  background: #fff;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  color: #24384e;
  cursor: pointer;
}
.inline-route-option:last-child { border-bottom: 0; }
.inline-route-option:active { background: #f2f7fb; }
.inline-route-option__number {
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}
.inline-route-option__meta {
  min-width: 0;
  color: #708196;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inline-route-option__live {
  border-radius: 999px;
  padding: 5px 7px;
  background: #edf7f1;
  color: #14734a;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.inline-route-option__live.is-offline { background: #f1f3f5; color: #8290a0; }
.inline-route-picker__empty {
  display: block;
  padding: 14px 12px;
  color: #718196;
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 380px) {
  .inline-route-option { grid-template-columns: 48px minmax(0,1fr); }
  .inline-route-option__live { grid-column: 2; justify-self: start; margin-top: -4px; }
}

/* v3.0.46 — confirmed transport changes */
.transport-news{margin:14px 0 0;padding:16px;border:1px solid #e3e9f2;border-radius:18px;background:#fff;box-shadow:0 8px 26px rgba(15,23,42,.05)}
.transport-news__head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.transport-news__head h2{margin:2px 0 0;font-size:19px}.transport-news__badge{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:5px 9px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:12px;font-weight:800;white-space:nowrap}
.transport-news__list{display:grid;gap:9px}.transport-news__empty{padding:12px 0;color:#64748b;font-size:13px}
.transport-news-card{display:grid;gap:7px;padding:12px 13px;border:1px solid #fde7bd;border-radius:14px;background:#fffaf0}.transport-news-card__top{display:flex;gap:8px;align-items:flex-start}.transport-news-card__icon{font-size:18px;line-height:1}.transport-news-card strong{font-size:14px;line-height:1.3}.transport-news-card p{margin:0;color:#475569;font-size:12.5px;line-height:1.45}.transport-news-card__routes{display:flex;gap:6px;flex-wrap:wrap}.transport-news-route{display:inline-flex;padding:4px 7px;border-radius:999px;background:#fff;border:1px solid #f0d8a2;font-size:11px;font-weight:800;color:#7c4a03}.transport-news-card__meta{display:flex;align-items:center;gap:8px;justify-content:space-between;flex-wrap:wrap;color:#64748b;font-size:11px}.transport-news-card__meta a{font-weight:800;color:#2456c4;text-decoration:none}
.route-incident-mini{margin:9px 0 2px;padding:10px 11px;border-radius:12px;background:#fff7e6;border:1px solid #f3d08a;color:#6b4305;font-size:12px;line-height:1.4}.route-incident-mini strong{display:block;font-size:13px;margin-bottom:2px}.route-incident-mini a{color:#7c4a03;font-weight:800}
.incident-map-marker{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#fff7e6;border:2px solid #e59a16;box-shadow:0 3px 12px rgba(0,0,0,.18);font-size:18px}.incident-popup{font:13px/1.4 system-ui,-apple-system,sans-serif;max-width:250px}.incident-popup strong{display:block;margin-bottom:4px}.incident-popup a{font-weight:800;color:#2456c4}
@media(max-width:520px){.transport-news{padding:14px;border-radius:16px}.transport-news-card{padding:11px}.transport-news__head h2{font-size:18px}}

/* v3.0.48 — visible transport-change state directly on the map */
.route-map-change-badge{position:absolute;z-index:780;top:12px;left:50%;transform:translateX(-50%);max-width:min(88%,440px);padding:9px 12px;border:1px solid #f0b64d;border-radius:13px;background:rgba(255,247,230,.96);box-shadow:0 4px 16px rgba(67,42,4,.18);color:#6b4305;pointer-events:none;text-align:center;backdrop-filter:blur(6px)}
.route-map-change-badge[hidden]{display:none!important}.route-map-change-badge strong{display:block;font-size:13px;line-height:1.25}.route-map-change-badge span{display:block;margin-top:2px;font-size:10.5px;line-height:1.25;color:#85570b}
.map-card.is-fullscreen .route-map-change-badge{top:66px;max-width:min(82%,480px)}
@media(max-width:520px){.route-map-change-badge{top:10px;max-width:82%;padding:8px 10px}.route-map-change-badge strong{font-size:12px}.route-map-change-badge span{font-size:10px}}

/* Temporary Route Engine v1 — normal route stays visible, temporary route overlays it. */
.stop-marker.is-skipped{
  background:#fff!important;
  border-color:#9ca3af!important;
  box-shadow:0 0 0 2px rgba(156,163,175,.34)!important;
  opacity:.62;
  position:relative;
}
.stop-marker.is-skipped::after{
  content:'×';position:absolute;inset:-8px;display:grid;place-items:center;
  color:#b91c1c;font-size:18px;font-weight:900;line-height:1;
}
.stop-marker.is-temporary{
  width:14px;height:14px;background:#f59e0b!important;border-color:#fff!important;
  box-shadow:0 2px 9px rgba(146,83,4,.34),0 0 0 3px rgba(245,158,11,.22)!important;
}
.temporary-stop-label{font-size:11px;font-weight:800;color:#7c4a03;background:#fff7e6;border:1px solid #f4c978;border-radius:8px;padding:3px 6px;box-shadow:0 2px 7px rgba(88,53,7,.15)}

/* Route Status Engine v1: keep unavailable routes discoverable, but make their state obvious. */
.route-row.is-suspended,.inline-route-option.is-suspended{opacity:.68}
.route-row.is-suspended .route-row__badge,.inline-route-option.is-suspended .inline-route-option__number{filter:grayscale(.45)}
.route-row.is-suspended .route-row__live,.inline-route-option.is-suspended .inline-route-option__live{font-weight:950}

/* ==========================================================
   v3.1.0 — main shell + real startup splash
   ========================================================== */
:root {
  --app-bottom-nav-h: 66px;
  --home-topbar-h: 58px;
}

.app-splash {
  position: fixed;
  z-index: 5000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  background: #0b5fff;
  color: #fff;
  opacity: 1;
  visibility: visible;
  transition: opacity .28s ease, visibility .28s ease;
}
.app-splash.is-ready { opacity: 0; visibility: hidden; pointer-events: none; }
.app-splash[hidden] { display: none !important; }
.app-splash__content { display: grid; justify-items: center; text-align: center; }
.app-splash__logo {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(3,35,97,.28);
}
.app-splash__logo img { width: 108px; height: 108px; display: block; }
.app-splash__content strong { margin-top: 22px; font-size: 25px; line-height: 1.12; letter-spacing: -.02em; }
.app-splash__content > span { margin-top: 7px; color: rgba(255,255,255,.78); font-size: 13px; font-weight: 700; }
.app-splash__pulse {
  width: 7px;
  height: 7px;
  margin-top: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: -14px 0 0 rgba(255,255,255,.42), 14px 0 0 rgba(255,255,255,.42);
  animation: appSplashPulse 1.05s ease-in-out infinite;
}
@keyframes appSplashPulse { 50% { opacity: .45; transform: scale(.85); } }
@media (prefers-reduced-motion: reduce) {
  .app-splash, .app-splash__pulse { animation: none; transition: none; }
}

.transport-app { min-height: 100dvh; padding-bottom: calc(var(--app-bottom-nav-h) + var(--safe-bottom)); }
.topbar--home {
  min-height: var(--home-topbar-h);
  padding: calc(7px + var(--safe-top)) 12px 7px;
  gap: 8px;
  background: rgba(255,255,255,.97);
}
.topbar-square {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #1f334c;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
}
.topbar-square:active { background: #edf3f8; }
.brand--home { flex: 1 1 auto; justify-content: center; text-align: center; }
.brand--home strong { font-size: 16px; line-height: 1.1; letter-spacing: -.01em; }

.main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 10px 12px 12px;
}
.main > .live-head { display: none !important; }
.home-map-controls { display: grid; gap: 8px; margin-bottom: 8px; }
.home-route-search {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dce4ed;
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  color: #66768a;
  text-align: left;
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 4px 14px rgba(24,44,70,.05);
  cursor: text;
}
.home-route-search > span:first-child { font-size: 16px; }
.home-route-search:active { background: #f8fafc; }

.home-map-controls .filter-wrap {
  position: static;
  padding: 0;
  background: transparent;
}
.home-map-controls .filters {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, minmax(0,1fr));
  gap: 8px;
  overflow: visible;
  padding: 0;
}
.home-map-controls .filter {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 16px;
  box-shadow: none;
}
.home-map-controls .filter[data-filter="all"] { font-size: 13px; }
.home-map-controls .filter[data-filter="tram"]::after,
.home-map-controls .filter[data-filter="trol"]::after,
.home-map-controls .filter[data-filter="bus"]::after { display: none !important; content: none !important; }
.inline-route-picker[hidden] { display: none !important; }

.map-card:not(.is-fullscreen) {
  min-height: 360px;
  height: clamp(360px, calc(100dvh - 232px - var(--safe-top) - var(--safe-bottom)), 760px);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(24,44,70,.09);
}
.map-card:not(.is-fullscreen) .locate-btn {
  right: 10px;
  top: auto;
  bottom: 62px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 22px;
}
.map-card:not(.is-fullscreen) .leaflet-control-zoom { margin-left: 10px !important; margin-bottom: 10px !important; }
.map-card:not(.is-fullscreen) .map-expand-btn {
  right: 10px;
  bottom: 10px;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 13px;
  font-size: 0;
}
.map-card:not(.is-fullscreen) .map-expand-btn span { font-size: 21px; }

/* Legacy long-form blocks stay in the DOM for the existing engine, but the
   new home screen is map-first. Their functions are reached through the menu. */
.trip-planner--route,
.app-footer--legacy { display: none !important; }

.app-bottom-nav {
  position: fixed;
  z-index: 1350;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: calc(var(--app-bottom-nav-h) + var(--safe-bottom));
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  align-items: start;
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: rgba(255,255,255,.98);
  border-top: 1px solid rgba(216,226,237,.94);
  box-shadow: 0 -8px 28px rgba(24,44,70,.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.app-bottom-nav__item {
  min-width: 0;
  min-height: 53px;
  border: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  padding: 3px 2px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}
.app-bottom-nav__item > span:last-child { font-size: 10px; line-height: 1; font-weight: 800; white-space: nowrap; }
.app-bottom-nav__icon { font-size: 20px; line-height: 1; }
.app-bottom-nav__item.is-active { color: #0b5fff; background: #f2f6ff; }
.app-bottom-nav__item:active { background: #eef3f8; }
body.route-fullscreen .app-bottom-nav,
body.trip-search-open .app-bottom-nav { display: none; }

.app-panel {
  position: fixed;
  z-index: 1250;
  inset: 0 0 calc(var(--app-bottom-nav-h) + var(--safe-bottom)) 0;
  margin: 0 !important;
  padding: calc(14px + var(--safe-top)) 14px 18px !important;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f4f7fa !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.app-panel[hidden] { display: none !important; }
.app-panel__head {
  position: sticky;
  z-index: 2;
  top: calc(-14px - var(--safe-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: calc(-14px - var(--safe-top)) -14px 14px;
  padding: calc(12px + var(--safe-top)) 14px 12px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #e1e8ef;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.app-panel__head h2 { margin: 0; font-size: 21px; }
.app-panel__head .eyebrow { margin-bottom: 3px; color: #6b7788; }
.app-panel__head-actions { display: flex; align-items: center; gap: 8px; }
.app-panel__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #edf2f7;
  color: #3b4c61;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.transport-news.app-panel .transport-news__head { margin-bottom: 14px; }
.transport-news.app-panel .transport-news__list { gap: 10px; }
.transport-news.app-panel .transport-news-card { padding: 14px; border-radius: 16px; background: #fff; }
.transport-news.app-panel .transport-news__empty { padding: 20px 12px; border-radius: 16px; background: #fff; text-align: center; }

.favorites-panel__body { display: grid; gap: 14px; }
.favorites-panel .favorite-routes {
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
}
.favorites-panel .favorite-routes__list { flex-wrap: wrap; overflow: visible; }
.favorites-panel .saved-trips-block { margin: 0; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.favorites-panel__hint { display: grid; gap: 5px; padding: 14px; border-radius: 16px; background: #eaf1ff; color: #304661; }
.favorites-panel__hint strong { font-size: 13px; }
.favorites-panel__hint span { font-size: 11px; line-height: 1.45; }

.settings-panel__body { display: grid; gap: 10px; max-width: 620px; margin: 0 auto; }
.settings-action {
  width: 100%;
  min-height: 50px;
  border: 1px solid #dce4ed;
  border-radius: 15px;
  padding: 0 15px;
  background: #fff;
  color: #253a52;
  text-align: left;
  font-weight: 850;
  cursor: pointer;
}
.settings-action--primary { border-color: #0b5fff; background: #0b5fff; color: #fff; }
.settings-links { display: grid; margin-top: 5px; overflow: hidden; border: 1px solid #dce4ed; border-radius: 16px; background: #fff; }
.settings-links a { padding: 14px 15px; color: #2e435c; text-decoration: none; font-size: 13px; font-weight: 800; border-bottom: 1px solid #edf1f5; }
.settings-links a:last-child { border-bottom: 0; }

.install-banner { bottom: calc(var(--app-bottom-nav-h) + 12px + var(--safe-bottom)); }
.toast { bottom: calc(var(--app-bottom-nav-h) + 12px + var(--safe-bottom)); }
body.route-fullscreen .toast,
body.trip-search-open .toast { bottom: calc(18px + var(--safe-bottom)); }

@media (min-width: 760px) {
  .topbar--home { padding-left: 18px; padding-right: 18px; }
  .main { padding: 12px 18px 18px; }
  .home-map-controls { grid-template-columns: minmax(260px, 1fr) minmax(360px, .8fr); align-items: center; }
  .map-card:not(.is-fullscreen) { height: min(76vh, 760px); min-height: 560px; }
  .app-bottom-nav { left: 50%; right: auto; width: min(620px, 100%); transform: translateX(-50%); border-left: 1px solid rgba(216,226,237,.94); border-right: 1px solid rgba(216,226,237,.94); border-radius: 18px 18px 0 0; }
  .app-panel { left: 50%; right: auto; width: min(760px, 100%); transform: translateX(-50%); border-left: 1px solid #e1e8ef !important; border-right: 1px solid #e1e8ef !important; }
}

@media (max-width: 390px) {
  :root { --app-bottom-nav-h: 62px; }
  .topbar-square { width: 38px; height: 38px; font-size: 22px; }
  .brand--home strong { font-size: 15px; }
  .main { padding-left: 9px; padding-right: 9px; }
  .home-route-search { min-height: 44px; }
  .home-map-controls .filters { gap: 6px; }
  .home-map-controls .filter { min-height: 38px; }
  .map-card:not(.is-fullscreen) { min-height: 330px; height: calc(100dvh - 222px - var(--safe-top) - var(--safe-bottom)); }
  .app-bottom-nav__item > span:last-child { font-size: 9px; }
  .app-bottom-nav__icon { font-size: 19px; }
  .app-splash__logo { width: 112px; height: 112px; border-radius: 29px; }
  .app-splash__logo img { width: 98px; height: 98px; }
  .app-splash__content strong { font-size: 22px; }
}


/* ==========================================================
   v3.2.0 — house lookup recovery + stable navigation
   ========================================================== */
html, body { height: 100%; }
body:not(.route-fullscreen):not(.trip-search-open):not(.address-point-picking) { overflow: hidden; }
.transport-app {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: calc(var(--app-bottom-nav-h) + var(--safe-bottom));
}
.topbar--home {
  flex: 0 0 auto;
  min-height: var(--home-topbar-h);
  padding: calc(6px + var(--safe-top)) 10px 6px;
  gap: 8px;
}
.brand--home {
  flex: 1 1 auto;
  justify-content: flex-start;
  text-align: left;
  gap: 9px;
  min-width: 0;
}
.brand--home img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 5px 14px rgba(11,95,255,.15);
}
.brand--home__copy { min-width: 0; display: block !important; }
.brand--home strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; }
.header-share-app {
  flex: 0 0 auto;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #edf3fb;
  color: #21405f;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}
.header-share-app > span:first-child { font-size: 16px; }
.header-share-app:active { background:#e4edf7; }

.main {
  flex: 1 1 auto;
  min-height: 0;
  width: min(1180px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px 10px 8px;
}
.home-map-controls { flex:0 0 auto; gap:7px; margin-bottom:7px; }
.map-card:not(.is-fullscreen) {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
  margin: 0;
}
.alarm-info-card[hidden], .selected-card[hidden] { display:none !important; }

/* Panels behave like pages and have a visible back action. */
.app-panel__head {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
}
.app-panel__title { min-width:0; text-align:center; }
.app-panel__title h2 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.app-panel__back, .trip-search-back {
  min-height:38px;
  border:0;
  border-radius:11px;
  padding:0 9px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:#edf2f7;
  color:#32475f;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
  white-space:nowrap;
}
.app-panel__head-spacer { width:64px; }
.transport-news__badge { justify-self:end; }

/* Home planner is a modal over the normal map. It does not promote the map
   to fullscreen until the user actually chooses a journey result. */
.trip-search-back { min-width:74px; }
.trip-search-sheet__head-actions { align-items:center; }
body.trip-search-open .transport-app { overflow:hidden; }

.settings-panel__body { gap:14px; padding-bottom:10px; }
.settings-group { display:grid; gap:8px; }
.settings-group__title { padding:0 3px; color:#607086; font-size:11px; letter-spacing:.02em; }
.settings-tech-card { display:grid; overflow:hidden; border:1px solid #dce4ed; border-radius:16px; background:#fff; }
.settings-tech-card span { min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; border-bottom:1px solid #edf1f5; }
.settings-tech-card span:last-child { border-bottom:0; }
.settings-tech-card b { color:#2e435c; font-size:12px; }
.settings-tech-card em { color:#78879a; font-size:10px; font-style:normal; text-align:right; }

@media (max-width: 430px) {
  .header-share-app { padding:0 8px; font-size:10px; }
  .header-share-app > span:first-child { display:none; }
  .brand--home img { width:36px; height:36px; }
  .brand--home strong { font-size:14px; }
  .main { padding-left:8px; padding-right:8px; }
}
@media (max-width: 350px) {
  .header-share-app > span:last-child { max-width:108px; overflow:hidden; text-overflow:ellipsis; }
  .app-panel__back span, .trip-search-back span { display:none; }
  .app-panel__head-spacer { width:40px; }
}

.settings-action:disabled { opacity:.7; cursor:default; }

/* v3.2.0 — live-aware Planner decisions */
.journey-live-decision {
  display: inline-block;
  margin-top: 4px;
  font-weight: 750;
  color: #176a49;
  line-height: 1.28;
}
.journey-live-decision.is-warning {
  color: #9a5a08;
}


/* ==========================================================
   v3.2.2 — saturated visual theme only (layout unchanged)
   ========================================================== */
:root {
  --bg: #f3f7fc;
  --surface: #ffffff;
  --surface-soft: rgba(255,255,255,.96);
  --text: #17212b;
  --muted: #66758a;
  --line: #d8e2ee;
  --brand: #1769e0;
  --brand-dark: #0d5bd7;
  --tram: #e65353;
  --trol: #16a085;
  --bus: #2474f5;
  --shadow: 0 14px 40px rgba(24,74,128,.14);
}

html, body { background: var(--bg); color: var(--text); }
.topbar,
.topbar--home {
  background: rgba(255,255,255,.97);
  border-bottom-color: rgba(210,223,238,.96);
  box-shadow: 0 5px 18px rgba(22,74,128,.055);
}
.brand--home img,
.brand img { box-shadow: 0 6px 18px rgba(23,105,224,.22); }
.header-share-app {
  background: #eaf3ff;
  color: #145ab9;
  box-shadow: inset 0 0 0 1px rgba(23,105,224,.08);
}
.header-share-app[data-action="install"] {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 7px 18px rgba(23,105,224,.24);
}
.header-share-app[data-action="share"] {
  background: #eaf3ff;
  color: #145ab9;
}
.header-share-app:active { background: #dcecff; }
.header-share-app[data-action="install"]:active { background: var(--brand-dark); }

.home-route-search {
  border-color: #d7e3f0;
  background: #fff;
  color: #5f7085;
  box-shadow: 0 6px 18px rgba(24,74,128,.075);
}
.home-route-search:active { background: #f7faff; }
.filter,
.home-map-controls .filter {
  border-color: #d7e3f0;
  background: #fff;
  color: #31475f;
}
.filter.is-active,
.home-map-controls .filter.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(23,105,224,.19);
}

.map-card:not(.is-fullscreen),
.map-card {
  border-color: #d4dfeb;
  background: #dce7f0;
  box-shadow: 0 10px 30px rgba(24,74,128,.13);
}
.map { background: #dce7f0; }
.map-expand-btn,
.locate-btn,
.leaflet-control-zoom a {
  border-color: #d7e2ee !important;
  color: #24445f !important;
}
.vehicle-marker.is-selected { outline-color: rgba(23,105,224,.26); }

.app-bottom-nav {
  background: rgba(255,255,255,.985);
  border-top-color: rgba(210,223,238,.98);
  box-shadow: 0 -8px 28px rgba(24,74,128,.10);
}
.app-bottom-nav__item { color: #63758b; }
.app-bottom-nav__item.is-active {
  color: var(--brand);
  background: #eaf3ff;
}
.app-bottom-nav__item:active { background: #e5eef8; }

.app-panel { background: var(--bg) !important; }
.app-panel__head {
  background: rgba(255,255,255,.975);
  border-bottom-color: #d9e4ef;
}
.app-panel__back,
.trip-search-back,
.app-panel__close,
.close-btn {
  background: #eaf1f8;
  color: #2c4965;
}
.transport-news.app-panel .transport-news-card,
.transport-news.app-panel .transport-news__empty,
.favorites-panel .favorite-routes,
.favorites-panel .saved-trips-block,
.settings-action,
.settings-links,
.settings-tech-card {
  border-color: #d8e2ee;
  background: #fff;
  box-shadow: 0 5px 16px rgba(24,74,128,.045);
}
.favorites-panel__hint,
.home-search-option__icon { background: #eaf3ff; }
.settings-action { color: #253f59; }
.settings-action--primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 7px 18px rgba(23,105,224,.18);
}
.settings-links a { color: #294864; }
.settings-group__title { color: #5f7188; }
.settings-tech-card b { color: #294864; }
.settings-tech-card em { color: #718399; }

.home-search-backdrop,
.trip-search-backdrop,
.drawer-backdrop { background: rgba(15,37,64,.36); }
.home-search-sheet,
.trip-search-sheet,
.routes-drawer {
  border-color: #d7e2ee;
  background: rgba(255,255,255,.992);
  box-shadow: 0 20px 62px rgba(19,58,102,.22);
}
.home-search-option {
  border-color: #dce6f0;
  color: #233e59;
}
.home-search-option:active { background: #f4f8fd; }
.route-search input {
  border-color: #d7e2ee;
  background: #f7faff;
}
.route-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23,105,224,.11);
}
.drawer-filter.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.route-row__live { background: #e7f7f0; color: #087451; }
.route-row__live.is-offline { background: #f1f4f7; color: #718093; }

.selected-route-badge,
.open-full-route-btn { background: var(--brand); }
.route-preview-online,
.journey-live-decision { color: #12845d; }
.journey-live-decision.is-warning { color: #a76208; }

.install-banner {
  background: #172b40;
  box-shadow: 0 18px 52px rgba(17,44,73,.30);
}
.install-banner button { background: var(--brand); }
.toast { background: #172b40; }

.app-splash {
  background: linear-gradient(145deg, #1769e0 0%, #0d5bd7 58%, #084cab 100%);
}
.app-splash__logo { box-shadow: 0 24px 60px rgba(5,43,101,.32); }
.app-splash__content > span { color: rgba(255,255,255,.84); }


/* ==========================================================
   v3.3.1 — one-finger home map + richer chrome
   Layout/geometry intentionally unchanged.
   ========================================================== */

/* Home map: direct one-finger pan + pinch zoom. */
@media (max-width: 760px) and (pointer: coarse) {
  .map-card:not(.is-fullscreen) .leaflet-container,
  .map-card:not(.is-fullscreen) .leaflet-container.map-one-finger-touch {
    touch-action: none !important;
    -ms-touch-action: none !important;
  }
  .map-card:not(.is-fullscreen) .leaflet-container .leaflet-marker-icon,
  .map-card:not(.is-fullscreen) .leaflet-container .leaflet-interactive,
  .map-card:not(.is-fullscreen) .leaflet-container .leaflet-control {
    touch-action: manipulation;
  }
}
.map-gesture-hint { display:none !important; }

/* Header: same position and height, more depth and brand character. */
.topbar--home {
  background:
    radial-gradient(circle at 12% -70%, rgba(23,105,224,.14), transparent 48%),
    linear-gradient(180deg, rgba(255,255,255,.995) 0%, rgba(247,251,255,.985) 100%);
  border-bottom: 1px solid rgba(190,211,236,.92);
  box-shadow: 0 7px 24px rgba(25,78,138,.09);
}
.brand--home img {
  background:#fff;
  box-shadow:
    0 7px 18px rgba(23,105,224,.23),
    0 0 0 3px rgba(255,255,255,.95),
    0 0 0 4px rgba(23,105,224,.10);
}
.brand--home strong {
  color:#153451;
  font-weight:900;
  letter-spacing:-.015em;
}
.header-share-app {
  border:1px solid rgba(23,105,224,.15);
  background:linear-gradient(180deg,#f2f7ff 0%,#e5f0ff 100%);
  color:#1259ba;
  box-shadow:0 5px 14px rgba(23,105,224,.11), inset 0 1px 0 rgba(255,255,255,.9);
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.header-share-app[data-action="install"] {
  border-color:rgba(13,91,215,.14);
  background:linear-gradient(135deg,#2178ef 0%,#0d5bd7 100%);
  color:#fff;
  box-shadow:0 8px 18px rgba(23,105,224,.28), inset 0 1px 0 rgba(255,255,255,.20);
}
.header-share-app[data-action="share"] > span:first-child {
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:rgba(255,255,255,.72);
  box-shadow:inset 0 0 0 1px rgba(23,105,224,.08);
}
.header-share-app:active { transform:scale(.975); box-shadow:0 3px 9px rgba(23,105,224,.12); }

/* Footer nav: same four slots, but icons have a deliberate button shape. */
.app-bottom-nav {
  background:
    linear-gradient(180deg, rgba(250,253,255,.975) 0%, rgba(255,255,255,.995) 42%),
    #fff;
  border-top:1px solid rgba(190,211,236,.94);
  box-shadow:0 -10px 30px rgba(24,74,128,.13);
}
.app-bottom-nav::before {
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  top:0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(23,105,224,.24),transparent);
  pointer-events:none;
}
.app-bottom-nav__item {
  position:relative;
  color:#60758c;
  transition:transform .12s ease, color .12s ease, background .12s ease;
}
.app-bottom-nav__icon {
  width:31px;
  height:31px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:#f0f5fb;
  box-shadow:inset 0 0 0 1px rgba(94,125,160,.08);
  font-size:18px;
  transition:transform .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease;
}
.app-bottom-nav__item > span:last-child {
  font-weight:850;
  letter-spacing:-.01em;
}
.app-bottom-nav__item.is-active {
  color:#0f61cf;
  background:transparent;
}
.app-bottom-nav__item.is-active .app-bottom-nav__icon {
  color:#fff;
  background:linear-gradient(135deg,#2b7ff0 0%,#0d5bd7 100%);
  box-shadow:0 7px 15px rgba(23,105,224,.28), inset 0 1px 0 rgba(255,255,255,.22);
  transform:translateY(-1px);
}
.app-bottom-nav__item.is-active::after {
  content:"";
  position:absolute;
  left:50%;
  bottom:1px;
  width:20px;
  height:3px;
  border-radius:999px;
  background:#1769e0;
  transform:translateX(-50%);
  opacity:.92;
}
.app-bottom-nav__item:active { background:rgba(234,243,255,.74); transform:scale(.975); }

@media (max-width:430px) {
  .app-bottom-nav__icon { width:29px; height:29px; border-radius:10px; font-size:17px; }
}


/* ==========================================================
   v3.3.3 HARD UI REFRESH
   ========================================================== */
#map, .map-card:not(.is-fullscreen) .leaflet-container { touch-action:none !important; -ms-touch-action:none !important; overscroll-behavior:contain; }
.map-gesture-hint{display:none !important;}
.topbar--home{background:linear-gradient(135deg,#0d4fad 0%,#1769e0 62%,#2a7df0 100%) !important;border-bottom:0 !important;box-shadow:0 8px 24px rgba(13,79,173,.22) !important;}
.brand--home strong{color:#fff !important;text-shadow:0 1px 1px rgba(0,0,0,.08);}
.brand--home img{background:#fff !important;box-shadow:0 5px 15px rgba(5,40,95,.25),0 0 0 2px rgba(255,255,255,.3) !important;}
.header-share-app{color:#fff !important;background:rgba(255,255,255,.16) !important;border:1px solid rgba(255,255,255,.34) !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.18) !important;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);}
.header-share-app[data-action="install"]{background:#fff !important;color:#1259ba !important;border-color:#fff !important;box-shadow:0 5px 14px rgba(0,35,90,.18) !important;}
.app-bottom-nav{background:linear-gradient(180deg,#153b61 0%,#0e2c49 100%) !important;border-top:1px solid rgba(255,255,255,.08) !important;box-shadow:0 -10px 28px rgba(8,30,52,.22) !important;}
.app-bottom-nav__item{color:#b8c8d9 !important;background:transparent !important;}
.app-bottom-nav__icon{background:rgba(255,255,255,.09) !important;color:#eaf3fb !important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.07) !important;}
.app-bottom-nav__item.is-active{color:#fff !important;}
.app-bottom-nav__item.is-active .app-bottom-nav__icon{background:linear-gradient(135deg,#3b8cff,#1769e0) !important;color:#fff !important;box-shadow:0 7px 16px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.22) !important;}
.app-bottom-nav__item.is-active::after{background:#64a5ff !important;}


/* ==========================================================
   v3.5.0 — UX consolidation
   Four primary actions, direct route search, compact type picker,
   tappable transport-change routes and a single map status stack.
   ========================================================== */

.app-bottom-nav {
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
}
.app-bottom-nav__item > span:last-child { font-size: 10px; }

.home-route-search::after {
  content: "›";
  margin-left: auto;
  color: #8b9aad;
  font-size: 23px;
  font-weight: 500;
  line-height: 1;
}
.home-route-search:focus-visible,
.filter:focus-visible,
.inline-route-toggle:focus-visible,
.inline-route-option:focus-visible,
.transport-news-route:focus-visible,
.trip-swap-btn:focus-visible {
  outline: 3px solid rgba(100,165,255,.35);
  outline-offset: 2px;
}

.home-map-controls .filter[data-filter="tram"]::after,
.home-map-controls .filter[data-filter="trol"]::after,
.home-map-controls .filter[data-filter="bus"]::after {
  content: "⌄" !important;
  display: inline-block !important;
  margin-left: 4px;
  font-size: 11px;
  line-height: 1;
  opacity: .74;
  transform: translateY(-1px);
}

.inline-route-picker:not([hidden]) {
  flex: 0 0 auto;
  display: block !important;
  margin: 0 0 7px;
  padding: 7px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(20,48,78,.08);
}
.inline-route-picker__search input,
.inline-route-toggle { height: 40px; }
.inline-route-picker__routes {
  max-height: min(168px, 23dvh);
  margin-top: 6px;
}
.inline-route-option {
  min-height: 48px;
  grid-template-columns: 50px minmax(0,1fr) auto;
}
.inline-route-option__number { font-size: 14px; }
.inline-route-option__meta { font-size: 10px; }

.map-status-stack {
  position: absolute;
  z-index: 850;
  top: 10px;
  left: 10px;
  right: 10px;
  display: grid;
  justify-items: center;
  gap: 7px;
  pointer-events: none;
}
.map-card.is-fullscreen .map-status-stack {
  top: 64px;
  left: 14px;
  right: 14px;
}
.map-status-stack > [hidden] { display: none !important; }
.map-status-stack > * {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: min(100%, 520px);
  max-width: 520px !important;
  margin: 0 !important;
  box-sizing: border-box;
}
.map-status-stack .alarm-map-notice { pointer-events: auto; }
.map-status-stack .route-map-change-badge { pointer-events: none; text-align: left; }

.live-source-notice {
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid rgba(101,116,139,.22);
  border-radius: 13px;
  background: rgba(248,250,252,.96);
  color: #334155;
  box-shadow: 0 5px 18px rgba(15,23,42,.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.live-source-notice strong { font-size: 12px; line-height: 1.25; }
.live-source-notice span { color: #64748b; font-size: 10px; line-height: 1.3; }

.transport-news-route {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid #f0d8a2;
  border-radius: 999px;
  background: #fff;
  color: #7c4a03;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}
.transport-news-route > span { font-size: 15px; line-height: 1; opacity: .68; }
.transport-news-route:active { background: #fff4d8; transform: translateY(1px); }

.trip-swap-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px;
  margin: -1px auto !important;
  border: 1px solid rgba(11,95,255,.14) !important;
  border-radius: 50% !important;
  background: #eef4ff !important;
  color: #0b5fff !important;
  box-shadow: 0 4px 12px rgba(11,95,255,.09);
  font-size: 17px !important;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}
.trip-swap-btn:active { transform: scale(.96); }
.trip-swap-btn:disabled {
  opacity: .45;
  cursor: default;
  box-shadow: none;
}

.route-row__body span { line-height: 1.25; }
.settings-tech-card em { max-width: 58%; }

@media (max-width: 430px) {
  .app-bottom-nav__item > span:last-child { font-size: 10px; }
  .app-bottom-nav__icon { width: 30px; height: 30px; font-size: 18px; }
  .home-map-controls .filter { min-height: 42px; }
  .inline-route-picker__routes { max-height: min(152px, 20dvh); }
  .map-status-stack { left: 8px; right: 8px; top: 8px; gap: 6px; }
  .map-card.is-fullscreen .map-status-stack { top: 62px; left: 10px; right: 10px; }
}

@media (max-width: 360px) {
  .inline-route-option { grid-template-columns: 45px minmax(0,1fr); }
  .inline-route-option__live { grid-column: 2; justify-self: start; margin-top: -3px; }
}


/* ==========================================================
   v3.6.0 — Route + Live UX
   Distinguish fresh stationary/terminal vehicles from moving ones,
   keep every fresh selected-route GPS marker visible, and make route
   state readable before users trust ETA.
   ========================================================== */

.route-preview-card {
  padding: 16px;
  border-color: #d6e2ef;
  box-shadow: 0 10px 30px rgba(22,62,105,.09);
}
.route-preview-card h2 { margin-bottom: 4px; }
.route-preview-endpoints { max-width: calc(100% - 6px); line-height: 1.35; }

.route-live-card {
  margin: 12px 0 10px;
  padding: 11px 12px;
  border: 1px solid #dbe6f1;
  border-radius: 15px;
  background: linear-gradient(180deg,#f8fbff 0%,#f3f8fe 100%);
}
.route-live-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.route-live-card__head > div { min-width: 0; }
.route-live-card__head small {
  display: block;
  margin-bottom: 2px;
  color: #77889a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.route-live-card__head .route-preview-online {
  display: block;
  color: #173b5f;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.25;
}
.route-live-card__gps {
  flex: 0 0 auto;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #cfe0f2;
  border-radius: 999px;
  background: #fff;
  color: #55718d;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .04em;
}
.route-live-chips,
.fullscreen-live-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.route-live-chips { margin-top: 9px; }
.route-live-chip {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.15;
}
.route-live-chip--moving { background:#eaf8f1; border-color:#ccebdc; color:#087451; }
.route-live-chip--terminal { background:#fff8df; border-color:#f3e0a0; color:#866100; }
.route-live-chip--stationary { background:#fff1e6; border-color:#f1cfb3; color:#a55314; }
.route-live-chip--unknown { background:#f1f4f7; border-color:#dfe5eb; color:#637286; }
.route-live-hint {
  margin: 8px 0 0;
  color: #718195;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.35;
}

.route-preview-actions {
  display: grid;
  grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr);
  gap: 8px;
}
.route-open-map,
.route-preview-actions .route-stops-toggle {
  min-height: 46px;
  border-radius: 13px;
}
.route-open-map {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  padding: 0 12px;
  background: linear-gradient(135deg,#2178ef 0%,#0d5bd7 100%);
  color: #fff;
  box-shadow: 0 7px 17px rgba(23,105,224,.18);
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}
.route-open-map:active { transform: translateY(1px); }
.route-open-map:disabled { opacity:.48; box-shadow:none; cursor:default; }
.route-preview-actions .route-stops-toggle { padding: 0 10px; }
.route-preview-actions .route-stops-toggle__meta { gap: 5px; }

.route-direction-btn {
  min-width: 0;
  min-height: 51px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 5px 8px;
}
.route-direction-btn > span {
  display: block;
  font-size: 11px;
  font-weight: 950;
}
.route-direction-btn > small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #78889a;
  font-size: 8.5px;
  font-weight: 800;
}
.route-direction-btn.is-active > small { color:#587aa3; }
.route-stop-row { position: relative; }
.route-stop-row::before {
  content:"";
  position:absolute;
  left:23px;
  top:-1px;
  bottom:-1px;
  width:2px;
  background:#dce5ee;
  pointer-events:none;
}
.route-stop-index { position:relative; z-index:1; background:#fff; border:2px solid #dce5ee; }
.route-stops-list li:first-child .route-stop-row::before { top:50%; }
.route-stops-list li:last-child .route-stop-row::before { bottom:50%; }
.route-stops-list li:first-child .route-stop-index,
.route-stops-list li:last-child .route-stop-index { border-color:#1769e0; color:#1769e0; }

/* Live motion is visible directly on every selected-route marker. */
.vehicle-marker__state {
  position:absolute;
  right:-2px;
  bottom:-2px;
  width:11px;
  height:11px;
  border:2px solid #fff;
  border-radius:50%;
  background:#94a3b8;
  box-shadow:0 2px 5px rgba(15,23,42,.22);
}
.vehicle-marker--motion-moving .vehicle-marker__state { background:#18a36f; }
.vehicle-marker--motion-terminal .vehicle-marker__state { background:#e7b51b; }
.vehicle-marker--motion-stationary .vehicle-marker__state { background:#e47b2a; }
.vehicle-marker--motion-unknown .vehicle-marker__state { background:#94a3b8; }
.vehicle-marker--motion-terminal.is-selected { filter:saturate(.92); }
.vehicle-marker--motion-stationary.is-selected { filter:saturate(.82); }
.vehicle-popup__live--moving { color:#087451 !important; }
.vehicle-popup__live--terminal { color:#8a6700 !important; }
.vehicle-popup__live--stationary { color:#a65315 !important; }
.vehicle-popup__live--unknown { color:#637286 !important; }

/* Fullscreen route: compact route identity + truthful Live state. */
.fullscreen-route-info {
  width: min(590px, calc(100% - 104px));
  padding: 10px 12px 9px;
  pointer-events: none;
}
.fullscreen-route-info__top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:4px;
}
.fullscreen-route-badge {
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  color:#155fbf !important;
  font-size:9px !important;
  font-weight:950 !important;
}
.fullscreen-route-live {
  flex:0 1 auto;
  min-width:0;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  color:#46627d !important;
  font-size:8.5px !important;
  font-weight:900 !important;
}
.fullscreen-route-info > strong { font-size:10.5px; }
.fullscreen-live-chips { margin-top:6px; gap:4px; }
.fullscreen-live-chips .route-live-chip {
  min-height:21px;
  padding:3px 6px;
  font-size:8px;
}
.fullscreen-route-info > #fullscreenStopsInfo {
  margin-top:5px;
  font-size:8.5px;
}

@media (max-width:430px) {
  .route-preview-card { padding:14px; }
  .route-live-card { margin-top:10px; padding:10px; }
  .route-live-chip { font-size:9px; padding-inline:7px; }
  .route-preview-actions { grid-template-columns:1fr 1fr; gap:7px; }
  .route-open-map, .route-preview-actions .route-stops-toggle { min-height:44px; }
  .fullscreen-route-info {
    left: 62px;
    right: 10px;
    width: auto;
    transform:none;
    bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .fullscreen-live-chips { max-height:48px; overflow:hidden; }
}

@media (max-width:350px) {
  .route-preview-actions { grid-template-columns:1fr; }
  .fullscreen-route-info { left:56px; }
}

/* ==========================================================
   v3.8.1 Mobile planner: suggestions stay usable above keyboard
   ========================================================== */
@media (max-width: 760px) {
  .trip-search-sheet--planner.is-address-typing {
    scroll-padding-top: 86px;
    scroll-padding-bottom: min(350px, 42vh);
  }

  /* Extra scroll runway lets the lower “Куди” field move high enough that
     its suggestion list is not trapped in a 1–2 row strip above keyboard. */
  .trip-search-sheet--planner.is-address-typing .full-trip-form {
    padding-bottom: min(330px, 38vh);
  }

  .trip-search-sheet--planner.is-address-typing .full-trip-field .address-suggest-list {
    max-height: min(320px, 36vh);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .trip-search-sheet--planner.is-address-typing .address-suggest-item {
    min-height: 50px;
  }
}


/* DNIPRO v3.9.0 BOTTOM NAV */
.app-bottom-nav {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.app-bottom-nav__item {
  min-width: 0;
  padding-left: 2px !important;
  padding-right: 2px !important;
}

.app-bottom-nav__item > span:last-child {
  white-space: nowrap;
  font-size: clamp(9px, 2.55vw, 11px);
}

.app-bottom-nav__item--update {
  position: relative;
}

.app-bottom-nav__item--update.has-update::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 22%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.app-bottom-nav__item--update.is-checking .app-bottom-nav__icon {
  animation: dnipro-update-spin .8s linear infinite;
}

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


/* v3.9.2: old incident map height guard disabled */
.dnipro-incident-map-guard {
  min-height: 0 !important;
}



/* =========================================================
   DNIPRO v3.9.2 COMPACT INCIDENT
   ========================================================= */

#routeIncidentMini.is-collapsible {
  position: relative !important;
  cursor: pointer;
  padding-right: 46px !important;
  transition:
    max-height .18s ease,
    padding .18s ease;
}

/*
 * COLLAPSED:
 * one compact line only.
 */
#routeIncidentMini.is-collapsible:not(.is-expanded) {
  max-height: 58px !important;
  min-height: 0 !important;
  overflow: hidden !important;

  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

/*
 * Render existing blocks inline so the first line
 * really remains one line.
 */
#routeIncidentMini.is-collapsible:not(.is-expanded) > * {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
}

#routeIncidentMini.is-collapsible:not(.is-expanded) br {
  display: none !important;
}

/*
 * Details/source belong to expanded state.
 * On collapsed state user primarily sees the headline.
 */
#routeIncidentMini.is-collapsible:not(.is-expanded) a {
  display: none !important;
}

/*
 * Fade long text before arrow.
 */
#routeIncidentMini.is-collapsible:not(.is-expanded)::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  right: 38px;
  bottom: 0;
  width: 52px;

  pointer-events: none;

  background:
    linear-gradient(
      to right,
      rgba(255,255,255,0),
      var(--route-incident-bg, #fff7e8)
    );
}

/*
 * Down arrow.
 */
#routeIncidentMini.is-collapsible::after {
  content: '⌄';

  position: absolute;
  z-index: 3;

  top: 50%;
  right: 12px;

  width: 28px;
  height: 28px;

  transform: translateY(-50%);

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  font-size: 22px;
  line-height: 1;
  font-weight: 800;

  color: currentColor;

  background: rgba(255,255,255,.64);
}

/*
 * Expanded state.
 */
#routeIncidentMini.is-collapsible.is-expanded {
  max-height: none !important;
  white-space: normal !important;
  overflow: visible !important;
}

#routeIncidentMini.is-collapsible.is-expanded::after {
  content: '⌃';
}

#routeIncidentMini.is-collapsible.is-expanded::before {
  display: none;
}

/*
 * Keep route action buttons directly usable.
 */
.route-preview-actions {
  position: relative;
  z-index: 1;
}

/*
 * Never let old map guard stretch the selected/general map.
 */
.leaflet-container.dnipro-incident-map-guard,
.dnipro-incident-map-guard .leaflet-container {
  min-height: 0 !important;
}

