:root {
  --titsa-green: #72b02c;
  --tram-accent: #FF00FF;
  --tram-yellow: #FFFF00;
  color-scheme: light dark;
  --light-color: initial;
  --dark-color: ;
  /* Exactly one fallback is used per pair, even without light-dark() support.
     `initial` makes a custom property use its fallback; whitespace emits nothing. */
  --transport-icon-surface: var(--light-color, #fff) var(--dark-color, #17251f);
  --bus-icon-ink: var(--light-color, #54851f) var(--dark-color, var(--titsa-green));
  --transport-icon-off: var(--light-color, #69766e) var(--dark-color, #a2ada7);
  --green-ink: var(--light-color, #346517) var(--dark-color, #b3db8e);
  --ink: var(--light-color, #20342a) var(--dark-color, #e2ece5);
  --muted: var(--light-color, #69766e) var(--dark-color, #adbdb4);
  --border: var(--light-color, #e7ece7) var(--dark-color, #394941);
  --edge: var(--light-color, #fff) var(--dark-color, #43564d);
  --surface: var(--light-color, #fff) var(--dark-color, #1d2924);
  --floating: var(--light-color, #fffffffa) var(--dark-color, #202d27fa);
  --canvas: var(--light-color, #e7eeea) var(--dark-color, #172832);
  --subtle: var(--light-color, #fafcf8) var(--dark-color, #24322b);
  --control: var(--light-color, #f3f6f1) var(--dark-color, #2a3931);
  --hover: var(--light-color, #f0f3ee) var(--dark-color, #34493d);
  --control-ink: var(--light-color, #4e5e50) var(--dark-color, #c4d5cb);
  --focus: var(--light-color, #2858b2) var(--dark-color, #9ec4ff);
  --bus-badge: var(--light-color, #eff5e9) var(--dark-color, #2b402a);
  --tram-badge: var(--light-color, #eaf0fa) var(--dark-color, #23364c);
  --tram-ink: var(--light-color, #1c55ad) var(--dark-color, #b5d3ff);
  --amber: var(--light-color, #805519) var(--dark-color, #ffda92);
  --amber-surface: var(--light-color, #fff7e8) var(--dark-color, #42321f);
  --saved-surface: var(--light-color, #fff4cc) var(--dark-color, #4a371c);
  --shadow: 0 8px 32px var(--light-color, #19302114) var(--dark-color, #0005),
    0 2px 6px var(--light-color, #19302108) var(--dark-color, #0004);
  --sheet-height: 0px;
  --locate-size: 112px;
  --map-edge-bottom: max(64px, calc(env(safe-area-inset-bottom) + 48px));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
:root:has(#color-scheme[content="light"]) { color-scheme: light; }
:root:has(#color-scheme[content="dark"]) { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not(:has(#color-scheme[content="light"])) { --light-color: ; --dark-color: initial; }
}
:root:has(#color-scheme[content="dark"]) { --light-color: ; --dark-color: initial; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--canvas); }
body.has-stop-only { overflow: auto; }
.has-stop-only #map { position: fixed; inset: 0; visibility: hidden; }
.has-stop-only :is(#transport-selector, #favourites-selector, #map-actions, #sheet-grip, #sheet-help, #close-stop, #back-to-map) { display: none; }
.has-stop-only .stop-only { max-width: 42rem; margin-inline: auto; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); }
.has-stop-only #map-unavailable { line-height: 1.5; }
.has-stop-only .map-summary { position: static; min-width: 0; flex-wrap: wrap; }
.has-stop-only .stop-panel { position: static; width: auto; height: auto; max-height: max(12rem, calc(100dvh - 7rem)); border-radius: 16px; }
.has-stop-only .stop-header { padding-top: 22px; touch-action: auto; cursor: auto; user-select: auto; }
.has-stop-only :is(.panel-content, .not-found) { touch-action: auto; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: wait; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
button svg { width: 22px; height: 22px; flex: none; }
[hidden] { display: none !important; }
#map { width: 100%; height: 100%; height: 100dvh; z-index: 0; background: var(--canvas); }
.maplibregl-map { font-family: inherit; }
.transport-selector { position: absolute; z-index: 600; top: max(16px, env(safe-area-inset-top)); left: 16px; max-width: calc(100% - 32px); }
.brand-card { anchor-name: --transport-trigger; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--edge); border-radius: 15px; background: var(--floating); color: inherit; text-decoration: none; box-shadow: var(--shadow); }
.brand-symbol, .stop-symbol {
  display: grid; place-items: center; width: 32px; height: 32px;
  color: var(--bus-icon-ink); background: var(--transport-icon-surface);
  border: 1px solid #73847b; border-radius: 10px;
}
.brand-symbol { flex: none; }
.brand-symbol svg { width: 22px; height: 22px; }
.brand-symbol.is-tram { color: var(--tram-accent); }
.tram-stop { --tram-face: var(--tram-accent); }
.tram-l2 { --tram-face: var(--tram-yellow); }
.tram-shared { --tram-face: linear-gradient(to right, var(--tram-accent) 50%, var(--tram-yellow) 50%); }
.brand-symbol.tram-stop, .tram-stop .stop-symbol {
  color: #17251f;
  /* Paint under the transparent border so its seam matches the face exactly. */
  background: var(--tram-face) border-box;
  border-color: transparent;
}
.brand-symbol.is-off { color: var(--transport-icon-off); }
.brand-card { width: 100%; text-align: left; }
.brand-title { white-space: nowrap; }
.brand-chevron { width: 16px; height: 16px; transition: transform 140ms ease-out; }
.transport-selector:has(> .transport-options:popover-open) .brand-chevron { transform: rotate(180deg); }
:is(.transport-options, .favourites-options) {
  /* Reset the native centred placement; top-layer elements use the viewport. */
  position: fixed; inset: auto; top: calc(anchor(bottom) + 6px); margin: 0;
  color: inherit; pointer-events: none;
}
:is(.transport-options, .favourites-options):popover-open { pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) {
  :is(.transport-options, .favourites-options) {
    opacity: 0; transform: translateY(-5px);
    transition: opacity 140ms ease-out, transform 140ms ease-out, display 140ms, overlay 140ms;
    transition-behavior: allow-discrete;
  }
  :is(.transport-options, .favourites-options):popover-open { opacity: 1; transform: translateY(0); }
}
@starting-style {
  @media (prefers-reduced-motion: no-preference) {
    :is(.transport-options, .favourites-options):popover-open { opacity: 0; transform: translateY(-5px); }
  }
}
.transport-options { position-anchor: --transport-trigger; left: anchor(left); width: anchor-size(width); padding: 6px; border: 1px solid var(--edge); border-radius: 15px; background: var(--floating); box-shadow: var(--shadow); }
.transport-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; font-size: 15px; }
.transport-option:hover { background: var(--hover); }
.transport-option:focus-visible { outline-offset: -3px; }
.tram-offline { margin: 4px 10px 8px; color: var(--muted); font-size: 12px; }
.transport-toggle { position: relative; width: 34px; height: 20px; flex: none; border-radius: 12px; background: #86928d; transition: background 140ms ease-out; }
.transport-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; transition: transform 140ms ease-out; }
.transport-option[aria-checked="true"] .transport-toggle { background: var(--light-color, #346517) var(--dark-color, #5c833d); }
.transport-option.is-tram[aria-checked="true"] .transport-toggle { background: var(--tram-accent); }
.transport-option.is-tram[aria-checked="true"] .transport-toggle::after { background: #17251f; }
.transport-option[aria-checked="true"] .transport-toggle::after { transform: translateX(14px); }
h1 { font-size: 18px; line-height: 1.2; letter-spacing: -.4px; margin: 0; font-weight: 500; }
h1 strong { font-weight: 750; }
.favourites-selector { position: absolute; z-index: 610; top: max(16px, env(safe-area-inset-top)); right: 16px; display: flex; gap: 8px; }
.icon-button:is(.theme-button, .favourites-button) { width: 50px; height: 50px; background: var(--floating); border: 1px solid var(--edge); box-shadow: var(--shadow); color: var(--ink); }
.icon-button.theme-button:hover { background: var(--hover); }
.favourites-button { anchor-name: --favourites-trigger; }
.theme-button svg { display: none; }
.theme-button[data-theme="dark"] [data-theme-icon="dark"],
.theme-button[data-theme="light"] [data-theme-icon="light"] { display: block; }
.favourites-options { position-anchor: --favourites-trigger; right: anchor(right); width: min(340px, calc(100vw - 32px)); max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - 82px); overflow-y: auto; overscroll-behavior: contain; padding: 12px 6px 6px; border: 1px solid var(--edge); border-radius: 15px; background: var(--floating); box-shadow: var(--shadow); }
.favourites-heading { margin: 2px 10px 8px; font-size: 16px; letter-spacing: 0; }
.favourites-list { list-style: none; padding: 0; margin: 0; }
.favourite-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 10px; border: 0; border-radius: 10px; color: var(--ink); background: transparent; text-align: left; font-size: 15px; }
.favourite-row > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.favourite-row:hover { background: var(--hover); }
.favourite-row:focus-visible { outline-offset: -3px; }
.favourites-empty { margin: 12px 10px 16px; font-size: 14px; line-height: 1.5; }
.favourites-empty span { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.favourite-stop { margin-top: -3px; touch-action: manipulation; }
.icon-button.favourite-stop.is-saved,
.icon-button.favourites-button.has-favourites { color: var(--light-color, #896000) var(--dark-color, #ffda92); background: var(--saved-surface); }
.favourite-stop.is-saved svg,
.favourites-button.has-favourites svg { fill: #e7b623; }
@media (max-width: 430px) {
  .brand-title strong { display: none; }
  .transport-selector { max-width: calc(100% - 148px); }
}
.map-actions { --actions-right: 32px; --actions-bottom: var(--map-edge-bottom); position: absolute; z-index: 500; right: var(--actions-right); bottom: var(--actions-bottom); display: flex; align-items: center; gap: 8px; max-width: calc(100% - var(--actions-right) - 16px); }
.install-button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 0 14px; border: 1px solid var(--border); border-radius: 24px; background: var(--subtle); color: var(--control-ink); box-shadow: 0 2px 6px #1930210d; font-size: 13px; font-weight: 600; }
.install-button:hover { background: var(--hover); }
.install-button:active { transform: translateY(1px); }
.locate-button { display: grid; place-items: center; width: var(--locate-size); height: var(--locate-size); flex: none; padding: 0; border: 1px solid var(--edge); border-radius: 50%; background: var(--surface); color: var(--light-color, #17320e) var(--dark-color, #c4e6a6); box-shadow: 0 8px 24px #42741940, 0 2px 6px #17320e20; transition: box-shadow .15s, transform .15s; }
.locate-button:hover { box-shadow: 0 10px 28px #42741950, 0 2px 6px #17320e20; }
.locate-button:active { transform: translateY(1px); }
.locate-button svg { width: 48px; height: 48px; color: currentColor; }
.locate-button[aria-busy="true"] svg { animation: pulse 1s ease-in-out infinite; }
.nearby-stops {
  position: absolute; right: calc(var(--locate-size) - 5px); bottom: calc(var(--locate-size) - 5px);
  width: min(240px, calc(100vw - var(--locate-size) - var(--actions-right) - 8px));
  max-height: calc(100dvh - var(--actions-bottom) - var(--locate-size) - max(12px, env(safe-area-inset-top)));
  margin: 0; padding: 5px; list-style: none; display: grid; gap: 5px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  transform-origin: calc(100% + var(--locate-size) / 2 - 5px) calc(100% + var(--locate-size) / 2 - 5px);
  animation: nearby-blossom 260ms cubic-bezier(.2, .8, .3, 1.08) both;
}
.nearby-stop-chip {
  display: grid; grid-template-columns: auto minmax(0, 1fr) 6ch; align-items: center; gap: 8px;
  width: 100%; min-height: 44px; padding: 7px 12px; border: 1px solid var(--edge); border-radius: 22px;
  background: var(--floating); color: var(--ink); box-shadow: 0 2px 5px #19302118; text-align: right;
  font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.nearby-stop-chip .brand-symbol { width: 26px; height: 26px; border-radius: 50%; }
.nearby-stop-chip .brand-symbol svg { width: 18px; height: 18px; }
.nearby-stop-chip:hover { background: var(--hover); }
.nearby-stop-chip:focus-visible { outline-offset: -3px; }
.nearby-stop-name { overflow-wrap: anywhere; line-height: 1.2; text-transform: uppercase; }
.nearby-stop-distance { white-space: nowrap; color: var(--green-ink); }
@keyframes nearby-blossom {
  from { opacity: 0; transform: scale(.06); }
  to { opacity: 1; transform: scale(1); }
}
.map-summary { position: absolute; z-index: 500; left: 16px; bottom: calc(var(--map-edge-bottom) + var(--locate-size) + 16px); right: 16px; display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--floating); border: 1px solid var(--edge); border-radius: 16px; box-shadow: var(--shadow); }
.map-summary strong { display: block; font-size: 13px; line-height: 1.4; }
.map-summary span:not(.summary-dot) { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.summary-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--titsa-green); box-shadow: 0 0 0 5px #72b02c16; }
.stop-marker, .cluster-marker { padding: 0; background: transparent; border: none; }
.stop-marker { --stop-accent: var(--titsa-green); --stop-scale: 1; }
.stop-marker.tram-stop { --stop-accent: transparent; --selected-border: transparent; }
.tram-stop .stop-symbol { position: relative; }
.stop-icon-defs { position: absolute; }
.stop-symbol {
  pointer-events: none;
  box-shadow: 0 2px 4px #081e2e66;
  scale: var(--stop-scale);
}
.stop-marker:focus-visible { z-index: 2; }
.stop-marker:focus-visible .stop-symbol {
  outline: 2px solid var(--focus); outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--transport-icon-surface), 0 3px 8px #081e2e88;
}
@media (hover: hover) and (pointer: fine) {
  .stop-marker:hover { --stop-scale: 1.2; --tram-ring: ""; }
  .stop-marker:hover:not(:focus-visible) { z-index: 1; }
  .stop-marker:hover:not(.is-selected) .stop-symbol { border-color: var(--stop-accent); }
  .stop-marker:hover:not(.is-selected, :focus-visible) .stop-symbol {
    box-shadow: 0 0 0 2px var(--stop-accent), 0 4px 9px #081e2e88;
  }
}
/* Nearby chips can have keyboard focus even on devices without hover. */
.stop-marker.is-nearby-highlighted { --stop-scale: 1.2; --tram-ring: ""; }
.stop-marker.is-nearby-highlighted:not(:focus-visible) { z-index: 1; }
.stop-marker.is-nearby-highlighted:not(.is-selected) .stop-symbol { border-color: var(--stop-accent); }
.stop-marker.is-nearby-highlighted:not(.is-selected, :focus-visible) .stop-symbol {
  box-shadow: 0 0 0 2px var(--stop-accent), 0 4px 9px #081e2e88;
}
.stop-marker.is-selected { --stop-scale: 1.3; --tram-ring: ""; }
.stop-marker.is-selected .stop-symbol {
  position: relative;
  color: #17251f; background: var(--tram-face, var(--stop-accent)) border-box;
  border-color: var(--selected-border, #17251f);
  box-shadow: 0 0 0 2px var(--transport-icon-surface), 0 4px 12px #081e2e99;
}
.stop-marker.is-selected:focus-visible .stop-symbol {
  box-shadow: 0 0 0 5px var(--transport-icon-surface), 0 4px 12px #081e2e99;
}
.stop-marker:active { --tram-ring: ""; }
.stop-marker:active .stop-symbol { border-width: 2px; }
@media (prefers-reduced-motion: no-preference) {
  /* Animate only the symbol, leaving MapLibre's position and hit target untouched. */
  .stop-symbol { transition: scale 180ms cubic-bezier(.2, .75, .3, 1.15), opacity 160ms ease-out; }
  .stop-marker:active .stop-symbol { scale: calc(var(--stop-scale) * .92); }
  @starting-style {
    .stop-symbol { scale: .78; opacity: .55; }
  }
  .stop-marker.is-selected .stop-symbol::after {
    content: ""; position: absolute; inset: -2px;
    border: 2px solid var(--stop-accent); border-radius: inherit;
    opacity: 0;
    animation: stop-selection-ring 420ms ease-out;
  }
}
/* The static interaction ring and the expanding selection ring use the same
   paint as the face. Mask out their centres so neither obscures the pictogram. */
@media not (forced-colors: active) {
  .tram-stop .stop-symbol::before { content: var(--tram-ring, none); }
  .tram-stop .stop-symbol::before, .tram-stop.is-selected .stop-symbol::after {
    position: absolute; inset: -5px; border: 0; border-radius: inherit; padding: 2px;
    background: var(--tram-face);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
  }
  .tram-stop:focus-visible .stop-symbol { outline-offset: 5px; }
}
@keyframes stop-selection-ring {
  from { scale: 1; opacity: .85; }
  to { scale: 1.55; opacity: 0; }
}
@media (forced-colors: active) {
  .brand-symbol, .brand-symbol.is-tram, .brand-symbol.tram-stop, .stop-symbol, .tram-stop .stop-symbol,
  .stop-marker.is-selected .stop-symbol {
    color: ButtonText; background: ButtonFace; border-color: ButtonText;
  }
  .brand-symbol.is-off { color: GrayText; }
  .stop-marker.is-selected .stop-symbol { outline: 2px solid Highlight; }
  .stop-marker:focus-visible .stop-symbol { outline-color: Highlight; outline-offset: 4px; }
  .stop-marker.is-nearby-highlighted:not(.is-selected) .stop-symbol { border: 2px solid Highlight; }
  @media (hover: hover) and (pointer: fine) {
    .stop-marker:hover:not(.is-selected) .stop-symbol { border: 2px solid Highlight; }
  }
}
.cluster-symbol { display: grid; place-items: center; width: 28px; height: 28px; background: var(--surface); color: var(--green-ink); border: 2px solid #72b02c59; border-radius: 50%; font-size: 11px; font-weight: 800; box-shadow: 0 2px 9px #254b2521; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .cluster-marker:hover .cluster-symbol { border-color: var(--titsa-green); }
}
.cluster-marker.is-large .cluster-symbol { width: 32px; height: 32px; }
.stop-tooltip { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); pointer-events: none; white-space: nowrap; padding: 8px 12px; border-radius: 9px; color: var(--ink); background: var(--surface); font: 600 12px/1.3 system-ui; box-shadow: var(--shadow); }
.maplibregl-map .maplibregl-ctrl-attrib { background: var(--floating); color: var(--ink); }
.maplibregl-ctrl-attrib a { color: var(--green-ink); }
.maplibregl-ctrl-attrib-button { filter: var(--light-color, none) var(--dark-color, invert(1)); }
.maplibregl-ctrl-bottom-left { padding-bottom: env(safe-area-inset-bottom); }
.stop-panel { position: absolute; z-index: 600; bottom: 0; left: 0; right: 0; height: auto; max-height: min(50dvh, calc(100dvh - 160px)); display: flex; flex-direction: column; background: var(--surface); border-radius: 25px 25px 0 0; box-shadow: 0 -4px 36px #19302120; padding-bottom: env(safe-area-inset-bottom); overflow: hidden; }
.stop-panel:focus { outline: none; }
.stop-panel.is-animating { will-change: transform, height; }
.stop-panel.is-closing :is(a, button, input, select, textarea) { pointer-events: none; }
.stop-panel.is-sized { height: var(--mobile-sheet-height); max-height: min(75dvh, calc(100dvh - 160px)); }
.sheet-grip { position: relative; height: 28px; width: 100%; flex: none; cursor: ns-resize; touch-action: none; }
.sheet-grip::before { content: ''; position: absolute; width: 36px; height: 4px; top: 10px; left: calc(50% - 18px); background: var(--light-color, #dce4dc) var(--dark-color, #687d71); border-radius: 4px; }
.sheet-grip:focus-visible { outline: 3px solid var(--focus); outline-offset: -5px; border-radius: 25px 25px 0 0; }
.stop-header { touch-action: none; cursor: ns-resize; user-select: none; }
.stop-panel.is-dragging, .stop-panel.is-dragging * { cursor: ns-resize; user-select: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.stop-header { display: flex; align-items: flex-start; gap: 16px; padding: 2px 22px 17px; flex: none; }
.stop-heading { min-width: 0; flex: 1; }
#stop-title:has(.brand-symbol) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; }
#stop-title .brand-symbol { width: 1.2em; height: 1.2em; border-radius: 7px; }
#stop-title .brand-symbol svg { width: .9em; height: .9em; }
.eyebrow { margin: 0 0 7px; font-size: 10px; letter-spacing: 1.6px; font-weight: 800; color: var(--green-ink); }
h2 { margin: 0; font-size: 21px; line-height: 1.2; font-weight: 750; letter-spacing: -.55px; overflow-wrap: anywhere; }
.icon-button { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; background: var(--control); color: var(--control-ink); border-radius: 50%; }
.icon-button:hover { background: var(--hover); }
.close-button { margin-top: -3px; }
.panel-content { flex: 1 1 auto; touch-action: pan-x pinch-zoom; overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 22px; scrollbar-width: thin; }
.routes-section { padding-bottom: 17px; }
.route-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.route-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 35px; padding: 5px 8px; border-radius: 7px; background: var(--bus-badge); color: var(--green-ink); font-size: 11px; line-height: 1.1; font-weight: 750; font-variant-numeric: tabular-nums; }
.arrivals-section { border-top: 1px solid var(--border); padding: 0 0 16px; }
.arrivals-empty { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.arrivals-list { list-style: none; padding: 0; margin: 0; }
.arrival-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 65px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.arrival-row:last-child, .arrival-row.is-direction-end { border-bottom: 0; }
.arrival-row.is-direction-start { border-top: 2px solid var(--light-color, #d5dfeb) var(--dark-color, #41566e); }
.arrival-line { min-width: 42px; min-height: 31px; border-radius: 8px; padding: 6px 5px; text-align: center; background: var(--bus-badge); color: var(--green-ink); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.arrival-line.is-tram { background: var(--tram-badge); color: var(--tram-ink); display: inline-flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; font-size: 12px; }
.arrival-direction { font-size: 11px; line-height: 1; }
.arrival-destination { font-size: 12px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.arrival-time { min-width: 40px; text-align: right; color: var(--light-color, #28501c) var(--dark-color, #b3db8e); font-size: 23px; font-weight: 750; line-height: 1; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.arrival-time small { margin-left: 3px; font-size: 10px; letter-spacing: 0; color: var(--muted); font-weight: 500; }
.arrival-time.is-due { font-size: 13px; letter-spacing: 0; }
.arrivals-list.is-stale .arrival-time { color: var(--muted); }
.arrival-error { padding: 10px 12px; margin: 12px 0 8px; border-radius: 10px; background: var(--amber-surface); color: var(--amber); font-size: 12px; }
.arrival-error p { margin: 0; line-height: 1.4; }
.text-button { border: 0; padding: 10px 0; min-height: 44px; background: transparent; color: var(--green-ink); font-size: 12px; font-weight: 750; flex: none; }
.panel-footer { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--subtle); color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.4; flex: none; }
.footer-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--titsa-green); }
#update-message { appearance: none; font-variant-numeric: tabular-nums; color: inherit; background: none; border: 0; padding: 0; cursor: inherit; }
.has-stop-only #update-message { min-height: 24px; }
.not-found { flex: 1 1 auto; touch-action: pan-x pinch-zoom; min-height: 0; overflow-y: auto; padding: 0 22px 24px; font-size: 14px; }
.not-found p { line-height: 1.6; color: var(--muted); }
.primary-button { min-height: 44px; border: 0; border-radius: 10px; padding: 11px 16px; background: var(--titsa-green); color: #17320e; font-weight: 700; }
.toast { pointer-events: none; position: absolute; z-index: 1000; top: calc(max(16px, env(safe-area-inset-top)) + 90px); left: 16px; right: 16px; margin: 0 auto; width: fit-content; max-width: 440px; padding: 14px 18px; border-radius: 13px; background: #20342af5; color: white; font-size: 13px; line-height: 1.5; box-shadow: var(--shadow); }
.user-location { background: transparent; border: none; }
.user-location span { display: block; width: 18px; height: 18px; border: 3px solid white; border-radius: 50%; background: #3478cf; box-shadow: 0 0 0 7px #3478cf26, 0 1px 5px #0003; }
.noscript-message { position: absolute; z-index: 1500; bottom: 40px; left: 20px; right: 20px; padding: 20px; background: var(--surface); border-radius: 12px; }
.skip-link { position: absolute; z-index: 2000; top: -100px; left: 16px; background: var(--surface); color: var(--ink); padding: 12px; border-radius: 8px; }
.skip-link:focus { top: 16px; }
body.has-stop .map-summary { display: none; }
body.has-stop .map-actions { --actions-bottom: calc(var(--sheet-height) + 48px); }
body.has-stop .maplibregl-ctrl-bottom-left { bottom: calc(var(--sheet-height) + 2px); }
@keyframes pulse { 50% { opacity: .4; } }
@media (min-width: 768px) and (min-height: 501px), (min-width: 768px) and (pointer: fine) {
  .transport-selector { top: 24px; left: 24px; max-width: calc(100% - 48px); }
  .brand-card { padding: 10px 14px; }
  .favourites-selector { top: 24px; right: 24px; }
  body.has-stop .favourites-selector { right: 404px; }
  @media (max-width: 840px) {
    body.has-stop .brand-title strong { display: none; }
  }
  .map-actions { --actions-right: 48px; }
  body.has-stop .map-actions { --actions-right: 428px; --actions-bottom: var(--map-edge-bottom); }
  .map-summary { left: 24px; bottom: 30px; right: auto; min-width: 310px; }
  .stop-panel, .stop-panel.is-sized { width: 380px; left: auto; right: 0; top: 0; bottom: 0; height: 100dvh; max-height: 100dvh; border-radius: 0; box-shadow: var(--shadow); }
  .sheet-grip { display: none; }
  .stop-header { padding-top: 24px; touch-action: auto; cursor: auto; user-select: auto; }
  .panel-content { flex: 1; padding-left: 24px; padding-right: 24px; }
  .panel-content, .not-found { touch-action: auto; }
  .arrival-row { min-height: 73px; }
  .arrival-destination { font-size: 13px; }
  .panel-footer { min-height: 52px; }
  body.has-stop .maplibregl-ctrl-bottom-left { bottom: 0; }
  .toast { top: 122px; left: 24px; right: auto; }
}
@media (max-width: 360px) {
  .brand-card { gap: 6px; padding: 8px; }
  .brand-card .brand-symbol { width: 28px; height: 28px; }
  .brand-title { font-size: 17px; }
  .install-button { padding: 0 10px; }
  .stop-header { padding-left: 17px; padding-right: 17px; }
  .panel-content { padding-left: 17px; padding-right: 17px; }
}
@media (max-height: 500px) and (max-width: 767px), (max-height: 500px) and (pointer: coarse) {
  :root { --locate-size: 96px; }
  body.has-stop .map-actions { --actions-bottom: calc(var(--sheet-height) + 24px); }
  .stop-header { padding-top: 8px; padding-bottom: 8px; }
  h2 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
