/* ===== Rutas de atención · Aula virtual de Juntos por Bogotá ===== */
:root {
  --azul: #1d1664; --azul-2: #2c2491; --morado: #7b2cbf; --morado-claro: #f1e8fb; --amarillo: #f6c90e; --oro: #f2b705;
  --texto: #1b1b2a; --gris: #5d5d72; --gris-2: #9a99ad; --borde: #e3e2ef; --fondo: #f5f4fb;
  --ok: #17a34a; --mal: #e5484d; --ruta: #1d1664;
  --rojo: #e21b3c; --azulk: #1368ce; --amarillok: #d89e00; --verdek: #26890c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Montserrat", Arial, sans-serif; color: var(--texto); background: var(--fondo); line-height: 1.5; min-height: 100vh; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--azul-2); }
[hidden] { display: none !important; }

/* ----- Encabezado ----- */
.cabeza { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)); background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--borde); }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--azul); font-weight: 800; font-size: 17px; }
.marca img { height: 34px; width: auto; }
.cabeza-der { display: flex; align-items: center; gap: 10px; }
.mis-puntos { font-size: 13px; font-weight: 700; color: var(--gris); }
.salida { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 9px 15px; background: #ffe9ea; color: #b4232b;
  font-weight: 800; font-size: 14px; }
.salida svg { width: 18px; height: 18px; }
.salida:hover { background: #ffd6d8; }
@media (max-width: 560px) { .marca span { display: none; } .mis-puntos { display: none; } }

main { max-width: 980px; margin: 0 auto; padding: 22px 16px 120px; }
.cargando { display: grid; place-items: center; min-height: 50vh; }
.cargando i { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--borde); border-top-color: var(--morado); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }

/* ----- Botones ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 16px; padding: 14px 24px; font-weight: 800; font-size: 16px;
  text-decoration: none; background: var(--azul); color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.22); transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.22); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ruta { background: var(--ruta); }
.btn-amarillo { background: var(--amarillo); color: var(--azul); box-shadow: 0 4px 0 #c79f00; }
.btn-claro { background: #fff; color: var(--azul); box-shadow: 0 4px 0 var(--borde); border: 2px solid var(--borde); }
.btn-ok { background: var(--ok); box-shadow: 0 4px 0 #0f7a35; }
.btn-mal { background: var(--mal); box-shadow: 0 4px 0 #b3262b; }
.btn-bloque { display: flex; width: 100%; }
.tarjeta { background: #fff; border-radius: 22px; padding: 22px; box-shadow: 0 2px 0 var(--borde), 0 8px 24px rgba(29,22,100,.05); border: 1px solid var(--borde); }
.estado { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 14px; display: none; }
.estado.error { display: block; background: #fdecea; color: #b42318; }
.estado.info { display: block; background: var(--morado-claro); color: var(--morado); }
input { width: 100%; padding: 14px; font: inherit; font-size: 16px; border: 2px solid var(--borde); border-radius: 14px; background: #fff; }
input:focus { outline: none; border-color: var(--morado); }
label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; }

/* ----- Ingresar ----- */
.ingreso { max-width: 440px; margin: 5vh auto 0; text-align: center; }
.ingreso h1 { color: var(--azul); font-size: 28px; margin: 18px 0 6px; }
.ingreso > p { color: var(--gris); margin: 0 0 20px; }
.ingreso form { text-align: left; }
.ingreso .btn { margin-top: 18px; }
.ingreso .abajo { margin-top: 16px; font-size: 14px; color: var(--gris); }
.ilustracion { width: 120px; height: 120px; margin: 0 auto; border-radius: 34px; background: linear-gradient(135deg, var(--morado), var(--azul)); display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(123,44,191,.35); transform: rotate(-6deg); }
.ilustracion svg { width: 64px; height: 64px; stroke: #fff; transform: rotate(6deg); }

/* ----- Inicio ----- */
.saludo { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.saludo h1 { margin: 0; color: var(--azul); font-size: clamp(24px, 4vw, 32px); line-height: 1.15; }
.saludo p { margin: 4px 0 0; color: var(--gris); }
.pin-caja { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: linear-gradient(120deg, var(--azul), var(--morado)); color: #fff; border: 0; margin-bottom: 26px; }
.pin-caja .icono-vivo { width: 50px; height: 50px; border-radius: 16px; background: rgba(255,255,255,.15); display: grid; place-items: center; flex: none; }
.pin-caja .icono-vivo i { width: 14px; height: 14px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 0 0 rgba(255,77,94,.7); animation: latido 1.6s infinite; }
@keyframes latido { 70% { box-shadow: 0 0 0 12px rgba(255,77,94,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,94,0); } }
.pin-caja div.txt { flex: 1 1 220px; }
.pin-caja b { font-size: 18px; display: block; }
.pin-caja span { opacity: .85; font-size: 14px; }
.pin-caja form { display: flex; gap: 8px; flex: 1 1 260px; }
.pin-caja input { border: 0; text-align: center; font-weight: 800; letter-spacing: 6px; font-size: 20px; }
.pin-caja .btn { flex: none; }
.titulo-sec { font-size: 19px; color: var(--azul); margin: 0 0 12px; }
.rutas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ruta-tarjeta { position: relative; display: flex; flex-direction: column; gap: 10px; text-align: left; border: 0; border-radius: 24px; padding: 22px; color: #fff; min-height: 210px;
  background: var(--ruta); box-shadow: 0 6px 0 rgba(0,0,0,.25); transition: transform .15s ease; overflow: hidden; }
.ruta-tarjeta::after { content: ""; position: absolute; width: 180px; height: 180px; right: -50px; top: -60px; border-radius: 50%; background: rgba(255,255,255,.1); }
.ruta-tarjeta:hover { transform: translateY(-3px); }
.ruta-tarjeta h3 { margin: 0; font-size: 21px; line-height: 1.2; position: relative; }
.ruta-tarjeta p { margin: 0; opacity: .9; font-size: 14px; flex: 1; position: relative; }
.ruta-tarjeta .avance { height: 12px; background: rgba(255,255,255,.25); border-radius: 99px; overflow: hidden; }
.ruta-tarjeta .avance i { display: block; height: 100%; background: var(--amarillo); border-radius: 99px; }
.ruta-tarjeta .pie { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.chip { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.2); align-self: flex-start; position: relative; }
.chip.oro { background: var(--amarillo); color: var(--azul); }
.vacio { text-align: center; color: var(--gris); padding: 30px 10px; }

/* ----- Mapa de la ruta (estilo camino) ----- */
.volver { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--gris); font-weight: 700; padding: 6px 0; margin-bottom: 8px; text-decoration: none; }
.mapa-cabeza { border-radius: 24px; padding: 22px; color: #fff; background: var(--ruta); box-shadow: 0 6px 0 rgba(0,0,0,.25); margin-bottom: 10px; }
.mapa-cabeza h1 { margin: 0 0 6px; font-size: clamp(22px, 4vw, 30px); line-height: 1.15; }
.mapa-cabeza p { margin: 0 0 14px; opacity: .9; }
.mapa-cabeza .avance { height: 14px; background: rgba(255,255,255,.25); border-radius: 99px; overflow: hidden; }
.mapa-cabeza .avance i { display: block; height: 100%; background: var(--amarillo); border-radius: 99px; transition: width .6s ease; }
.mapa-cabeza small { display: block; margin-top: 8px; font-weight: 700; font-size: 13px; }
.mapa { position: relative; margin: 0 auto; max-width: 420px; }
.mapa svg.camino { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nodo { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: 170px; }
.nodo button { width: 78px; height: 72px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--ruta); color: #fff;
  box-shadow: 0 7px 0 rgba(0,0,0,.28); transition: transform .1s, box-shadow .1s; position: relative; }
.nodo button:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(0,0,0,.28); }
.nodo button svg { width: 34px; height: 34px; }
.nodo.hecha button { background: var(--oro); box-shadow: 0 7px 0 #b88a00; }
.nodo.bloqueada button { background: #e4e3ee; color: #a9a8bd; box-shadow: 0 7px 0 #c9c8d8; cursor: not-allowed; }
.nodo.actual button::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 4px solid var(--ruta); opacity: .35; animation: anillo 1.8s ease-out infinite; }
@keyframes anillo { from { transform: scale(.9); opacity: .5; } to { transform: scale(1.25); opacity: 0; } }
.nodo .nombre { font-size: 13px; font-weight: 700; text-align: center; line-height: 1.25; color: var(--texto); background: rgba(245,244,251,.9); padding: 2px 6px; border-radius: 8px; }
.nodo.bloqueada .nombre { color: var(--gris-2); }
.nodo .burbuja { position: absolute; bottom: calc(100% + 2px); background: #fff; color: var(--ruta); font-weight: 900; font-size: 13px; letter-spacing: .06em; padding: 8px 14px;
  border-radius: 12px; border: 2px solid var(--borde); white-space: nowrap; animation: flotar 1.6s ease-in-out infinite; }
.nodo .burbuja::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; background: #fff; border-right: 2px solid var(--borde); border-bottom: 2px solid var(--borde); transform: translateX(-50%) rotate(45deg); }
@keyframes flotar { 50% { transform: translateY(-5px); } }
.nodo.meta button { width: 92px; height: 86px; border-radius: 28px; }
.nodo.meta.lista button { background: linear-gradient(135deg, var(--amarillo), #ff9f1c); box-shadow: 0 7px 0 #c47800; color: var(--azul); }

/* ----- Estación: lección y actividad ----- */
.jugar { max-width: 720px; margin: 0 auto; }
.barra-juego { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.barra-juego .cerrar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--gris); font-size: 24px; line-height: 1; flex: none; box-shadow: 0 2px 0 var(--borde); }
.progreso { flex: 1; height: 16px; background: #e4e3ee; border-radius: 99px; overflow: hidden; }
.progreso i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .4s ease; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
.puntaje-juego { font-weight: 900; color: var(--morado); min-width: 60px; text-align: right; }
.paso { animation: entrar .35s cubic-bezier(.2,.7,.2,1); }
@keyframes entrar { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.historia { border-radius: 28px; padding: 34px 28px; min-height: 340px; display: flex; flex-direction: column; justify-content: center; color: #fff;
  background: radial-gradient(circle at 85% 10%, rgba(255,255,255,.16), transparent 40%), var(--ruta); box-shadow: 0 8px 0 rgba(0,0,0,.22); position: relative; overflow: hidden; }
.historia .num { position: absolute; top: 18px; left: 24px; font-weight: 800; font-size: 13px; opacity: .8; letter-spacing: .08em; }
.historia h2 { margin: 0 0 14px; font-size: clamp(22px, 4vw, 30px); line-height: 1.2; }
.historia p { margin: 0 0 10px; font-size: 18px; line-height: 1.6; opacity: .95; }
.acciones-paso { display: flex; gap: 12px; margin-top: 20px; }
.acciones-paso .btn { flex: 1; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 8px 0 rgba(0,0,0,.2); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.audio-caja { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.audio-caja .disco { width: 150px; height: 150px; border-radius: 50%; background: conic-gradient(var(--ruta), var(--morado), var(--ruta)); display: grid; place-items: center; box-shadow: 0 8px 0 rgba(0,0,0,.2); }
.audio-caja .disco.sonando { animation: girar 6s linear infinite; }
.audio-caja .disco i { width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.audio-caja audio { width: 100%; }
.intro-juego { text-align: center; padding: 36px 22px; }
.intro-juego .grande { font-size: 64px; line-height: 1; }
.intro-juego h2 { color: var(--azul); margin: 12px 0 6px; font-size: 28px; }
.intro-juego p { color: var(--gris); margin: 0 0 20px; }

/* Pregunta tipo Kahoot */
.pregunta { background: #fff; border-radius: 22px; padding: 22px; text-align: center; font-size: clamp(18px, 3vw, 23px); font-weight: 800; color: var(--azul); box-shadow: 0 4px 0 var(--borde); border: 1px solid var(--borde); }
.pregunta .tipo { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--morado); margin-bottom: 8px; }
.pregunta .situacion { display: block; font-weight: 600; font-size: 16px; color: var(--texto); text-align: left; background: var(--morado-claro); padding: 14px 16px; border-radius: 14px; margin-bottom: 12px; line-height: 1.55; }
.reloj { position: relative; height: 12px; background: #e4e3ee; border-radius: 99px; overflow: hidden; margin: 16px 0; }
.reloj i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--morado), var(--azul-2)); border-radius: 99px; }
.reloj.poco i { background: var(--mal); }
.opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opciones.una { grid-template-columns: 1fr; }
@media (max-width: 520px) { .opciones { grid-template-columns: 1fr; } }
.opcion { display: flex; align-items: center; gap: 14px; text-align: left; border: 0; border-radius: 18px; padding: 18px 18px; min-height: 76px; color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: 0 6px 0 rgba(0,0,0,.25); transition: transform .08s, opacity .2s, filter .2s; }
.opcion:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.opcion .forma { width: 34px; height: 34px; flex: none; display: grid; place-items: center; }
.opcion .forma svg { width: 30px; height: 30px; fill: #fff; }
.opcion.c0 { background: var(--rojo); } .opcion.c1 { background: var(--azulk); } .opcion.c2 { background: var(--amarillok); } .opcion.c3 { background: var(--verdek); }
.opciones.cerrada .opcion { cursor: default; }
.opciones.cerrada .opcion:not(.buena):not(.elegida) { opacity: .35; filter: grayscale(.4); }
.opcion.buena { outline: 5px solid var(--ok); outline-offset: 3px; }
.opcion.elegida.mala { outline: 5px solid #111; outline-offset: 3px; }
.opcion .marca-res { margin-left: auto; font-size: 26px; }

/* Ordenar y parear */
.lista-orden { display: grid; gap: 10px; margin-top: 16px; }
.item-orden { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--borde); border-radius: 16px; padding: 12px 12px 12px 16px; font-weight: 700; box-shadow: 0 4px 0 var(--borde); transition: transform .2s; }
.item-orden .n { width: 30px; height: 30px; border-radius: 50%; background: var(--morado); color: #fff; display: grid; place-items: center; font-size: 14px; flex: none; }
.item-orden .txt { flex: 1; }
.item-orden .mover { display: flex; gap: 6px; }
.item-orden .mover button { width: 38px; height: 38px; border-radius: 12px; border: 2px solid var(--borde); background: var(--fondo); font-size: 18px; color: var(--azul); }
.item-orden.bien { border-color: var(--ok); background: #eafbf0; }
.item-orden.mal { border-color: var(--mal); background: #fff0f0; }
.parear { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.parear .col { display: grid; gap: 10px; align-content: start; }
.ficha { border: 2px solid var(--borde); background: #fff; border-radius: 16px; padding: 14px; font-weight: 700; text-align: left; box-shadow: 0 4px 0 var(--borde); min-height: 60px; font-size: 15px; }
.ficha.sel { border-color: var(--morado); background: var(--morado-claro); }
.ficha.par { color: #fff; border-color: transparent; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.ficha.bien { outline: 4px solid var(--ok); } .ficha.mal { outline: 4px solid var(--mal); }
.ayuda-tipo { text-align: center; color: var(--gris); font-size: 14px; margin: 10px 0 0; }

/* Resultado de cada pregunta */
.retro { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 20px max(18px, env(safe-area-inset-left)) calc(20px + env(safe-area-inset-bottom)); animation: subir .3s cubic-bezier(.2,.7,.2,1); }
.retro.bien { background: #d7ffb8; color: #3a7a00; } .retro.mal { background: #ffdfe0; color: #c2272d; }
.retro .dentro { max-width: 720px; margin: 0 auto; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.retro .txt { flex: 1 1 300px; }
.retro h3 { margin: 0 0 4px; font-size: 22px; }
.retro p { margin: 0; color: var(--texto); font-size: 15px; }
.retro .btn { flex: 0 0 auto; min-width: 180px; }
@keyframes subir { from { transform: translateY(100%); } to { transform: none; } }

/* Fin de la estación */
.final { text-align: center; padding: 30px 20px; }
.final .estrellas { font-size: 54px; letter-spacing: 6px; }
.final .estrellas .off { filter: grayscale(1); opacity: .3; }
.final h2 { color: var(--azul); font-size: 28px; margin: 10px 0 6px; }
.final p { color: var(--gris); margin: 0 0 6px; }
.final .cifras { display: flex; justify-content: center; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.final .cifra { border: 2px solid var(--borde); border-radius: 16px; padding: 12px 18px; min-width: 120px; }
.final .cifra b { display: block; font-size: 26px; color: var(--morado); }
.final .cifra span { font-size: 13px; color: var(--gris); font-weight: 700; }
.final .botones { display: grid; gap: 12px; max-width: 360px; margin: 0 auto; }
.premio-ruta { background: linear-gradient(135deg, var(--amarillo), #ffb703); color: var(--azul); border-radius: 22px; padding: 22px; margin: 18px 0; font-weight: 800; box-shadow: 0 6px 0 #c79f00; }
.premio-ruta b { font-size: 24px; display: block; }
.confeti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confeti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: caer linear forwards; }
@keyframes caer { to { transform: translateY(110vh) rotate(720deg); } }

/* ----- Certificado ----- */
.certificado { position: relative; background: #fff; border-radius: 10px; padding: clamp(28px, 6vw, 60px); text-align: center; border: 10px solid var(--azul);
  outline: 3px solid var(--amarillo); outline-offset: -22px; box-shadow: 0 10px 40px rgba(29,22,100,.15); }
.certificado img { height: 70px; width: auto; margin: 0 auto 18px; }
.certificado .sup { letter-spacing: .3em; text-transform: uppercase; font-weight: 800; color: var(--morado); font-size: 13px; }
.certificado h1 { font-size: clamp(30px, 6vw, 52px); color: var(--azul); margin: 6px 0 18px; font-weight: 900; }
.certificado .quien { font-size: clamp(22px, 4.5vw, 36px); font-weight: 800; color: var(--texto); border-bottom: 2px solid var(--borde); display: inline-block; padding: 0 20px 8px; margin: 10px 0 14px; }
.certificado .ruta { font-size: clamp(18px, 3.4vw, 26px); font-weight: 800; color: var(--azul); margin: 8px 0 22px; }
.certificado .datos { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--gris); margin-top: 26px; text-align: left; }
.certificado .datos b { display: block; color: var(--texto); font-size: 15px; }
.botones-cert { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
@media print {
  @page { size: landscape; margin: 10mm; }
  body { background: #fff; }
  .cabeza, .ayuda-boton, .botones-cert, .volver { display: none !important; }
  main { padding: 0; max-width: none; }
  .certificado { box-shadow: none; }
}

/* ----- En vivo ----- */
.vivo { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.vivo.sin-video { grid-template-columns: minmax(0, 640px); justify-content: center; }
@media (max-width: 860px) { .vivo { grid-template-columns: 1fr; } .vivo .video { position: sticky; top: 58px; z-index: 5; } }
.vivo-titulo { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; font-weight: 800; color: var(--azul); }
.en-vivo { background: #ff4d5e; color: #fff; font-size: 12px; font-weight: 900; padding: 4px 10px; border-radius: 6px; letter-spacing: .06em; }
.panel-vivo { min-height: 300px; }
.espera { text-align: center; padding: 30px 16px; }
.espera .grande { font-size: 54px; }
.espera h2 { color: var(--azul); margin: 10px 0 6px; }
.espera p { color: var(--gris); margin: 0; }
.puntos-vivo { display: flex; justify-content: space-between; font-weight: 800; color: var(--azul); margin-bottom: 10px; font-size: 14px; }
.banner { border-radius: 18px; padding: 18px; text-align: center; color: #fff; margin-bottom: 14px; }
.banner.bien { background: var(--ok); } .banner.mal { background: var(--mal); } .banner.nada { background: var(--gris); }
.banner b { display: block; font-size: 24px; }
.top { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.top li { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--borde); border-radius: 14px; padding: 10px 14px; font-weight: 700; }
.top li .pos { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fondo); font-weight: 900; color: var(--azul); flex: none; }
.top li:nth-child(1) .pos { background: var(--oro); color: #fff; } .top li:nth-child(2) .pos { background: #b9bccb; color: #fff; } .top li:nth-child(3) .pos { background: #d08c55; color: #fff; }
.top li.yo { border-color: var(--morado); background: var(--morado-claro); }
.top li .pts { margin-left: auto; color: var(--morado); }

/* ----- Ayuda y salida rápida ----- */
.ayuda-boton { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 25; display: inline-flex; align-items: center; gap: 9px;
  border: 0; border-radius: 999px; padding: 14px 20px; background: var(--morado); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 6px 20px rgba(123,44,191,.45); }
.ayuda-boton svg { width: 20px; height: 20px; }
body.jugando .ayuda-boton { bottom: calc(16px + env(safe-area-inset-bottom)); padding: 12px; }
body.jugando .ayuda-boton span { display: none; }
body.con-retro .ayuda-boton { display: none; }
.hoja-fondo { position: fixed; inset: 0; z-index: 50; background: rgba(20,16,60,.5); display: flex; align-items: flex-end; justify-content: center; }
.hoja { position: relative; width: 100%; max-width: 520px; background: #fff; border-radius: 26px 26px 0 0; padding: 26px 20px calc(24px + env(safe-area-inset-bottom)); animation: subir .3s cubic-bezier(.2,.7,.2,1); max-height: 92vh; overflow-y: auto; }
@media (min-width: 640px) { .hoja-fondo { align-items: center; } .hoja { border-radius: 26px; } }
.hoja h2 { margin: 0 40px 4px 0; color: var(--azul); }
.hoja-intro { margin: 0 0 16px; color: var(--gris); }
.hoja-cerrar { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--fondo); font-size: 24px; color: var(--gris); }
.linea { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--texto); border: 2px solid var(--borde); border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; }
.linea b { min-width: 86px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--azul); color: #fff; font-size: 18px; font-weight: 900; padding: 0 8px; }
.linea span { font-size: 14px; color: var(--gris); line-height: 1.4; }
.linea strong { display: block; color: var(--texto); font-size: 15px; }
.linea.urgente b { background: var(--mal); font-size: 22px; }
.linea.purpura b { background: var(--morado); font-size: 15px; }
.linea.whatsapp b { background: #1fa855; font-size: 14px; }
.hoja-nota { font-size: 13px; color: var(--gris); margin: 12px 0 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ----- Ruta: pestañas y líneas de atención ----- */
.tema-tarjeta { min-height: 190px; }
.pestanas-tema { display: flex; gap: 8px; margin: 18px 0 16px; background: #fff; padding: 6px; border-radius: 16px; border: 1px solid var(--borde); width: fit-content; max-width: 100%; }
.pestanas-tema button { border: 0; background: none; padding: 10px 16px; border-radius: 12px; font-weight: 800; color: var(--gris); }
.pestanas-tema button.activa { background: var(--ruta); color: #fff; }
.directorio { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.entidad { background: #fff; border: 1px solid var(--borde); border-radius: 20px; padding: 18px 20px; box-shadow: 0 2px 0 var(--borde); border-top: 5px solid var(--ruta); }
.entidad h3 { margin: 0 0 4px; color: var(--azul); font-size: 17px; line-height: 1.3; }
.entidad .para { margin: 0 0 10px; color: var(--gris); font-size: 14px; }
.entidad .contacto { display: grid; gap: 6px; font-weight: 700; font-size: 15px; word-break: break-word; }
.entidad .contacto a[href^="tel:"] { display: inline-block; background: var(--morado-claro); color: var(--morado); padding: 2px 10px; border-radius: 8px; text-decoration: none; }
.nota-lineas { color: var(--gris); font-size: 13px; margin-top: 14px; }

/* Volver al panel */
.volver-panel { text-decoration: none; font-weight: 800; font-size: 14px; color: var(--azul); background: var(--fondo); border: 1px solid var(--borde); padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.volver-panel:hover { background: #ecebf8; }
@media (max-width: 560px) { .volver-panel { padding: 8px 11px; font-size: 13px; } }

/* Fondo dinámico: manchas de color que se mueven despacio */
body { background: #f4f2fc; }
.fondo-vivo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(1200px 600px at 10% -10%, #e6e0ff, transparent 60%), radial-gradient(900px 600px at 110% 110%, #ffe9f4, transparent 60%), #f4f2fc; }
.fondo-vivo i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; will-change: transform; }
.fondo-vivo i:nth-child(1) { width: 46vmax; height: 46vmax; background: #b9a7ff; left: -12vmax; top: -10vmax; animation: nadar1 22s ease-in-out infinite alternate; }
.fondo-vivo i:nth-child(2) { width: 38vmax; height: 38vmax; background: #ffb3d1; right: -10vmax; top: 20vh; animation: nadar2 26s ease-in-out infinite alternate; }
.fondo-vivo i:nth-child(3) { width: 34vmax; height: 34vmax; background: #9fd8ff; left: 20vw; bottom: -14vmax; animation: nadar3 30s ease-in-out infinite alternate; }
.fondo-vivo i:nth-child(4) { width: 22vmax; height: 22vmax; background: #ffe58a; right: 18vw; bottom: 8vh; opacity: .45; animation: nadar1 18s ease-in-out infinite alternate-reverse; }
.fondo-vivo i:nth-child(5) { width: 18vmax; height: 18vmax; background: #c9b8ff; left: 45vw; top: 8vh; opacity: .45; animation: nadar2 20s ease-in-out infinite alternate-reverse; }
@keyframes nadar1 { to { transform: translate(18vw, 14vh) scale(1.15); } }
@keyframes nadar2 { to { transform: translate(-16vw, 18vh) scale(.9); } }
@keyframes nadar3 { to { transform: translate(14vw, -20vh) scale(1.2); } }

/* Paso "Te guiamos" */
.te-guiamos { background: #fff; border-radius: 26px; padding: 26px 22px; box-shadow: 0 8px 0 rgba(0,0,0,.08); border: 2px solid var(--ruta); }
.te-guiamos .sello { display: inline-block; background: var(--ruta); color: #fff; font-weight: 900; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; }
.te-guiamos h2 { margin: 12px 0 6px; color: var(--azul); font-size: 26px; }
.te-guiamos > p { margin: 0 0 16px; color: var(--gris); }
.salida span { white-space: nowrap; }
@media (max-width: 560px) { .volver-panel .largo { display: none; } .salida { padding: 9px 12px; } .cabeza-der { gap: 6px; } }
.volver-panel .corto { display: none; }
@media (max-width: 560px) { .volver-panel .corto { display: inline; } }

.item-orden .marca-paso { font-weight: 900; font-size: 18px; margin-left: auto; }
.item-orden.bien .marca-paso { color: var(--ok); } .item-orden.mal .marca-paso { color: var(--mal); }
.lista-orden.correcto .item-orden { background: #f7f6fd; box-shadow: none; }
.lista-orden.correcto .n { background: var(--ok); }
body.con-retro main { padding-bottom: 280px; }
