:root {
  --crema: #fbf5ea; --papel: #fffdf8; --tinta: #3b3247; --suave: #7a6f86;
  --oro: #e7b53c; --oro2: #f6dd9a; --cielo: #5aa9e6; --cielo2: #d8ecfb; --verde: #4fae73; --verde2: #dcf2e3;
  --rojo: #d9604a; --rojo2: #fbe1dc; --lila: #b48be8;
  --r: 20px; --sombra: 0 6px 20px rgba(80, 60, 30, .10);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: 'Nunito', 'Trebuchet MS', system-ui, sans-serif; color: var(--tinta);
  background: radial-gradient(circle at 15% 0%, #fff3cf 0, transparent 40%), radial-gradient(circle at 100% 30%, #e3f1fc 0, transparent 35%), var(--crema);
  min-height: 100vh; font-size: 18px; line-height: 1.5;
}
#app { max-width: 880px; margin: 0 auto; padding: 16px 16px 60px; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }

/* Portada y mapa */
.portada { text-align: center; padding: 28px 8px 10px; }
.portada h1 { font-size: clamp(32px, 7vw, 52px); font-weight: 900; letter-spacing: -.5px;
  background: linear-gradient(90deg, #c8891a, #e7b53c 40%, #5aa9e6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { font-weight: 700; color: var(--suave); margin: 0; }
.bienv { max-width: 560px; margin: 14px auto; font-size: 19px; }
.toplinks { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pill { background: var(--papel); border-radius: 99px; padding: 8px 16px; font-weight: 800; text-decoration: none; box-shadow: var(--sombra); }
.mapa { display: grid; gap: 18px; margin-top: 22px; }
.parte { display: grid; grid-template-columns: 140px 1fr; gap: 16px; background: var(--papel); border-radius: var(--r); padding: 14px; box-shadow: var(--sombra); border-top: 6px solid var(--c); }
.parte img { width: 140px; height: 140px; object-fit: cover; border-radius: 16px; }
.parte-n { font-weight: 900; color: var(--c); text-transform: uppercase; font-size: 14px; letter-spacing: 1px; }
.parte h2 { font-size: 24px; }
.parte ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.cap { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 8px 10px; border-radius: 12px; background: #faf6ee; transition: transform .15s, background .15s; }
a.cap:hover { background: var(--oro2); transform: translateX(3px); }
.cap.pronto { opacity: .55; }
.cap-n { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 900; display: grid; place-items: center; font-size: 15px; }
.cap-t { flex: 1; font-weight: 700; }
.cap-st { font-size: 14px; font-weight: 800; color: var(--suave); white-space: nowrap; }
.pie { text-align: center; color: var(--suave); font-size: 14px; margin-top: 30px; }
@media (max-width: 560px) {
  .parte { grid-template-columns: 1fr; }
  .parte img { width: 100%; height: 150px; }
}

/* Barra y cabecera */
.barra { display: flex; justify-content: space-between; align-items: center; font-weight: 800; color: var(--suave); }
.volver { text-decoration: none; background: var(--papel); padding: 6px 14px; border-radius: 99px; box-shadow: var(--sombra); color: var(--tinta); }
.cab-cap { text-align: center; margin: 16px 0 10px; }
.cap-num { font-weight: 900; color: var(--oro); text-transform: uppercase; letter-spacing: 1px; font-size: 15px; }
.cab-cap h1 { font-size: clamp(26px, 5vw, 38px); font-weight: 900; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.tabs a { flex: 0 0 auto; text-decoration: none; font-weight: 800; padding: 8px 14px; border-radius: 99px; background: var(--papel); color: var(--suave); box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.tabs a.on { background: var(--oro); color: #fff; }
.pasos-nav { display: flex; justify-content: space-between; margin-top: 18px; gap: 10px; }

/* Tarjetas */
.tarjeta { background: var(--papel); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--sombra); margin-bottom: 16px; }
.truco .frase { font-size: 23px; font-weight: 700; margin: 0; }
.sutra { background: linear-gradient(135deg, #fff8e3, #fdf0cf); border: 2px dashed var(--oro); }
.etq { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: #b98515; }
.sk { font-size: 22px; font-weight: 900; margin: 4px 0; color: #8a5d00; }
.tr { font-style: italic; margin: 0; font-size: 19px; }
.nota { font-size: 16px; color: var(--suave); margin: 10px 0 0; }
.ejemplo h3 { color: var(--cielo); }
.preg { font-size: 22px; font-weight: 800; }
.preg.grande { font-size: clamp(26px, 6vw, 38px); text-align: center; margin: 10px 0; }
.num { font-variant-numeric: tabular-nums; }
.pasos { padding-left: 24px; margin: 10px 0; }
.pasos li { margin: 8px 0; opacity: 0; transform: translateY(6px); transition: .35s; height: 0; overflow: hidden; }
.pasos li.vis { opacity: 1; transform: none; height: auto; }
.cuidado .mal { background: var(--rojo2); color: #9b3523; padding: 8px 12px; border-radius: 12px; text-decoration: line-through; text-decoration-thickness: 2px; font-weight: 700; }
.cuidado .bien { background: var(--verde2); color: #23643c; padding: 8px 12px; border-radius: 12px; font-weight: 700; }
.cuidado h3 { color: var(--rojo); }
.cuenta { background: var(--cielo2); padding: 10px 14px; border-radius: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ha { color: #b07c06; background: #fff0c2; padding: 0 4px; border-radius: 6px; }
.hb { color: #1f6aa8; background: var(--cielo2); padding: 0 4px; border-radius: 6px; }
.hc { color: #23643c; background: var(--verde2); padding: 0 4px; border-radius: 6px; }
.cifras { display: inline-flex; gap: 3px; vertical-align: middle; }
.cifras i { font-style: normal; font-weight: 900; background: #f3ecdf; border-radius: 6px; min-width: 24px; text-align: center; padding: 0 4px; }
.intro { color: var(--suave); text-align: center; }
.intro.peq { font-size: 15px; }

/* Botones */
.btn { display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 900; text-decoration: none; text-align: center;
  background: var(--oro); color: #fff; padding: 12px 22px; border-radius: 99px; box-shadow: 0 4px 0 #c7951f; transition: transform .1s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #c7951f; }
.btn.sec { background: var(--papel); color: var(--tinta); box-shadow: 0 4px 0 #e0d6c4; }
.btn.grande { font-size: 22px; padding: 16px 30px; }

/* Niveles */
.niveles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.nivel { display: flex; flex-direction: column; gap: 4px; background: var(--papel); border-radius: var(--r); padding: 16px; text-decoration: none; box-shadow: var(--sombra); border-bottom: 5px solid var(--cielo); transition: transform .15s; }
a.nivel[href]:hover { transform: translateY(-3px); }
.nivel.cerrado { opacity: .5; border-bottom-color: #ccc; }
.nv-n { font-weight: 900; color: var(--cielo); text-transform: uppercase; font-size: 14px; }
.nv-t { font-weight: 800; font-size: 19px; flex: 1; }
.stars { color: var(--oro); font-size: 22px; letter-spacing: 2px; }
.stars i { font-style: normal; color: #e6dccb; }
.candado { font-size: 22px; }
.reto { text-align: center; }
.record { font-size: 20px; }

/* Práctica */
.practica { max-width: 560px; margin: 0 auto; }
.nv-nombre { text-align: center; font-weight: 800; color: var(--suave); margin: 14px 0 6px; }
.puntos { display: flex; justify-content: center; gap: 6px; }
.puntos i { width: 14px; height: 14px; border-radius: 50%; background: #e6dccb; transition: .3s; }
.puntos i.hecho { background: var(--verde); }
.puntos i.actual { background: var(--oro); transform: scale(1.3); }
.ejercicio { background: var(--papel); border-radius: var(--r); padding: 16px; box-shadow: var(--sombra); margin-top: 14px; }
.respuesta { margin: 8px auto; min-height: 64px; border-radius: 16px; border: 3px solid var(--oro2); background: #fffaf0; font-size: 36px; font-weight: 900; text-align: center; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.respuesta.bien { border-color: var(--verde); background: var(--verde2); }
.respuesta.mal { border-color: var(--rojo); background: var(--rojo2); animation: temblor .4s; }
@keyframes temblor { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.feedback { text-align: center; }
.feedback .ok { font-size: 24px; font-weight: 900; color: var(--verde); margin: 6px 0; }
.feedback .no { font-weight: 800; color: var(--rojo); }
.pista { background: #fff6d8; border-radius: 14px; padding: 10px 14px; text-align: left; margin: 8px 0; }
.fb-bot { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.pasos.todos { text-align: left; background: var(--cielo2); border-radius: 14px; padding: 10px 14px 10px 34px; }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.teclado button { font: inherit; font-size: 28px; font-weight: 900; border: 0; border-radius: 16px; padding: 12px 0; background: #f6efe2; color: var(--tinta); box-shadow: 0 4px 0 #e0d6c4; cursor: pointer; touch-action: manipulation; }
.teclado button:active { transform: translateY(3px); box-shadow: 0 1px 0 #e0d6c4; }
.teclado .t-ok { background: var(--verde); color: #fff; box-shadow: 0 4px 0 #34844f; }
.teclado .t-borrar { background: #efe4d2; }

/* Fichas */
.fichas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 6px 0; }
.fichas.temb { animation: temblor .4s; }
.ficha { font: inherit; font-size: 26px; font-weight: 900; min-width: 52px; padding: 6px 10px; border-radius: 14px; border: 3px solid #e6dccb; background: #fff; cursor: pointer; transition: .2s; }
.ficha.sel { border-color: var(--oro); background: var(--oro2); transform: translateY(-3px); }
.ficha.tachar.g { text-decoration: line-through; text-decoration-thickness: 4px; opacity: .35; }
.ficha.pareja.g0 { background: #fff0c2; border-color: var(--oro); }
.ficha.pareja.g1 { background: var(--cielo2); border-color: var(--cielo); }
.ficha.pareja.g2 { background: var(--verde2); border-color: var(--verde); }
.ficha.pareja.g3 { background: #f0e4ff; border-color: var(--lila); }
.ficha.pareja.g4 { background: var(--rojo2); border-color: var(--rojo); }
.ficha.deshacer { min-width: 0; color: var(--suave); }
.ayuda-fichas { text-align: center; font-size: 15px; color: var(--suave); margin: 0 0 6px; }

/* Final */
.final { text-align: center; }
.estr-gr .stars { font-size: 48px; }
.tiempo { font-size: 44px; font-weight: 900; color: var(--cielo); margin: 0; }
.chispa { position: absolute; pointer-events: none; font-size: 22px; animation: chispa 1s ease-out forwards; z-index: 50; }
@keyframes chispa { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; } }

/* Progreso */
.resumen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.dato { background: var(--papel); border-radius: var(--r); padding: 14px; text-align: center; box-shadow: var(--sombra); }
.dato b { display: block; font-size: 32px; color: var(--oro); }
.dato span { font-size: 14px; font-weight: 700; color: var(--suave); }
.tabla-prog { width: 100%; border-collapse: collapse; background: var(--papel); border-radius: var(--r); overflow: hidden; box-shadow: var(--sombra); font-size: 15px; }
.tabla-prog th, .tabla-prog td { padding: 8px; text-align: center; border-bottom: 1px solid #f0e8da; }
.tabla-prog td:first-child { text-align: left; font-weight: 700; }
.tabla-prog .stars { font-size: 14px; letter-spacing: 0; }

/* Preguntas de elegir */
.opciones { display: flex; gap: 14px; justify-content: center; margin: 12px 0; padding: 6px; border-radius: 16px; }
.opciones .opc { font-size: 26px; min-width: 120px; }
.opciones .opc.elegida { background: var(--oro2); }
.opciones.bien .opc.elegida { background: var(--verde2); }
.opciones.mal { animation: temblor .4s; }
.opciones.mal .opc.elegida { background: var(--rojo2); }
.barra-res { color: var(--oro); font-weight: 900; padding: 0 4px; }

[hidden] { display: none !important; }

/* Dos casillas (cociente y resto) */
.respuesta.doble { place-items: stretch; text-align: center; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border: 0; background: none; min-height: 0; }
.campo { border: 3px solid var(--oro2); border-radius: 16px; background: #fffaf0; padding: 4px 6px 8px; cursor: pointer; line-height: 1.1; }
.campo small { display: block; font-size: 14px; font-weight: 800; color: var(--suave); }
.campo.act { border-color: var(--oro); box-shadow: 0 0 0 3px var(--oro2); }
.respuesta.doble.bien .campo { border-color: var(--verde); background: var(--verde2); }
.respuesta.doble.mal .campo { border-color: var(--rojo); background: var(--rojo2); }
.rueda { font-size: 30px; font-weight: 900; letter-spacing: 6px; text-align: center; color: var(--cielo); }

/* Lecturas */
.lect-t { font-size: 19px; min-height: 260px; }
.lect-t h2 { color: var(--oro); font-size: 26px; }
.lect-t .destacado { background: var(--cielo2); border-radius: 14px; padding: 10px 14px; font-weight: 700; }
.lect-t .cita { border-left: 5px solid var(--oro); padding: 4px 14px; font-style: italic; background: #fff8e3; border-radius: 0 12px 12px 0; }
.lect-t .verdad { background: var(--rojo2); border-radius: 14px; padding: 10px 14px 10px 30px; }
.lect-t table { border-collapse: collapse; margin: 8px 0; }
.lect-t td { padding: 3px 12px; border-bottom: 1px dashed #e6dccb; }
.lect-t .romanos { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 14px; justify-content: start; font-weight: 800; }
.lectura .puntos i[title] { width: auto; height: auto; background: none; font-style: normal; font-weight: 900; color: var(--suave); font-size: 13px; }
.opc-lista { display: grid; gap: 10px; margin-top: 10px; }
.opc-lista .opc { text-align: left; font-weight: 700; font-size: 18px; }
.opc-lista .opc.acierto { background: var(--verde2); box-shadow: 0 4px 0 #9fd3b0; }
.opc-lista .opc.fallo { background: var(--rojo2); opacity: .7; }

/* Max */
.max-img { border-radius: 50%; object-fit: cover; box-shadow: 0 6px 18px rgba(80,60,30,.18); border: 4px solid #fff; background: #fff; }
.max-hola { display: flex; align-items: center; gap: 14px; justify-content: center; max-width: 600px; margin: 16px auto; }
.max-hola .max-img { width: 110px; height: 110px; flex: 0 0 auto; animation: flotar 3s ease-in-out infinite; }
.bocadillo { position: relative; background: var(--papel); border-radius: 18px; padding: 12px 16px; font-size: 19px; font-weight: 700; text-align: left; box-shadow: var(--sombra); margin: 0; }
.bocadillo::before { content: ""; position: absolute; left: -10px; top: 50%; border: 10px solid transparent; border-right-color: var(--papel); border-left: 0; transform: translateY(-50%); }
.max-dice { display: flex; gap: 12px; align-items: flex-start; }
.max-dice .max-img { width: 84px; height: 84px; flex: 0 0 auto; margin-top: 6px; }
.max-dice .tarjeta { flex: 1; }
.max-img.mini { width: 54px; height: 54px; flex: 0 0 auto; border-width: 3px; }
.max-img.grande { width: 120px; height: 120px; display: block; margin: 0 auto 8px; animation: saltito .6s ease-out; }
.max-img.flota { float: right; margin-left: 10px; }
.pista { display: flex; gap: 10px; align-items: center; }
.explica { display: flex; gap: 10px; align-items: flex-start; background: #fff6d8; border-radius: 14px; padding: 10px 14px; text-align: left; margin: 8px 0; animation: explicaAparece .35s; }
.explica .pasos { margin: 4px 0; }
.explica-tit { margin: 6px 0 0; font-weight: 800; }
.explica-tu { margin: 6px 0 0; font-weight: 900; color: var(--verde); font-size: 18px; }
.rima { margin: 0; font-weight: 900; font-size: 18px; line-height: 1.35; color: #6b3fb5; background: linear-gradient(90deg, #f3eaff, #fff1d6); border-radius: 12px; padding: 8px 12px; animation: rimaLatido 2.4s ease-in-out infinite; }
.rima-carta { text-align: center; }
.rima-carta .rima { font-size: 21px; }
.intro-rima { margin: 10px auto 0; max-width: 520px; }
@keyframes rimaLatido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes explicaAparece { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rima, .explica { animation: none; } }
@keyframes flotar { 50% { transform: translateY(-6px); } }
@keyframes saltito { 0% { transform: scale(.6); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
@media (max-width: 480px) { .max-dice .max-img { width: 60px; height: 60px; } .max-hola .max-img { width: 84px; height: 84px; } .bocadillo { font-size: 17px; } }

/* Sonido, racha, carteles, récord */
#btnSonido { position: fixed; right: 12px; bottom: 12px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--papel); box-shadow: var(--sombra); font-size: 20px; cursor: pointer; }
.racha { color: var(--rojo); font-weight: 900; margin-left: 6px; }
.marcador b.pasado { color: var(--rojo); }
.cartel { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 60; background: linear-gradient(90deg, #f6c64f, #ef8d6b); color: #fff; font-weight: 900; font-size: 26px; padding: 10px 26px; border-radius: 99px; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: cartel 1.6s ease-out forwards; pointer-events: none; white-space: nowrap; }
@keyframes cartel { 0% { opacity: 0; transform: translate(-50%, -14px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.06); } 25% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -10px); } }
.nuevo-rec { font-weight: 900; color: var(--verde); font-size: 20px; }
body.jugando #btnSonido { display: none; }

/* Pizarra animada */
.pz-marco { display: flex; justify-content: center; overflow: hidden; margin: 6px auto 0;
  background: radial-gradient(circle at 50% 0%, #fffaf0, #f7eedd); border-radius: 18px; padding-top: 4px; }
.pz { position: relative; flex: 0 0 auto; transform-origin: top center; }
.pz-svg { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.pz-it { position: absolute; height: 44px; display: grid; place-items: center; border-radius: 12px; font-weight: 900; font-size: 28px;
  background: #fff; color: var(--tinta); box-shadow: 0 3px 0 #e6dccb; font-variant-numeric: tabular-nums; white-space: nowrap;
  transition: left .55s cubic-bezier(.3,1.35,.5,1), top .55s cubic-bezier(.3,1.35,.5,1), width .4s, opacity .4s, transform .4s, background .3s, color .3s; }
.pz-it.nace { opacity: 0; transform: scale(.4); }
.pz-it.sale { opacity: 0; transform: scale(.5); }
.pz-it.chip { font-size: 23px; padding: 0 8px; }
.pz-it.dos { font-size: 20px; letter-spacing: -1px; }
.pz-it.peq { font-size: 17px; }
.pz-it.sig { background: none; box-shadow: none; color: var(--suave); }
.pz-it.raya { height: 4px; background: var(--tinta); box-shadow: none; border-radius: 2px; }
.pz-it.sel { background: var(--oro2); transform: translateY(-3px); }
.pz-it.ca { background: #ffe7a3; color: #7a5200; box-shadow: 0 3px 0 #e0b84f; }
.pz-it.cb { background: #cfe7fb; color: #1f5f99; box-shadow: 0 3px 0 #8fc0ea; }
.pz-it.cc { background: #d6f1df; color: #23643c; box-shadow: 0 3px 0 #92cfa7; }
.pz-it.ok { background: var(--verde); color: #fff; box-shadow: 0 3px 0 #34844f; }
.pz-it.mal { background: var(--rojo); color: #fff; box-shadow: 0 3px 0 #a8432f; }
.pz-it.tachado { opacity: .35; text-decoration: line-through; text-decoration-thickness: 4px; text-decoration-color: var(--rojo); }
.pz-it.rueda { border-radius: 50%; background: #fff8e3; }
.pz-it.rueda.ca { background: #ffe7a3; color: #7a5200; } .pz-it.rueda.cb { background: #cfe7fb; color: #1f5f99; }
.pz-l { stroke: var(--cielo); stroke-width: 4; fill: none; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: trazo .7s ease-out forwards; }
.pz-l.ca { stroke: #e0a92a; } .pz-l.cb { stroke: #4a95d6; } .pz-l.cc { stroke: #4fae73; }
@keyframes trazo { to { stroke-dashoffset: 0; } }
.pz-txt { text-align: center; font-weight: 800; font-size: 19px; min-height: 2.6em; margin: 12px 0 6px; }
.pz-bot { display: flex; gap: 8px; justify-content: center; }
.pz-bot .btn:disabled { opacity: .4; }
.pasos-txt { margin-top: 10px; color: var(--suave); }
.pasos-txt summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.con-max { font-size: .55em; }

/* Cinturones y examen */
.cinto { display: inline-block; position: relative; width: 46px; height: 14px; border-radius: 4px; background: var(--c); vertical-align: middle; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.cinto i { position: absolute; left: 50%; top: -5px; width: 14px; height: 24px; margin-left: -7px; background: var(--c); border-radius: 4px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 0 0 2px rgba(255,255,255,.5); }
.cinto i::before, .cinto i::after { content: ""; position: absolute; top: 18px; width: 8px; height: 16px; background: var(--c); border-radius: 0 0 3px 3px; }
.cinto i::before { left: -4px; transform: rotate(18deg); } .cinto i::after { right: -4px; transform: rotate(-18deg); }
.cinto.grande { width: 150px; height: 34px; margin: 20px auto 30px; display: block; animation: saltito .7s ease-out; }
.cinto.grande i { width: 34px; height: 54px; margin-left: -17px; top: -10px; }
.cinto.grande i::before, .cinto.grande i::after { top: 42px; width: 16px; height: 34px; }
.examen-btn { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 14px; border-radius: 14px; text-decoration: none; font-weight: 900;
  background: linear-gradient(90deg, #fff4d1, #ffe2b8); border: 2px solid var(--oro); }
.examen-btn small { width: 100%; font-weight: 700; color: var(--suave); }
.examen-btn.cerrado { opacity: .6; border-style: dashed; }
a.examen-btn:hover { transform: translateY(-2px); }
.truco-preg { text-align: center; font-weight: 900; color: var(--oro); margin: 4px 0 8px; }
.repasa a { font-weight: 800; }
.cintos-fila { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cinto-caja { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 10px 8px; background: var(--papel); border-radius: 14px; box-shadow: var(--sombra); text-decoration: none; min-width: 74px; }
.cinto-caja.apagado .cinto { filter: grayscale(1); opacity: .3; }
.cinto-caja small { font-weight: 800; color: var(--suave); }

/* Diploma */
.dip-form { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; font-weight: 800; }
.dip-form input { font: inherit; font-size: 24px; padding: 10px 16px; border-radius: 14px; border: 3px solid var(--oro2); width: min(100%, 420px); text-align: center; }
.dip-form input.falta { border-color: var(--rojo); animation: temblor .4s; }
.dip-wrap { margin: 10px auto 30px; max-width: 900px; }
.dip-wrap.bloq { opacity: .55; filter: saturate(.6); pointer-events: none; }
.diploma { container-type: inline-size; aspect-ratio: 297 / 210; width: 100%; background: radial-gradient(circle at 50% 30%, #fffdf6, #fbefd2); border-radius: 8px; box-shadow: var(--sombra); padding: 2.2cqw; color: #4a3720; }
.dip-borde { height: 100%; border: .55cqw double #c99a2e; outline: .25cqw solid #e7c56a; outline-offset: -1.4cqw; border-radius: 1cqw; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2cqw 4cqw; position: relative; }
.dip-max { position: absolute; top: 2.4cqw; right: 3cqw; width: 12cqw !important; height: 12cqw !important; border-width: .5cqw !important; }
.dip-sup { margin: 0; font-weight: 900; letter-spacing: .4cqw; text-transform: uppercase; color: #c08b1a; font-size: 1.8cqw; }
.dip-tit { font-size: 5.6cqw; margin: .6cqw 0 1cqw; font-weight: 900; background: linear-gradient(90deg, #a8740f, #e7b53c, #a8740f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dip-txt { margin: .4cqw 0; font-size: 2cqw; }
.dip-nombre { font-family: 'Dancing Script', 'Brush Script MT', cursive; font-size: 6cqw; margin: .4cqw 0; color: #2f5f9e; border-bottom: .2cqw solid #d9b860; min-width: 50cqw; line-height: 1.2; }
.dip-cintos { display: flex; gap: 2cqw; margin: 1.8cqw 0 2cqw; justify-content: center; }
.dip-cintos div { display: flex; flex-direction: column; align-items: center; gap: 1.2cqw; width: 11cqw; }
.dip-cintos .cinto { width: 6cqw; height: 1.8cqw; }
.dip-cintos .cinto i { width: 1.8cqw; height: 3cqw; margin-left: -.9cqw; top: -.6cqw; }
.dip-cintos .cinto i::before, .dip-cintos .cinto i::after { top: 2.3cqw; width: 1cqw; height: 2cqw; }
.dip-cintos small { font-size: 1.2cqw; font-weight: 700; line-height: 1.2; }
.dip-pie { display: flex; justify-content: space-between; width: 100%; gap: 3cqw; margin-top: .5cqw; }
.dip-pie div { flex: 1; display: flex; flex-direction: column; align-items: center; border-top: .15cqw solid #c9a557; padding-top: .6cqw; }
.dip-pie small { font-size: 1.2cqw; }
.firma { font-family: 'Dancing Script', 'Brush Script MT', cursive; font-size: 3cqw; color: #2f5f9e; line-height: 1; margin-top: -3.4cqw; }
.dip-fecha { font-size: 1.8cqw; font-weight: 800; margin-top: -2.6cqw; }
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: #fff !important; }
  body * { visibility: hidden; }
  #diploma, #diploma * { visibility: visible; }
  #diploma { position: fixed; left: 0; top: 0; width: 281mm; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* ajustes diploma */
.dip-cintos div { gap: 3.4cqw; }
.dip-cintos { margin: 1.2cqw 0 1.6cqw; }
.dip-pie div { border-top: 0; padding-top: 0; justify-content: flex-end; }
.dip-pie small { border-top: .15cqw solid #c9a557; padding-top: .5cqw; width: 100%; }
.firma { margin-top: 0; margin-bottom: .3cqw; }
.dip-fecha { margin-top: 0; margin-bottom: .5cqw; }

/* El camino por mundos */
.mundo { position: relative; margin: 22px 0; border-radius: 26px; overflow: hidden; box-shadow: var(--sombra);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, #fffdf8) 0, #fffdf8 260px, color-mix(in srgb, var(--c) 10%, #fffdf8) 100%); }
.mundo-cab { display: flex; align-items: center; gap: 14px; padding: 14px 16px 0; }
.mundo-cab img { width: 96px; height: 96px; object-fit: cover; border-radius: 20px; border: 4px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.mundo-cab span { font-weight: 900; text-transform: uppercase; letter-spacing: 1px; font-size: 14px; color: var(--c); filter: brightness(.85); }
.mundo-cab h2 { margin: 0; font-size: 26px; }
.camino { position: relative; margin: 0 8px; }
.camino svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.via, .via-hecha, .via-linea { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.via { stroke: #eadcbd; stroke-width: 18; }
.via-hecha { stroke: var(--c); stroke-width: 18; opacity: .75; }
.via-linea { stroke: #fff; stroke-width: 3; stroke-dasharray: 3 12; opacity: .9; }
.nodo { position: absolute; transform: translate(-50%, -36px); width: 150px; display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--tinta); z-index: 1; }
.bola { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 28px; background: #fff;
  border: 5px solid var(--c); box-shadow: 0 6px 0 rgba(0,0,0,.13); transition: transform .15s; }
a.nodo:hover .bola { transform: translateY(-3px) scale(1.05); }
.nodo.hecho .bola { background: var(--c); color: #fff; }
.nodo.hecho:not(.examen):not(.lect) .bola::after { content: "✓"; position: absolute; margin: 0 0 -46px 46px; width: 24px; height: 24px; border-radius: 50%; background: var(--verde); color: #fff; font-size: 15px; display: grid; place-items: center; border: 2px solid #fff; }
.nodo.cerrado .bola { background: #f1ece4; border-color: #d9cfbf; color: #b5a993; font-size: 24px; box-shadow: 0 6px 0 rgba(0,0,0,.06); }
.nodo.cerrado .nodo-t { opacity: .6; }
.nodo.actual .bola { animation: latido 1.5s ease-in-out infinite; }
@keyframes latido { 50% { transform: scale(1.09); box-shadow: 0 6px 0 rgba(0,0,0,.13), 0 0 0 10px color-mix(in srgb, var(--c) 30%, transparent); } }
.nodo.examen .bola { width: 84px; height: 84px; border-style: dashed; background: #fff4d1; font-size: 32px; }
.nodo.examen.hecho .bola { border-style: solid; background: #fff; }
.nodo.examen .cinto { transform: scale(.9); }
.nodo.lect .bola { font-size: 30px; }
.nodo-t { margin-top: 8px; font-weight: 800; font-size: 14px; line-height: 1.15; text-align: center; background: rgba(255,255,255,.9); padding: 3px 9px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.nodo-st { display: block; color: #c08b1a; font-size: 13px; }
.aqui { position: absolute; top: 4px; left: calc(50% + 42px); display: flex; align-items: center; gap: 4px; animation: flotar 2.2s ease-in-out infinite; z-index: 2; }
.aqui.izq { left: auto; right: calc(50% + 42px); flex-direction: row-reverse; }
.aqui .max-img.mini { width: 50px; height: 50px; }
.aqui b { background: var(--oro); color: #fff; padding: 3px 10px; border-radius: 99px; font-size: 14px; white-space: nowrap; box-shadow: 0 3px 0 #c7951f; }
@media (max-width: 480px) {
  .nodo { width: 118px; } .nodo-t { font-size: 12.5px; padding: 2px 6px; }
  .bola { width: 62px; height: 62px; font-size: 24px; } .nodo.examen .bola { width: 72px; height: 72px; }
  .aqui .max-img.mini { width: 40px; height: 40px; } .aqui b { font-size: 12px; padding: 2px 7px; }
  .mundo-cab img { width: 70px; height: 70px; } .mundo-cab h2 { font-size: 21px; }
}
.libre { display: flex; gap: 10px; align-items: flex-start; background: var(--papel); border-radius: 14px; padding: 12px 14px; margin: 16px 0 6px; box-shadow: var(--sombra); cursor: pointer; }
.libre input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--oro); }
.bola { position: relative; }
.nodo.hecho:not(.examen):not(.lect) .bola::after { margin: 0; right: -6px; bottom: -4px; }

/* ===== Capa de videojuego ===== */
.hud { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin: -16px -16px 8px;
  background: rgba(255,253,248,.92); backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(80,60,30,.10); }
.hud a { text-decoration: none; }
.hud-yo { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.hud-yo .max-img.mini { width: 44px; height: 44px; }
.hud-nv { display: flex; flex-direction: column; min-width: 0; flex: 1; max-width: 230px; }
.hud-nv b { font-size: 16px; line-height: 1.1; }
.hud-nv small { font-size: 12px; color: var(--suave); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-barra { display: block; height: 8px; border-radius: 99px; background: #eadfca; margin-top: 3px; overflow: hidden; }
.hud-barra i { display: block; height: 100%; background: linear-gradient(90deg, #f6c64f, #ef8d6b); border-radius: 99px; }
.hud-p { background: var(--papel); border-radius: 99px; padding: 6px 10px; font-weight: 900; font-size: 15px; box-shadow: 0 2px 8px rgba(0,0,0,.08); white-space: nowrap; }
.xp-flota { position: absolute; z-index: 70; transform: translateX(-50%); font-weight: 900; font-size: 22px; color: #e0a92a; text-shadow: 0 2px 0 #fff, 0 0 8px #fff; pointer-events: none; animation: xpsube 1.3s ease-out forwards; }
@keyframes xpsube { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); } 20% { opacity: 1; transform: translate(-50%, -10px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -70px); } }
.xp-total { font-size: 22px; font-weight: 900; color: #d39a17; margin: 4px 0; }
.cartel { white-space: normal; text-align: center; max-width: 92vw; font-size: 22px; line-height: 1.2; }

/* Ronda dorada y cofres */
.ejercicio.dorada { background: linear-gradient(160deg, #fff6d6, #ffe7a3); box-shadow: 0 0 0 4px #f6c64f, 0 10px 30px rgba(230,170,40,.35); }
.dorada-et { text-align: center; font-weight: 900; color: #b07c06; margin: 0 0 4px; animation: latidoT 1.2s ease-in-out infinite; }
@keyframes latidoT { 50% { transform: scale(1.06); } }
.cofre-flota { position: fixed; right: 14px; top: 90px; z-index: 50; border: 0; background: #fff; border-radius: 20px; padding: 8px 10px 6px; font-size: 40px; line-height: 1;
  box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 0 0 4px #f6c64f; cursor: pointer; animation: cofre 1s ease-in-out infinite; display: flex; flex-direction: column; align-items: center; }
.cofre-flota small { font-size: 12px; font-weight: 900; color: #b07c06; }
@keyframes cofre { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.08); } }
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(40,30,20,.45); display: grid; place-items: center; padding: 16px; animation: aparece .3s; }
@keyframes aparece { from { opacity: 0; } }
.modal-c { max-width: 380px; text-align: center; animation: saltito .5s ease-out; }
.cofre-grande { font-size: 90px; border: 0; background: none; cursor: pointer; animation: cofre 1s ease-in-out infinite; line-height: 1.1; }
.cofre-grande.abierto { animation: saltito .5s; }

/* Mapa de abajo arriba, más grande */
.cielo-final { text-align: center; font-weight: 800; background: linear-gradient(180deg, #fdf3d4, transparent); border-radius: 20px; padding: 14px; margin-top: 8px; }
.mapa-juego { display: flex; flex-direction: column; }
.mundo { display: flex; flex-direction: column; margin: 14px 0; }
.camino { margin: 0 4px; }
.via { stroke-width: 26; } .via-hecha { stroke-width: 26; } .via-linea { stroke-width: 4; stroke-dasharray: 4 14; }
.nodo { transform: translate(-50%, -46px); width: 170px; }
.bola { width: 92px; height: 92px; font-size: 36px; border-width: 6px; box-shadow: 0 8px 0 rgba(0,0,0,.14); }
.nodo.examen .bola { width: 104px; height: 104px; font-size: 40px; }
.nodo.examen .cinto { transform: scale(1.15); }
.nodo.lect .bola { font-size: 38px; }
.nodo-t { font-size: 15px; }
.nodo.hecho:not(.examen):not(.lect) .bola::after { width: 30px; height: 30px; font-size: 18px; }
.aqui { top: 8px; left: calc(50% + 52px); }
.aqui.izq { right: calc(50% + 52px); }
.aqui .max-img.mini { width: 60px; height: 60px; }
.aqui b { font-size: 16px; }
.mundo-cab { position: relative; height: 180px; padding: 0; overflow: hidden; display: block; }
.mundo-cab img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; box-shadow: none; object-fit: cover; object-position: center 30%; }
.mundo-cab::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 10%, color-mix(in srgb, var(--c) 75%, #000) 100%); }
.mundo-tit { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 1; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.45); }
.mundo-tit span { color: #fff; filter: none; font-size: 15px; letter-spacing: 2px; }
.mundo-tit h2 { font-size: 30px; color: #fff; margin: 2px 0; }
.mundo-tit small { font-weight: 800; font-size: 14px; opacity: .95; }
.inicio-camino { background: var(--papel); border-radius: 26px; box-shadow: var(--sombra); padding: 16px 12px 22px; margin-top: 10px; }
.inicio-flecha { font-weight: 900; color: var(--oro); margin: 0 0 4px; animation: flotar 1.6s ease-in-out infinite; }
@media (max-width: 480px) {
  .nodo { width: 128px; } .bola { width: 78px; height: 78px; font-size: 30px; } .nodo.examen .bola { width: 88px; height: 88px; }
  .nodo-t { font-size: 13px; } .aqui { left: calc(50% + 44px); } .aqui.izq { right: calc(50% + 44px); } .aqui .max-img.mini { width: 46px; height: 46px; }
  .mundo-cab { height: 150px; } .mundo-tit h2 { font-size: 24px; }
  .hud-p { padding: 5px 8px; font-size: 14px; } .hud-nv small { display: none; }
}

/* Noche */
body.noche { background: radial-gradient(circle at 20% 0%, #2c3a6b 0, transparent 45%), linear-gradient(180deg, #1b2547, #2b2f55 60%, #3b3560); }
body.noche .mundo { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 30%, #26305a), #2a3160); }
body.noche .mundo::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(2px 2px at 20% 15%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 30%, #fff, transparent), radial-gradient(2px 2px at 40% 60%, #fff9, transparent), radial-gradient(1.5px 1.5px at 85% 75%, #fff, transparent), radial-gradient(2px 2px at 10% 85%, #fffa, transparent); }
body.noche .via { stroke: #4a4f7a; }
body.noche .cielo-final, body.noche .pie, body.noche .intro { color: #e8e4f5; }
body.noche .cielo-final { background: linear-gradient(180deg, #3a3f72, transparent); }

/* Tesoros */
.seccion { margin: 22px 0 6px; } .seccion small { color: var(--suave); font-size: 16px; }
.poderes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.poder { background: linear-gradient(160deg, #fffaf0, #fdf0cf); border: 3px solid var(--oro); border-radius: 18px; padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--sombra); }
.poder.bloq { filter: grayscale(1); opacity: .55; border-style: dashed; }
.poder-ic { font-size: 44px; } .poder b { font-size: 17px; line-height: 1.2; } .poder .sk { font-size: 13px; color: #8a5d00; font-weight: 800; }
.poder p { font-size: 14px; margin: 4px 0; } .poder-dom { color: var(--oro); letter-spacing: 2px; } .poder-dom i { font-style: normal; color: #e6dccb; }
.poder-caps { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.poder-caps a { font-size: 12px; font-weight: 900; background: #fff; border-radius: 99px; padding: 1px 7px; text-decoration: none; }
.medallas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.medalla { background: var(--papel); border-radius: 16px; padding: 12px; text-align: center; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--sombra); }
.medalla span { font-size: 38px; } .medalla small { font-size: 13px; color: var(--suave); }
.medalla.bloq { opacity: .45; filter: grayscale(1); }
.tarjeta.yo { display: flex; gap: 12px; align-items: center; } .tarjeta.yo small { display: block; color: var(--suave); font-weight: 700; }

/* ===== Burbujas ===== */
.burbujas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding: 14px 4px 6px; min-height: 150px; }
.burbuja { --t: 2.6s; font: inherit; font-size: 26px; font-weight: 900; color: #1f5f99; min-width: 104px; height: 104px; padding: 0 12px; border-radius: 50%; cursor: pointer;
  border: 0; background: radial-gradient(circle at 32% 28%, #fff 0 12%, #e3f3ff 26%, #a9d8fb 70%, #7cc0f2 100%);
  box-shadow: inset -6px -8px 14px rgba(40,110,170,.25), 0 8px 18px rgba(60,130,190,.25); animation: flota var(--t) ease-in-out var(--d) infinite; transition: transform .15s; }
.burbuja:nth-child(2) { --t: 3.1s; } .burbuja:nth-child(3) { --t: 2.8s; } .burbuja:nth-child(4) { --t: 3.4s; }
.burbuja:active { transform: scale(.92); }
@keyframes flota { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.burbuja.pinchada { animation: pincha .45s forwards; pointer-events: none; }
@keyframes pincha { 40% { transform: scale(1.25); opacity: .8; background: radial-gradient(circle, #fbe1dc, #ef8d6b); } 100% { transform: scale(0); opacity: 0; } }
.burbujas.bien .burbuja.tocada { animation: none; background: radial-gradient(circle at 32% 28%, #fff 0 12%, #d6f1df 30%, #4fae73 100%); color: #fff; transform: scale(1.15); }
.burbujas.bien .burbuja:not(.tocada) { opacity: .25; }
.burbujas.mal { animation: none; }
@media (max-width: 480px) { .burbuja { min-width: 88px; height: 88px; font-size: 22px; } .burbujas { gap: 10px; } }

/* ===== Arcade ===== */
.arcade-btn { position: absolute; top: 12px; right: 12px; z-index: 2; background: #fff; color: var(--tinta); text-decoration: none; font-weight: 900; padding: 8px 14px; border-radius: 99px;
  box-shadow: 0 4px 0 rgba(0,0,0,.18); animation: latidoT 2s ease-in-out infinite; }
.arcade-cab { margin-top: 12px; }
.juegos-arcade { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 16px 0; }
.juego-a { display: flex; flex-direction: column; gap: 6px; text-decoration: none; background: var(--papel); border-radius: 22px; padding: 18px; box-shadow: var(--sombra); border-bottom: 6px solid var(--c); transition: transform .15s; }
.juego-a:hover { transform: translateY(-4px); }
.juego-a span { font-size: 54px; } .juego-a b { font-size: 22px; } .juego-a small { color: var(--suave); font-weight: 700; } .juego-a em { font-style: normal; font-weight: 900; color: #c08b1a; }
.opc-arcade { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 10px 0; }
.opc-arcade .opa { font-size: 22px; padding: 14px 8px; }
.opa.ok { background: var(--verde) !important; color: #fff !important; box-shadow: 0 4px 0 #34844f !important; }
.opa.mal { background: var(--rojo) !important; color: #fff !important; }
.arena { position: relative; height: min(58vh, 460px); border-radius: 24px; overflow: hidden; margin-top: 10px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 35%, #dff0ff), #fffaf0); box-shadow: inset 0 0 0 3px rgba(255,255,255,.6), var(--sombra); }
.suelo { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: repeating-linear-gradient(90deg, #8fc79e 0 14px, #7ab98a 14px 28px); }
.gota { position: absolute; top: 0; max-width: 62%; background: #fff; border-radius: 20px 20px 20px 6px; padding: 10px 16px; font-weight: 900; font-size: 22px; box-shadow: 0 6px 16px rgba(0,0,0,.15); border: 3px solid var(--c); }
.gota.prisa { border-color: var(--rojo); animation: temblor .5s infinite; }
.gota.explota { animation: pincha .45s forwards; }
.gota.rota { background: var(--rojo2); }
.pista-carrera { position: relative; background: linear-gradient(180deg, #9fd3a9, #7fbf8c); border-radius: 22px; padding: 14px 54px 14px 10px; margin: 12px 0; box-shadow: var(--sombra); }
.carril { position: relative; height: 62px; background: repeating-linear-gradient(90deg, #c8a77a 0 30px, #bf9d70 30px 60px); border-radius: 12px; margin: 8px 0; }
.corredor { position: absolute; left: 0; top: 4px; display: flex; flex-direction: column; align-items: center; font-size: 34px; line-height: 1; transition: left .5s cubic-bezier(.3,1.4,.5,1); }
.corredor small { font-size: 12px; font-weight: 900; background: #fff; border-radius: 99px; padding: 0 6px; }
.corredor .max-img.mini { width: 40px; height: 40px; border-width: 2px; }
.meta { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 36px; }
.duelo { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; min-height: calc(100vh - 90px); }
.lado { background: var(--papel); border-radius: 22px; padding: 12px; box-shadow: var(--sombra); display: flex; flex-direction: column; justify-content: center; border: 4px solid transparent; transition: .2s; }
.lado0 { border-color: #5aa9e6; } .lado1 { border-color: #ef8d6b; }
@media (pointer: coarse) { .lado0 { transform: rotate(180deg); } }
.lado-cab { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
.lado-pts { font-size: 36px; font-weight: 900; }
.lado .preg { text-align: center; font-size: 24px; margin: 6px 0; }
.lado.gana { background: var(--verde2); } .lado.bloq { background: var(--rojo2); opacity: .7; }

/* La regla al fallar */
.regla { display: flex; gap: 10px; align-items: center; text-align: left; background: #fff6d8; border-radius: 16px; padding: 10px 12px; box-shadow: var(--sombra); }
.regla b { display: block; font-size: 20px; color: var(--verde); }
.regla span { font-weight: 700; }
.regla-caja { position: absolute; left: 10px; right: 10px; bottom: 34px; z-index: 3; display: flex; flex-direction: column; gap: 10px; align-items: center; animation: saltito .4s ease-out; }
.regla-caja .regla { width: 100%; }
.regla-mini { margin-top: 8px; background: #fff6d8; border-radius: 12px; padding: 6px 10px; font-weight: 700; font-size: 15px; }

/* ===== Historia ===== */
.vineta { max-width: 420px; text-align: center; border-top: 8px solid var(--c); animation: saltito .45s ease-out; }
.vin-mundo { font-weight: 900; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--suave); }
.vin-ic { font-size: 96px; line-height: 1.1; margin: 10px 0; animation: flotar 2.4s ease-in-out infinite; }
.vin-ic .max-img.grande { margin: 0 auto; }
.vin-txt { font-size: 21px; font-weight: 700; line-height: 1.4; min-height: 4.2em; }
.vin-puntos { display: flex; gap: 6px; justify-content: center; margin: 6px 0 4px; }
.vin-puntos i { width: 10px; height: 10px; border-radius: 50%; background: #e6dccb; } .vin-puntos i.on { background: var(--c); transform: scale(1.3); }
.historia-btn { position: absolute; top: 12px; left: 12px; z-index: 2; font: inherit; font-weight: 900; background: #fff; border: 0; padding: 8px 14px; border-radius: 99px; box-shadow: 0 4px 0 rgba(0,0,0,.18); cursor: pointer; }
.guardian { display: flex; align-items: center; gap: 10px; background: var(--papel); border-radius: 18px; padding: 8px 14px; margin: 6px auto 10px; max-width: 420px; box-shadow: var(--sombra); }
.g-emo { font-size: 52px; line-height: 1; display: inline-block; }
.g-emo.alivio { animation: alivio .6s ease-out; }
@keyframes alivio { 30% { transform: scale(1.25) rotate(-10deg); } 60% { transform: scale(.95) rotate(8deg); } }
.g-info { flex: 1; } .g-info small { font-weight: 800; color: var(--suave); }
.g-lio { height: 14px; border-radius: 99px; background: #eadfca; overflow: hidden; margin-top: 4px; }
.g-lio i { display: block; height: 100%; background: repeating-linear-gradient(45deg, #b48be8 0 10px, #9b6fd8 10px 20px); border-radius: 99px; transition: width .6s ease-out; }
.g-dice { display: flex; gap: 10px; align-items: center; background: #fff6d8; border-radius: 16px; padding: 10px 14px; text-align: left; margin-bottom: 10px; }
.g-dice span { font-size: 46px; } .g-dice p { margin: 0; font-weight: 700; font-style: italic; }

/* ===== Max de cuerpo entero y guardianes ilustrados ===== */
.max-img { border-radius: 0; border: 0 !important; background: none; box-shadow: none; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(80,60,30,.22)); }
.max-img.mini { border-radius: 50%; border: 3px solid #fff !important; background: #fff8e6; object-fit: cover; filter: none; box-shadow: 0 3px 10px rgba(80,60,30,.2); }
.max-hola .max-img { width: 120px; height: 170px; border-radius: 0; }
.max-dice .max-img { width: 92px; height: 130px; margin-top: 0; }
.max-img.grande { width: 150px; height: 170px; }
.dip-max { width: 12cqw !important; height: 18cqw !important; top: 1.6cqw !important; }
.vin-ic .max-img.grande { width: 170px; height: 190px; }
@media (max-width: 480px) { .max-hola .max-img { width: 90px; height: 130px; } .max-dice .max-img { width: 64px; height: 92px; } }
.g-img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.2)); display: block; }
.g-img.vin { width: 190px; height: 190px; margin: 0 auto; }
.g-img.en-bola { width: 84%; height: 84%; }
.g-dice .g-img { width: 70px; height: 70px; }
.vin-ic { font-size: 96px; }

/* ===== Intro «la magia en 1 minuto» ===== */
.intro-magia { max-width: 560px; margin: 0 auto; min-height: calc(100vh - 40px); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 14px; padding: 30px 0; position: relative; }
.intro-salta { position: absolute; top: 0; right: 0; color: var(--suave); font-weight: 800; text-decoration: none; font-size: 15px; }
.intro-max { display: flex; align-items: center; gap: 12px; text-align: left; animation: saltito .45s ease-out; }
.intro-max .max-img { width: 120px; height: 180px; flex: 0 0 auto; }
.intro-max .bocadillo { font-size: 20px; }
.intro-max .bocadillo small { display: block; font-size: 15px; color: var(--suave); margin-top: 6px; }
.intro-et { font-weight: 900; color: var(--oro); text-transform: uppercase; letter-spacing: 1px; font-size: 14px; margin: 0; }
.intro-cuenta { font-size: clamp(48px, 13vw, 76px); font-weight: 900; margin: 0; line-height: 1; }
.intro-sub { margin: 0; color: var(--suave); font-weight: 700; }
.intro-pista { min-height: 1.4em; margin: 6px 0 0; font-weight: 800; font-size: 18px; color: var(--rojo); }
body.en-intro .intro-pista { color: #ffe08a; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.intro-magia #tec { width: 100%; max-width: 420px; }
.intro-magia #pz { width: 100%; }
.intro-h { font-size: 38px; margin: 0; }
.intro-dato { display: flex; align-items: center; gap: 14px; justify-content: center; }
.intro-dato > div:not(.flecha) { background: var(--papel); border-radius: 20px; padding: 14px 18px; box-shadow: var(--sombra); display: flex; flex-direction: column; min-width: 130px; }
.intro-dato b { font-size: 40px; font-weight: 900; } .intro-dato small { color: var(--suave); font-weight: 700; }
.intro-dato .ahora { background: var(--verde2); } .intro-dato .ahora b { color: var(--verde); }
.intro-dato .flecha { font-size: 34px; color: var(--oro); }
.intro-txt { font-size: 20px; margin: 0; }
.intro-bola { font-size: 120px; animation: cofre .5s ease-in-out infinite; }
.intro-secreta { font-size: 120px; font-weight: 900; margin: 0; line-height: 1; color: #8b5cc7; animation: saltito .6s ease-out; text-shadow: 0 6px 0 #e5d6fb; }
.magia-btn { margin: 6px 0 12px; }
@media (max-width: 480px) { .intro-max .max-img { width: 84px; height: 130px; } .intro-max .bocadillo { font-size: 17px; } .intro-dato > div:not(.flecha) { min-width: 100px; padding: 10px; } .intro-dato b { font-size: 30px; } }
.intro-max .max-img { width: 150px; height: 230px; }
.intro-max .bocadillo { font-size: 22px; }
@media (max-width: 480px) { .intro-max .max-img { width: 90px; height: 140px; } .intro-max .bocadillo { font-size: 17px; } }
body.noche .intro-sub, body.noche .intro-txt, body.noche .intro-h, body.noche .intro-cuenta { color: #f3eefc; }

/* ===== Intro nivel Dios ===== */
body.en-intro { background: radial-gradient(circle at 50% 15%, #4b3d8f 0, transparent 55%), radial-gradient(circle at 80% 90%, #8b4a7a 0, transparent 50%), linear-gradient(180deg, #1c1f45, #2c2560 60%, #3b2a5c); }
body.en-intro::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(2px 2px at 12% 18%, #fff, transparent), radial-gradient(1.6px 1.6px at 30% 62%, #fff, transparent), radial-gradient(2px 2px at 55% 12%, #ffe9a8, transparent),
    radial-gradient(1.4px 1.4px at 72% 40%, #fff, transparent), radial-gradient(2.2px 2.2px at 88% 70%, #ffe9a8, transparent), radial-gradient(1.5px 1.5px at 20% 85%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 65% 88%, #fff, transparent), radial-gradient(1.4px 1.4px at 45% 35%, #fff, transparent), radial-gradient(2px 2px at 92% 20%, #fff, transparent);
  animation: titila 3s ease-in-out infinite alternate; }
@keyframes titila { from { opacity: .45; } to { opacity: 1; } }
body.en-intro #app { position: relative; z-index: 1; }
body.en-intro .intro-et { color: #ffd76a; }
body.en-intro .intro-cuenta, body.en-intro .intro-h, body.en-intro .intro-txt, body.en-intro .intro-sub { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
body.en-intro .intro-cuenta { text-shadow: 0 0 24px rgba(255,215,106,.55); }
body.en-intro .intro-salta { color: #cfc6f2; }
body.en-intro .btn.grande { box-shadow: 0 4px 0 #c7951f, 0 0 26px rgba(246,198,79,.55); animation: latidoT 1.8s ease-in-out infinite; }
body.en-intro .respuesta { background: rgba(255,255,255,.95); }
.pal { opacity: 0; display: inline-block; animation: palabra .35s ease-out forwards; }
@keyframes palabra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cuenta-atras { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(20,16,50,.55); pointer-events: none; }
.cuenta-atras span { font-size: 160px; font-weight: 900; color: #ffd76a; text-shadow: 0 0 40px rgba(255,215,106,.8); animation: zoomCA .6s ease-out; }
@keyframes zoomCA { from { transform: scale(2.2); opacity: 0; } 40% { opacity: 1; } to { transform: scale(1); } }
.barras-dato { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; }
.bd { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; }
.bd span { width: 110px; text-align: right; font-size: 15px; }
.bd i { height: 22px; border-radius: 99px; background: linear-gradient(90deg, #ef8d6b, #d9604a); width: 0; animation: crece 1s .2s ease-out forwards; }
.bd.ahora i { background: linear-gradient(90deg, #8be0a6, #4fae73); }
@keyframes crece { to { width: var(--w); } }
.bola-cristal { position: relative; width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff 0 8%, #c9b8ff 30%, #7b5cd6 70%, #3c2a8a 100%); box-shadow: 0 0 60px rgba(180,140,255,.8), inset -12px -16px 30px rgba(30,10,80,.5); animation: latidoT 1.2s ease-in-out infinite; }
.bola-cristal span { font-size: 70px; opacity: .55; animation: girar 2.6s linear infinite; }
.bola-brillo { position: absolute; inset: -14px; border-radius: 50%; border: 3px dashed rgba(255,230,160,.6); animation: girar 6s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.lee-mente { font-size: 26px !important; font-weight: 900; }
.intro-secreta span { display: inline-grid; place-items: center; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle, #fff7d6, #ffd76a); color: #6b3fc0; box-shadow: 0 0 60px rgba(255,215,106,.9); text-shadow: none; animation: saltito .7s ease-out; }
