/* ============================================================
   ZyraBus — diseño limpio, tranquilo y animado
   ============================================================ */
:root {
  /* Verde ZyraBus. El lima puro se usa como RELLENO (con negro encima, como el icono).
     Para texto e iconos sobre fondo claro se usa --brand-ink, más oscuro, para que se lea bien. */
  --brand: #96FF0D;
  --on-brand: #0B0B0C;
  --brand-ink: #3D7A00;
  --brand-inv: #96FF0D;   /* acento sobre superficies oscuras (avisos) */
  --brand-tint: color-mix(in srgb, var(--brand) 22%, transparent);

  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --surface-2: #F1F1EF;
  --text: #0B0B0C;
  --text-2: #6B6B72;
  --text-3: #A1A1A8;
  --border: rgba(0, 0, 0, .06);

  --ok: #16A34A;
  --warn: var(--brand-ink);
  --danger: #E11D48;

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow: 0 1px 0 rgba(0,0,0,.02), 0 8px 24px -12px rgba(0,0,0,.08);
  --shadow-lg: 0 24px 48px -16px rgba(0,0,0,.18);

  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 68px;

  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090A;
    --surface: #141416;
    --surface-2: #1C1C1F;
    --text: #F4F4F5;
    --text-2: #9B9BA3;
    --text-3: #5E5E66;
    --border: rgba(255, 255, 255, .07);
    --shadow: none;
    --shadow-lg: 0 24px 48px -16px rgba(0,0,0,.6);
    --brand-ink: #96FF0D;
    --brand-inv: #3D7A00;
    --brand-tint: color-mix(in srgb, var(--brand) 13%, transparent);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.45 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01";
  letter-spacing: -.011em;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 96px);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
main { max-width: 620px; margin: 0 auto; padding: 0 20px; }
.i { flex: none; display: block; }

/* ---------- tipografía ---------- */
.eyebrow { font-size: 13px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.h1 { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.035em; margin: 2px 0 0; }
.h2 { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.03em; margin: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 600; margin: 28px 2px 10px; }
.section-title small { font-weight: 500; color: var(--text-2); font-size: 13px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.name { font-weight: 600; line-height: 1.3; overflow-wrap: break-word; }
.meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; margin-top: 2px; }
.meta .i { color: var(--text-3); }
.sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }

/* ---------- cabecera ---------- */
.header { padding: calc(env(safe-area-inset-top) + 20px) 0 4px; }
.header-row { display: flex; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; display: block; }
.location-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; max-width: 55%;
  font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--surface); border: 1px solid var(--border);
  padding: 6px 10px 6px 8px; border-radius: 999px;
}
.location-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-pill .i { color: var(--brand-ink); }

.searchbar {
  display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 0 14px; height: 50px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text-3);
  box-shadow: var(--shadow); transition: box-shadow .3s var(--ease), border-color .3s;
}
.searchbar:focus-within { border-color: color-mix(in srgb, var(--brand-ink) 55%, transparent); box-shadow: 0 0 0 4px var(--brand-tint); }
.searchbar input { flex: 1; border: 0; outline: 0; background: none; font: inherit; color: var(--text); height: 100%; min-width: 0; }
.searchbar input::placeholder { color: var(--text-3); }
.searchbar .fake { color: var(--text-3); }

.topbar { display: flex; align-items: center; gap: 12px; padding: calc(env(safe-area-inset-top) + 14px) 0 8px; }
.circle-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .25s var(--spring), background .2s;
}
.circle-btn:active { transform: scale(.9); }
.circle-btn.on { color: var(--brand-ink); background: var(--brand-tint); border-color: transparent; }
.circle-btn.on .i { fill: currentColor; animation: pop .45s var(--spring); }

/* ---------- tarjetas y filas ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 18px;
}
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; position: relative;
  transition: background .2s;
}
.list .row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 1px; background: var(--border); }
a.row:active, button.row:active { background: var(--surface-2); }
.pressable { transition: transform .35s var(--spring); }
.pressable:active { transform: scale(.975); }
.chev { color: var(--text-3); }
.icon-tile {
  width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text-2);
  display: grid; place-items: center; flex: none;
}

/* ---------- número de línea: tono suave del color de la línea ---------- */
.badge {
  --lc: var(--brand-ink);
  display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 30px; padding: 0 9px;
  border-radius: 9px; font-weight: 700; font-size: 14px; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--lc) 13%, var(--surface));
  color: color-mix(in srgb, var(--lc) 75%, var(--text));
  flex: none;
}
.badge--lg { min-width: 58px; height: 38px; font-size: 17px; border-radius: 11px; }
.badges { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; max-width: 42%; }
.more { font-size: 12px; color: var(--text-3); align-self: center; }

/* ---------- estado "¿llego?" ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status--ok { color: var(--text-2); }
.status--ok::before { background: var(--brand-ink); }
.status--soon { color: var(--warn); }
.status--now { color: var(--danger); }
.status--now::before { animation: live 1.4s ease-out infinite; }
.status--miss { color: var(--text-3); font-weight: 500; }

/* ---------- tiempo ---------- */
.eta { text-align: right; flex: none; line-height: 1; }
.eta-num { font-size: 26px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; display: inline-flex; }
.eta-unit { font-size: 13px; font-weight: 500; color: var(--text-2); margin-left: 3px; }
.eta-now { font-size: 17px; font-weight: 700; color: var(--danger); }
.eta-sub { font-size: 12px; font-weight: 500; color: var(--text-3); margin-top: 5px; font-variant-numeric: tabular-nums; }
.eta-time { font-size: 20px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* números rodantes */
.roll { display: inline-flex; height: 1em; line-height: 1; overflow: hidden; }
.roll-d { display: inline-block; height: 1em; overflow: hidden; }
.roll-c { display: flex; flex-direction: column; will-change: transform; }
.roll-c span { height: 1em; line-height: 1; display: block; text-align: center; }

/* ---------- tarjeta principal ---------- */
.hero {
  position: relative; overflow: hidden; margin-top: 20px; padding: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow);
  isolation: isolate;
}
.hero::before { /* brillo que sigue al dedo / ratón */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--brand-tint), transparent 60%);
}
.hero:hover::before, .hero:active::before { opacity: 1; }
.hero::after { /* resplandor verde muy suave arriba */
  content: ""; position: absolute; z-index: -2; width: 260px; height: 260px; right: -80px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%);
  filter: blur(10px);
}
.hero-top { display: flex; align-items: center; justify-content: space-between; }
.hero-big { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 2px; }
.hero-big .label { font-size: 17px; font-weight: 600; color: var(--text-2); }
.hero-big .num { font-size: 64px; line-height: .9; font-weight: 700; letter-spacing: -.055em; font-variant-numeric: tabular-nums; display: inline-flex; }
.hero-big .unit { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.hero-big.now .num, .hero-big.now .unit { color: var(--danger); }
.hero-dest { font-size: 17px; font-weight: 600; margin-top: 6px; }
.hero-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.fact { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.fact .i { color: var(--text-2); }
.fact b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.fact span { font-size: 12px; color: var(--text-2); }
.progress { height: 4px; border-radius: 4px; background: var(--surface-2); margin-top: 16px; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transform-origin: left; transition: transform 1s var(--ease); }

.permission { text-align: center; padding: 28px 22px; }
.permission .halo {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand-ink); position: relative;
}
.permission .halo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: ripple 2.4s var(--ease) infinite; }
.permission p { color: var(--text-2); margin: 6px 0 18px; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; padding: 0 18px;
  border: 0; border-radius: var(--r-md); font-weight: 600; cursor: pointer;
  background: var(--text); color: var(--bg); transition: transform .3s var(--spring), opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn--brand { background: var(--brand); color: var(--on-brand); }
.btn--soft { background: var(--surface-2); color: var(--text); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; display: grid; place-items: center;
  color: var(--text-3); cursor: pointer; flex: none; transition: color .2s, background .2s, transform .3s var(--spring);
}
.icon-btn:active { transform: scale(.88); }
.icon-btn.on { color: var(--brand-ink); background: var(--brand-tint); }
.icon-btn.on .i { animation: ring .7s var(--ease); transform-origin: 50% 10%; }

/* ---------- chips de filtro y segmentado (con indicador deslizante) ---------- */
.chips { position: relative; display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn {
  position: relative; z-index: 1; flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text-2);
  transition: color .25s, border-color .25s, background .25s;
}
.chip-btn.active { color: var(--bg); background: var(--text); border-color: var(--text); }
.chip-btn .badge { height: 24px; min-width: 38px; font-size: 13px; }
.chip-btn:has(.badge) { padding: 0 5px; }
.chip-btn.active:has(.badge) { background: var(--surface); border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }

.segmented { position: relative; display: flex; padding: 4px; border-radius: 14px; background: var(--surface-2); margin: 10px 0 14px; }
.segmented button {
  position: relative; z-index: 1; flex: 1; border: 0; background: none; padding: 10px 8px; font-size: 14px; font-weight: 600;
  color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; transition: color .3s;
}
.segmented button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.segmented button.active { color: var(--text); }
.seg-thumb {
  position: absolute; left: 0; top: 4px; border-radius: 10px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px -4px rgba(0,0,0,.1);
  opacity: 0; transition: transform .5s var(--spring), width .5s var(--spring);
}

/* ---------- recorrido de la línea ---------- */
.timeline { position: relative; list-style: none; margin: 0; padding: 6px 0; }
.timeline::before {
  content: ""; position: absolute; left: 31px; top: 30px; bottom: 30px; width: 3px; border-radius: 3px;
  background: var(--lc, var(--brand-ink)); transform-origin: top; animation: draw 1.1s var(--ease) both;
}
.timeline li { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 52px; }
.timeline li::before {
  content: ""; position: absolute; left: 26px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--lc, var(--brand-ink)); box-sizing: border-box;
}
.timeline li:first-child::before, .timeline li:last-child::before { background: var(--lc, var(--brand-ink)); }
.timeline a { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.timeline .off { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; flex: none; }
.timeline li.target { background: var(--brand-tint); }

/* ---------- planificador ---------- */
.route-inputs { position: relative; padding: 6px 60px 6px 16px; }
.route-inputs .field { display: flex; align-items: center; gap: 12px; height: 54px; }
.route-inputs .field + .field { border-top: 1px solid var(--border); }
.route-inputs input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-weight: 500; color: var(--text); height: 100%; }
.route-inputs input::placeholder { color: var(--text-3); font-weight: 400; }
.dot-from { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--text); flex: none; margin: 0 4px; }
.dot-to { color: var(--brand-ink); }
.route-inputs .link { position: absolute; left: 25px; top: 44px; height: 32px; border-left: 2px dotted var(--text-3); }
.swap { position: absolute; right: 12px; top: 50%; margin-top: -21px; }
.swap .i { transition: transform .5s var(--spring); }
.swap.spin .i { transform: rotate(180deg); }
.picker { margin-top: 8px; }
.picker:empty { display: none; }

.plan-card { padding: 18px; }
.plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plan-lines { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.plan-lines .i { color: var(--text-3); }
.plan-arrive { text-align: right; flex: none; white-space: nowrap; }
.plan-arrive b { font-size: 24px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; display: block; line-height: 1.1; }
.tags { display: flex; gap: 6px; margin-bottom: 10px; }
.tag { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); padding: 3px 8px; border-radius: 999px; }
.hint { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-2); margin: 0 4px 12px; }
.hint .i { color: var(--text-3); margin-top: 1px; }
body.trip-on { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 170px); }
.best-tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--brand-ink); background: var(--brand-tint); padding: 3px 8px; border-radius: 999px; }
.steps { list-style: none; padding: 0; margin: 16px 0 14px; position: relative; }
.steps li { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.steps li:last-child { padding-bottom: 0; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; border-left: 2px dotted var(--text-3); }
.steps li.ride:not(:last-child)::after { border-left: 3px solid var(--lc, var(--brand-ink)); left: 14.5px; }
.step-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.steps li.ride .step-icon { background: color-mix(in srgb, var(--lc, var(--brand-ink)) 14%, var(--surface)); color: color-mix(in srgb, var(--lc, var(--brand-ink)) 80%, var(--text)); }
.step-body { padding-top: 5px; font-size: 14px; min-width: 0; }
.step-body b { font-weight: 600; }
.step-body a { text-decoration: underline; text-decoration-color: var(--text-3); text-underline-offset: 3px; }

/* ---------- mapa ---------- */
.map { height: 280px; border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); margin: 4px 0 14px; }
.map--off { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-3); height: 64px; font-size: 14px; }
.map-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.map-wrap.open { grid-template-rows: 1fr; }
.map-wrap > div { overflow: hidden; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #0A84FF; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(10,132,255,.4); animation: me 2s infinite; }

/* ---------- vacío, error, carga ---------- */
.empty { text-align: center; color: var(--text-2); padding: 40px 20px; }
.empty .icon-tile { margin: 0 auto 14px; width: 52px; height: 52px; border-radius: 16px; }
.empty b { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 10px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent);
  animation: shimmer 1.4s infinite;
}
.sk-row { display: flex; align-items: center; gap: 14px; padding: 16px; }
.sk-row + .sk-row { border-top: 1px solid var(--border); }

/* ---------- barra inferior flotante ---------- */
.nav {
  position: fixed; left: 0; right: 0; margin-inline: auto; bottom: calc(env(safe-area-inset-bottom) + 14px);
  transform: translateZ(0); will-change: transform; /* capa propia: se queda pegada abajo al hacer scroll */
  width: min(420px, calc(100% - 32px)); height: var(--nav-h); padding: 6px; z-index: 10;
  display: flex; border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.nav a {
  position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--text-3); transition: color .3s;
}
.nav a .i { transition: transform .4s var(--spring); }
.nav a.active { color: var(--text); }
.nav a.active .i { transform: translateY(-1px) scale(1.08); }
.nav-thumb {
  position: absolute; top: 6px; left: 0; border-radius: 18px; background: var(--surface-2); opacity: 0;
  transition: transform .55s var(--spring), width .55s var(--spring), opacity .25s;
}

/* ---------- viaje activo (isla flotante) ---------- */
.island {
  position: fixed; left: 0; right: 0; margin-inline: auto; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 26px);
  width: min(420px, calc(100% - 32px)); transform: translateZ(0);
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; z-index: 11;
  background: #0B0B0C; color: #fff; border-radius: 22px; box-shadow: var(--shadow-lg);
  animation: island-in .6s var(--spring) both;
}
@media (prefers-color-scheme: dark) { .island { background: #232326; } }
.island[hidden] { display: none; }
.island .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.1); flex: none; }
.island .ic .i { animation: ring 1.6s var(--ease) infinite; transform-origin: 50% 10%; }
.island small { display: block; font-size: 12px; opacity: .6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.island .t { font-size: 15px; font-weight: 600; }
.island .icon-btn { color: rgba(255,255,255,.6); }
.island.alert { background: var(--brand); color: var(--on-brand); }
.island.alert .icon-btn { color: rgba(0,0,0,.55); }
.island.alert .ic { background: rgba(0,0,0,.08); }

/* ---------- aviso ---------- */
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 12px); z-index: 20;
  display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px);
  padding: 10px 16px 10px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg);
  transform: translate(-50%, -140%) scale(.9); opacity: 0; filter: blur(6px);
  transition: transform .5s var(--spring), opacity .3s, filter .3s;
}
.toast .i { color: var(--brand-inv); }
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; filter: blur(0); }

.offline-pill {
  display: none; align-items: center; gap: 6px; width: fit-content; margin: calc(env(safe-area-inset-top) + 8px) auto 0;
  font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); padding: 5px 10px; border-radius: 999px;
}
body.offline .offline-pill { display: flex; }

.credits { max-width: 620px; margin: 32px auto 0; padding: 0 24px; font-size: 11px; line-height: 1.5; color: var(--text-3); text-align: center; }

/* ---------- intro (vídeo del logo) ---------- */
body.intro-on { overflow: hidden; }
body.intro-on .nav, body.intro-on .credits { opacity: 0; }
.nav, .credits { transition: opacity .6s var(--ease) .15s; }
.intro {
  position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center;
  transition: opacity .6s var(--ease), filter .6s var(--ease);
}
.intro video {
  width: min(100vw, 100vh); height: min(100vw, 100vh); object-fit: contain; background: #000;
  opacity: 0; transition: opacity .25s, transform .7s var(--ease), filter .7s var(--ease);
}
.intro.intro--playing video { opacity: 1; }
.intro-still {
  position: absolute; width: 96px; height: auto; opacity: 0; transform: scale(.85);
  filter: drop-shadow(0 0 24px color-mix(in srgb, var(--brand) 60%, transparent));
  transition: opacity .5s var(--ease), transform .8s var(--spring);
}
.intro.intro--still .intro-still { opacity: 1; transform: scale(1); }
.intro-skip {
  position: absolute; right: 20px; bottom: calc(env(safe-area-inset-bottom) + 24px);
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: rgba(255,255,255,.75);
  font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; animation: skip-in .5s var(--ease) 1s forwards;
}
.intro--out { opacity: 0; pointer-events: none; }
.intro--out video, .intro--out .intro-still { transform: scale(1.08); filter: blur(10px); }

::selection { background: var(--brand); color: var(--on-brand); }

/* ---------- animaciones ---------- */
.page-in { animation: page .55s var(--ease) backwards; } /* backwards: al terminar no deja transform (rompería position:fixed) */
.in { animation: rise .6s var(--ease) both; animation-delay: var(--d, 0ms); }

@keyframes page { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(8px); } }
@keyframes skip-in { from { transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }
@keyframes ripple { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-4deg); } }
@keyframes draw { from { transform: scaleY(0); } }
@keyframes island-in { from { opacity: 0; transform: translateY(20px) scale(.85); filter: blur(8px); } }
@keyframes me { 70% { box-shadow: 0 0 0 12px rgba(10,132,255,0); } 100% { box-shadow: 0 0 0 0 rgba(10,132,255,0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ============================================================
   Bienvenida (usuarios nuevos) — en oscuro, continúa el negro de la intro
   ============================================================ */
.ob {
  position: fixed; inset: 0; z-index: 90; background: #000; color: var(--text);
  display: flex; flex-direction: column; overflow: hidden;
  color-scheme: dark;
  --surface: #141416; --surface-2: #1E1E21; --text: #F4F4F5; --text-2: #A1A1A8; --text-3: #5E5E66;
  --border: rgba(255,255,255,.08); --brand-ink: #96FF0D; --brand-tint: color-mix(in srgb, #96FF0D 14%, transparent);
  --shadow: none;
  opacity: 0; transition: opacity .5s var(--ease), transform .7s var(--ease), filter .7s var(--ease);
}
.ob.show { opacity: 1; }
.ob.out { opacity: 0; transform: scale(1.03); filter: blur(10px); pointer-events: none; }
body.ob-on { overflow: hidden; }
body.ob-on .nav, body.ob-on .credits { opacity: 0; }

.ob-top { display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top) + 16px) 22px 0; height: calc(env(safe-area-inset-top) + 58px); flex: none; }
.ob-logo { height: 28px; width: auto; }
.ob-skip { border: 0; background: none; color: var(--text-2); font-weight: 600; font-size: 15px; cursor: pointer; padding: 8px; }
.ob-skip[hidden] { display: none; }

.ob-step {
  position: absolute; inset: calc(env(safe-area-inset-top) + 58px) 0 0 0; display: flex; flex-direction: column;
  max-width: 560px; margin: 0 auto;
  opacity: 0; transform: translateX(48px); filter: blur(8px); pointer-events: none;
  transition: opacity .55s var(--ease), transform .7s var(--ease), filter .55s var(--ease);
}
.ob-step.active { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.ob-step.leave { transform: translateX(-48px); }

.ob-slides { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; outline: none; }
.ob-slides::-webkit-scrollbar { display: none; }
.ob-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 28px; text-align: center; }
.ob-title { font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -.035em; margin: 0 0 12px; }
.ob-title.left, .ob-text.left { text-align: left; }
.ob-text { color: var(--text-2); font-size: 16px; line-height: 1.5; margin: 0 auto; max-width: 330px; }
.ob-text.left { max-width: none; margin-bottom: 18px; }
.ob-text b { color: var(--text); font-weight: 600; }
.ob-slide .ob-title, .ob-slide .ob-text { opacity: 0; transform: translateY(12px); filter: blur(6px); transition: all .7s var(--ease); }
.ob-slide.is-active .ob-title { opacity: 1; transform: none; filter: none; transition-delay: .12s; }
.ob-slide.is-active .ob-text { opacity: 1; transform: none; filter: none; transition-delay: .22s; }

.ob-foot { flex: none; padding: 12px 24px calc(env(safe-area-inset-bottom) + 24px); }
.ob-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.ob-dots button { width: 7px; height: 7px; border-radius: 99px; border: 0; padding: 0; background: var(--text-3); cursor: pointer; transition: width .5s var(--spring), background .3s; }
.ob-dots button.active { width: 24px; background: var(--brand); }
.btn:disabled { opacity: .3; cursor: not-allowed; transform: none; }

/* ilustraciones */
.ob-art { position: relative; width: 100%; max-width: 330px; height: 290px; display: grid; place-items: center; margin-bottom: 30px; }
.ob-art > * { opacity: 0; }
.is-active .ob-art > * { opacity: 1; transition: opacity .6s; }

.art-glow { position: absolute; inset: 20% 10%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 30%, transparent), transparent 65%); filter: blur(24px); z-index: 0; }
.art-card { position: relative; z-index: 1; width: 290px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 20px; }
.is-active .art-card { animation: card-in .9s var(--spring) both, float 5s ease-in-out 1s infinite; }
.art-row { display: flex; justify-content: space-between; align-items: center; }
.art-card .hero-big { margin: 14px 0 4px; }
.art-card .hero-big .num { font-size: 58px; }
.art-dest { font-weight: 600; }
.art-facts { display: flex; gap: 8px; margin-top: 14px; }
.art-facts span { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); padding: 7px 10px; border-radius: 10px; }

.art-stack { display: grid; gap: 10px; width: 300px; }
.art-pill { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 12px 14px; text-align: left; font-weight: 600; font-size: 15px; }
.art-pill .badge { --lc: var(--brand); }
.is-active .art-pill { animation: pill-in .8s var(--spring) both; }
.is-active .art-pill:nth-child(2) { animation-delay: .12s; }
.is-active .art-pill:nth-child(3) { animation-delay: .24s; }

.art-route { position: relative; width: 280px; text-align: left; }
.art-route ol { list-style: none; margin: 0; padding: 0; }
.art-route li { position: relative; height: 48px; display: flex; align-items: center; gap: 10px; padding-left: 50px; font-weight: 600; color: var(--text-2); }
.art-route li::before { content: ""; position: absolute; left: 17px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #000; border: 3px solid var(--brand); }
.art-route li.dest { color: var(--text); }
.art-route li.dest::before { background: var(--brand); }
.art-line { position: absolute; left: 22px; top: 24px; height: 144px; width: 3px; background: var(--brand); border-radius: 3px; transform-origin: top; }
.is-active .art-line { animation: draw 1s var(--ease) both; }
.art-bus { position: absolute; left: 7px; top: 8px; width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: #000; display: grid; place-items: center; z-index: 2; box-shadow: 0 0 0 4px #000; }
.is-active .art-bus { animation: bus-ride 2.6s var(--ease) .6s both; }
.art-bell { color: var(--brand); display: inline-flex; }
.is-active .art-bell { animation: ring 1s var(--ease) 3s 2; transform-origin: 50% 10%; }
.art-toast { position: absolute; left: 50%; bottom: -58px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #000; font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 999px; white-space: nowrap; opacity: 0; }
.is-active .art-toast { animation: toast-pop .7s var(--spring) 3s both; }

.art-offline { position: relative; width: 300px; height: 260px; display: grid; place-items: center; }
.art-orb { position: relative; width: 132px; height: 132px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); }
.is-active .art-orb { animation: card-in .9s var(--spring) both; }
.art-check { position: absolute; right: 4px; bottom: 6px; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #000; display: grid; place-items: center; box-shadow: 0 0 0 5px #000; }
.is-active .art-check { animation: pop .6s var(--spring) .7s both; }
.art-chip { position: absolute; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.art-chip.c1 { left: 6px; top: 34px; } .art-chip.c2 { right: 0; top: 70px; } .art-chip.c3 { left: 30px; bottom: 26px; }
.is-active .art-chip { animation: chip-in .8s var(--spring) both, float 4.5s ease-in-out 1.2s infinite; }
.is-active .art-chip.c2 { animation-delay: .5s, 1.6s; } .is-active .art-chip.c3 { animation-delay: .65s, 2s; } .is-active .art-chip.c1 { animation-delay: .35s, 1.2s; }

/* términos */
.ob-scroll { flex: 1; overflow-y: auto; padding: 18px 24px 12px; }
.ob-points { list-style: none; margin: 0; padding: 0; }
.ob-points li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.ob-points .icon-tile { color: var(--brand-ink); background: var(--surface); }
.ob-points b { display: block; font-weight: 600; margin-bottom: 2px; }
.ob-points span { font-size: 14px; color: var(--text-2); line-height: 1.45; }
.ob-link { display: inline-flex; align-items: center; gap: 8px; text-align: left; margin-top: 18px; border: 0; background: none; padding: 6px 0; color: var(--brand-ink); font-weight: 600; font-size: 14.5px; cursor: pointer; }

.check { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--text-2); cursor: pointer; margin-bottom: 16px; line-height: 1.4; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { width: 24px; height: 24px; flex: none; border-radius: 8px; border: 2px solid var(--text-3); display: grid; place-items: center; color: transparent; transition: background .25s, border-color .25s; }
.check-box .i { transform: scale(0); transition: transform .45s var(--spring); }
.check input:checked + .check-box { background: var(--brand); border-color: var(--brand); color: #000; }
.check input:checked + .check-box .i { transform: scale(1); }
.check input:focus-visible + .check-box { box-shadow: 0 0 0 4px var(--brand-tint); }
.check u { text-decoration-color: var(--text-3); text-underline-offset: 3px; }

/* permisos */
.perm { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.perm .icon-tile { color: var(--brand-ink); background: var(--surface-2); }
.perm b { display: block; font-weight: 600; }
.perm span { font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.perm-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-width: 94px; justify-content: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 0; font-size: 13.5px; font-weight: 700; cursor: pointer; background: var(--brand); color: #000; transition: transform .3s var(--spring), background .3s, color .3s; }
.perm-btn:active { transform: scale(.94); }
.perm-btn.granted { background: var(--brand-tint); color: var(--brand); cursor: default; }
.perm-btn.granted .i { animation: pop .5s var(--spring); }
.perm-btn.denied, .perm-btn.unsupported { background: var(--surface-2); color: var(--text-3); cursor: default; }
.mini-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); border-top-color: #000; animation: spin .7s linear infinite; }
.ob-note { font-size: 13px; color: var(--text-3); margin-top: 16px; }

/* ============================================================
   Hoja deslizable (términos)
   ============================================================ */
.sheet { position: fixed; inset: 0; z-index: 120; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .4s; backdrop-filter: blur(2px); }
.sheet-panel {
  position: absolute; left: 50%; bottom: 0; width: min(620px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--surface); color: var(--text); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg);
  transform: translate(-50%, 100%); transition: transform .55s var(--ease);
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: translate(-50%, 0); }
.sheet-grab { width: 40px; height: 5px; border-radius: 5px; background: var(--text-3); opacity: .5; margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 8px; }
.sheet-body { overflow-y: auto; padding: 0 22px calc(env(safe-area-inset-bottom) + 28px); }
.legal h3 { font-size: 16px; margin: 22px 0 6px; letter-spacing: -.01em; }
.legal p, .legal li { font-size: 14.5px; color: var(--text-2); line-height: 1.6; }
.legal ul { padding-left: 18px; }
.legal li { margin-bottom: 8px; }
.legal b { color: var(--text); font-weight: 600; }
.legal-meta { font-size: 12.5px !important; color: var(--text-3) !important; }

/* ============================================================
   Tutorial guiado
   ============================================================ */
.tour { position: fixed; inset: 0; z-index: 95; opacity: 0; transition: opacity .4s; }
.tour.show { opacity: 1; }
.tour.out { opacity: 0; }
.tour-hole {
  position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none;
  box-shadow: 0 0 0 3px var(--brand), 0 0 0 200vmax rgba(0, 0, 0, .62);
  transition: transform .6s var(--spring), width .6s var(--spring), height .6s var(--spring), border-radius .4s;
}
.tour-card {
  position: absolute; left: 0; top: 0; background: var(--surface); color: var(--text); border-radius: 22px; padding: 18px 18px 14px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  transition: transform .6s var(--spring);
}
.tour-card > :not(.tour-bar) { opacity: 0; transform: translateY(6px); filter: blur(4px); transition: all .45s var(--ease); }
.tour-card.in > :not(.tour-bar) { opacity: 1; transform: none; filter: none; }
.tour-card.in > :nth-child(2) { transition-delay: .05s; }
.tour-card.in > :nth-child(3) { transition-delay: .1s; }
.tour-card.in > :nth-child(4) { transition-delay: .15s; }
.tour-count { font-size: 12px; font-weight: 600; color: var(--text-3); }
.tour-title { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.tour-text { font-size: 14.5px; color: var(--text-2); line-height: 1.5; margin-top: 6px; }
.tour-text b { color: var(--text); font-weight: 600; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.tour-skip { border: 0; background: none; color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer; padding: 8px 0; }
.tour-next { width: auto; height: 42px; padding: 0 20px; }
.tour-bar { height: 3px; border-radius: 3px; background: var(--surface-2); margin-top: 14px; overflow: hidden; }
.tour-bar i { display: block; height: 100%; background: var(--brand); transform-origin: left; transform: scaleX(0); transition: transform .6s var(--ease); }

.circle-btn--sm { width: 36px; height: 36px; color: var(--text-2); }
.credits-links { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; }
.credits-links button { border: 0; background: none; padding: 4px; font: inherit; font-size: 11.5px; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--text-3); cursor: pointer; }

@keyframes card-in { from { opacity: 0; transform: translateY(24px) rotate(-3deg) scale(.94); filter: blur(8px); } }
@keyframes pill-in { from { opacity: 0; transform: translateX(40px) scale(.96); filter: blur(6px); } }
@keyframes chip-in { from { opacity: 0; transform: scale(.6); } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes bus-ride { from { transform: translateY(0); } to { transform: translateY(144px); } }
@keyframes toast-pop { from { opacity: 0; transform: translate(-50%, 12px) scale(.8); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* ============================================================
   Mapa (sección propia)
   ============================================================ */
body.map-on { padding-bottom: 0; overflow: hidden; }
body.map-on .credits { display: none; }
body.map-on main { max-width: none; padding: 0; }
.map-page { position: fixed; inset: 0; z-index: 1; background: var(--surface-2); animation: map-in .5s var(--ease) backwards; }
@keyframes map-in { from { opacity: 0; } }
#bigmap { position: absolute; inset: 0; }
#bigmap .empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.map-top { position: absolute; left: 16px; right: 16px; top: calc(env(safe-area-inset-top) + 14px); z-index: 2; max-width: 588px; margin: 0 auto; }
.map-top .searchbar { box-shadow: var(--shadow-lg); }
.map-locate { position: absolute; right: 16px; z-index: 2; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 30px); width: 48px; height: 48px; box-shadow: var(--shadow-lg); color: var(--brand-ink); transition: transform .3s var(--spring), bottom .55s var(--ease); }
.map-sheet {
  position: absolute; left: 12px; right: 12px; z-index: 3; max-width: 596px; margin: 0 auto;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 26px);
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 16px; box-shadow: var(--shadow-lg);
  transform: translateY(calc(100% + 120px)); opacity: 0; transition: transform .6s var(--spring), opacity .3s;
}
.map-sheet.open { transform: none; opacity: 1; }
.map-page:has(.map-sheet.open) .map-locate { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 290px); }
.map-sheet-head { display: flex; align-items: flex-start; gap: 8px; }
.map-deps { margin-top: 6px; }
.mini { display: flex; align-items: center; gap: 10px; }
.mini .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-deps .mini { margin-top: 10px; }
.maplibregl-ctrl-top-right { top: calc(env(safe-area-inset-top) + 76px) !important; }

/* botón "Avisarme al llegar" activado */
.trip-btn.on { background: var(--brand); color: var(--on-brand); }
.trip-btn.on svg { animation: ring .8s var(--ease); transform-origin: 50% 10%; }
.nav a { font-size: 10.5px; }

/* ============================================================
   Asistente (chat propio)
   ============================================================ */
.ask-card {
  display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.ask-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, color-mix(in srgb, var(--brand) 14%, transparent) 50%, transparent 70%); transform: translateX(-100%); animation: sheen 4s var(--ease) 1.5s infinite; pointer-events: none; }
.ask-card b { display: block; font-size: 15px; }
.ask-card span span { font-size: 13px; color: var(--text-2); }
.ask-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); flex: none; }
.ask-icon.sm { width: 32px; height: 32px; border-radius: 10px; }
@keyframes sheen { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

body.chat-on { padding-bottom: 0; }
body.chat-on .nav, body.chat-on .credits { display: none; }
.chat { min-height: 100vh; padding-bottom: calc(env(safe-area-inset-bottom) + 96px); }
.chat-top { position: sticky; top: 0; z-index: 5; margin: 0 -20px; padding-left: 20px; padding-right: 20px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.chat-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-title b { display: block; font-size: 15px; }
.chat-title span { font-size: 12px; color: var(--text-2); }

.chat-welcome { text-align: center; padding: 36px 4px 10px; }
.ask-orb { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 24px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); box-shadow: 0 12px 40px -10px color-mix(in srgb, var(--brand) 70%, transparent); animation: float 5s ease-in-out infinite; }
.chat-welcome p { margin: 6px 0 22px; }
.chat-suggest { display: grid; gap: 8px; text-align: left; }
.chip-q { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 16px; padding: 12px 14px; font: inherit; font-size: 14.5px; font-weight: 500; text-align: left; cursor: pointer; transition: transform .3s var(--spring), border-color .2s; }
.chip-q:active { transform: scale(.97); }
.chip-q:hover { border-color: color-mix(in srgb, var(--brand-ink) 40%, transparent); }
.chip-q.sm { padding: 8px 12px; border-radius: 999px; font-size: 13.5px; }

.chat-log { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.msg { display: flex; flex-direction: column; max-width: 100%; }
.msg.user { align-items: flex-end; }
.msg.user .bubble { background: var(--text); color: var(--bg); border-radius: 20px 20px 6px 20px; padding: 10px 14px; max-width: 82%; font-size: 15px; }
.msg.bot { position: relative; padding-left: 38px; align-items: flex-start; gap: 8px; }
.bot-avatar { position: absolute; left: 0; top: 2px; width: 28px; height: 28px; border-radius: 9px; }
.msg.bot .bubble { font-size: 15px; line-height: 1.55; padding: 4px 0; }
.msg.bot .bubble b { font-weight: 700; }
.msg.bot .bubble .hl { font-weight: 600; color: var(--text); background: color-mix(in srgb, var(--brand-ink) 11%, transparent); border-radius: 5px; padding: 0 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.msg.in { animation: rise .5s var(--ease) both; }
.msg.bot-in > * { animation: rise .6s var(--ease) both; }
.msg.bot-in > :nth-child(3) { animation-delay: .08s; } .msg.bot-in > :nth-child(4) { animation-delay: .16s; } .msg.bot-in > :nth-child(5) { animation-delay: .24s; }

.msg.typing .bubble { display: inline-flex; gap: 5px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px 18px 18px 6px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: dot 1.1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.bot-card { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.bot-card .steps { margin: 10px 0 2px; }
.bot-card .mini { padding: 8px 0; margin: 0; }
.bot-card .mini + .mini { border-top: 1px solid var(--border); }
.bot-card .mini .name { flex: 1; min-width: 0; font-weight: 500; font-size: 14.5px; white-space: normal; }
.bot-card .mini .meta { display: block; }
.bot-card .eta-num { font-size: 22px; }
.bot-card-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding-bottom: 4px; color: var(--text-2); }
.bot-card-title .i { color: var(--brand-ink); }
.bot-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.bot-actions .btn { width: auto; height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

.bus-line { list-style: none; margin: 8px 0 8px; padding: 0; position: relative; }
.bus-line::before { content: ""; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--lc, var(--brand-ink)); opacity: .35; }
.bus-line li { position: relative; display: flex; align-items: center; gap: 8px; min-height: 30px; padding-left: 32px; font-size: 14px; color: var(--text-2); }
.bus-line li::before { content: ""; position: absolute; left: 7px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--lc, var(--brand-ink)); box-sizing: border-box; }
.bus-line li.gap { color: var(--text-3); min-height: 18px; }
.bus-line li.gap::before { display: none; }
.bus-line li.board { color: var(--text); font-weight: 600; }
.bus-line li.board::before { background: var(--lc, var(--brand-ink)); }
.bus-line .tag { font-size: 11px; font-weight: 700; color: var(--on-brand); background: var(--brand); padding: 2px 7px; border-radius: 999px; }
.bus-dot { position: absolute; left: -2px; top: 50%; margin-top: -14px; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); z-index: 1; box-shadow: 0 0 0 3px var(--surface); animation: bus-bob 1.6s ease-in-out infinite; }
.bus-line li.bus::before { display: none; }
@keyframes bus-bob { 50% { transform: translateY(3px); } }

.chat-input {
  position: fixed; left: 0; right: 0; margin-inline: auto; transform: translateZ(0); bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 10;
  width: min(588px, calc(100% - 24px)); display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow-lg);
  transition: border-color .25s, box-shadow .25s;
}
.chat-input:focus-within { border-color: color-mix(in srgb, var(--brand-ink) 45%, transparent); }
.chat-input textarea { flex: 1; border: 0; outline: 0; resize: none; background: none; font: inherit; font-size: 16px; color: var(--text); padding: 10px 0; max-height: 110px; line-height: 1.35; }
.chat-input textarea::placeholder { color: var(--text-3); }
.chat-send, .chat-mic { width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .3s var(--spring), background .2s; }
.chat-send { background: var(--brand); color: var(--on-brand); }
.chat-send:active, .chat-mic:active { transform: scale(.88); }
.chat-mic { background: none; color: var(--text-2); }
.chat-mic[hidden] { display: none; }
.chat-mic.on { background: var(--danger); color: #fff; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .6; } }
/* en el chat, el aviso de viaje flota encima de la caja de escribir y deja sitio a los mensajes */
body.chat-on .island { bottom: calc(env(safe-area-inset-bottom) + 78px); }
body.chat-on.trip-on .chat { padding-bottom: calc(env(safe-area-inset-bottom) + 170px); }

.later-note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 12px; border-radius: 16px; background: var(--brand-tint); color: var(--text); font-size: 14px; }
.later-note .i { color: var(--brand-ink); flex: none; }

/* ============================================================
   MIS BONOS
   ============================================================ */
.bcard { position: relative; aspect-ratio: 1.586; border-radius: 18px; perspective: 1200px; }
.bcard-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s var(--spring); }
.flipper { cursor: pointer; }
.flipper.flipped .bcard-inner { transform: rotateY(180deg); }
.bcard-face {
  position: absolute; inset: 0; border-radius: 18px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 18px 40px -18px rgba(0,0,0,.45);
}
.bcard > .bcard-face { position: absolute; }
.bcard-front {
  color: #fff; padding: 18px 20px; display: flex; flex-direction: column;
  background: radial-gradient(120% 90% at 100% 0%, var(--c3) 0%, transparent 45%), linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
}
.bcard-front::after { /* brillo */
  content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.18) 45%, transparent 60%);
  transform: translateX(-100%); animation: shine 3.2s var(--ease) 0.6s 1 both; pointer-events: none;
}
@keyframes shine { to { transform: translateX(100%); } }
.bcard-waves { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; }
.bcard-waves path { fill: none; stroke: #fff; stroke-width: 1.2; }
.bcard-top { position: relative; display: flex; justify-content: space-between; align-items: center; }
.bcard-type { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: rgba(0,0,0,.22); backdrop-filter: blur(6px); }
.bcard-name { position: relative; margin-top: auto; font-size: 20px; font-weight: 700; letter-spacing: -.01em; text-shadow: 0 1px 8px rgba(0,0,0,.2); }
.bcard-holder { position: relative; font-size: 12.5px; opacity: .85; margin-top: 2px; }
.bcard-bottom { position: relative; display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12px; }
.bcard-num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: .06em; }
.bcard-exp { text-align: right; font-size: 14px; font-weight: 600; line-height: 1.15; }
.bcard-exp small { display: block; font-size: 10px; font-weight: 600; opacity: .75; text-transform: uppercase; letter-spacing: .06em; }
.bcard-mark { position: absolute; right: 18px; top: 50%; width: 30px; height: 30px; border-radius: 8px; transform: translateY(-50%); opacity: .9; }
.bcard-stamp {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%,-50%) rotate(-12deg); padding: 6px 14px; border: 3px solid #fff; border-radius: 10px;
  font-weight: 800; font-size: 20px; letter-spacing: .12em; text-transform: uppercase; background: rgba(220,38,38,.75);
}
.bcard-back { transform: rotateY(180deg); background: var(--surface-2); display: grid; place-items: center; }
.bcard-back img { width: 100%; height: 100%; object-fit: cover; }
.bcard-nophoto { display: grid; justify-items: center; gap: 8px; color: var(--text-3); font-size: 13px; text-align: center; padding: 20px; }

.bono-item { margin-bottom: 22px; }
.bono-item > a:active .bcard { transform: scale(.98); }
.bono-item .bcard { transition: transform .3s var(--spring); }
.bono-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 2px 0; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); border: 0;
}
.pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.pill.danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.pill.ok { background: var(--brand-tint); color: var(--brand-ink); }
.pill-btn { margin-left: auto; cursor: pointer; background: var(--brand); color: var(--on-brand); transition: transform .25s var(--spring); }
.pill-btn:active { transform: scale(.92); }

.bono-alert {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-radius: var(--r-md); margin-top: 10px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none;
}
.bono-alert > svg:first-child { flex: none; margin-top: 1px; }
.bono-alert b { display: block; font-size: 14.5px; }
.bono-alert span { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.bono-alert.danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: color-mix(in srgb, var(--danger) 7%, var(--surface)); }
.bono-alert.danger > svg:first-child { color: var(--danger); }
.bono-alert.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.bono-alert.warn > svg:first-child { color: var(--warn); }
.bono-alert.info > svg:first-child { color: var(--brand-ink); }
.bono-alert.ok { background: var(--brand-tint); border-color: transparent; }
.bono-alert.ok > svg:first-child { color: var(--brand-ink); }
#bonoAlertHome .bono-alert { margin-top: 12px; }
#bonoAlertHome .bono-alert.in { animation: page .55s var(--ease) backwards; }

.bono-empty { text-align: center; padding: 24px 12px 8px; }
.bono-empty > b { display: block; font-size: 19px; margin-top: 18px; }
.bono-empty p { max-width: 330px; margin: 8px auto 18px; line-height: 1.5; }
.bono-stack { position: relative; width: 210px; height: 150px; margin: 6px auto 0; }
.bcard.ghost { position: absolute; width: 190px; left: 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.bcard.ghost.g1 { top: 0; transform: rotate(-8deg); opacity: .5; }
.bcard.ghost.g2 { top: 12px; transform: rotate(5deg); opacity: .75; }
.bcard.ghost.g3 { top: 24px; display: grid; place-items: center; color: var(--on-brand); background: linear-gradient(135deg, var(--brand), #3fb800); border: 0; box-shadow: var(--shadow); animation: floaty 4s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-6px) rotate(-1deg); } }

.trips-card { padding: 16px; }
.rings { display: flex; align-items: center; justify-content: space-around; }
.rings .or { color: var(--text-3); font-size: 13px; font-weight: 600; }
.ring { position: relative; width: 112px; height: 112px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4.5; }
.ring-bg { stroke: var(--surface-2); }
.ring-fg { stroke: var(--brand-ink); stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: calc(113.1 * (1 - var(--p))); animation: ringIn 1.1s var(--ease) backwards; }
.ring-fg.full { stroke: var(--brand); }
@keyframes ringIn { from { stroke-dashoffset: 113.1; } }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-txt b { font-size: 24px; font-variant-numeric: tabular-nums; }
.ring-txt b small { font-size: 13px; color: var(--text-3); font-weight: 600; }
.ring-txt span { font-size: 11.5px; color: var(--text-2); }
.trip-actions { display: flex; gap: 10px; align-items: center; }
.trip-actions .btn { flex: 1; }
.trip-actions label.circle-btn { position: relative; cursor: pointer; }
.sr-date { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.circle-btn[disabled] { opacity: .4; pointer-events: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.bono-buttons { display: grid; gap: 10px; margin-top: 18px; }
.danger-btn { color: var(--danger); transition: background .25s, color .25s; }
.danger-btn.armed { background: var(--danger); color: #fff; }

.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.type-tile {
  position: relative; display: grid; gap: 3px; padding: 12px; border-radius: var(--r-md); background: var(--surface); border: 1.5px solid var(--border); cursor: pointer;
  transition: border-color .25s, transform .25s var(--spring);
}
.type-tile:active { transform: scale(.97); }
.type-tile input { position: absolute; opacity: 0; pointer-events: none; }
.type-tile:has(input:checked) { border-color: var(--brand-ink); box-shadow: 0 0 0 3px var(--brand-tint); }
.type-swatch { width: 38px; height: 24px; border-radius: 6px; margin-bottom: 6px; background: radial-gradient(120% 90% at 100% 0%, var(--c3) 0%, transparent 50%), linear-gradient(135deg, var(--c1), var(--c2)); }
.type-name { font-size: 13.5px; font-weight: 650; line-height: 1.25; }
.type-price { font-size: 12px; color: var(--text-2); }
.fields { padding: 4px 16px; }
.field-row { display: grid; gap: 6px; padding: 12px 0; font-size: 13px; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--border); }
.field-row:last-child { border-bottom: 0; }
.field-row[hidden] { display: none; }
.field-row input, .field-row select {
  font: inherit; font-size: 16px; font-weight: 500; color: var(--text); background: var(--surface-2); border: 1.5px solid transparent; border-radius: 12px; padding: 11px 12px; width: 100%; min-width: 0;
  transition: border-color .2s; -webkit-appearance: none; appearance: none;
}
.field-row input:focus, .field-row select:focus { outline: none; border-color: var(--brand-ink); }
.hint-sm { font-size: 12.5px; font-weight: 500; color: var(--brand-ink); }
.photo-box { position: relative; aspect-ratio: 1.586; border-radius: 18px; overflow: hidden; background: var(--surface-2); border: 1.5px dashed var(--border); display: grid; place-items: center; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-del { position: absolute; top: 10px; right: 10px; }
.photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.photo-actions .btn { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .bcard-inner, .bcard-front::after, .bcard.ghost.g3, .ring-fg { animation: none; transition: none; } }
.bono-empty p.faint, .bono-form p.faint, p.small.faint { display: flex; align-items: center; justify-content: center; gap: 6px; }
.bono-form p.faint { justify-content: flex-start; }
.tenmas-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.tenmas-form label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tenmas-form input {
  font: inherit; font-size: 18px; font-weight: 650; text-align: center; color: var(--text); background: var(--surface-2);
  border: 1.5px solid transparent; border-radius: 12px; padding: 10px; width: 100%; min-width: 0; font-variant-numeric: tabular-nums;
}
.tenmas-form input:focus { outline: none; border-color: var(--brand-ink); }
.tenmas-form .btn { grid-column: 1 / -1; height: 46px; }
.trips-card p.small.faint { justify-content: flex-start; }
.bono-alert:has(.renew-btns) { flex-wrap: wrap; }
.bono-alert:has(.renew-btns) > .grow { flex: 1 1 0; min-width: 0; }
.renew-btns { flex-basis: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.renew-btns .btn { height: 42px; font-size: 14px; padding: 0 10px; }
.switch {
  -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 50px; height: 30px; border-radius: 999px; margin: 0;
  background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; transition: background .3s var(--ease), border-color .3s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .45s var(--spring);
}
.switch:checked { background: var(--brand); border-color: transparent; }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
.switch-row { cursor: pointer; }
.field-row.switch-field { display: flex; align-items: center; gap: 12px; cursor: pointer; color: var(--text); font-size: 15px; }
.faint-hint { display: block; color: var(--text-3); margin-top: 2px; }
.field-row input.switch { width: 50px; height: 30px; padding: 0; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); }
.field-row input.switch:checked { background: var(--brand); border-color: transparent; }
.field-row.switch-field > .grow { flex: 1; min-width: 0; font-weight: 600; }

/* ============================================================
   GUAGUAS / TRANVÍA
   ============================================================ */
.mode-switch {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-top: 16px;
  border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border);
}
.mode-switch button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer; padding: 11px 8px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 650; color: var(--text-2);
  transition: color .3s;
}
.mode-switch button.active { color: var(--on-brand); }
.mode-thumb {
  position: absolute; left: 0; top: 4px; bottom: 4px; border-radius: 12px; background: var(--brand);
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--brand) 80%, transparent);
  transition: transform .55s var(--spring), width .55s var(--spring);
}
.map-top .mode-switch { margin-top: 10px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); box-shadow: var(--shadow); }

.rt-link {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 13px 14px; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow);
}
.rt-link .rt-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-ink); }
.rt-link b { display: block; font-size: 15px; }
.rt-link .grow > span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.35; }

.walk-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 650; }
.tram-stop { font-size: 28px; font-weight: 750; letter-spacing: -.03em; margin: 10px 0 16px; line-height: 1.1; }
.tram-dirs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tram-dir {
  position: relative; overflow: hidden; padding: 12px 12px 12px 15px; border-radius: 18px; background: var(--surface-2); min-width: 0;
}
.tram-dir::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--lc, var(--brand)); }
.tram-dir-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.tram-dir-to { font-size: 15px; font-weight: 700; margin-top: 4px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tram-dir-big { display: flex; align-items: baseline; gap: 4px; margin-top: 8px; }
.tram-dir-big .num { font-size: 44px; line-height: .9; font-weight: 750; letter-spacing: -.05em; font-variant-numeric: tabular-nums; display: inline-flex; }
.tram-dir-big .unit { font-size: 16px; font-weight: 650; }
.tram-dir-next { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.tram-dir-status:empty { display: none; }
.tram-dir-status { margin-top: 8px; }
.tram-dir-status .status { font-size: 11.5px; }
.tram-dir.none { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }
.tram-dir.none::before { display: none; }
@media (max-width: 340px) { .tram-dirs { grid-template-columns: 1fr; } }

.tram-line {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 20px; margin-bottom: 10px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text); text-decoration: none; box-shadow: var(--shadow);
}
.tram-line-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--lc); }
.tram-line-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tram-every { font-size: 12px; font-weight: 650; color: var(--brand-ink); background: var(--brand-tint); padding: 4px 9px; border-radius: 999px; }
.tram-line-ends { display: flex; align-items: center; gap: 8px; margin: 8px 0 3px; font-size: 15px; flex-wrap: wrap; }
.tram-line-ends svg { color: var(--text-3); }

/* primera vez: ¿guaguas o tranvía? */
.mode-pick {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; padding: 16px;
  background: color-mix(in srgb, #000 45%, transparent); backdrop-filter: blur(6px); animation: fadeIn .3s var(--ease) both;
}
.mode-pick.out { animation: fadeOut .3s var(--ease) both; }
.mode-pick-card {
  width: 100%; max-width: 460px; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 28px;
  background: var(--surface); box-shadow: var(--shadow-lg); text-align: center; animation: sheetUp .5s var(--spring) both;
}
.mode-pick-logo { border-radius: 12px; }
.mode-pick-card .h2 { margin: 12px 0 6px; }
.mode-pick-card p { margin: 0 0 18px; }
.mode-pick-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-pick-opts button {
  display: grid; justify-items: center; gap: 4px; padding: 18px 10px; border-radius: 20px; cursor: pointer; font: inherit; color: var(--text);
  background: var(--surface-2); border: 1.5px solid var(--border); transition: border-color .2s, transform .3s var(--spring);
}
.mode-pick-opts button:hover { border-color: var(--brand-ink); }
.mode-pick-opts .mp-ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); margin-bottom: 6px; }
.mode-pick-opts b { font-size: 17px; }
.mode-pick-opts span:last-child { font-size: 12.5px; color: var(--text-2); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mode-pick, .mode-pick-card, .mode-thumb { animation: none; transition: none; } }
/* logo de ZyraBus en el asistente (verde con el icono en negro) */
img.ask-logo { display: block; object-fit: cover; }
img.ask-icon.ask-logo { width: 38px; height: 38px; border-radius: 12px; padding: 0; box-shadow: 0 4px 14px -6px color-mix(in srgb, var(--brand) 80%, transparent); }
img.ask-icon.sm.ask-logo { width: 32px; height: 32px; border-radius: 10px; }
.ask-orb { overflow: hidden; }
.ask-orb img.ask-logo { width: 100%; height: 100%; }
/* botón 2D / 3D del mapa, encima del de ubicación */
.map-3d {
  position: absolute; right: 16px; z-index: 2; width: 48px; height: 48px; box-shadow: var(--shadow-lg);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 88px); transition: transform .3s var(--spring), bottom .55s var(--ease), background .25s, color .25s;
  font-weight: 800; font-size: 14px; letter-spacing: -.02em;
}
.map-3d.on { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.map-page:has(.map-sheet.open) .map-3d { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 348px); }
.status--far { color: var(--text-3); font-weight: 500; }
.status--far::before { background: var(--text-3); }

/* ¿cuándo te aviso? */
.remind-pick {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; padding: 12px;
  background: color-mix(in srgb, #000 40%, transparent); backdrop-filter: blur(4px); animation: fadeIn .25s var(--ease) both;
}
.remind-pick.out { animation: fadeOut .28s var(--ease) both; }
.remind-card {
  width: 100%; max-width: 460px; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 26px;
  background: var(--surface); box-shadow: var(--shadow-lg); animation: sheetUp .45s var(--spring) both;
}
.remind-grab { width: 38px; height: 5px; border-radius: 3px; background: var(--border); margin: 0 auto 12px; }
.remind-card .h2 { margin: 4px 0 14px; font-size: 21px; }
.remind-opts { display: grid; gap: 8px; margin-bottom: 10px; }
.remind-opts button {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 13px 14px; border-radius: 16px; cursor: pointer; font: inherit; color: var(--text);
  background: var(--surface-2); border: 1.5px solid transparent;
}
.remind-opts button b { display: block; font-size: 15.5px; }
.remind-opts button .grow > span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.remind-opts button svg { color: var(--text-3); }
.remind-opts button.rec { border-color: var(--brand-ink); background: var(--brand-tint); }
.remind-opts button.rec svg { color: var(--brand-ink); }
.fav-lines { margin-bottom: 6px; }
/* estás en la parada */
.status--here { color: var(--brand-ink); }
.status--here::before { background: var(--brand-ink); animation: live 1.8s ease-out infinite; }
.fact.here { background: var(--brand-tint); }
.fact.here svg { color: var(--brand-ink); }
.walk-pill.here { background: var(--brand-tint); color: var(--brand-ink); }
.here-txt { color: var(--brand-ink); font-weight: 650; }
/* cuenta atrás en la pantalla de bloqueo */
.remind-live { display: flex; align-items: center; gap: 12px; padding: 12px 4px 14px; margin-bottom: 6px; border-top: 1px solid var(--border); cursor: pointer; }
.remind-live b { display: block; font-size: 14.5px; }
.remind-live .grow > span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
/* botón satélite, encima del de 3D */
.map-sat {
  position: absolute; right: 16px; z-index: 2; width: 48px; height: 48px; box-shadow: var(--shadow-lg);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 146px); transition: transform .3s var(--spring), bottom .55s var(--ease), background .25s, color .25s;
}
.map-sat.on { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.map-page:has(.map-sheet.open) .map-sat { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 406px); }
