/* Aster — estilos. Mapa a pantalla completa, controles flotantes de cristal, hoja inferior y navegación tipo GPS. */
:root {
  --ink: #0d1f1e;
  --muted: #5d6f6d;
  --paper: #ffffff;
  --paper-2: #f1f5f4;
  --glass: rgba(255, 255, 255, .86);
  --line: #dce6e4;
  --brand: #0c3433;          /* verde petróleo Gusansoft */
  --brand-2: #135250;
  --accent: #12a597;
  --accent-2: #0d8a7e;
  --warm: #f0a530;
  --ok: #16884a; --ko: #d0342c;
  --shadow-s: 0 1px 2px rgba(8, 30, 29, .08), 0 2px 8px rgba(8, 30, 29, .08);
  --shadow: 0 2px 6px rgba(8, 30, 29, .08), 0 10px 28px rgba(8, 30, 29, .16);
  --shadow-l: 0 -4px 30px rgba(8, 30, 29, .18);
  --radius: 16px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e8f1f0; --muted: #98aeab; --paper: #142120; --paper-2: #1b2b2a; --glass: rgba(20, 33, 32, .86); --line: #2a3f3d;
    --brand: #0a2928; --shadow: 0 10px 28px rgba(0,0,0,.5); --shadow-s: 0 2px 8px rgba(0,0,0,.4); --shadow-l: 0 -4px 30px rgba(0,0,0,.5); color-scheme: dark; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { font: 15px/1.45 var(--font); color: var(--ink); background: var(--paper-2); overflow: hidden; -webkit-font-smoothing: antialiased; }
#map { position: fixed; inset: 0; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; width: 100%; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(18, 165, 151, .18); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* Barra de búsqueda */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 10; padding: calc(10px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); pointer-events: none; }
.search, .results { pointer-events: auto; max-width: 560px; margin: 0 auto; }
.search { display: flex; align-items: center; gap: 6px; background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.5); border-radius: 30px; padding: 5px 5px 5px 8px; box-shadow: var(--shadow); }
.search input { border: 0; background: transparent; padding: 9px 4px; font-size: 16px; font-weight: 500; }
.search input:focus { box-shadow: none; }
.search input::placeholder { color: var(--muted); font-weight: 400; }
.brand { flex: none; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(145deg, var(--brand-2), var(--brand)); color: #fff; display: grid; place-items: center; }
.brand .ic { width: 19px; height: 19px; stroke-width: 2.2; }
.icon-btn { flex: none; border: 0; background: transparent; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.results { list-style: none; margin-top: 8px; padding: 6px; background: var(--paper); border-radius: 20px; box-shadow: var(--shadow); max-height: 58vh; overflow: auto; }
.results li button { display: flex; gap: 12px; width: 100%; text-align: left; background: none; border: 0; padding: 11px 10px; border-radius: 14px; transition: background .12s; }
.results li button:hover { background: var(--paper-2); }
.results small { display: block; color: var(--muted); font-size: 13px; }
.res-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px 4px; }
.results .empty { padding: 14px; color: var(--muted); }
.num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(145deg, var(--brand-2), var(--brand)); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.res-main { min-width: 0; }
.res-main strong { font-weight: 600; }
.facts { color: var(--ink); }
.facts .ok { color: var(--ok); font-weight: 600; } .facts .ko { color: var(--ko); font-weight: 600; }

/* Botones flotantes */
.fabs { position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 9; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fab-grupo { display: flex; flex-direction: column; background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.5); border-radius: 26px; box-shadow: var(--shadow); overflow: hidden; }
.fab-grupo .fab { box-shadow: none; background: transparent; border-radius: 0; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.fab-grupo .fab + .fab { border-top: 1px solid var(--line); }
.fab { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink); transition: transform .12s, background .15s; }
.fab:active { transform: scale(.94); }
.fab.off { color: var(--muted); }
#btnLocate:not(.off) { color: var(--accent); }
.fab-main { width: 62px; height: 62px; background: linear-gradient(145deg, var(--accent), var(--brand-2)); color: #fff; border: 0; box-shadow: 0 8px 24px rgba(18, 120, 110, .45); }
.fab-main .ic { width: 27px; height: 27px; }
body.navigating .fabs { bottom: calc(118px + env(safe-area-inset-bottom)); }
body.navigating .fab-grupo, body.navigating #btnChat { display: none; }
.maplibregl-ctrl-bottom-left { bottom: env(safe-area-inset-bottom); }
.maplibregl-ctrl-group { border-radius: 14px !important; box-shadow: var(--shadow-s) !important; overflow: hidden; }
body.navigating .maplibregl-ctrl-bottom-left { display: none; }

/* Marcadores */
.me { width: 64px; height: 64px; position: relative; pointer-events: none; }
.me-dot { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px; border-radius: 50%; background: #1f7ae0; border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(31,122,224,.18), 0 2px 6px rgba(0,0,0,.3); }
.me.manual .me-dot { background: var(--warm); box-shadow: 0 0 0 6px rgba(240,165,48,.2), 0 2px 6px rgba(0,0,0,.3); }
.me-cone { display: none; position: absolute; left: 50%; top: 0; width: 0; height: 0; margin-left: -16px; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 32px solid rgba(31,122,224,.28); }
.me.has-heading .me-cone { display: block; }
/* En navegación el punto se convierte en flecha de coche */
body.navigating .me-dot { width: 0; height: 0; margin: 0; border: 0; background: none; box-shadow: none; }
body.navigating .me-dot::before { content: ""; position: absolute; left: -17px; top: -21px; width: 34px; height: 40px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 40'%3E%3Cpath d='M17 2 32 37 17 29 2 37Z' fill='%231f7ae0' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
body.navigating .me-cone { display: none; }
.pin { width: 32px; height: 32px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: linear-gradient(145deg, var(--brand-2), var(--brand)); color: #fff; border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.3); font-size: 13px; font-weight: 700; padding: 0; display: grid; place-items: center; }
.pin span { transform: rotate(45deg); }
.dest-pin { font-size: 32px; color: var(--warm); text-shadow: 0 2px 4px rgba(0,0,0,.45); line-height: 1; }

/* Hoja inferior */
@keyframes subir { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; max-width: 580px; margin: 0 auto; background: var(--paper); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-l);
  padding: 10px max(20px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); max-height: 72vh; overflow: auto; animation: subir .22s ease-out; }
.sheet-asa { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h3 { margin: 0 40px 4px 0; font-size: 21px; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.sheet-close { position: absolute; right: 14px; top: 16px; border: 0; background: var(--paper-2); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.sheet-close .ic { width: 18px; height: 18px; }
.muted { color: var(--muted); margin: 0 0 6px; }
.extra { margin: 8px 0; color: var(--muted); }
.source { font-size: 11.5px; color: var(--muted); margin: 12px 0 0; }
.route-sum { margin: 2px 0 12px; font-variant-numeric: tabular-nums; }
.route-sum strong { font-size: 24px; font-weight: 800; color: var(--accent-2); letter-spacing: -.02em; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 22px; padding: 8px 15px; font-weight: 500; transition: background .12s, border-color .12s; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn { border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 11px 18px; font-weight: 600; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(145deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(18, 165, 151, .35); }
.btn.danger { background: var(--ko); border-color: var(--ko); color: #fff; }
details { margin-top: 12px; } summary { cursor: pointer; color: var(--muted); font-weight: 500; }
.steps { padding-left: 0; list-style: none; margin: 8px 0 0; }
.steps li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.steps small { margin-left: auto; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.arr { width: 22px; text-align: center; font-weight: 700; color: var(--accent); }
.fav-list { list-style: none; padding: 0; margin: 8px 0; }
.fav-list li { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.fav-go { flex: 1; text-align: left; background: none; border: 0; padding: 11px 2px; min-width: 0; }
.fav-go strong { font-weight: 600; }
.fav-go small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-form label { display: grid; gap: 4px; }

/* ---------- Navegación (estilo GPS) ---------- */
body.navigating .topbar { display: none; }
.nav-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 11; display: flex; gap: 14px; align-items: stretch;
  background: linear-gradient(160deg, #10403e, #0a2b2a); color: #fff;
  padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 14px max(12px, env(safe-area-inset-left));
  border-radius: 0 0 24px 24px; box-shadow: 0 8px 30px rgba(0,0,0,.35); max-width: 640px; margin: 0 auto; }
.nav-man { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 88px; padding-right: 12px; border-right: 1px solid rgba(255,255,255,.14); }
.nav-arrow { width: 64px; height: 64px; }
.nav-dist { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.05; margin-top: 2px; white-space: nowrap; }
.nav-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.nav-instr { font-size: 22px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nav-sub { font-size: 14px; opacity: .72; margin-top: 3px; }
.nav-lanes { display: flex; gap: 3px; margin-top: 8px; }
.carril { display: grid; place-items: center; width: 30px; height: 38px; border-radius: 8px; background: rgba(255,255,255,.08); }
.carril.ok { background: rgba(18,165,151,.45); }
.nav-nextbox { position: fixed; z-index: 11; top: calc(env(safe-area-inset-top) + 124px); left: max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 8px;
  background: #0a2b2a; color: #fff; padding: 6px 14px 6px 12px; border-radius: 0 0 16px 16px; box-shadow: var(--shadow); font-weight: 600; font-size: 14px; max-width: calc(100vw - 32px); }
.nav-nextbox span:first-child { opacity: .7; font-weight: 500; }
.nav-nextbox #navNext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.nativo .nav-nextbox { top: 114px; }
.nav-speed { position: fixed; z-index: 11; left: max(14px, env(safe-area-inset-left)); bottom: calc(112px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px; }
.nav-vel { width: 68px; height: 68px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.nav-vel b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.nav-vel small { font-size: 10px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.nav-speed.exceso .nav-vel { background: var(--ko); color: #fff; }
.nav-speed.exceso .nav-vel small { color: rgba(255,255,255,.85); }
.nav-limite { width: 54px; height: 54px; border-radius: 50%; background: #fff; border: 6px solid #d42a20; display: grid; place-items: center; box-shadow: var(--shadow-s); color: #111; }
.nav-limite b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.nav-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; display: flex; align-items: center; gap: 10px; background: var(--paper); max-width: 640px; margin: 0 auto;
  padding: 14px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-l); font-variant-numeric: tabular-nums; }
.nf-dato { display: flex; flex-direction: column; line-height: 1.1; }
.nf-dato b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.nf-dato small { color: var(--muted); font-size: 13px; font-weight: 500; }
.nf-eta b { color: var(--accent-2); }
.nf-dato + .nf-dato { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); }
.nf-boton { margin-left: auto; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--paper-2); font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.nf-boton + .nf-boton { margin-left: 0; }
.nf-boton.salir { background: var(--ko); color: #fff; }
/* De noche, la parte inferior también oscura (menos deslumbrante) */
body.noche .nav-footer, body.noche .nav-vel { background: #12201f; color: #e8f1f0; }
body.noche .nf-boton:not(.salir) { background: #1d302e; color: #e8f1f0; }
body.noche .nf-dato + .nf-dato { border-left-color: #2a3f3d; }

/* Chat */
.chat { position: fixed; z-index: 13; right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(420px, calc(100vw - 24px)); height: min(580px, 74vh);
  background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; animation: subir .2s ease-out; }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 12px 8px 12px 18px; background: linear-gradient(145deg, var(--brand-2), var(--brand)); color: #fff; }
.chat-head strong { font-size: 17px; }
.chat-head .icon-btn { color: rgba(255,255,255,.85); }
.chat-head .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.ai-status { font-size: 12px; opacity: .75; margin-right: auto; }
.chat-log { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--paper-2); }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: var(--shadow-s); }
.msg.user { align-self: flex-end; background: linear-gradient(145deg, var(--accent), var(--accent-2)); color: #fff; border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: var(--paper); border-bottom-left-radius: 6px; }
.msg.pending { color: var(--muted); font-style: italic; }
.msg.error { color: var(--ko); }
.msg.tool { align-self: center; font-size: 12px; color: var(--muted); background: none; padding: 2px; box-shadow: none; }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); align-items: center; }
.chat-form input { border-radius: 22px; }
.chat-form .btn { border-radius: 22px; }
#btnMic.rec { background: var(--ko); color: #fff; }

/* Ajustes */
.dlg { border: 0; border-radius: 24px; padding: 0; width: min(470px, calc(100vw - 24px)); background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.dlg::backdrop { background: rgba(5, 20, 19, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg form { padding: 20px 22px; display: grid; gap: 10px; max-height: 85vh; overflow: auto; }
.dlg h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 10px 0 0; }
.dlg label { display: grid; gap: 4px; font-size: 14px; font-weight: 500; }
.dlg label.check { display: flex; gap: 8px; align-items: center; }
.dlg label.check input { width: auto; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
code { background: var(--paper-2); padding: 1px 4px; border-radius: 4px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(110px + env(safe-area-inset-bottom)); z-index: 20; background: rgba(13, 31, 30, .92); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 11px 18px; border-radius: 22px; max-width: calc(100vw - 32px); box-shadow: var(--shadow); text-align: center; font-weight: 500; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Capas */
.capas { list-style: none; padding: 0; margin: 4px 0 8px; }
.capa > label, .capa.fija { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.capa > label > div, .capa.fija > div { flex: 1; min-width: 0; }
.capa strong { font-weight: 600; }
.capa small { display: block; color: var(--muted); font-size: 13px; }
.capa.fija { cursor: default; opacity: .85; }
.sheet h4 { margin: 18px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sw-in { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.sw-in:checked + .sw, .sw.on { background: var(--accent); }
.sw-in:checked + .sw::after, .sw.on::after { transform: translateX(18px); }
.sw-in:focus-visible + .sw { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Ventanas del mapa */
.maplibregl-popup-content { background: var(--paper); color: var(--ink); border-radius: 16px; box-shadow: var(--shadow); padding: 13px 15px; font: 14px/1.45 var(--font); }
.maplibregl-popup-tip { border-top-color: var(--paper) !important; border-bottom-color: var(--paper) !important; }
.maplibregl-popup-close-button { color: var(--muted); font-size: 18px; padding: 2px 7px; }
.pop p { margin: 4px 0; }
.pop small { display: block; color: var(--muted); }
.pop .src, .sheet .src { font-size: 11px; color: var(--muted); margin-top: 4px; }
.pop img { width: 100%; max-height: 140px; object-fit: cover; border-radius: 10px; margin-top: 6px; }
.btn.small { padding: 7px 13px; margin-top: 8px; font-size: 13px; border-radius: 12px; }

/* Avisos en ruta y navegación */
.route-alerts { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.route-alerts li { padding: 9px 12px; border-radius: 12px; background: var(--paper-2); border-left: 4px solid var(--accent); }
.route-alerts li.medio { border-left-color: var(--warm); }
.route-alerts li.alto { border-left-color: var(--ko); }
.nav-alert { position: fixed; left: 50%; transform: translateX(-50%); top: calc(140px + env(safe-area-inset-top)); z-index: 14; padding: 12px 20px; border-radius: 16px;
  background: var(--warm); color: #1d1300; font-weight: 700; box-shadow: var(--shadow); max-width: calc(100vw - 32px); text-align: center; }
.nav-alert.radar { background: #6b3fa0; color: #fff; }
.nav-alert.trafico { background: var(--ko); color: #fff; }

/* Ficha: fotos y aire */
.fotos { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0; }
.fotos img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; flex: none; }
.aire { margin: 6px 0; }

/* App de Android: la barra de estado ya deja su margen */
body.nativo .topbar { padding-top: 10px; }
body.nativo .nav-banner { padding-top: 14px; }

/* Vistas del mapa (satélite, híbrido, relieve, 3D) */
.vistas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 4px; }
.vista { display: flex; flex-direction: column; align-items: center; gap: 5px; border: 2px solid transparent; border-radius: 16px; background: var(--paper-2); padding: 6px 5px 7px; font-size: 13px; font-weight: 500; color: var(--ink); }
.vista.on { border-color: var(--accent); font-weight: 700; background: var(--paper); }
.vista-img { width: 100%; height: 48px; border-radius: 11px; }
.vi-calles { background: linear-gradient(135deg, #f2efe9 40%, #fff 40% 46%, #f2efe9 46% 70%, #f6d58a 70% 75%, #cfe3c8 75%); }
.vi-satelite { background: radial-gradient(circle at 30% 40%, #5b7a4a, #2f4a2c 55%, #1d2f3a); }
.vi-hibrido { background: linear-gradient(135deg, transparent 44%, #f6d58a 44% 50%, transparent 50%), radial-gradient(circle at 30% 40%, #5b7a4a, #2f4a2c 55%, #1d2f3a); }
.vi-relieve { background: linear-gradient(160deg, #e9efe2, #b9c7a5 45%, #8c9a78 60%, #e9efe2); }

/* Estado del horario y paradas */
.abierto { color: var(--ok); }
.cerrado { color: var(--ko); }
.via-pin { width: 26px; height: 26px; border-radius: 50%; background: var(--warm); color: #1d1300; font: 700 13px/26px var(--font); text-align: center; border: 2px solid #fff; box-shadow: var(--shadow-s); }
.historia { margin: 10px 0; }
.historia summary { font-weight: 600; cursor: pointer; color: var(--ink); }
.historia img { float: right; max-width: 96px; border-radius: 10px; margin: 4px 0 4px 10px; }
.vida-info { color: var(--accent-2); font-size: 14px; font-weight: 500; margin: 6px 0 0; }

/* Mi mapa */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 14px; margin: 8px 0 12px; overflow-x: auto; }
.tab { flex: 1; border: 0; background: none; padding: 8px 10px; color: var(--muted); border-radius: 10px; white-space: nowrap; font-size: 14px; font-weight: 500; }
.tab.on { color: var(--ink); background: var(--paper); font-weight: 700; box-shadow: var(--shadow-s); }
.sorprende { width: 100%; padding: 14px; font-size: 17px; margin: 4px 0 12px; }
.temas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tema { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 16px; padding: 12px 4px; font-size: 13px; font-weight: 500; }
.tema span { font-size: 24px; }
label.inline { display: flex; align-items: center; gap: 8px; margin-top: 12px; }

/* Sugerencia según hábitos */
.sugerencia { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top, 0px) + 74px); z-index: 30; max-width: 540px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px; background: var(--paper); color: var(--ink); border-radius: 18px; box-shadow: var(--shadow); padding: 12px 14px; border-left: 4px solid var(--accent); }
.sugerencia > div { flex: 1; min-width: 0; }
.sugerencia small { display: block; color: var(--muted); }
body.navigating .sugerencia { display: none; }
@media (prefers-color-scheme: dark) {
  .search, .fab, .fab-grupo { border-color: rgba(255,255,255,.08); }
}
/* En pantallas táctiles sobran los botones + y − (se hace zoom con los dedos) */
@media (pointer: coarse) { .maplibregl-ctrl-zoom-in, .maplibregl-ctrl-zoom-out { display: none !important; } }
.maplibregl-ctrl-attrib.maplibregl-compact { margin: 0 0 6px 6px; border-radius: 12px; }

/* Sugerencias de búsqueda */
.results .sug { align-items: center; }
.sug-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--muted); }
.sug-ic .ic { width: 18px; height: 18px; }
.sug-fav { background: rgba(240,165,48,.16); color: #b9770e; }
.sug-hist, .sug-texto { color: var(--accent-2); background: rgba(18,165,151,.12); }
.sug-cat { background: linear-gradient(145deg, var(--brand-2), var(--brand)); color: #fff; }
.sug-dist { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sug-cargando { padding: 10px 14px; color: var(--muted); font-size: 13px; }

/* Atajos de categoría */
.atajos { pointer-events: auto; display: flex; gap: 8px; overflow-x: auto; max-width: 560px; margin: 10px auto 0; padding: 2px 2px 6px; scrollbar-width: none; }
.atajos::-webkit-scrollbar { display: none; }
.atajo { flex: none; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.5); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-radius: 20px; padding: 7px 13px 7px 10px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-s); color: var(--ink); white-space: nowrap; }
.atajo span { font-size: 15px; }
.atajo:active { transform: scale(.96); }
.topbar:has(.results:not([hidden])) .atajos, body:has(#sheet:not([hidden])) .atajos, body:has(#chat:not([hidden])) .atajos { display: none; }

/* Ficha del lugar */
.ficha-cab { display: flex; gap: 8px; align-items: center; margin: 0 40px 6px 0; }
.ficha-tipo { font-size: 13px; font-weight: 600; color: var(--muted); }
.estado { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 10px; }
.estado.abierto { background: rgba(22,136,74,.12); color: var(--ok); }
.estado.cerrado { background: rgba(208,52,44,.1); color: var(--ko); }
.acciones { display: flex; gap: 8px; margin: 14px -4px 4px; overflow-x: auto; padding: 0 4px 4px; scrollbar-width: none; }
.acciones::-webkit-scrollbar { display: none; }
.accion { flex: 1 0 64px; display: flex; flex-direction: column; align-items: center; gap: 5px; border: 0; background: none; padding: 0; color: var(--accent-2); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.accion .ic { width: 46px; height: 46px; padding: 12px; border-radius: 50%; background: rgba(18,165,151,.12); box-sizing: border-box; }
.accion.primaria { color: var(--ink); }
.accion.primaria .ic { background: linear-gradient(145deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 4px 14px rgba(18,165,151,.35); }
.accion:active .ic { transform: scale(.94); }
.rasgos { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.rasgos span { font-size: 12.5px; font-weight: 500; padding: 4px 10px; border-radius: 12px; background: var(--paper-2); color: var(--ink); }
.info { list-style: none; padding: 0; margin: 10px 0 0; border-top: 1px solid var(--line); }
.info li { display: flex; gap: 14px; align-items: flex-start; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.info li .ic { flex: none; width: 20px; height: 20px; color: var(--muted); margin-top: 1px; }
.info li span, .info li a { min-width: 0; overflow-wrap: anywhere; }
.info small { color: var(--muted); }

/* Panel de ruta */
.modos { display: flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 16px; margin: 0 44px 12px 0; }
.modo { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; padding: 8px 6px; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--muted); }
.modo .ic { width: 20px; height: 20px; }
.modo.on { background: var(--paper); color: var(--accent-2); box-shadow: var(--shadow-s); }
.ruta-resumen { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.ruta-resumen b { font-size: 30px; font-weight: 800; color: var(--accent-2); letter-spacing: -.02em; }
.ruta-resumen span { color: var(--muted); font-weight: 500; }
.ruta-botones { display: flex; gap: 10px; margin-top: 8px; }
.btn.grande { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; font-size: 17px; border-radius: 16px; }
.btn.grande .ic { width: 20px; height: 20px; fill: currentColor; }
.steps li { align-items: center; }
.steps .arr { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--paper-2); color: var(--accent-2); flex: none; }
.accion { flex: 1 1 0; min-width: 0; }
.accion span { white-space: nowrap; font-size: 12px; }

/* Voz */
#btnVozBusca { color: var(--accent-2); }
@keyframes latido { 0%, 100% { box-shadow: 0 0 0 0 rgba(208,52,44,.45); } 50% { box-shadow: 0 0 0 9px rgba(208,52,44,0); } }
#btnMic.rec { animation: latido 1.2s ease-in-out infinite; }

/* Cartel de autopista en la navegación */
.nav-cartel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 8px; border-radius: 10px; background: #1d4fa3; border: 2px solid #fff; box-shadow: inset 0 0 0 1px #1d4fa3; }
.salida-num { background: #f7c600; color: #111; font-weight: 800; font-size: 12px; padding: 2px 7px; border-radius: 5px; letter-spacing: .02em; }
.escudo { font-weight: 800; font-size: 13px; padding: 1px 7px; border-radius: 5px; border: 2px solid #fff; color: #fff; }
.escudo.azul { background: #1d4fa3; } .escudo.rojo { background: #c8102e; } .escudo.verde { background: #0a7d3c; } .escudo.naranja { background: #e87511; }
.cartel-dest { color: #fff; font-weight: 700; font-size: 15px; }

/* Coste del viaje */
.coste { margin: 12px 0 4px; padding: 12px 14px; border-radius: 16px; background: var(--paper-2); }
.coste-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.enlace { border: 0; background: none; padding: 0; color: var(--accent-2); font-weight: 600; font-size: 13px; text-align: right; }
.coste-lista { list-style: none; padding: 0; margin: 8px 0 4px; display: grid; gap: 8px; }
.coste-lista li { display: flex; gap: 10px; align-items: flex-start; }
.coste-lista small { display: block; color: var(--muted); font-size: 12.5px; }
.c-ic { font-size: 18px; line-height: 1.3; }
.check-fila { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-top: 6px; }
.check-fila input { width: auto; }
.ev-lista { margin: 6px 0; padding-left: 20px; display: grid; gap: 8px; }
.ev-lista small { display: block; color: var(--muted); font-size: 12.5px; }
.form-veh { display: grid; gap: 10px; }
.form-veh label { display: grid; gap: 4px; font-size: 14px; font-weight: 500; }
.fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Opiniones */
.opiniones { margin: 12px 0 4px; padding: 12px 14px; border-radius: 16px; background: var(--paper-2); }
.op-cab { display: flex; align-items: center; gap: 12px; }
.op-cab small { display: block; color: var(--muted); }
.op-nota { flex: none; min-width: 48px; height: 40px; padding: 0 8px; border-radius: 12px 12px 12px 4px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; background: #7c8a89; }
.op-nota.n5 { background: #0f7b3f; } .op-nota.n4 { background: #2e9d4f; } .op-nota.n3 { background: #6aa84f; } .op-nota.n2 { background: #e0a020; } .op-nota.n1 { background: #c8352c; }
.op-barra { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); margin: 10px 0 4px; }
.op-barra .pos { background: #2e9d4f; } .op-barra .neg { background: #c8352c; }
.op-linea { margin: 6px 0 0; font-weight: 500; }
.op-com { padding-left: 18px; margin: 6px 0; display: grid; gap: 6px; }
.op-com small { display: block; color: var(--muted); }

/* Mis sitios */
.mi-sitio { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--warm); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.3); padding: 0; display: grid; place-items: center; }
.mi-sitio span { transform: rotate(45deg); color: #1d1300; font-size: 15px; font-weight: 800; }
.menu-punto { display: grid; gap: 8px; margin-top: 10px; }

/* Silenciar y tiempos por medio de transporte */
.nf-boton.activo { background: var(--warm); color: #1d1300; }
.modo span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.modo-t { font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.modo.on .modo-t { color: var(--accent-2); }
/* Cuatro botones en el pie de navegación: un poco más compactos */
.nf-boton { width: 46px; height: 46px; }
.nf-dato b { font-size: 22px; white-space: nowrap; }
.nf-dato + .nf-dato { margin-left: 10px; padding-left: 10px; }
.nav-footer { gap: 8px; }

/* ---------- Transporte público (transporte.js) ---------- */
.modos:has([data-tp]) .modo { padding: 8px 3px; gap: 4px; font-size: 13px; }
.tp-hora { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; color: var(--muted); font-weight: 600; }
.tp-hora input { font: inherit; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line, #d0d7de); background: var(--paper); color: inherit; }
.tp-opcion { display: block; width: 100%; text-align: left; border: 1px solid var(--line, #d0d7de); background: var(--paper); color: inherit; border-radius: 14px; padding: 10px 12px; margin: 0 0 8px; font: inherit; }
.tp-opcion.on { border-color: var(--accent-2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-2) 25%, transparent); }
.tp-fila { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.tp-fila b { font-size: 18px; }
.tp-resumen { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 6px 0 4px; }
.tp-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 8px; background: var(--c); color: #fff; font-weight: 700; font-size: 13px; text-shadow: 0 0 2px rgba(0,0,0,.35); }
.tp-pie { font-size: 13px; color: var(--muted); }
.tp-sep { color: var(--muted); }
.tp-tramos { list-style: none; margin: 10px 0; padding: 0; }
.tp-tramos li { display: grid; grid-template-columns: 76px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line, #e3e8ee); line-height: 1.4; }
.tp-tramos li:last-child { border-bottom: 0; }
.tp-tramos .tp-h { font-weight: 800; font-variant-numeric: tabular-nums; }
.tp-tramos li.pie span:last-child { color: var(--muted); }
.tp-chip.claro { color: #1b2430; text-shadow: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
/* Tarjeta de viaje en curso / en la parada (transporte.js) */
.tp-card { position: fixed; z-index: 10; left: max(12px, env(safe-area-inset-left)); right: 84px; bottom: calc(28px + env(safe-area-inset-bottom)); max-width: 520px; max-height: 46vh; overflow: auto;
  background: var(--paper); color: var(--ink, inherit); border-radius: 20px; box-shadow: var(--shadow-l); padding: 14px 16px 12px; font-variant-numeric: tabular-nums; }
.tp-card-x { position: absolute; top: 8px; right: 10px; border: 0; background: var(--paper-2); color: var(--muted); width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; }
.tp-card-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-right: 30px; }
.tp-card-cab small { width: 100%; }
.tp-card-big { font-size: 18px; margin: 8px 0 6px; line-height: 1.3; }
.tp-card-big b { color: var(--accent-2); }
.tp-card-lista { list-style: none; margin: 6px 0 0; padding: 0 0 0 12px; border-left: 3px solid var(--line, #d0d7de); }
.tp-card-lista li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 14px; }
.tp-card-lista li span:last-child { color: var(--muted); white-space: nowrap; }
.tp-card-lista li.baja { font-weight: 800; color: var(--accent-2); }
.tp-card-pie { margin-top: 8px; display: flex; justify-content: flex-end; }
.tp-salidas { list-style: none; margin: 8px 0; padding: 0; }
.tp-salidas li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line, #e3e8ee); }
.tp-salidas li:last-child { border-bottom: 0; }
.tp-dir { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-en { white-space: nowrap; font-size: 14px; }
.tp-en b { color: var(--accent-2); }

/* Valoraciones de Aster (caras) */
.valoraciones { margin: 12px 0 4px; padding: 12px 14px; border-radius: 16px; background: var(--paper-2); }
.valoraciones h4 { margin: 0 0 8px; }
.val-cab { display: flex; align-items: center; gap: 12px; }
.val-cara { font-size: 40px; line-height: 1; }
.val-cab small { display: block; color: var(--muted); }
.val-reparto { display: grid; gap: 3px; margin: 10px 0; }
.val-reparto div { display: grid; grid-template-columns: 22px 1fr 28px; align-items: center; gap: 6px; font-size: 13px; }
.val-reparto i { display: block; height: 7px; border-radius: 4px; background: var(--accent); min-width: 2px; }
.val-reparto small { color: var(--muted); text-align: right; }
.val-lista { list-style: none; padding: 0; margin: 10px 0 4px; display: grid; gap: 10px; }
.val-lista li { background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.val-lista p { margin: 6px 0 0; }
.val-op-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.val-op-cab small { margin-left: auto; color: var(--muted); }
.val-visita { font-size: 11.5px; font-weight: 700; color: var(--ok); background: rgba(22,136,74,.1); padding: 1px 7px; border-radius: 8px; }
.val-acciones { margin-top: 4px; text-align: right; }
.val-elegir { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.val-boton { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px solid transparent; background: var(--paper-2); border-radius: 14px; padding: 8px 2px; }
.val-boton span { font-size: 28px; line-height: 1.1; }
.val-boton small { font-size: 11px; color: var(--muted); text-align: center; }
.val-boton.on { border-color: var(--accent); background: var(--paper); }
.val-rapida { display: flex; gap: 4px; margin-top: 4px; }
.val-rapida button { border: 0; background: var(--paper-2); border-radius: 10px; font-size: 24px; padding: 4px 6px; }
textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%; resize: vertical; }
/* Favoritos: Casa y Trabajo */
.fav-fijos li { gap: 6px; }
.fav-fijos .btn { padding: 7px 12px; font-size: 14px; }
/* Ventana pequeña de Android (ventana.js): solo el mapa y lo esencial del viaje */
html.pip .topbar, html.pip .fabs, html.pip .sheet, html.pip .chat, html.pip .sugerencia, html.pip .toast,
html.pip .maplibregl-ctrl-group, html.pip .maplibregl-ctrl-attrib, html.pip .nav-speed, html.pip .nav-nextbox,
html.pip .tp-card-x, html.pip .tp-card-pie, html.pip .nav-alert { display: none !important; }
html.pip .nav-banner { padding: 6px 8px; gap: 6px; font-size: 12px; }
html.pip .nav-banner * { font-size: inherit; }
html.pip .nav-banner .nav-arrow { width: 34px; height: 34px; }
html.pip .nav-banner .nav-arrow svg { width: 30px; height: 30px; }
html.pip .nav-footer { padding: 4px 8px; font-size: 12px; }
html.pip .nav-footer button { display: none; }
html.pip .tp-card { left: 4px; right: 4px; bottom: 4px; padding: 6px 8px; max-height: 58vh; border-radius: 12px; font-size: 12px; }
html.pip .tp-card-big { font-size: 13px; margin: 3px 0; }
html.pip .tp-card-lista li { font-size: 11.5px; padding: 1px 0; }
html.pip .tp-card-lista li:nth-child(n+4) { display: none; }
html.pip .tp-salidas li:nth-child(n+4) { display: none; }
html.pip .tp-chip { font-size: 11px; padding: 1px 5px; }

/* Caminatas (caminatas.js) */
#btnCaminar.grabando { color: #e8590c; position: relative; }
#btnCaminar.grabando::after { content: ''; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #e8590c; animation: cam-latido 1.4s infinite; }
@keyframes cam-latido { 50% { opacity: .25; } }
.cam-pill { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 72px); z-index: 29; display: flex; align-items: center; gap: 6px;
  background: var(--paper); color: var(--ink); border-radius: 999px; box-shadow: var(--shadow); padding: 4px 4px 4px 6px; max-width: calc(100% - 24px); }
.cam-pill .btn.small { margin: 0; border-radius: 999px; }
.cam-pill-info { display: flex; align-items: baseline; gap: 8px; border: 0; background: none; color: inherit; padding: 6px 8px; min-width: 0; }
.cam-pill-info strong { font-size: 17px; }
.cam-pill-info small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-punto { width: 9px; height: 9px; border-radius: 50%; background: #e8590c; align-self: center; animation: cam-latido 1.4s infinite; flex: none; }
body.navigating .cam-pill { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 150px); }
.cam-info { border-left-color: #f07f1d; }
.cam-info .btn.small { margin: 0; }
.cam-vivo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--paper-2); }
.cam-vivo > div { flex: 1; }
.cam-vivo strong { display: block; font-size: 26px; line-height: 1.1; }
.cam-vivo small { color: var(--muted); }
.cam-vivo .btn.grande { flex: none; }
#camEmpezar { width: 100%; }
.cam-totales { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 10px; }
.cam-totales > div { background: var(--paper-2); border-radius: 14px; padding: 9px 6px; text-align: center; min-width: 0; }
.cam-totales strong { display: block; font-size: 16px; white-space: nowrap; }
.cam-totales small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 360px) { .cam-totales { grid-template-columns: repeat(2, 1fr); } }
.cam-grafico { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 92px; padding: 0 2px 18px; margin-bottom: 10px; }
.cam-grafico > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.cam-grafico i { display: block; width: 100%; max-width: 28px; border-radius: 6px 6px 2px 2px; background: var(--muted); opacity: .45; }
.cam-grafico .ok i { opacity: 1; }
.cam-grafico .ok i { background: var(--accent); }
.cam-grafico .hoy i { outline: 2px solid #f07f1d; outline-offset: 1px; }
.cam-grafico small { position: absolute; bottom: -18px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.cam-meta { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--muted); opacity: .6; pointer-events: none; }
.cam-lista li .icon-btn { width: 36px; height: 36px; font-size: 14px; }
.cam-lista li .icon-btn.peligro { width: auto; padding: 0 10px; border-radius: 12px; background: var(--ko); color: #fff; font-size: 12.5px; }
.cam-reto { padding: 10px 2px; border-bottom: 1px solid var(--line); }
.cam-reto strong { display: block; font-weight: 600; }
.cam-reto small { display: block; color: var(--muted); }
.cam-barra { height: 9px; background: var(--paper-2); border-radius: 99px; overflow: hidden; margin: 6px 0 3px; }
.cam-barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #f07f1d); border-radius: 99px; }
.cam-insignias { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cam-insignias > div { text-align: center; border: 1px solid var(--line); border-radius: 14px; padding: 8px 4px; opacity: .45; filter: grayscale(1); }
.cam-insignias > div.on { opacity: 1; filter: none; background: var(--paper-2); }
.cam-insignias span { display: block; font-size: 26px; }
.cam-insignias strong { display: block; font-size: 12.5px; line-height: 1.2; }
.cam-insignias small { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.2; margin-top: 2px; }
.cam-ajustes { display: grid; gap: 4px; }
.cam-ajustes label.inline { margin-top: 6px; }
.cam-ajustes select { flex: 1; }
.cam-periodo { margin-top: 0; }
.cam-podio { list-style: none; padding: 0; margin: 4px 0 8px; }
.cam-podio li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.cam-podio li strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cam-podio li.top { font-size: 16px; }
.cam-podio li.yo { background: var(--paper-2); border-radius: 12px; }
.cam-puesto { width: 30px; text-align: center; font-weight: 700; color: var(--muted); }
.cam-podio li.top .cam-puesto { font-size: 21px; }
.cam-mipuesto { margin: 6px 0; }
html.pip .cam-pill, html.pip .cam-info { display: none; }

/* Rutas alternativas */
.alternativas { display: grid; gap: 6px; margin: 6px 0 10px; }
.alt { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 10px; text-align: left; border: 2px solid var(--line); background: var(--paper); border-radius: 14px; padding: 8px 12px; }
.alt b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.alt small { color: var(--muted); font-size: 13px; }
.alt .alt-et { grid-column: 2; font-weight: 600; color: var(--accent-2); }
.alt.on { border-color: var(--accent); background: rgba(18,165,151,.06); }

/* Circuitos a pie */
.circ-botones { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.circ-botones .btn { padding: 10px 6px; font-size: 13.5px; }
.circuito-info { margin: 4px 0 10px; padding: 10px 12px; border-radius: 14px; background: rgba(46,157,79,.1); display: grid; gap: 4px; }
.circuito-info small { color: var(--muted); }
.circuito-info .btn { justify-self: start; margin-top: 4px; }
