/* ============================================================
   App base de producto · estilos
   Los colores de marca llegan desde contenido.json (app.js los
   escribe en --principal, --principal-oscuro y --acento).
   Para cambiar el look, cambia los colores en contenido.json,
   no aquí.
   ============================================================ */

:root {
  --principal: #C2410C;
  --principal-oscuro: #FB923C;
  --acento: #0F766E;
  --sobre-principal: #FFFFFF;
  --sobre-principal-oscuro: #111111;

  --p: var(--principal);
  --sobre-p: var(--sobre-principal);
  --acento-texto: var(--acento);

  --fondo: #F6F5F2;
  --superficie: #FFFFFF;
  --superficie-2: #EFEDE8;
  --borde: rgba(28, 25, 23, 0.10);
  --borde-fuerte: rgba(28, 25, 23, 0.22);
  --texto: #1C1917;
  --texto-2: #57534E;
  --error: #B91C1C;
  --sombra: 0 1px 2px rgba(28, 25, 23, 0.05), 0 6px 20px rgba(28, 25, 23, 0.06);
  --aviso-fondo: #1C1917;
  --aviso-texto: #FFFFFF;

  --p-suave: color-mix(in srgb, var(--p) 12%, var(--superficie));
  --p-borde: color-mix(in srgb, var(--p) 30%, transparent);

  --radio: 18px;
  --radio-s: 12px;
  --barra-h: 56px;
  --nav-h: 64px;
  --seg-arriba: env(safe-area-inset-top, 0px);
  --seg-abajo: env(safe-area-inset-bottom, 0px);
  --ancho: 600px;
  --fuente: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --curva: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --p: var(--principal-oscuro);
    --sobre-p: var(--sobre-principal-oscuro);
    --acento-texto: color-mix(in srgb, var(--acento) 50%, #FFFFFF);

    --fondo: #0E0E10;
    --superficie: #18181B;
    --superficie-2: #26262B;
    --borde: rgba(255, 255, 255, 0.09);
    --borde-fuerte: rgba(255, 255, 255, 0.24);
    --texto: #F4F4F5;
    --texto-2: #A8A8B0;
    --error: #FCA5A5;
    --sombra: none;
    --aviso-fondo: #F4F4F5;
    --aviso-texto: #111111;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--barra-h) + var(--seg-arriba) + 8px);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

img, video, iframe { max-width: 100%; }
:where(svg) { width: 20px; height: 20px; flex: none; }
img { display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--p) 60%, transparent);
  outline-offset: 2px;
  border-radius: 10px;
}

.visual-oculto {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.saltar {
  border: 0;
  color: var(--texto);
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  background: var(--superficie);
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
}
.saltar:focus { left: 12px; }

.img-rota { visibility: hidden; }

.sin-js { padding: 24px; text-align: center; }

/* ---------- vista principal ---------- */
.vista {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 12px 16px calc(var(--nav-h) + var(--seg-abajo) + 28px);
  min-height: 100vh;
  outline: none;
}
body.sin-nav .vista { padding-bottom: calc(var(--seg-abajo) + 24px); }

.vista.entrando > * { animation: subir 0.26s var(--curva) both; }
.vista.entrando > *:nth-child(2) { animation-delay: 0.03s; }
.vista.entrando > *:nth-child(3) { animation-delay: 0.06s; }
.vista.entrando > *:nth-child(n+4) { animation-delay: 0.09s; }

@keyframes subir {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.cargando {
  min-height: 70vh;
  display: grid;
  place-items: center;
}
.cargando-logo {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--superficie-2);
  animation: latido 1.2s ease-in-out infinite;
}
@keyframes latido { 50% { opacity: 0.45; } }

/* ---------- barra superior ---------- */
.barra {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: var(--seg-arriba);
  background: color-mix(in srgb, var(--fondo) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.barra.con-borde { border-bottom-color: var(--borde); }

.barra-dentro {
  max-width: var(--ancho);
  margin: 0 auto;
  height: var(--barra-h);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px 0 16px;
}
.barra-dentro.con-atras { padding-left: 4px; }

.marca {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  min-width: 0;
  flex: 1;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.marca img {
  width: 32px; height: 32px;
  border-radius: 9px;
  flex: none;
}
.marca span, .barra-titulo {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.barra-titulo {
  flex: 1;
  min-width: 0;
  font-weight: 650;
  font-size: 16px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s var(--curva);
}
.barra.con-titulo .barra-titulo { opacity: 1; transform: none; }

.boton-icono {
  width: 44px; height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--texto);
  text-decoration: none;
  transition: background 0.15s;
}
.boton-icono:active { background: var(--superficie-2); }
.boton-icono svg { width: 24px; height: 24px; }

/* ---------- navegación inferior ---------- */
.nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  padding-bottom: var(--seg-abajo);
  background: color-mix(in srgb, var(--superficie) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--borde);
}
.nav-dentro {
  max-width: var(--ancho);
  margin: 0 auto;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  color: var(--texto-2);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav .pildora {
  width: 56px; height: 30px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  transition: background 0.2s var(--curva);
}
.nav svg { width: 23px; height: 23px; }
.nav a[aria-current="page"] { color: var(--p); }
.nav a[aria-current="page"] .pildora { background: var(--p-suave); }
.nav a:active .pildora { transform: scale(0.94); }

/* ---------- tipografía y piezas comunes ---------- */
h1, h2, h3 { text-wrap: balance; }

.titulo-pagina {
  font-size: 27px;
  line-height: 1.16;
  letter-spacing: -0.022em;
  font-weight: 750;
  margin: 6px 0 8px;
}
.cejilla {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p);
  margin: 0;
}
.suave { color: var(--texto-2); }
.bajada { color: var(--texto-2); font-size: 16px; margin: 0 0 16px; }

.tarjeta {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}

.seccion-titulo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 2px 10px;
}
.seccion-titulo h2 {
  font-size: 19px;
  font-weight: 720;
  letter-spacing: -0.012em;
  margin: 0;
}
.ver-todo {
  color: var(--p);
  font-weight: 650;
  font-size: 15px;
  text-decoration: none;
  padding: 12px 6px;
  margin: -12px -6px;
}

.lista { display: flex; flex-direction: column; gap: 10px; }

.barra-prog {
  height: 6px;
  border-radius: 3px;
  background: var(--superficie-2);
  overflow: hidden;
}
.barra-prog i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--p);
  transition: width 0.5s var(--curva);
}

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 14px;
  color: var(--texto-2);
}
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta svg { width: 16px; height: 16px; }

/* ---------- botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--p);
  color: var(--sobre-p);
  font-weight: 650;
  font-size: 16px;
  text-decoration: none;
  text-align: center;
  transition: transform 0.12s var(--curva), filter 0.2s;
}
.boton:active { transform: scale(0.98); filter: brightness(0.95); }
.boton svg { width: 20px; height: 20px; flex: none; }
.boton.secundario { background: var(--superficie-2); color: var(--texto); }
.boton.chico { width: auto; min-height: 44px; padding: 0 16px; font-size: 15px; border-radius: 12px; }
.boton-texto {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--texto-2);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.chip-boton {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 22px;
  border: 1px solid var(--borde-fuerte);
  background: var(--superficie);
  color: var(--texto);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.12s;
}
.chip-boton svg { width: 20px; height: 20px; }
.chip-boton:active { transform: scale(0.97); }
.chip-boton[aria-pressed="true"] {
  color: var(--p);
  border-color: var(--p-borde);
  background: var(--p-suave);
}
.chip-boton[aria-pressed="true"] svg { fill: currentColor; }

/* ---------- inicio ---------- */
.saludo {
  font-size: 15px;
  color: var(--texto-2);
  margin: 4px 2px 10px;
  font-weight: 550;
}
.saludo strong { color: var(--texto); font-weight: 700; }

.portada {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  overflow: hidden;
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--principal), var(--acento));
  box-shadow: var(--sombra);
}
.portada img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.portada::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 52%, rgba(0, 0, 0, 0) 80%);
}
.portada-texto {
  position: absolute;
  left: 18px; right: 18px; bottom: 16px;
  z-index: 1;
}
.portada-texto h1 {
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 760;
  margin: 0 0 6px;
  color: #FFFFFF;
}
.portada-texto p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
}

.progreso {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-top: 12px;
}
.progreso-texto { flex: 1; min-width: 0; }
.progreso-texto h2 { font-size: 17px; margin: 0 0 2px; font-weight: 700; }
.progreso-texto p { margin: 0; font-size: 14.5px; color: var(--texto-2); font-variant-numeric: tabular-nums; }

.anillo { position: relative; width: 66px; height: 66px; flex: none; }
.anillo svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anillo circle { fill: none; stroke-width: 7; }
.anillo .pista { stroke: var(--superficie-2); }
.anillo .valor { stroke: var(--p); stroke-linecap: round; transition: stroke-dashoffset 0.7s var(--curva); }
.anillo b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.continuar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 12px;
  margin-top: 12px;
  text-decoration: none;
  min-height: 76px;
}
.continuar img {
  width: 60px; height: 60px;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
  background: var(--superficie-2);
}
.continuar-texto { flex: 1; min-width: 0; }
.continuar-texto strong {
  display: block;
  font-size: 16px;
  line-height: 1.3;
  margin-top: 2px;
}
.flecha {
  width: 36px; height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--p);
  color: var(--sobre-p);
}
.flecha svg { width: 20px; height: 20px; }

.instalar {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 4px 12px;
  padding: 14px 52px 14px 14px;
  margin-top: 12px;
  background: var(--p-suave);
  border: 1px solid var(--p-borde);
  border-radius: var(--radio);
}
.instalar-icono {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--superficie);
  color: var(--p);
}
.instalar-icono svg { width: 24px; height: 24px; }
.instalar-texto { min-width: 0; }
.instalar-texto strong { display: block; font-size: 15.5px; line-height: 1.3; }
.instalar-texto span { display: block; font-size: 13.5px; color: var(--texto-2); line-height: 1.35; margin-top: 2px; }
.instalar .boton { grid-column: 2; justify-self: start; margin-top: 8px; }
.instalar [data-accion="ocultar-instalar"] { position: absolute; top: 4px; right: 4px; }

/* filas compactas (módulos en inicio, resultados, guardados) */
.fila {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  min-height: 64px;
  text-decoration: none;
}
.fila > img {
  width: 72px; height: 72px;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
  background: var(--superficie-2);
}
.fila-texto { flex: 1; min-width: 0; }
.fila-texto h3 {
  font-size: 16px;
  line-height: 1.3;
  font-weight: 680;
  margin: 2px 0 8px;
}
.fila-texto .barra-prog { margin-top: 2px; }
.fila-pie {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--texto-2);
  font-variant-numeric: tabular-nums;
}

/* carrusel de bonos en inicio */
.carrusel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  margin: 0 -16px;
  padding: 2px 16px 8px;
  scrollbar-width: none;
}
.carrusel::-webkit-scrollbar { display: none; }
.carrusel > a {
  flex: 0 0 62%;
  max-width: 240px;
  scroll-snap-align: start;
  text-decoration: none;
  overflow: hidden;
}
.carrusel img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--superficie-2); }
.carrusel .cuerpo { padding: 10px 12px 12px; }
.carrusel strong { display: block; font-size: 14.5px; line-height: 1.3; }
.carrusel-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--texto-2);
}
.carrusel .meta { margin-top: 4px; font-size: 13.5px; }

/* ---------- módulos ---------- */
.modulo-tarjeta {
  display: block;
  overflow: hidden;
  text-decoration: none;
}
.modulo-tarjeta > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--superficie-2);
}
.modulo-tarjeta .cuerpo { padding: 14px 16px 16px; }
.modulo-tarjeta h2 {
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 720;
  margin: 4px 0 6px;
}
.modulo-tarjeta p { margin: 0 0 12px; color: var(--texto-2); font-size: 15px; }

.media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radio);
  overflow: hidden;
  background: linear-gradient(135deg, var(--superficie-2), var(--superficie));
  margin: 4px 0 16px;
}
.media img, .media video, .media iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
}
.media video { object-fit: contain; background: #000000; }
.media.vertical { aspect-ratio: 9 / 16; max-height: 70vh; margin-left: auto; margin-right: auto; }

.progreso-linea {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 18px;
  font-size: 14px;
  color: var(--texto-2);
  font-variant-numeric: tabular-nums;
}
.progreso-linea .barra-prog { flex: 1; }

.leccion-fila {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  min-height: 68px;
  text-decoration: none;
}
.estado {
  width: 34px; height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--borde-fuerte);
  font-size: 14px;
  font-weight: 700;
  color: var(--texto-2);
  font-variant-numeric: tabular-nums;
}
.estado svg { width: 18px; height: 18px; }
.estado.hecha { background: var(--p); border-color: var(--p); color: var(--sobre-p); }
.estado.parcial { border-color: var(--p); color: var(--p); }
.leccion-fila .fila-texto h3 { margin: 0 0 4px; }
.chevron { width: 20px; height: 20px; flex: none; color: var(--texto-2); }

/* ---------- lección ---------- */
.acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.prosa {
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}
.prosa p { margin: 0 0 14px; }
.prosa h2 {
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 720;
  margin: 26px 0 10px;
}
.prosa h3 { font-size: 17.5px; margin: 22px 0 8px; font-weight: 700; }
.prosa ul, .prosa ol { margin: 0 0 16px; padding-left: 24px; }
.prosa li { margin: 7px 0; padding-left: 4px; }
.prosa li::marker { color: var(--p); font-weight: 700; }
.prosa strong { font-weight: 700; }
.prosa a { color: var(--p); text-underline-offset: 3px; font-weight: 600; }
.prosa .nota {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--p-suave);
  border-left: 4px solid var(--p);
  font-size: 16px;
  line-height: 1.55;
}
.prosa figure { margin: 20px 0; }
.prosa figure img { width: 100%; border-radius: 14px; }
.prosa figcaption { font-size: 14px; color: var(--texto-2); margin-top: 6px; }

.checklist { padding: 6px; margin: 26px 0 16px; }
.checklist-cabeza {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 6px;
}
.checklist-cabeza h2 { font-size: 17px; margin: 0; font-weight: 720; }
.checklist-cabeza span { font-size: 14px; color: var(--texto-2); font-variant-numeric: tabular-nums; }

.check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.check:active { background: var(--superficie-2); }
.check input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
}
.caja {
  width: 26px; height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 2px solid var(--texto-2);
  transition: background 0.18s, border-color 0.18s, transform 0.18s var(--curva);
}
.caja svg {
  width: 18px; height: 18px;
  stroke: var(--sobre-p);
  stroke-width: 3;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.18s, transform 0.22s var(--curva);
}
.check input:checked + .caja { background: var(--p); border-color: var(--p); }
.check input:checked + .caja svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .caja { outline: 3px solid color-mix(in srgb, var(--p) 55%, transparent); outline-offset: 2px; }
.check:active .caja { transform: scale(0.9); }
.check-texto { font-size: 16px; line-height: 1.4; transition: color 0.2s; }
.check input:checked ~ .check-texto { color: var(--texto-2); }

.sello {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--acento) 14%, var(--superficie));
  color: var(--acento-texto);
  font-weight: 700;
}
.sello svg { width: 20px; height: 20px; }

.pasos-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.pasos-nav .boton { font-size: 15px; padding: 0 12px; }
.pasos-nav .solo { grid-column: 1 / -1; }

/* ---------- bonos ---------- */
.rejilla {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bono-tarjeta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  position: relative;
}
.bono-tarjeta > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--superficie-2);
}
.bono-tarjeta .cuerpo { padding: 10px 12px 14px; }
.bono-tarjeta h2 { font-size: 15.5px; line-height: 1.3; margin: 4px 0 4px; font-weight: 700; }
.bono-tarjeta p { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--texto-2); }
.bono-tarjeta.cerrado > img { filter: grayscale(1) brightness(0.9); }
.candado {
  position: absolute;
  top: 10px; right: 10px;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
}
.candado svg { width: 18px; height: 18px; }

.aviso-cerrado {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin: 8px 0 16px;
}
.aviso-cerrado svg { width: 28px; height: 28px; color: var(--p); flex: none; }

/* ---------- buscar ---------- */
.campo-buscar { position: relative; margin: 4px 0 16px; }
.campo-buscar svg {
  position: absolute;
  left: 14px; top: 50%;
  width: 22px; height: 22px;
  transform: translateY(-50%);
  color: var(--texto-2);
  pointer-events: none;
}
.campo {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--borde-fuerte);
  border-radius: 14px;
  background: var(--superficie);
  font-size: 17px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.campo-buscar .campo { padding-left: 46px; }
.campo:focus { border-color: var(--p); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p) 18%, transparent); }
.campo::placeholder { color: var(--texto-2); opacity: 0.85; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.grupo-titulo {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--texto-2);
  margin: 22px 4px 8px;
}
.resultado { display: block; padding: 14px 16px; min-height: 64px; text-decoration: none; }
.resultado strong { display: block; font-size: 16px; line-height: 1.3; }
.resultado span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  color: var(--texto-2);
  margin-top: 4px;
}
mark {
  background: color-mix(in srgb, var(--p) 22%, transparent);
  color: inherit;
  border-radius: 4px;
  padding: 0 2px;
}

.vacio {
  text-align: center;
  padding: 48px 20px;
  color: var(--texto-2);
}
.vacio-icono {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--p-suave);
  color: var(--p);
}
.vacio-icono svg { width: 34px; height: 34px; }
.vacio h2 { color: var(--texto); font-size: 19px; margin: 0 0 6px; }
.vacio p { margin: 0 auto; max-width: 300px; }

/* ---------- ayuda ---------- */
.soporte { padding: 18px; margin: 8px 0 8px; }
.soporte h2 { font-size: 19px; margin: 0 0 4px; }
.soporte p { margin: 0 0 14px; color: var(--texto-2); }

.preguntas { padding: 0 16px; }
.preguntas details { border-bottom: 1px solid var(--borde); }
.preguntas details:last-child { border-bottom: 0; }
.preguntas summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 0;
  font-weight: 650;
  font-size: 16px;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary svg { width: 20px; height: 20px; flex: none; color: var(--texto-2); transition: transform 0.2s var(--curva); }
.preguntas details[open] summary svg { transform: rotate(180deg); }
.preguntas .respuesta { padding: 0 0 16px; color: var(--texto-2); font-size: 15.5px; line-height: 1.55; }
.preguntas .respuesta p { margin: 0 0 8px; }

.pasos-instalar { padding: 6px 16px; }
.pasos-instalar h3 { font-size: 16px; margin: 12px 0 6px; }
.pasos-instalar ol { margin: 0 0 8px; padding-left: 22px; line-height: 1.55; }
.pasos-instalar li { margin: 6px 0; }

.pie {
  text-align: center;
  font-size: 13px;
  color: var(--texto-2);
  margin: 28px 0 0;
}

/* ---------- bienvenida / acceso ---------- */
.bienvenida {
  min-height: calc(100vh - 40px);
  min-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
  padding: calc(var(--seg-arriba) + 24px) 8px 24px;
  text-align: center;
}
.bienvenida-logo {
  width: 88px; height: 88px;
  margin: 0 auto 20px;
  border-radius: 24px;
  box-shadow: var(--sombra);
}
.bienvenida h1 { font-size: 27px; line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 10px; }
.bienvenida > p { color: var(--texto-2); margin: 0 0 24px; font-size: 16.5px; }
.formulario { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.formulario label { display: block; font-weight: 650; font-size: 15px; margin-bottom: 6px; }
.error { color: var(--error); font-size: 14.5px; font-weight: 600; margin: -4px 0 0; }

/* ---------- hoja inferior ---------- */
.hoja-fondo {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  animation: aparecer 0.2s ease-out both;
}
.hoja {
  width: 100%;
  max-width: var(--ancho);
  max-height: 88vh;
  overflow-y: auto;
  padding: 10px 20px calc(var(--seg-abajo) + 20px);
  border-radius: 24px 24px 0 0;
  background: var(--superficie);
  animation: deslizar 0.26s var(--curva) both;
}
.hoja-asa { width: 40px; height: 5px; border-radius: 3px; background: var(--borde-fuerte); margin: 0 auto 10px; }
.hoja-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hoja-cabeza h2 { font-size: 20px; margin: 0; }
.hoja ol { padding: 0; margin: 14px 0 18px; list-style: none; counter-reset: paso; }
.hoja li {
  counter-increment: paso;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  font-size: 16px;
  line-height: 1.4;
}
.hoja li::before {
  content: counter(paso);
  width: 32px; height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--p-suave);
  color: var(--p);
  font-weight: 750;
}
.hoja li svg { width: 22px; height: 22px; flex: none; color: var(--p); margin-left: auto; }
.hoja p { color: var(--texto-2); }

@keyframes aparecer { from { opacity: 0; } }
@keyframes deslizar { from { transform: translateY(40px); opacity: 0.4; } }

/* ---------- avisos y festejo ---------- */
.avisos {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--nav-h) + var(--seg-abajo) + 14px);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  pointer-events: none;
}
.aviso {
  max-width: 100%;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--aviso-fondo);
  color: var(--aviso-texto);
  font-weight: 650;
  font-size: 15px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  animation: subir 0.22s var(--curva) both;
}
.aviso.saliendo { opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.25s; }

.papelito {
  position: fixed;
  z-index: 70;
  width: 8px; height: 12px;
  border-radius: 2px;
  pointer-events: none;
  animation: volar 0.95s cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}
@keyframes volar {
  to {
    transform: translate(var(--x), var(--y)) rotate(var(--r));
    opacity: 0;
  }
}

/* ---------- pantallas grandes ---------- */
@media (min-width: 700px) {
  .vista { padding-top: 20px; }
  .titulo-pagina { font-size: 32px; }
}

/* ---------- menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .papelito { display: none; }
}
