/* ============================================================
   Ruta. — sistema de diseño
   Hereda los tokens de spdigital.mx (fondo casi negro azulado, azul #3B82F6,
   crema para lo devocional, Inter para leer y Cormorant para los títulos).
   Vanilla CSS, sin framework, sin build.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* ---------- Tokens ---------- */
:root {
  --bg-0: #070710;
  --bg-1: #0c0c18;
  --bg-2: #13131f;
  --bg-card: rgba(255,255,255,.028);
  --bg-card-strong: rgba(255,255,255,.055);
  --bg-input: rgba(255,255,255,.045);

  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.16);

  --text: #f5f5f7;
  --text-dim: #adadb8;
  --text-muted: #77778a;

  --blue: #3B82F6;
  --blue-soft: #60A5FA;
  --blue-bright: #7DAEFF;
  --blue-glow: rgba(59,130,246,.42);

  --cream: #F5F0E1;
  --cream-warm: #EFE4C9;
  --gold: #C9A227;

  --violet: #8b5cf6;
  --green: #10b981;
  --teal: #14b8a6;
  --amber: #f59e0b;
  --rose: #fb7185;
  --red: #ef4444;

  --ff-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ff-serif: "Cormorant Garamond", Georgia, serif;
  --ff-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-md: 0 8px 32px -4px rgba(0,0,0,.55);
  --shadow-lg: 0 24px 64px -12px rgba(0,0,0,.65);

  --max-w: 720px;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- Base ---------- */
body {
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.011em;
  /* dvh y no vh: en iOS la barra de direcciones se encoge al hacer scroll y
     100vh deja un hueco del tamaño de la barra justo donde va el menú. */
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

/* Halo de fondo: da profundidad sin costar una imagen. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1000px 600px at 50% -10%, rgba(59,130,246,.13), transparent 65%),
    radial-gradient(700px 500px at 90% 110%, rgba(139,92,246,.09), transparent 60%),
    var(--bg-0);
}

/* ---------- Marca ---------- */
.marca {
  display: inline-flex;
  align-items: baseline;
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1;
}
.marca-punto { color: var(--blue); }
/* El punto de Ruta. es el destino: no late ni parpadea, se ASIENTA. */
@keyframes puntoAterriza {
  0%   { transform: translateY(-.35em) scale(.6); opacity: 0; }
  60%  { transform: translateY(0) scale(1.15); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.marca-punto.anima { display: inline-block; animation: puntoAterriza .7s cubic-bezier(.2,.9,.3,1.2) both; }

/* ---------- Estructura ---------- */
.envoltura { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

.barra {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(7,7,16,.72);
  border-bottom: 1px solid var(--border);
}
.barra-fila {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
}
.barra-fila .marca { font-size: 21px; }
.barra-espacio { flex: 1; }

.pastilla {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-strong);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}
.pastilla-puntos { color: var(--blue-bright); border-color: rgba(59,130,246,.3); background: rgba(59,130,246,.1); }

/* Colchón para que el menú de abajo no se coma el final de la página.
   Son tres cosas sumadas, no un número al tanteo:
     · el alto del menú,
     · el hueco del sistema (la barra del iPhone, 0 en Android y en escritorio),
     · y 46 px, de los cuales 22 son porque el botón de escanear SOBRESALE hacia
       arriba del menú (`.disco` lleva margin-top: -22px), así que la barrera real
       está más arriba de lo que mide el menú.

   Y va como `main.envoltura`, no como `main` a secas: el `<main>` también lleva
   la clase `.envoltura`, que declara `padding: 0 20px` en forma CORTA. Un
   selector de clase le gana a uno de tipo, así que ese cero de abajo pisaba la
   regla y el colchón valía 0 px. Comprobado midiendo en el navegador. */
:root { --colchon-menu: calc(var(--nav-h) + var(--safe-b) + 46px); }
main.envoltura { padding-bottom: var(--colchon-menu); }
.vista { padding: 22px 0 8px; animation: entra .28s ease both; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.titulo {
  font-family: var(--ff-serif);
  font-weight: 600;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.06;
  letter-spacing: -.02em;
}
.titulo em { font-style: italic; color: var(--cream-warm); }
.bajada { color: var(--text-dim); margin-top: 8px; font-size: 15px; }
.seccion-titulo {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 26px 0 12px;
}

/* ---------- Tarjetas ---------- */
.tarjeta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.tarjeta + .tarjeta { margin-top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-weight: 650;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .12s ease, background .2s ease, border-color .2s ease, opacity .2s;
  min-height: 46px;
}
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primario { background: var(--blue); color: #fff; box-shadow: 0 10px 30px -10px var(--blue-glow); }
.btn-primario:hover { background: var(--blue-soft); }
.btn-fantasma { background: var(--bg-card-strong); border-color: var(--border-strong); color: var(--text); }
.btn-fantasma:hover { background: rgba(255,255,255,.09); }
.btn-texto { padding: 8px 4px; color: var(--text-dim); font-size: 14px; min-height: 0; }
.btn-texto:hover { color: var(--text); }
.btn-peligro { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.35); color: #fca5a5; }
.btn-ancho { width: 100%; }
.btn-chico { padding: 7px 14px; font-size: 13.5px; min-height: 36px; }

/* ---------- Formularios ---------- */
.campo { margin-bottom: 14px; }
.campo label {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-dim);
  margin-bottom: 6px;
  letter-spacing: .01em;
}
.campo input, .campo select, .campo textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  /* 16px o más: con menos, iOS hace zoom al enfocar y descuadra la pantalla. */
  font-size: 16px;
  transition: border-color .2s, background .2s;
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(59,130,246,.07);
}
.campo .ayuda { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }
.campo-codigo input {
  font-family: var(--ff-mono);
  font-size: 24px;
  letter-spacing: .35em;
  text-align: center;
  text-transform: uppercase;
  padding: 14px;
}
.fila { display: flex; gap: 10px; }
.fila > * { flex: 1; }

.aviso-error {
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 14px;
}
.aviso-ok {
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.3);
  color: #6ee7b7;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 14px;
}

/* ---------- Menú inferior ---------- */
.menu {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: rgba(9,9,20,.9);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}
.menu button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .01em;
  position: relative;
  transition: color .2s;
}
.menu button svg { width: 22px; height: 22px; stroke-width: 1.7; }
.menu button[aria-current="true"] { color: var(--blue-bright); }
.menu .globo {
  position: absolute;
  top: 2px; right: calc(50% - 18px);
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--rose);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
/* El botón de escanear es el corazón de la app: se levanta del menú. */
.menu .escanear {
  color: #fff;
}
.menu .escanear .disco {
  width: 52px; height: 52px;
  margin-top: -22px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--blue-soft), var(--blue));
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px -8px var(--blue-glow), 0 0 0 5px rgba(7,7,16,.9);
}
.menu .escanear .disco svg { width: 26px; height: 26px; stroke-width: 1.9; }

/* ---------- Estaciones ---------- */
.estacion {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  text-align: left;
  transition: border-color .2s, background .2s, transform .12s;
}
.estacion:active { transform: scale(.99); }
.estacion:hover { border-color: var(--border-strong); }
.estacion + .estacion { margin-top: 10px; }
.estacion-lamina {
  width: 78px; height: 96px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  position: relative;
}
.estacion-lamina img { width: 100%; height: 100%; object-fit: cover; }
.estacion-lamina.bloqueada img { filter: grayscale(1) brightness(.5) blur(1px); }
.estacion-lamina .candado {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}
.estacion-num {
  font-family: var(--ff-serif);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.estacion h3 {
  font-family: var(--ff-serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
  margin: 2px 0 4px;
}
.estacion p { font-size: 13.5px; color: var(--text-dim); line-height: 1.4; }
.estacion-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.etiqueta {
  font-size: 11.5px;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.06);
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.etiqueta-ok { background: rgba(16,185,129,.14); color: #6ee7b7; border-color: rgba(16,185,129,.3); }
.etiqueta-pend { background: rgba(245,158,11,.14); color: #fcd34d; border-color: rgba(245,158,11,.3); }
.etiqueta-puntos { background: rgba(59,130,246,.14); color: var(--blue-bright); border-color: rgba(59,130,246,.3); }

/* ---------- Barra de avance ---------- */
.avance { margin: 16px 0 6px; }
.avance-riel {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.07);
  overflow: hidden;
}
.avance-relleno {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--blue), var(--blue-bright));
  /* El ancho se fija por JS después del primer cuadro; nace en 0 a propósito
     para que la barra se vea CRECER y no aparecer ya llena. */
  width: 0;
  transition: width .8s cubic-bezier(.2,.8,.3,1);
}
.avance-pie {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 7px;
}

/* ---------- Escáner ---------- */
#escaner {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: flex;
  flex-direction: column;
}
#escaner-lienzo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
/* MindAR mete su <video> y sus canvas aquí dentro y los posiciona en absoluto. */
#escaner-lienzo video, #escaner-lienzo canvas { position: absolute; }

.escaner-encima {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  pointer-events: none;
}
.escaner-encima > * { pointer-events: auto; }
.escaner-barra {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,.7), transparent);
}
.escaner-cerrar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.2);
  display: grid;
  place-items: center;
  color: #fff;
}
.escaner-pie {
  margin-top: auto;
  padding: 18px 16px calc(env(safe-area-inset-bottom, 0px) + 20px);
  background: linear-gradient(0deg, rgba(0,0,0,.82), transparent);
  text-align: center;
}
.escaner-instruccion {
  font-size: 14.5px;
  color: rgba(255,255,255,.9);
  text-shadow: 0 1px 8px rgba(0,0,0,.9);
  margin-bottom: 12px;
}

/* Marco de puntería: cuatro esquinas que respiran. */
.mira {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: min(74vw, 320px);
  aspect-ratio: 3 / 4;
  pointer-events: none;
  z-index: 1;
}
.mira i {
  position: absolute;
  width: 34px; height: 34px;
  border: 2.5px solid rgba(255,255,255,.85);
  animation: miraRespira 2.4s ease-in-out infinite;
}
.mira i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.mira i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.mira i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.mira i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
@keyframes miraRespira { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
.mira.encontrado i { border-color: var(--green); animation: none; opacity: 1; }
/* Quien pidió menos movimiento no debe ver nada latir. */
@media (prefers-reduced-motion: reduce) {
  .mira i { animation: none; opacity: .9; }
  .marca-punto.anima { animation: none; }
  .vista { animation: none; }
}

.escaner-encontrado {
  position: absolute;
  left: 16px; right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
  z-index: 3;
  background: rgba(9,9,20,.92);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  animation: subeFicha .35s cubic-bezier(.2,.9,.3,1.1) both;
}
@keyframes subeFicha { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------- Hoja de estación (contenido ampliado) ---------- */
.hoja {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg-1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: subeHoja .3s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes subeHoja { from { transform: translateY(100%); } to { transform: none; } }
.hoja-barra {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: rgba(12,12,24,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.hoja-cuerpo { padding: 0 20px calc(env(safe-area-inset-bottom, 0px) + 40px); max-width: var(--max-w); margin: 0 auto; }
.hoja-encabezado { padding: 20px 0 8px; }
.hoja-encabezado .titulo { font-size: clamp(30px, 8vw, 42px); }

.pieza { margin: 18px 0; }
.pieza figcaption { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.pieza h4 { font-size: 15px; font-weight: 650; margin-bottom: 8px; }
.pieza video, .pieza img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
}
.pieza-texto {
  font-family: var(--ff-serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--cream);
}
.pieza audio { width: 100%; }

/* ---------- Trivia ---------- */
.trivia { margin-top: 26px; }
.pregunta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}
.pregunta-num {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-bright);
}
.pregunta h4 { font-size: 18px; font-weight: 600; line-height: 1.35; margin: 6px 0 14px; }
.opcion {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  font-size: 15px;
  transition: border-color .18s, background .18s, transform .12s;
}
.opcion + .opcion { margin-top: 8px; }
.opcion:active { transform: scale(.99); }
.opcion .letra {
  width: 26px; height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
}
.opcion[aria-checked="true"] { border-color: var(--blue); background: rgba(59,130,246,.12); }
.opcion[aria-checked="true"] .letra { background: var(--blue); color: #fff; }
.opcion.correcta { border-color: rgba(16,185,129,.6); background: rgba(16,185,129,.12); }
.opcion.correcta .letra { background: var(--green); color: #04231a; }
.opcion.incorrecta { border-color: rgba(239,68,68,.55); background: rgba(239,68,68,.1); }
.opcion.incorrecta .letra { background: var(--red); color: #fff; }
.opcion:disabled { cursor: default; }
.explicacion {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  border-left: 3px solid var(--blue);
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---------- Tabla de posiciones ---------- */
.pestanas {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}
.pestanas button {
  flex: 1;
  padding: 9px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 650;
  color: var(--text-dim);
  transition: background .2s, color .2s;
}
.pestanas button[aria-selected="true"] { background: var(--bg-card-strong); color: var(--text); }

.fila-tabla {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
}
.fila-tabla + .fila-tabla { margin-top: 4px; }
.fila-tabla.yo { background: rgba(59,130,246,.09); border-color: rgba(59,130,246,.28); }
.fila-tabla .puesto { font-family: var(--ff-mono); font-size: 14px; color: var(--text-muted); text-align: center; }
.fila-tabla .puesto.podio { color: var(--gold); font-weight: 700; }
.fila-tabla .nombre { font-weight: 600; font-size: 15px; }
.fila-tabla .sub { font-size: 12.5px; color: var(--text-muted); }
.fila-tabla .puntos { font-family: var(--ff-mono); font-weight: 700; color: var(--blue-bright); }

.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex: 0 0 30px;
}

/* ---------- Avisos ---------- */
.aviso {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.aviso + .aviso { margin-top: 8px; }
.aviso.nuevo { border-color: rgba(59,130,246,.35); background: rgba(59,130,246,.07); }
.aviso .icono {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.06);
}
.aviso h4 { font-size: 15px; font-weight: 650; }
.aviso p { font-size: 13.5px; color: var(--text-dim); margin-top: 3px; }
.aviso .cuando { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }

/* ---------- Equipo ---------- */
.equipo-escudo {
  width: 62px; height: 62px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 62px;
}
.equipo-codigo {
  font-family: var(--ff-mono);
  font-size: 26px;
  letter-spacing: .28em;
  font-weight: 700;
  color: var(--cream);
  background: rgba(255,255,255,.05);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  margin: 12px 0;
}

/* ---------- Vacíos y cargas ---------- */
.vacio {
  text-align: center;
  padding: 42px 20px;
  color: var(--text-muted);
}
.vacio svg { width: 42px; height: 42px; margin: 0 auto 14px; opacity: .5; }
.vacio p { font-size: 14.5px; }

.esqueleto {
  background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 37%, rgba(255,255,255,.04) 63%);
  background-size: 400% 100%;
  animation: brilla 1.4s ease infinite;
  border-radius: var(--radius);
}
@keyframes brilla { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.girador {
  width: 22px; height: 22px;
  border: 2.5px solid rgba(255,255,255,.2);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: gira .8s linear infinite;
}
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- Notificación flotante ---------- */
#brindis {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  transform: translateX(-50%) translateY(20px);
  z-index: 400;
  background: rgba(12,12,24,.96);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  max-width: calc(100vw - 32px);
  text-align: center;
}
#brindis.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
#brindis.exito { border-color: rgba(16,185,129,.45); color: #6ee7b7; }
#brindis.error { border-color: rgba(239,68,68,.45); color: #fca5a5; }

/* ---------- Puntos ganados ---------- */
.premio {
  text-align: center;
  padding: 22px 0 6px;
}
.premio-cifra {
  font-family: var(--ff-mono);
  font-size: 54px;
  font-weight: 700;
  line-height: 1;
  color: var(--blue-bright);
  animation: premioEntra .5s cubic-bezier(.2,.9,.3,1.3) both;
}
@keyframes premioEntra { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.premio-texto { color: var(--text-dim); font-size: 14px; margin-top: 6px; }

/* ---------- Aviso de demostración ---------- */
.cinta-demo {
  background: linear-gradient(90deg, rgba(139,92,246,.16), rgba(59,130,246,.16));
  border-bottom: 1px solid rgba(139,92,246,.28);
  padding: 8px 20px;
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: center;
}
.cinta-demo strong { color: var(--text); font-weight: 650; }

/* ---------- Portada (sin sesión) ---------- */
.portada { padding-top: 34px; padding-bottom: 40px; }
.portada .titulo { font-size: clamp(34px, 9vw, 54px); }
.portada .lede { font-size: 17px; color: var(--text-dim); margin-top: 14px; line-height: 1.55; }
.pasos { counter-reset: paso; margin: 26px 0; }
.paso {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.paso::before {
  counter-increment: paso;
  content: counter(paso);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(59,130,246,.14);
  border: 1px solid rgba(59,130,246,.3);
  color: var(--blue-bright);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--ff-mono);
}
.paso h4 { font-size: 15.5px; font-weight: 650; }
.paso p { font-size: 14px; color: var(--text-dim); margin-top: 3px; }

.pie {
  padding: 30px 0 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  border-top: 1px solid var(--border);
  margin-top: 30px;
}
.pie .marca { font-size: 15px; color: var(--text-dim); }

/* ---------- Utilidades ---------- */
.centro { text-align: center; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 26px; }
.dim { color: var(--text-dim); }
.mono { font-family: var(--ff-mono); }
.chico { font-size: 13px; }
.separador { height: 1px; background: var(--border); margin: 22px 0; }
