/* Por la sombra · estilos de la app (tokens del kit de observatorios: Montserrat, azul institucional) */
:root {
  color-scheme: light;
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f6f8fb; --surface-sunk: #eef2f8;
  --line: #dfe6f0; --line-strong: #c6d2e2;
  --ink: #0f1b2d; --ink-2: #44546b; --ink-mut: #6b7c94;
  --brand: #2a78d6; --brand-ink: #1c5cab; --brand-soft: #eaf2fd;
  --sombra: #1a5fd0; --sombra-soft: #e3ecfb;        /* tramos a la sombra */
  --sol: #e88a00; --sol-ink: #9a5b00; --sol-soft: #fdf1dc;  /* tramos al sol */
  --ok: #0c8a3e; --crit: #c93434;
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --shadow: 0 1px 2px rgba(15,27,45,.08), 0 4px 16px rgba(15,27,45,.10);
  --shadow-up: 0 -2px 8px rgba(15,27,45,.06), 0 -10px 30px rgba(15,27,45,.10);
  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --panel: 410px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d131c; --surface: #131a24; --surface-2: #18202c; --surface-sunk: #0f161f;
    --line: #26303f; --line-strong: #38455a;
    --ink: #eef3fa; --ink-2: #b3c1d4; --ink-mut: #8496ad;
    --brand: #3987e5; --brand-ink: #6da7ec; --brand-soft: #16233a;
    --sombra: #7aa2f0; --sombra-soft: #1a2640; --sol: #f0a028; --sol-ink: #f3b552; --sol-soft: #2c2210;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35);
    --shadow-up: 0 -2px 8px rgba(0,0,0,.3), 0 -10px 30px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d131c; --surface: #131a24; --surface-2: #18202c; --surface-sunk: #0f161f;
  --line: #26303f; --line-strong: #38455a;
  --ink: #eef3fa; --ink-2: #b3c1d4; --ink-mut: #8496ad;
  --brand: #3987e5; --brand-ink: #6da7ec; --brand-soft: #16233a;
  --sombra: #7aa2f0; --sombra-soft: #1a2640; --sol: #f0a028; --sol-ink: #f3b552; --sol-soft: #2c2210;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.35);
  --shadow-up: 0 -2px 8px rgba(0,0,0,.3), 0 -10px 30px rgba(0,0,0,.35);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--brand-ink); }
[hidden] { display: none !important; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.s { width: 16px; height: 16px; }
.ico.l { width: 24px; height: 24px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--brand-ink); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.btn:hover { background: var(--brand); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.sec { background: var(--surface); color: var(--brand-ink); border-color: var(--line-strong); }
.btn.sec:hover { background: var(--brand-soft); }
.btn.peligro { background: var(--surface); color: var(--crit); border-color: var(--line-strong); }
.btn.ancho { width: 100%; }
.btn.google { background: var(--surface); color: var(--ink); border-color: var(--line-strong); font-weight: 600; }
.btn.google:hover { background: var(--surface-2); }
.btn.google svg { width: 18px; height: 18px; }
.enlace { background: none; border: 0; padding: 4px 0; color: var(--brand-ink); font-weight: 600; cursor: pointer; }
.redondo {
  width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow); cursor: pointer;
}
.redondo:hover { color: var(--brand-ink); }
.redondo.activo { color: var(--brand-ink); background: var(--brand-soft); }
.icono-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.icono-btn:hover { background: var(--surface-sunk); color: var(--ink); }

/* ------------------------------------------------------------------ acceso (registro obligatorio) */
.acceso {
  position: fixed; inset: 0; overflow-y: auto; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(180deg, var(--brand-soft) 0, var(--bg) 46%);
}
.acceso-caja { width: 100%; max-width: 420px; }
.marca { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.marca img { width: 48px; height: 48px; border-radius: 13px; }
.marca h1 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.marca p { margin: 0; color: var(--ink-mut); font-size: 13px; }
.lema { font-size: 17px; line-height: 1.4; margin: 0 0 18px; color: var(--ink-2); }
.lema b { color: var(--ink); }
.tarjeta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; }
.separador { display: flex; align-items: center; gap: 12px; color: var(--ink-mut); font-size: 12.5px; margin: 16px 0; }
.separador::before, .separador::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.pestanas { display: flex; background: var(--surface-sunk); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.pestanas button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 8px; font-weight: 600; color: var(--ink-mut); cursor: pointer; }
.pestanas button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(15,27,45,.12); }
.campo { display: block; margin-bottom: 12px; }
.campo span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.campo input, .campo select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--surface); outline: none;
}
.campo input:focus, .campo select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.casilla { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); margin: 10px 0; cursor: pointer; }
.casilla input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--brand-ink); }
.msg { font-size: 13px; border-radius: var(--r-sm); padding: 10px 12px; margin: 10px 0 0; }
.msg.error { background: #fdecec; color: #8f1d1d; }
.msg.ok { background: #e6f6ec; color: #0b5a2a; }
:root[data-theme="dark"] .msg.error { background: #3a1616; color: #f3b4b4; }
.pie-acceso { text-align: center; font-size: 12.5px; color: var(--ink-mut); margin-top: 16px; }
.pie-acceso a { color: var(--ink-mut); }
.legal-nota { font-size: 12px; color: var(--ink-mut); margin: 12px 0 0; }

/* ------------------------------------------------------------------ app y mapa */
.app { position: fixed; inset: 0; }
#mapa { position: absolute; inset: 0; }
.maplibregl-ctrl-attrib { font-family: var(--font); font-size: 10.5px; }
.panel { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.panel > * { pointer-events: auto; }

/* barra de búsqueda */
.barra {
  position: absolute; left: 12px; right: 12px; top: calc(12px + var(--safe-t));
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 4px 4px 4px 6px;
}
.fila-busca { display: flex; align-items: center; gap: 4px; min-height: 48px; }
.fila-busca input {
  flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; padding: 10px 6px;
}
.fila-busca input::placeholder { color: var(--ink-mut); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--brand-ink); color: #fff;
  font-weight: 700; font-size: 14px; display: grid; place-items: center; cursor: pointer; flex: none; margin-right: 2px;
  overflow: hidden; padding: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.puntos { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.puntos .marcas { grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-mut); }
.puntos .marcas i { display: block; width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.puntos .marcas .o { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--brand-ink); }
.puntos .marcas .d { color: var(--crit); }
.puntos input {
  min-width: 0; border: 0; outline: none; background: var(--surface-sunk); border-radius: var(--r-sm);
  padding: 11px 12px; margin: 3px 0; font-size: 15px;
}
.puntos input:focus { box-shadow: 0 0 0 2px var(--brand); background: var(--surface); }
.puntos .acc { grid-row: 1 / span 2; grid-column: 3; display: flex; flex-direction: column; align-items: center; }
.chips { display: flex; gap: 8px; padding: 6px 4px 6px 40px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 34px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-2);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }

/* sugerencias */
.sugerencias {
  position: absolute; left: 12px; right: 12px; top: calc(76px + var(--safe-t));
  max-height: min(62vh, 520px); overflow-y: auto; background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 6px 0;
}
.modo-ruta .sugerencias { top: calc(150px + var(--safe-t)); }
.sug { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border: 0; background: none; text-align: left; cursor: pointer; }
.sug:hover, .sug.sel { background: var(--surface-sunk); }
.sug .ic { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-sunk); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.sug .ic.casa, .sug .ic.yo { background: var(--brand-soft); color: var(--brand-ink); }
.sug .tx { min-width: 0; flex: 1; }
.sug .t1 { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug .t2 { display: block; font-size: 12.5px; color: var(--ink-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-titulo { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-mut); padding: 10px 16px 4px; }
.sug-vacio { padding: 14px 16px; color: var(--ink-mut); font-size: 14px; }

/* controles del mapa */
.controles {
  position: absolute; right: 12px; top: calc(80px + var(--safe-t)); z-index: 4; display: flex; flex-direction: column; gap: 10px;
}
.modo-ruta .controles { top: calc(160px + var(--safe-t)); }
.solchip {
  position: absolute; left: 12px; top: calc(80px + var(--safe-t)); z-index: 4; display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); padding: 7px 14px 7px 10px; font-size: 13px;
  font-weight: 600; color: var(--ink-2); border: 0; cursor: pointer; max-width: calc(100% - 90px);
}
.solchip .ico { color: var(--sol); }
.solchip.noche .ico { color: var(--ink-mut); }
.solchip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modo-ruta .solchip { display: none; }

/* hoja inferior (móvil) / columna (escritorio) */
.hoja {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 72vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-up);
  padding-bottom: var(--safe-b); transition: max-height .25s ease;
}
.hoja.plegada { max-height: 236px; }
.asa { border: 0; background: none; width: 100%; padding: 10px 0 4px; cursor: pointer; display: grid; place-items: center; flex: none; }
.asa::before { content: ""; width: 42px; height: 5px; border-radius: 99px; background: var(--line-strong); }
.hoja-in { overflow-y: auto; padding: 0 16px 16px; overscroll-behavior: contain; }
.cab-ruta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }
.cab-ruta .solinfo { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.cab-ruta .solinfo .ico { color: var(--sol); }
.alternativas { display: flex; flex-direction: column; gap: 8px; }
.alt {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 12px 14px;
}
.alt:hover { border-color: var(--line-strong); }
.alt.sel { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; background: var(--brand-soft); }
.alt .nom { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.alt .nom .tag { font-size: 11px; font-weight: 700; color: var(--brand-ink); background: var(--surface); border: 1px solid var(--brand); padding: 1px 7px; border-radius: 99px; }
.alt .min { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-size: 20px; font-weight: 700; line-height: 1.1; }
.alt .min small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-mut); }
.alt .det { font-size: 12.5px; color: var(--ink-2); }
.alt .barra-sombra { grid-column: 1 / -1; margin-top: 8px; }
.medidor { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.medidor .pista { flex: 1; height: 8px; border-radius: 99px; background: var(--sol-soft); overflow: hidden; }
.medidor .pista i { display: block; height: 100%; background: var(--sombra); border-radius: 99px; }
.medidor b { min-width: 76px; text-align: right; color: var(--ink); }
.ganancia { grid-column: 1 / -1; font-size: 12.5px; color: var(--ok); font-weight: 600; margin-top: 4px; }
.acciones { display: flex; gap: 8px; margin: 14px 0 6px; }
.acciones .btn { flex: 1; }
.nota { font-size: 12px; color: var(--ink-mut); margin: 10px 0 0; }
.leyenda { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin: 10px 0 0; }
.leyenda i { display: inline-block; width: 18px; height: 5px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.leyenda .ls i { background: var(--sombra); }
.leyenda .lo i { background: var(--sol); }

.pasos { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.paso { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.paso .gi { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-sunk); color: var(--ink-2); }
.paso .tx { font-size: 14px; }
.paso .tx small { display: block; color: var(--ink-mut); font-size: 12px; margin-top: 2px; }
.paso .acera { display: inline-block; font-size: 11px; font-weight: 700; color: var(--sombra); background: var(--sombra-soft); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.paso .pc { font-size: 12px; font-weight: 700; text-align: right; }
.paso .pc.s { color: var(--sombra); }
.paso .pc.o { color: var(--sol-ink); }

/* aviso flotante */
.aviso {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(24px + var(--safe-b)); z-index: 30;
  background: #1b2433; color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px;
  max-width: min(92vw, 460px); text-align: center;
}
.cargando {
  position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: var(--bg); color: var(--ink-2);
}
.cargando .rueda, .rueda {
  width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--brand); animation: gira 0.9s linear infinite;
  margin: 0 auto 14px;
}
.rueda.p { width: 18px; height: 18px; border-width: 2px; margin: 0; display: inline-block; vertical-align: middle; }
@keyframes gira { to { transform: rotate(360deg); } }

/* marcadores */
.mk-yo { width: 22px; height: 22px; border-radius: 50%; background: #2a78d6; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.3); position: relative; }
.mk-yo::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; background: rgba(42,120,214,.18); animation: late 2s ease-out infinite; z-index: -1; }
.mk-yo .cono { position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 22px solid rgba(42,120,214,.55); transform-origin: 50% 100%; translate: -50% -100%; display: none; }
@keyframes late { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.mk-o { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--brand-ink); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.mk-d { width: 34px; height: 44px; cursor: grab; }
.mk-d svg { width: 34px; height: 44px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.popup-punto { font-family: var(--font); font-size: 13.5px; }
.popup-punto .maplibregl-popup-content { border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); background: var(--surface); color: var(--ink); }
.popup-punto .botones { display: flex; gap: 6px; margin-top: 8px; }
.popup-punto .btn { min-height: 34px; padding: 0 12px; font-size: 13px; }

/* aviso para instalar la app (móvil) */
.instalar {
  position: absolute; left: 12px; right: 12px; bottom: calc(14px + var(--safe-b)); z-index: 6;
  display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 10px 6px 10px 12px;
}
.instalar img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.instalar .tx { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.instalar .tx b { display: block; font-size: 14px; }
.instalar .tx span { color: var(--ink-mut); }
.instalar .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
.modo-ruta .instalar, .navegando .instalar { display: none; }
.pasos-ios { margin: 4px 0 0; padding-left: 20px; color: var(--ink-2); }
.pasos-ios li { margin: 8px 0; }
.pasos-ios .ico { vertical-align: -3px; color: var(--brand-ink); }
.qr { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); }
.qr img { width: 112px; height: 112px; flex: none; background: #fff; border-radius: 6px; padding: 4px; }
.qr p { margin: 0; font-size: 13px; color: var(--ink-2); }

/* navegación */
.nav-top {
  position: absolute; left: 12px; right: 12px; top: calc(12px + var(--safe-t)); z-index: 12;
  background: var(--brand-ink); color: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px 16px;
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center;
}
.nav-top .gi { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.16); display: grid; place-items: center; }
.nav-top .dist { font-size: 22px; font-weight: 700; line-height: 1.1; }
.nav-top .txt { font-size: 15px; font-weight: 500; }
.nav-top .acera { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 99px; }
.nav-bot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 12; background: var(--surface); box-shadow: var(--shadow-up);
  border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 14px 16px calc(14px + var(--safe-b)); display: flex; align-items: center; gap: 12px;
}
.nav-bot .resto { flex: 1; }
.nav-bot .resto b { font-size: 20px; }
.nav-bot .resto small { display: block; color: var(--ink-mut); font-size: 12.5px; }
.navegando .panel, .navegando .controles, .navegando .solchip { display: none; }

/* diálogos */
dialog {
  border: 0; padding: 0; background: var(--surface); color: var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow);
  width: min(94vw, 440px); max-height: 88vh;
}
dialog::backdrop { background: rgba(10,16,26,.42); }
.dlg-in { padding: 18px 18px 16px; overflow-y: auto; max-height: 88vh; }
.dlg-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dlg-cab h2 { font-size: 18px; margin: 0; }
.dlg-pie { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.grupo-titulo { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 12px 0 2px; }
.ayuda { font-size: 12.5px; color: var(--ink-mut); margin: 2px 0 6px; }
.lista-sitios { list-style: none; margin: 0; padding: 0; }
.lista-sitios li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.lista-sitios li .tx { flex: 1; min-width: 0; }
.lista-sitios li .tx small { display: block; color: var(--ink-mut); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perfil-cab { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.perfil-cab .avatar { width: 48px; height: 48px; font-size: 18px; }
.menu { list-style: none; padding: 0; margin: 8px 0 0; }
.menu a, .menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border: 0; background: none; text-align: left;
  border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 500;
}
.menu .ico { color: var(--ink-mut); }
.menu .peligro { color: var(--crit); }
.menu .peligro .ico { color: var(--crit); }
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.interruptor input { width: 44px; height: 26px; accent-color: var(--brand-ink); }
.permiso-ilu { width: 64px; height: 64px; border-radius: 18px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; margin-bottom: 12px; }
.permiso-ilu .ico { width: 32px; height: 32px; }

/* ------------------------------------------------------------------ escritorio: columna a la izquierda */
@media (min-width: 900px) {
  #mapa { left: var(--panel); }
  .panel { right: auto; width: var(--panel); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
  .barra { position: static; margin: 14px 14px 8px; box-shadow: none; border: 1px solid var(--line-strong); }
  .sugerencias { position: static; margin: 0 14px; box-shadow: none; border: 1px solid var(--line); max-height: none; flex: 0 1 auto; }
  .hoja { position: static; max-height: none; flex: 1; min-height: 0; box-shadow: none; border-radius: 0; background: none; }
  .hoja.plegada { max-height: none; }
  .asa { display: none; }
  .hoja-in { padding: 4px 16px 16px; }
  .controles, .modo-ruta .controles { top: 14px; }
  .solchip { left: calc(var(--panel) + 14px); top: 14px; }
  .modo-ruta .solchip { display: inline-flex; }
  .nav-top { left: calc(var(--panel) + 14px); right: auto; width: 420px; }
  .nav-bot { left: var(--panel); }
  .navegando .panel { display: flex; }
  .navegando #mapa { left: var(--panel); }
  .aviso { left: calc(50% + var(--panel) / 2); }
  .bienvenida { padding: 6px 18px 18px; }
}
.bienvenida { padding: 0 2px; }
.bienvenida h2 { font-size: 16px; margin: 6px 0 6px; }
.bienvenida p { font-size: 13.5px; color: var(--ink-2); margin: 0 0 10px; }
.atajos { display: flex; gap: 8px; flex-wrap: wrap; }

/* páginas legales */
.legal { max-width: 760px; margin: 0 auto; padding: 28px 18px 60px; overflow: auto; }
body.pagina { overflow: auto; }
.legal h1 { font-size: 26px; margin: 10px 0 6px; }
.legal h2 { font-size: 18px; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }
.legal .pendiente { background: var(--sol-soft); color: var(--sol-ink); padding: 1px 5px; border-radius: 4px; font-weight: 600; }
