:root {
  --brand: #0b6e69;
  --brand-ink: #064e4a;
  --brand-soft: #e2f2f0;
  --ink: #14211f;
  --muted: #5b6967;
  --line: #dde5e3;
  --bg: #fff;
  --surface: #f4f7f6;
  --ac: #2563eb;
  --fast: #e0700a;
  --ultra: #7c3aed;
  --good: #15803d;
  --bad: #b91c1c;
  --warn-bg: #fff5dc;
  --warn-ink: #734600;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(10, 30, 28, 0.18);
  --tabs-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Armenian", "Noto Sans", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--surface); }
body { font-size: 15px; line-height: 1.4; -webkit-text-size-adjust: 100%; }
h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, white); outline-offset: 2px; }
.icon { flex: none; display: block; }

/* Map */
#map { position: fixed; inset: 0 0 calc(var(--tabs-h) + var(--safe-b)) 0; background: #e8eeec; z-index: 0; }
.leaflet-container { font: inherit; }
.leaflet-control-attribution { font-size: 10px; }
.leaflet-control-zoom { display: none; }

/* The picture of the land under the app's own base map: never dragged, never selected. */
.map-relief { pointer-events: none; user-select: none; -webkit-user-drag: none; }
/* Town names on the app's own base map (js/basemap.js). */
.map-label { background: none; border: 0; color: #5b574d; font-size: 11px; font-weight: 600; line-height: 16px; text-align: center; white-space: nowrap; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 4px #fff; pointer-events: none; }
.map-label--big { color: #2f2d28; font-size: 13px; }

.pin, .cluster, .badge-pin { background: none; border: 0; }
.pin > span {
  display: block; height: 24px; border-radius: 999px; border: 2px solid #fff;
  color: #fff; font-weight: 700; font-size: 12px; line-height: 20px; text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); transition: transform 0.12s;
}
/* The unit beside the number, smaller: "160 kW" is a power, not a count. */
.pin > span, .station__kw, .tour__pin { white-space: nowrap; }
.pin > span > small, .station__kw > small, .tour__pin > small { margin-left: 2px; font-size: 9px; font-weight: 700; opacity: 0.92; }
.pin--ac > span { background: var(--ac); }
.pin--fast > span { background: var(--fast); }
.pin--ultra > span { background: var(--ultra); }
.pin--unknown > span { background: #66727f; }
.pin.is-broken > span { background: #8a9391; text-decoration: line-through; }
.pin.is-pending > span { background: #fff; color: var(--muted); border: 2px dashed var(--muted); }
.pin.is-private > span { border-color: var(--ink); }
.pin.is-selected > span { transform: scale(1.3); box-shadow: 0 0 0 4px rgba(11, 110, 105, 0.35), 0 2px 6px rgba(0, 0, 0, 0.35); }
.cluster > span {
  display: block; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.92); font-weight: 700; font-size: 13px; line-height: 32px; text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.badge-pin > span {
  display: block; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; color: #fff;
  font-weight: 700; font-size: 13px; line-height: 24px; text-align: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.badge-pin--end > span { background: var(--ink); }
.badge-pin--stop > span { background: var(--brand); }
/* With a route on screen, the other chargers step back so the stops stand out. The chargers the
   route passes, and the ones offered as nearest, stay as they are. */
.has-route .pin > span, .has-route .cluster > span { opacity: 0.55; }
.has-route .pin.is-near > span, .has-route .pin.is-selected > span { opacity: 1; }
/* A stop's name beside its number. */
.leaflet-tooltip.stop-label {
  padding: 3px 8px; border: 0; border-radius: 8px; background: var(--bg); color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); font: inherit; font-size: 12px; line-height: 1.25; white-space: nowrap; pointer-events: none;
}
.stop-label strong { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.stop-label small { display: block; color: var(--brand-ink); font-weight: 600; }
.route-casing { stroke: #fff; stroke-opacity: 0.95; fill: none; }
.route-line { stroke: var(--brand); fill: none; }
.user-dot { border-radius: 50%; background: var(--ac); border: 3px solid #fff; box-sizing: border-box; }

/* Search bar */
/* Above the panel: on wide screens the search results drop down over it. */
.topbar { position: fixed; z-index: 1160; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; max-width: 520px; }
.search { display: flex; align-items: center; height: 48px; padding: 0 4px 0 14px; background: var(--bg); border-radius: 999px; box-shadow: var(--shadow); }
.search__icon { color: var(--muted); display: flex; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; padding: 0 10px; font-size: 16px; }
.search input::-webkit-search-cancel-button { display: none; }
.icon-btn {
  position: relative; flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: var(--ink);
}
.icon-btn:hover { background: var(--surface); }
.count-dot {
  position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
}
.results { margin-top: 8px; background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; max-height: 50dvh; overflow-y: auto; }
.results--inline { margin-top: 4px; box-shadow: none; border: 1px solid var(--line); max-height: none; }
.result { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; background: none; text-align: left; color: var(--muted); }
.result:hover, .result:focus-visible { background: var(--surface); }
.result__text { display: grid; min-width: 0; }
.result__text strong { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result__text small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results li + li { border-top: 1px solid var(--line); }
.results__empty { padding: 12px 14px; color: var(--muted); }

.fab {
  position: fixed; z-index: 1000; right: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + var(--whereto-h) + 12px);
  width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--bg); color: var(--brand); box-shadow: var(--shadow);
}

/* The 3D mode: its button above the "where am I" one, and the map itself laid over the ordinary map. */
.fab--mode { bottom: calc(var(--tabs-h) + var(--safe-b) + var(--whereto-h) + 72px); font-weight: 800; font-size: 14px; letter-spacing: 0.3px; }
.is-3d .fab--mode { background: var(--brand); color: #fff; }
.is-3d #locate-btn { display: none; }
.map3d { position: fixed; inset: 0 0 calc(var(--tabs-h) + var(--safe-b)) 0; z-index: 900; background: #0f0e17; }
.map3d[data-theme='day'] { background: #e8eeec; }
.map3d__canvas { width: 100%; height: 100%; }
.map3d__wait { position: absolute; inset: 0; display: grid; place-items: center; color: #f4f3fa; font-weight: 700; }
.map3d__light {
  position: absolute; right: 12px; bottom: 148px; width: 48px; height: 48px; border: 0; border-radius: 50%; z-index: 2;
  background: rgba(20, 19, 34, 0.7); box-shadow: var(--shadow);
}
.map3d__light::before { content: ''; display: block; width: 20px; height: 20px; margin: auto; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 12px #ffb84d; }
.map3d[data-theme='day'] .map3d__light { background: rgba(255, 255, 255, 0.85); }
.map3d[data-theme='day'] .map3d__light::before { background: #2a2f55; box-shadow: none; }
.map3d .maplibregl-ctrl-bottom-left { z-index: 1; }

/* "Where are we going?" (views/whereto.js): the first thing on the map, standing on the tab bar,
   with one-tap places and the nearest charger in a row above it. The round buttons stand above. */
:root { --whereto-h: 118px; }
.whereto {
  position: fixed; z-index: 1000; left: 12px; right: 12px; bottom: calc(var(--tabs-h) + var(--safe-b) + 10px);
  display: grid; gap: 8px; max-width: 560px; margin: 0 auto;
}
.whereto__go {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 8px 18px 8px 10px; border: 0;
  border-radius: 22px; background: var(--brand); color: #fff; text-align: left; box-shadow: var(--shadow);
}
.whereto__icon { flex: none; width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.2); }
.whereto__text { min-width: 0; display: grid; }
.whereto__text strong { font-size: 18px; font-weight: 750; letter-spacing: -0.01em; line-height: 1.2; }
.whereto__text small { font-size: 13px; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whereto__chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.whereto__chips::-webkit-scrollbar { display: none; }
.whereto__chips .chip { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 70vw; box-shadow: var(--shadow); }
.whereto__chips .chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whereto__chips .chip .icon { color: var(--brand); }
.has-sheet .whereto, .has-keyboard .whereto, .is-picking .whereto, .is-driving .whereto { display: none; }

/* A trip left on the map with its panel closed: where it goes, a tap to open it again, a cross
   to take it off the map (syncRouteBar in views/route.js). Under the search bar. */
.routebar {
  position: fixed; z-index: 1155; top: calc(env(safe-area-inset-top, 0px) + 74px); left: 12px; right: 12px; max-width: 520px;
  display: flex; align-items: center; gap: 2px; padding: 5px 5px 5px 6px; border-radius: 22px; background: var(--bg); box-shadow: var(--shadow);
}
.routebar[hidden], .is-driving .routebar, .is-picking .routebar, .has-keyboard .routebar { display: none; }
.routebar__open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 3px 6px 3px 2px; border: 0; background: none; color: var(--muted); text-align: left; }
.routebar__icon { flex: none; width: 36px; height: 36px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.routebar__text { flex: 1; min-width: 0; display: grid; }
.routebar__text strong { color: var(--ink); font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.routebar__text small { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.routebar__close { flex: none; color: var(--muted); }

/* Tabs */
.tabs {
  position: fixed; z-index: 1200; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg); border-top: 1px solid var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 600; }
.tab.is-active { color: var(--brand); }

/* Panel */
.sheet {
  position: fixed; z-index: 1150; left: 0; right: 0; bottom: calc(var(--tabs-h) + var(--safe-b)); max-height: 64dvh;
  display: flex; flex-direction: column; background: var(--bg); border-radius: 18px 18px 0 0; box-shadow: 0 -6px 24px rgba(10, 30, 28, 0.16);
}
.sheet__grip { flex: none; height: 26px; border: 0; background: none; padding: 0; display: grid; place-items: center; touch-action: none; }
.sheet__head { touch-action: none; }
.sheet__grip::before { content: ""; width: 44px; height: 5px; border-radius: 5px; background: var(--line); }
.sheet__head { flex: none; display: flex; align-items: center; gap: 4px; padding: 0 8px 6px 16px; }
.sheet__head h2 { flex: 1; min-width: 0; font-size: 18px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sheet-back { margin-left: -10px; transform: rotate(180deg); }
.sheet__body { flex: 1; min-height: 0; overflow: hidden auto; padding: 4px 16px 18px; overscroll-behavior: contain; }
.sheet.is-collapsed .sheet__body { display: none; }
/* A finished plan shares the screen with its route on the map. */
.sheet[data-view="plan"], .sheet[data-view="nearest"] { max-height: 50dvh; }
/* While the keyboard is up: the panel stands on it and fits into what is left of the screen. */
.has-keyboard .sheet, .has-keyboard .sheet[data-view] { bottom: var(--keyboard); max-height: calc(var(--seen) - 70px); }
.has-keyboard .tabs, .has-keyboard .fab { display: none; }
.has-sheet .fab { display: none; }

/* Picking a point on the map */
.is-picking .sheet, .is-picking .tabs { display: none; }
.is-picking #map { bottom: 0; }
.is-picking .fab { display: grid; bottom: calc(150px + var(--safe-b)); }
.is-picking .fab--mode { display: none; }
.crosshair { position: fixed; z-index: 1300; left: 50%; top: 50%; transform: translate(-50%, -100%); color: var(--bad); pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); }
.pickbar {
  position: fixed; z-index: 1300; left: 10px; right: 10px; bottom: calc(12px + var(--safe-b)); max-width: 520px; margin: 0 auto;
  padding: 14px; background: var(--bg); border-radius: 16px; box-shadow: var(--shadow); display: grid; gap: 12px;
}
.pickbar__actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Buttons and form controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface); }
.btn--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-ink); }
.btn--danger { color: var(--bad); }
.btn--block { width: 100%; }
.btn--small { min-height: 34px; padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn--nav { border-color: var(--brand); color: var(--brand-ink); }
.linkbtn { display: inline-flex; align-items: center; gap: 2px; justify-self: start; min-height: 30px; padding: 2px 0; border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 13.5px; }

.form { display: grid; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.form__row--tight { grid-template-columns: 1fr auto; }
.form__hint { color: var(--muted); font-size: 13px; }
.form__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field__input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 16px; }
.field__input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.field__input { resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 14px; font-weight: 600; text-align: left; }
.chip.is-on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.segmented button { min-height: 40px; padding: 6px 8px; border: 0; background: var(--bg); font-size: 14px; font-weight: 600; }
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button.is-on { background: var(--brand); color: #fff; }
.check { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.check.is-disabled { opacity: 0.5; }
.slider__head { display: flex; justify-content: space-between; align-items: baseline; }
.slider__value { font-weight: 700; font-size: 18px; color: var(--brand-ink); }
.slider__input { width: 100%; height: 28px; accent-color: var(--brand); }
.rowbtn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-align: left; }
.rowbtn__action { flex: none; color: var(--brand); font-weight: 600; font-size: 14px; }
.more { border-top: 1px solid var(--line); padding-top: 10px; }
.more summary { font-weight: 600; color: var(--muted); cursor: pointer; padding: 4px 0; }
.more[open] { display: grid; gap: 14px; }

/* What Premium is, shown at the door of what it closes (premium.js). */
.paywall { display: grid; gap: 12px; }
.paywall__lead { margin: 0; font-size: 15px; line-height: 1.45; }
.paywall__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.paywall__list li { padding-left: 26px; position: relative; font-weight: 600; }
.paywall__list li::before { content: ""; position: absolute; left: 2px; top: 0.35em; width: 12px; height: 7px; border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg); }
.paywall__price { margin: 4px 0 0; font-size: 22px; font-weight: 800; }

/* The car picker: the makers, each opening its models; a search over all of them. */
.carpick { display: grid; gap: 12px; }
.carpick__intro { margin: 0; font-size: 15px; line-height: 1.45; }
.carpick__list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); }
.carpick__list > .form__hint { margin: 0; padding: 14px; }
.carpick__brand + .carpick__brand { border-top: 1px solid var(--line); }
.carpick__brand > summary { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 12px 8px 14px; cursor: pointer; list-style: none; font-weight: 700; font-size: 16px; }
.carpick__brand > summary::-webkit-details-marker { display: none; }
/* The makers in capitals: BYD and BMW are written so, and the rest beside them looked uneven. */
.carpick__maker { flex: 1; text-transform: uppercase; letter-spacing: 0.05em; font-size: 15px; }
/* One width for every count, so they stand in a column. */
.carpick__count { flex: none; width: 38px; padding: 2px 0; border-radius: 999px; background: var(--line); color: var(--muted); font-size: 12.5px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.carpick__brand > summary .icon { color: var(--muted); transition: transform 0.15s; }
.carpick__brand[open] > summary .icon { transform: rotate(90deg); }
.carpick__models { list-style: none; margin: 0; padding: 0 0 6px; }
.carpick__models > li + li { border-top: 1px solid var(--line); }
.carpick__car { display: grid; gap: 2px; width: 100%; min-height: 48px; padding: 9px 14px 9px 24px; border: 0; background: none; color: inherit; text-align: left; }
.carpick__car.is-on { background: var(--brand-soft); }
.carpick__name { font-weight: 600; font-size: 15px; }
.carpick__specs { color: var(--muted); font-size: 13px; }
.carpick__markets { display: grid; gap: 8px; padding: 2px 14px 12px 24px; }
.carpick__markets .form__hint { margin: 0; }
.carpick__markets .chip { display: grid; justify-items: start; gap: 0; border-radius: 12px; }
.carpick__markets .chip small { color: var(--muted); font-weight: 500; font-size: 12px; }
/* The long list scrolls inside its own frame, whole and rounded on all four corners; what ends
   the panel ("my car is not on the list", "Later") stays in sight under it. (The panel's body
   scrolled as one before: the list was cut off at the panel's edge and "Later" lay below 28
   makers.) */
.sheet[data-view="car"] .sheet__body { display: flex; flex-direction: column; }
.carpick { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.carpick > * { flex: none; }
.carpick > .carpick__list { flex: 1 1 auto; min-height: 132px; overflow: hidden auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.carpick__foot { display: grid; gap: 10px; justify-items: center; }
.carpick__foot .linkbtn { justify-self: center; text-align: center; }
.carpick__later { width: 100%; }
.section { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; margin: 16px 0 8px; }
.section--tight { margin: 4px 0 -4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.actions--editor { padding-top: 14px; border-top: 1px dashed var(--line); }
.notice { padding: 10px 12px; border-radius: 10px; background: var(--surface); font-size: 14px; }
.notice + .notice { margin-top: 8px; }
.notice--ok { background: #e7f6ec; color: #0d5a2b; }
.notice--warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice--error { background: #fdecec; color: #8a1616; }
.notice__hint { margin-top: 6px; font-size: 13px; }

/* Charger details */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { padding: 3px 9px; border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 600; color: var(--muted); }
.tag--ac { background: #e3ecfd; color: #1a47ab; }
.tag--fast { background: #fdebd6; color: #8f4703; }
.tag--ultra { background: #eee6fd; color: #5522b5; }
.tag--good { background: #e7f6ec; color: #0d5a2b; }
.tag--bad { background: #fdecec; color: #8a1616; }
.tag--private { background: var(--ink); color: #fff; }
.tag--demo, .tag--pending { background: var(--warn-bg); color: var(--warn-ink); }
.charger__address { color: var(--muted); margin-top: 8px; }
.charger__verified { margin-top: 12px; font-size: 13px; color: var(--muted); }
.plug { display: grid; grid-template-columns: 1fr auto 44px; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.plug + .plug { margin-top: 6px; }
.plug__type { font-weight: 600; }
.plug__kw { font-weight: 700; color: var(--brand-ink); }
.plug__count { color: var(--muted); text-align: right; }
.info { margin-top: 12px; }
.info__row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.info__row dt { color: var(--muted); font-size: 13px; }
.info__row dd { overflow-wrap: anywhere; }
.info__row a { display: inline-flex; align-items: center; gap: 4px; }

/* Add / edit */
.spot { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.spot__coords { flex: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.plugform { display: grid; gap: 8px; }
.plugform__row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 60px 32px; gap: 6px; align-items: center; }
.plugform__row .icon-btn { width: 32px; height: 32px; }
.plugform .btn { justify-self: start; }

/* Trip plan */
.plan { display: grid; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface); }
.stat__value { font-weight: 700; font-size: 19px; white-space: nowrap; }
.stat__label { font-size: 12px; color: var(--muted); }
.legs { display: grid; }
.leg { position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; padding: 8px 0; }
.leg:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 34px; bottom: -8px; width: 2px; background: var(--line); }
.leg__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; background: var(--ink); }
.leg--stop .leg__dot { background: var(--brand); }
.leg__body { display: grid; gap: 2px; min-width: 0; overflow-wrap: break-word; }
.leg__body small { color: var(--muted); font-size: 12.5px; }
.leg__action { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--brand-ink); }
.leg__warn { font-size: 13px; color: var(--warn-ink); }
.leg__soc { font-weight: 700; font-variant-numeric: tabular-nums; }
.plan__meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.plan__disclaimer { font-size: 12px; color: var(--muted); }
.elev__chart { display: block; width: 100%; height: 92px; border-radius: 8px; background: var(--surface); }
.elev__title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; margin-bottom: 6px; font-size: 13px; }
.elev__title span { font-weight: 700; font-size: 12px; }
.elev__soc { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.elev__area { fill: var(--brand-soft); }
.elev__line { fill: none; stroke: var(--brand); stroke-width: 1; stroke-opacity: 0.45; vector-effect: non-scaling-stroke; }
.elev__stop { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.elev__legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.navlinks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.navlinks__label { flex-basis: 100%; font-size: 13px; font-weight: 600; color: var(--muted); }
.navlinks .btn { flex: 1 1 0; }
.charger > .navlinks { margin-top: 12px; }

/* Chargers as rows of a list: the nearest ones, the ones a trip passes */
.stations { display: grid; gap: 6px; }
.station {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 52px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-align: left;
}
.station:hover { background: var(--surface); }
.station.is-chosen { border-color: var(--brand); background: var(--brand-soft); }
.station__kw { height: 24px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 12px; line-height: 24px; text-align: center; }
.station__kw--ac { background: var(--ac); }
.station__kw--fast { background: var(--fast); }
.station__kw--ultra { background: var(--ultra); }
.station__kw--unknown { background: #66727f; }
.station__text { display: grid; min-width: 0; }
.station__text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station__text small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.station__text .station__note { color: var(--warn-ink); }
.station__aside { display: grid; justify-items: end; white-space: nowrap; }
.station__aside strong { font-size: 15px; }
.station__aside small { color: var(--muted); font-size: 12px; }
.station__go { color: var(--muted); }
.near { display: grid; gap: 10px; margin-top: 12px; }
.near__basis { font-size: 13px; color: var(--muted); }
.near__actions { display: grid; gap: 8px; padding: 10px 2px 6px; }
.onway { border-top: 1px solid var(--line); padding-top: 10px; }
.onway summary { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand-ink); cursor: pointer; padding: 4px 0; }
.onway[open] summary { margin-bottom: 4px; }
.stations__title { margin: 10px 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.stations__more { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* Assistant */
.chat { display: flex; flex-direction: column; height: min(52dvh, 560px); }
.chat__log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.msg { max-width: 92%; padding: 9px 12px; border-radius: 14px; background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg--user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg--assistant { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg .plan { margin-top: 10px; white-space: normal; }
.msg .stat, .msg .elev__chart { background: var(--bg); }
.msg.is-pending { color: var(--muted); }
.chat__examples { margin-top: 4px; }
.chat__stations { margin: 8px 0 0; padding: 0; list-style: none; white-space: normal; }
.chat__stations .station { background: var(--bg); }
.chat__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; white-space: normal; }
.chat__actions .btn { font-size: 14px; padding: 8px 12px; white-space: normal; text-align: left; height: auto; min-height: 40px; }
.menu__ask { margin-bottom: 6px; }
.chat__composer { flex: none; display: flex; gap: 8px; align-items: flex-end; padding-top: 8px; border-top: 1px solid var(--line); }
textarea.chat__input { resize: none; max-height: 110px; }
.chat__send { flex: none; width: 44px; padding: 0; }
.empty { display: grid; justify-items: center; gap: 12px; padding: 16px 8px 8px; text-align: center; }
.empty__icon { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.empty p { color: var(--muted); max-width: 40ch; }

.menu__section:first-child .section { margin-top: 4px; }

.noscript { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 24px; background: var(--bg); text-align: center; }

/* Wide screens: the panel sits beside the map instead of over it */
@media (min-width: 900px) {
  :root { --tabs-h: 0px; --safe-b: 0px; }
  .topbar { left: 16px; right: auto; width: 400px; top: 14px; }
  .tabs {
    left: 432px; right: auto; top: 14px; bottom: auto; height: 48px; padding: 0 6px; display: flex; gap: 2px;
    border: 0; border-radius: 999px; box-shadow: var(--shadow);
  }
  .tab { flex-direction: row; gap: 6px; padding: 0 14px; font-size: 14px; border-radius: 999px; }
  .tab.is-active { background: var(--brand-soft); }
  .sheet, .sheet[data-view="plan"] { left: 16px; right: auto; top: 74px; bottom: 16px; width: 400px; max-height: none; border-radius: 16px; box-shadow: var(--shadow); }
  .sheet__grip { display: none; }
  .sheet__head { padding-top: 12px; }
  .chat { height: 100%; }
  .sheet[data-view="assistant"] .sheet__body { display: flex; flex-direction: column; }
  .leaflet-control-zoom { display: block; }
  .fab { bottom: 110px; }
  .fab--mode { bottom: 170px; }
  .whereto { left: 16px; right: auto; width: 400px; bottom: 16px; margin: 0; }
  .map3d { bottom: 0; }
  .map3d__light { bottom: 230px; }
  .has-sheet .fab { display: grid; }
  .pickbar { bottom: 24px; }
  .is-picking .fab { bottom: 110px; }
}

@media (max-width: 380px) {
  .form__row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* A page of plain text opened from the menu */
.text { display: grid; gap: 12px; font-size: 15px; line-height: 1.5; }
.text p { margin: 0; }

/* =====================================================================================
   Night glass: the look of the app. Dark ground, the map dimmed to match, every panel a
   sheet of frosted glass over it, one mint accent, and motion that is quick and soft.
   It sits after the rules above and overrides their colours and some of their places.
   ===================================================================================== */
:root {
  /* Night: charcoal glass with one orange accent. */
  --accent: #f0672f;
  --brand: #f0672f; --brand-ink: #ffb38c; --brand-soft: color-mix(in srgb, var(--brand) 14%, transparent); --on-brand: #ffffff;
  --ink: #f2f0ec; --muted: rgba(240, 237, 230, 0.56); --line: rgba(255, 255, 255, 0.09);
  --bg: #1c1d1f; --surface: rgba(255, 255, 255, 0.055); --raised: rgba(255, 255, 255, 0.09);
  --glass: rgba(30, 31, 33, 0.68); --glass-edge: rgba(255, 255, 255, 0.11); --blur: blur(26px) saturate(140%);
  /* The chargers by speed, with no colour but the accent: grey, then the ink, then orange. */
  --ac: #1c1d1f; --fast: #f2f0ec; --ultra: var(--accent); --on-ac: #f2f0ec; --on-fast: #161616; --on-ultra: #ffffff;
  --good: #58c98b; --bad: #ff5b62;
  --warn-bg: rgba(240, 103, 47, 0.13); --warn-ink: #ffb38c;
  --radius: 16px; --shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  /* The tab bar floats above the bottom edge; everything that sits on it counts from here. */
  --tabs-h: 64px; --dock-b: max(10px, env(safe-area-inset-bottom, 0px)); --dock: calc(var(--dock-b) + var(--tabs-h));
  --brand-grad: linear-gradient(135deg, #f67c48, #e4582a);
  --ground: #121314; --map-ground: #1a1b1d; --dim: rgba(6, 6, 7, 0.72);
  --map-filter: invert(1) hue-rotate(185deg) brightness(0.85) contrast(0.92) saturate(0.2);
  --ring: rgba(18, 19, 20, 0.9); --line-strong: rgba(255, 255, 255, 0.22); --unknown: #3b3c3f;
  --ac-ink: #c9c6bf; --fast-ink: #f2f0ec; --ultra-ink: #ffb38c; --good-ink: #9be3bd; --bad-ink: #ff9da1;
  color-scheme: dark;
}

/* Paper: the day look. Warm paper, black ink, hairlines, the same orange. */
:root[data-palette="light"] {
  /* The buttons and the marks are ink; orange is kept for the way and the driver alone. */
  --accent: #e2531c;
  --brand: #161616; --brand-ink: #161616; --on-brand: #f4f1ea; --brand-grad: linear-gradient(#161616, #161616);
  --ink: #161616; --muted: rgba(22, 22, 22, 0.56); --line: rgba(22, 22, 22, 0.12); --line-strong: rgba(22, 22, 22, 0.3);
  --bg: #f1eee7; --surface: rgba(22, 22, 22, 0.04); --raised: rgba(22, 22, 22, 0.08);
  --glass: rgba(241, 238, 231, 0.94); --glass-edge: rgba(22, 22, 22, 0.14); --blur: blur(14px);
  --ground: #e9e6de; --map-ground: #e9e6de; --map-filter: grayscale(0.85) sepia(0.18) brightness(1.01) contrast(0.96);
  --ring: rgba(241, 238, 231, 0.96); --unknown: #b4b0a6; --dim: rgba(30, 28, 24, 0.36);
  --shadow: 0 10px 28px rgba(40, 34, 22, 0.1), 0 1px 3px rgba(40, 34, 22, 0.08);
  --ac: #f1eee7; --fast: #161616; --ultra: var(--accent); --on-ac: #161616; --on-fast: #f4f1ea; --on-ultra: #ffffff;
  --good: #1f9a5d; --bad: #d8383e;
  --ac-ink: #55524c; --fast-ink: #161616; --ultra-ink: #b23c0d; --good-ink: #0f6b3f; --bad-ink: #a71d22;
  --warn-bg: rgba(22, 22, 22, 0.05); --warn-ink: #161616;
  color-scheme: light;
}
html, body { background: var(--ground); }
body { letter-spacing: -0.005em; }
::selection { background: color-mix(in srgb, var(--brand) 35%, transparent); }

/* The map runs under the floating bars; its streets are turned to night. */
#map, .map3d { inset: 0; }
#map, .leaflet-container { background: var(--map-ground); }
.leaflet-tile-pane { filter: var(--map-filter); }
/* The app's own map by night is drawn in night colours of its own (map.js): no turning round. */
.is-own-dark .leaflet-tile-pane { filter: none; }
.leaflet-control-attribution { background: var(--glass) !important; color: var(--muted); border-radius: 8px 0 0 0; }
.leaflet-control-attribution a { color: var(--muted); }
.leaflet-control-zoom a { background: var(--glass) !important; color: var(--ink) !important; border-color: var(--glass-edge) !important; backdrop-filter: var(--blur); }

/* Glass: the one surface every floating thing is made of. */
.search, .results, .sheet, .tabs, .fab, .pickbar, .toast, .routebar, .whereto__chips .chip, .leaflet-tooltip.stop-label, .map3d__light {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Signs on the map: a dark ring, and a glow in their own colour. */
.pin > span { border: 2px solid var(--ring); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 4px 14px rgba(0, 0, 0, 0.5); animation: pop 0.42s var(--spring) backwards; }
.pin--ac > span, .station__kw--ac, .tour__pin--ac { color: var(--on-ac); }
.pin--fast > span, .station__kw--fast, .tour__pin--fast { color: var(--on-fast); }
.pin--ultra > span, .station__kw--ultra, .tour__pin--ultra { color: var(--on-ultra); }
.pin--unknown > span { background: var(--unknown); color: #fff; }
.pin.is-pending > span { background: var(--surface); color: var(--muted); border-color: var(--muted); }
.pin.is-selected > span { transform: scale(1.3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 40%, transparent), 0 0 22px color-mix(in srgb, var(--brand) 60%, transparent); }
.cluster > span {
  background: var(--glass); color: var(--brand); border: 1.5px solid color-mix(in srgb, var(--brand) 65%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--brand) 28%, transparent), 0 4px 14px rgba(0, 0, 0, 0.5); backdrop-filter: blur(6px); animation: pop 0.42s var(--spring) backwards;
  /* The count in the very middle, whatever the ring's width (a line height set for the old,
     thicker ring left it a little high). */
  display: flex; align-items: center; justify-content: center; line-height: 1; box-sizing: border-box; padding-top: 1px; /* digits have nothing below the line */
}
.badge-pin > span { border-color: var(--ring); }
.badge-pin--end > span { background: var(--ink); color: var(--ground); }
.badge-pin--stop > span { background: var(--brand); color: var(--on-brand); box-shadow: 0 0 18px color-mix(in srgb, var(--brand) 60%, transparent); }
.route-casing { stroke: var(--ground); stroke-opacity: 0.85; }
.route-line { stroke: var(--brand); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--brand) 65%, transparent)); }
.user-dot { background: var(--brand); border-color: var(--ring); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 22%, transparent), 0 2px 6px rgba(0, 0, 0, 0.3); }
.stop-label small { color: var(--brand-ink); }

/* Search */
.topbar { top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; }
.search { height: 52px; padding: 0 6px 0 16px; border-radius: 26px; }
.search input { color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.icon-btn:hover, .result:hover, .result:focus-visible, .btn:hover, .station:hover { background: var(--raised); }
.results { margin-top: 10px; border-radius: 20px; animation: rise 0.32s var(--ease) backwards; }
.results li + li { border-top-color: var(--line); }
.count-dot { background: var(--brand); color: var(--on-brand); }

/* The round buttons over the map, and the one the driver needs most. */
.fab { right: 14px; bottom: calc(var(--dock) + var(--whereto-h) + 14px); width: 52px; height: 52px; color: var(--ink); }
.fab--mode { bottom: calc(var(--dock) + var(--whereto-h) + 76px); }
.is-3d .fab--mode { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.whereto { bottom: calc(var(--dock) + 10px); }
.whereto__go { background: var(--brand-grad); color: var(--on-brand); border-radius: 24px; animation: breathe 3.2s ease-in-out infinite; }
.whereto__icon { background: color-mix(in srgb, var(--on-brand) 16%, transparent); }
.map3d__light { bottom: calc(var(--dock) + var(--whereto-h) + 138px); right: 14px; width: 52px; height: 52px; }

/* The tab bar: a pill of glass floating over the map. */
.tabs {
  left: 12px; right: 12px; bottom: var(--dock-b); height: var(--tabs-h); padding: 6px; gap: 4px;
  border-radius: 26px; max-width: 560px; margin: 0 auto;
}
.tab { border-radius: 20px; color: var(--muted); transition: color 0.25s, background-color 0.3s var(--ease), transform 0.18s var(--ease); }
.tab .icon { transition: transform 0.35s var(--spring); }
.tab.is-active { color: var(--brand); background: var(--brand-soft); }
.tab.is-active .icon { transform: translateY(-1px) scale(1.08); }

/* The panel: a card of glass standing on the tab bar. */
.sheet {
  left: 8px; right: 8px; bottom: calc(var(--dock) + 8px); max-height: 62dvh; border-radius: 28px;
  max-width: 600px; margin: 0 auto; animation: sheetIn 0.5s var(--ease) backwards;
}
.sheet[data-view="plan"], .sheet[data-view="nearest"] { max-height: 50dvh; }
/* The car list is long: the panel takes more of the phone's height for it. */
@media (max-width: 899px) { .sheet[data-view="car"] { max-height: 78dvh; } }
.sheet__grip::before { background: var(--line-strong); }
.sheet__head { padding: 0 10px 8px 20px; }
.sheet__head h2 { font-size: 21px; font-weight: 750; letter-spacing: -0.02em; }
.sheet__body { padding: 4px 18px 20px; }
.sheet__body > * { animation: rise 0.5s var(--ease) backwards; }
.sheet__body > :nth-child(2) { animation-delay: 0.04s; } .sheet__body > :nth-child(3) { animation-delay: 0.08s; }
.sheet__body > :nth-child(4) { animation-delay: 0.12s; } .sheet__body > :nth-child(5) { animation-delay: 0.16s; }
.sheet__body > :nth-child(n + 6) { animation-delay: 0.2s; }
.has-keyboard .sheet, .has-keyboard .sheet[data-view] { bottom: var(--keyboard); left: 0; right: 0; border-radius: 24px 24px 0 0; }
/* Typing in the panel on a phone: it takes all the height left above the keyboard (the search
   bar steps aside) and keeps it while suggestions come and go, until the keyboard has gone
   ("is-typing", followKeyboard in ui.js). Its colour runs on down behind the browser's own bars
   and the keyboard, which are see-through on an iPhone, so that the map does not show between
   them and the panel does not look cut off. */
@media (max-width: 899px) {
  .has-keyboard.is-typing .topbar { display: none; }
  .has-keyboard.is-typing .sheet, .has-keyboard.is-typing .sheet[data-view] { height: calc(var(--seen) - env(safe-area-inset-top, 0px) - 8px); max-height: none; }
  /* Room below, so that a field near the end of a short form can still be scrolled to the top. */
  .has-keyboard.is-typing .sheet__body { padding-bottom: 50vh; }
  .has-keyboard .sheet { background: var(--bg); }
  .has-keyboard .sheet::after {
    content: ""; position: absolute; left: -1px; right: -1px; top: 100%; height: calc(var(--keyboard) + 60px);
    background: var(--bg); pointer-events: none;
  }
}

/* Controls */
.btn { min-height: 46px; padding: 8px 16px; border-radius: 14px; border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn--primary { background: var(--brand-grad); border-color: transparent; color: var(--on-brand); box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 25%, transparent); }
.btn--primary:hover { background: var(--brand-grad); }
.btn--nav { border-color: color-mix(in srgb, var(--brand) 45%, transparent); color: var(--brand-ink); background: color-mix(in srgb, var(--brand) 7%, transparent); }
.btn--danger { color: var(--bad); }
.linkbtn, a { color: var(--brand); }
.field__input { border-color: var(--line); background: var(--surface); border-radius: 14px; color: var(--ink); }
.field__input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
select.field__input option { background: var(--bg); }
.chip { border-color: var(--line); background: var(--surface); }
.chip.is-on { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 60%, transparent); color: var(--brand-ink); }
.segmented { border-color: var(--line); border-radius: 14px; background: var(--surface); }
.segmented button { background: none; }
.segmented button + button { border-left-color: var(--line); }
.segmented button.is-on { background: var(--brand); color: var(--on-brand); }
.rowbtn, .station, .plug { border-color: var(--line); background: var(--surface); border-radius: 16px; }
.station.is-chosen { border-color: color-mix(in srgb, var(--brand) 60%, transparent); background: var(--brand-soft); }
.stations > * { animation: rise 0.45s var(--ease) backwards; }
.stations > :nth-child(2) { animation-delay: 0.05s; } .stations > :nth-child(3) { animation-delay: 0.1s; }
.stations > :nth-child(4) { animation-delay: 0.15s; } .stations > :nth-child(n + 5) { animation-delay: 0.2s; }
.station__kw--unknown { background: var(--unknown); }
.station__kw { box-shadow: none; }
.notice { background: var(--surface); border-radius: 14px; }
.notice--ok { background: color-mix(in srgb, var(--good) 13%, transparent); color: var(--good-ink); }
.notice--warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice--error { background: color-mix(in srgb, var(--bad) 13%, transparent); color: var(--bad-ink); }
.tag { background: var(--surface); }
.tag--ac { background: color-mix(in srgb, var(--ac) 16%, transparent); color: var(--ac-ink); }
.tag--fast { background: color-mix(in srgb, var(--fast) 16%, transparent); color: var(--fast-ink); }
.tag--ultra { background: color-mix(in srgb, var(--ultra) 17%, transparent); color: var(--ultra-ink); }
.tag--good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good-ink); }
.tag--bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad-ink); }
.tag--private { background: var(--ink); color: var(--ground); }
.plug__kw, .slider__value, .leg__action { color: var(--brand-ink); }
.stat { background: var(--surface); border-radius: 16px; padding: 12px 14px; }
.stat__value { font-size: 22px; font-weight: 750; letter-spacing: -0.02em; }
.leg__dot { background: var(--ink); color: var(--ground); }
.leg--stop .leg__dot { background: var(--brand); color: var(--on-brand); box-shadow: 0 0 14px color-mix(in srgb, var(--brand) 50%, transparent); }
.elev__chart { background: var(--surface); border-radius: 14px; }
.elev__area { fill: color-mix(in srgb, var(--brand) 10%, transparent); }
.elev__stop { stroke: var(--line-strong); }
.msg { background: var(--surface); }
.msg--user { background: var(--brand-grad); color: var(--on-brand); }
.msg .stat, .msg .elev__chart { background: var(--surface); }
.empty__icon { background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 30px color-mix(in srgb, var(--brand) 25%, transparent); }
.pickbar { bottom: var(--dock-b); border-radius: 24px; }
.is-picking .fab { bottom: calc(var(--dock-b) + 150px); }
.crosshair { color: var(--brand); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--brand) 80%, transparent)); }

/* A press gives way a little. */
.btn, .fab, .whereto__go, .chip, .station, .rowbtn, .result, .segmented button { transition: transform 0.18s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.25s; }
.btn:active, .fab:active, .whereto__go:active, .chip:active, .station:active, .rowbtn:active, .tab:active { transform: scale(0.96); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(46px) scale(0.98); } }
@keyframes pop { 0% { opacity: 0; transform: scale(0.3); } 70% { transform: scale(1.1); } }
@keyframes breathe { 0%, 100% { box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 28%, transparent); } 50% { box-shadow: 0 8px 36px color-mix(in srgb, var(--brand) 55%, transparent); } }
@keyframes fade { from { opacity: 0; } }

/* Wide screens: the panel stands beside the map, the tab bar at the top beside the search. */
@media (min-width: 900px) {
  :root { --tabs-h: 0px; --dock-b: 0px; }
  .topbar { left: 16px; right: auto; width: 400px; top: 14px; }
  .routebar { left: 16px; right: auto; width: 400px; top: 80px; }
  .tabs { left: 432px; right: auto; top: 14px; bottom: auto; height: 52px; padding: 5px; margin: 0; border-radius: 26px; }
  .tab { padding: 0 16px; }
  .sheet, .sheet[data-view="plan"], .sheet[data-view="nearest"] { left: 16px; right: auto; top: 80px; bottom: 16px; width: 400px; max-height: none; margin: 0; }
  .fab { bottom: 110px; }
  .fab--mode { bottom: 172px; }
  .whereto { left: 16px; right: auto; width: 400px; bottom: 16px; margin: 0; }
  .map3d__light { bottom: 234px; }
  .pickbar { bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* The first-visit guide: the screen dims, one button stays lit, and a card of glass shows in a
   moving picture, then in a sentence, what it is for. */
.tour { position: fixed; inset: 0; z-index: 3000; animation: fade 0.3s ease backwards; }
.tour__hole {
  position: fixed; border-radius: 20px; pointer-events: none;
  box-shadow: 0 0 0 9999px var(--dim), 0 0 0 2px var(--brand), 0 0 28px color-mix(in srgb, var(--brand) 55%, transparent);
  transition: left 0.45s var(--ease), top 0.45s var(--ease), width 0.45s var(--ease), height 0.45s var(--ease);
  animation: halo 2s ease-in-out infinite;
}
.tour--centre { background: var(--dim); display: grid; place-items: center; }
.tour--centre .tour__hole { display: none; }
.tour__card {
  position: fixed; left: 12px; right: 12px; max-width: 440px; margin: 0 auto; padding: 10px 10px 16px; border-radius: 30px;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: grid; gap: 14px; transition: top 0.45s var(--ease), bottom 0.45s var(--ease);
}
.tour--centre .tour__card { position: static; width: calc(100% - 24px); }
.tour__art { position: relative; height: 168px; border-radius: 22px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #1d2430 0%, #0e1116 70%); animation: rise 0.5s var(--ease) backwards; }
.tour__art svg { display: block; width: 100%; height: 100%; }
.tour__text { display: grid; gap: 8px; padding: 0 10px; }
.tour__text > * { animation: rise 0.5s var(--ease) backwards; }
.tour__text > :nth-child(2) { animation-delay: 0.06s; } .tour__text > :nth-child(3) { animation-delay: 0.12s; } .tour__text > :nth-child(4) { animation-delay: 0.18s; }
.tour__card h2 { font-size: 24px; font-weight: 750; line-height: 1.15; letter-spacing: -0.025em; }
.tour__card p { font-size: 15px; line-height: 1.5; color: var(--muted); }
.tour__dots { display: flex; gap: 6px; }
.tour__dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--line-strong); transition: width 0.35s var(--ease), background-color 0.35s; }
.tour__dots span.is-on { width: 22px; background: var(--brand); }
.tour__dots span.is-done { background: color-mix(in srgb, var(--brand) 50%, transparent); }
.tour__actions { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; }
.tour__skip { border: 0; background: none; color: var(--muted); font-weight: 600; padding: 10px 4px; }
.tour__next {
  width: 56px; height: 56px; border: 0; border-radius: 50%; display: grid; place-items: center; color: var(--on-brand);
  background: var(--brand-grad); box-shadow: 0 10px 28px color-mix(in srgb, var(--brand) 40%, transparent); transition: transform 0.18s var(--ease), width 0.35s var(--ease);
}
.tour__next:active { transform: scale(0.94); }
.tour__next--wide { width: auto; padding: 0 22px 0 26px; border-radius: 28px; grid-auto-flow: column; gap: 8px; font-weight: 750; font-size: 16px; }
.tour__legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 13.5px; color: var(--ink); }
.tour__legend li { display: flex; align-items: center; gap: 8px; }
.tour__pin { flex: none; min-width: 58px; height: 24px; padding: 0 8px; border-radius: 12px; display: inline-flex; align-items: baseline; justify-content: center; line-height: 24px; color: #fff; font-weight: 800; font-size: 12.5px; }
.tour__pin--ultra { background: var(--ultra); }
.tour__pin--fast { background: var(--fast); }
.tour__pin--ac { background: var(--ac); }
.tour__pin--unknown { background: var(--unknown); }
@keyframes halo { 50% { box-shadow: 0 0 0 9999px var(--dim), 0 0 0 2px var(--brand), 0 0 44px color-mix(in srgb, var(--brand) 80%, transparent); } }

/* The guide's pictures (js/views/tour-art.js). Each moving part names how it moves. */
.art-ridge { fill: #1a2029; }
.art-ridge--far { fill: #141a22; }
.art-faint { stroke: rgba(255, 255, 255, 0.08); fill: none; }
.art-road { fill: none; stroke: rgba(255, 255, 255, 0.12); stroke-width: 6; stroke-linecap: round; }
.art-draw { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--brand) 80%, transparent)); animation: draw 2.6s var(--ease) 0.3s infinite; }
.art-dash { fill: none; stroke: var(--brand); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; animation: march 1s linear infinite; }
.art-up { transform-box: fill-box; transform-origin: 50% 100%; animation: grow 0.7s var(--spring) backwards; }
.art-pop { transform-box: fill-box; transform-origin: 50% 50%; animation: pop 0.6s var(--spring) backwards; }
.art-float { transform-box: fill-box; animation: float 3.4s ease-in-out infinite; }
.art-ping { transform-box: fill-box; transform-origin: 50% 50%; animation: ping 2.4s ease-out infinite; }
.art-glow { animation: glow 2.2s ease-in-out infinite; }
.art-fill { transform-box: fill-box; transform-origin: 0 50%; animation: soc 4.5s ease-in-out infinite; }
.art-charge { transform-box: fill-box; transform-origin: 0 50%; animation: charge 3.6s ease-in-out infinite; }
.art-type { animation: type 4s steps(8) infinite; }
.art-caret { animation: blink 1s steps(1) infinite; }
.art-toggle { animation: toggle 4s ease-in-out infinite; }
.art-tilt { position: absolute; inset: 0; transform-origin: 50% 70%; animation: tilt 5s ease-in-out infinite; }
.d1 { animation-delay: 0.15s; } .d2 { animation-delay: 0.3s; } .d3 { animation-delay: 0.45s; } .d4 { animation-delay: 0.6s; }
.d5 { animation-delay: 0.75s; } .d6 { animation-delay: 0.9s; } .d7 { animation-delay: 1.05s; } .d8 { animation-delay: 1.2s; }
@keyframes draw { 0% { stroke-dashoffset: 400; } 55%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes march { to { stroke-dashoffset: -11; } }
@keyframes grow { from { transform: scaleY(0); opacity: 0; } }
@keyframes float { 50% { transform: translateY(-5px); } }
@keyframes ping { 0% { transform: scale(0.3); opacity: 0.9; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes glow { 50% { opacity: 0.45; } }
@keyframes soc { 0% { transform: scaleX(0.95); fill: #58c98b; } 45% { transform: scaleX(0.28); fill: #ff9640; } 55% { transform: scaleX(0.28); fill: #ff9640; } 75% { transform: scaleX(0.8); fill: var(--brand); } 100% { transform: scaleX(0.95); fill: #39d98a; } }
@keyframes charge { 0% { transform: scaleX(0.2); fill: #ff9640; } 70%, 100% { transform: scaleX(1); fill: var(--brand); } }
@keyframes type { 0% { clip-path: inset(0 100% 0 0); } 60%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes toggle { 0%, 35% { fill: rgba(255, 255, 255, 0.06); stroke: rgba(255, 255, 255, 0.14); } 45%, 100% { fill: color-mix(in srgb, var(--brand) 18%, transparent); stroke: var(--brand); } }
@keyframes tilt { 0%, 15% { transform: perspective(500px) rotateX(0deg) scale(1); } 50%, 70% { transform: perspective(500px) rotateX(52deg) scale(1.15) translateY(-6px); } 100% { transform: perspective(500px) rotateX(0deg) scale(1); } }

/* The choice of palette in the menu: a small round sample of each. */
.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.swatch { display: flex; align-items: center; gap: 8px; padding: 6px 8px; min-width: 0; white-space: nowrap; border: 1px solid transparent; border-radius: 16px; background: none; color: var(--muted); font-size: 12px; font-weight: 600; transition: border-color 0.2s, background-color 0.2s, transform 0.18s var(--ease); }
.swatch:active { transform: scale(0.95); }
.swatch.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.swatch__dot { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.swatch--auto .swatch__dot { background: linear-gradient(135deg, #1c1d1f 50%, #f4f1ea 50%); position: relative; }
.swatch--auto .swatch__dot::after { content: 'A'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; font-weight: 800; color: #f0672f; }
.swatch--night .swatch__dot { background: linear-gradient(135deg, #1c1d1f 55%, #f0672f 55%); }
.swatch--light .swatch__dot { background: linear-gradient(135deg, #f4f1ea 55%, #161616 55%); }

/* The assistant thinking: three dots that rise in turn. */
.typing { display: inline-flex; gap: 5px; padding: 4px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: typing 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: 0.35; } 30% { transform: translateY(-5px); opacity: 1; } }
.chat__log > .msg { animation: rise 0.4s var(--ease) backwards; }
.msg { border-radius: 20px; padding: 10px 14px; }
.msg--user { border-bottom-right-radius: 6px; }
.msg--assistant { border-bottom-left-radius: 6px; background: var(--raised); }
.chat__composer { border-top: 0; }
.chat__input { border-radius: 22px; padding: 11px 16px; }
.chat__send { width: 48px; height: 48px; border-radius: 50%; }

/* The copilot's panel while driving. */
.drive { display: grid; gap: 14px; }
.drive__head { display: flex; align-items: center; gap: 12px; }
.drive__icon { flex: none; width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; color: var(--on-brand); background: var(--brand-grad); box-shadow: 0 8px 22px color-mix(in srgb, var(--brand) 35%, transparent); }
.drive__next { font-size: 15px; color: var(--muted); font-weight: 600; }
.drive__km { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.drive__battery { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 10px; padding: 12px 14px; border-radius: 18px; background: var(--surface); font-size: 13px; color: var(--muted); }
.drive__soc { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.drive__bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.drive__bar-fill { display: block; height: 100%; width: 0; border-radius: 4px; transition: width 0.8s var(--ease), background-color 0.8s; }
.drive__progress { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.drive__progress-fill { display: block; height: 100%; width: 0; background: var(--brand); transition: width 0.8s var(--ease); }
.drive__said { font-size: 16px; line-height: 1.45; font-weight: 600; }
.drive__said:empty { display: none; }
.drive__note { font-size: 12.5px; color: var(--muted); }
.drive__off { display: grid; gap: 8px; }
.drive .actions { margin-top: 0; }
.drive .actions .btn { flex: 1; }
.actions .btn--block { flex-basis: 100%; }
.is-driving .fab--mode { display: none; }

/* Remembered places: one-tap chips under the destination, and home and work in the menu. */
.quickplaces { margin-top: -6px; }
.quickplaces .chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.quickplaces .chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.quickplaces .chip .icon { color: var(--brand); }
.places { display: grid; gap: 8px; margin-bottom: 8px; }
.rowbtn__main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rowbtn__main .icon { color: var(--brand); }
.rowbtn__main small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowbtn__main > span { display: grid; min-width: 0; }

/* The navigator: the turn banner on top, the turned map, the panel below. While driving, the
   search bar, the tab bar and the map buttons step aside. */
.is-driving .topbar, .is-driving .tabs, .is-driving .fab { display: none; }
.is-driving .sheet[data-view="drive"] { bottom: calc(var(--dock-b) + 4px); max-height: 46dvh; }
.navmap { position: fixed; inset: 0; z-index: 950; background: var(--map-ground); animation: fade 0.4s ease backwards; }
.navmap__canvas { width: 100%; height: 100%; }
.navmap .maplibregl-ctrl-bottom-left { display: none; }
.navmap__recenter {
  position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 150px);
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 1px solid var(--glass-edge); border-radius: 22px;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); color: var(--ink); font-weight: 650; box-shadow: var(--shadow);
}
.navmap__recenter[hidden] { display: none; }
.navcar { width: 48px; height: 48px; color: var(--brand); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35)); transition: opacity 0.3s; }
.navcar svg { display: block; }

.navbanner {
  position: fixed; z-index: 1160; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 12px 16px; border-radius: 26px;
  background: var(--brand-grad); color: var(--on-brand); box-shadow: 0 14px 40px color-mix(in srgb, var(--brand) 38%, rgba(0, 0, 0, 0.25));
  animation: rise 0.45s var(--ease) backwards;
}
.navbanner__arrow { flex: none; width: 56px; height: 56px; display: grid; place-items: center; }
.navbanner__arrow svg { display: block; }
.navbanner__text { min-width: 0; flex: 1; display: grid; gap: 1px; }
.navbanner__dist { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.navbanner__dist:empty { display: none; }
.navbanner__action { font-size: 16px; font-weight: 650; line-height: 1.25; }
.navbanner__road { font-size: 14px; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbanner__road:empty { display: none; }
.navbanner__then { flex: none; display: grid; justify-items: center; gap: 0; padding: 6px 8px; border-radius: 16px; background: rgba(0, 0, 0, 0.16); font-size: 12px; font-weight: 650; }
.navbanner__then[hidden] { display: none; }
.navbanner__then svg { width: 30px; height: 30px; }
.navbanner.is-rerouting { background: linear-gradient(135deg, #f59f0a, #e8590c); }
.navbanner.is-rerouting .navbanner__arrow { animation: breathe 1.4s ease-in-out infinite; }

.navpanel { gap: 8px; }
/* While driving the panel is low: no title of its own, the map has the screen. */
.sheet[data-view="drive"] .sheet__head { display: none; }
.sheet[data-view="drive"] .sheet__body { padding-bottom: 14px; }
.navpanel__when { display: grid; gap: 1px; min-width: 0; }
.navpanel__end { color: #fff; background: #e03131; border-color: transparent; }
.navmap__speed { position: absolute; left: 14px; z-index: 2; width: 62px; height: 62px; border-radius: 50%; display: grid; place-content: center; justify-items: center; background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-edge); box-shadow: var(--shadow); color: var(--ink); transition: bottom 0.3s var(--ease); }
.navmap__speed[hidden] { display: none; }
.navmap__speed strong { font-size: 22px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.navmap__speed small { font-size: 10px; font-weight: 650; color: var(--muted); }
.navpanel__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.navpanel__eta { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; white-space: nowrap; }
.navpanel__left { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.navpanel__tools { display: flex; gap: 8px; flex: none; }
.navpanel__stop { font-size: 14px; font-weight: 650; color: var(--brand-ink); }
.navpanel__stop[hidden], .navpanel .drive__battery[hidden] { display: none; }
.navpanel .drive__said { font-size: 14px; font-weight: 550; color: var(--muted); }
.btn--icon { width: 44px; height: 44px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; flex: none; }
.btn--icon.is-off { color: var(--bad); }
.btn--icon.is-on { color: var(--on-brand); background: var(--brand); border-color: transparent; }
.navlinks .btn--ours { flex-basis: 100%; background: var(--brand-grad); color: var(--on-brand); border-color: transparent; }
@media (min-width: 900px) {
  .navbanner { left: 16px; right: auto; width: 420px; margin: 0; }
}
.navpanel__eta, .navpanel__left { display: block; }


/* The opening (index.html, map.js): the owner's animation of the name, on the video's own
   ground (#161616), so that its edges do not show; then it fades into the map. No blur. */
.map-veil {
  /* over everything while it plays (search, tabs, buttons), under messages and the guide */
  position: fixed; inset: 0; z-index: 1300; pointer-events: none; opacity: 0; overflow: hidden;
  display: none; place-items: center; background: #161616;
  transition: opacity 0.6s var(--ease);
}
.map-veil.is-launch { display: grid; }
.map-veil.is-on { opacity: 1; }
.launch-video, .launch-still, .launch-anim {
  grid-area: 1 / 1; display: block; width: min(100vw, 760px); height: auto; aspect-ratio: 16 / 9; background: #161616;
  transition: transform 0.6s var(--ease), opacity 0.25s;
}
.map-veil:not(.is-on) :is(.launch-video, .launch-still, .launch-anim) { transform: scale(1.04); }
/* The video only once it really plays; where it does not (an iPhone in Low Power Mode draws a
   play button over it), the same animation as a picture, then the picture of the finished name
   over it (map.js). */
.launch-video, .launch-still, .launch-anim { opacity: 0; }
.launch-still { z-index: 1; }
.map-veil.is-playing .launch-video, .map-veil.is-animating .launch-anim, .map-veil.is-still .launch-still { opacity: 1; }
.map-veil.is-refused .launch-video { visibility: hidden; }
.map-veil.is-animating .launch-anim { transition: transform 0.6s var(--ease); } /* shown at once */
.is-3d .map-veil, .is-failed .map-veil { display: none; }
@media (prefers-reduced-motion: reduce) { .map-veil, .launch-video, .launch-still, .launch-anim { transition: none; } }

/* Messages (dom.js toast): a small notification capsule with the app's icon, sliding down from
   the top over the search bar, gone by itself or at a tap. A problem is told by a red rim. */
.toast {
  position: fixed; z-index: 1400; left: 50%; top: calc(10px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(92vw, 420px);
  padding: 8px 16px 8px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 94%, transparent); color: var(--ink); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  font-size: 14px; font-weight: 550; line-height: 1.3;
  opacity: 0; pointer-events: none; transform: translate(-50%, -140%) scale(0.92);
  transition: transform 0.42s var(--spring), opacity 0.25s var(--ease);
}
.toast.is-shown { opacity: 1; pointer-events: auto; transform: translate(-50%, 0) scale(1); cursor: pointer; }
.toast__icon { flex: none; width: 28px; height: 28px; border-radius: 8px; display: block; }
.toast__text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.toast.is-error { border-color: color-mix(in srgb, var(--bad) 70%, transparent); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28), 0 0 0 1px color-mix(in srgb, var(--bad) 40%, transparent); }
.toast.is-ok { border-color: color-mix(in srgb, var(--good) 70%, transparent); }
/* While navigating, under the turn banner, not over it. */
.is-driving .toast { top: calc(118px + env(safe-area-inset-top, 0px)); }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity 0.2s; transform: translate(-50%, 0); } }

/* Drivers' corrections (views/fix.js): the way in on a charger's card, and the editor's list. */
.fix__add { margin-top: 8px; }
.fix__wrong { margin-top: 2px; }
.fixes { display: grid; gap: 10px; margin-top: 8px; }
.fix { display: grid; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.fix--row { width: 100%; text-align: left; color: var(--ink); font: inherit; }
.fix__what { display: grid; gap: 3px; font-size: 14px; }
.fix__what p { margin: 0; }
.fix__note { font-style: italic; }
.fix__what small { color: var(--muted); }
.fix .actions { margin-top: 0; }

/* =====================================================================================
   Paper and ink (2026-11-24): the final colours. Two looks only, night and paper, one orange
   accent; the chargers' speeds are told by grey, ink and orange, not by three colours.
   ===================================================================================== */
.pin--ac > span, .station__kw--ac, .tour__pin--ac { color: var(--on-ac); }
.pin--fast > span, .station__kw--fast, .tour__pin--fast { color: var(--on-fast); }
.pin--ultra > span, .station__kw--ultra, .tour__pin--ultra { color: var(--on-ultra); }
.pin > span { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28); }
/* The slow ones are drawn in outline: the ground's tone inside, the ink around. */
.pin--ac > span, .station__kw--ac, .tour__pin--ac { border: 1.5px solid var(--ink); line-height: 21px; }
.station__kw--ac, .tour__pin--ac { line-height: 21px; }
/* The app's own map is drawn in its final colours: no filter over it by day either. */
.is-own .leaflet-tile-pane { filter: none; }
.cluster > span { color: var(--ink); border-color: var(--line-strong); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22); }
.route-line { filter: none; stroke: var(--accent); }
.user-dot { background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent), 0 2px 6px rgba(0, 0, 0, 0.3); }
.pin.is-selected > span { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 40%, transparent); }
.swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Paper: panels are sheets of paper with a hairline, not frosted glass with a glow. */
:root[data-palette="light"] :is(.search, .results, .sheet, .tabs, .fab, .pickbar, .toast, .routebar, .whereto__chips .chip, .leaflet-tooltip.stop-label, .map3d__light) { box-shadow: var(--shadow); }
:root[data-palette="light"] :is(.btn--primary, .whereto__go, .drive__icon, .navbanner, .tour__next) { box-shadow: 0 6px 16px rgba(40, 34, 22, 0.16); }
:root[data-palette="light"] .whereto__go { animation: none; }
.tag--ac { background: var(--surface); }

/* One gutter for everything that floats over the map (12px from the screen's edges, 10px
   between the floors), and one inset for what a panel holds: the edges line up on every page. */
@media (max-width: 899px) {
  .sheet { left: 12px; right: 12px; bottom: calc(var(--dock) + 10px); }
  .fab { right: 12px; }
}
.sheet__head { padding: 0 8px 8px 18px; }
.sheet__body { padding: 4px 18px 18px; }
.slider__input { margin: 0; display: block; }
.check input { margin: 0; }
/* A row of buttons fills its line: no ragged right edge. */
.actions > .btn, .actions > a.btn { flex: 1 1 0; min-width: max-content; justify-content: center; text-align: center; }
/* The power beside a station's name: wide enough for "160 kW", the same width in every row. */
.station__kw { min-width: 58px; padding: 0 7px; box-sizing: border-box; }
/* The looks to choose from: three equal boxes, each with its hairline, its sample in the middle. */
.swatch { justify-content: center; border-color: var(--line); padding: 7px 8px; }
.swatch.is-on { border-color: var(--ink); background: var(--surface); }
/* The guide's key to the signs: one sign a line, the words in one column. */
.tour__legend { grid-template-columns: 1fr; gap: 8px; }
.tour__legend li { gap: 12px; }
.tour__pin { min-width: 64px; box-sizing: border-box; }
.station { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; padding: 8px 12px; }
/* The power pill holds its number with room to spare on both sides ("160 kW" too), and every
   row's pill is the same width, so the names start on one line. */
.station { grid-template-columns: 70px minmax(0, 1fr) auto; }
.station__kw { width: 100%; min-width: 0; padding: 0 4px; font-size: 12px; letter-spacing: -0.01em; }
.station__kw > small { margin-left: 3px; font-size: 9.5px; }

/* The lanes before a turn: a row under the banner's words, the ones to be in bright. */
.navbanner { flex-wrap: wrap; }
.navbanner__lanes { flex-basis: 100%; display: flex; justify-content: center; gap: 2px; margin-top: 8px; padding: 6px 8px; border-radius: 14px; background: rgba(0, 0, 0, 0.18); }
.navbanner__lanes[hidden] { display: none; }
.navlane { opacity: 0.38; }
.navlane.is-ok { opacity: 1; }
.navlane + .navlane { border-left: 1.5px dashed rgba(255, 255, 255, 0.35); padding-left: 2px; }

/* =====================================================================================
   A computer's screen (2026-12-02, the owner on a PC): one column of 400 px on the left,
   16 px from the edges, everything in it lined up; a panel is as tall as what it holds
   (with a long one it scrolls), not a tall empty box; while driving the turn sits above the
   panel in the same column; the map takes the rest.
   ===================================================================================== */
@media (min-width: 900px) {
  :root { --col: 400px; --edge: 16px; }
  .topbar, .whereto, .routebar { left: var(--edge); width: var(--col); }
  .topbar { top: var(--edge); }
  .tabs { left: calc(var(--edge) * 2 + var(--col)); top: var(--edge); }
  .sheet, .sheet[data-view="plan"], .sheet[data-view="nearest"], .sheet[data-view="car"] {
    left: var(--edge); width: var(--col); top: 80px; bottom: auto; height: auto;
    max-height: calc(100dvh - 80px - var(--edge)); border-radius: 22px;
  }
  /* The assistant and the car list fill the column: they grow while being used. */
  .sheet[data-view="assistant"], .sheet[data-view="car"] { bottom: var(--edge); }
  .sheet__head { padding: 16px 10px 8px 20px; }
  .sheet__body { padding: 4px 20px 20px; }
  /* The chips over "Where are we going?" stay one row, fading out at the column's edge
     instead of being cut (they scroll sideways, by wheel or trackpad). */
  .whereto__chips { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); padding-right: 40px; }
  .whereto { bottom: var(--edge); }
  /* The round buttons on the map's right, clear of Leaflet's zoom. */
  .fab { right: var(--edge); bottom: 96px; }
  .leaflet-bottom.leaflet-right .leaflet-control-zoom { margin: 0 var(--edge) 28px 0; }
  /* Driving: the turn at the top of the column, the panel at its foot, the map in full. */
  .navbanner { left: var(--edge); right: auto; top: var(--edge); width: var(--col); margin: 0; }
  .is-driving .sheet[data-view="drive"] { top: auto; bottom: var(--edge); max-height: calc(100dvh - 220px); }
  .navmap__speed { left: calc(var(--edge) * 2 + var(--col)); }
}

/* The end of the menu: rows joined into one list with hairlines between them, and the credits
   in small print under it, with room below so that the last line is never cut. */
.rowgroup { display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rowgroup > .rowbtn { border: 0; border-radius: 0; background: var(--surface); }
.rowgroup > .rowbtn + .rowbtn { border-top: 1px solid var(--line); }
.rowgroup .rowbtn__action { font-size: 20px; line-height: 1; color: var(--muted); }
.menu__credits { margin: 14px 4px 6px; font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
.sheet[data-view="menu"] .sheet__body { padding-bottom: 28px; }

/* The assistant: the panel holds the conversation and the box to type in, and only the
   conversation scrolls (2026-12-03, the owner on an Android phone: the chat's fixed height was
   taller than the panel, so the panel scrolled too and the box to type in was cut off). */
.sheet[data-view="assistant"] { height: 62dvh; }
.sheet[data-view="assistant"] .sheet__body { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 12px; }
.sheet[data-view="assistant"] .chat { flex: 1; min-height: 0; height: auto; }
@media (min-width: 900px) { .sheet[data-view="assistant"] { height: auto; } }
