/* =========================================================
   Neto · estilos
   Idea del diseño: "fuerzas en equilibrio".
   - Modo claro: fondo blanco, tinta casi negra.
   - Modo oscuro: fondo casi negro, tinta casi blanca.
   - Un solo color de acento: el azul. Se usa para lo
     que resta (gastos) y para lo que se toca (acciones).
   - Líneas finas de 1px como estructura. Esquinas rectas.
   ========================================================= */

/* Letras incluidas en el sitio (carpeta fonts/) */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("../fonts/martian-mono-latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ---------- Colores y medidas (tema claro) ---------- */
:root {
  --fondo: #ffffff;        /* blanco */
  --panel: #f2f3f5;        /* paneles y tablas */
  --tinta: #141414;        /* texto y barras */
  --tinta-2: #3b3d42;      /* texto secundario, todavía fuerte */
  --linea: #141414;        /* líneas de estructura */
  --linea-suave: #d5d7dc;  /* separadores dentro de paneles */
  --hilo: #1f5fd6;         /* el hilo azul: barras de gastos y acciones */
  --hilo-texto: #1a52b8;   /* azul con contraste suficiente para texto */
  --sobre-tinta: #ffffff;  /* texto encima de fondo negro */
  --pendiente: #fff4c2;

  --letra: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --ancho: 1080px;
  --lectura: 68ch;
  --margen: 18px;
  --salida: cubic-bezier(0.16, 1, 0.3, 1); /* frenado suave */

  color-scheme: light;
}

/* ---------- Tema oscuro (de noche en el carro) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fondo: #121211;
    --panel: #1c1c1a;
    --tinta: #ecebe7;
    --tinta-2: #c9c8c2;
    --linea: #ecebe7;
    --linea-suave: #3a3a37;
    --hilo: #7aa7ff;
    --hilo-texto: #93b8ff;
    --sobre-tinta: #121211;
    --pendiente: #4a4320;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fondo: #121211;
  --panel: #1c1c1a;
  --tinta: #ecebe7;
  --tinta-2: #c9c8c2;
  --linea: #ecebe7;
  --linea-suave: #3a3a37;
  --hilo: #7aa7ff;
  --hilo-texto: #93b8ff;
  --sobre-tinta: #121211;
  --pendiente: #4a4320;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent; /* sin destello gris al tocar */
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--letra);
  font-size: 17px;
  line-height: 1.6;
  caret-color: var(--hilo);
  text-rendering: optimizeLegibility;
}

::selection { background: var(--hilo); color: var(--sobre-tinta); }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--hilo);
  outline-offset: 3px;
}

/* Botones y enlaces de menú: respuesta inmediata al tocar
   y sin seleccionar el texto al dejar el dedo presionado */
button, .boton, .menu a, .fila-enlace {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

h1, h2, h3 {
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-stretch: 90%; /* un poco angosta: los títulos largos caben mejor en el celular */
  text-wrap: balance;
  margin: 0;
}
p { text-wrap: pretty; }

.contenedor {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 var(--margen);
}

.cifra, .medida {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.icono { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }

/* Salto al contenido (teclado y lectores de pantalla) */
.saltar {
  position: absolute;
  left: var(--margen);
  top: -100px;
  background: var(--tinta);
  color: var(--sobre-tinta);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.saltar:focus { top: 0.5rem; }

/* Texto solo para lectores de pantalla */
.saltar-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Encabezado y menú ---------- */
.encabezado {
  border-bottom: 1px solid var(--linea);
  padding-top: env(safe-area-inset-top, 0px);
}
.encabezado .contenedor {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 2rem;
}
.logo {
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 0.9rem 0;
}
.logo span { color: var(--hilo); }

/* Botones de idioma y de modo oscuro, junto al logo */
.utilidades {
  order: 3;
  display: flex;
  align-items: center;
  margin-left: -0.75rem;
}
.idioma, .boton-tema {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--tinta);
  cursor: pointer;
  text-decoration: none;
}
.idioma span {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--linea);
  padding: 0.3rem 0.45rem;
  line-height: 1;
}
.boton-tema .icono { width: 1.25rem; height: 1.25rem; vertical-align: 0; }
/* Luna en modo claro, sol en modo oscuro */
.boton-tema:not([aria-pressed="true"]) .sol,
.boton-tema[aria-pressed="true"] .luna { display: none; }
.idioma:active span, .boton-tema:active { color: var(--hilo-texto); }
@media (hover: hover) and (pointer: fine) {
  .idioma:hover span { border-color: var(--hilo); color: var(--hilo-texto); }
  .boton-tema:hover { color: var(--hilo-texto); }
}

.menu {
  margin-left: auto;
  display: flex;
  gap: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.8rem;
  text-decoration: none;
  position: relative;
}
.menu a:last-child { padding-right: 0; }
/* La página actual se marca con el hilo azul debajo */
.menu a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: -1px;
  height: 3px;
  background: var(--hilo);
}
.menu a:last-child[aria-current="page"]::after { right: 0; }

/* Hasta 1059px el menú va abajo del logo, en 2 filas: los 7 botones no caben junto a él */
@media (max-width: 1059px) {
  .utilidades { order: 2; margin-left: auto; margin-right: -0.6rem; }
  .menu {
    order: 3;
    width: calc(100% + 2 * var(--margen));
    margin: 0 calc(-1 * var(--margen));
    border-top: 1px solid var(--linea);
  }
  /* Mosaicos: las 4 herramientas arriba y el contenido abajo (estilo al final de BURBUJAS DE CRISTAL) */
  .menu { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .menu a { grid-column: span 4; }
  .menu a:nth-child(-n + 4) { grid-column: span 3; }
  .menu a[aria-current="page"]::after,
  .menu a:last-child[aria-current="page"]::after { left: 0; right: 0; }
}

/* ---------- Botón principal ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 52px;
  padding: 0.85rem 1.2rem;
  background: var(--tinta);
  color: var(--sobre-tinta);
  border: 0;
  border-radius: 0;
  font: 700 1rem/1.2 var(--letra);
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--salida), background-color 120ms;
}
.boton .icono { color: var(--hilo); width: 1.25em; height: 1.25em; transition: transform 200ms var(--salida); }
.boton:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .boton:hover .icono { transform: translateX(4px); }
}

/* ---------- Portada (inicio) ---------- */
.portada {
  display: grid;
  gap: 1.75rem;
  padding: 2rem 0 3rem;
}
.portada h1 {
  font-size: clamp(2.6rem, 9vw, 5.2rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.03em;
  max-width: 13ch;
}
.portada .entrada {
  font-size: 1.1rem;
  max-width: 36ch;
  margin: 0.9rem 0 0;
  color: var(--tinta-2);
}
.portada .boton { width: 100%; }

@media (min-width: 860px) {
  .portada {
    grid-template-columns: 1.15fr 1fr;
    align-items: end;
    column-gap: 3.5rem;
    padding: 4.5rem 0 4.5rem;
  }
  .portada .boton { width: auto; }
}

/* ---------- Diagrama de fuerzas ----------
   Cada barra mide exactamente la cantidad, comparada con el pago.
   Negro = lo que entra o queda. Azul = lo que resta. */
.fuerzas {
  background: var(--panel);
  padding: 1.1rem 1rem 0.9rem;
  margin: 0;
}
.fuerza {
  display: grid;
  grid-template-columns: 6.2rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
}
.fuerza dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fuerza dd { margin: 0; }
.fuerza .monto {
  font-weight: 700;
  font-size: 1rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.barra {
  height: 3px;
  background: var(--tinta);
  width: var(--w, 0%);
  transition: width 700ms var(--salida);
}
.fuerza.resta .barra { height: 2px; background: var(--hilo); }
.fuerza.resta .monto { color: var(--hilo-texto); }
.fuerza.neta {
  border-top: 1px solid var(--linea);
  margin-top: 0.4rem;
  padding-top: 0.85rem;
}
.fuerza.neta .barra { height: 5px; }
.fuerza.neta .monto { font-size: 1.6rem; letter-spacing: -0.02em; }
.fuerza.neta.perdida .barra { background: var(--hilo); }
.fuerza.neta.perdida .monto { color: var(--hilo-texto); }
.pie-diagrama {
  font-size: 0.85rem;
  color: var(--tinta-2);
  margin: 0.6rem 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .barra, .boton, .boton .icono { transition: none; }
}

/* ---------- Ejemplo vivo de la portada (js/portada.js) ----------
   Las barras crecen con transform (más fluido que width) y, al cambiar de
   ejemplo, se encogen o estiran desde donde estén. */
/* Todas las filas comparten las mismas columnas (de ancho fijo), así las barras
   se comparan bien entre sí y no tiemblan mientras cuentan los números */
.fuerzas.vivo {
  display: grid;
  grid-template-columns: max-content 1fr 6.2rem; /* 6.2rem: cabe "$534.88" grande */
  column-gap: 0.75rem;
}
.fuerzas.vivo .fuerza { grid-column: 1 / -1; grid-template-columns: subgrid; }
.fuerzas.vivo .barra {
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 700ms var(--salida);
}
.fuerzas.vivo .monto { transition: color 200ms ease; }

/* Botones para elegir el ejemplo; la línea azul se llena hasta el siguiente */
.ejemplos {
  display: flex;
  gap: 1.1rem;
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ejemplos[hidden] { display: none; }
.ejemplos button {
  position: relative;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--tinta-2);
  cursor: pointer;
  transition: color 150ms ease;
}
.ejemplos button[aria-pressed="true"] { color: var(--tinta); }
.ejemplos button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--hilo);
  transform-origin: left center;
  transform: scaleX(0);
}
.ejemplos button[aria-pressed="true"]::after { transform: scaleX(1); }
/* Mientras el ejemplo cambia solo, la línea avanza a ritmo constante */
.ejemplos.corriendo button[aria-pressed="true"]::after {
  animation: llenar var(--espera, 4.5s) linear both;
}
.ejemplos.pausa button[aria-pressed="true"]::after { animation-play-state: paused; }
@keyframes llenar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (hover: hover) and (pointer: fine) {
  .ejemplos button:hover { color: var(--tinta); }
}

/* ---------- Carretera de la portada ----------
   Un carrito recorre la línea; de vez en cuando salta (js/portada.js)
   y en lo alto del salto sale un "$" que sube y se desvanece. */
.carretera {
  position: relative;
  height: 30px;
  border-bottom: 1px solid var(--linea);
  overflow-x: clip;       /* el carro entra y sale por los lados... */
  overflow-y: visible;    /* ...pero el "$" puede subir por encima */
  margin-bottom: 0.4rem;
}
/* Capa del ancho de la carretera que se desplaza: el carro va en su borde izquierdo */
.trayecto {
  position: absolute;
  inset: 0;
  animation: recorrer 9s linear infinite;
}
@keyframes recorrer {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}
.carro {
  position: absolute;
  left: -38px;            /* empieza escondido a la izquierda */
  bottom: 0;
  width: 36px;
  height: 17px;
  color: var(--tinta);
}
.carro svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* El salto: sube rápido y frenando, baja acelerando (como la gravedad) */
.carro.salta { animation: saltar 480ms both; }
@keyframes saltar {
  0%   { transform: translateY(0) rotate(0); animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  45%  { transform: translateY(-11px) rotate(-7deg); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); }
  100% { transform: translateY(0) rotate(0); }
}
.dinero {
  position: absolute;
  bottom: 18px;
  font: 700 1rem/1 var(--mono);
  color: var(--hilo-texto);
  pointer-events: none;
  animation: subir-dinero 900ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes subir-dinero {
  0%   { opacity: 0; transform: translateY(4px) scale(0.9); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-22px) scale(1); }
}
/* El ojito de Neto: parpadea de vez en cuando y, al saltar, se pone contento (^) */
.carro .ojo-abierto {
  transform-box: fill-box;
  transform-origin: center;
  animation: parpadear 4.6s infinite;
}
@keyframes parpadear {
  0%, 93%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}
.carro .ojo-feliz { opacity: 0; }
/* Mientras salta (js/portada.js quita .salta al aterrizar) */
.carro.salta .ojo-abierto { opacity: 0; animation: none; }
.carro.salta .ojo-feliz { opacity: 1; }
.carretera.pausa .ojo-abierto { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .carro .ojo-abierto { animation: none; } }

/* Fuera de pantalla o en otra pestaña: todo quieto */
.carretera.pausa .trayecto,
.carretera.pausa .carro,
.carretera.pausa .dinero { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  /* Sin movimiento: el carro se queda estacionado y no salta */
  .trayecto { animation: none; transform: translateX(12%); }
  .carro.salta, .dinero { animation: none; }
  .dinero { display: none; }
}

/* Entrada de la portada: una sola vez, al abrir la página */
.portada > div > * {
  animation: aparecer 520ms var(--salida) both;
}
.portada > div:first-child > :nth-child(2) { animation-delay: 70ms; }
.portada > div:last-child > * { animation-delay: 140ms; }
@keyframes aparecer {
  from { opacity: 0; transform: translateY(12px); }
}

@media (prefers-reduced-motion: reduce) {
  .fuerzas.vivo .barra { transition: none; }
  .ejemplos.corriendo button[aria-pressed="true"]::after { animation: none; }
  /* Sin movimiento: solo aparece, sin subir */
  .portada > div > * { animation-name: aparecer-suave; animation-duration: 300ms; }
  @keyframes aparecer-suave { from { opacity: 0; } }
}

/* ---------- Índice de secciones (inicio y guía) ---------- */
.indice {
  border-top: 1px solid var(--linea);
  margin-bottom: 4rem;
}
.indice h2.titulo-indice {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1rem 0;
}
.fila-enlace {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1.5rem;
  align-items: center;
  padding: 1.25rem 0;
  border-top: 1px solid var(--linea-suave);
  text-decoration: none;
}
.fila-enlace h3, .fila-enlace h2 {
  font-size: clamp(1.3rem, 3.6vw, 1.75rem);
  font-weight: 700;
}
.fila-enlace p {
  grid-column: 1;
  margin: 0;
  color: var(--tinta-2);
  max-width: 60ch;
}
.fila-enlace .icono {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--hilo);
  transition: transform 220ms var(--salida);
}
.fila-enlace:active { background: var(--panel); }
@media (hover: hover) and (pointer: fine) {
  .fila-enlace:hover h3, .fila-enlace:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
  .fila-enlace:hover .icono { transform: translateX(6px); }
}

/* ---------- Inicio: bloques de tarjetas (herramientas y guía) ----------
   Menos texto: cada tarjeta enseña con un dibujo o un número grande. */
.bloque { margin: 1rem 0 4.5rem; }
.bloque-cabeza {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--linea);
  padding: 1rem 0 1.1rem;
}
.bloque-cabeza h2 {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.bloque-cabeza .ver-todo {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--hilo-texto);
  text-decoration: none;
  padding: 0.75rem 0; /* área cómoda para tocar */
}

/* Herramientas: 2 columnas en el celular, 4 en la computadora */
.tarjetas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 860px) { .tarjetas { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.tarjeta {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--linea);
  text-decoration: none;
  color: var(--tinta);
  background: var(--fondo);
  transition: transform 160ms var(--salida);
}
.tarjeta:active { transform: scale(0.98); }
.tarjeta .vista {
  height: 96px;
  background: var(--panel);
  border-bottom: 1px solid var(--linea);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.tarjeta .texto { padding: 0.75rem 0.75rem 0.85rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.tarjeta .etiqueta {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tinta-2);
}
.tarjeta h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.2; }
.tarjeta .accion {
  margin-top: auto;
  padding-top: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--hilo-texto);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.tarjeta .accion .icono { width: 1rem; height: 1rem; transition: transform 200ms var(--salida); }
@media (hover: hover) and (pointer: fine) {
  .tarjeta:hover { transform: translateY(-3px); }
  .tarjeta:hover .accion .icono { transform: translateX(4px); }
}

/* Dibujo: mapa de calor (horarios) */
.mini-calor {
  display: grid;
  grid-template-columns: repeat(7, 13px);
  gap: 3px;
}
.mini-calor i { height: 13px; background: var(--linea-suave); }
.mini-calor i[data-n="1"] { background: color-mix(in srgb, var(--hilo) 30%, var(--panel)); }
.mini-calor i[data-n="2"] { background: color-mix(in srgb, var(--hilo) 60%, var(--panel)); }
.mini-calor i[data-n="3"] { background: var(--hilo); }

/* Dibujo: barras por día (turnos) */
.mini-barras {
  display: grid;
  grid-template-columns: repeat(7, 12px);
  gap: 6px;
  align-items: end;
  height: 62px;
}
.mini-barras i { height: var(--h); background: var(--tinta); transform-origin: bottom; }
.mini-barras i.top { background: var(--hilo); }

/* Dibujo: oferta de una app leída por el lector */
.mini-oferta {
  width: 112px;
  background: var(--fondo);
  border: 1px solid var(--linea);
  padding: 7px 8px 8px;
  position: relative;
  overflow: hidden;
}
.mini-oferta b { display: block; font-size: 1.15rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mini-oferta small { display: block; font: 500 0.6rem/1.4 var(--mono); color: var(--tinta-2); }
.mini-oferta .queda {
  display: block;
  margin-top: 5px;
  font: 700 0.62rem/1 var(--mono);
  color: var(--sobre-tinta);
  background: var(--hilo);
  padding: 4px 5px;
}
/* La línea que "lee" la captura */
.mini-oferta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--hilo);
  opacity: 0;
}

/* Dibujo: íconos de gadgets */
.mini-iconos { display: flex; gap: 14px; color: var(--tinta); }
.mini-iconos svg { width: 30px; height: 30px; }
.mini-iconos svg:nth-child(2) { color: var(--hilo); }

/* Guía: tarjetas de un dato. En el celular se deslizan de lado */
.datos {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  margin: 0 calc(-1 * var(--margen));
  padding: 0 var(--margen) 6px;
  scroll-padding: 0 var(--margen);
  scrollbar-width: none;
}
.datos::-webkit-scrollbar { display: none; }
.dato {
  flex: 0 0 76%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 236px;
  padding: 1rem 1rem 1.05rem;
  background: var(--panel);
  text-decoration: none;
  color: var(--tinta);
  transition: transform 160ms var(--salida);
}
.dato:active { transform: scale(0.98); }
/* La primera va en negro para dar ritmo */
.dato:first-child { background: var(--tinta); color: var(--sobre-tinta); }
.dato:first-child .dato-num { color: var(--sobre-tinta); }
.dato:first-child .meta, .dato:first-child .dato-txt { color: color-mix(in srgb, var(--sobre-tinta) 75%, transparent); }
.dato .meta {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tinta-2);
  display: flex;
  justify-content: space-between;
}
.dato-num {
  font-size: 3.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--hilo-texto);
  margin-top: 0.6rem;
  font-variant-numeric: tabular-nums;
}
.dato-txt { font-size: 0.95rem; line-height: 1.35; color: var(--tinta-2); }
.dato h3 {
  margin-top: auto;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.dato h3 .icono { width: 1.2rem; height: 1.2rem; color: var(--hilo); flex: none; transition: transform 200ms var(--salida); }
.dato:first-child h3 .icono { color: var(--sobre-tinta); }
@media (hover: hover) and (pointer: fine) {
  .dato:hover { transform: translateY(-3px); }
  .dato:hover h3 .icono { transform: translateX(4px); }
}
@media (min-width: 860px) {
  .datos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; overflow: visible; margin: 0; padding: 0; }
}
/* ---------- Página de la guía: tarjetas por grupo ----------
   Aquí no se deslizan de lado: van una debajo de otra en el celular, en 2 o 3 columnas en pantallas grandes. */
.grupo-guia { margin: 2rem 0 0; }
/* El primer grupo va justo debajo del encabezado, que ya tiene su línea */
.cabeza + .grupo-guia { margin-top: 0.5rem; }
.cabeza + .grupo-guia .titulo-grupo { border-top: 0; }
.grupo-guia:last-of-type { margin-bottom: 4rem; }
.titulo-grupo {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-top: 1px solid var(--linea);
  padding: 1rem 0;
}
.datos.datos-guia {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  overflow: visible;
  margin: 0;
  padding: 0;
}
@media (min-width: 600px) { .datos.datos-guia { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .datos.datos-guia { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
.datos-guia .dato { min-height: 0; gap: 0.35rem; }
.datos-guia .dato .dato-num { margin-top: 0.4rem; font-size: 2.7rem; }
.datos-guia .dato h3 { margin-top: 0.6rem; }
/* En la guía solo la primera ("Empieza aquí") va en negro; el resto, gris */
.datos-guia .dato:first-child:not(.empieza) { background: var(--panel); color: var(--tinta); }
.datos-guia .dato:first-child:not(.empieza) .dato-num { color: var(--hilo-texto); }
.datos-guia .dato:first-child:not(.empieza) .meta,
.datos-guia .dato:first-child:not(.empieza) .dato-txt { color: var(--tinta-2); }
.datos-guia .dato:first-child:not(.empieza) h3 .icono { color: var(--hilo); }
.dato .sello {
  align-self: flex-start;
  margin-top: 0.5rem;
  font: 600 0.64rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--hilo);
  color: var(--sobre-tinta);
  padding: 4px 6px;
}

/* Puntos que indican cuántas tarjetas hay (solo en el celular) */
.puntos { display: flex; justify-content: center; gap: 6px; margin-top: 0.75rem; }
.puntos i { width: 6px; height: 6px; background: var(--linea-suave); transition: background-color 200ms ease, transform 200ms var(--salida); }
.puntos i.activo { background: var(--hilo); transform: scaleX(2.2); }
@media (min-width: 860px) { .puntos { display: none; } }

/* Aparecen al llegar a ellas (js/portada.js pone .listo y luego .visto) */
.bloque.listo .tarjeta, .bloque.listo .dato { opacity: 0; transform: translateY(14px); }
.bloque.visto .tarjeta, .bloque.visto .dato {
  opacity: 1;
  transform: none;
  transition: opacity 500ms var(--salida), transform 500ms var(--salida);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.bloque.listo .mini-calor i { opacity: 0; }
.bloque.visto .mini-calor i { opacity: 1; transition: opacity 260ms ease; transition-delay: calc(250ms + var(--c, 0) * 18ms); }
.bloque.listo .mini-barras i { transform: scaleY(0); }
.bloque.visto .mini-barras i { transform: none; transition: transform 600ms var(--salida); transition-delay: calc(300ms + var(--c, 0) * 50ms); }
.bloque.visto .mini-oferta::after { animation: leer 1100ms 400ms ease-in-out both; }
@keyframes leer {
  0% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(78px); }
  100% { opacity: 0; transform: translateY(78px); }
}
.bloque.listo .mini-oferta .queda { opacity: 0; transform: translateY(4px); }
.bloque.visto .mini-oferta .queda { opacity: 1; transform: none; transition: opacity 300ms ease, transform 300ms var(--salida); transition-delay: 1400ms; }
/* Al terminar, js/portada.js quita .listo y .visto: vuelven los estilos normales (y el hover rápido) */

@media (prefers-reduced-motion: reduce) {
  .bloque.listo .tarjeta, .bloque.listo .dato { transform: none; }
  .bloque.listo .mini-barras i { transform: none; }
  .bloque.visto .mini-oferta::after { animation: none; }
  .tarjeta, .dato { transition: opacity 300ms ease; }
  .tarjeta:hover, .dato:hover, .tarjeta:active, .dato:active { transform: none; }
}

/* ---------- Noticias (noticias.html, js/noticias.js) ---------- */
/* Texto que solo leen los lectores de pantalla */
.solo-lector {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.filtros[hidden] { display: none; }
.filtros {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 1.25rem calc(-1 * var(--margen)) 1rem;
  padding: 0 var(--margen) 4px;
  scrollbar-width: none;
}
.filtros::-webkit-scrollbar { display: none; }
.filtros button {
  flex: none;
  min-height: 40px;
  padding: 0 0.9rem;
  border: 1px solid var(--linea);
  background: var(--fondo);
  color: var(--tinta);
  font: 500 0.75rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms var(--salida);
}
.filtros button:active { transform: scale(0.96); }
.filtros button[aria-pressed="true"] { background: var(--tinta); color: var(--sobre-tinta); }
.filtros button span { color: var(--tinta-2); margin-left: 0.35rem; }
.filtros button[aria-pressed="true"] span { color: inherit; opacity: 0.7; }

.noticias { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 860px) { .noticias { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
.noticia a {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  box-sizing: border-box;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--linea);
  text-decoration: none;
  color: var(--tinta);
  transition: transform 160ms var(--salida);
}
.noticia a:active { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) {
  .noticia a:hover { transform: translateY(-2px); }
  .noticia a:hover h2, .noticia a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
}
.noticia .etiquetas { display: flex; flex-wrap: wrap; gap: 6px; }
.noticia .tag {
  font: 600 0.64rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 6px;
  background: var(--panel);
  color: var(--tinta);
}
.noticia .tag.idioma-en { background: none; border: 1px solid var(--linea-suave); color: var(--tinta-2); }
.noticia h2, .noticia h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
/* En el inicio: 3 noticias, en fila en la computadora */
@media (min-width: 860px) { .noticias-inicio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.noticia .de {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--tinta-2);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}
.noticia .de b { font-weight: 600; color: var(--tinta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.noticia .de span { white-space: nowrap; }
/* La más reciente, en grande */
.noticia.destacada { grid-column: 1 / -1; }
.noticia.destacada a { background: var(--tinta); color: var(--sobre-tinta); border-color: var(--tinta); padding: 1.2rem 1.15rem 1.15rem; gap: 0.75rem; }
.noticia.destacada h2 { font-size: clamp(1.45rem, 5.5vw, 2.1rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; }
.noticia.destacada .tag { background: var(--hilo); color: var(--sobre-tinta); }
.noticia.destacada .tag.idioma-en { background: none; border-color: color-mix(in srgb, var(--sobre-tinta) 40%, transparent); color: var(--sobre-tinta); }
.noticia.destacada .de, .noticia.destacada .de b { color: var(--sobre-tinta); }
.noticia.destacada .de { opacity: 0.8; }
/* Tarjetas grises mientras carga */
.noticia.cargando div { height: 128px; background: var(--panel); animation: latir 1.2s ease-in-out infinite alternate; }
.noticia.cargando.destacada div { height: 190px; }
@keyframes latir { from { opacity: 1; } to { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
  .noticia.cargando div { animation: none; }
  .noticia a:hover, .noticia a:active, .filtros button:active { transform: none; }
}
.noticias-estado { padding: 1.5rem 0; color: var(--tinta-2); }
.noticias-pie { margin: 1.5rem 0 3.5rem; font-size: 0.85rem; color: var(--tinta-2); }

/* ---------- Encabezado de páginas internas ---------- */
.cabeza {
  padding: 2.25rem 0 1.75rem;
  border-bottom: 1px solid var(--linea);
  margin-bottom: 0.5rem;
}
.cabeza h1 {
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  max-width: 18ch;
}
.cabeza p {
  font-size: 1.1rem;
  color: var(--tinta-2);
  max-width: 52ch;
  margin: 0.9rem 0 0;
}

/* ---------- Calculadora ---------- */
.calculadora {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  padding: 1.5rem 0 4rem;
}
.calculadora > * { min-width: 0; }
@media (min-width: 860px) {
  .calculadora { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
  .calculadora .resultados { position: sticky; top: 1.5rem; }
}

/* Leer captura de la oferta */
.captura {
  background: var(--panel);
  padding: 1.1rem 1rem 1rem;
  margin-top: 1.5rem;
  display: grid;
  gap: 0.75rem 2.5rem;
}
@media (min-width: 860px) {
  .captura { grid-template-columns: 1fr 1fr; align-items: center; padding: 1.5rem; }
}
.captura h2 { font-size: 1.4rem; font-weight: 700; }
.captura p { margin: 0.4rem 0 0; }
.boton-captura { width: 100%; }
@media (min-width: 860px) { .boton-captura { width: auto; } }
.boton-captura:focus-within { outline: 2px solid var(--hilo); outline-offset: 3px; }
.captura[aria-busy="true"] .boton-captura { opacity: 0.55; pointer-events: none; }
.estado-captura { font-weight: 600; margin-top: 0.8rem !important; }
.estado-captura:empty { display: none; }
.estado-captura[data-tipo="aviso"],
.estado-captura[data-tipo="error"] { color: var(--hilo-texto); }

.campos { border: 0; margin: 0; padding: 0; min-width: 0; }
.campos legend {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0 0.5rem;
}
.campos + .campos { margin-top: 1.75rem; }

.campo {
  display: block;
  border-top: 1px solid var(--linea-suave);
  padding: 0.85rem 0 0.9rem;
}
.campo:last-of-type { border-bottom: 1px solid var(--linea-suave); }
.campo .etiqueta-campo { display: block; font-weight: 600; }
.campo small { display: block; color: var(--tinta-2); font-size: 0.875rem; margin-top: 0.15rem; }

.entrada-num {
  display: flex;
  align-items: baseline;
  margin-top: 0.5rem;
  border-bottom: 2px solid var(--tinta);
  transition: border-color 120ms;
}
.entrada-num:focus-within { border-color: var(--hilo); }
.entrada-num .unidad {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--tinta-2);
  padding: 0 0.4rem;
}
.entrada-num input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--tinta);
  font: 700 1.5rem/1.2 var(--letra);   /* más de 16px: el celular no hace zoom */
  font-variant-numeric: tabular-nums;
  padding: 0.35rem 0.4rem 0.4rem 0;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}
.entrada-num input::-webkit-outer-spin-button,
.entrada-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.entrada-num input::placeholder { color: var(--tinta-2); opacity: 0.55; font-weight: 500; }

.campo.con-error .entrada-num { border-color: var(--hilo); }

/* Selector de carro: marca, modelo y año */
.selects {
  display: grid;
  gap: 0.5rem 0.75rem;
  margin-top: 0.6rem;
}
@media (min-width: 480px) {
  .selects { grid-template-columns: 1fr 1.4fr 0.8fr; }
}
.selects label { position: relative; display: block; min-width: 0; }
/* Flechita dibujada con dos bordes */
.selects label::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--tinta);
  border-bottom: 2px solid var(--tinta);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.selects select {
  width: 100%;
  min-height: 48px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--tinta);
  border: 0;
  border-bottom: 2px solid var(--tinta);
  border-radius: 0;
  font: 600 1.0625rem/1.2 var(--letra);   /* 17px: el celular no hace zoom */
  padding: 0.5rem 1.6rem 0.5rem 0;
  text-overflow: ellipsis;
  cursor: pointer;
}
.selects select:focus-visible { outline: none; border-color: var(--hilo); }
.selects select:disabled { opacity: 0.45; cursor: not-allowed; }
.selects select option { color: var(--tinta); background: var(--fondo); }
.nota-carro {
  font-size: 0.875rem;
  color: var(--tinta-2);
  margin: 0.6rem 0 0;
}
.mensaje-error {
  color: var(--hilo-texto);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0.4rem 0 0;
}

.acciones-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-top: 1.5rem;
}
.boton-texto {
  background: none;
  border: 0;
  padding: 0.75rem 0;
  color: var(--tinta);
  font: 600 0.95rem var(--letra);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.resultados h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}
.resultados .vacio {
  color: var(--tinta-2);
  margin: 0 0 0.9rem;
}
.tasas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--linea);
  margin: 1rem 0 0;
}
.tasas div { padding: 0.8rem 0; }
.tasas div + div { border-left: 1px solid var(--linea-suave); padding-left: 1rem; }
.tasas dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tasas dd {
  margin: 0.2rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.nota-irs {
  font-size: 0.95rem;
  color: var(--tinta-2);
  border-top: 1px solid var(--linea-suave);
  padding-top: 0.8rem;
  margin: 0.2rem 0 0;
}

/* Barra fija abajo en el celular: el resultado siempre a la vista */
.resumen-fijo {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--tinta);
  color: var(--sobre-tinta);
  padding: 0.75rem var(--margen) calc(0.75rem + env(safe-area-inset-bottom, 0px));
  text-decoration: none;
  transform: translateY(110%);
  transition: transform 320ms var(--salida);
}
.resumen-fijo.visible { transform: none; }
.resumen-fijo .medida { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.resumen-fijo strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.resumen-fijo .por-hora { font-family: var(--mono); font-size: 0.85rem; }
@media (min-width: 860px) { .resumen-fijo { display: none; } }
@media (prefers-reduced-motion: reduce) { .resumen-fijo { transition: none; } }

/* ---------- Horarios por ZIP code ---------- */
.horarios {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding: 1.5rem 0 4rem;
}
@media (min-width: 960px) {
  .horarios { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
  .form-horarios { position: sticky; top: 1.5rem; }
}
.form-horarios .campo { border-bottom: 1px solid var(--linea-suave); }
.form-horarios .boton { width: 100%; margin-top: 1.25rem; }
.form-horarios[aria-busy="true"] .boton { opacity: 0.55; pointer-events: none; }
.estado-horarios { font-weight: 600; margin: 0.8rem 0 0; }
.estado-horarios:empty { display: none; }

.plataformas { border: 0; margin: 1.1rem 0 0; padding: 0; min-width: 0; }
.plataformas legend { padding: 0; margin-bottom: 0.5rem; }
/* Botones de app: uno al lado del otro, el elegido se rellena */
.segmentos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--linea);
}
.segmentos label { position: relative; display: block; }
.segmentos label:nth-child(odd) { border-right: 1px solid var(--linea); }
.segmentos label:nth-child(-n+2) { border-bottom: 1px solid var(--linea); }
.segmentos input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmentos span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-weight: 600;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 120ms, color 120ms;
}
.segmentos input:checked + span { background: var(--tinta); color: var(--sobre-tinta); }
.segmentos input:focus-visible + span { outline: 2px solid var(--hilo); outline-offset: -4px; }

.reporte h2 { font-size: clamp(1.45rem, 4.4vw, 1.9rem); font-weight: 700; }
.reporte h3 {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-top: 1px solid var(--linea);
  padding-top: 0.9rem;
  margin: 2rem 0 0.75rem;
}
.reporte > .nota:first-of-type { margin-top: 0.4rem; }

.mejores { list-style: none; padding: 0; margin: 0; counter-reset: mejor; }
.mejores li {
  counter-increment: mejor;
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 0.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--linea-suave);
}
.mejores li::before {
  content: counter(mejor);
  grid-row: span 2;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--hilo-texto);
  padding-top: 0.15rem;
}
.mejores strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.mejores span { color: var(--tinta-2); font-size: 0.95rem; }

/* Mapa de calor: filas = horas, columnas = días */
.mapa-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.mapa {
  border-collapse: separate;
  border-spacing: 3px;
  width: 100%;
  min-width: 330px;
  font-size: 0.75rem;
  table-layout: fixed;
}
.mapa th, .mapa td { border: 0; padding: 0; }
.mapa thead th {
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.66rem;
  text-align: center;
  padding-bottom: 0.3rem;
  white-space: normal;
}
.mapa thead th span { display: block; }
.mapa thead th span + span { font-size: 0.85rem; font-family: var(--letra); font-weight: 700; }
.mapa thead th:first-child { width: 3.6rem; }
.mapa tbody th {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.62rem;
  text-align: right;
  padding-right: 0.4rem;
  white-space: nowrap;
}
.mapa td { height: 1.6rem; }
.nivel-0 { background: transparent; box-shadow: inset 0 0 0 1px var(--linea-suave); }
.nivel-1 { background: color-mix(in srgb, var(--hilo) 22%, transparent); }
.nivel-2 { background: color-mix(in srgb, var(--hilo) 55%, transparent); }
.nivel-3 { background: var(--hilo); }
.mapa td.pasado {
  background: repeating-linear-gradient(135deg, var(--linea-suave) 0 1px, transparent 1px 5px);
}

.leyenda {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.85rem;
}
.leyenda li { display: flex; align-items: center; gap: 0.4rem; }
.muestra { width: 1rem; height: 1rem; display: inline-block; }

.clima { list-style: none; padding: 0; margin: 0; }
.clima li { padding: 0.45rem 0; border-bottom: 1px solid var(--linea-suave); font-size: 0.95rem; }
.clima strong { display: block; }
@media (min-width: 560px) { .clima strong { display: inline-block; min-width: 7.5rem; } }
.datos-zona dd { white-space: pre-line; }
.aviso-estimado { margin-top: 2rem; border-top: 1px solid var(--linea); padding-top: 1rem; }

/* Días festivos de la semana */
.festivos-reporte { font-weight: 600; color: var(--hilo-texto); margin: 0.5rem 0 0; }
.festivos-reporte:empty { display: none; }
.mapa thead th.festivo span:first-child { color: var(--hilo-texto); }
.mapa thead th.festivo span + span { text-decoration: underline; text-decoration-color: var(--hilo); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Compartir / calendario */
.acciones-reporte { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: 0.5rem; }
.boton-texto { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; }
.boton-texto .icono { color: var(--hilo); }
.estado-acciones { font-weight: 600; margin: 0.25rem 0 0; }
.estado-acciones:empty { display: none; }

/* ¿Es buena mi zona? */
.estado-zona { color: var(--tinta-2); margin: 0; }
.estado-zona:empty { display: none; }
.zona[aria-busy="true"] .estado-zona::before {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.5rem;
  border: 2px solid var(--hilo);
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.05em;
  animation: girar 0.8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .zona[aria-busy="true"] .estado-zona::before { animation: none; } }
.veredicto { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.75rem; }
.datos-zona { margin: 0; }
.datos-zona div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--linea-suave);
}
@media (min-width: 560px) { .datos-zona div { grid-template-columns: 16rem 1fr; gap: 1rem; } }
.datos-zona dt { color: var(--tinta-2); font-size: 0.95rem; }
.datos-zona dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Mapa de la zona */
.mapa-zona { margin: 1.25rem 0 0.5rem; }
.lienzo-mapa {
  height: clamp(280px, 55vw, 420px);
  background: var(--panel);
  border: 1px solid var(--linea);
  z-index: 0;
}
.lienzo-mapa .maplibregl-ctrl-attrib { font-size: 0.65rem; }
.lienzo-mapa .maplibregl-popup-content {
  font: 600 0.9rem/1.4 var(--letra);
  color: #141414;
  border-radius: 0;
  padding: 0.5rem 0.7rem;
}
.lienzo-mapa .maplibregl-ctrl-group { border-radius: 0; }
/* Alfiler de Walmart: rombo azul con la distancia */
.pin-walmart {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}
.pin-walmart:focus-visible { outline: 2px solid var(--hilo); outline-offset: 2px; }
.pin-marca {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--hilo);
  border: 2px solid var(--fondo);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
  transform: rotate(45deg);
  flex: none;
}
.pin-grande .pin-marca { width: 18px; height: 18px; }
.pin-texto {
  font: 700 11px/1 var(--letra);
  color: var(--tinta);
  background: var(--fondo);
  border: 1px solid var(--linea);
  padding: 3px 5px;
}
.pin-walmart:not(.pin-grande) .pin-texto { display: none; }
.marcador-zip { display: flex; align-items: center; gap: 5px; pointer-events: none; }
.marcador-zip .anillo { width: 18px; height: 18px; border-width: 4px; background: var(--fondo); }
.etiqueta-zip {
  font: 700 12px/1 var(--mono);
  background: var(--tinta);
  color: var(--sobre-tinta);
  padding: 4px 6px;
}
.leyenda-mapa {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.82rem;
  color: var(--tinta-2);
}
.leyenda-mapa li { display: flex; align-items: center; gap: 0.45rem; }
.leyenda-mapa .pin-marca { width: 10px; height: 10px; box-shadow: none; }
.punto { width: 10px; height: 10px; border-radius: 50%; background: var(--tinta-2); display: inline-block; }
.punto-azul { background: var(--hilo); }
.anillo { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--tinta); display: inline-block; }

/* Tus turnos */
.turnos { padding: 1.5rem 0 3rem; }
.titulo-form { font-size: 1.35rem; font-weight: 700; margin: 0 0 0.5rem; }
.cabeza-turnos h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; }
.cabeza-turnos p { color: var(--tinta-2); max-width: 60ch; margin: 0.6rem 0 0; }
.turnos-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; margin-top: 1.5rem; }
@media (min-width: 960px) { .turnos-grid { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: 3.5rem; align-items: start; } }
.fila-campos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1rem; }
.form-turno .campo { border-top: 0; border-bottom: 0; padding: 0.5rem 0 0.75rem; }
.form-turno .campo small { display: inline; }
.form-turno .entrada-num input,
.select-simple {
  font: 600 1.0625rem/1.2 var(--letra);
  color: var(--tinta);
  background: transparent;
  border: 0;
  border-radius: 0;
  min-height: 44px;
  width: 100%;
  min-width: 0;
}
.form-turno .entrada-num input { padding: 0.35rem 0.4rem 0.4rem 0; }
.form-turno .entrada-num input::-webkit-calendar-picker-indicator { opacity: 0.7; cursor: pointer; }
:root[data-theme="dark"] .form-turno .entrada-num input::-webkit-calendar-picker-indicator { filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-turno .entrada-num input::-webkit-calendar-picker-indicator { filter: invert(1); }
}
.select-simple { cursor: pointer; padding: 0.35rem 0; }
.select-simple option { background: var(--fondo); color: var(--tinta); }
.form-turno .boton { width: 100%; margin-top: 0.5rem; }
.estado-turno { font-weight: 600; margin: 0.75rem 0 0; }
.estado-turno:empty { display: none; }
.estado-turno[data-tipo="error"] { color: var(--hilo-texto); }

.filtro-turnos { display: block; border-bottom: 2px solid var(--tinta); max-width: 16rem; margin-bottom: 1rem; }
.total-turnos { font-weight: 600; margin: 0 0 0.5rem; font-variant-numeric: tabular-nums; }
.resultados-turnos h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.5rem 0 0.4rem;
}
.momentos-turnos { list-style: none; padding: 0; margin: 0; }
.momentos-turnos li {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--linea-suave);
}
.momentos-turnos strong { font-weight: 700; }
.momentos-turnos span { grid-column: 1; color: var(--tinta-2); font-size: 0.9rem; }
.momentos-turnos b { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.detalle-turnos { margin-top: 1.75rem; border-top: 1px solid var(--linea); padding-top: 0.75rem; }
.detalle-turnos summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.lista-turnos { list-style: none; padding: 0; margin: 0.5rem 0 0.75rem; }
.lista-turnos li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  border-bottom: 1px solid var(--linea-suave);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.lista-turnos li span { padding: 0.5rem 0; }

/* ---------- Artículos de la guía ---------- */
.articulo {
  max-width: var(--lectura);
  padding-bottom: 4rem;
}
.migas {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.5rem 0 0;
}
.migas a { text-decoration: none; }
.migas a:active { text-decoration: underline; }
.articulo > h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin-top: 1rem;
}
.articulo .migas { margin: 1.75rem 0 0; }
.articulo .entradilla {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--tinta-2);
  margin: 1.25rem 0 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--linea);
}
.articulo h2 {
  font-size: clamp(1.45rem, 4.4vw, 1.9rem);
  font-weight: 700;
  margin: 3rem 0 0.75rem;
}
.articulo h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 2rem 0 0.5rem;
}
.articulo p { margin: 0 0 1rem; }
.articulo ul, .articulo ol { padding-left: 1.3rem; margin: 0 0 1.25rem; }
.articulo li { margin-bottom: 0.45rem; padding-left: 0.2rem; }
.articulo li::marker { color: var(--hilo-texto); font-weight: 700; }
.articulo strong { font-weight: 700; }
.articulo a:not(.boton) { text-decoration-color: var(--hilo); }

.nota {
  font-size: 0.92rem;
  color: var(--tinta-2);
}

/* "De la calle": consejo de experiencia real.
   Panel con un trazo corto del hilo azul arriba. */
.experiencia {
  background: var(--panel);
  padding: 1.1rem 1.1rem 0.4rem;
  margin: 2rem 0;
  position: relative;
}
.experiencia::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.1rem;
  width: 2.5rem;
  height: 3px;
  background: var(--hilo);
}
.experiencia .rotulo {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0.3rem 0 0.5rem;
}
.experiencia p { margin: 0 0 0.75rem; }
.experiencia ol, .experiencia ul { margin-bottom: 0.75rem; }

/* ---------- Neto Pro (próximamente): medir interés ---------- */
.pro-caja {
  background: var(--tinta);
  color: var(--sobre-tinta);
  padding: 1.4rem 1.15rem 1.2rem;
}
.pro-tag {
  display: inline-block;
  font: 600 0.66rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--hilo);
  color: var(--sobre-tinta);
  padding: 5px 7px;
}
.pro-caja h2 { font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; margin: 0.6rem 0 0.4rem; }
.pro-sub { margin: 0 0 1rem; color: color-mix(in srgb, var(--sobre-tinta) 82%, transparent); max-width: 52ch; }
.pro-sub strong { color: var(--sobre-tinta); }
.pro-ideas { display: grid; gap: 8px; margin-bottom: 1rem; }
@media (min-width: 860px) { .pro-ideas { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.pro-ideas button {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
  padding: 0.75rem 0.85rem 0.8rem 2.6rem;
  position: relative;
  background: none;
  color: inherit;
  border: 1px solid color-mix(in srgb, var(--sobre-tinta) 35%, transparent);
  font: inherit;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 120ms var(--salida);
}
.pro-ideas button b { font-weight: 700; }
.pro-ideas button span { font-size: 0.88rem; color: color-mix(in srgb, var(--sobre-tinta) 75%, transparent); }
/* Cuadrito de marcar */
.pro-ideas button::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid currentColor;
}
.pro-ideas button[aria-pressed="true"] { border-color: var(--hilo); background: color-mix(in srgb, var(--hilo) 22%, transparent); }
.pro-ideas button[aria-pressed="true"]::before {
  background: var(--hilo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.2'/%3E%3C/svg%3E") center / 80% no-repeat;
  border-color: var(--hilo);
}
.pro-ideas button:active { transform: scale(0.985); }
.pro-ideas button:disabled { cursor: default; }
.pro-ideas button:disabled:not([aria-pressed="true"]) { opacity: 0.5; }
.pro-caja .boton { background: var(--sobre-tinta); color: var(--tinta); border-color: var(--sobre-tinta); width: 100%; }
.pro-caja .boton .icono { color: var(--hilo); }
@media (min-width: 860px) { .pro-caja .boton { width: auto; } }
.pro-caja .boton[hidden] { display: none; }
.pro-nota { margin: 0.75rem 0 0; font-size: 0.85rem; color: color-mix(in srgb, var(--sobre-tinta) 70%, transparent); }
.pro.votado .pro-nota { color: var(--sobre-tinta); font-weight: 600; font-size: 0.95rem; }
@media (prefers-reduced-motion: reduce) { .pro-ideas button:active { transform: none; } }

/* ---------- Mi cuenta (cuenta.html, js/cuenta.js) ---------- */
.cuenta { max-width: 34rem; margin-bottom: 4rem; }
.cuenta section[hidden] { display: none; }
.cuenta-caja {
  border: 1px solid var(--linea);
  padding: 1.1rem 1rem 1.2rem;
  margin-top: 1.25rem;
}
.pestanas { display: grid; grid-template-columns: 1fr 1fr; margin: -1.1rem -1rem 1.1rem; border-bottom: 1px solid var(--linea); }
.pestanas button {
  min-height: 48px;
  background: none;
  border: 0;
  font: 500 0.75rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tinta-2);
  cursor: pointer;
  position: relative;
}
.pestanas button + button { border-left: 1px solid var(--linea-suave); }
.pestanas button[aria-selected="true"] { color: var(--tinta); }
.pestanas button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--hilo); }
.form-cuenta { display: grid; gap: 1rem; }
.form-cuenta .campo { border: 0; padding: 0; }
.form-cuenta .entrada-num input { font-size: 1.1rem; }
.form-cuenta[hidden] { display: none; }
.form-cuenta .boton { width: 100%; margin-top: 0.25rem; }
.error-cuenta { margin: 0; color: var(--hilo-texto); font-weight: 600; }
.error-cuenta[hidden] { display: none; }
.zona-google[hidden] { display: none; }
.o-bien { display: flex; align-items: center; gap: 0.75rem; color: var(--tinta-2); font-size: 0.9rem; margin: 1.2rem 0 0.9rem; }
.o-bien::before, .o-bien::after { content: ""; flex: 1; border-top: 1px solid var(--linea-suave); }
.nota-cuenta { font-size: 0.85rem; color: var(--tinta-2); margin-top: 1rem; }
.plan { margin: 0 0 0.6rem; font-weight: 600; }
.plan-tag {
  display: inline-block;
  font: 600 0.7rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 7px;
  background: var(--panel);
  color: var(--tinta);
  margin-left: 0.3rem;
}
.plan-tag.es-pro { background: var(--hilo); color: var(--sobre-tinta); }
.texto-capturas { margin: 0 0 0.5rem; }
.pista-capturas { height: 6px; background: var(--panel); margin-bottom: 1.1rem; overflow: hidden; }
.barra-capturas { height: 100%; background: var(--hilo); transform-origin: left center; transform: scaleX(0); transition: transform 500ms var(--salida); }
.cuenta-caja > .boton { width: 100%; }
.cuenta-pro { background: var(--tinta); color: var(--sobre-tinta); border-color: var(--tinta); }
.cuenta-pro[hidden] { display: none; }
.cuenta-pro h2 { font-size: 1.6rem; font-weight: 800; margin: 0.5rem 0 0.3rem; }
.cuenta-pro p { color: color-mix(in srgb, var(--sobre-tinta) 82%, transparent); margin: 0 0 0.5rem; }
.cuenta-pro .boton-texto { color: var(--sobre-tinta); }
.cuenta-acciones { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.cuenta-acciones .borrar { color: var(--tinta-2); }
.cuenta-acciones .borrar.confirmar { color: var(--hilo-texto); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .barra-capturas { transition: none; } }

/* Dentro de la app de Google Play no se venden suscripciones (js/tema.js pone .en-play) */
.en-play #planesPro, .en-play #notaPro, .en-play #bloquePro, .en-play #bloqueProCuenta,
.en-play #bloqueInstalar, .en-play #bloqueApk { display: none !important; }
.instalar-caja .nota-apk { font-size: 0.85rem; margin: 0.7rem 0 0; }

/* "Ten Neto en tu pantalla de inicio" (js/instalar.js) */
.instalar[hidden] { display: none; }
.instalar-caja {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 1rem 1.2rem;
  border-radius: var(--radio-grande, 22px);
  background: var(--panel);
}
.instalar-caja img { border-radius: 16px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.instalar-caja h2 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.instalar-caja p { margin: 0.4rem 0 0.8rem; color: var(--tinta-2); }
.instalar-caja .boton[hidden], .pasos-ios[hidden] { display: none; }
.pasos-ios { color: var(--tinta) !important; font-size: 0.95rem; }
.icono-ios { width: 1.1em; height: 1.1em; vertical-align: -0.15em; color: var(--hilo-texto); }

/* Planes de Neto Pro en Mi cuenta */
.planes { display: grid; gap: 10px; margin: 0.9rem 0 0.6rem; }
.planes[hidden] { display: none; }
.planes .boton { width: 100%; }
.planes .boton b { font-size: 1.15rem; }
.planes .boton small { font: 600 0.7rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }
.nota-pro { font-size: 0.85rem; margin: 0.4rem 0 0; }
.nota-pro[hidden], .aviso-pago[hidden], #administrarPro[hidden], #votarPro[hidden] { display: none; }
.cuenta-pro .nota-pro a { color: inherit; }
#administrarPro { margin-top: 0.75rem; }
.aviso-pago {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radio-medio, 16px);
  background: color-mix(in srgb, var(--hilo) 14%, var(--fondo));
  border: 1px solid color-mix(in srgb, var(--hilo) 40%, transparent);
  font-weight: 600;
}

/* Enlace al panel (solo administradores) */
.enlace-admin { width: 100%; margin-top: 1.25rem; }
.enlace-admin[hidden] { display: none; }

/* ---------- Panel de administración (admin.html, js/admin.js) ---------- */
.admin { margin-bottom: 4rem; }
.admin section[hidden] { display: none; }
.admin-numeros { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 1.25rem 0 2rem; }
@media (min-width: 700px) { .admin-numeros { grid-template-columns: repeat(4, 1fr); } }
.admin-numeros div { background: var(--panel); padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.admin-numeros b { font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--hilo-texto); font-variant-numeric: tabular-nums; }
.admin-numeros span { font: 500 0.7rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--tinta-2); }
.admin-votos { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 0.6rem; max-width: 30rem; }
.admin-votos li { display: grid; gap: 0.3rem; }
.admin-votos li:first-child { display: block; }
.admin-votos i { display: block; height: 4px; background: var(--hilo); transform-origin: left center; }
.admin-tabla th small { display: block; font-weight: 400; font-size: 0.8rem; color: var(--tinta-2); }
.interruptor {
  min-width: 3.4rem;
  min-height: 36px;
  border: 1px solid var(--linea);
  background: var(--fondo);
  color: var(--tinta);
  font: 600 0.8rem/1 var(--mono);
  cursor: pointer;
}
.interruptor[aria-checked="true"] { background: var(--hilo); border-color: var(--hilo); color: var(--sobre-tinta); }
.interruptor:disabled { opacity: 0.5; }

/* Línea de capturas de hoy, debajo del botón "Subir captura" */
.cuota-captura { margin: 0.5rem 0 0; font-size: 0.9rem; font-weight: 600; }
.cuota-captura:empty { display: none; }
.cuota-captura[data-tipo="cuenta"] { font-weight: 400; }
.cuota-captura a { font-weight: 700; color: var(--hilo-texto); }

/* Ícono de "Mi cuenta" junto a EN/ES y el modo oscuro */
.boton-cuenta { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--tinta); }
.boton-cuenta .icono { width: 1.3rem; height: 1.3rem; }
.boton-cuenta[aria-current="page"] { color: var(--hilo-texto); }
@media (hover: hover) and (pointer: fine) { .boton-cuenta:hover { color: var(--hilo-texto); } }

/* Fuentes al final de los artículos */
.articulo .fuentes {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--linea-suave);
  font-size: 0.85rem;
  color: var(--tinta-2);
}

/* Privacidad: botón para borrar lo guardado en el teléfono */
.borrar-datos { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.borrar-datos .boton { width: auto; }
.borrar-datos .boton.confirmar { background: var(--hilo); border-color: var(--hilo); color: var(--sobre-tinta); }
#estadoBorrar { color: var(--tinta-2); font-size: 0.95rem; }
.pie a { color: inherit; }

/* Caja punteada: texto que falta escribir.
   Bórrala cuando pongas tu experiencia. */
.pendiente {
  border: 1px dashed var(--tinta);
  background: var(--pendiente);
  padding: 0.8rem 1rem;
  margin: 2rem 0;
  font-size: 0.95rem;
}

/* Tablas: en el celular se deslizan de lado */
.tabla-scroll {
  overflow-x: auto;
  margin: 1.25rem 0 1.5rem;
  padding: 0.35rem 0.5rem;
  overscroll-behavior-x: contain;
  /* Sombra en el borde cuando queda tabla escondida: avisa que se desliza.
     Las capas "local" se mueven con la tabla y tapan la sombra al llegar al final. */
  --sombra: color-mix(in srgb, var(--tinta) 38%, transparent);
  background:
    linear-gradient(to right, var(--panel) 40%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(to left, var(--panel) 40%, transparent) right / 40px 100% no-repeat local,
    linear-gradient(to right, var(--sombra), transparent) left / 22px 100% no-repeat scroll,
    linear-gradient(to left, var(--sombra), transparent) right / 22px 100% no-repeat scroll,
    var(--panel);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
th, td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--linea-suave);
}
thead th {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--linea);
  white-space: nowrap;
}
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* Bloque "siguiente paso" al final de cada artículo */
.siguiente {
  border-top: 1px solid var(--linea);
  margin-top: 3.5rem;
  padding-top: 1.5rem;
}
.siguiente p { font-size: 1.15rem; font-weight: 600; max-width: 34ch; }
.siguiente .boton { margin-top: 0.25rem; }

/* ---------- Gadgets ---------- */
.productos {
  border-top: 1px solid var(--linea);
  margin-top: 2.5rem;
}
.productos > h2 {
  font-size: clamp(1.45rem, 4.4vw, 1.9rem);
  font-weight: 700;
  padding: 1.1rem 0 0.25rem;
}
.producto {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--linea-suave);
  display: grid;
  gap: 0.6rem 2.5rem;
}
.producto h3 { font-size: 1.3rem; font-weight: 700; }
.producto p { margin: 0 0 0.6rem; max-width: 62ch; }
.producto .buscar {
  background: var(--panel);
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}
.producto .buscar .medida {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}
/* Foto de cada producto (js/productos.js, img/gadgets/) */
.cabeza-producto { display: grid; gap: 0.75rem; align-content: start; }
.foto-producto {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;       /* en el teléfono, más bajita para no alargar tanto la página */
  object-fit: cover;
  border-radius: var(--radio-medio, 16px);
  background: var(--panel);   /* mientras carga */
}
@media (min-width: 860px) { .foto-producto { aspect-ratio: 4 / 3; } }.credito-fotos { margin: 1.5rem 0 0; font-size: 0.8rem; color: var(--tinta-2); }
.modelo-producto { margin: -0.35rem 0 0; font-weight: 600; color: var(--tinta-2); }
.modelo-producto .medida {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (min-width: 860px) {
  .producto { grid-template-columns: 16rem 1fr; }
  .producto h3 { padding-top: 0.15rem; }
}
.filtro-gadgets { max-width: 34rem; margin: 1.75rem 0 0; }
.filtro-gadgets .segmentos span { text-align: center; padding: 0 0.4rem; line-height: 1.2; }
.productos > h2 .cuenta {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--tinta-2);
  vertical-align: middle;
}
.productos > h2 .cuenta:not(:empty)::before { content: "· "; }
.intro-seccion { color: var(--tinta-2); margin: 0.2rem 0 0.4rem; }
.sirve-para {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tinta-2);
  margin: 0.75rem 0 0 !important;
}
.boton-amazon { margin-top: 0.9rem; min-height: 46px; padding: 0.65rem 1rem; font-size: 0.95rem; }
.aviso-afiliado {
  font-size: 0.85rem !important;
  border-left: 0;
  background: var(--panel);
  padding: 0.6rem 0.8rem;
  margin-top: 1rem !important;
}
.productos.compactos { display: grid; }
@media (min-width: 700px) {
  .productos.compactos { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  .productos.compactos > h2 { grid-column: 1 / -1; }
}
.productos.compactos .producto { grid-template-columns: 1fr; }
.productos.compactos .producto h3 { font-size: 1.15rem; }

/* ---------- Pie de página ---------- */
.pie {
  border-top: 1px solid var(--linea);
  padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.9rem;
  color: var(--tinta-2);
}
.pie p { margin: 0; max-width: 60ch; }
.pie strong { color: var(--tinta); }
body.con-resumen .pie { padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 860px) { body.con-resumen .pie { padding-bottom: 1.5rem; } }

/* =====================================================================
   BURBUJAS DE CRISTAL (estilo "Liquid Glass")
   Capa aparte, al final a propósito: para volver a los botones planos
   basta con borrar desde aquí hasta el final del archivo.
   - Píldoras translúcidas con desenfoque de lo que hay detrás.
   - Brillo arriba (la luz pega en el vidrio) y sombra suave abajo.
   - El botón principal es cristal azul; los demás, cristal claro.
   - Al tocar, se hunde al instante (en el toque, no al soltar).
   ===================================================================== */
:root {
  --cristal: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 244, 248, 0.62));
  --cristal-borde: rgba(20, 20, 20, 0.12);
  --cristal-brillo: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(20, 20, 20, 0.06);
  --cristal-sombra: 0 1px 2px rgba(20, 20, 20, 0.06), 0 6px 18px rgba(20, 20, 20, 0.08);
  --cristal-azul: linear-gradient(180deg, rgba(64, 128, 240, 0.96), rgba(31, 95, 214, 0.92));
  --cristal-azul-texto: #ffffff;
  --cristal-azul-brillo: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 4px rgba(0, 30, 90, 0.25);
  --cristal-azul-sombra: 0 2px 4px rgba(31, 95, 214, 0.18), 0 8px 22px rgba(31, 95, 214, 0.28);
  --cristal-desenfoque: blur(14px) saturate(170%);
  --pildora: 999px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cristal: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
    --cristal-borde: rgba(255, 255, 255, 0.16);
    --cristal-brillo: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -1px 1px rgba(0, 0, 0, 0.35);
    --cristal-sombra: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 22px rgba(0, 0, 0, 0.35);
    --cristal-azul: linear-gradient(180deg, rgba(138, 180, 255, 0.95), rgba(98, 150, 250, 0.9));
    --cristal-azul-texto: #0b1630;
    --cristal-azul-sombra: 0 2px 4px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(98, 150, 250, 0.25);
  }
}
:root[data-theme="dark"] {
  --cristal: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  --cristal-borde: rgba(255, 255, 255, 0.16);
  --cristal-brillo: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -1px 1px rgba(0, 0, 0, 0.35);
  --cristal-sombra: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 22px rgba(0, 0, 0, 0.35);
  --cristal-azul: linear-gradient(180deg, rgba(138, 180, 255, 0.95), rgba(98, 150, 250, 0.9));
  --cristal-azul-texto: #0b1630;
  --cristal-azul-sombra: 0 2px 4px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(98, 150, 250, 0.25);
}

/* ---------- La base: una burbuja de cristal ---------- */
.boton-texto,
.menu a,
.filtros button,
.ejemplos button,
.interruptor,
.idioma span,
.boton-tema,
.boton-cuenta,
.segmentos span,
.pestanas button {
  position: relative;
  border-radius: var(--pildora);
  background: var(--cristal);
  border: 1px solid var(--cristal-borde);
  box-shadow: var(--cristal-brillo), var(--cristal-sombra);
  -webkit-backdrop-filter: var(--cristal-desenfoque);
  backdrop-filter: var(--cristal-desenfoque);
  color: var(--tinta);
  text-decoration: none;
  transition: transform 140ms var(--salida), box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

/* ---------- Botón principal: cristal azul ---------- */
.boton {
  border-radius: var(--pildora);
  background: var(--cristal-azul);
  color: var(--cristal-azul-texto);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: var(--cristal-azul-brillo), var(--cristal-azul-sombra);
  padding: 0.85rem 1.4rem;
  transition: transform 140ms var(--salida), box-shadow 160ms ease;
}
.boton .icono { color: currentColor; }
/* Hundirse al tocar: en el momento del toque */
.boton:active,
.boton-texto:active,
.menu a:active,
.filtros button:active,
.ejemplos button:active,
.interruptor:active,
.boton-tema:active,
.boton-cuenta:active,
.pestanas button:active,
.segmentos label:active span { transform: scale(0.96); transition-duration: 80ms; }
.boton:active { box-shadow: var(--cristal-azul-brillo), 0 1px 3px rgba(31, 95, 214, 0.25); }
@media (hover: hover) and (pointer: fine) {
  .boton:hover { box-shadow: var(--cristal-azul-brillo), 0 4px 8px rgba(31, 95, 214, 0.22), 0 14px 30px rgba(31, 95, 214, 0.32); }
  .boton-texto:hover, .menu a:hover, .filtros button:hover, .ejemplos button:hover,
  .boton-tema:hover, .boton-cuenta:hover, .idioma:hover span, .pestanas button:hover {
    box-shadow: var(--cristal-brillo), 0 2px 4px rgba(20, 20, 20, 0.08), 0 10px 26px rgba(20, 20, 20, 0.12);
  }
}
.boton:focus-visible, .boton-texto:focus-visible, .menu a:focus-visible, .filtros button:focus-visible,
.ejemplos button:focus-visible, .interruptor:focus-visible, .boton-tema:focus-visible, .boton-cuenta:focus-visible,
.pestanas button:focus-visible { outline: 2px solid var(--hilo); outline-offset: 3px; }

/* Lo elegido / la página actual: cristal azul */
.menu a[aria-current="page"],
.filtros button[aria-pressed="true"],
.ejemplos button[aria-pressed="true"],
.interruptor[aria-checked="true"],
.segmentos input:checked + span,
.pestanas button[aria-selected="true"] {
  background: var(--cristal-azul);
  color: var(--cristal-azul-texto);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: var(--cristal-azul-brillo), var(--cristal-azul-sombra);
}
.filtros button[aria-pressed="true"] span { color: inherit; opacity: 0.8; }

/* ---------- Botones secundarios (Borrar semana, Salir, etc.) ---------- */
.boton-texto {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 1.1rem;
  font-weight: 600;
}
.boton-texto .icono { color: var(--hilo-texto); }

/* ---------- Encabezado: ícono de cuenta, idioma y modo oscuro ---------- */
.utilidades { gap: 6px; }
.boton-tema, .boton-cuenta {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
}
.idioma { min-width: 40px; }
.idioma span {
  border: 1px solid var(--cristal-borde);
  padding: 0.55rem 0.7rem;
  border-radius: var(--pildora);
}
.boton-cuenta[aria-current="page"] { color: var(--hilo-texto); border-color: var(--hilo); }

/* Acento de los íconos sobre los mosaicos de tinta */
:root { --menu-acento: #9cc0ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --menu-acento: #1f5fd6; } }
:root[data-theme="dark"] { --menu-acento: #1f5fd6; }

/* ---------- Menú: píldoras ---------- */
.menu { gap: 6px; }
.menu a { padding: 0 1rem; min-height: 38px; margin: 5px 0; }
.menu a:last-child { padding-right: 1rem; }
.menu a[aria-current="page"]::after { display: none; } /* ya no hace falta la rayita azul */
@media (max-width: 1059px) {
  .menu { gap: 8px; padding: 10px var(--margen) 12px; border-top: 1px solid var(--linea-suave); }
  /* Mosaico: ícono arriba, nombre abajo, fácil de tocar con una mano */
  .menu a {
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-height: 60px;
    margin: 0;
    padding: 8px 2px 7px;
    border-radius: var(--radio-medio);
    border: 0;
    background: var(--panel);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    font: 700 0.82rem/1.1 var(--letra);
    font-stretch: 88%;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    --color-icono: var(--hilo);
  }
  .menu a:last-child { padding-right: 2px; }
  /* Herramientas: tinta sólida, el mayor contraste posible a pleno sol */
  .menu a:nth-child(-n + 4) {
    min-height: 68px;
    background: var(--tinta);
    color: var(--fondo);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
    --color-icono: var(--menu-acento);
  }
  .menu a[aria-current="page"] {
    background: var(--cristal-azul);
    color: var(--cristal-azul-texto);
    box-shadow: var(--cristal-azul-brillo), var(--cristal-azul-sombra);
    --color-icono: currentColor;
  }
  .menu a::before {
    content: "";
    flex: none;
    width: 24px;
    height: 24px;
    background: var(--color-icono);
    -webkit-mask: var(--icono-menu) center / contain no-repeat;
    mask: var(--icono-menu) center / contain no-repeat;
  }
  .menu a:nth-child(1) { --icono-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Crect x='5' y='3' width='14' height='18'/%3E%3Cpath d='M9 7h6M9 12h.01M12 12h.01M15 12h.01M9 16h.01M12 16h.01M15 16h.01'/%3E%3C/svg%3E"); }
  .menu a:nth-child(2) { --icono-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.5 2'/%3E%3C/svg%3E"); }
  .menu a:nth-child(3) { --icono-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M4 21V4h10v17M2.5 21h13M7 8h4v3H7z'/%3E%3Cpath d='M14 12h2.5v5.5a2 2 0 0 0 4 0V9l-3-3'/%3E%3C/svg%3E"); }
  .menu a:nth-child(4) { --icono-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Crect x='3' y='5' width='18' height='16'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4M8 15l2.5 2.5L16 13'/%3E%3C/svg%3E"); }
  .menu a:nth-child(5) { --icono-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M4 4h13v16H6a2 2 0 0 1-2-2zM17 9h3v9a2 2 0 0 1-2 2h-1M8 8h5M8 12h5M8 16h5'/%3E%3C/svg%3E"); }
  .menu a:nth-child(6) { --icono-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M12 7c-2-2-5-2.500-9-2.500V19c4 0 7 .5 9 2 2-1.500 5-2 9-2V4.500c-4 0-7 .5-9 2.500zM12 7v14'/%3E%3C/svg%3E"); }
  .menu a:nth-child(7) { --icono-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Crect x='7' y='3' width='10' height='16'/%3E%3Cpath d='M11 16h2M4 9v5M20 9v5M4 11.500h3M17 11.500h3M12 19v2'/%3E%3C/svg%3E"); }
}

/* ---------- Filtros de noticias y ejemplos del inicio ---------- */
.filtros { padding-top: 4px; padding-bottom: 12px; }
.filtros button { padding: 0 1rem; }
.ejemplos { gap: 6px; flex-wrap: wrap; }
.ejemplos button { min-height: 36px; padding: 0 0.85rem; overflow: hidden; }
/* La línea que avanza hasta el siguiente ejemplo, por dentro de la burbuja */
.ejemplos button::after { left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; background: currentColor; opacity: 0.7; }

/* ---------- Selector de app (Horarios): burbujas separadas ---------- */
.segmentos { border: 0; gap: 8px; }
.segmentos label:nth-child(odd), .segmentos label:nth-child(-n+2) { border: 0; }
.segmentos input:focus-visible + span { outline: 2px solid var(--hilo); outline-offset: 3px; }

/* ---------- Pestañas de Mi cuenta: control segmentado de cristal ---------- */
.pestanas { gap: 6px; padding: 6px; border-bottom: 1px solid var(--linea-suave); margin: -1.1rem -1rem 1.1rem; }
.pestanas button + button { border-left: 1px solid var(--cristal-borde); }
.pestanas button[aria-selected="true"]::after { display: none; }

/* ---------- Interruptor Pro (panel admin) ---------- */
.interruptor { min-width: 3.6rem; padding: 0 0.9rem; }

/* ---------- Extras de Neto Pro: tarjetas de cristal sobre el fondo oscuro ---------- */
.pro-ideas button {
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.pro-ideas button::before { border-radius: 5px; }
.pro-ideas button[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(122, 167, 255, 0.35), rgba(31, 95, 214, 0.22));
  border-color: rgba(147, 184, 255, 0.6);
}
/* Dentro de cajas oscuras el botón principal se queda azul (en el tema claro la caja es negra) */
.pro-caja .boton, .cuenta-pro .boton { background: var(--cristal-azul); color: var(--cristal-azul-texto); border-color: rgba(255, 255, 255, 0.25); }
.cuenta-pro .boton-texto, .pro-caja .boton-texto {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--sobre-tinta);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ---------- Accesibilidad ---------- */
/* Menos transparencia: burbujas sólidas, sin desenfoque */
@media (prefers-reduced-transparency: reduce) {
  .boton-texto, .menu a, .filtros button, .ejemplos button, .interruptor, .idioma span,
  .boton-tema, .boton-cuenta, .segmentos span, .pestanas button, .pro-ideas button {
    background: var(--fondo);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .boton, .menu a[aria-current="page"], .filtros button[aria-pressed="true"], .ejemplos button[aria-pressed="true"],
  .interruptor[aria-checked="true"], .segmentos input:checked + span, .pestanas button[aria-selected="true"] {
    background: var(--hilo);
  }
}
/* Más contraste: borde marcado y fondos sólidos */
@media (prefers-contrast: more) {
  .boton-texto, .menu a, .filtros button, .ejemplos button, .interruptor, .idioma span,
  .boton-tema, .boton-cuenta, .segmentos span, .pestanas button {
    background: var(--fondo);
    border: 2px solid var(--tinta);
    box-shadow: none;
  }
  .boton { box-shadow: none; border: 2px solid var(--tinta); }
}
/* Sin movimiento: no se hunden al tocar */
@media (prefers-reduced-motion: reduce) {
  .boton:active, .boton-texto:active, .menu a:active, .filtros button:active, .ejemplos button:active,
  .interruptor:active, .boton-tema:active, .boton-cuenta:active, .pestanas button:active,
  .segmentos label:active span { transform: none; }
}

/* ---------- Tarjetas y cajas redondeadas (van con las burbujas) ---------- */
:root {
  --radio-grande: 22px;   /* tarjetas y paneles */
  --radio-medio: 16px;    /* cajas internas, tablas, mapa */
  --radio-chico: 8px;     /* etiquetas pequeñas */
}
.tarjeta, .dato, .noticia a, .fuerzas, .captura, .experiencia, .cuenta-caja,
.pro-caja, .admin-numeros div, .noticia.cargando div {
  border-radius: var(--radio-grande);
}
.tarjeta, .experiencia { overflow: hidden; }   /* para que el dibujo y la rayita azul respeten la curva */
.tarjeta .vista { border-radius: 0; }          /* el dibujo de arriba sigue la curva de la tarjeta */
.tabla-scroll, .lienzo-mapa, .mini-oferta, .producto .buscar, .aviso-afiliado,
.pista-capturas, .admin-numeros div {
  border-radius: var(--radio-medio);
}
.tabla-scroll { overflow-x: auto; }
.lienzo-mapa { overflow: hidden; }
.pista-capturas .barra-capturas { border-radius: inherit; }
/* Etiquetas pequeñas: esquinas suaves */
.noticia .tag, .plan-tag, .pro-tag, .dato .sello, .mini-oferta .queda, .pin-texto, .etiqueta-zip {
  border-radius: var(--radio-chico);
}
/* Dibujitos de las tarjetas del inicio */
.mini-calor i { border-radius: 3px; }
.mini-barras i { border-radius: 4px 4px 0 0; }
/* Barra fija de "Te queda" en la calculadora: esquinas de arriba redondas */
.resumen-fijo { border-radius: var(--radio-grande) var(--radio-grande) 0 0; }
@media (min-width: 860px) { .resumen-fijo { border-radius: var(--radio-grande); } }
/* Burbujas de Neto Pro y del panel de cuenta, dentro de cajas redondas */
.pro-ideas button { border-radius: var(--radio-medio); }
.cuenta-caja .pestanas { border-radius: var(--radio-grande) var(--radio-grande) 0 0; }

/* ==================== GASOLINA (gasolina.html / en/gas.html) ==================== */
.o-separador { display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0 0.25rem; color: var(--tinta-2); font-size: 0.95rem; }
.o-separador::before, .o-separador::after { content: ""; flex: 1; border-top: 1px solid var(--linea-suave); }
.aviso-gas { color: var(--tinta-2); margin: 0.6rem 0 0; }
.aviso-gas:empty { display: none; }

/* La más barata: lo primero que se ve */
.mejor-gas {
  margin: 1.1rem 0 0;
  padding: 1.25rem 1.35rem;
  background: var(--panel);
  border-radius: var(--radio-grande, 22px);
}
.etiqueta-mejor { display: block; font-weight: 600; color: var(--hilo-texto); }
.precio-mejor {
  margin: 0.15rem 0 0;
  font-size: clamp(3rem, 12vw, 4.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.precio-mejor small { margin-left: 0.3rem; font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--tinta-2); }
.mejor-gas h3 { margin: 0.4rem 0 0; padding: 0; border-top: 0; font-family: var(--letra); font-size: 1.3rem; font-weight: 700; text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }
.datos-mejor { margin: 0.2rem 0 0; color: var(--tinta-2); }
.ahorro-mejor { margin: 0.7rem 0 0; font-weight: 600; }
.mejor-gas .boton-texto { margin-top: 0.6rem; }
.mejor-gas.sin-precios p { margin: 0.4rem 0 0; color: var(--tinta-2); }

.marco-mapa {
  display: block;
  width: 100%;
  height: clamp(280px, 55vw, 420px);
  border: 1px solid var(--linea);
  border-radius: var(--radio-medio, 16px);
}
.marco-mapa[hidden] { display: none; }

/* Lista: precio a la izquierda para comparar de un vistazo */
.lista-gas { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.fila-gas {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 0.15rem 0.9rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--linea-suave);
}
.precio-gas { font-size: 1.3rem; font-weight: 800; line-height: 1.3; font-variant-numeric: tabular-nums; }
.precio-gas.vacio { font-size: 0.9rem; font-weight: 500; color: var(--tinta-2); line-height: 1.9; }
.primera .precio-gas { color: var(--hilo-texto); }
.info-gas { min-width: 0; }
.info-gas p { margin: 0; }
.nombre-gas { font-weight: 700; overflow-wrap: anywhere; }
button.nombre-gas {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.lugar-gas { color: var(--tinta-2); font-size: 0.95rem; overflow-wrap: anywhere; }
.origen-gas { color: var(--tinta-2); font-size: 0.85rem; }
.acciones-gas { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0 1rem; }
@media (max-width: 380px) { .fila-gas { grid-template-columns: 4.6rem minmax(0, 1fr); gap: 0.15rem 0.6rem; } }

.reporte-gas {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 0.75rem;
  align-items: end;
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  background: var(--panel);
  border-radius: var(--radio-medio, 16px);
}
.campo-reporte > span:first-child { display: block; font-weight: 600; font-size: 0.95rem; }
.estado-reporte { grid-column: 1 / -1; margin: 0; font-weight: 600; font-size: 0.95rem; }
.estado-reporte:empty { display: none; }
.estado-acciones:empty { display: none; }

/* Marcadores del mapa libre: el precio es el marcador */
.pin-gas {
  padding: 4px 7px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--fondo);
  color: var(--tinta);
  font: 700 12px/1 var(--letra);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.3);
  cursor: pointer;
}
.pin-gas.sin { width: 12px; height: 12px; padding: 0; background: var(--tinta-2); border: 2px solid var(--fondo); }
.pin-gas.barata { background: var(--hilo); border-color: var(--hilo); color: var(--sobre-tinta); z-index: 2; }
.pin-gas:focus-visible { outline: 2px solid var(--hilo); outline-offset: 2px; }
.pin-yo {
  display: block;
  width: 14px;
  height: 14px;
  border: 3px solid var(--hilo);
  border-radius: 50%;
  background: var(--fondo);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hilo) 25%, transparent);
}
/* Gasolina: "¿Estás en esta gasolinera?" y promedio */
.aqui-gas {
  margin: 1.1rem 0 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--hilo);
  border-radius: var(--radio-grande, 22px);
}
.aqui-gas[hidden] { display: none; }
.aqui-gas h3 { margin: 0; padding: 0; border-top: 0; font-family: var(--letra); font-size: 1.15rem; font-weight: 700; text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }
.aqui-gas p { margin: 0.2rem 0 0.7rem; color: var(--tinta-2); }
.aqui-gas .boton { width: 100%; }
.contra-promedio { margin: 0.5rem 0 0; font-weight: 600; }

/* Gasolina: enlace a GasBuddy al lado del precio */
.columna-precio { min-width: 0; }
.enlace-gasbuddy { display: inline-block; padding: 0.3rem 0; color: var(--hilo-texto); font-size: 0.85rem; font-weight: 600; text-underline-offset: 0.2em; }
.gasbuddy-gas { width: 100%; margin-top: 0.8rem; }
/* Gasolina: los estimados se ven distintos de los precios reales */
.precio-gas.estimado { font-weight: 600; color: var(--tinta-2); }
.primera .precio-gas.estimado { color: var(--tinta-2); }
/* Calculadora: tiempo trabajado en dos casillas (horas y minutos) */
.campo-tiempo { border-top: 0; }
.dos-entradas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dos-entradas .entrada-num { min-width: 0; }
.dos-entradas input { width: 100%; }
/* Mosaicos del menú en los celulares más angostos: que "Calculadora" quepa completa */
@media (max-width: 345px) { .menu a { font-size: 0.76rem; } }

/* =====================================================================
   AJUSTES DE LA REVISIÓN (2026-11-07, impeccable critique)
   Va al final para ganarle a las capas de cristal y esquinas redondas.
   - Errores en rojo propio (--error): el azul es para acciones y restas.
   - Botón azul más oscuro: el texto blanco pasa de 3.6 a 5.2 de contraste.
   - Lo elegido (filtros, tipo de gasolina, app, pestañas) en tinta, no en azul.
   - Encabezado del celular más bajo: mosaicos compactos (216px -> ~160px).
   - Nada de texto por debajo de 12px; enlaces chicos con área de toque.
   ===================================================================== */
:root {
  --error: #b3261e;
  --error-fondo: #fdecea;
  --cristal-azul: linear-gradient(180deg, #2a66dc, #1a52b8);
  --cristal-borde: rgba(20, 20, 20, 0.42);   /* borde de las burbujas: se ve al sol (≥3:1) */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --error: #ff8a80;
    --error-fondo: #3a1c1a;
    --cristal-azul: linear-gradient(180deg, #8ab4ff, #6296fa);
    --cristal-borde: rgba(255, 255, 255, 0.36);
  }
}
:root[data-theme="dark"] {
  --error: #ff8a80;
  --error-fondo: #3a1c1a;
  --cristal-azul: linear-gradient(180deg, #8ab4ff, #6296fa);
  --cristal-borde: rgba(255, 255, 255, 0.36);
}

/* ---------- Errores: rojo, con la palabra "Revisa" en el texto ---------- */
.mensaje-error,
.error-cuenta,
.estado-captura[data-tipo="error"],
.estado-turno[data-tipo="error"] { color: var(--error); }
.campo.con-error .entrada-num,
.campo.con-error .entrada-num:focus-within,
.campo:has(.mensaje-error:not([hidden])) .entrada-num { border-color: var(--error); }
.mensaje-error::before,
.error-cuenta:not(:empty)::before,
.estado-captura[data-tipo="error"]::before,
.estado-turno[data-tipo="error"]::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.4em;
  border-radius: 50%;
  background: var(--error);
  color: var(--fondo);
  font: 800 0.8em/1 var(--letra);
  vertical-align: 0.1em;
}
/* Resultado negativo en la calculadora: explica qué revisar */
.aviso-perdida {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radio-medio, 16px);
  background: var(--error-fondo);
  color: var(--tinta);
  font-weight: 600;
  line-height: 1.4;
}
.aviso-perdida[hidden] { display: none; }

/* ---------- Lo elegido: tinta sólida (el azul queda para acciones y restas) ---------- */
.filtros button[aria-pressed="true"],
.ejemplos button[aria-pressed="true"],
.segmentos input:checked + span,
.pestanas button[aria-selected="true"] {
  background: var(--tinta);
  color: var(--sobre-tinta);
  border-color: var(--tinta);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
@media (prefers-reduced-transparency: reduce) {
  .filtros button[aria-pressed="true"], .ejemplos button[aria-pressed="true"],
  .segmentos input:checked + span, .pestanas button[aria-selected="true"] { background: var(--tinta); }
}
/* Números de las tarjetas de la guía: tinta, y el tema va primero */
.dato-num,
.datos-guia .dato:first-child:not(.empieza) .dato-num { color: var(--tinta); }
.dato.empieza .dato-num, .dato:first-child .dato-num { color: var(--sobre-tinta); }
.datos-guia .dato:first-child:not(.empieza) .dato-num { color: var(--tinta); }
.datos-guia .dato h3 { order: -1; margin-top: 0.15rem; }
.datos-guia .dato .meta { order: -2; }
.datos-guia .dato .dato-num { margin-top: 0.3rem; font-size: 2.1rem; }
/* Mini oferta del inicio: lo que queda en tinta, no en azul */
.mini-oferta .queda { background: var(--tinta); color: var(--sobre-tinta); }

/* ---------- Textos chicos: mínimo 12px ---------- */
.dato .meta, .dato .sello { font-size: 0.75rem; }
.mini-oferta small, .mini-oferta .queda { font-size: 0.75rem; }

/* ---------- Áreas de toque ---------- */
.entrada-num input { min-height: 44px; }
.pie a, .migas a {
  display: inline-block;
  padding: 0.7rem 0.15rem;
  margin: -0.7rem 0;
}
/* Mostrar / ocultar contraseña (Mi cuenta) */
.ver-contrasena {
  flex: none;
  align-self: center;
  min-height: 40px;
  padding: 0 0.85rem;
  border: 1px solid var(--cristal-borde);
  border-radius: var(--pildora, 999px);
  background: none;
  color: var(--tinta);
  font: 600 0.9rem/1 var(--letra);
  cursor: pointer;
}
.ver-contrasena:focus-visible { outline: 2px solid var(--hilo); outline-offset: 3px; }

/* ---------- Encabezado del celular: mosaicos compactos ---------- */
@media (max-width: 1059px) {
  .logo { padding: 0.55rem 0; }
  .menu { gap: 6px; padding: 8px var(--margen) 10px; }
  /* Herramientas: ícono arriba, nombre abajo, más bajitos */
  .menu a:nth-child(-n + 4) { min-height: 54px; gap: 3px; padding: 6px 2px 5px; }
  /* Contenido: ícono al lado del nombre, en una línea */
  .menu a:nth-child(n + 5) {
    flex-direction: row;
    gap: 6px;
    min-height: 42px;
    padding: 0 4px;
  }
  .menu a::before { width: 22px; height: 22px; }
  .menu a:nth-child(n + 5)::before { width: 18px; height: 18px; }
}

/* =====================================================================
   TRANSICIONES ENTRE PÁGINAS (View Transitions, Chrome 126+ y Safari 18.2+;
   donde no hay, la página cambia como siempre)
   - Crossfade corto entre páginas; el encabezado se queda quieto.
   - Elemento compartido: el título de la tarjeta tocada crece hasta ser el
     título de la página nueva (js/tema.js pone el nombre al tocar).
   - Entre páginas del menú, el título se mueve a su lugar en vez de saltar.
   ===================================================================== */
@view-transition { navigation: auto; }
:root { --movimiento: cubic-bezier(0.77, 0, 0.175, 1); } /* ease-in-out fuerte: cosas que se mueven en pantalla */

.encabezado { view-transition-name: encabezado; }
main h1 { view-transition-name: titulo; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
  animation-timing-function: var(--salida);
}
/* El encabezado no se desvanece: solo cambia el mosaico de la página actual */
::view-transition-old(encabezado),
::view-transition-new(encabezado) { animation-duration: 120ms; }
::view-transition-group(encabezado) { animation: none; }
/* El título viaja de la tarjeta a su lugar: movimiento en pantalla */
::view-transition-group(titulo) {
  animation-duration: 280ms;
  animation-timing-function: var(--movimiento);
}
::view-transition-old(titulo),
::view-transition-new(titulo) {
  animation-duration: 280ms;
  animation-timing-function: var(--salida);
  height: 100%;            /* el texto se estira con la caja en vez de aplastarse */
  object-fit: none;
  object-position: left top;
}

/* Pestañas de Mi cuenta: crossfade del panel (js/cuenta.js) */
.cuenta-caja [role="tabpanel"] { view-transition-name: panel-cuenta; }
::view-transition-old(panel-cuenta),
::view-transition-new(panel-cuenta) { animation-duration: 160ms; animation-timing-function: var(--salida); }
::view-transition-group(panel-cuenta) { animation-duration: 200ms; animation-timing-function: var(--movimiento); }

/* Menos movimiento: se queda el crossfade (solo opacidad), sin títulos que viajan */
@media (prefers-reduced-motion: reduce) {
  main h1 { view-transition-name: none; }
  ::view-transition-group(*) { animation: none; }
}

/* ---------- Magnification del menú (solo computadora con mouse) ----------
   El botón bajo el puntero crece un poco y sus vecinos la mitad, como un dock.
   Sutil a propósito: el menú se usa muchas veces al día. */
@media (min-width: 1060px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .menu a { transition: transform 160ms var(--salida), box-shadow 160ms ease, background-color 160ms ease, color 160ms ease; }
  .menu a:hover { transform: scale(1.08); z-index: 1; }
  .menu a:hover + a,
  .menu a:has(+ a:hover) { transform: scale(1.04); }
  .menu a:active { transform: scale(0.96); transition-duration: 80ms; }
}
/* =====================================================================
   ESTILO APP (2026-11-10): pestañas abajo y tarjetas blancas, en el celular.
   - Hasta 1059px: el menú de mosaicos se esconde; js/tema.js arma la barra
     de pestañas (.barra-app) con Inicio · Calcular · Oferta · Turnos · Más.
   - El encabezado queda como barra chica fija (logo + cuenta, idioma, tema).
   - Las páginas con body.app (el inicio) usan fondo gris y tarjetas .app-tarjeta.
   Para volver atrás: borrar desde aquí hasta el final del archivo.
   ===================================================================== */
:root {
  --app-fondo: #f2f3f6;
  --app-tarjeta: #ffffff;
  --app-sombra: 0 1px 2px rgba(20, 20, 20, 0.05), 0 4px 14px rgba(20, 20, 20, 0.05);
  --verde: #1b7f49;
  --verde-suave: #e3f5ea;
  --rojo-app: #c33131;
  --rojo-suave: #fbe7e7;
  --azul-suave: #e8effc;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --app-fondo: #0b0b0a; --app-tarjeta: #1a1a19; --app-sombra: none;
    --verde: #4cc985; --verde-suave: #16301f; --rojo-app: #ff8a80; --rojo-suave: #3a1c1c; --azul-suave: #1b2740;
  }
}
:root[data-theme="dark"] {
  --app-fondo: #0b0b0a; --app-tarjeta: #1a1a19; --app-sombra: none;
  --verde: #4cc985; --verde-suave: #16301f; --rojo-app: #ff8a80; --rojo-suave: #3a1c1c; --azul-suave: #1b2740;
}

/* ---------- Barra de pestañas (la arma js/tema.js) ---------- */
.barra-app { display: none; }
.hoja-mas { display: none; }
@media (max-width: 1059px) {
  .menu { display: none !important; }
  .encabezado {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--fondo) 86%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--linea-suave);
  }
  body.app .encabezado { background: color-mix(in srgb, var(--app-fondo) 86%, transparent); border-bottom-color: transparent; }
  .logo { padding: 0.5rem 0; font-size: 1.15rem; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .pie { padding-bottom: 0.5rem; }

  .barra-app {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--fondo) 90%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    backdrop-filter: blur(18px) saturate(170%);
    border-top: 1px solid var(--linea-suave);
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px));
  }
  .barra-app ul { list-style: none; margin: 0 auto; padding: 0; max-width: 520px; display: grid; grid-template-columns: repeat(5, 1fr); }
  .barra-app a, .barra-app button {
    display: grid; justify-items: center; align-content: center; gap: 2px;
    width: 100%; min-height: 56px; padding: 4px 0;
    background: none; border: 0; color: var(--tinta-2);
    font: 600 0.72rem/1.1 var(--letra); text-decoration: none; cursor: pointer;
    touch-action: manipulation; -webkit-user-select: none; user-select: none;
  }
  .barra-app svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .barra-app [aria-current="page"] { color: var(--hilo-texto); }
  .barra-app [aria-current="page"] svg { stroke-width: 2.4; }
  .barra-app a:active svg, .barra-app button:active svg { transform: scale(0.9); }
  /* Botón del centro: subir oferta */
  .barra-app .centro span {
    width: 50px; height: 50px; margin-top: -20px; border-radius: 17px;
    display: grid; place-items: center;
    background: var(--cristal-azul); color: var(--cristal-azul-texto);
    box-shadow: var(--cristal-azul-brillo), var(--cristal-azul-sombra);
  }
  .barra-app .centro { color: var(--tinta); }

  /* Hoja "Más": sube desde abajo */
  .hoja-mas {
    display: block; position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 85dvh;
    border: 0; border-radius: 22px 22px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    background: var(--app-fondo); color: var(--tinta);
    transform: translateY(100%); transition: transform 260ms var(--salida), overlay 260ms allow-discrete, display 260ms allow-discrete;
  }
  .hoja-mas:not([open]) { display: none; }
  .hoja-mas[open] { transform: translateY(0); }
  @starting-style { .hoja-mas[open] { transform: translateY(100%); } }
  .hoja-mas::backdrop { background: rgba(0, 0, 0, 0.35); }
  .hoja-mas .agarre { width: 40px; height: 5px; border-radius: 99px; background: var(--linea-suave); margin: 4px auto 12px; }
  .hoja-mas h2 { font-size: 1.15rem; margin: 0 4px 10px; }
  .hoja-mas ul { list-style: none; margin: 0; padding: 0; background: var(--app-tarjeta); border-radius: 18px; box-shadow: var(--app-sombra); overflow: hidden; }
  .hoja-mas li + li { border-top: 1px solid var(--linea-suave); }
  .hoja-mas a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px; text-decoration: none; font-weight: 600; }
  .hoja-mas a::after { content: "›"; margin-left: auto; color: var(--tinta-2); font-size: 1.4rem; }
  .hoja-mas a[aria-current="page"] { color: var(--hilo-texto); }
  .hoja-mas .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--azul-suave); color: var(--hilo-texto); flex: none; }
  .hoja-mas .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .hoja-mas .cerrar { display: block; width: 100%; margin-top: 12px; min-height: 50px; border: 0; border-radius: 16px; background: var(--app-tarjeta); color: var(--tinta); font: 700 1rem var(--letra); box-shadow: var(--app-sombra); }
}
@media (prefers-reduced-motion: reduce) { .hoja-mas { transition: none; } }

/* Todo lo que sigue es SOLO para el celular (hasta 1059px): en computadora el sitio se ve como antes */
@media (max-width: 1059px) {
/* ---------- Inicio estilo app (body.app) ---------- */
body.app { background: var(--app-fondo); }
.app-main { max-width: 560px; margin: 0 auto; padding: 0 16px 24px; }
.app-saludo { margin: 14px 0 12px; }
.app-saludo p { margin: 0; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.app-saludo small { display: block; color: var(--tinta-2); font-size: 0.98rem; margin-top: 4px; }
.app-tarjeta { background: var(--app-tarjeta); border-radius: 20px; box-shadow: var(--app-sombra); padding: 16px; margin-bottom: 12px; }
.app-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.app-cab h2 { font-size: 1.05rem; font-weight: 750; letter-spacing: -0.01em; }
.app-cab a { color: var(--hilo-texto); font-size: 0.9rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.app-cab small { color: var(--tinta-2); font-size: 0.8rem; }
.app-ejemplo { font: 700 0.68rem/1 var(--letra); letter-spacing: 0.05em; text-transform: uppercase; color: var(--tinta-2); background: var(--app-fondo); padding: 5px 8px; border-radius: 7px; }
.app-grande { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-grande b { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.app-cambio { font-size: 0.78rem; font-weight: 750; padding: 4px 9px; border-radius: 99px; background: var(--verde-suave); color: var(--verde); }
.app-cambio.baja { background: var(--rojo-suave); color: var(--rojo-app); }
.app-sub { color: var(--tinta-2); font-size: 0.85rem; margin: 2px 0 0; }
.app-desglose { display: grid; gap: 9px; margin: 14px 0 0; }
.app-desglose div { display: grid; grid-template-columns: 6.2rem 1fr auto; align-items: center; gap: 10px; font-size: 0.92rem; }
.app-desglose dt { margin: 0; }
.app-desglose dd { margin: 0; }
.app-desglose .monto { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; min-width: 4.8rem; }
.app-riel { height: 8px; border-radius: 99px; background: var(--linea-suave); overflow: hidden; }
.app-riel i { display: block; height: 100%; width: var(--w, 0%); border-radius: 99px; background: var(--hilo); transition: width 600ms var(--salida); }
.app-desglose .resta .app-riel i { background: var(--rojo-app); }
.app-desglose .neta .app-riel i { background: var(--verde); }
.app-desglose .neta dt { font-weight: 700; }
.app-vacio { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--azul-suave); font-size: 0.92rem; }
.app-vacio a { color: var(--hilo-texto); font-weight: 700; }

.app-metricas { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin: 0; }
.app-metricas > div { display: flex; gap: 10px; align-items: center; }
.app-flecha { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--app-fondo); color: var(--tinta-2); }
.app-flecha.sube { background: var(--verde-suave); color: var(--verde); }
.app-flecha.baja { background: var(--rojo-suave); color: var(--rojo-app); }
.app-flecha svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.app-metricas b { display: block; font-weight: 750; font-size: 1.05rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.app-metricas small { display: block; color: var(--tinta-2); font-size: 0.78rem; line-height: 1.25; }
.app-metricas .detalle { display: block; }

.app-acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.app-accion { display: grid; gap: 12px; padding: 14px; border-radius: 20px; background: var(--app-tarjeta); box-shadow: var(--app-sombra); text-decoration: none; color: var(--tinta); transition: transform 140ms var(--salida); }
.app-accion:active { transform: scale(0.97); transition-duration: 80ms; }
.app-accion .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--azul-suave); color: var(--hilo-texto); }
.app-accion .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-accion b { display: block; font-size: 1rem; line-height: 1.2; }
.app-accion small { display: block; font-size: 0.8rem; opacity: 0.75; margin-top: 2px; }
.app-accion.principal { background: var(--cristal-azul); color: var(--cristal-azul-texto); box-shadow: var(--cristal-azul-brillo), var(--cristal-azul-sombra); }
.app-accion.principal .ic { background: rgba(255, 255, 255, 0.2); color: inherit; }

.app-ranking { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.app-ranking li { counter-increment: r; display: grid; grid-template-columns: 1.3rem 1fr 5.5rem; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--linea-suave); font-size: 0.95rem; }
.app-ranking li:first-child { border-top: 0; }
.app-ranking li::before { content: counter(r); color: var(--tinta-2); font-variant-numeric: tabular-nums; }
.app-ranking small { display: block; color: var(--tinta-2); font-size: 0.78rem; }
.app-ranking .app-riel { height: 6px; }
.app-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.app-chips button { min-height: 36px; padding: 0 14px; border-radius: 99px; border: 0; background: var(--app-fondo); color: var(--tinta); font: 600 0.85rem var(--letra); cursor: pointer; touch-action: manipulation; }
.app-chips button[aria-pressed="true"] { background: var(--tinta); color: var(--fondo); }
.app-nota { color: var(--tinta-2); font-size: 0.78rem; margin: 10px 0 0; }

.app-seccion { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 2px 10px; }
.app-seccion h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.015em; }
.app-seccion a { color: var(--hilo-texto); font-size: 0.9rem; font-weight: 650; text-decoration: none; }
.app-carrusel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 0 -16px 4px; padding: 0 16px 6px; scrollbar-width: none; }
.app-carrusel::-webkit-scrollbar { display: none; }
.app-carrusel a { flex: 0 0 74%; max-width: 280px; scroll-snap-align: start; display: grid; align-content: start; gap: 4px; padding: 16px; border-radius: 20px; background: var(--app-tarjeta); box-shadow: var(--app-sombra); text-decoration: none; color: var(--tinta); }
.app-carrusel .num { font-size: 1.9rem; font-weight: 800; color: var(--hilo-texto); letter-spacing: -0.03em; line-height: 1.1; }
.app-carrusel p { margin: 0 0 8px; font-size: 0.88rem; color: var(--tinta-2); line-height: 1.4; }
.app-carrusel h3 { font-size: 0.98rem; margin-top: auto; }
.app-carrusel small { color: var(--tinta-2); font-size: 0.75rem; }
body.app .instalar-caja, body.app .noticias-inicio { margin: 0; }
body.app .app-tarjeta .noticias { margin: 0; }
body.app .app-tarjeta.instalar-tarjeta img { border-radius: 14px; }
body.app .pie { background: none; }
body.app .noticias-inicio { grid-template-columns: 1fr; }

.hoja-mas h2:focus { outline: none; }

/* ---------- ESTILO APP · PÁGINAS INTERNAS (body.app en todas las páginas) ----------
   Fondo gris, títulos compactos y cada bloque en tarjeta blanca redondeada. */
body.app { --linea: var(--linea-suave); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.app { --panel: #252523; } }
:root[data-theme="dark"] body.app { --panel: #252523; }
body.app .encabezado { background: color-mix(in srgb, var(--app-fondo) 86%, transparent); }
@media (min-width: 1060px) { body.app .encabezado { border-bottom: 1px solid var(--linea-suave); } }

/* Encabezado de cada página: como título de app, sin línea */
body.app .cabeza { padding: 1.1rem 0 0.9rem; border-bottom: 0; margin-bottom: 0; }
body.app .cabeza h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); line-height: 1.08; letter-spacing: -0.025em; max-width: 22ch; }
body.app .cabeza p { font-size: 0.98rem; line-height: 1.5; margin-top: 0.45rem; }

/* La tarjeta base */
body.app .captura,
body.app .calculadora .campos,
body.app .calculadora .resultados,
body.app .form-horarios,
body.app .reporte,
body.app .form-turno,
body.app .resultados-turnos,
body.app .detalle-turnos,
body.app .indice,
body.app .articulo,
body.app .producto,
body.app .cuenta-caja,
body.app .experiencia-suelta {
  background: var(--app-tarjeta);
  border: 0;
  border-radius: 20px;
  box-shadow: var(--app-sombra);
  padding: 16px;
}

/* Calculadora */
body.app .captura { margin-top: 0.5rem; }
body.app .calculadora { padding: 12px 0 2.5rem; gap: 12px; }
body.app .calculadora > div:first-child, body.app .calculadora > form { display: grid; gap: 12px; }
body.app .campos + .campos { margin-top: 0; }
body.app .campos legend { float: left; width: 100%; padding: 0 0 0.6rem; font-family: var(--letra); font-size: 1.05rem; font-weight: 750; text-transform: none; letter-spacing: -0.01em; }
body.app .campos legend + * { clear: both; }
body.app .campo:first-of-type { border-top: 0; padding-top: 0.2rem; }
body.app .campo:last-of-type { border-bottom: 0; padding-bottom: 0.2rem; }
body.app .acciones-form { padding: 4px 2px; }
body.app .resultados h2 { margin-top: 0; }
body.app .tasas { border-top-color: var(--linea-suave); }
@media (min-width: 860px) { body.app .calculadora { gap: 16px; } }

/* Barra fija del resultado: flota encima de las pestañas */
@media (max-width: 1059px) {
  body.app .resumen-fijo {
    left: 10px; right: 10px; z-index: 25;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px;
    padding: 0.7rem 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    transform: translateY(calc(100% + 90px));
  }
  body.app .resumen-fijo.visible { transform: none; }
  body.app.con-resumen .pie { padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
}

/* Horarios y gasolina */
body.app .horarios { padding: 12px 0 2.5rem; gap: 12px; }
body.app .form-horarios .campo { border-bottom: 0; }
body.app .form-horarios .campo:first-of-type { padding-top: 0.2rem; }
body.app .reporte h3 { border-top: 1px solid var(--linea-suave); }
body.app .indice { margin: 0 0 2.5rem; padding-top: 4px; padding-bottom: 4px; }
body.app .indice .fila-enlace:first-of-type, body.app .indice h2 + .fila-enlace { border-top: 0; }
body.app .fila-enlace { padding: 1rem 0; }
body.app .fila-enlace h3, body.app .fila-enlace h2 { font-size: 1.1rem; }
body.app .fila-enlace p { font-size: 0.92rem; }

/* Turnos */
body.app .turnos { padding: 12px 0 2rem; }
body.app .turnos-grid { gap: 12px; margin-top: 0; }
body.app .detalle-turnos { margin-top: 12px; padding-top: 4px; padding-bottom: 4px; }
body.app .titulo-form { font-size: 1.05rem; font-weight: 750; }

/* Noticias */
body.app .noticia a { background: var(--app-tarjeta); border: 0; border-radius: 20px; box-shadow: var(--app-sombra); }
body.app .noticia.destacada a { background: var(--tinta); }
body.app .filtros { margin-top: 4px; }

/* Guía: grupos con título y tarjetas blancas */
body.app .titulo-grupo { border-top: 0; padding: 1.25rem 2px 0.6rem; font-family: var(--letra); font-size: 1.1rem; font-weight: 800; text-transform: none; letter-spacing: -0.01em; color: var(--tinta); }
body.app .grupo-guia { margin-top: 0.5rem; }
body.app .dato:not(:first-child), body.app .datos-guia .dato { border-radius: 20px; }
body.app .datos-guia .dato:not(.empieza):not(:first-child) { background: var(--app-tarjeta); box-shadow: var(--app-sombra); }
body.app .grupo-guia:not(:first-of-type) .datos-guia .dato:first-child { background: var(--app-tarjeta); color: var(--tinta); box-shadow: var(--app-sombra); }
body.app .grupo-guia:not(:first-of-type) .datos-guia .dato:first-child .dato-num { color: var(--hilo-texto); }
body.app .grupo-guia:not(:first-of-type) .datos-guia .dato:first-child .meta,
body.app .grupo-guia:not(:first-of-type) .datos-guia .dato:first-child .dato-txt { color: var(--tinta-2); }
body.app .grupo-guia:not(:first-of-type) .datos-guia .dato:first-child h3 .icono { color: var(--hilo); }

/* Artículos: una tarjeta para leer */
body.app main > .articulo { margin: 12px auto 2.5rem; padding: 20px 18px 8px; }
body.app .articulo .migas { margin-top: 0.2rem; }
body.app .articulo > h1 { font-size: clamp(1.7rem, 6vw, 2.5rem); line-height: 1.08; margin-top: 0.6rem; }
body.app .articulo .entradilla { font-size: 1.05rem; margin: 0.8rem 0 1.5rem; padding-bottom: 1.25rem; }
body.app .articulo h2 { font-size: clamp(1.3rem, 4.4vw, 1.6rem); margin-top: 2.25rem; }
body.app .articulo .experiencia, body.app .articulo .tabla-scroll { border-radius: 16px; }
body.app .siguiente { margin-top: 2.5rem; }

/* Gadgets */
body.app .productos { border-top: 0; margin-top: 1rem; }
body.app .productos > h2 { padding: 0.75rem 2px 0.1rem; font-size: 1.25rem; font-weight: 800; }
body.app .productos .intro-seccion { margin: 0 2px 10px; }
body.app .producto { margin-bottom: 12px; }
body.app .foto-producto { border-radius: 14px; }
body.app .experiencia { border-radius: 20px; }
body.app main > .experiencia { background: var(--app-tarjeta); box-shadow: var(--app-sombra); }
body.app .aviso-afiliado { margin-bottom: 2rem !important; }

/* Mi cuenta, privacidad, condiciones */
body.app .cuenta-caja { padding: 0 16px 18px; overflow: hidden; }
body.app .cuenta-caja .pestanas { margin: 0 -16px 1.1rem; }
body.app .pie { border-top: 0; }
/* Modo oscuro: lo que iba en tinta (negro) sale claro y deslumbra; en la app va en azul */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.app .grupo-guia:first-of-type .datos-guia .dato:first-child,
  :root:not([data-theme="light"]) body.app .noticia.destacada a { background: #1d3f86; color: #fff; }
}
:root[data-theme="dark"] body.app .grupo-guia:first-of-type .datos-guia .dato:first-child,
:root[data-theme="dark"] body.app .noticia.destacada a { background: #1d3f86; color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.app .grupo-guia:first-of-type .datos-guia .dato:first-child :is(.dato-num, h3, h3 .icono),
  :root:not([data-theme="light"]) body.app .noticia.destacada a :is(h2, .de, .de b) { color: #fff; }
  :root:not([data-theme="light"]) body.app .grupo-guia:first-of-type .datos-guia .dato:first-child :is(.meta, .dato-txt) { color: rgba(255, 255, 255, 0.78); }
}
:root[data-theme="dark"] body.app .grupo-guia:first-of-type .datos-guia .dato:first-child :is(.dato-num, h3, h3 .icono),
:root[data-theme="dark"] body.app .noticia.destacada a :is(h2, .de, .de b) { color: #fff; }
:root[data-theme="dark"] body.app .grupo-guia:first-of-type .datos-guia .dato:first-child :is(.meta, .dato-txt) { color: rgba(255, 255, 255, 0.78); }
} /* fin: solo celular */

/* ---------- Inicio: versión celular (app) y versión computadora (la de siempre) ---------- */
.solo-celular { display: none; }
@media (max-width: 1059px) {
  .solo-compu { display: none !important; }
  .solo-celular { display: block; }
  /* Secciones que comparten las dos versiones (instalar y noticias), con estilo app */
  body.inicio.app main > .bloque { max-width: 560px; margin: 12px auto; padding: 0 16px; }
  body.inicio.app main > .bloque .bloque-cabeza { padding: 10px 2px; align-items: baseline; }
  body.inicio.app main > .bloque .bloque-cabeza h2 { font-size: 1.2rem; font-weight: 800; font-stretch: 100%; letter-spacing: -0.015em; line-height: 1.2; }
  body.inicio.app main > .bloque .ver-todo { font-size: 0.9rem; font-weight: 650; text-decoration: none; color: var(--hilo-texto); padding: 0.4rem 0; }
  body.inicio.app main > .bloque.instalar .instalar-caja { background: var(--app-tarjeta); border: 0; border-radius: 20px; box-shadow: var(--app-sombra); padding: 16px; }
  body.inicio.app main > .bloque.listo .bloque-cabeza { opacity: 1; transform: none; }
  body.inicio.app .pie { max-width: 560px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
}

/* Tarjeta "Millas automáticas": solo dentro de la app de Android (html.en-play) */
.solo-app { display: none !important; }
@media (max-width: 1059px) {
  .en-play .app-millas.solo-app { display: flex !important; }
  .app-millas { align-items: center; gap: 12px; text-decoration: none; color: var(--tinta); }
  .app-millas .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--verde-suave); color: var(--verde); flex: none; }
  .app-millas .ic svg, .app-millas .flecha-millas { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .app-millas > span:nth-child(2) { flex: 1; }
  .app-millas b { display: block; font-size: 1rem; }
  .app-millas small { display: block; font-size: 0.8rem; color: var(--tinta-2); }
  .app-millas .flecha-millas { color: var(--tinta-2); }
}
