/* EXPEDICIÓN · pantalla del alumno (misión secreta de MOSAICO). Mobile-first, botones grandes. */
:root {
  --bg: #0b1512; --panel: #12211c; --panel2: #192e27; --borde: #284238;
  --texto: #eaf3ee; --tenue: #8fa79c;
  --m: #b6f23a; --pri: #b6f23a; --ok: #5fd4a0; --info: #8cc8ff; --nota: #ffd27a; --alerta: #ff6b5b;
  --radio: 16px;
  --arriba: env(safe-area-inset-top, 0px); --abajo: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--texto); }
body { font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior-y: none;
  background: radial-gradient(120% 60% at 50% -10%, #17362a 0%, var(--bg) 60%) fixed; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; border: 0; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; letter-spacing: .03em; }
.m { color: var(--m); text-shadow: 0 0 14px color-mix(in srgb, var(--m) 55%, transparent); }
.tenue { color: var(--tenue); }
#app { max-width: 720px; margin: 0 auto; min-height: 100dvh; padding: calc(.6rem + var(--arriba)) 1rem calc(2rem + var(--abajo)); }

/* barra */
.barra { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; min-height: 48px; }
.barra h1 { flex: 1; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .08em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atras { width: 48px; height: 48px; border-radius: 14px; background: var(--panel2); font-size: 1.6rem; line-height: 1; flex: none; }
.chip { background: var(--panel2); border: 1px solid var(--borde); border-radius: 99px; padding: .3rem .75rem; font-weight: 700; white-space: nowrap; font-size: .95rem; }

/* tarjetas */
.card { background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem; margin-bottom: .8rem; }
.card.tocar { width: 100%; text-align: left; display: block; transition: transform .1s; }
.card.tocar:active { transform: scale(.98); }
.card h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
.fila { display: flex; align-items: center; gap: .7rem; }
.fila > .crece { flex: 1; min-width: 0; }
.medidor { height: 10px; background: #ffffff18; border-radius: 99px; overflow: hidden; margin-top: .55rem; }
.medidor > div { height: 100%; background: linear-gradient(90deg, var(--m), var(--ok)); border-radius: 99px; transition: width .5s; }
.aviso { border-radius: var(--radio); padding: 1rem; margin-bottom: .8rem; font-weight: 600; }
.aviso.rojo { background: #3a1512; border: 1px solid #ff6b5b88; color: #ffd5cf; }
.aviso.amar { background: #3a2f12; border: 1px solid #ffd27a88; color: #fff0c8; }
.aviso.verde { background: #133227; border: 1px solid #5fd4a088; color: #d3fbe8; }

/* botones */
.btn { display: block; width: 100%; min-height: 56px; border-radius: 14px; background: var(--m); color: #0b1512; font-weight: 800; font-size: 1.08rem; letter-spacing: .02em; padding: .7rem 1rem; }
.btn.sec { background: var(--panel2); color: var(--texto); border: 1px solid var(--borde); }
.btn:disabled { opacity: .5; }
.btn + .btn { margin-top: .6rem; }

/* camino de misiones */
.camino { position: relative; padding-left: 8px; }
.paso { display: flex; gap: .9rem; align-items: stretch; width: 100%; text-align: left; background: none; padding: 0; margin-bottom: .2rem; }
.paso .bola { flex: none; width: 46px; display: flex; flex-direction: column; align-items: center; }
.paso .bola b { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; background: var(--panel2); border: 2px solid var(--borde); font-weight: 800; }
.paso .bola i { flex: 1; width: 3px; background: var(--borde); min-height: 14px; }
.paso:last-child .bola i { display: none; }
.paso .info { flex: 1; background: var(--panel); border: 1px solid var(--borde); border-radius: 14px; padding: .7rem .9rem; margin-bottom: .7rem; }
.paso.hecha .bola b { background: var(--ok); color: #08130f; border-color: var(--ok); }
.paso.actual .bola b { background: var(--m); color: #0b1512; border-color: var(--m); box-shadow: 0 0 0 6px color-mix(in srgb, var(--m) 22%, transparent); animation: late 1.6s infinite; }
.paso.actual .info { border-color: color-mix(in srgb, var(--m) 70%, transparent); }
.paso.bloq { opacity: .55; }
@keyframes late { 50% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--m) 8%, transparent); } }

/* ejercicios */
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .6rem; }
.casilla { aspect-ratio: 1; border-radius: 16px; background: var(--panel); border: 2px solid var(--borde); font-size: 1.5rem; font-weight: 800; }
.casilla.ok { background: #143a2c; border-color: var(--ok); color: var(--ok); }
.enunciado { font-size: 1.35rem; line-height: 1.4; white-space: pre-wrap; margin: .2rem 0 1rem; user-select: text; }
.resp { width: 100%; min-height: 64px; font-size: 1.6rem; text-align: center; border-radius: 14px; border: 2px solid var(--borde); background: #0a130f; padding: .5rem; font-weight: 700; }
.resp:focus { outline: none; border-color: var(--m); }
.opciones { display: grid; gap: .6rem; }
.opciones button { min-height: 58px; border-radius: 14px; background: var(--panel2); border: 2px solid var(--borde); font-size: 1.1rem; font-weight: 700; padding: .5rem; }
.opciones button.sel { border-color: var(--m); background: color-mix(in srgb, var(--m) 18%, var(--panel2)); }
.vf { grid-template-columns: 1fr 1fr; }
.mensaje { min-height: 1.6em; text-align: center; font-weight: 800; margin: .7rem 0; font-size: 1.1rem; }
.mensaje.mal { color: var(--alerta); animation: tiembla .3s; }
.mensaje.bien { color: var(--ok); }
@keyframes tiembla { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.pista { background: #10261f; border: 1px dashed var(--ok); border-radius: 14px; padding: .8rem; margin-top: .6rem; white-space: pre-wrap; }

/* lugares */
.lugares { list-style: none; margin: 0; padding: 0; }
.lugares li { display: flex; gap: .6rem; padding: .45rem .2rem; border-bottom: 1px solid #ffffff10; }
.lugares li.yo { color: var(--m); font-weight: 800; }
.lugares .n { width: 2rem; text-align: right; font-weight: 800; }
.lugares .crece { flex: 1; }

/* equipos */
.equipo { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.equipo small { color: var(--tenue); }
.equipo .btn { width: auto; min-height: 48px; padding: .4rem 1rem; }
.entrada { width: 100%; min-height: 56px; border-radius: 14px; border: 2px solid var(--borde); background: #0a130f; padding: .5rem .9rem; font-size: 1.1rem; margin-bottom: .6rem; }

/* festejo */
.festejo { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; z-index: 50; padding: 1.5rem; animation: entra .25s; }
.festejo .card { text-align: center; max-width: 380px; width: 100%; padding: 1.6rem 1.2rem; }
.festejo .grande { font-size: 3.6rem; }
@keyframes entra { from { opacity: 0; transform: scale(.96); } }
.centro { min-height: 80dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: .6rem; }
.logo { font-size: clamp(2rem, 10vw, 3.2rem); font-weight: 900; letter-spacing: .1em; }
.toast { position: fixed; left: 50%; bottom: calc(1.2rem + var(--abajo)); transform: translateX(-50%); background: #000d; border: 1px solid var(--borde); padding: .7rem 1.1rem; border-radius: 99px; z-index: 60; font-weight: 700; max-width: 92vw; text-align: center; }
