:root {
  --brand: #242C4F;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --text: #0A0C10;
  --text2: #5B6472;
  --line: #E7E9E6;
  --onTime: #167A59;
  --minor: #A16207;
  --major: #EF4444;
  --shadow: 0 1px 0 rgba(16,24,40,.035);
  --maxw: 480px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html, body {
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: clip;
}
body {
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  background: #f3f3f0;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#app {
  width: 100%;
  max-width: var(--maxw);
  min-width: 0;
  margin: 0 auto;
  height: 100dvh;
  min-height: 100dvh;
  overflow-x: clip;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(16,24,40,.10);
  position: relative;
}

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px calc(10px);
  padding-top: max(14px, env(safe-area-inset-top));
  background: var(--bg);
  border-bottom: 1px solid transparent;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 34px; height: 27px; display: block; object-fit: contain;
}
.brand-name { font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
h1.brand-name { margin: 0; }
.brand-tag {
  font-size: 11px; font-weight: 700; color: var(--text2);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; position: relative; top: -2px;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .brand-tag,
  .install-guide { display: none; }
}
.topbar-spacer { flex: 1; }
.noscript-guide {
  width: min(100% - 32px, var(--maxw));
  margin: 24px auto;
  padding: 20px;
  border-radius: 16px;
  background: var(--surface);
}
.noscript-guide h2 { margin: 0 0 8px; }
.noscript-guide p { margin: 0; color: var(--text2); }
.transport-search-btn, .route-planner-btn {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 10px; color: var(--brand); background: transparent; cursor: pointer;
}
.transport-search-btn:hover, .transport-search-btn:focus-visible,
.route-planner-btn:hover, .route-planner-btn:focus-visible { outline: none; background: rgba(36,44,79,.08); }
.transport-search-btn svg, .route-planner-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.iconbtn {
  border: none; background: rgba(0,0,0,.05); color: var(--text);
  width: 34px; height: 34px; border-radius: 999px; font-size: 24px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
}
.settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  color: var(--brand);
  background: rgba(36,44,79,.09);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.settings-btn:focus-visible, .nearby-scope:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 3px; }
.hidden { display: none !important; }

/* Sugerencia local dentro del encabezado, sin geolocalización. */
.argentina-language-suggestion {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 32px;
  padding: 3px 4px 3px 9px;
  color: var(--brand);
  background: #fff;
  border: 1px solid rgba(36,44,79,.16);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(16,24,40,.12);
}
.argentina-language-suggestion-change,
.argentina-language-suggestion-dismiss {
  min-width: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.argentina-language-suggestion-change {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 5px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}
.argentina-language-suggestion-short { display: none; }
.argentina-flag {
  position: relative;
  display: inline-block;
  flex: 0 0 21px;
  width: 21px;
  height: 14px;
  overflow: hidden;
  background: linear-gradient(to bottom, #75aadb 0 33.33%, #fff 33.33% 66.66%, #75aadb 66.66%);
  border: 1px solid rgba(36,44,79,.18);
  border-radius: 2px;
  box-shadow: 0 1px 1px rgba(16,24,40,.08);
}
.argentina-flag::after {
  position: absolute;
  top: 4px;
  left: 8px;
  width: 3px;
  height: 3px;
  content: '';
  background: #e7b834;
  border-radius: 50%;
}
.argentina-language-suggestion-dismiss {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  font-size: 19px;
  line-height: 1;
}
.argentina-language-suggestion-change:focus-visible,
.argentina-language-suggestion-dismiss:focus-visible {
  outline: 3px solid rgba(36,44,79,.42);
  outline-offset: 2px;
}
@media (max-width: 460px) {
  .argentina-language-suggestion { padding-left: 4px; }
  .argentina-language-suggestion-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .argentina-language-suggestion-short {
    display: inline;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
  }
}
/* Búsqueda directa: se abre sólo desde la lupa. */
.transport-search-dialog {
  width: min(100%, var(--maxw)); max-width: var(--maxw); height: 100dvh; max-height: 100dvh;
  margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 14px 24px; overflow: hidden;
  color: var(--text); background: var(--bg); border: 0; box-shadow: 0 0 40px rgba(16,24,40,.16);
}
.transport-search-dialog::backdrop { background: rgba(16,24,40,.25); }
.transport-search-head { display: flex; align-items: center; gap: 8px; }
.transport-search-close { width: 30px; height: 40px; padding: 0; border: 0; color: var(--brand); background: transparent; font: 32px/1 Georgia, serif; cursor: pointer; }
.transport-search-field { display: flex; flex: 1; align-items: center; min-width: 0; min-height: 50px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.transport-search-field svg { width: 17px; height: 17px; flex: 0 0 auto; margin-right: 10px; fill: none; stroke: var(--brand); stroke-linecap: round; stroke-width: 2; }
.transport-search-input { width: 100%; min-width: 0; padding: 10px 0; border: 0; outline: 0; color: var(--text); background: transparent; font: inherit; font-size: 16px; font-weight: 700; }
.transport-search-input::placeholder { color: #8c97a7; font-weight: 500; }
.transport-search-input::-webkit-search-cancel-button { display: none; }
.transport-search-clear { width: 25px; height: 25px; padding: 0; border: 0; border-radius: 50%; color: #8c98a8; background: #eef1f5; font-size: 18px; line-height: 1; cursor: pointer; }
.transport-search-results { display: grid; gap: 4px; margin-top: 16px; overflow-y: auto; max-height: calc(100dvh - 102px); }
.transport-search-result { display: grid; grid-template-columns: 39px minmax(0,1fr) 16px; align-items: center; gap: 12px; min-height: 65px; padding: 9px 8px; border: 1px solid transparent; border-radius: 15px; color: var(--text); background: transparent; text-align: left; font: inherit; cursor: pointer; }
.transport-search-result:hover, .transport-search-result:focus-visible { border-color: var(--line); background: var(--surface); outline: none; }
.transport-search-badge { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; color: #fff; font-size: 15px; font-weight: 900; }
.transport-search-badge svg { width: 22px; height: 22px; fill: currentColor; }
.transport-search-copy { min-width: 0; }
.transport-search-title, .transport-search-sub { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.transport-search-title { font-size: 15px; font-weight: 800; }
.transport-search-sub { margin-top: 3px; color: var(--text2); font-size: 12px; font-weight: 600; }
.transport-search-arrow { color: #a5b0be; font-size: 19px; }
.transport-search-empty { padding: 10px 3px; color: var(--text2); font-size: 14px; font-weight: 600; }

/* Main scroll area */
#view {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 14px 90px;
}

/* Aviso anticipado: contextual, descartable y fuera del flujo principal. */
.subte-advisory-host {
  flex: 0 0 auto;
  padding: 2px 14px 8px;
  background: var(--bg);
}
.subte-advisory-host[hidden] { display: none; }
.subte-advisory {
  --subte-advisory-line: var(--brand);
  --subte-advisory-ink: #fff;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 28px;
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 11px 9px 11px 11px;
  overflow: hidden;
  background: #fff;
  background: linear-gradient(105deg, color-mix(in srgb, var(--subte-advisory-line) 10%, #fff), #fff 58%);
  border: 1px solid var(--line);
  border: 1px solid color-mix(in srgb, var(--subte-advisory-line) 28%, var(--line));
  border-radius: 15px;
  box-shadow: 0 7px 22px rgba(16,24,40,.07);
}
.subte-advisory-badge {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--subte-advisory-ink);
  background: var(--subte-advisory-line);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.subte-advisory-body { min-width: 0; }
.subte-advisory-kicker,
.subte-advisory-message,
.subte-advisory-duration { margin: 0; }
.subte-advisory-kicker {
  color: var(--text);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .09em;
  line-height: 1.2;
}
.subte-advisory-message {
  margin-top: 3px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}
.subte-advisory-duration {
  margin-top: 2px;
  color: var(--text2);
  font-size: 11px;
  line-height: 1.35;
}
.subte-advisory-source {
  display: inline-block;
  margin-top: 5px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  text-underline-offset: 2px;
}
.subte-advisory-close {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  color: var(--text2);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font: 20px/1 system-ui, sans-serif;
  cursor: pointer;
}
.subte-advisory-close:hover { background: rgba(36,44,79,.08); }
.subte-advisory-source:focus-visible,
.subte-advisory-close:focus-visible {
  outline: 3px solid rgba(36,44,79,.42);
  outline-offset: 2px;
}

/* Banda compacta: varios modos, una sola mirada. */
.mode-filter-panel {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(36,44,79,.12);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(16,24,40,.05);
}
.mode-filter-heading { display: none; }
.mode-filter-kicker {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mode-filter-summary {
  min-width: 0;
  overflow: hidden;
  color: var(--text2);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0; }
.chip {
  min-width: 0;
  min-height: 50px;
  padding: 6px 2px 5px;
  color: #697383;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}
.chip.active {
  color: var(--brand);
  background: var(--surface);
  border-color: rgba(36,44,79,.13);
  box-shadow: 0 2px 9px rgba(16,24,40,.09);
}
.chip:hover { color: var(--brand); background: rgba(255,255,255,.68); }
.chip:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 2px; }
.chip-icon { display: grid; width: 18px; height: 18px; place-items: center; }
.chip-icon svg { width: 18px; height: 18px; fill: currentColor; }
.nearby-quick-filter-wrap { margin-top: 8px; }
.nearby-quick-filter {
  display: grid;
  min-height: 38px;
  grid-template-columns: 17px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 11px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(36,44,79,.13);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16,24,40,.06);
}
.nearby-quick-filter:focus-within {
  border-color: rgba(36,44,79,.46);
  box-shadow: 0 0 0 3px rgba(36,44,79,.10);
}
.nearby-quick-filter-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #697383;
  stroke-linecap: round;
  stroke-width: 2;
}
.nearby-quick-filter-input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
}
.nearby-quick-filter-input::placeholder { color: #7d8796; font-weight: 550; }
.nearby-quick-filter-input::-webkit-search-cancel-button { display: none; }
.nearby-quick-filter-clear {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0 0 2px;
  color: #697383;
  background: rgba(36,44,79,.07);
  border: 0;
  border-radius: 50%;
  font: 18px/1 Arial, sans-serif;
  cursor: pointer;
}
.nearby-quick-filter-clear[hidden] { display: none; }
.nearby-quick-filter-clear:focus-visible { outline: 3px solid rgba(36,44,79,.30); outline-offset: 1px; }
.nearby-quick-filter-empty {
  margin-top: 10px;
  padding: 20px 12px;
  color: var(--text2);
  background: rgba(255,255,255,.54);
  border: 1px dashed rgba(36,44,79,.18);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}
.nearby-quick-filter-empty[hidden] { display: none; }
.bus-line-filter-trigger {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 15px;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  color: var(--brand);
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(36,44,79,.14);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}
.bus-line-filter-trigger:hover { background: #fff; }
.bus-line-filter-trigger:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 2px; }
.bus-line-filter-icon, .bus-line-filter-icon svg { width: 20px; height: 20px; fill: currentColor; }
.bus-line-filter-icon { display: grid; place-items: center; }
.bus-line-filter-chevron { color: var(--text2); font-size: 18px; text-align: right; transform: translateY(-2px); }
.bus-line-dialog {
  width: min(100%, 520px);
  max-width: 520px;
  max-height: 82dvh;
  margin: auto auto 0;
  padding: 0;
  overflow: visible;
  color: var(--text);
  background: transparent;
  border: 0;
}
.bus-line-dialog::backdrop { background: rgba(10,12,16,.54); backdrop-filter: blur(3px); }
.bus-line-sheet {
  display: flex;
  max-height: 82dvh;
  flex-direction: column;
  padding: 18px 16px max(16px, env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -16px 50px rgba(10,12,16,.22);
}
.bus-line-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.bus-line-dialog-kicker { color: var(--text2); font-size: 10px; font-weight: 900; letter-spacing: .11em; }
.bus-line-dialog h2 { margin: 2px 0 14px; font-size: 24px; letter-spacing: -.04em; }
.bus-line-dialog-close {
  display: grid; width: 34px; height: 34px; place-items: center; padding: 0;
  color: var(--text2); background: rgba(36,44,79,.07); border: 0; border-radius: 50%;
  font: 23px/1 Georgia, serif; cursor: pointer;
}
.bus-line-search {
  width: 100%; min-height: 46px; padding: 10px 13px;
  color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); font: inherit; font-size: 16px; font-weight: 750;
}
.bus-line-search:focus { border-color: var(--brand); outline: 3px solid rgba(36,44,79,.18); }
.bus-line-dialog-status { margin: 9px 2px 7px; color: var(--text2); font-size: 11px; font-weight: 750; }
.bus-line-options {
  min-height: 88px; max-height: 42dvh; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
  overflow-y: auto; overscroll-behavior: contain; padding: 2px 1px 8px;
}
.bus-line-option {
  min-width: 0; min-height: 46px; display: grid; grid-template-columns: 19px minmax(32px, auto) 1fr;
  align-items: center; gap: 7px; padding: 7px 9px; background: rgba(255,255,255,.68);
  border: 1px solid rgba(36,44,79,.10); border-radius: 12px; cursor: pointer;
}
.bus-line-option:has(input:checked) { background: #fff; border-color: rgba(36,44,79,.35); box-shadow: var(--shadow); }
.bus-line-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); }
.bus-line-number { color: var(--brand); font-size: 15px; font-weight: 900; }
.bus-line-favorite { overflow: hidden; color: var(--minor); font-size: 9px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.bus-line-no-results { grid-column: 1 / -1; margin: 0; padding: 28px 10px; color: var(--text2); text-align: center; }
.bus-line-dialog-actions { display: grid; grid-template-columns: .7fr 1.3fr; gap: 8px; padding-top: 10px; }
.bus-line-dialog-actions button { min-height: 44px; border-radius: 13px; font: inherit; font-size: 13px; font-weight: 850; cursor: pointer; }
.bus-line-clear { color: var(--brand); background: transparent; border: 1px solid rgba(36,44,79,.2); }
.bus-line-apply { color: #fff; background: var(--brand); border: 1px solid var(--brand); }
.bus-line-dialog button:focus-visible, .bus-line-option:focus-within { outline: 3px solid rgba(36,44,79,.34); outline-offset: 2px; }
.transport-filter-trigger {
  width: min(210px, 48vw);
  min-height: 40px;
  display: inline-grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 11px;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(36,44,79,.22);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.transport-filter-trigger.is-active { border-color: var(--onTime); background: var(--onTime); }
.transport-filter-trigger:hover { background: #30395F; }
.transport-filter-trigger.is-active:hover { background: #116648; }
.transport-filter-trigger:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 2px; }
.transport-filter-icon, .transport-filter-icon svg { width: 19px; height: 19px; }
.transport-filter-icon { display: grid; place-items: center; }
.transport-filter-summary {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.transport-filter-dialog {
  width: min(100%, 540px);
  max-width: 540px;
  max-height: 88dvh;
  margin: auto auto 0;
  padding: 0;
  overflow: visible;
  color: var(--text);
  background: transparent;
  border: 0;
}
.transport-filter-dialog::backdrop { background: rgba(10,12,16,.54); backdrop-filter: blur(3px); }
.transport-filter-sheet {
  display: flex;
  max-height: 88dvh;
  flex-direction: column;
  padding: 18px 16px max(16px, env(safe-area-inset-bottom));
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -16px 50px rgba(10,12,16,.22);
}
.transport-filter-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.transport-filter-kicker { color: var(--onTime); font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.transport-filter-head h2 { margin: 3px 0 0; font-size: 25px; letter-spacing: -.045em; }
.transport-filter-close {
  width: 36px; height: 36px; display: grid; flex: 0 0 auto; place-items: center; padding: 0;
  color: var(--text2); background: #f3f4f4; border: 0; border-radius: 50%; font: 23px/1 Georgia, serif; cursor: pointer;
}
.transport-filter-current { margin: 8px 0 12px; color: var(--text2); font-size: 11px; font-weight: 750; }
.transport-mode-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.transport-mode-option {
  min-width: 0; min-height: 64px; display: grid; grid-template-rows: 20px auto; place-items: center; gap: 5px;
  padding: 8px 3px; color: var(--text2); background: #f7f7f5; border: 1px solid var(--line);
  border-radius: 14px; font-size: 10px; font-weight: 850; cursor: pointer;
}
.transport-mode-option:has(input:checked) { color: var(--brand); background: #fff; border-color: rgba(36,44,79,.38); box-shadow: 0 3px 12px rgba(16,24,40,.08); }
.transport-mode-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.transport-mode-icon, .transport-mode-icon svg { width: 20px; height: 20px; fill: currentColor; }
.transport-mode-icon { display: grid; place-items: center; }
.transport-mode-option:focus-within { outline: 3px solid rgba(36,44,79,.36); outline-offset: 2px; }
.transport-bus-lines { margin-top: 12px; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.transport-bus-lines[hidden] { display: none; }
.transport-bus-lines-summary {
  min-height: 46px; display: grid; grid-template-columns: 21px minmax(0, 1fr) auto 14px; align-items: center; gap: 8px;
  padding: 9px 11px; color: var(--brand); background: #fafaf8; cursor: pointer; list-style: none;
}
.transport-bus-lines-summary::-webkit-details-marker { display: none; }
.transport-bus-lines-summary > span, .transport-bus-lines-summary svg { width: 20px; height: 20px; fill: currentColor; }
.transport-bus-lines-summary strong { min-width: 0; font-size: 12px; }
.transport-bus-lines-summary small { max-width: 150px; overflow: hidden; color: var(--text2); font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.transport-bus-lines-summary::after { content: '⌄'; grid-column: 4; color: var(--text2); font-size: 17px; }
.transport-bus-lines[open] .transport-bus-lines-summary::after { transform: rotate(180deg); }
.transport-bus-lines-summary:focus-visible { outline: 3px solid rgba(36,44,79,.36); outline-offset: -3px; }
.transport-bus-lines-panel { padding: 10px; border-top: 1px solid var(--line); }
.transport-bus-line-options { max-height: 184px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.transport-filter-actions { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; padding-top: 12px; }
.transport-filter-actions button { min-height: 44px; border-radius: 13px; font: inherit; font-size: 13px; font-weight: 850; cursor: pointer; }
.transport-filter-reset { color: var(--brand); background: transparent; border: 1px solid rgba(36,44,79,.2); }
.transport-filter-apply { color: #fff; background: var(--brand); border: 1px solid var(--brand); }
.transport-filter-close:focus-visible, .transport-filter-actions button:focus-visible { outline: 3px solid rgba(36,44,79,.36); outline-offset: 2px; }
.nearby-scope {
  width: 100%;
  padding: 9px 11px;
  color: var(--brand);
  background: transparent;
  border: 1px dashed rgba(36,44,79,.35);
  border-radius: 12px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.nearby-scope::before { content: '⚙ '; }
.nearby-context { margin: 3px 2px 14px; }
.nearby-context-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nearby-context h2 { margin: 0; color: var(--text); font-size: 20px; letter-spacing: -.02em; }
.nearby-context p { margin: 4px 0 0; color: var(--text2); font-size: 12px; line-height: 1.45; }
.bus-realtime-recovery {
  color: var(--text2);
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 15%, var(--line));
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 8px;
  padding: 7px 10px;
}
.bus-realtime-recovery a { color: var(--brand); font-weight: 750; margin-left: 6px; }
.transport-search-dialog > .bus-realtime-recovery { margin: 8px 12px 0; }
.board-head > .bus-realtime-recovery { margin: 8px 0 0; }
.route-results > .bus-realtime-recovery { margin: 0 0 12px; }
.nearby-accuracy-note { font-size: 12px; }
.nearby-filter-notice {
  align-items: center;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 10px 12px;
}
.nearby-filter-clear {
  background: none;
  border: 0;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  min-height: 36px;
  padding: 4px 6px;
  white-space: nowrap;
}
.nearby-favorites-filter {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 36px;
  margin-top: 10px;
  padding: 7px 12px;
  color: var(--brand);
  background: rgba(36,44,79,.06);
  border: 1px solid rgba(36,44,79,.14);
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.nearby-favorites-filter.is-active { color: #fff; background: var(--brand); }
.nearby-favorites-filter:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 2px; }
.nearby-favorites-empty {
  margin: 6px 0 12px;
  padding: 18px;
  color: var(--text2);
  background: rgba(255,255,255,.72);
  border: 1px dashed rgba(36,44,79,.2);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.nearby-focus-clear { flex: 0 0 auto; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--brand); background: var(--surface); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.nearby-focus-clear:hover, .nearby-focus-clear:focus-visible { border-color: var(--brand); outline: 3px solid rgba(36,44,79,.28); outline-offset: 2px; }

/* Instalación PWA: aviso discreto, con guía sólo bajo demanda. */
.install-guide {
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--brand);
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(36,44,79,.16);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.install-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.install-trigger::after {
  content: '›';
  color: var(--text2);
  font-size: 19px;
  line-height: 1;
  transition: transform .16s ease;
}
.install-guide.is-expanded .install-trigger::after { transform: rotate(90deg); }
.install-trigger-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 9px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}
.install-trigger-copy { display: grid; min-width: 0; gap: 1px; }
.install-trigger-copy strong { font-size: 12px; letter-spacing: -.01em; }
.install-trigger-copy small { color: var(--text2); font-size: 10px; line-height: 1.35; }
.install-trigger:focus-visible, .install-primary:focus-visible, .install-secondary:focus-visible { outline: 3px solid rgba(36,44,79,.45); outline-offset: -3px; }
.install-panel {
  margin: 0 8px 8px;
  padding: 10px;
  color: var(--text);
  background: rgba(238,241,245,.72);
  border-radius: 10px;
}
.install-panel-intro { margin: 0; color: var(--text2); font-size: 11px; line-height: 1.4; }
.install-primary {
  width: 100%;
  display: block;
  margin-top: 10px;
  padding: 10px 12px;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.install-primary:disabled { cursor: wait; opacity: .7; }
.install-secondary {
  width: 100%;
  margin-top: 8px;
  padding: 9px 12px;
  color: var(--brand);
  background: transparent;
  border: 1px solid rgba(36,44,79,.28);
  border-radius: 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.install-direct-note, .install-footnote { margin: 7px 0 0; color: var(--text2); font-size: 10px; line-height: 1.4; text-align: center; }
.install-steps { display: grid; gap: 6px; margin: 9px 0 0; padding: 0; list-style: none; }
.install-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(36,44,79,.09);
  border-radius: 8px;
}
.install-step-number {
  width: 21px;
  height: 21px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}
.install-step-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.install-step-copy strong { font-size: 11px; }
.install-step-copy small { color: var(--text2); font-size: 10px; line-height: 1.35; }

@media (prefers-reduced-motion: reduce) {
  .install-trigger::after { transition: none; }
  .leaflet-rotate-pane { transition: none !important; }
}

/* Cards / rows */
.section-h { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 14px 2px 8px; }
.section-sub { font-size: 13px; font-weight: 600; color: var(--text2); margin: -4px 2px 8px; }

.row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 70px 12px 14px;
  color: var(--text); font: inherit; text-align: left;
  background: var(--surface); border-radius: 16px;
  box-shadow: var(--shadow); margin-bottom: 10px; cursor: pointer;
  border: 1px solid var(--line);
}
.row:active { transform: scale(.995); }
.row:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 3px; }
.row-shell { position: relative; }
.row-line { position: relative; }
.nearby-results .row { padding-right: 116px; }
.badge {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 16px;
  overflow: hidden; white-space: nowrap; letter-spacing: -.02em;
}
.badge svg { width: 24px; height: 24px; fill: #fff; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; font-weight: 700; }
.row-sub { font-size: 13px; font-weight: 600; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub.live { color: var(--onTime); }
.row-sub.prog { color: var(--minor); }
.row-sub.muted { color: var(--text2); }
.schedule-warning {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: #713f12;
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 999px;
}
.schedule-warning-row { max-width: 100%; margin-top: 5px; padding: 4px 7px; }
.schedule-warning-mark {
  width: 15px;
  height: 15px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: #d97706;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}
.schedule-warning-copy { display: flex; min-width: 0; overflow-wrap: anywhere; }
.schedule-warning-copy strong { font-size: 10px; line-height: 1.2; }
.chev { color: rgba(91,100,114,.5); font-size: 20px; flex-shrink: 0; }
.dist { color: var(--text2); font-weight: 600; }

.go {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px;
  background: rgba(0,0,0,.05); display: grid; place-items: center; text-decoration: none;
  color: var(--brand); font-size: 18px;
}
.row-shell .go { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); }
.row .schedule-warning-row { margin: 5px 0 0; }

.nearby-favorite {
  position: absolute;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--text2);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(36,44,79,.14);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(16,24,40,.08);
  cursor: pointer;
}
.nearby-favorite svg { width: 20px; height: 20px; }
.nearby-favorite.is-favorite {
  color: var(--minor);
  background: #fff8e7;
  border-color: rgba(161,98,7,.30);
}
.nearby-favorite.is-favorite svg { fill: currentColor; }
.nearby-favorite:hover { background: #fff; }
.nearby-favorite:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 2px; }
.row-shell > .nearby-favorite { top: 50%; right: 57px; transform: translateY(-50%); }
.nearby-favorite.favorite-confirmed svg { animation: favorite-star-confirm 440ms cubic-bezier(.2,.9,.25,1.35); }

@keyframes favorite-star-confirm {
  0% { transform: scale(.72) rotate(-8deg); }
  52% { transform: scale(1.28) rotate(7deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Cerca: cada tarjeta resume una línea y sus sentidos disponibles. */
.overview-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow);
}
.overview-card.is-favorite { border-color: rgba(161,98,7,.32); }
.focused-bus-unavailable > .overview-head { padding: 10px 11px 7px; }
.focused-bus-unavailable > .overview-direction {
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 9px 7px;
  padding: 8px 4px;
}
.overview-open {
  width: 100%;
  display: block;
  padding: 10px 11px 7px;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.overview-open:active { background: rgba(36,44,79,.035); }
.overview-open:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: -3px; }
.overview-head { display: flex; align-items: center; gap: 9px; min-width: 0; padding-right: 124px; }
.overview-head .badge { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }
.overview-head .badge svg { width: 20px; height: 20px; }
.overview-card > .nearby-favorite { top: 7px; right: 7px; width: 36px; height: 36px; border: 0; box-shadow: none; }
.overview-card > .nearby-favorite svg { width: 18px; height: 18px; }
.overview-card.has-primary-arrival > .nearby-favorite { display: none; }
.overview-primary-arrival {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 2px;
  padding-left: 7px;
  color: var(--brand);
  background: rgba(255,255,255,.96);
  border-radius: 10px;
}
.overview-primary-arrival[hidden] { display: none; }
.overview-primary-eta { white-space: nowrap; font-size: 19px; font-weight: 900; letter-spacing: -.035em; }
.overview-primary-eta.no-eta { color: var(--text2); font-size: 12px; letter-spacing: 0; }
.overview-primary-favorite {
  width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  color: var(--minor); background: transparent; border: 0; border-radius: 50%; cursor: pointer;
}
.overview-primary-favorite svg { width: 18px; height: 18px; fill: currentColor; }
.overview-primary-favorite:hover { background: #fff8e7; }
.overview-primary-favorite:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 1px; }
.overview-title { min-width: 0; display: grid; gap: 1px; }
.overview-title strong { overflow-wrap: anywhere; font-size: 15px; line-height: 1.18; letter-spacing: -.012em; }
.overview-title span { color: var(--text2); font-size: 11px; font-weight: 650; }
.overview-title .overview-context.has-destination { color: var(--brand); font-weight: 800; }
.overview-directions { display: grid; gap: 0; padding: 0 9px 7px; }
.overview-direction {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 1px;
  padding: 0;
  border-top: 1px solid var(--line);
  border-radius: 10px;
}
.overview-direction[hidden],
.overview-stop-detail[hidden],
.overview-directions-toggle[hidden],
.nearby-favorites-filter[hidden],
.nearby-favorites-empty[hidden],
.nearby-results .list > [hidden] { display: none; }
.overview-direction.is-favorite { background: #fffdf7; }
.overview-direction-open {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-height: 42px;
  padding: 7px 4px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.overview-direction-open:hover { background: rgba(36,44,79,.035); }
.overview-direction-open:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: -2px; }
.overview-destination {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}
.overview-branch {
  display: block;
  margin-top: 2px;
  color: var(--text2);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}
.overview-status {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
  background: var(--text2);
  border-radius: 999px;
}
.overview-status.live { background: var(--onTime); }
.overview-status.prog { background: #b7791f; }
.overview-status.none { background: #98a0ad; }
.overview-eta {
  white-space: nowrap;
  color: var(--brand);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1;
}
.overview-eta.no-eta { color: var(--text2); font-size: 13px; letter-spacing: 0; }
.overview-eta-open {
  min-width: 42px;
  min-height: 42px;
  display: grid;
  place-items: center end;
  padding: 0 4px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 9px;
  font: inherit;
  cursor: pointer;
}
.overview-eta-open:hover { background: rgba(36,44,79,.04); }
.overview-eta-open:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: -2px; }
.overview-direction-favorite {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--text2);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.overview-direction-favorite svg { width: 17px; height: 17px; }
.overview-direction-favorite.is-favorite { color: var(--minor); background: transparent; }
.overview-direction-favorite.is-favorite svg { fill: currentColor; }
.overview-direction-favorite:hover { background: rgba(36,44,79,.06); }
.overview-direction-favorite:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 1px; }
.overview-direction-favorite.favorite-confirmed svg { animation: favorite-star-confirm 440ms cubic-bezier(.2,.9,.25,1.35); }
.overview-directions-toggle {
  width: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  margin: -4px 10px 6px auto;
  padding: 6px;
  color: var(--brand);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.overview-directions-toggle svg { width: 17px; height: 17px; }
.overview-directions-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.overview-directions-toggle:hover { background: rgba(36,44,79,.055); }
.overview-directions-toggle:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 1px; }
.overview-empty { padding: 10px 0 2px; color: var(--text2); font-size: 13px; font-weight: 700; }
.overview-more { padding: 7px 0 1px; color: var(--text2); border-top: 1px solid var(--line); font-size: 11px; font-weight: 800; }
.overview-footer {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 11px;
  color: var(--text2);
  background: #fafaf8;
  border-top: 1px solid var(--line);
  font-size: 10px;
  font-weight: 700;
}
.overview-footer-detail { min-width: 0; display: flex; align-items: center; gap: 5px; }
.overview-footer-separator { color: #a7adb4; }
.overview-freshness { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.overview-freshness.is-live { color: var(--onTime); }
.overview-live-dot {
  position: relative;
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  background: currentColor;
  border-radius: 50%;
}
.overview-live-dot::after {
  position: absolute;
  inset: -3px;
  content: '';
  border: 1px solid currentColor;
  border-radius: 50%;
  animation: live-soft-ring 2.6s ease-out infinite;
}
@keyframes live-soft-ring {
  0%, 55% { opacity: 0; transform: scale(.6); }
  70% { opacity: .32; }
  100% { opacity: 0; transform: scale(1.35); }
}
.overview-go { flex: 0 0 auto; color: var(--brand); font-weight: 900; text-decoration: none; }

/* Board */
.board-head {
  background: var(--surface); border-radius: 20px; padding: 16px;
  box-shadow: var(--shadow); margin: 6px 0 14px; border: 1px solid var(--line);
}
.board-head-top { display: flex; align-items: center; gap: 12px; }
.board-title { overflow-wrap: anywhere; font-size: 22px; font-weight: 900; letter-spacing: -.01em; line-height: 1.15; }
.board-sub { font-size: 13px; font-weight: 600; color: var(--text2); margin-top: 2px; }
.auto-refresh {
  width: fit-content; display: inline-flex; align-items: center; gap: 6px;
  margin-top: 5px; color: var(--text2); font-size: 10px; font-weight: 750;
  line-height: 1.2;
}
.auto-refresh-dot {
  width: 6px; height: 6px; flex: 0 0 auto; background: var(--onTime);
  border-radius: 50%; box-shadow: 0 0 0 0 rgba(22,163,74,0);
}
.auto-refresh.is-refreshing .auto-refresh-dot { animation: arrival-refresh-pulse .9s ease-out infinite; }
.auto-refresh.is-backoff .auto-refresh-dot { background: #b7791f; }
.auto-refresh.is-paused .auto-refresh-dot { background: #98a0ad; }
@keyframes arrival-refresh-pulse {
  45% { box-shadow: 0 0 0 4px rgba(22,163,74,.13); }
  100% { box-shadow: 0 0 0 7px rgba(22,163,74,0); }
}
.starbtn {
  width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center;
  margin-left: auto; padding: 0; color: var(--text2); background: transparent;
  border: 0; border-radius: 999px; cursor: pointer;
}
.starbtn svg { width: 24px; height: 24px; fill: transparent; stroke: currentColor; }
.starbtn.is-favorite { color: var(--minor); }
.starbtn.is-favorite svg { fill: currentColor; }
.starbtn:hover { background: rgba(161,98,7,.10); }
.starbtn:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 1px; }
.livebar { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--onTime); }
.livedot { width: 8px; height: 8px; border-radius: 999px; background: var(--onTime); }
.board-actions { display: flex; gap: 10px; margin-top: 12px; }
.btn {
  flex: 1; text-align: center; text-decoration: none; border-radius: 999px;
  padding: 10px; font-weight: 700; font-size: 14px; border: none; cursor: pointer;
}
.btn-ghost { background: rgba(36,44,79,.10); color: var(--brand); }
.official-card-link {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 11px;
  padding: 4px 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.official-card-link:focus-visible {
  outline: 3px solid rgba(36,44,79,.42);
  outline-offset: 3px;
  border-radius: 3px;
}

#minimap { position: relative; height: 190px; border-radius: 16px; overflow: hidden; margin-bottom: 6px; border: 1px solid var(--line); background: #dfe4ea; }
.vehicle-marker { position: relative; width: 38px; height: 38px; color: var(--vehicle-color); }
.vehicle-marker-core {
  position: absolute;
  inset: 5px;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--vehicle-color);
  transform-origin: 50% 72%;
}
.vehicle-mode-glyph {
  width: 27px;
  height: 27px;
  display: block;
  fill: currentColor;
  filter:
    drop-shadow(1px 0 0 #fff)
    drop-shadow(-1px 0 0 #fff)
    drop-shadow(0 1px 0 #fff)
    drop-shadow(0 -1px 0 #fff)
    drop-shadow(0 2px 2px rgba(16,24,40,.38));
}
.vehicle-bearing {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform: rotate(var(--vehicle-bearing));
  pointer-events: none;
}
.vehicle-bearing::after {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-bottom: 7px solid var(--vehicle-accent);
  border-left: 4px solid transparent;
  content: '';
  filter: drop-shadow(0 1px 1px rgba(16,24,40,.24));
  transform: translateX(-50%);
}
.vehicle-live-ring {
  position: absolute;
  right: 10px;
  bottom: 3px;
  left: 10px;
  height: 5px;
  background: color-mix(in srgb, var(--vehicle-color) 42%, transparent);
  border-radius: 50%;
  filter: blur(1.2px);
}
.vehicle-collision-anchor {
  position: absolute;
  z-index: 3;
  left: var(--collision-anchor-x);
  top: var(--collision-anchor-y);
  width: 5px;
  height: 5px;
  background: var(--vehicle-color);
  border: 1px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(16,24,40,.28);
  transform: translate(-50%, -50%);
}
.vehicle-collision-count {
  position: absolute;
  z-index: 4;
  top: -1px;
  right: -1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  color: #fff;
  background: var(--vehicle-accent);
  border: 1px solid #fff;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(16,24,40,.3);
  font-size: 9px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
}
.vehicle-marker.is-live .vehicle-marker-core,
.vehicle-marker.is-moving .vehicle-marker-core { animation: vehicle-live-float 2.2s ease-in-out infinite; }
.vehicle-marker.is-live .vehicle-live-ring,
.vehicle-marker.is-moving .vehicle-live-ring { animation: vehicle-live-ring 2.2s ease-in-out infinite; }
.vehicle-marker.is-paused .vehicle-live-ring,
.vehicle-marker.is-stale .vehicle-live-ring { opacity: .28; }
@keyframes vehicle-live-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes vehicle-live-ring {
  0%, 100% { opacity: .28; transform: scaleX(.78); }
  50% { opacity: .5; transform: scaleX(1.06); }
}
.minimap-live-badge {
  position: absolute;
  z-index: 801;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  color: #087a3c;
  background: rgba(255,255,255,.93);
  border: 1px solid rgba(8,122,60,.16);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(16,24,40,.1);
  font-size: 9px;
  font-weight: 900;
  pointer-events: none;
}
.minimap-live-badge[hidden] { display: none; }
.minimap-live-dot { width: 6px; height: 6px; background: var(--onTime); border-radius: 50%; }
.minimap-live-badge.is-moving .minimap-live-dot { animation: arrival-refresh-pulse 1.3s ease-out infinite; }
.minimap-vehicle-status {
  position: absolute;
  z-index: 801;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 112px);
  padding: 5px 8px;
  color: var(--text2);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(36,44,79,.12);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(16,24,40,.1);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
  pointer-events: none;
}
.minimap-vehicle-status.is-loading::before {
  content: '';
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 5px;
  vertical-align: 1px;
  background: var(--brand);
  border-radius: 50%;
  animation: arrival-refresh-pulse 1.3s ease-out infinite;
}
.minimap-vehicle-status.is-error { color: #9a3412; }
.minimap-direction-legend {
  position: absolute;
  z-index: 800;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
}
.minimap-direction-key {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  color: var(--text);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(36,44,79,.12);
  border-radius: 999px;
  box-shadow: 0 2px 7px rgba(16,24,40,.09);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
}
.minimap-direction-key i { flex: 0 0 auto; }
.minimap-direction-more {
  color: var(--text2);
  font-size: 11px;
  font-weight: 800;
}
.minimap-direction-swatch {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.9), 0 0 0 2px rgba(16,24,40,.14);
}
.vehicle-tooltip {
  color: var(--text);
  border: 1px solid rgba(36,44,79,.12);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(16,24,40,.14);
  font-family: inherit;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}
.minimap-route-legend {
  position: absolute;
  z-index: 800;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 10px;
  max-width: calc(100% - 16px);
  padding: 7px 9px;
  color: var(--text);
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(36,44,79,.14);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(16,24,40,.12);
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
}
.minimap-route-key { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.minimap-route-dash { width: 22px; border-top: 3px dotted currentColor; }
.minimap-user-dot { width: 8px; height: 8px; background: #2D7DF6; border: 1px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #2D7DF633; }
.leaflet-container { background: #e7ebf0; font: inherit; }
.anden-map-zoom.leaflet-bar {
  overflow: hidden;
  border: 1px solid rgba(36,44,79,.18);
  border-radius: 11px;
  box-shadow: 0 3px 12px rgba(16,24,40,.16);
}
.anden-map-zoom.leaflet-bar a,
.anden-map-zoom.leaflet-bar a:hover {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: rgba(255,255,255,.96);
  border-bottom-color: rgba(36,44,79,.13);
  font: 800 21px/1 system-ui, sans-serif;
  text-decoration: none;
}
.anden-map-zoom.leaflet-bar a:hover { background: #f5f6f8; }
.anden-map-zoom.leaflet-bar a:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(36,44,79,.48);
  outline-offset: -3px;
}
#minimap .anden-map-zoom { margin: 8px 0 0 8px; }
#minimap .minimap-vehicle-status { left: 58px; max-width: calc(100% - 162px); }

.arr {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 16px; padding: 12px 14px;
  box-shadow: var(--shadow); margin-bottom: 10px; border: 1px solid var(--line);
}
.arr-main { flex: 1; min-width: 0; }
.arr-dest { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arr-meta { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; color: var(--text2); margin-top: 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.arr-eta { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.arr-eta small { font-size: 13px; font-weight: 700; color: var(--text2); }
.schedule-card {
  min-width: 0;
  padding: 17px;
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
}
.schedule-card-kicker { color: #b45309; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.schedule-card h2 { margin: 5px 0 9px; font-size: 18px; line-height: 1.2; }
.schedule-card p { margin: 7px 0; color: var(--text2); font-size: 12px; line-height: 1.5; }
.schedule-card-link {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 12px;
  padding: 11px 13px;
  overflow-wrap: anywhere;
  color: #fff;
  background: var(--brand);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}
.schedule-card-link-secondary { margin-top: 7px; color: var(--brand); background: rgba(36,44,79,.09); }

/* States */
.state { text-align: center; color: var(--text2); padding: 48px 16px; }
.state .big { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.spinner {
  width: 26px; height: 26px; border-radius: 999px; margin: 40px auto;
  border: 3px solid rgba(36,44,79,.15); border-top-color: var(--brand);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cta { display: inline-block; margin-top: 14px; background: var(--brand); color: #fff; border: none; border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 15px; cursor: pointer; }
.cta:disabled { cursor: wait; opacity: .62; }
.cta-secondary { color: var(--brand); background: rgba(36,44,79,.09); }

/* Selector de ubicación */
.location-bar {
  display: flex;
  min-width: 0;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  padding: 2px 2px;
  color: var(--text2);
}
.location-pin {
  width: 20px;
  height: 20px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: 7px;
  font-size: 9px;
}
.location-copy { display: flex; min-width: 0; flex: 1; }
.location-copy span {
  overflow: hidden;
  color: var(--text2);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.location-actions { display: flex; flex: 0 0 auto; }
.location-change {
  min-height: 30px;
  padding: 5px 9px;
  color: var(--brand);
  background: rgba(36,44,79,.09);
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.location-change:disabled { cursor: wait; opacity: .62; }
.location-change-secondary { color: var(--brand); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.location-state { padding: 42px 16px 54px; }
.location-state p { margin: 8px auto 0; max-width: 320px; line-height: 1.5; }
.location-state-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  color: var(--brand);
  background: rgba(36,44,79,.09);
  border-radius: 16px;
  font-size: 24px;
  font-weight: 900;
}
.location-state-icon svg { width: 23px; height: 23px; }
.location-state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.map-location-choice {
  width: 100%;
  margin: 0 0 10px;
  padding: 11px 14px;
  color: var(--brand);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}
.location-bar + .fullmap-wrap, .map-location-choice + .fullmap-wrap { height: calc(100dvh - 232px); }
.fullmap-wrap.with-install-guide { height: calc(100dvh - 280px); }
.location-dialog {
  width: min(100%, 520px);
  max-height: min(92dvh, 760px);
  margin: auto 0 0;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -18px 60px rgba(10,12,16,.25);
}
.location-dialog::backdrop { background: rgba(10,12,16,.56); backdrop-filter: blur(3px); }
.location-dialog-panel { max-height: min(92dvh, 760px); padding: 22px 18px max(24px, env(safe-area-inset-bottom)); overflow-y: auto; }
.location-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.location-dialog-kicker { color: var(--text2); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.location-dialog h2 { margin: 4px 0 18px; font-size: 24px; line-height: 1.15; letter-spacing: -.025em; }
.location-dialog-close {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--text2);
  background: var(--bg);
  border: 0;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}
.location-gps {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  color: #fff;
  text-align: left;
  background: var(--brand);
  border: 0;
  border-radius: 16px;
  cursor: pointer;
}
.location-gps:disabled { cursor: wait; opacity: .7; }
.location-gps-icon { width: 34px; font-size: 24px; text-align: center; }
.location-gps-icon svg { width: 24px; height: 24px; vertical-align: middle; }
.location-gps-copy { display: flex; flex-direction: column; gap: 2px; }
.location-gps-copy strong { font-size: 15px; }
.location-gps-copy small { color: rgba(255,255,255,.66); font-size: 11px; }
.location-form-error, .location-form-feedback { min-height: 18px; margin: 7px 2px 0; color: var(--major); font-size: 12px; line-height: 1.4; }
.location-form-feedback { color: var(--text2); }
.location-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--text2); font-size: 11px; font-weight: 700; }
.location-divider::before, .location-divider::after { height: 1px; flex: 1; content: ''; background: var(--line); }
.location-form { display: grid; gap: 12px; }
.location-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 800; }
.location-input {
  width: 100%;
  padding: 12px 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  outline: none;
}
.location-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36,44,79,.12); }
.location-submit {
  padding: 12px 14px;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.location-submit:disabled { cursor: wait; opacity: .62; }
.location-results {
  display: grid;
  max-height: min(38dvh, 308px);
  gap: 7px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}
.location-results[hidden] { display: none; }
.location-result {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
.location-result-street { font-size: 13px; font-weight: 800; }
.location-result-place { color: var(--text2); font-size: 11px; font-weight: 650; }
.location-result:hover, .location-result[aria-selected="true"] { border-color: var(--brand); background: rgba(36,44,79,.06); }
.location-provider { margin: 14px 2px 0; color: var(--text2); font-size: 10px; line-height: 1.45; }

/* Ajustes de Cercanía */
.settings-dialog {
  width: min(calc(100% - 28px), 470px);
  margin: auto;
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 0;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(10,12,16,.28);
}
.settings-dialog::backdrop { background: rgba(10,12,16,.56); backdrop-filter: blur(3px); }
.settings-dialog-panel { padding: 22px; }
.settings-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.settings-dialog-kicker { color: var(--text2); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.settings-dialog h2 { margin: 4px 0 5px; font-size: 23px; line-height: 1.14; letter-spacing: -.025em; }
.settings-dialog-head p { margin: 0; color: var(--text2); font-size: 12px; line-height: 1.45; }
.settings-dialog-close {
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--text2);
  background: var(--bg);
  border: 0;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}
.settings-field { display: grid; gap: 7px; margin-top: 20px; }
.settings-field-label { font-size: 13px; font-weight: 900; }
.settings-field small { color: var(--text2); font-size: 11px; line-height: 1.45; }
.settings-select {
  width: 100%;
  min-height: 45px;
  padding: 0 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}
.settings-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36,44,79,.12); outline: none; }
.settings-analytics-control {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.settings-analytics-copy { display: grid; min-width: 0; gap: 3px; }
.settings-analytics-copy strong { font-size: 13px; }
.settings-analytics-copy small { color: var(--text2); font-size: 10px; line-height: 1.4; }
.settings-analytics-control input {
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: var(--brand);
  cursor: pointer;
}
.settings-analytics-control:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36,44,79,.12); }
.settings-privacy-link, .settings-lines-link, .settings-google-play-link { width: fit-content; color: var(--brand); font-size: 11px; font-weight: 800; }
.settings-lines-link, .settings-google-play-link { display: inline-flex; margin-top: 14px; }
.settings-bike-note {
  display: grid;
  gap: 3px;
  margin-top: 18px;
  padding: 12px;
  color: #115e59;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 13px;
  font-size: 12px;
  line-height: 1.4;
}
.settings-bike-note strong { font-size: 12px; }
.settings-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.settings-reset, .settings-save {
  padding: 11px 14px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.settings-reset { color: var(--brand); background: rgba(36,44,79,.09); }
.settings-save { color: #fff; background: var(--brand); }
.settings-dialog-close:focus-visible, .settings-reset:focus-visible, .settings-save:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 3px; }

/* Promociones verificadas */
.promos-view { width: min(100%, 1160px); margin: 0 auto; }
.promos-heading { margin: 2px 0 22px; }
.promos-heading h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.promos-heading p { margin: 6px 0 0; color: var(--text2); font-size: 13px; }
.promos-group-title { margin: 0 0 10px; color: var(--text2); font-size: 12px; font-weight: 850; }
.promo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.promo-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 254px;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.promo-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: '';
  background: var(--promo-accent, var(--brand));
}
.promo-card:has(.promo-logo-uala) { --promo-accent: #ee2a7b; }
.promo-card:has(.promo-logo-naranjax) { --promo-accent: #ff5a1f; }
.promo-card:has(.promo-logo-macro) { --promo-accent: #243a73; }
.promo-card:has(.promo-logo-galicia) { --promo-accent: #f58220; }
.promo-card-head { display: flex; min-height: 32px; align-items: center; justify-content: space-between; gap: 10px; }
.promo-logo { display: inline-flex; align-items: center; gap: 6px; color: #111; font-size: 19px; font-weight: 900; letter-spacing: -.045em; }
.promo-logo-uala { color: #ee2a7b; font-size: 23px; font-style: italic; }
.promo-logo-naranjax { color: #f4511e; }
.promo-logo-naranjax b {
  display: grid; width: 25px; height: 25px; place-items: center;
  color: #fff; background: #f4511e; border-radius: 7px; font-size: 16px;
}
.promo-logo-macro { color: #243a73; }
.promo-logo-macro small, .promo-logo-galicia small {
  padding: 3px 5px; color: #fff; background: #7d2ae8;
  border-radius: 5px; font-size: 8px; font-weight: 950; letter-spacing: .03em;
}
.promo-logo-galicia { font-size: 20px; }
.macro-symbol { display: inline-flex; height: 22px; align-items: flex-end; gap: 2px; transform: skew(-16deg); }
.macro-symbol i { display: block; width: 4px; background: currentColor; border-radius: 1px; }
.macro-symbol i:nth-child(1) { height: 10px; }
.macro-symbol i:nth-child(2) { height: 16px; }
.macro-symbol i:nth-child(3) { height: 22px; }
.promo-scope {
  max-width: 46%; padding: 5px 8px; overflow: hidden;
  color: var(--text2); background: #f4f6f8; border-radius: 999px;
  font-size: 9px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap;
}
.promo-card-body { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 12px; margin: 22px 0 18px; }
.promo-discount { color: var(--brand); font-size: 38px; line-height: .9; letter-spacing: -.065em; }
.promo-title { margin: 0; font-size: 15px; line-height: 1.2; letter-spacing: -.015em; }
.promo-facts {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px 10px;
  margin: 0; padding-top: 13px; border-top: 1px solid var(--line); font-size: 11px;
}
.promo-facts dt { color: var(--text2); }
.promo-facts dd { min-width: 0; margin: 0; font-weight: 800; }
.promo-condition { margin: 12px 0 0; color: var(--text2); font-size: 11px; line-height: 1.45; }
.promo-warning {
  width: fit-content; margin-top: 9px; padding: 4px 7px;
  color: #8a5400; background: #fff6df; border-radius: 7px; font-size: 9px; font-weight: 850;
}
.promo-link {
  display: inline-flex; width: fit-content; min-height: 38px; align-items: center;
  margin-top: auto; padding: 9px 12px; color: var(--brand);
  border: 1px solid rgba(36,44,79,.18); border-radius: 10px;
  font-size: 12px; font-weight: 900; text-decoration: none;
  transition: background .16s ease, border-color .16s ease;
}
.promo-link:hover { background: rgba(36,44,79,.06); border-color: rgba(36,44,79,.3); }
.promo-link:focus-visible, .promos-other summary:focus-visible { outline: 3px solid rgba(36,44,79,.32); outline-offset: 3px; border-radius: 5px; }
.promos-other { margin-top: 18px; }
.promos-other summary {
  width: fit-content; margin-bottom: 12px; color: var(--brand);
  font-size: 12px; font-weight: 850; cursor: pointer;
}
.promos-note { display: grid; gap: 4px; margin-top: 18px; color: var(--text2); font-size: 10px; line-height: 1.45; }

/* Tabbar */
.tabbar {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; border: none; background: none; cursor: pointer;
  padding: 8px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text2); font-size: 11px; font-weight: 700;
}
.tab.active { color: var(--brand); }
.tab-ico { width: 24px; height: 24px; }
.tab-ico svg { width: 24px; height: 24px; }

.scroll-top {
  position: absolute;
  right: 16px;
  bottom: calc(70px + env(safe-area-inset-bottom));
  z-index: 35;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--brand);
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(36,44,79,.16);
  border-radius: 50%;
  box-shadow: 0 9px 24px rgba(24,31,45,.16);
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.scroll-top[hidden] { display: none; }
.scroll-top svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scroll-top:hover { background: #fff; transform: translateY(-1px); }
.scroll-top:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 3px; }

.compact-proposal-view { background: #fff; }
.filter-proposal-view { background: #fff; }
.proposal-switcher {
  position: sticky;
  top: -1px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: -4px -4px 16px;
  padding: 4px;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(16,24,40,.07);
  backdrop-filter: blur(12px);
}
.proposal-switcher-link {
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  color: var(--text2);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}
.proposal-switcher-link:hover { color: var(--brand); background: #f7f7f4; }
.proposal-switcher-link.is-active { color: #fff; background: var(--brand); }
.proposal-switcher-link:focus-visible { outline: 3px solid rgba(36,44,79,.42); outline-offset: 2px; }
.compact-proposal-intro { margin: 11px 1px 16px; }
.compact-proposal-kicker {
  color: var(--onTime);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .18em;
}
.compact-proposal-title {
  margin: 3px 0 4px;
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.05;
  letter-spacing: -.045em;
}
.compact-proposal-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compact-proposal-heading-row .compact-proposal-title { min-width: 0; }
.compact-proposal-copy { margin: 0; color: var(--text2); font-size: 12px; font-weight: 650; }
.compact-proposal-grid { align-items: start; }
.nearby-layout.proposal-filter-layout { display: block; padding: 0 0 12px; }
.proposal-filter-results { min-width: 0; }
.proposal-result-count {
  margin: 2px 2px 8px;
  color: var(--text2);
  font-size: 11px;
  font-weight: 750;
}

/* big map (Mapa tab) */
#bigmap { position: absolute; inset: 0; bottom: 0; }
.fullmap-wrap { position: relative; height: calc(100dvh - 162px); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.fullmap-wrap #bigmap {
  --lrc-control-bg: rgba(255,255,255,.96);
  --lrc-control-hover: #f2f4f8;
  --lrc-control-size: 30px;
  border-radius: 16px;
  overscroll-behavior: contain;
  touch-action: none;
}
.fullmap-wrap .leaflet-control-rotate {
  overflow: hidden;
  border: 1px solid rgba(36,44,79,.18);
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(24,34,58,.18);
}
.fullmap-wrap .leaflet-control-rotate a { color: var(--brand); }
.map-provider-choice {
  min-height: 34px;
  margin: 3px 4px 7px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  color: var(--text2);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}
.map-provider-button {
  min-height: 28px;
  padding: 5px 2px;
  color: var(--brand);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.map-provider-button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.footer-note { text-align: center; color: var(--text2); font-size: 11px; padding: 18px 8px 2px; line-height: 1.5; }
.footer-note a { color: var(--text2); }
.footer-google-play-link { display: inline-block; font-weight: 800; text-underline-offset: 2px; }
.footer-credit { display: inline-block; text-underline-offset: 2px; }
.footer-credit:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
.footer-bug-report {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
  background: color-mix(in srgb, var(--brand) 6%, transparent);
  color: var(--brand);
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  vertical-align: middle;
}
.footer-bug-report:hover { border-color: color-mix(in srgb, var(--brand) 48%, transparent); }
.footer-bug-report:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.footer-bug-report-icon { display: inline-flex; width: 12px; height: 12px; }
.footer-bug-report-icon svg { width: 100%; height: 100%; }
.language-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}
.language-switcher a {
  min-width: 0;
  padding: 4px 6px;
  border-radius: 999px;
  color: var(--text2);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}
.language-switcher a.active { color: #fff; background: var(--brand); }
.language-switcher .external-translation { margin-left: 4px; padding-inline: 8px; border: 1px solid var(--line); }
.privacy-languages { justify-content: flex-end; margin-top: -24px; }

.security-card {
  margin: 22px 0 4px;
  padding: 18px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(34,197,94,.22), transparent 38%),
    var(--brand);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(16,24,40,.16);
}
.security-head { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 14px; align-items: start; }
.security-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #082f1a;
  background: #86efac;
  border: 4px solid rgba(255,255,255,.16);
  border-radius: 14px;
  font-size: 20px;
  font-weight: 900;
}
.security-kicker {
  color: #86efac;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}
.security-title h2 { margin: 4px 0 7px; font-size: 20px; line-height: 1.18; letter-spacing: -.02em; }
.security-title > p { margin: 0; color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.5; }
.security-grid { display: grid; gap: 8px; margin-top: 17px; }
.security-fact { padding: 13px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.11); border-radius: 14px; }
.security-fact h3 { margin: 0 0 5px; color: #fff; font-size: 13px; }
.security-fact p { margin: 0; color: rgba(255,255,255,.7); font-size: 11px; line-height: 1.5; }
.security-shared { margin-top: 10px; padding: 14px; color: #d1fae5; background: rgba(34,197,94,.10); border: 1px solid rgba(134,239,172,.22); border-radius: 14px; }
.security-shared h3 { margin: 0 0 8px; color: #86efac; font-size: 13px; }
.security-shared ul { margin: 0; padding-left: 17px; }
.security-shared li { margin: 6px 0; font-size: 11px; line-height: 1.48; }
.security-analytics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.security-analytics-copy { display: flex; flex-direction: column; gap: 3px; }
.security-analytics-copy strong { font-size: 13px; }
.security-analytics-copy span { color: rgba(255,255,255,.64); font-size: 11px; line-height: 1.35; }
.security-analytics-control { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.security-analytics-status { color: rgba(255,255,255,.72); font-size: 9px; white-space: nowrap; }
.security-toggle {
  width: 46px;
  height: 26px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  cursor: pointer;
  transition: background .18s ease;
}
.security-toggle-knob {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.28);
  transition: transform .18s ease;
}
.security-toggle.on { background: #4ade80; }
.security-toggle.on .security-toggle-knob { transform: translateX(20px); }
.security-toggle:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.security-toggle:disabled { cursor: not-allowed; opacity: .55; }
.security-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.security-link {
  display: inline-flex;
  padding: 9px 12px;
  color: var(--brand);
  background: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.security-link-secondary { color: #fff; background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.14); }
.security-caveat { margin: 10px 0 0; color: rgba(255,255,255,.58); font-size: 10px; }

.privacy-page {
  width: min(680px, calc(100% - 28px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 18px 48px;
  background: var(--surface);
}
.privacy-hero { padding: 28px 0 20px; border-bottom: 1px solid var(--line); }
.privacy-eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 10px; font-weight: 900; letter-spacing: .13em; }
.privacy-page h1 { margin: 0 0 8px; font-size: clamp(30px, 8vw, 40px); letter-spacing: -.04em; }
.privacy-page h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: -.02em; }
.privacy-page h3 { margin: 0 0 5px; font-size: 14px; }
.privacy-page p { margin: 8px 0; color: var(--text2); line-height: 1.6; }
.privacy-page a { color: var(--brand); }
.privacy-back { font-weight: 700; text-decoration: none; }
.privacy-updated { font-size: 12px; }
.privacy-section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.privacy-list { display: grid; gap: 9px; margin: 0; padding-left: 20px; color: var(--text2); line-height: 1.5; }
.privacy-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
  background: #f2f4f8;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.privacy-choice p { margin-bottom: 0; font-size: 12px; }
.privacy-toggle {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 12px;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.privacy-toggle.is-enabled { color: var(--brand); background: #fff; }
.privacy-toggle:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.privacy-toggle:disabled { cursor: not-allowed; opacity: .62; }
.privacy-github { font-weight: 800; }
.privacy-contact { border-bottom: 0; }

/* Cómo llegar: dirección editorial, clara y deliberadamente blanca. */
.route-launcher {
  position: relative;
  padding: 13px;
  overflow: visible;
  background: #fff;
  border: 1px solid #dce2ea;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(27,35,58,.06);
}
.route-launcher-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.route-launcher-icon {
  width: 30px; height: 30px; display: grid; flex: 0 0 auto; place-items: center;
  color: var(--brand); background: #f2f4f8; border-radius: 10px;
}
.route-launcher-icon svg { width: 19px; height: 19px; }
.route-launcher-copy { display: grid; min-width: 0; gap: 1px; }
.route-launcher-copy strong { font-size: 13px; letter-spacing: -.01em; }
.route-launcher-copy small { color: var(--text2); font-size: 10px; line-height: 1.3; }
.route-beta {
  margin-left: auto; padding: 3px 6px; color: #5b6472; background: #f2f4f8;
  border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .12em;
}
.route-search { position: relative; }
.route-search-field { display: grid; grid-template-columns: minmax(0, 1fr) 38px; }
.route-search-input {
  width: 100%; min-width: 0; min-height: 40px; padding: 9px 11px;
  color: var(--text); background: #fff; border: 1px solid #cfd6e1;
  border-right: 0; border-radius: 11px 0 0 11px; font: inherit; font-size: 13px;
}
.route-search-input::placeholder { color: #7b8492; }
.route-search-input:focus { position: relative; z-index: 1; outline: 3px solid rgba(36,44,79,.14); border-color: var(--brand); }
.route-search-input:disabled { background: #f5f6f8; cursor: not-allowed; }
.route-search-submit {
  min-height: 40px; color: #fff; background: var(--brand); border: 1px solid var(--brand);
  border-radius: 0 11px 11px 0; font: inherit; font-size: 19px; cursor: pointer;
}
.route-search-submit:disabled { color: #98a0ad; background: #e7eaf0; border-color: #d7dce4; cursor: default; }
.route-search-options { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.route-search-map, .route-search-landmarks {
  min-height: 34px; padding: 7px 10px; color: var(--brand); background: #f3f5f8;
  border: 1px solid #d7dce5; border-radius: 999px; font: inherit; font-size: 10px;
  font-weight: 850; cursor: pointer;
}
.route-search-map::before { margin-right: 5px; content: '⌖'; }
.route-search-landmarks::before { margin-right: 5px; content: '◆'; font-size: 8px; }
.route-search-map:hover, .route-search-landmarks:hover { border-color: var(--brand); background: #fff; }
.route-search-map:focus-visible, .route-search-landmarks:focus-visible { outline: 3px solid rgba(36,44,79,.18); outline-offset: 2px; }
.route-search-map:disabled, .route-search-landmarks:disabled { cursor: wait; opacity: .58; }
.route-search-landmarks[hidden] { display: none; }
.route-search-feedback { min-height: 14px; margin: 6px 2px 0; color: var(--text2); font-size: 10px; line-height: 1.35; }
.route-provider-note { margin: 6px 2px 0; color: #5f6876; font-size: 9px; line-height: 1.4; }
.route-suggestions {
  position: absolute; z-index: 35; top: calc(100% - 13px); left: 0; right: 0;
  display: grid; gap: 3px; max-height: min(300px, 46dvh); margin: 0; padding: 5px;
  overflow-y: auto; list-style: none; background: #fff; border: 1px solid #dce2ea;
  border-radius: 12px; box-shadow: 0 18px 40px rgba(18,24,38,.16);
}
.route-suggestions[hidden] { display: none; }
.route-suggestion { display: grid; gap: 2px; padding: 9px; border-radius: 8px; cursor: pointer; }
.route-suggestion:hover, .route-suggestion:focus, .route-suggestion[aria-selected="true"] { outline: none; background: #f3f5f8; }
.route-suggestion strong { font-size: 12px; }
.route-suggestion small { color: var(--text2); font-size: 10px; }
.route-suggestion-primary { display: flex; min-width: 0; align-items: center; gap: 7px; }
.route-suggestion-primary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-suggestion-badge {
  width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center;
  color: #fff; background: var(--destination-color, var(--brand)); border-radius: 7px;
  font-size: 9px; font-weight: 900; line-height: 1;
}
.route-suggestion-primary + small { padding-left: 31px; }

.destination-map-dialog {
  width: min(calc(100% - 20px), 680px); max-height: min(94dvh, 820px); margin: auto;
  padding: 0; overflow: hidden; color: var(--text); background: var(--surface);
  border: 0; border-radius: 24px; box-shadow: 0 28px 90px rgba(10,12,16,.32);
}
.destination-map-dialog::backdrop { background: rgba(10,12,16,.62); backdrop-filter: blur(4px); }
.destination-map-panel { display: grid; gap: 11px; padding: 18px 18px max(18px, env(safe-area-inset-bottom)); }
.destination-map-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.destination-map-kicker { color: var(--text2); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.destination-map-head h2 { margin: 4px 0 0; font-size: 24px; line-height: 1.1; letter-spacing: -.035em; }
.destination-map-close {
  width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center;
  color: var(--text2); background: var(--bg); border: 0; border-radius: 50%;
  font: 27px/1 Georgia, serif; cursor: pointer;
}
.destination-map-help { margin: 0; color: var(--text2); font-size: 12px; line-height: 1.45; }
.destination-map-canvas {
  width: 100%; height: min(48dvh, 390px); min-height: 260px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 18px; touch-action: none;
}
.destination-map-canvas:focus { outline: 3px solid rgba(36,44,79,.22); outline-offset: 2px; }
.destination-map-controls {
  display: grid; grid-template-areas: '. north .' 'west . east' '. south .';
  grid-template-columns: repeat(3, 40px); justify-content: center; gap: 4px;
}
.destination-map-nudge {
  width: 40px; height: 34px; display: grid; place-items: center; color: var(--brand);
  background: #f1f3f6; border: 1px solid #d9dee7; border-radius: 10px;
  font: 900 18px/1 inherit; cursor: pointer;
}
.destination-map-nudge.north { grid-area: north; }
.destination-map-nudge.west { grid-area: west; }
.destination-map-nudge.east { grid-area: east; }
.destination-map-nudge.south { grid-area: south; }
.destination-map-nudge:focus-visible { outline: 3px solid rgba(36,44,79,.2); outline-offset: 2px; }
.destination-map-status { min-height: 17px; margin: 0; color: var(--text2); font-size: 11px; text-align: center; }
.destination-map-actions { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 8px; }
.destination-map-cancel, .destination-map-confirm {
  min-height: 44px; padding: 10px 14px; border-radius: 13px; font: inherit;
  font-size: 13px; font-weight: 850; cursor: pointer;
}
.destination-map-cancel { color: var(--brand); background: #fff; border: 1px solid #d7dce5; }
.destination-map-confirm { color: #fff; background: var(--brand); border: 1px solid var(--brand); }
.destination-map-confirm:disabled { color: #9099a8; background: #e7eaf0; border-color: #d7dce5; cursor: default; }
.destination-map-source { margin: 0; color: var(--text2); font-size: 9px; text-align: center; }
.destination-map-source a { color: inherit; }

#view.route-view { background: #f7f8fa; }
.route-shell { width: min(100%, 880px); margin: 0 auto; }
.route-page-eyebrow { color: #667085; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.route-page-title { max-width: 720px; margin: 7px 0 4px; font-size: clamp(25px, 7vw, 38px); line-height: 1.08; letter-spacing: -.045em; }
.route-page-origin { margin: 0; color: var(--text2); font-size: 12px; line-height: 1.5; }
.route-page-actions { display: flex; gap: 7px; margin: 14px 0 18px; }
.route-change, .route-refresh {
  min-height: 34px; padding: 7px 11px; color: var(--brand); background: #fff;
  border: 1px solid #d9dfe7; border-radius: 999px; font: inherit; font-size: 11px;
  font-weight: 800; cursor: pointer;
}
.route-refresh { color: #fff; background: var(--brand); border-color: var(--brand); }
.route-results { min-height: 240px; }
.route-planning-loader {
  display: grid; justify-items: center; padding: 28px 18px 24px; overflow: hidden;
  color: var(--text); background: #fff; border: 1px solid #dde2e9; border-radius: 20px;
  box-shadow: 0 16px 42px rgba(25,32,48,.07); text-align: center;
}
.route-planning-animation { width: min(100%, 310px); padding: 18px 12px 22px; }
.route-planning-track { position: relative; display: flex; align-items: center; width: 100%; height: 20px; }
.route-planning-line {
  position: absolute; right: 8px; left: 8px; height: 3px; overflow: hidden;
  background: repeating-linear-gradient(90deg, #c9d1dc 0 8px, transparent 8px 14px);
}
.route-planning-line::after {
  position: absolute; inset: 0; content: '';
  background: linear-gradient(90deg, transparent, rgba(36,44,79,.65), transparent);
  animation: route-planning-scan 1.7s ease-in-out infinite;
}
.route-planning-station {
  position: absolute; z-index: 2; width: 16px; height: 16px; background: #fff;
  border: 4px solid var(--brand); border-radius: 50%; box-shadow: 0 0 0 4px rgba(36,44,79,.08);
}
.route-planning-station.start { left: 0; }
.route-planning-station.end { right: 0; }
.route-planning-vehicle {
  position: absolute; z-index: 3; left: 2px; width: 22px; height: 16px;
  background: var(--brand); border: 3px solid #fff; border-radius: 6px;
  box-shadow: 0 4px 11px rgba(36,44,79,.28);
  animation: route-planning-travel 2.4s cubic-bezier(.45,.02,.24,1) infinite;
}
.route-planning-vehicle::before,
.route-planning-vehicle::after {
  position: absolute; bottom: -5px; width: 4px; height: 4px; content: '';
  background: var(--brand); border-radius: 50%;
}
.route-planning-vehicle::before { left: 2px; }
.route-planning-vehicle::after { right: 2px; }
.route-planning-title { font-size: 18px; letter-spacing: -.02em; }
.route-planning-copy { max-width: 340px; margin: 6px 0 0; color: var(--text2); font-size: 12px; line-height: 1.45; }
.route-planning-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.route-planning-steps span {
  padding: 5px 8px; color: #667085; background: #f1f3f6; border-radius: 999px;
  font-size: 9px; font-weight: 850; animation: route-planning-step 2.4s ease-in-out infinite;
}
.route-planning-steps span:nth-child(2) { animation-delay: .4s; }
.route-planning-steps span:nth-child(3) { animation-delay: .8s; }
.route-planning-time { margin: 10px 0 0; color: #7a8492; font-size: 10px; }
.route-planning-cancel {
  margin-top: 15px; padding: 8px 12px; color: var(--brand); background: transparent;
  border: 1px solid #d9dfe7; border-radius: 999px; font: inherit; font-size: 10px;
  font-weight: 800; cursor: pointer;
}
.route-planning-cancel:focus-visible { outline: 3px solid rgba(36,44,79,.18); outline-offset: 2px; }
.route-failure { padding: 34px 16px; background: #fff; border: 1px solid #dde2e9; border-radius: 20px; }
.route-failure-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.route-failure-actions .cta { margin-top: 14px; }
@keyframes route-planning-travel {
  0% { left: 2px; transform: scale(.9); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: scale(1); }
  90% { opacity: 1; }
  100% { left: calc(100% - 24px); transform: scale(.9); opacity: 0; }
}
@keyframes route-planning-scan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes route-planning-step { 0%, 100% { color: #667085; background: #f1f3f6; } 35% { color: var(--brand); background: #e9edf8; } }
.route-options { display: grid; gap: 10px; }
.route-card { overflow: hidden; background: #fff; border: 1px solid #dde2e9; border-radius: 18px; box-shadow: 0 10px 30px rgba(25,32,48,.055); }
.route-card.primary { border-color: #b9d8cc; box-shadow: 0 16px 42px rgba(25,32,48,.08); }
.route-card.primary[data-reachability="confirmed"] { box-shadow: inset 3px 0 0 #0b8461, 0 16px 42px rgba(25,32,48,.08); }
.route-card-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 16px; list-style: none; cursor: pointer;
}
.route-card-summary:focus-visible { outline: 3px solid rgba(36,44,79,.22); outline-offset: -3px; border-radius: 16px; }
.route-card-summary::-webkit-details-marker { display: none; }
details.route-card .route-card-summary::after { content: '›'; color: #737d8c; font-size: 20px; transition: transform .18s ease; }
details.route-card[open] .route-card-summary::after { transform: rotate(90deg); }
.route-card-title { display: grid; min-width: 0; gap: 2px; }
.route-card-title small { color: #6b7482; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.route-card-title strong { font-size: 17px; letter-spacing: -.025em; }
.route-departure { margin-left: auto; color: #737d8c; font-size: 10px; font-weight: 800; text-align: right; }
.route-departure.actionable { color: #087f5b; }
.route-card-body { padding: 0 16px 16px; }
.route-walk-total { margin: 0 0 10px; color: var(--text2); font-size: 10px; }
.route-walk { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 9px; min-height: 42px; color: #697382; font-size: 11px; line-height: 1.35; }
.route-walk-icon { width: 28px; height: 28px; display: grid; place-items: center; color: #697382; background: #f1f3f6; border-radius: 50%; }
.route-walk-icon svg { width: 16px; height: 16px; }
.route-walk-copy { display: grid; min-width: 0; gap: 1px; }
.route-walk-copy strong { color: #29313d; font-size: 11px; }
.route-walk-copy small { overflow-wrap: anywhere; color: #737d8c; font-size: 9px; }
.route-leg { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 11px 0 12px; }
.route-leg::before { position: absolute; top: 0; bottom: 0; left: 17px; width: 2px; content: ''; background: #e4e8ee; }
.route-leg-marker { z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: var(--brand); border: 4px solid #fff; border-radius: 12px; box-shadow: 0 0 0 1px #d9dee7; }
.route-leg-marker svg { width: 18px; height: 18px; fill: currentColor; }
.route-leg-subte .route-leg-marker { background: #116b51; }
.route-leg-bondi .route-leg-marker { background: #255b8a; }
.route-leg-tren .route-leg-marker { background: #7a4a22; }
.route-leg-content { min-width: 0; padding: 2px 0; }
.route-leg-top { display: flex; align-items: center; gap: 8px; }
.route-line { min-width: 0; overflow-wrap: anywhere; font-size: 14px; letter-spacing: -.015em; }
.route-data { margin-left: auto; padding: 3px 6px; border-radius: 999px; font-size: 8px; font-weight: 900; white-space: nowrap; }
.route-data.live { color: #087f5b; background: #e8f7f1; }
.route-data.scheduled { color: #955e08; background: #fff5dc; }
.route-data.muted { color: #687180; background: #f0f2f5; }
.route-direction { margin-top: 3px; color: #344054; font-size: 11px; font-weight: 750; }
.route-stop, .route-alight { margin-top: 7px; color: #131722; font-size: 12px; line-height: 1.35; }
.route-alight { color: var(--text2); }
.route-match { margin-top: 2px; color: #697382; font-size: 9px; }
.route-reachable {
  display: inline-flex; width: fit-content; margin-top: 8px; padding: 5px 8px;
  color: #075e47; background: #e7f6f0; border: 1px solid #c9eadf;
  border-radius: 8px; font-size: 11px; font-weight: 900;
}
.route-branch { margin-top: 4px; color: #596474; font-size: 9px; font-weight: 750; }
.route-arrivals { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.route-arrival { padding: 5px 8px; color: #3b4553; background: #f1f3f6; border-radius: 999px; font-size: 10px; font-weight: 900; }
.route-arrival.live { color: #087f5b; background: #e8f7f1; }
.route-arrival.scheduled { color: #955e08; background: #fff5dc; }
.route-arrival.selected { box-shadow: inset 0 0 0 1px currentColor; }
.route-stop-link { display: inline-block; margin-top: 8px; color: var(--brand); font-size: 10px; font-weight: 800; text-decoration: none; }
.route-source-note { margin: 12px 0 6px; padding: 14px 15px; background: #fff; border: 1px solid #e0e5eb; border-radius: 15px; }
.route-source-note strong { font-size: 12px; }
.route-source-note p { margin: 4px 0 0; color: var(--text2); font-size: 10px; line-height: 1.45; }

@media (prefers-reduced-motion: reduce) {
  .nearby-favorite.favorite-confirmed svg,
  .overview-direction-favorite.favorite-confirmed svg { animation: none; }
  .overview-live-dot::after { animation: none; }
  .vehicle-marker.is-live .vehicle-marker-core,
  .vehicle-marker.is-moving .vehicle-marker-core,
  .vehicle-marker.is-live .vehicle-live-ring,
  .vehicle-marker.is-moving .vehicle-live-ring,
  .minimap-live-badge.is-moving .minimap-live-dot { animation: none; }
  .scroll-top:hover { transform: none; }
  details.route-card .route-card-summary::after { transition: none; }
  .auto-refresh.is-refreshing .auto-refresh-dot { animation: none; opacity: .55; }
  .route-planning-line::after,
  .route-planning-vehicle,
  .route-planning-steps span { animation: none; }
  .route-planning-vehicle { left: calc(50% - 11px); opacity: 1; }
  .leaflet-zoom-animated { transition: none !important; }
}

@media (max-width: 759px) {
  .transport-filter-trigger {
    width: 40px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding-inline: 9px;
  }
  .transport-filter-summary { display: none; }
}

@media (max-width: 420px) {
  .destination-map-dialog { width: 100%; max-height: 96dvh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .destination-map-panel { padding-inline: 14px; }
  .destination-map-canvas { min-height: 250px; }
  .route-search-options { display: grid; grid-template-columns: 1fr; }
}

/* Nav superior: oculta en mobile, visible en desktop */
.topnav { display: none; gap: 4px; }
.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.list > *, .row-shell, .row-line, .row { min-width: 0; }
.list .row, .list .arr { margin-bottom: 0; }
.arr-list { display: flex; flex-direction: column; gap: 10px; }
.arr-list .arr { margin-bottom: 0; }
.board-body { display: block; }
.nearby-layout, .nearby-rail, .nearby-results { min-width: 0; }

/* ─────────── Desktop ─────────── */
@media (min-width: 760px) {
  body { background: #f3f3f0; }
  #app {
    width: min(calc(100% - 48px), 1480px);
    max-width: none;
    min-height: 100dvh;
    border-inline: 1px solid rgba(255,255,255,.68);
    box-shadow: 0 0 60px rgba(16,24,40,.10);
  }
  .topbar { padding: 18px 28px; }
  .brand-name { font-size: 26px; }
  .tabbar { display: none; }
  .scroll-top { right: 24px; bottom: 24px; }
  .proposal-switcher { width: min(420px, 100%); margin-inline: auto; }
  .topnav { display: flex; }
  .topnav .tab {
    flex: none; flex-direction: row; gap: 6px;
    padding: 9px 16px; border-radius: 999px; font-size: 15px;
  }
  .topnav .tab.active { background: rgba(36,44,79,.10); color: var(--brand); }
  #view { padding: 18px 28px 48px; }
  .promos-heading { margin-top: 10px; }
  .promo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* El contenido aprovecha el ancho sin convertir tarjetas en renglones interminables. */
  .list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .nearby-layout {
    display: grid;
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .nearby-rail {
    position: sticky;
    top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .nearby-rail > * { width: 100%; min-width: 0; }
  .nearby-rail .chips { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: none; }
  .nearby-rail .chip { min-height: 50px; padding-inline: 2px; }
  .nearby-rail .install-guide { margin: 0; }
  .nearby-rail .location-bar { margin: 0; }
  .route-shell { padding-top: 18px; }
  .route-options { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .route-card.primary { grid-column: 1 / -1; }
  .nearby-results { min-height: 280px; }
  .nearby-results .list { grid-template-columns: minmax(0, 1fr); }
  .nearby-results .state { padding-top: 34px; }
  .nearby-quick-filter-input { font-size: 14px; }

  .board-head { max-width: 100%; }
  .board-body { display: grid; grid-template-columns: minmax(320px,.88fr) minmax(360px,1.12fr); gap: 24px; align-items: start; }
  .board-body #minimap { grid-column: 1; grid-row: 1; height: min(52dvh, 460px); min-height: 340px; position: sticky; top: 20px; margin-bottom: 0; }
  .board-body > .map-provider-choice { grid-column: 1; grid-row: 2; margin-top: -18px; }
  .board-body .arr-list { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 10px; }

  .section-h { font-size: 24px; }
  .state { padding: 64px 16px; }
  #view.map-view {
    min-height: calc(100dvh - 78px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 24px;
  }
  #view.map-view .location-bar, #view.map-view .map-location-choice, #view.map-view .map-provider-choice { flex: 0 0 auto; }
  #view.map-view .fullmap-wrap,
  #view.map-view .location-bar + .fullmap-wrap,
  #view.map-view .map-location-choice + .fullmap-wrap,
  #view.map-view .fullmap-wrap.with-install-guide {
    height: auto;
    min-height: min(560px, calc(100dvh - 176px));
    flex: 1 1 auto;
    margin-bottom: 0;
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(16,24,40,.10);
  }
  #view.map-view .fullmap-wrap #bigmap { border-radius: 20px; }
  .security-card { padding: 22px; }
  .security-grid { grid-template-columns: 1fr 1fr; }
  .location-dialog { margin: auto; border-radius: 24px; }
  .bus-line-dialog { margin: auto; }
  .bus-line-sheet { border-radius: 26px; box-shadow: 0 22px 70px rgba(10,12,16,.28); }
  .transport-filter-dialog { margin: auto; }
  .transport-filter-sheet { border-radius: 26px; box-shadow: 0 22px 70px rgba(10,12,16,.28); }
  .bus-line-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1120px) {
  .promos-view > .promo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .promos-other .promo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
  .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nearby-results .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1240px) {
  .topbar { padding-inline: 36px; }
  #view { padding-inline: 36px; }
  .nearby-layout { grid-template-columns: 288px minmax(0, 1fr); gap: 30px; }
  .nearby-results .list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .security-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Estado oficial de estaciones de Subte. */
.subte-station-status {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  padding: 3px 7px;
  color: #7a271a;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}
.subte-station-status.is-partial { color: #7a2e0e; background: #fff7ed; border-color: #fed7aa; }
.subte-station-status.is-unknown { color: #344054; background: #f2f4f7; border-color: #d0d5dd; }
.overview-station-status { position: absolute; top: 48px; right: 10px; z-index: 2; }
.overview-card.has-station-status-closed,
.overview-card.has-station-status-unknown { border-color: #f0b4ae; }
.overview-card.has-station-status-closed .overview-directions,
.overview-card.has-station-status-unknown .overview-directions { padding-top: 3px; }
.row-station-status, .board-station-status { margin-top: 5px; }
.transport-search-result:has(.transport-search-status) { grid-template-columns: 39px minmax(0,1fr) auto 16px; }
.transport-search-status { justify-self: end; }
.subte-status-map-marker { background: transparent; border: 0; }
.subte-map-pin { position: relative; display: block; width: 36px; height: 42px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.subte-map-pin strong {
  position: absolute; top: -4px; right: 0; display: grid; width: 17px; height: 17px;
  place-items: center; color: #fff; border: 2px solid #fff; border-radius: 50%;
  font: 900 11px/1 system-ui, sans-serif;
}
.subte-status-card {
  min-width: 0; padding: 17px; color: var(--text); background: #fff;
  border: 1px solid #fecdca; border-radius: 17px; box-shadow: var(--shadow);
}
.subte-status-card.is-partial { border-color: #fed7aa; }
.subte-status-card.is-unknown { border-color: #d0d5dd; }
.subte-status-kicker { color: #b42318; font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.subte-status-card.is-partial .subte-status-kicker { color: #9a3412; }
.subte-status-card.is-unknown .subte-status-kicker { color: #475467; }
.subte-status-card h2 { margin: 5px 0 9px; font-size: 18px; line-height: 1.2; }
.subte-status-card p { margin: 7px 0; color: var(--text2); font-size: 12px; line-height: 1.5; }
.subte-status-date { font-weight: 750; }
.subte-status-link {
  display: inline-flex; margin-top: 9px; padding: 9px 11px; color: #fff;
  background: var(--brand); border-radius: 10px; font-size: 11px; font-weight: 850;
  text-decoration: none;
}
.route-subte-status {
  display: grid; gap: 2px; margin-top: 6px; padding: 7px 8px; color: #7a2e0e;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 9px;
  font-size: 9px; line-height: 1.35; text-decoration: none;
}
.route-subte-status strong { font-size: 9px; }
.route-subte-status span { overflow-wrap: anywhere; }

@media (max-width: 420px) {
  .transport-search-result:has(.transport-search-status) { grid-template-columns: 39px minmax(0,1fr) 16px; }
  .transport-search-status { grid-column: 2; justify-self: start; }
  .transport-search-result:has(.transport-search-status) .transport-search-arrow { grid-column: 3; grid-row: 1 / span 2; }
}
