/* NEXUS, la app de tests de PREMIR (nombre de trabajo: se cambia en templates/premir/nombre.html).
   Estética oscura con auroras en los tres colores del logotipo de PREMIR (azul, amarillo, rojo).
   El símbolo es la X de «nexus»: dos trazos que se cruzan en un punto, la unión entre el alumno y su plaza.
   Fuentes alojadas en la propia app (sin Google Fonts): Bricolage Grotesque para titulares y Manrope para leer. */

@font-face { font-family: "Bricolage"; font-weight: 200 800; font-display: swap; src: url("fuentes/bricolage.woff2") format("woff2-variations"), url("fuentes/bricolage.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 200 800; font-display: swap; src: url("fuentes/manrope.woff2") format("woff2-variations"), url("fuentes/manrope.woff2") format("woff2"); }

:root {
  --tinta: #070b17;
  --tinta-2: #0d1326;
  --sup: rgba(255, 255, 255, .045);
  --sup-2: rgba(255, 255, 255, .08);
  --sup-3: rgba(255, 255, 255, .13);
  --linea: rgba(255, 255, 255, .09);
  --linea-2: rgba(255, 255, 255, .18);
  --texto: #f2f4fa;
  --texto-2: #a3acc2;
  --texto-3: #6c7590;
  --azul: #3d7bff;
  --amarillo: #ffc83d;
  --rojo: #ff4458;
  --acierto: #2ee59d;
  --error: #ff5a6b;
  --blanco-gris: #8b93a9;
  --radio: 22px;
  --display: "Bricolage", "Manrope", system-ui, sans-serif;
  --suave: cubic-bezier(.2, .8, .2, 1);
  --acento-texto: var(--amarillo);
  --azul-texto: #9dbcff;
  --sobre-acento: #070b17;
  --cristal: rgba(13, 19, 38, .62);
  --cristal-2: rgba(13, 19, 38, .9);
  --campo: rgba(0, 0, 0, .25);
  --sombra-flotante: 0 20px 60px -20px rgba(0, 0, 0, .8);
  --sombra-tarjeta: none;
  --aurora: .2;
  color-scheme: dark;
}

/* Modo día: misma app sobre fondo claro con degradados suaves, en la línea del campus Moodle */
:root[data-tema=claro] {
  --tinta: #f5f6fb;
  --tinta-2: #ffffff;
  --sup: rgba(255, 255, 255, .72);
  --sup-2: rgba(16, 24, 56, .05);
  --sup-3: rgba(16, 24, 56, .1);
  --linea: rgba(16, 24, 56, .09);
  --linea-2: rgba(16, 24, 56, .18);
  --texto: #0e1430;
  --texto-2: #4a5373;
  --texto-3: #8990a8;
  --azul: #3d6fff;
  --acierto: #0c9a64;
  --error: #e0364a;
  --blanco-gris: #7d859c;
  --acento-texto: #b07400;
  --azul-texto: #2c5ae0;
  --cristal: rgba(255, 255, 255, .7);
  --cristal-2: rgba(255, 255, 255, .88);
  --campo: rgba(255, 255, 255, .9);
  --sombra-flotante: 0 20px 50px -20px rgba(30, 40, 90, .35);
  --sombra-tarjeta: 0 1px 2px rgba(16, 24, 56, .04), 0 10px 30px -12px rgba(30, 40, 90, .14);
  --aurora: .32;
  color-scheme: light;
}
:root[data-tema=claro] .aurora i:nth-child(1) { background: #8c7bff; }
:root[data-tema=claro] .aurora::after { opacity: .03; }
:root[data-tema=claro] .tarjeta, :root[data-tema=claro] .ficha, :root[data-tema=claro] .cantidades span { box-shadow: var(--sombra-tarjeta); }
:root[data-tema=claro] .ficha:has(input:checked) { background: linear-gradient(160deg, rgba(255, 200, 61, .3), rgba(255, 255, 255, .8)); }
:root[data-tema=claro] .opcion.correcta, :root[data-tema=claro] .opcion.fallada { box-shadow: none; }
/* La presentación animada es siempre nocturna, también en modo día */
:root[data-tema=claro] .intro { --tinta: #070b17; --texto: #f2f4fa; --texto-2: #a3acc2; --texto-3: #6c7590; color: var(--texto); color-scheme: dark; }
:root[data-tema=claro] .intro .logo-premir .para-claro { display: none; }
:root[data-tema=claro] .intro .logo-premir .para-oscuro { display: block; }
html, body, .tarjeta, .ficha, .opcion, .cabecera .dentro { transition: background-color .4s ease, color .4s ease, border-color .4s ease; }

/* Botón de modo día / noche */
.cambio-tema { width: 40px; height: 40px; padding: 0; border-radius: 12px; background: var(--sup-2); color: var(--texto); border: 1px solid var(--linea); box-shadow: none; flex: none; }
.cambio-tema:hover { transform: none; box-shadow: none; background: var(--sup-3); }
.cambio-tema svg { width: 20px; height: 20px; }
.cambio-tema .sol { display: none; }
:root[data-tema=claro] .cambio-tema .sol { display: block; }
:root[data-tema=claro] .cambio-tema .luna { display: none; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--tinta); }
body { margin: 0; min-height: 100vh; font: 450 16px/1.6 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--texto); overflow-x: hidden; }
a { color: var(--acento-texto); }
::selection { background: var(--amarillo); color: var(--sobre-acento); }
:focus-visible { outline: 2px solid var(--amarillo); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 750; letter-spacing: -.025em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: 1.35rem; letter-spacing: -.015em; }
p { margin: 0 0 12px; }

/* Fondo: auroras que se mueven muy despacio y un poco de grano */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(110px); opacity: var(--aurora); animation: flota 28s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: var(--azul); top: -30vmax; left: -15vmax; }
.aurora i:nth-child(2) { background: var(--amarillo); top: 10vmax; right: -35vmax; opacity: calc(var(--aurora) * .6); animation-duration: 34s; }
.aurora i:nth-child(3) { background: var(--rojo); bottom: -40vmax; left: 20vmax; opacity: calc(var(--aurora) * .55); animation-duration: 40s; }
.aurora::after { content: ""; position: absolute; inset: 0; opacity: .06; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes flota { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* Logotipo: la X de nexus + la palabra */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--texto); text-decoration: none; }
.logo .equis { width: 30px; height: 30px; flex: none; }
.logo .palabra { font: 800 1.45rem/1 var(--display); letter-spacing: -.04em; }
.equis path { fill: none; stroke-width: 17; stroke-linecap: round; }
.equis .nodo { filter: drop-shadow(0 0 6px rgba(255, 200, 61, .9)); }
.logo small { display: block; font: 600 .62rem/1 "Manrope", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--texto-3); margin-top: 4px; }

/* Cabecera flotante */
.cabecera { position: sticky; top: 0; z-index: 20; padding: 14px 20px; }
.cabecera .dentro { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap; padding: 10px 12px 10px 18px; border-radius: 18px; background: var(--cristal); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--linea); }
.cabecera .logo { margin-right: auto; }
.menu { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.menu a, .menu button { color: var(--texto-2); text-decoration: none; font: 600 .92rem "Manrope", sans-serif; padding: 8px 14px; border-radius: 12px; background: none; border: 0; cursor: pointer; transition: color .2s, background .2s; }
.menu a:hover, .menu button:hover { color: var(--texto); background: var(--sup-2); }
.menu a.activo { color: var(--tinta); background: var(--texto); }
.menu form { margin: 0; }

main { max-width: 1080px; margin: 0 auto; padding: 26px 20px 120px; }
.encabezado { margin: 18px 0 34px; }
.encabezado .ante { font: 700 .78rem "Manrope", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--acento-texto); margin-bottom: 14px; display: block; }
.encabezado p { color: var(--texto-2); font-size: 1.1rem; margin: 14px 0 0; max-width: 46ch; }

/* Superficies */
.tarjeta { background: var(--sup); border: 1px solid var(--linea); border-radius: var(--radio); padding: 26px; margin-bottom: 18px; backdrop-filter: blur(6px); }
.seccion { margin-bottom: 44px; }
.seccion-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.seccion-cab .n { font: 700 .8rem var(--display); color: var(--texto-3); margin-right: 10px; letter-spacing: .05em; }
.gris { color: var(--texto-2); font-size: .92rem; }
.vacio { text-align: center; padding: 56px 24px; }
.vacio h2 { margin-bottom: 10px; }
.vacio p { color: var(--texto-2); }

/* Botones */
button, .boton { font: 750 1rem "Manrope", sans-serif; background: var(--amarillo); color: var(--sobre-acento); border: 0; border-radius: 14px; padding: 13px 24px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .2s var(--suave), box-shadow .2s, background .2s; box-shadow: 0 8px 30px -8px rgba(255, 200, 61, .55); }
button:hover, .boton:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px rgba(255, 200, 61, .7); }
button:active, .boton:active { transform: translateY(0) scale(.98); }
.boton.secundario, button.secundario { background: var(--sup-2); color: var(--texto); border: 1px solid var(--linea-2); box-shadow: none; }
.boton.secundario:hover, button.secundario:hover { background: var(--sup-3); box-shadow: none; }
.boton.grande, button.grande { padding: 17px 32px; font-size: 1.08rem; border-radius: 16px; }
.enlace { background: none; border: 0; padding: 0; color: var(--texto-2); font: 650 .88rem "Manrope", sans-serif; cursor: pointer; box-shadow: none; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--linea-2); }
.enlace:hover { color: var(--texto); transform: none; box-shadow: none; }
.acciones { display: flex; gap: 12px; flex-wrap: wrap; }
.flecha { transition: transform .2s var(--suave); }
button:hover .flecha, .boton:hover .flecha { transform: translateX(4px); }

/* Mensajes */
.mensaje { padding: 14px 18px; border-radius: 14px; background: rgba(61, 123, 255, .14); border: 1px solid rgba(61, 123, 255, .35); margin-bottom: 18px; }
.mensaje.error { background: rgba(255, 90, 107, .12); border-color: rgba(255, 90, 107, .4); }
.mensaje.success { background: rgba(46, 229, 157, .1); border-color: rgba(46, 229, 157, .35); }

/* Fichas seleccionables (temas, modos, opciones extra) */
.oposicion { font: 700 .74rem "Manrope", sans-serif; text-transform: uppercase; letter-spacing: .16em; color: var(--texto-3); margin: 0; }
.temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 26px; }
.ficha { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--linea); border-radius: 18px; cursor: pointer; background: var(--sup); transition: transform .25s var(--suave), border-color .2s, background .2s; overflow: hidden; }
.ficha:hover { transform: translateY(-3px); border-color: var(--linea-2); background: var(--sup-2); }
.ficha input { position: absolute; opacity: 0; pointer-events: none; }
.ficha .numero { font: 800 2.4rem/1 var(--display); letter-spacing: -.04em; color: var(--texto-3); transition: color .2s; }
.ficha .txt b { display: block; font-weight: 700; line-height: 1.35; }
.ficha .txt small { color: var(--texto-2); font-size: .85rem; }
.ficha .marca-sel { position: absolute; top: 16px; right: 16px; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--linea-2); display: grid; place-items: center; transition: all .25s var(--suave); }
.ficha .marca-sel::after { content: ""; width: 10px; height: 6px; border: solid var(--sobre-acento); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .25s var(--suave); }
.ficha:has(input:checked) { border-color: var(--amarillo); background: linear-gradient(160deg, rgba(255, 200, 61, .16), rgba(255, 200, 61, .03)); }
.ficha:has(input:checked) .numero { color: var(--acento-texto); }
.ficha:has(input:checked) .marca-sel { background: var(--amarillo); border-color: var(--amarillo); }
.ficha:has(input:checked) .marca-sel::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.ficha:has(input:focus-visible) { outline: 2px solid var(--amarillo); outline-offset: 3px; }

/* Selector de cantidad: números grandes */
.cantidades { display: flex; gap: 12px; flex-wrap: wrap; }
.cantidades label { position: relative; }
.cantidades input { position: absolute; opacity: 0; }
.cantidades span { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 22px; border: 1px solid var(--linea); background: var(--sup); font: 800 2rem/1 var(--display); letter-spacing: -.03em; color: var(--texto-2); cursor: pointer; transition: all .25s var(--suave); }
.cantidades span:hover { transform: translateY(-3px); color: var(--texto); }
.cantidades input:checked + span { background: var(--texto); color: var(--tinta); border-color: var(--texto); transform: translateY(-3px); }
.cantidades input:focus-visible + span { outline: 2px solid var(--amarillo); outline-offset: 3px; }

/* Modos */
.modos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.modos .ficha { padding: 24px; min-height: 170px; justify-content: flex-end; }
.modos .ficha b { font: 750 1.4rem/1.1 var(--display); letter-spacing: -.02em; }
.modos .ficha .dibujo { position: absolute; top: 18px; left: 22px; display: flex; gap: 6px; }
.modos .ficha .dibujo i { display: block; width: 10px; height: 34px; border-radius: 6px; background: var(--sup-3); transition: background .3s, height .3s var(--suave); }
.modos .ficha:has(input:checked) .dibujo i:nth-child(1) { background: var(--azul); height: 40px; }
.modos .ficha:has(input:checked) .dibujo i:nth-child(2) { background: var(--amarillo); height: 28px; }
.modos .ficha:has(input:checked) .dibujo i:nth-child(3) { background: var(--rojo); height: 46px; }
.opciones-extra { margin-top: 14px; }
.opciones-extra .ficha { flex-direction: row; align-items: center; gap: 14px; padding: 16px 18px; }
.opciones-extra .ficha .marca-sel { position: static; flex: none; }
.opciones-extra .ficha:hover { transform: none; }

/* Barra para lanzar el test */
.lanzar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 15; width: min(1040px, calc(100% - 28px)); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 12px 12px 24px; border-radius: 22px; background: var(--cristal-2); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--linea-2); box-shadow: var(--sombra-flotante); }
.lanzar .resumen-sel { font-weight: 650; color: var(--texto-2); }
.lanzar .resumen-sel b { color: var(--texto); }
.lanzar button:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }

/* Lista de tests hechos */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: flex; align-items: center; gap: 18px; padding: 14px 4px; border-top: 1px solid var(--linea); }
.lista li:first-child { border-top: 0; }
.lista .fecha { flex: 1 1 150px; min-width: 0; }
.lista .fecha b { display: block; font-weight: 700; }
.recuento { display: flex; gap: 12px; font-size: .9rem; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recuento .a { color: var(--acierto); } .recuento .e { color: var(--error); } .recuento .b { color: var(--blanco-gris); }
.pastilla { font: 800 1.15rem var(--display); min-width: 66px; text-align: center; padding: 6px 12px; border-radius: 12px; background: var(--sup-2); font-variant-numeric: tabular-nums; }
.pastilla.alta { color: var(--acierto); background: rgba(46, 229, 157, .1); }
.pastilla.media { color: var(--acento-texto); background: rgba(255, 200, 61, .1); }
.pastilla.baja { color: var(--error); background: rgba(255, 90, 107, .1); }
.lista a.ver { color: var(--texto-2); text-decoration: none; font-weight: 700; font-size: .9rem; }
.lista a.ver:hover { color: var(--texto); }

/* Examen: una pregunta cada vez */
.barra-examen { position: sticky; top: 84px; z-index: 10; margin-bottom: 26px; }
.barra-examen .tarjeta { background: var(--cristal-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.barra-examen .fila { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.etiqueta { font: 750 .72rem "Manrope", sans-serif; text-transform: uppercase; letter-spacing: .16em; padding: 6px 12px; border-radius: 999px; background: rgba(61, 123, 255, .16); color: var(--azul-texto); border: 1px solid rgba(61, 123, 255, .35); }
.etiqueta.examen { background: rgba(255, 200, 61, .12); color: var(--acento-texto); border-color: rgba(255, 200, 61, .35); }
.barra-examen .cuenta { flex: 1; font-weight: 700; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.barra-examen .cuenta b { color: var(--texto); }
.pista { margin-left: 8px; font-weight: 500; }
.sin-js .pista, .lista-entera ~ * .pista { display: none; }
.reloj { font: 800 1.2rem var(--display); background: var(--sup-2); border: 1px solid var(--linea-2); border-radius: 12px; padding: 6px 14px; font-variant-numeric: tabular-nums; }
.reloj.poco { color: #fff; background: var(--error); border-color: var(--error); animation: late 1s ease-in-out infinite; }
@keyframes late { 50% { box-shadow: 0 0 0 8px rgba(255, 90, 107, .2); } }
.puntos { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.puntos button { width: 30px; height: 30px; padding: 0; border-radius: 9px; font: 700 .75rem "Manrope", sans-serif; background: var(--sup); color: var(--texto-3); border: 1px solid var(--linea); box-shadow: none; }
.puntos button:hover { transform: none; box-shadow: none; color: var(--texto); border-color: var(--linea-2); }
.puntos button.hecha { background: var(--sup-3); color: var(--texto); }
.puntos button.bien { background: rgba(46, 229, 157, .2); color: var(--acierto); border-color: rgba(46, 229, 157, .4); }
.puntos button.mal { background: rgba(255, 90, 107, .18); color: var(--error); border-color: rgba(255, 90, 107, .4); }
.puntos button.actual { border-color: var(--amarillo); color: var(--acento-texto); }
.progreso-barra { height: 4px; background: var(--sup-2); border-radius: 99px; overflow: hidden; margin-top: 14px; }
.progreso-barra i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--azul), var(--amarillo), var(--rojo)); transition: width .4s var(--suave); }

.pregunta { scroll-margin-top: 170px; }
.enfoque .pregunta { min-height: 52vh; animation: entra .45s var(--suave); }
.enfoque .pregunta.oculta { display: none; }
@keyframes entra { from { opacity: 0; transform: translateY(18px); } }
.pregunta .cab { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pregunta .n { font: 800 .82rem var(--display); color: var(--acento-texto); letter-spacing: .08em; }
.pregunta .tema { font-size: .8rem; color: var(--texto-2); background: var(--sup-2); padding: 3px 10px; border-radius: 8px; }
.enunciado { font: 650 clamp(1.2rem, 2.4vw, 1.55rem)/1.35 var(--display); letter-spacing: -.01em; margin-bottom: 22px; }
.tarjeta.pregunta { padding: 30px; }
.opcion { display: flex; align-items: flex-start; gap: 14px; padding: 15px 18px; border: 1px solid var(--linea); border-radius: 16px; margin: 10px 0; cursor: pointer; background: var(--sup); position: relative; transition: transform .2s var(--suave), border-color .2s, background .2s; }
label.opcion:hover { border-color: var(--linea-2); background: var(--sup-2); transform: translateX(4px); }
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion .letra { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--linea-2); display: grid; place-items: center; font: 800 .9rem var(--display); color: var(--texto-2); flex: none; transition: all .2s; }
.opcion .texto { padding-top: 4px; font-size: 1.02rem; }
.opcion:has(input:checked) { border-color: var(--texto); background: var(--sup-3); }
.opcion:has(input:checked) .letra { background: var(--texto); border-color: var(--texto); color: var(--tinta); }
.opcion:has(input:focus-visible) { outline: 2px solid var(--amarillo); outline-offset: 3px; }
.opcion:has(input:disabled) { cursor: default; transform: none; }
.opcion.correcta, .opcion.correcta:has(input:checked) { border-color: var(--acierto); background: rgba(46, 229, 157, .1); }
.opcion.correcta .letra, .opcion.correcta:has(input:checked) .letra { background: var(--acierto); border-color: var(--acierto); color: #fff; }
.opcion.fallada, .opcion.fallada:has(input:checked) { border-color: var(--error); background: rgba(255, 90, 107, .1); animation: sacude .4s; }
.opcion.fallada .letra, .opcion.fallada:has(input:checked) .letra { background: var(--error); border-color: var(--error); color: #fff; }
@keyframes sacude { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.opcion .tuya { margin-left: auto; font-size: .78rem; font-weight: 750; color: var(--texto-2); white-space: nowrap; padding-top: 6px; text-transform: uppercase; letter-spacing: .1em; }

.solucion { margin-top: 18px; padding: 18px 20px; background: var(--sup-2); border-radius: 16px; border-left: 3px solid var(--amarillo); animation: entra .4s var(--suave); }
.solucion p:last-child { margin-bottom: 0; }
.solucion .titulo { font: 750 .72rem "Manrope", sans-serif; text-transform: uppercase; letter-spacing: .16em; color: var(--acento-texto); margin-bottom: 8px; }
.extracto { color: var(--texto-2); font-style: italic; padding-left: 14px; border-left: 2px solid var(--linea-2); }
.sin-responder { color: var(--blanco-gris); font-size: .92rem; font-weight: 600; }
.mover { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.lista-entera .mover, .sin-js .mover { display: none; }
.entregar { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.entregar .gris { margin-right: auto; }

/* Resultado */
.resumen { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; padding: 36px; position: relative; overflow: hidden; }
.anillo { position: relative; width: 210px; height: 210px; }
.anillo svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.anillo circle { fill: none; stroke-width: 12; }
.anillo .fondo { stroke: var(--sup-2); }
.anillo .valor { stroke: var(--color, var(--amarillo)); stroke-linecap: round; stroke-dasharray: 534; stroke-dashoffset: 534; transition: stroke-dashoffset 1.6s var(--suave); filter: drop-shadow(0 0 14px var(--color, var(--amarillo))); }
.anillo .centro { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.anillo .nota { font: 800 3.6rem/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.anillo small { display: block; color: var(--texto-2); font-size: .85rem; margin-top: 4px; }
.veredicto { font: 800 clamp(2rem, 4.5vw, 3rem)/1 var(--display); letter-spacing: -.035em; margin-bottom: 10px; }
.veredicto em { font-style: normal; color: var(--color, var(--amarillo)); }
.cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0 16px; }
.cifra { border-radius: 16px; padding: 14px 16px; background: var(--sup-2); }
.cifra b { display: block; font: 800 2rem/1 var(--display); font-variant-numeric: tabular-nums; }
.cifra span { font-size: .85rem; color: var(--texto-2); }
.cifra.a b { color: var(--acierto); } .cifra.e b { color: var(--error); } .cifra.b b { color: var(--blanco-gris); }
#confeti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; margin: 40px 0 18px; }
.filtros button { background: var(--sup); color: var(--texto-2); border: 1px solid var(--linea); padding: 9px 16px; font-size: .9rem; border-radius: 999px; box-shadow: none; }
.filtros button:hover { transform: none; box-shadow: none; color: var(--texto); }
.filtros button[aria-pressed=true] { background: var(--texto); border-color: var(--texto); color: var(--tinta); }
.estado { margin-left: auto; font: 750 .74rem "Manrope", sans-serif; padding: 4px 11px; border-radius: 999px; text-transform: uppercase; letter-spacing: .1em; }
.estado.a { background: rgba(46, 229, 157, .14); color: var(--acierto); }
.estado.e { background: rgba(255, 90, 107, .14); color: var(--error); }
.estado.b { background: var(--sup-2); color: var(--blanco-gris); }
details.reportar { margin-top: 16px; }
details.reportar summary { cursor: pointer; color: var(--texto-3); font-size: .86rem; list-style: none; }
details.reportar summary:hover { color: var(--texto-2); }
details.reportar summary::-webkit-details-marker { display: none; }
details.reportar summary::before { content: "⚑  "; }
details.reportar form { margin-top: 12px; display: grid; gap: 10px; }

/* Progreso */
.temas-progreso { display: grid; gap: 22px; }
.tp .linea { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.tp .linea b { font: 750 1.05rem var(--display); }
.tp .barra { height: 12px; background: var(--sup-2); border-radius: 99px; overflow: hidden; }
.tp .barra i { display: block; height: 100%; border-radius: 99px; background: var(--acierto); box-shadow: 0 0 18px rgba(46, 229, 157, .5); transform-origin: left; animation: crece 1.2s var(--suave) both; }
.tp.media .barra i { background: var(--amarillo); box-shadow: 0 0 18px rgba(255, 200, 61, .45); }
.tp.baja .barra i { background: var(--error); box-shadow: 0 0 18px rgba(255, 90, 107, .45); }
@keyframes crece { from { transform: scaleX(0); } }
.tp .pct { font: 800 1.3rem var(--display); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Formularios */
select, textarea, input[type=text], input[type=password] { font: inherit; padding: 13px 15px; border: 1px solid var(--linea-2); border-radius: 14px; width: 100%; background: var(--campo); color: var(--texto); }
select:focus, textarea:focus, input[type=text]:focus, input[type=password]:focus { outline: none; border-color: var(--amarillo); box-shadow: 0 0 0 4px rgba(255, 200, 61, .15); }
.campo { display: grid; gap: 8px; margin-bottom: 18px; font-weight: 650; font-size: .92rem; color: var(--texto-2); }

/* Marca grande «ne✕us»: la X se dibuja con dos trazos que se encuentran y el punto de unión late */
.gran-logo { font: 800 clamp(4.5rem, 13vw, 9.5rem)/1 var(--display); letter-spacing: -.055em; display: inline-flex; align-items: baseline; white-space: nowrap; }
.gran-logo .equis { width: .54em; height: .54em; margin: 0 .03em; overflow: visible; align-self: baseline; transform: translateY(.02em); }
.gran-logo .equis path { stroke-width: 15; stroke-dasharray: 100; stroke-dashoffset: 100; animation: traza .9s var(--suave) .15s forwards; }
.gran-logo .equis .t2 { animation-delay: .35s; }
.gran-logo .equis .nodo { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: nodo .7s cubic-bezier(.3, 1.6, .5, 1) 1.05s forwards, late-nodo 2.4s ease-in-out 2s infinite; }
.gran-logo .l { display: inline-block; opacity: 0; animation: abre .9s var(--suave) 1.25s forwards; }
.gran-logo .izq { --desde: .35em; }
.gran-logo .der { --desde: -.35em; }
@keyframes traza { to { stroke-dashoffset: 0; } }
@keyframes nodo { to { transform: scale(1); } }
@keyframes late-nodo { 50% { filter: drop-shadow(0 0 22px rgba(255, 200, 61, 1)); } }
@keyframes abre { from { opacity: 0; transform: translateX(var(--desde)); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.aparece { opacity: 0; animation: sube .9s var(--suave) forwards; }
@keyframes sube { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.d1 { animation-delay: .5s; } .d2 { animation-delay: .75s; } .d3 { animation-delay: 1s; } .d4 { animation-delay: 1.7s; }

/* Pantalla de entrada */
.bienvenida { min-height: calc(100vh - 140px); display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.bienvenida .gran-logo { margin: 18px 0 18px -.04em; }
.bienvenida .lema { font: 600 clamp(1.2rem, 2.2vw, 1.6rem)/1.3 var(--display); color: var(--texto-2); max-width: 30ch; letter-spacing: -.01em; }
.bienvenida .lema b { color: var(--texto); font-weight: 750; }
.bienvenida .tarjeta { padding: 34px; }
.bienvenida .tarjeta h2 { margin-bottom: 8px; }
.bienvenida button { width: 100%; margin-top: 6px; }
.bienvenida .datos { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.bienvenida .datos b { display: block; font: 800 2rem/1 var(--display); letter-spacing: -.03em; }
.bienvenida .datos span { color: var(--texto-3); font-size: .85rem; }

/* Presentación a pantalla completa, una vez por sesión */
.intro { position: fixed; inset: 0; z-index: 100; background: var(--tinta); display: grid; place-items: center; text-align: center; cursor: pointer; transition: opacity .8s ease, visibility .8s; overflow: hidden; }
.intro.fuera { opacity: 0; visibility: hidden; }
.intro .gran-logo { font-size: clamp(5rem, 19vw, 13rem); }
.intro .lema { font: 600 clamp(1.1rem, 2.4vw, 1.6rem) var(--display); color: var(--texto-2); margin-top: 10px; }
.intro .pie-intro { position: absolute; bottom: 30px; left: 0; right: 0; display: grid; justify-items: center; gap: 14px; font-size: .74rem; color: var(--texto-3); letter-spacing: .2em; text-transform: uppercase; }
.intro .pie-intro .logo-premir img { height: 40px; }
.intro .halo { position: absolute; left: 50%; top: 50%; width: 80vmin; height: 80vmin; margin: -40vmin 0 0 -40vmin; border-radius: 50%; background: conic-gradient(from 0deg, var(--azul), var(--amarillo), var(--rojo), var(--azul)); filter: blur(90px); opacity: 0; animation: halo 2.4s var(--suave) 1s forwards, gira 14s linear infinite; }
@keyframes halo { to { opacity: .3; } }
@keyframes gira { to { transform: rotate(360deg); } }
.intro .anima { position: relative; }

/* Nuevo récord: celebración a pantalla completa, siempre en noche */
.insignia-record { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; margin-bottom: 12px; border-radius: 99px; font: 800 .8rem "Manrope", sans-serif; letter-spacing: .04em; color: #070b17; background: linear-gradient(90deg, var(--amarillo), #ffe08a, var(--amarillo)); background-size: 200% 100%; animation: brillo 3s linear infinite; box-shadow: 0 6px 24px -6px rgba(255, 200, 61, .6); }
@keyframes brillo { to { background-position: -200% 0; } }
.record { --tinta: #070b17; --texto: #f2f4fa; --acierto: #2ee59d; --amarillo: #ffc83d; --texto-2: #a3acc2; --texto-3: #6c7590; color-scheme: dark; position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--texto); background: radial-gradient(circle at 50% 45%, #1a1430 0, var(--tinta) 70%); overflow: hidden; transition: opacity .7s ease, visibility .7s; animation: aparece-record .5s ease; }
.record[hidden] { display: none; }
.record.fuera { opacity: 0; visibility: hidden; }
@keyframes aparece-record { from { opacity: 0; } }
.record .halo { position: absolute; left: 50%; top: 45%; width: 90vmin; height: 90vmin; margin: -45vmin 0 0 -45vmin; border-radius: 50%; background: conic-gradient(from 0deg, var(--azul), var(--amarillo), var(--rojo), var(--azul)); filter: blur(80px); opacity: .35; animation: gira 10s linear infinite; }
.record .rayos { position: absolute; left: 50%; top: 45%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; background: repeating-conic-gradient(rgba(255, 200, 61, .09) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 60%); mask: radial-gradient(circle, #000 0, transparent 60%); animation: gira 40s linear infinite; }
.record .anima { position: relative; display: grid; justify-items: center; }
.record .medalla { width: clamp(120px, 22vmin, 180px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, #141b33 55%, transparent 56%), conic-gradient(var(--azul), var(--amarillo), var(--rojo), var(--azul)); box-shadow: 0 0 80px -10px rgba(255, 200, 61, .7); animation: medalla .9s cubic-bezier(.3, 1.6, .5, 1) .1s both; margin-bottom: 26px; }
.record .medalla .equis { width: 52%; height: 52%; overflow: visible; }
.record .medalla path { stroke-width: 15; stroke-linecap: round; fill: none; stroke-dasharray: 100; stroke-dashoffset: 100; animation: traza .8s var(--suave) .6s forwards; }
.record .medalla .t2 { animation-delay: .8s; }
.record .medalla .nodo { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: nodo .6s cubic-bezier(.3, 1.6, .5, 1) 1.3s forwards, late-nodo 2s ease-in-out 2s infinite; }
@keyframes medalla { from { transform: scale(0) rotate(-120deg); } }
.record .ante { font: 700 .8rem "Manrope", sans-serif; letter-spacing: .22em; text-transform: uppercase; color: var(--amarillo); opacity: 0; animation: sube .7s var(--suave) 1.1s forwards; }
.record h2 { font: 800 clamp(2.4rem, 7vw, 4.6rem)/1 var(--display); letter-spacing: -.045em; margin: 12px 0 22px; background: linear-gradient(100deg, #fff 30%, var(--amarillo) 50%, #fff 70%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0; animation: sube .8s var(--suave) 1.3s forwards, destello 3.5s ease-in-out 2.2s infinite; }
@keyframes destello { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.record .salto { display: flex; align-items: baseline; gap: 18px; font: 800 clamp(1.6rem, 4vw, 2.4rem)/1 var(--display); opacity: 0; animation: sube .8s var(--suave) 1.6s forwards; }
.record .salto .antes { color: var(--texto-3); text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: rgba(255, 68, 88, .7); }
.record .salto .flecha { color: var(--texto-3); }
.record .salto b { font-size: 1.6em; color: var(--acierto); text-shadow: 0 0 40px rgba(46, 229, 157, .5); }
.record .mejora { color: var(--texto-2); margin: 14px 0 30px; opacity: 0; animation: sube .8s var(--suave) 1.8s forwards; }
.record button { opacity: 0; animation: sube .8s var(--suave) 2.1s forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

@media (max-width: 760px) {
  .bienvenida { grid-template-columns: 1fr; gap: 18px; min-height: 0; }
  .bienvenida .gran-logo { margin: 10px 0; }
}
@media (max-width: 640px) {
  main { padding: 14px 14px 120px; }
  .cabecera { padding: 10px; }
  .cabecera .dentro { padding: 8px 8px 8px 14px; }
  .cabecera { position: static; }
  .menu { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .menu form { margin-left: auto; }
  .puntos { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .puntos button { flex: none; }
  .barra-examen .cuenta { font-size: .88rem; }
  .barra-examen .fila { gap: 8px 10px; }
  .etiqueta { font-size: .62rem; padding: 4px 9px; letter-spacing: .12em; }
  .menu a, .menu button { white-space: nowrap; }
  .enunciado { margin-bottom: 16px; }
  .menu a, .menu button { padding: 6px 11px; font-size: .86rem; }
  .logo small { display: none; }
  .barra-examen { top: 8px; }
  .tarjeta, .tarjeta.pregunta { padding: 20px 18px; }
  .pista { display: none; }
  .cantidades span { width: 72px; height: 72px; font-size: 1.6rem; border-radius: 18px; }
  .resumen { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 20px; padding: 26px 18px; }
  .resumen .acciones { justify-content: center; }
  .cifras { width: 100%; }
  .lista li { flex-wrap: wrap; row-gap: 6px; }
  .lista .fecha { flex-basis: 100%; }
  .lista .recuento { margin-right: auto; }
  .lanzar { padding: 10px 10px 10px 16px; bottom: 10px; }
  .lanzar .resumen-sel { font-size: .85rem; }
}

.seccion-cab.grupo { margin-bottom: 12px; }
.menu button { box-shadow: none; }
.menu button:hover { transform: none; box-shadow: none; }
.cabecera .cambio-tema { order: 3; }
@media (max-width: 640px) { .cabecera .cambio-tema { order: 0; width: 36px; height: 36px; } }

/* Logotipo de Grupo PREMIR: versión blanca de noche y azul marino de día */
.logo-premir { display: inline-flex; }
.logo-premir img { height: 54px; width: auto; display: block; }
.logo-premir .para-claro { display: none; }
:root[data-tema=claro] .logo-premir .para-claro { display: block; }
:root[data-tema=claro] .logo-premir .para-oscuro { display: none; }
.firma { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.firma .ante { font: 700 .74rem "Manrope", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--acento-texto); padding-left: 18px; border-left: 1px solid var(--linea-2); }
@media (max-width: 640px) { .logo-premir img { height: 42px; } .firma .ante { padding-left: 0; border-left: 0; } }

/* Inicio: racha y acceso al modo Día D */
.panel-inicio { display: grid; grid-template-columns: 1fr 320px; gap: 18px; margin-bottom: 34px; }
.panel-inicio.solo { grid-template-columns: 1fr; }
.panel-inicio .tarjeta { margin: 0; }
.racha { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; padding: 26px 30px; }
.llama { width: 78px; height: 94px; filter: drop-shadow(0 0 24px rgba(255, 140, 40, .65)); transform-origin: 50% 100%; animation: llamea 2.6s ease-in-out infinite; }
@keyframes llamea { 50% { transform: scale(1.05, .96) rotate(-1.5deg); } }
.sin-racha .llama { filter: grayscale(1) opacity(.35); animation: none; }
.dias-racha { font: 800 3.2rem/1 var(--display); letter-spacing: -.04em; }
.dias-racha span { font-size: 1.1rem; color: var(--texto-2); letter-spacing: -.01em; }
.racha .gris { margin: 6px 0 14px; }
.semana { display: flex; gap: 7px; }
.semana .dia { text-align: center; }
.semana .dia i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 800 .9rem var(--display); font-style: normal; background: var(--sup-2); color: var(--sobre-acento); }
.semana .dia.hecho i { background: var(--amarillo); box-shadow: 0 4px 16px -4px rgba(255, 200, 61, .6); }
.semana .dia.hoy i { outline: 2px solid var(--amarillo); outline-offset: 2px; }
.semana small { color: var(--texto-3); font-size: .72rem; font-weight: 700; }
.anillo.mini { width: 124px; height: 124px; }
.anillo.mini .nota { font-size: 1.6rem; }
.anillo.mini small { font-size: .72rem; }
.dia-d-tarjeta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-decoration: none; color: var(--texto); position: relative; overflow: hidden; background: radial-gradient(circle at 100% 0, rgba(255, 68, 88, .22), transparent 60%), radial-gradient(circle at 0 100%, rgba(61, 123, 255, .2), transparent 60%), var(--sup); transition: transform .25s var(--suave), border-color .25s; }
.dia-d-tarjeta:hover { transform: translateY(-3px); border-color: rgba(255, 200, 61, .5); }
.dia-d-tarjeta .etiqueta { margin-bottom: 8px; }
.faltan-n { font: 800 3rem/1 var(--display); letter-spacing: -.04em; }
.faltan-n span { font-size: 1.05rem; color: var(--texto-2); letter-spacing: 0; }
.dia-d-tarjeta .gris { margin: 0 0 10px; }
.dia-d-tarjeta .ir { margin-top: auto; font-weight: 750; color: var(--acento-texto); }

/* Modo Día D: pantalla de salida, siempre en noche */
.dia-d { --tinta: #05070f; --texto: #f2f4fa; --texto-2: #a3acc2; --texto-3: #6c7590; --sup: rgba(255, 255, 255, .04); --linea: rgba(255, 255, 255, .08); --linea-2: rgba(255, 255, 255, .16); --amarillo: #ffc83d; --acento-texto: #ffc83d; color-scheme: dark; position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--texto); background: radial-gradient(circle at 50% 48%, rgba(255, 68, 88, .16), transparent 55%), var(--tinta); overflow: auto; }
.salir-dd { position: absolute; top: 22px; right: 26px; color: var(--texto-3); text-decoration: none; font-weight: 700; }
.salir-dd:hover { color: var(--texto); }
.frase-dd { font: 700 clamp(1.1rem, 2.4vw, 1.4rem) var(--display); color: var(--texto-2); margin: 20px 0 6px; }
.cuenta3 { position: relative; width: min(380px, 70vw); aspect-ratio: 1; margin: 0 auto; }
.cuenta3 > svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.cuenta3 > svg circle { fill: none; }
.cuenta3 .pista { stroke: rgba(255, 255, 255, .08); stroke-width: 4; }
.cuenta3 .arco { stroke-width: 5; stroke-linecap: round; }
.cuenta3 .num { position: absolute; inset: 0; display: grid; place-items: center; font: 800 clamp(8rem, 30vw, 14rem)/1 var(--display); letter-spacing: -.06em; text-shadow: 0 0 60px rgba(255, 200, 61, .5); }
.cuenta3 .num .equis { width: 42%; height: 42%; overflow: visible; }
.cuenta3 .num .equis path { stroke-width: 13; stroke-linecap: round; fill: none; }
.cuenta3 .num.late { animation: late-num 1s var(--suave); }
@keyframes late-num { from { transform: scale(1.5); opacity: 0; filter: blur(10px); } 30% { opacity: 1; filter: none; } }
.datos-dd { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0; }
.datos-dd span { padding: 9px 16px; border: 1px solid var(--linea-2); border-radius: 999px; font-weight: 700; color: var(--texto-2); font-size: .92rem; }
.dia-d.contando form, .dia-d.contando .salir-dd { visibility: hidden; }
.faltan-dd { position: absolute; left: 28px; bottom: 28px; text-align: left; margin: 0; background: rgba(13, 19, 38, .7); }
.ante-dd { display: block; font: 700 .7rem "Manrope", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--amarillo); margin-bottom: 8px; }

/* Constelación de temas: un cielo nocturno también en modo día */
.cielo { position: relative; border-radius: var(--radio); border: 1px solid rgba(255, 255, 255, .08); margin-bottom: 18px; aspect-ratio: 100 / 52; min-height: 340px; overflow: hidden; color: #f2f4fa; background: radial-gradient(ellipse at 25% 15%, rgba(61, 123, 255, .22), transparent 60%), radial-gradient(ellipse at 85% 95%, rgba(255, 68, 88, .14), transparent 55%), #050816; }
.cielo svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cielo .polvo circle { fill: #fff; animation: titila 4s ease-in-out infinite; }
@keyframes titila { 50% { opacity: .15; } }
.mapa-estrellas line { stroke-width: .2; }
.mapa-estrellas line.viva { opacity: .75; }
.mapa-estrellas line.apagada { stroke: #fff; stroke-width: .12; stroke-dasharray: .7 .7; opacity: .25; }
.estrella { --c: #6c7590; outline: none; cursor: default; opacity: 0; animation: enciende .8s var(--suave) forwards; animation-delay: calc(.5s + var(--i) * 70ms); }
.estrella.alta { --c: #2ee59d; } .estrella.media { --c: #ffc83d; } .estrella.baja { --c: #ff5a6b; }
.estrella .nucleo { fill: var(--c); stroke: var(--c); stroke-width: .15; transition: r .3s; }
.estrella.apagada .nucleo { fill: none; }
.estrella .halo { fill: var(--c); opacity: .3; animation: respira 3.5s ease-in-out infinite; animation-delay: calc(var(--i) * -400ms); }
@keyframes respira { 50% { opacity: .5; } }
@keyframes enciende { from { opacity: 0; transform: translateY(1.5px); } to { opacity: 1; transform: none; } }
.estrella text { text-anchor: middle; }
.estrella .nombre { font: 750 1.45px var(--display); fill: #f2f4fa; }
.estrella .pct { font: 700 1.15px "Manrope", sans-serif; fill: var(--c); }
.estrella.apagada .pct { fill: #6c7590; }
.estrella:hover .nucleo, .estrella:focus .nucleo { stroke-width: .6; }
.panel-cielo { position: absolute; top: 20px; right: 20px; width: 250px; margin: 0; padding: 18px; display: grid; gap: 2px; background: rgba(13, 19, 38, .78); border-color: rgba(255, 255, 255, .1); --texto-2: #a3acc2; }
.panel-cielo .gris:first-child { font: 700 .68rem "Manrope", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #ffc83d; margin-bottom: 6px; }
.panel-cielo .completa { font: 800 2.1rem/1 var(--display); margin: 4px 0 10px; }
.panel-cielo .progreso-barra { margin: 0; }
.panel-cielo p { margin: 12px 0 0; }
.panel-cielo p b { color: #ffc83d; }

/* Mapa de calor */
.leyenda { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; }
.leyenda i, .mapa-calor i { display: block; border-radius: 4px; }
.leyenda i { width: 12px; height: 12px; }
.mapa-calor { display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; max-width: 760px; }
.mapa-calor i { aspect-ratio: 1; }
.n0 { background: var(--sup-2); } .n1 { background: rgba(255, 200, 61, .25); } .n2 { background: rgba(255, 200, 61, .5); } .n3 { background: rgba(255, 200, 61, .78); } .n4 { background: #ffc83d; box-shadow: 0 0 10px rgba(255, 200, 61, .45); }
.n-1 { background: transparent; }

/* Resumen tipo Wrapped: tarjetas verticales que se deslizan */
.historias { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 56px; margin-bottom: -30px; scrollbar-width: none; }
.historias::-webkit-scrollbar { display: none; }
.historia { flex: 0 0 320px; height: 580px; scroll-snap-align: center; border-radius: 34px; padding: 30px 26px; display: flex; flex-direction: column; position: relative; overflow: hidden; color: #f2f4fa; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8); --texto-2: #c3c9da; }
.historia.h1 { background: radial-gradient(circle at 15% 8%, #3d7bff, transparent 60%), radial-gradient(circle at 95% 95%, #ff4458, transparent 55%), #070b17; }
.historia.h2 { background: linear-gradient(160deg, #ffc83d, #ff7a3d); color: #140b00; }
.historia.h3 { background: radial-gradient(circle at 80% 15%, #ff4458, transparent 55%), radial-gradient(circle at 10% 90%, #3d7bff, transparent 60%), #120a24; }
.historia.h4 { background: radial-gradient(circle at 50% 35%, #1d2b6b, #070b17 75%); }
.historia .barras { display: flex; gap: 4px; margin-bottom: 24px; }
.historia .barras i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.historia .barras i.on { background: #fff; }
.historia.h2 .barras i { background: rgba(0, 0, 0, .18); } .historia.h2 .barras i.on { background: #140b00; }
.historia .sub { font: 700 .72rem "Manrope", sans-serif; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.historia .gig { font: 800 5rem/.9 var(--display); letter-spacing: -.05em; }
.historia .gig.grande { font-size: 6.4rem; margin-top: 34px; }
.historia h2 { font-size: 1.85rem; line-height: 1.05; margin: 10px 0 8px; color: inherit; }
.historia p { margin: 0; color: var(--texto-2); font-weight: 600; }
.historia.h2 p { color: #3a2400; }
.historia .abajo { margin-top: auto; }
.historia .cajas { margin-top: auto; display: flex; gap: 10px; }
.historia .cajas div { flex: 1; background: rgba(0, 0, 0, .12); border-radius: 18px; padding: 14px; }
.historia .cajas b { font: 800 1.9rem/1 var(--display); display: block; }
.historia .cajas small { font-weight: 700; }
.historia .centro-h { margin: auto 0; text-align: center; }
.historia .gran-logo { font-size: 4.2rem; justify-content: center; }
.historia .quien { font: 700 1.3rem/1.25 var(--display); margin: 18px 0 6px; color: #f2f4fa; }
.historia .pie-h { text-align: center; margin-top: 12px; font-size: .78rem; color: #6c7590; }
.historia button { width: 100%; }
.puntos-historias { display: none; justify-content: center; gap: 6px; }
.puntos-historias i { width: 7px; height: 7px; border-radius: 50%; background: var(--sup-3); transition: width .3s; }
.puntos-historias i.on { width: 22px; border-radius: 4px; background: var(--amarillo); }

@media (min-width: 1000px) {
  .historias { overflow: visible; }
  .historia { flex: 1 1 0; min-width: 0; height: 540px; padding: 26px 22px; }
  .historia .gig { font-size: 4.2rem; }
  .historia .gig.grande { font-size: 5.2rem; }
  .historia h2 { font-size: 1.5rem; }
  .historia .gran-logo { font-size: 3.4rem; }
}
@media (max-width: 900px) {
  .panel-inicio { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .racha { grid-template-columns: auto 1fr; gap: 16px 18px; padding: 22px 18px; }
  .racha .anillo.mini { grid-column: 1 / -1; justify-self: center; display: none; }
  .llama { width: 56px; height: 68px; }
  .dias-racha { font-size: 2.4rem; }
  .semana .dia i { width: 30px; height: 30px; border-radius: 9px; }
  .semana { gap: 5px; }
  .cielo { aspect-ratio: auto; min-height: 0; }
  .cielo .mapa-estrellas { position: relative; display: block; height: 64vw; }
  .estrella .nombre { font-size: 3px; } .estrella .titulo { display: none; } .estrella .pct { font-size: 2.4px; }
  .panel-cielo { position: static; width: auto; margin: 0 12px 12px; }
  .faltan-dd { position: static; margin-top: 20px; }
  .historia { flex-basis: 84vw; height: 540px; }
  .puntos-historias { display: flex; }
}
