/* HUD v5 — layout and components from _prototipos/hud/v5-dock-agenda.html.
   Loaded last: it places the controls the modules already build (js/hud.js moves them here)
   and gives the surfaces the prototype's structure. Tokens come from ui/css/tokens.css. */

/* ── top bar: search left, quick actions right ─────────────────────────── */
.tv-topbar {
  position: fixed; z-index: 9; top: calc(12px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left)); right: calc(12px + env(safe-area-inset-right));
  display: flex; align-items: center; gap: var(--sp-2); min-width: 0; pointer-events: none;
}
.tv-topbar > * { pointer-events: auto; }
.tv-topsearch {
  position: relative; flex: 0 1 420px; min-width: 0; box-sizing: border-box;
  display: flex; align-items: center; gap: var(--sp-2); height: var(--tap); padding: 0 var(--sp-3);
  border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--raised); color: var(--fg-3);
}
.tv-topsearch > .lu { flex: none; }
.tv-topsearch .tv-search {
  flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: none; outline: none; box-shadow: none; color: var(--fg); text-align: left;
  font: var(--w-500) var(--fs-copy)/1 var(--f-ui);
}
.tv-topsearch .tv-search::placeholder { color: var(--fg-3); }
.tv-topsearch:focus-within { border-color: var(--acc-line); }
/* the open-sheet rules in points.css hid these everywhere; now only what a sheet covers hides */
body .tv-topbar-actions > .tv-settings-open { display: grid !important; }
body:not(.is-city) .tv-topbar-actions > .tv-time-quick { display: inline-flex !important; }
.tv-topbar-actions { display: flex; flex: none; gap: var(--sp-2); margin-left: auto; }
.tv-topbar-actions > * {
  position: static !important; inset: auto !important; transform: none !important; margin: 0 !important;
  box-sizing: border-box; height: var(--tap); min-width: var(--tap);
}

/* search results: a dropdown right under the box, filters on top */
.tv-topsearch .tv-results {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; max-height: min(420px, 60vh);
  overflow-x: hidden; overflow-y: auto; padding: 6px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--raised); color: var(--fg);
}
/* filter chips, shared by the search dropdown and «Ver sitios»: one scrollable row, icon + label,
   quiet until chosen (Google Maps / Citymapper pattern, square-ish corners per DESIGN.md) */
.tv-res-filters, .tv-panel .tv-chips {
  display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain;
  margin: 0; padding: 2px 2px 8px; scrollbar-width: none;
}
.tv-res-filters::-webkit-scrollbar, .tv-panel .tv-chips::-webkit-scrollbar { display: none; }
.tv-res-filter, .tv-panel .tv-chips button {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--raised); color: var(--fg-2);
  font: var(--w-500) var(--fs-label)/1 var(--f-ui); white-space: nowrap; cursor: pointer;
  position: relative; /* the 44 px touch target reaches past the 36 px chip */
}
.tv-res-filter::after, .tv-panel .tv-chips button::after { content: ""; position: absolute; inset: -4px 0; }
.tv-res-filter .lu, .tv-panel .tv-chips button .lu { color: var(--fg-3); }
.tv-res-filter:hover, .tv-panel .tv-chips button:hover { background: var(--surface); color: var(--fg); }
.tv-res-filter.is-on, .tv-panel .tv-chips button.is-on { border-color: var(--acc-line); background: var(--acc); color: var(--on-acc); }
.tv-res-filter.is-on .lu, .tv-panel .tv-chips button.is-on .lu { color: var(--on-acc); }
.tv-res-filter:focus-visible, .tv-panel .tv-chips button:focus-visible { outline: 2px solid var(--acc-line); outline-offset: 2px; }
.tv-topsearch .tv-res { gap: var(--sp-3); min-height: 52px; padding: 4px var(--sp-2); border-radius: var(--r-ctl); text-align: left; }
.tv-topsearch .tv-res:hover, .tv-topsearch .tv-res.is-active { background: var(--surface); }
.tv-res-thumb { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm); object-fit: cover; background: var(--sunk); color: var(--fg-3); }
.tv-topsearch .tv-res .tv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-label); font-weight: var(--w-500); }
.tv-topsearch .tv-res .tv-badge { flex: none; margin: 0; font-size: var(--fs-meta); color: var(--fg-3); white-space: nowrap; }
.tv-topsearch .tv-res .tv-badge.is-open { color: var(--ok); font-weight: var(--w-500); }
.tv-topsearch .tv-res-empty { margin: 0; padding: 10px var(--sp-2); color: var(--fg-3); }

/* ── bottom-right corner: zoom pair over the minimap ───────────────────── */
.tv-corner {
  position: fixed; z-index: 6; right: calc(12px + env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: flex-end; gap: var(--sp-2);
}
.tv-corner > #zoom { position: static !important; inset: auto !important; margin: 0; }
.tv-corner > .tv-minimap { position: relative !important; inset: auto !important; margin: 0; } /* its view box is absolute inside it */
.tv-corner { width: 148px; }
.tv-corner > #zoom { display: flex; gap: 6px; width: 100%; }
.tv-corner > #zoom button { flex: 1; width: auto; }
.tv-corner .tv-minimap { width: 100%; height: auto; } /* alto por aspect-ratio (minimap.js) */
.tv-dock, .tv-event-chip { bottom: calc(10px + env(safe-area-inset-bottom)); }

/* covered by an open surface (js/sheets.js measures it) */
.tv-dock, .tv-event-chip, .tv-corner, .tv-topsearch, .tv-topbar-actions > * { transition: opacity .2s var(--ease); }
.tv-covered { opacity: 0 !important; pointer-events: none !important; }

/* ── «Explora»: list drawer from the left (bottom sheet on a phone) ────── */
.tv-panel { width: var(--panel-w, 340px); }
.tv-panel.is-collapsed { display: none; }
.tv-panel:not(.is-collapsed) { animation: tv-in-left .4s var(--ease); }
.tv-panel .tv-langs { display: none; } /* language lives in Ajustes (it drives these buttons) */
.tv-panel > header { margin-bottom: var(--sp-3); }
.tv-panel h1 { font-size: var(--fs-title); }
.tv-panel .tv-min { width: var(--tap); height: var(--tap); margin-right: -8px; border: 0; background: none; color: var(--fg-2); }
.tv-panel .tv-min:hover { background: var(--surface); color: var(--fg); }
.tv-panel { top: calc(12px + env(safe-area-inset-top)); bottom: calc(12px + env(safe-area-inset-bottom)); }
.tv-panel .tv-count { margin: 0 0 var(--sp-2); font-size: var(--fs-meta); color: var(--fg-3); }
.tv-panel .tv-list { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; margin: 0 -8px; padding: 0; }
.tv-panel .tv-list li { list-style: none; }
.tv-panel .tv-list button {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-width: 0; box-sizing: border-box;
  min-height: 80px; padding: 8px; border: 0; border-radius: var(--r-ctl); background: none; text-align: left; cursor: pointer;
}
.tv-panel .tv-list button:hover { background: var(--surface); }
.tv-panel .tv-list button:focus-visible { outline: 2px solid var(--acc-line); outline-offset: -2px; }
.tv-panel .tv-list .tv-thumb {
  width: 64px; height: 64px; flex: none; display: grid; place-items: center;
  border-radius: var(--r-ctl); object-fit: cover; background: var(--sunk); color: var(--fg-3);
}
.tv-panel .tv-list .tv-row { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tv-panel .tv-list .tv-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: var(--fs-label); font-weight: var(--w-600); line-height: 1.3; color: var(--fg);
}
.tv-panel .tv-list .tv-sub { display: flex; align-items: center; gap: 4px; margin: 0; font-size: var(--fs-meta); color: var(--fg-3); }
.tv-panel .tv-list .tv-badge {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: 0;
  font-size: var(--fs-meta); font-weight: var(--w-500); color: var(--fg-2); white-space: nowrap;
}
.tv-panel .tv-list .tv-badge .lu { width: 12px; height: 12px; }
.tv-panel .tv-list .tv-badge.is-open { color: var(--ok); }

/* ── detail: back to the list, title, three tabs ───────────────────────── */
.tv-sheet:not(.is-open) { visibility: hidden; transition: transform .4s var(--ease), visibility 0s .4s; }
.tv-crumb {
  display: inline-flex; align-items: center; gap: 2px; min-height: 32px; margin: var(--sp-3) 0 0; padding: 0;
  border: 0; background: none; color: var(--fg-2); font: var(--w-500) var(--fs-meta)/1 var(--f-ui); cursor: pointer;
}
.tv-crumb:hover { color: var(--fg); }
.tv-sheet h2 { margin-top: 2px; }
.tv-tabs { display: flex; gap: 2px; margin-top: var(--sp-2); padding: 2px; border-radius: var(--r-ctl); background: var(--sunk); }
.tv-tabs button {
  flex: 1; min-height: 40px; border: 0; border-radius: var(--r-sm); background: none; color: var(--fg-2);
  font: var(--w-500) var(--fs-label)/1 var(--f-ui); cursor: pointer;
}
.tv-tabs button.is-on { background: var(--raised); color: var(--fg); }
.tv-pane { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-3); }
.tv-pane[hidden] { display: none; }
.tv-pane p { margin: 0; }
.tv-pane .tv-short, .tv-pane .tv-sched-text, .tv-story p:first-child { font-size: var(--fs-copy); line-height: 1.45; color: var(--fg-2); }
.tv-story { display: flex; flex-direction: column; gap: var(--sp-1); }
.tv-pane .tv-actions { margin: 0; }

/* ── bottom sheets (agenda, walk, settings, layers): header aligned like the prototype ── */
.tv-tour > .tv-close, .tv-settings > .tv-close, .tv-events > .tv-close { top: var(--sp-3) !important; right: var(--sp-3) !important; }
.tv-tour > h2, .tv-settings > h2, .tv-events > h2 { min-height: var(--tap); display: flex; align-items: center; margin-top: 0; padding-right: var(--tap); }
.tv-layers-pop h2 { min-height: var(--tap); display: flex; align-items: center; }
.tv-layers-close { top: var(--sp-3); right: var(--sp-3); }

@keyframes tv-in-left { from { transform: translateX(calc(-100% - 24px)); } to { transform: none; } }
@keyframes tv-in-up { from { transform: translateY(calc(100% + 24px)); } to { transform: none; } }

@media (max-width: 700px) {
  .tv-topbar { left: calc(8px + env(safe-area-inset-left)); right: calc(8px + env(safe-area-inset-right)); gap: var(--sp-1); }
  .tv-topbar-actions { gap: var(--sp-1); }
  .tv-topbar-actions .tv-time-quick span, .tv-topbar-actions .tv-view span { display: none; }
  .tv-topbar-actions .tv-time-quick, .tv-topbar-actions .tv-view { width: var(--tap); padding: 0; justify-content: center; }
  .tv-corner { right: calc(8px + env(safe-area-inset-right)); }
  .tv-corner { width: 128px; }
  .tv-corner .tv-minimap { height: auto; }
  .tv-panel { top: auto !important; left: 8px !important; right: 8px !important; bottom: 8px !important; width: auto !important; max-height: 70vh; }
  .tv-panel:not(.is-collapsed) { animation-name: tv-in-up; }
}
@media (max-width: 480px) {
  .tv-topsearch { padding: 0 var(--sp-2); gap: var(--sp-1); }
}
@media (prefers-reduced-motion: reduce) {
  .tv-panel:not(.is-collapsed) { animation: none; }
}

/* «Hoy · en 7 h encendido»: a space between the prefix and the countdown */
.tv-chip-copy { display: inline-flex; align-items: baseline; gap: .3em; min-width: 0; }

/* a phone keeps search, layers, theme and settings in the top bar; time stays in Ajustes */
@media (max-width: 480px) {
  body:not(.is-city) .tv-topbar-actions > .tv-time-quick { display: none !important; }
  .tv-event-chip .tv-chip-copy { display: none; } /* icon only, as in the prototype */
}

/* scrollbars: thin and quiet (macOS / Linear style), with the track kept off the panel's header and
   rounded corners so the thumb never runs up into the title or the photo. Chromium and Safari only:
   Firefox keeps the thin standard bar from tokens.css. */
@supports selector(::-webkit-scrollbar) {
  .tv-panel .tv-list::-webkit-scrollbar, .tv-sheet::-webkit-scrollbar, .tv-tour::-webkit-scrollbar,
  .tv-step::-webkit-scrollbar, .tv-settings::-webkit-scrollbar, .tv-layers-pop::-webkit-scrollbar,
  .tv-results::-webkit-scrollbar { width: 10px; }
  .tv-panel .tv-list::-webkit-scrollbar-thumb, .tv-sheet::-webkit-scrollbar-thumb, .tv-tour::-webkit-scrollbar-thumb,
  .tv-step::-webkit-scrollbar-thumb, .tv-settings::-webkit-scrollbar-thumb, .tv-layers-pop::-webkit-scrollbar-thumb,
  .tv-results::-webkit-scrollbar-thumb {
    min-height: 40px; border: 3px solid transparent; border-radius: 999px;
    background: var(--scroll-thumb); background-clip: padding-box;
  }
  .tv-sheet::-webkit-scrollbar-track, .tv-tour::-webkit-scrollbar-track, .tv-step::-webkit-scrollbar-track,
  .tv-settings::-webkit-scrollbar-track, .tv-layers-pop::-webkit-scrollbar-track { margin-block: 64px 16px; }
  .tv-panel .tv-list::-webkit-scrollbar-track, .tv-results::-webkit-scrollbar-track { margin-block: 8px; }
}
.tv-panel .tv-list { scrollbar-gutter: auto; }

/* bottom sheets (agenda, walk, settings): the title row stays put with its own surface, so the
   content scrolls under it instead of under a floating × */
.tv-tour > h2, .tv-settings > h2 {
  position: sticky; top: calc(-1 * var(--sp-4)); z-index: 20;
  margin: calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)) 0;
  padding: var(--sp-4) calc(var(--tap) + var(--sp-4)) var(--sp-2) var(--sp-4); max-width: none;
  background: var(--raised); border-radius: var(--r-panel) var(--r-panel) 0 0;
}
.tv-tour > .tv-close, .tv-settings > .tv-close { z-index: 21 !important; background: none !important; box-shadow: none !important; color: var(--fg-2) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.tv-tour > .tv-close:hover, .tv-settings > .tv-close:hover { background: var(--surface) !important; color: var(--fg) !important; }
/* the title only takes focus so screen readers start there: no ring on it, and the × sits on its line */
.tv-tour > h2:focus, .tv-settings > h2:focus { outline: none; }
.tv-tour > h2, .tv-settings > h2 { padding-top: var(--sp-3); padding-bottom: var(--sp-3); }
.tv-tour > .tv-close, .tv-settings > .tv-close { top: 0 !important; margin-top: calc(-1 * var(--sp-4) + var(--sp-3)) !important; }

/* ── «Paseo a medida» (Google Maps / Komoot / Citymapper): labelled form, the main action pinned
   at the bottom; with a route, a side sheet that leaves the route visible on the map ── */
.tv-tour .tv-field-label, .tv-tour .tv-from > label {
  margin: var(--sp-2) 0 0; font-size: var(--fs-meta); font-weight: var(--w-600); color: var(--fg-3);
}
.tv-tour .tv-from { display: flex; flex-direction: column; gap: var(--sp-2); }
.tv-tour .tv-start {
  appearance: none; -webkit-appearance: none; height: var(--tap); padding: 0 40px 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-ctl); color: var(--fg); cursor: pointer;
  background: var(--raised) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8985' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  font: var(--w-500) var(--fs-label)/1 var(--f-ui);
}
.tv-tour .tv-start:focus-visible { outline: 2px solid var(--acc-line); outline-offset: 2px; }
.tv-sticky-foot {
  position: sticky; bottom: calc(-1 * var(--sp-4)); z-index: 20; display: flex; align-items: center; gap: var(--sp-2);
  margin: var(--sp-2) calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)); padding: var(--sp-3) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--raised); max-width: none !important;
}
.tv-sticky-foot .tv-go {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); width: auto !important;
  min-height: var(--tap); margin: 0; border: 0; border-radius: var(--r-ctl); background: var(--acc); color: var(--on-acc);
  font: var(--w-600) var(--fs-label)/1 var(--f-ui); cursor: pointer;
}
.tv-sticky-foot .tv-go:disabled { opacity: .5; cursor: default; }
.tv-foot-icons { display: flex; gap: 4px; }
.tv-icon-btn {
  width: var(--tap) !important; height: var(--tap); flex: none; display: grid; place-items: center; padding: 0 !important;
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--raised); color: var(--fg-2);
  font-size: 0 !important; cursor: pointer;
}
.tv-icon-btn .lu, .tv-icon-btn svg { width: 20px; height: 20px; }
.tv-icon-btn:hover { background: var(--surface); color: var(--fg); }

/* result */
.tv-tour.has-result .tv-tour-head { display: flex; align-items: center; gap: var(--sp-2); margin-top: calc(-1 * var(--sp-2)); }
.tv-tour.has-result .tv-tour-head .tv-kicker {
  flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--fs-meta); color: var(--fg-3);
}
.tv-tour .tv-edit {
  flex: none; width: auto !important; min-height: 32px; margin: 0; padding: 0 10px; border: 1px solid var(--line);
  border-radius: var(--r-ctl); background: none; color: var(--fg); font: var(--w-500) var(--fs-meta)/1 var(--f-ui); cursor: pointer;
}
.tv-result { display: flex; flex-direction: column; gap: var(--sp-3); }
.tv-result .tv-summary { margin: 0; font-size: var(--fs-title); font-weight: var(--w-600); line-height: 1.25; color: var(--fg); }
.tv-result .tv-why { margin: 0; font-size: var(--fs-meta); color: var(--fg-3); }
.tv-planmodes-seg { display: flex; gap: 2px; padding: 2px; border-radius: var(--r-ctl); background: var(--sunk); }
.tv-planmodes-seg .tv-planmode {
  flex: 1; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 6px 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--fg-2); text-align: center; cursor: pointer;
}
.tv-planmodes-seg .tv-planmode.is-on { background: var(--raised); color: var(--fg); }
.tv-planmodes-seg .tv-set-ico, .tv-planmodes-seg .tv-radio { display: none; }
.tv-planmodes-seg .tv-planmode-body { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tv-planmodes-seg .tv-planmode-name { font-size: var(--fs-label); font-weight: var(--w-600); }
.tv-planmodes-seg .tv-planmode-meta { font-size: var(--fs-meta); color: var(--fg-3); font-variant-numeric: tabular-nums; }
/* stops as a timeline: number, photo, name and «time · stay» */
.tv-result .tv-story { display: flex !important; flex-direction: column; gap: 0; margin: 0 -8px; padding: 0; list-style: none; }
.tv-result .tv-story li { position: relative; display: block; width: auto; }
.tv-result .tv-story li:not(:last-child)::after {
  content: ""; position: absolute; left: 19px; top: 50px; bottom: -22px; width: 2px; border-radius: 1px; background: var(--line);
}
.tv-result .tv-story button {
  position: relative; display: flex !important; align-items: center; gap: var(--sp-3); width: 100%; min-height: 72px; height: auto;
  padding: 8px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--fg); text-align: left; cursor: pointer; overflow: visible;
}
.tv-result .tv-story button:hover { background: var(--surface); }
.tv-result .tv-story .tv-num {
  position: static !important; order: -1; flex: none; width: 24px; height: 24px; display: grid; place-items: center; margin: 0;
  border-radius: 50%; background: var(--acc); color: var(--on-acc); font: var(--w-600) 12px/1 var(--f-ui); z-index: 1;
}
.tv-result .tv-story img, .tv-result .tv-story .tv-story-ph {
  position: static !important; flex: none; width: 56px !important; height: 56px !important; margin: 0;
  border-radius: var(--r-ctl); object-fit: cover; background: var(--sunk);
}
.tv-story-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tv-result .tv-story .tv-story-name {
  position: static; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--fs-label); font-weight: var(--w-600); color: var(--fg); background: none;
}
.tv-result .tv-story .tv-badge { position: static; margin: 0; padding: 0; font-size: var(--fs-meta); color: var(--fg-3); background: none; font-variant-numeric: tabular-nums; }
@media (min-width: 701px) {
  .tv-tour.has-result {
    left: auto !important; right: calc(12px + env(safe-area-inset-right)) !important; top: 68px !important; bottom: 12px !important;
    width: 380px !important; max-height: none !important; transform: none !important; border-radius: var(--r-panel) !important; border-bottom: 1px solid var(--line) !important;
  }
}
@media (max-width: 700px) { .tv-tour.has-result { max-height: 62vh !important; } }

/* «Seguirme»: a quiet HUD control like the dock, not a blue pill */
.tv-track-go {
  background: var(--raised) !important; color: var(--fg) !important; border: 1px solid var(--line) !important;
  border-radius: var(--r-panel) !important; box-shadow: none !important; font-weight: var(--w-600);
}
.tv-track-go .lu, .tv-track-go svg { color: var(--acc-line); }

/* ── walking: the stop you are heading to, with the map still in view ── */
.tv-step {
  display: flex !important; flex-direction: column; gap: var(--sp-3); overflow-y: auto; overscroll-behavior: contain;
  padding: var(--sp-4) !important; box-sizing: border-box; transition: transform .4s var(--ease) !important;
}
.tv-step:not(.is-open) { visibility: hidden; transition: transform .4s var(--ease), visibility 0s .4s !important; }
.tv-step > * { margin: 0; max-width: none; }
.tv-step > .tv-close {
  position: sticky !important; top: calc(-1 * var(--sp-2)); z-index: 21; align-self: flex-end; flex: none;
  width: var(--tap); height: var(--tap); margin: calc(-1 * var(--sp-2)) calc(-1 * var(--sp-2)) calc(-1 * var(--tap)) 0 !important;
  display: grid; place-items: center; border: 0; border-radius: var(--r-ctl); background: none !important; color: var(--fg-2);
  box-shadow: none !important; backdrop-filter: none !important;
}
.tv-step > .tv-close:hover { background: var(--surface) !important; color: var(--fg); }
.tv-step > .tv-kicker { padding-right: var(--tap); font-size: var(--fs-meta); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.tv-step .tv-step-dots { display: flex; gap: 4px; }
.tv-step .tv-step-dots span { flex: 1; height: 4px; border-radius: 2px; background: var(--sunk); }
.tv-step .tv-step-dots span.is-done { background: color-mix(in srgb, var(--acc-line) 55%, transparent); }
.tv-step .tv-step-dots span.is-on { background: var(--acc-line); }
.tv-step > h2 { font-size: var(--fs-title); font-weight: var(--w-600); line-height: 1.25; color: var(--fg); }
.tv-step > h2:focus { outline: none; }
.tv-step .tv-step-leg { display: flex; align-items: center; gap: 6px; font-size: var(--fs-label); color: var(--fg-2); }
.tv-step .tv-step-leg .lu { color: var(--acc-line); flex: none; }
.tv-step .tv-step-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-ctl); background: var(--sunk); display: block; }
.tv-step .tv-short { font-size: var(--fs-copy); line-height: 1.5; color: var(--fg); }
.tv-step-story { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-ctl); background: var(--surface); }
.tv-step-story p { margin: 0; font-size: var(--fs-label); line-height: 1.55; color: var(--fg-2); }
.tv-step-story .tv-field-label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-meta); font-weight: var(--w-600); color: var(--fg-3); }
.tv-step-story .tv-field-label .lu { color: var(--acc-line); }
.tv-step-story .tv-note { font-size: var(--fs-meta); color: var(--fg-3); }
/* the whole route, folded: one tap to see it or to jump to a stop */
.tv-step-route { border-top: 1px solid var(--line); }
.tv-step-route summary {
  display: flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); list-style: none; cursor: pointer;
  font-size: var(--fs-label); font-weight: var(--w-500); color: var(--fg-2);
}
.tv-step-route summary::-webkit-details-marker { display: none; }
.tv-step-route summary::after { content: "›"; margin-left: auto; font-size: 18px; transition: transform .2s var(--ease); }
.tv-step-route[open] summary::after { transform: rotate(90deg); }
.tv-step-route ol { margin: 0 -8px; padding: 0; list-style: none; }
.tv-step-route button {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: var(--tap); padding: 4px 8px;
  border: 0; border-radius: var(--r-ctl); background: none; color: var(--fg); text-align: left; cursor: pointer;
}
.tv-step-route button:hover, .tv-step-route button.is-on { background: var(--surface); }
.tv-step-route button.is-done { color: var(--fg-3); }
.tv-step-route .tv-num {
  position: static; flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  background: var(--sunk); color: var(--fg-2); font: var(--w-600) 11px/1 var(--f-ui);
}
.tv-step-route button.is-on .tv-num { background: var(--acc); color: var(--on-acc); }
.tv-step-route .tv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-label); }
.tv-step-route .tv-badge { flex: none; margin: 0; font-size: var(--fs-meta); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.tv-step .tv-sticky-foot { margin-top: auto; flex-direction: column; align-items: stretch; gap: var(--sp-2); }
.tv-step-next-stop { margin: 0; font-size: var(--fs-meta); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-step-nav-row { display: flex; gap: var(--sp-2); }
.tv-step-nav {
  flex: 1 1 0; min-width: 0; min-height: var(--tap); display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 0 var(--sp-3); border: 0; border-radius: var(--r-ctl); font: var(--w-600) var(--fs-label)/1 var(--f-ui); cursor: pointer;
}
.tv-step-nav .lu, .tv-step-nav svg { width: 18px; height: 18px; flex: none; }
.tv-step-nav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-step-prev { border: 1px solid var(--line); background: var(--raised); color: var(--fg); }
.tv-step-prev:hover:not(:disabled) { background: var(--surface); }
.tv-step-prev:disabled { opacity: .4; cursor: default; }
.tv-step-next { border: 1px solid var(--acc); background: var(--acc); color: var(--on-acc); }
.tv-step-nav:focus-visible { outline: 2px solid var(--acc-line); outline-offset: 2px; }

/* ── contenido editorial (stories.json): cuerpo, «¿Sabías que…?» y filas con icono ── */
.tv-story-body { margin: 0; font-size: var(--fs-label); line-height: 1.55; color: var(--fg); white-space: pre-line; }
.tv-fact {
  display: flex; flex-direction: column; gap: var(--sp-1); margin: 0;
  padding: var(--sp-3); border: 1px solid var(--acc-line); border-radius: var(--r-ctl); background: var(--accent-1);
}
.tv-fact-label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-meta); font-weight: var(--w-600); color: var(--accent-6); }
.tv-fact-label .lu { color: var(--accent-5); }
.tv-fact-text { margin: 0; font-size: var(--fs-label); line-height: 1.5; color: var(--fg); }
.tv-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.tv-facts li { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0; font-size: var(--fs-label); line-height: 1.45; color: var(--fg); }
.tv-facts li .lu { flex: none; margin-top: 1px; color: var(--fg-3); }

/* ROUTE-01: el marcador del lugar se oculta bajo el número de parada de la ruta */
.tv-marker.is-route-hidden, .tv-marker.is-route-near { display: none !important; } /* OSD writes display inline */
@media (min-width: 701px) {
  .tv-step {
    left: auto !important; right: calc(12px + env(safe-area-inset-right)) !important; top: 68px !important; bottom: 12px !important;
    width: 400px !important; max-height: none !important; transform: translateX(calc(100% + 24px)) !important;
  }
  .tv-step.is-open { transform: none !important; }
}
@media (max-width: 700px) {
  .tv-step {
    left: 8px !important; right: 8px !important; top: auto !important; bottom: 8px !important; width: auto !important;
    max-height: 48vh !important; transform: translateY(calc(100% + 24px)) !important;
  }
  .tv-step.is-open { transform: none !important; }
  .tv-step .tv-step-photo { aspect-ratio: 16 / 9; } /* la foto sí se ve en el móvil, baja y no muy alta */
}

/* gold surfaces carry dark text and icons (WCAG AA), whatever the panel's inherited colour */
.tv-step .tv-step-next, .tv-step .tv-step-next *, .tv-sticky-foot .tv-go, .tv-sticky-foot .tv-go * { color: var(--on-acc) !important; }

/* the card scrolls: its blocks keep their size instead of shrinking (the photo collapsed to 0 px) */
.tv-step > * { flex-shrink: 0; }

/* ── ROUTE-02: route stops, numbered drops anchored at the place ─────────────────────────────
   Same drop as .tv-marker, a size up so the number reads. Heading to: ink drop with a gold number.
   Already seen: stepped-back grey. Never colour alone: the current one is also bigger. */
.tv-stop-pin { width: 30px; height: 37px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; display: block; transform-origin: 50% 100%; transition: transform .25s var(--ease); }
.tv-stop-pin .tv-pin-shape { position: absolute; inset: 0; width: 30px; height: 37px; fill: var(--pin-fill); }
.tv-stop-num { position: absolute; left: 0; right: 0; top: 7px; text-align: center; font: 600 13px/15px var(--f-ui); font-variant-numeric: tabular-nums; color: var(--pin-ink); letter-spacing: -.02em; }
.tv-stop-pin.is-multi .tv-stop-num { font-size: 11px; letter-spacing: -.04em; }
.tv-stop-pin:hover { transform: scale(1.12); }
.tv-stop-pin.is-current { transform: scale(1.22); z-index: 3; }
.tv-stop-pin.is-current .tv-pin-shape { fill: #1b1f2c; }
.tv-stop-pin.is-current .tv-stop-num { color: #f4cd80; }
.tv-stop-pin.is-done .tv-pin-shape { fill: #3f7a4c; } /* TOUR-05: visited, in the state green */
.tv-stop-pin.is-done .tv-stop-num { color: #fff; }
.tv-stop-pin:focus-visible { outline: 2px solid var(--acc-line); outline-offset: 2px; border-radius: 6px; }

/* ROUTE-03: while the walk card is open, «Seguirme» lives inside it */
body.is-walking .tv-track-go, body.is-walking .tv-track.is-following { display: none !important; }
.tv-step-follow { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); width: 100%; min-height: var(--tap); margin-bottom: var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--fg); font: var(--w-500) var(--fs-label)/1 var(--f-ui); cursor: pointer; }
.tv-step-follow .lu, .tv-step-follow svg { color: var(--acc-line); }
.tv-step-follow[aria-pressed="true"] { background: none; color: var(--fg-2); }
.tv-step-follow[aria-pressed="true"] .lu, .tv-step-follow[aria-pressed="true"] svg { color: var(--fg-2); }
.tv-step .tv-step-leg.is-live { color: var(--fg); font-weight: var(--w-600); font-variant-numeric: tabular-nums; }

/* OFFLINE-01: guardar el mapa (Ajustes) */
.tv-offline { flex-wrap: wrap; }
.tv-offline .tv-offline-state { flex: 1 1 12rem; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.tv-offline .tv-btn { margin-left: auto; }
.tv-offline-bar { flex: 1 1 100%; height: 4px; border-radius: 2px; background: var(--sunk); overflow: hidden; }
.tv-offline-bar span { display: block; height: 100%; background: var(--acc-line); transition: width .3s linear; }

/* the gold action stays gold on hover (the generic .tv-plan-start hover turned it dark under dark text) */
.tv-sticky-foot .tv-go:hover:not(:disabled) { background: color-mix(in srgb, var(--acc) 82%, #fff); }

/* A11Y-01: «Saltar a la búsqueda», visible solo con el foco */
.tv-skip { position: fixed; z-index: 100; left: 12px; top: 12px; min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 var(--sp-4); border-radius: var(--r-ctl); background: var(--acc); color: var(--on-acc); font: var(--w-600) var(--fs-label)/1 var(--f-ui); text-decoration: none; transform: translateY(-200%); }
.tv-skip:focus { transform: none; outline: 2px solid var(--fg); outline-offset: 2px; }

/* ── SEARCH-02: results as cards (nothing cut), full width on a phone ───────────────────── */
.tv-topsearch .tv-results { max-height: min(560px, calc(100dvh - 96px)); padding: 8px; }
.tv-topsearch .tv-res { align-items: center; gap: var(--sp-3); min-height: 64px; padding: 6px var(--sp-2); }
.tv-res-thumb { width: 56px; height: 56px; border-radius: var(--r-ctl); }
.tv-res-ico { color: var(--acc-line); }
.tv-res-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.tv-topsearch .tv-res .tv-name {
  white-space: normal; overflow: hidden; text-overflow: clip; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  font-size: var(--fs-copy); font-weight: var(--w-500); line-height: 1.25; color: var(--fg); overflow-wrap: anywhere;
}
.tv-res-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: var(--fs-meta); line-height: 1.35; color: var(--fg-3); }
.tv-res-kind, .tv-res-state { display: inline-flex; align-items: center; gap: 4px; }
.tv-res-state.is-open { color: var(--ok); font-weight: var(--w-500); }
.tv-res-sub { color: var(--fg-3); overflow-wrap: anywhere; }
.tv-res-head { margin: var(--sp-3) var(--sp-2) 4px; }
.tv-res-credit { margin: 4px var(--sp-2) 2px; font-size: var(--fs-meta); color: var(--fg-3); }
@media (max-width: 700px) {
  /* the box is narrower than the screen (the quick actions sit beside it): the list takes the width */
  .tv-topsearch .tv-results { position: fixed; left: calc(8px + env(safe-area-inset-left)); right: calc(8px + env(safe-area-inset-right)); top: calc(62px + env(safe-area-inset-top)); max-height: calc(100dvh - 150px); }
}

/* chips that scroll sideways say so: an edge fade with a quiet chevron on each side that has more */
.tv-scroll-hint { position: relative; }
.tv-scroll-hint::before, .tv-scroll-hint::after { content: ""; position: absolute; top: 0; bottom: 8px; width: 48px; pointer-events: none; opacity: 0; transition: opacity .2s var(--ease); z-index: 1; }
.tv-scroll-hint::before { left: 0; background: linear-gradient(270deg, transparent, var(--raised) 75%); }
.tv-scroll-hint::after { right: 0; background: linear-gradient(90deg, transparent, var(--raised) 75%); }
.tv-scroll-hint.can-left::before, .tv-scroll-hint.can-right::after { opacity: 1; }
.tv-scroll-more { position: absolute; z-index: 2; top: 2px; width: 24px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--fg-2); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), color .15s var(--ease); }
.tv-scroll-more.is-left { left: 0; }
.tv-scroll-more.is-right { right: 0; }
.tv-scroll-hint.can-left .tv-scroll-more.is-left, .tv-scroll-hint.can-right .tv-scroll-more.is-right { opacity: 1; pointer-events: auto; }
.tv-scroll-more::after { content: ""; position: absolute; inset: -4px -10px; } /* 44 px to tap, 24 px to see */
.tv-scroll-more:hover { color: var(--fg); }

/* a searched address on the drawn map: a pin with its name */
.tv-addr-pin { display: flex; flex-direction: column; align-items: center; color: var(--acc-line); pointer-events: none; }
.tv-addr-pin svg { width: 32px; height: 32px; fill: var(--raised); stroke-width: 2; }
.tv-addr-label { display: grid; gap: 1px; max-width: 220px; margin-bottom: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--raised); color: var(--fg); font: var(--w-500) var(--fs-label)/1.3 var(--f-ui); text-align: center; }
.tv-addr-label small { font-size: var(--fs-meta); color: var(--fg-3); font-weight: var(--w-400); }

/* SEARCH-02: «Salgo desde una calle», with its own suggestions under the box */
.tv-street-wrap { position: relative; display: grid; gap: 6px; }
.tv-street-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tv-street-list:empty { display: none; }
.tv-street-list > li.tv-note { padding: 8px 10px; color: var(--fg-3); }
.tv-street-opt { width: 100%; display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 6px 10px; border: 0; border-radius: var(--r-ctl); background: var(--surface); color: var(--fg); text-align: left; cursor: pointer; font: var(--w-400) var(--fs-label)/1.3 var(--f-ui); }
.tv-street-opt:hover, .tv-street-opt:focus-visible { background: var(--sunk); outline: none; }
.tv-street-opt .lu, .tv-street-opt svg { flex: none; color: var(--acc-line); }
.tv-street-opt span { display: grid; min-width: 0; }
.tv-street-opt strong { font-weight: var(--w-500); overflow-wrap: anywhere; }
.tv-street-opt small { font-size: var(--fs-meta); color: var(--fg-3); }

/* ── UI-08: Ajustes — one group per setting (title, then the control at full width) ───── */
body .tv-theme { display: none !important; } /* the theme is a setting, not a quick action */
.tv-settings { width: 360px; max-height: calc(100dvh - 80px); overflow-y: auto; gap: 0 !important; }
.tv-set-group { display: grid; gap: var(--sp-2); padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.tv-set-grid { display: contents; } /* mobile/default: the groups stack as if there were no wrapper */
/* the sticky header's own box overlaps ~26px into whatever comes right after it (it bleeds to the
   panel's edges with a negative margin, then shifts again as a sticky offset) — clear it instead
   of letting the first row's title hide underneath */
.tv-set-grid > .tv-set-group:first-child { border-top: 0; padding-top: 0; margin-top: var(--sp-6); }
.tv-settings .tv-set-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--fs-label); font-weight: var(--w-600); color: var(--fg); }
.tv-settings .tv-set-title .lu, .tv-settings .tv-set-title svg { color: var(--acc-line); flex: none; }
.tv-settings .tv-seg { display: grid; grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 2px; width: 100%; max-width: none; box-sizing: border-box; justify-content: stretch; }
.tv-settings .tv-seg button { min-height: var(--tap); padding: 0 10px; white-space: nowrap; }
.tv-settings > .tv-btn { width: 100%; justify-content: center; margin-top: var(--sp-3); min-height: var(--tap); }
.tv-offline { display: grid; gap: var(--sp-2); }
.tv-offline .tv-offline-state { margin: 0; font-size: var(--fs-label); color: var(--fg-2); }
.tv-offline .tv-btn { justify-self: start; margin: 0; min-height: var(--tap); }
@media (max-width: 700px) {
  .tv-settings { width: auto; max-height: calc(100dvh - 72px - env(safe-area-inset-top)) !important; }
  .tv-settings .tv-seg { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); }
  .tv-offline .tv-btn { justify-self: stretch; justify-content: center; }
}
.tv-settings .tv-seg.tv-seg-4 { grid-template-columns: 1fr 1fr; }
/* UI-09: wider panel, two columns of settings groups once there's room for them */
@media (min-width: 701px) {
  .tv-settings { width: 760px; }
  .tv-set-grid { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: var(--sp-4); }
  .tv-set-grid > .tv-set-group:nth-child(-n+3) { border-top: 0; padding-top: 0; margin-top: var(--sp-6); }
}

/* ── MAP3D-01: «Vista ciudad» en 3D (city3d.js, MapLibre) ─────────────────────────────── */
.tv-city3d { background: #10121a; }
.tv-route-me { width: 16px; height: 16px; border-radius: 50%; background: #3d8bff; border: 3px solid #fff; box-sizing: border-box; }
.tv-route-me.is-live { width: 20px; height: 20px; }
.tv-marker-3d { width: 26px; height: 32px; }
.tv-city3d .maplibregl-ctrl-group { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: none; overflow: hidden; }
.tv-city3d .maplibregl-ctrl-group button { width: var(--tap); height: var(--tap); }
.tv-city3d .maplibregl-ctrl-group button + button { border-top: 1px solid var(--line); }
.tv-city3d .maplibregl-ctrl-icon { filter: var(--ctrl-icon-filter, none); }
html[data-theme="dark"] .tv-city3d .maplibregl-ctrl-icon { filter: invert(1) brightness(1.4); }
.tv-city3d .maplibregl-ctrl-bottom-right { bottom: calc(76px + env(safe-area-inset-bottom)); right: calc(4px + env(safe-area-inset-right)); }
.tv-city3d .maplibregl-ctrl-attrib { font: 11px/1.4 var(--f-ui); }
.tv-city3d .maplibregl-popup-content { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--raised); color: var(--fg); font: var(--fs-label)/1.4 var(--f-ui); box-shadow: none; }
.tv-city3d .maplibregl-popup-tip { border-top-color: var(--raised) !important; border-bottom-color: var(--raised) !important; }
.tv-city3d .maplibregl-popup-close-button { width: 32px; height: 32px; font-size: 20px; color: var(--fg-2); }
.tv-city3d .maplibregl-popup-content a { color: var(--acc-line); }
body.is-city .tv-corner { display: none; } /* the minimap and zoom belong to the drawn map */
.tv-city3d .maplibregl-ctrl-bottom-right { bottom: calc(10px + env(safe-area-inset-bottom)); }
.tv-focus-pin { color: #1b1f2c; }
.tv-focus-pin svg { width: 36px; height: 36px; fill: #f4cd80; stroke-width: 1.6; }
@media (max-width: 700px) { .tv-city3d .maplibregl-ctrl-bottom-right { bottom: calc(72px + env(safe-area-inset-bottom)); } }

/* UI-08: on a narrow phone the centred dock touched the minimap (overlapped 20 px at 360 px):
   it sits next to the «Hoy» chip instead, with air on both sides */
@media (max-width: 520px) {
  .tv-dock { left: calc(60px + env(safe-area-inset-left)); transform: none; }
}

/* CAM-01: a traffic camera's live picture, in a card (bottom sheet on a phone) */
.tv-cam { display: none; position: fixed; z-index: 12; right: calc(12px + env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(460px, calc(100vw - 24px)); box-sizing: border-box; padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--raised); color: var(--fg); font: var(--fs-label)/1.4 var(--f-ui); }
.tv-cam.is-open { display: grid; gap: var(--sp-2); }
.tv-cam > h2 { margin: 0; padding-right: var(--tap); font-size: var(--fs-title); font-weight: var(--w-600); }
.tv-cam > .tv-close { position: absolute; top: 8px; right: 8px; width: var(--tap); height: var(--tap); display: grid; place-items: center; border: 0; border-radius: var(--r-ctl); background: none; color: var(--fg-2); cursor: pointer; }
.tv-cam > .tv-close:hover { background: var(--surface); color: var(--fg); }
.tv-cam-frame { aspect-ratio: 16 / 9; border-radius: var(--r-ctl); overflow: hidden; background: var(--sunk); }
.tv-cam-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tv-cam.is-broken .tv-cam-img { visibility: hidden; }
.tv-cam-state { margin: 0; color: var(--fg-2); }
.tv-cam-credit { margin: 0; font-size: var(--fs-meta); color: var(--fg-3); }
@media (max-width: 700px) { .tv-cam { left: 8px; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom)); } }

/* TRAFFIC-01: live traffic on the drawn map, one colour per state (colour carries state only) */
.tv-traffic { pointer-events: none; overflow: visible; }
.tv-traffic polyline { fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.tv-traffic .is-ok { stroke: #3f9d55; }
.tv-traffic .is-normal { stroke: #c9b03a; }
.tv-traffic .is-slow { stroke: #e08a2c; }
.tv-traffic .is-jam { stroke: #d4402b; stroke-width: 12; }

/* TRAFFIC-01: live traffic in «cómo llegar» */
.tv-traffic-now, .tv-traffic-route .tv-note { display: flex; align-items: flex-start; gap: 6px; margin: var(--sp-2) 0 0; }
.tv-traffic-now .lu, .tv-traffic-now svg, .tv-traffic-route .lu, .tv-traffic-route svg { flex: none; margin-top: 1px; color: var(--ok); }
.tv-traffic-now.is-slow .lu, .tv-traffic-now.is-slow svg, .tv-traffic-route .is-slow .lu, .tv-traffic-route .is-slow svg { color: var(--warning); }
.tv-city3d.is-far .tv-park { display: none; }

/* PLANNER-02: wheel pickers (three rows in view, the middle one is the choice) */
.tv-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.tv-picker-field { display: grid; gap: 6px; min-width: 0; }
.tv-picker { position: relative; height: 120px; border-radius: var(--r-ctl); background: var(--sunk); overflow: hidden; outline: none; }
.tv-picker::before { content: ""; position: absolute; left: 6px; right: 6px; top: 40px; height: 40px; border-radius: var(--r-sm); background: var(--raised); pointer-events: none; }
.tv-picker:focus-within { outline: 2px solid var(--acc-line); outline-offset: 2px; }
.tv-picker-list:focus-visible { outline: none; }
.tv-picker-list { position: relative; height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; padding: 40px 0; box-sizing: border-box; }
.tv-picker-list::-webkit-scrollbar { display: none; }
.tv-picker-item { height: 40px; display: grid; place-items: center; scroll-snap-align: center; font: var(--w-500) var(--fs-copy)/1 var(--f-ui); color: var(--fg-3); font-variant-numeric: tabular-nums; cursor: pointer; user-select: none; transition: color .15s var(--ease); }
.tv-picker-item.is-on { color: var(--fg); font-weight: var(--w-600); }
.tv-when-hint { margin: var(--sp-2) 0 0; font-size: var(--fs-meta); color: var(--fg-3); }

/* LOC-01: approximate location, with a way out */
.tv-accuracy { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-ctl); background: var(--surface); }
.tv-accuracy .tv-note { display: flex; gap: 6px; align-items: flex-start; margin: 0; }
.tv-accuracy .tv-note svg { flex: none; color: var(--warning); margin-top: 1px; }
.tv-accuracy .tv-btn { justify-self: start; }
.tv-picker-list { cursor: grab; }
.tv-picker-list:active { cursor: grabbing; }

/* GEO-02: the stretch of a walk hidden behind buildings: gold dots with a dark rim, the way goes on */
.tv-route .tv-route-hidden, .tv-route .tv-route-hidden-casing { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0.1 16; }
.tv-route .tv-route-hidden-casing { stroke: #1b1f2c; stroke-width: 13; }
.tv-route .tv-route-hidden { stroke: #f4cd80; stroke-width: 8; }
