/* Caravana de Teclas — tema visual. Sin estilos en línea (la CSP los prohíbe). */
@font-face { font-family: 'Rubik'; src: url('/assets/fonts/rubik-latin-500-normal.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('/assets/fonts/rubik-latin-700-normal.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('/assets/fonts/rubik-latin-800-normal.woff2') format('woff2'); font-weight: 800 900; font-display: swap; }
@font-face { font-family: 'Andika'; src: url('/assets/fonts/andika-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Andika'; src: url('/assets/fonts/andika-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'OpenDyslexic'; src: url('/assets/fonts/opendyslexic-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'OpenDyslexic'; src: url('/assets/fonts/opendyslexic-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* Tema «Escenario»: fondo de noche, luces de colores, estilo videojuego limpio */
  --bg: #1B1640;
  --bg2: #221C4F;
  --panel: #2A2360;
  --ink: #FFFFFF;
  --ink-soft: #C9C3F5;
  --card: #2A2360;
  --line: #3B3478;
  --primary: #EC3F8C;       /* rosa neón (texto blanco encima) */
  --primary-dark: #A8235F;
  --primary-ink: #ffffff;
  --secondary: #3DDCFF;     /* cian (texto oscuro encima) */
  --secondary-dark: #1E9BBB;
  --secondary-ink: #1B1640;
  --good: #B8F35A;          /* lima */
  --good-ink: #1B1640;
  --good-soft: rgba(184, 243, 90, 0.14);
  --hint: #FFD23F;          /* amarillo */
  --hint-soft: rgba(255, 210, 63, 0.14);
  --soft: #8F87D6;
  --key-white: #F4F2FF;
  --key-black: #0E0B26;
  --key-lit: #3DDCFF;
  --radius: 18px;
  --font: 'Rubik', 'Andika', system-ui, sans-serif;
  --shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
:root[data-font='dyslexia'] { --font: 'OpenDyslexic', 'Andika', sans-serif; }
:root[data-keys='menta'] { --key-lit: #7CF5C8; }
:root[data-keys='lavanda'] { --key-lit: #C3A6FF; }
:root[data-keys='cielo'] { --key-lit: #7FB8FF; }
:root[data-keys='sandia'] { --key-lit: #FF8FB8; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior: none; }
#app { min-height: 100%; display: flex; flex-direction: column; }
button { font-family: inherit; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; font-weight: 800; letter-spacing: .2px; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
p { line-height: 1.45; }
.big { font-size: clamp(24px, 3.2vw, 36px); }
.huge { font-size: clamp(40px, 7vw, 84px); font-weight: 700; }
.soft { color: var(--ink-soft); }
.center { text-align: center; }
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 16px; }
.grow { flex: 1; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Botones: mínimo 64 px en lo que toca la niña */
.btn { min-height: 64px; min-width: 64px; padding: 12px 28px; border-radius: var(--radius); border: 0; background: var(--card); color: var(--ink);
  font-size: 22px; font-weight: 700; box-shadow: var(--shadow); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.btn.primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 0 var(--primary-dark); }
.btn.secondary { background: var(--secondary); color: var(--secondary-ink); box-shadow: 0 6px 0 var(--secondary-dark); }
.btn.ghost { background: transparent; box-shadow: none; border: 2px solid var(--line); color: var(--ink); }
.btn.huge-btn { min-height: 120px; padding: 20px 48px; font-size: 32px; border-radius: 40px; }
.btn.small { min-height: 48px; padding: 8px 18px; font-size: 18px; }
.btn[disabled] { opacity: .45; }
.btn:focus-visible, .choice:focus-visible, .key:focus-visible { outline: 4px solid var(--secondary); outline-offset: 3px; }

.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.screen { flex: 1; display: flex; flex-direction: column; padding: 16px 24px 24px; gap: 16px; max-width: 1400px; width: 100%; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.pill { background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: 22px; box-shadow: var(--shadow); display: inline-flex; gap: 8px; align-items: center; }

/* Partes de la sesión */
.parts { display: flex; gap: 8px; align-items: center; }
.part { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 18px; background: var(--card); }
.part.done { background: var(--good); border-color: var(--good); color: var(--good-ink); }
.part.now { border-color: var(--primary); background: var(--primary); color: #fff; transform: scale(1.12); box-shadow: 0 0 16px rgba(236,63,140,.6); }

/* Estrellas */
.stars { display: inline-flex; gap: 6px; }
.star { width: 44px; height: 44px; }
.star.big { width: 88px; height: 88px; }
.star path { fill: var(--line); }
.star.on path { fill: var(--hint); }

/* Teclado en pantalla */
.keyboard { position: relative; flex-shrink: 0; height: clamp(110px, 20vh, 190px); user-select: none; touch-action: none; }
.keyboard .key { position: absolute; top: 0; border: 2px solid #1B1640; border-radius: 0 0 10px 10px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; font-weight: 700; font-size: 15px; cursor: pointer; }
.keyboard .white { background: var(--key-white); height: 100%; color: var(--ink-soft); z-index: 1; }
.keyboard .black { background: var(--key-black); height: 60%; z-index: 2; color: #fff; border-color: #1c1917; }
.keyboard .key.lit { background: var(--key-lit); animation: lit-glow 1s ease-in-out infinite; z-index: 3; }
.keyboard .black.lit { z-index: 4; }
@keyframes lit-glow { 0%, 100% { box-shadow: 0 0 0 0 var(--key-lit); } 50% { box-shadow: 0 0 18px 6px var(--key-lit); } }
.keyboard .key.down { filter: brightness(.85); }
.keyboard .key.good { background: var(--good); color: var(--good-ink); }
.keyboard .key.was { box-shadow: inset 0 0 0 5px var(--hint); }

/* Notación */
.notation { width: 100%; }
.notation svg { width: 100%; height: auto; max-height: 42vh; display: block; }
.n-head { fill: var(--card); stroke: var(--ink); stroke-width: 3; }
.n-head.ok { fill: var(--good-soft); stroke: var(--good); stroke-width: 5; }
.n-head.wrong { fill: var(--card); stroke: var(--hint); stroke-dasharray: 8 6; }
.n-head.missing { stroke: var(--soft); stroke-dasharray: 4 6; }
.n-head.now { stroke: var(--primary); stroke-width: 6; }
.n-text { fill: var(--ink); font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.n-small { fill: var(--ink-soft); text-anchor: middle; font-size: 22px; }
.n-stem { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.n-fill { fill: var(--ink); }
.n-line { stroke: var(--soft); stroke-width: 2; }
.n-check { stroke: var(--good); stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.n-cursor { fill: var(--hint-soft); }

/* Avatar y rebote del pulso */
.avatar svg { width: 100%; height: 100%; }
.bounce { animation: bounce .28s ease-out; }
@keyframes bounce { 0% { transform: translateY(0); } 40% { transform: translateY(-14px); } 100% { transform: translateY(0); } }
.count-in { font-size: clamp(60px, 12vw, 140px); font-weight: 800; color: var(--hint); text-shadow: 0 0 24px rgba(255,210,63,.55); }
.pop { animation: pop .35s ease-out; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.wiggle { animation: wiggle 1.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
:root[data-motion='reduce'] *, :root[data-motion='reduce'] *::before { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { :root:not([data-motion='full']) * { animation: none !important; transition: none !important; } }

/* Dónde tocar */
.where-play { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; align-self: flex-start; background: var(--card); border: 2px solid var(--bg2); border-radius: 999px; padding: 6px 16px 6px 10px; font-size: 18px; }

/* Ejercicios con tempo: 1 Escucha → 2 Prepárate → 3 ¡Ahora! */
.timed-stage { display: flex; align-items: center; justify-content: center; gap: 20px; width: 100%; min-height: 104px; flex-wrap: wrap; }
.timed-stage .count-in { font-size: clamp(56px, 9vw, 96px); line-height: 1; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.steps .step { padding: 6px 14px; border-radius: 999px; background: var(--bg2); color: var(--ink-soft); font-weight: 700; font-size: 18px; opacity: .7; }
.steps .step b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--card); margin-right: 4px; }
.steps .step.on { background: var(--primary); color: #fff; opacity: 1; transform: scale(1.08); box-shadow: 0 0 18px rgba(236,63,140,.55); }
.steps .step.on b { color: var(--primary); }
.steps .step.done { opacity: .9; }
.go { color: var(--hint); font-weight: 800; font-size: clamp(30px, 5vw, 52px); text-shadow: 0 0 22px rgba(255,210,63,.55); letter-spacing: .5px; }
.pet-jump { animation: pet-jump .36s cubic-bezier(.3,1.6,.5,1); }
@keyframes pet-jump { 0% { transform: translateY(0) scale(1.05, .92); } 45% { transform: translateY(-34px) scale(.96, 1.06); } 100% { transform: translateY(0) scale(1); } }
.pet-ready { animation: pet-ready .8s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes pet-ready { 0%, 100% { transform: scale(1, .9); } 50% { transform: scale(1, .84); } }
.pet-idle { animation: wiggle 2.4s ease-in-out infinite; }

/* Mapa */
.map { position: relative; flex: 1; background: var(--bg2); border-radius: 32px; overflow: hidden; }
.map svg { width: 100%; height: 100%; display: block; }
.lesson-dot { cursor: pointer; }

/* Opciones de juego */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.choice { min-height: 150px; border-radius: 28px; border: 4px solid transparent; background: var(--card); box-shadow: var(--shadow); font-size: 26px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; color: var(--ink); }
.choice svg { width: 80px; height: 80px; }
.choice.right { border-color: var(--good); background: var(--good-soft); box-shadow: 0 0 24px rgba(184,243,90,.45); }
.choice.try { border-color: var(--hint); }

/* Medidor de micrófono */
.meter { display: inline-flex; gap: 3px; align-items: flex-end; height: 26px; }
.meter i { width: 7px; background: var(--line); border-radius: 3px; }
.meter i.on { background: var(--secondary); }

/* Formularios (panel de papá) */
.form { display: grid; gap: 14px; max-width: 720px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
input, select, textarea { font: inherit; font-size: 20px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg2); color: var(--ink); min-height: 52px; }
input[type=checkbox] { width: 28px; height: 28px; min-height: 0; }
.check { display: flex !important; grid-template-columns: none; align-items: center; gap: 12px; font-weight: 400 !important; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { padding: 10px 18px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font-weight: 700; font-size: 18px; cursor: pointer; min-height: 48px; }
.tab.on { background: var(--secondary); color: var(--secondary-ink); border-color: var(--secondary); }
.tab { color: var(--ink); }
table.data { border-collapse: collapse; width: 100%; font-size: 17px; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.notice { background: var(--hint-soft); border: 2px solid var(--hint); border-radius: 16px; padding: 14px 18px; }
.error { background: rgba(255, 93, 93, 0.18); color: #FFD6D6; border-radius: 16px; padding: 14px 18px; }
.ok-box { background: var(--good-soft); border: 2px solid var(--good); border-radius: 16px; padding: 14px 18px; }
.overlay { position: fixed; inset: 0; background: rgba(8,6,24,.72); display: grid; place-items: center; z-index: 50; padding: 20px; }
.overlay .card { max-width: 640px; width: 100%; }
.pin { display: flex; gap: 12px; justify-content: center; }
.pin input { width: 64px; text-align: center; font-size: 32px; }
.bars rect { fill: var(--secondary); }
.bars text { fill: var(--ink-soft); font-size: 12px; }
.grid-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.item { background: var(--card); border-radius: 20px; padding: 12px; text-align: center; box-shadow: var(--shadow); border: 3px solid transparent; cursor: pointer; }
.item.equipped { border-color: var(--good); }
.item > svg { width: 100%; height: 90px; }
.item .avatar { margin: 0 auto; }
.item[disabled] { opacity: .75; }
.sticker-slot { width: 120px; height: 120px; border-radius: 50%; border: 3px dashed var(--line); display: grid; place-items: center; text-align: center; font-size: 14px; padding: 8px; }
.sticker-slot.got { border: 2px solid var(--hint); background: var(--hint-soft); }
code, .mono { font-family: ui-monospace, Menlo, monospace; }

@media (orientation: portrait) and (max-width: 820px) { .screen { padding: 12px; } .btn { font-size: 20px; } }
.meter i:nth-child(1) { height: 6px; } .meter i:nth-child(2) { height: 10px; } .meter i:nth-child(3) { height: 14px; }
.meter i:nth-child(4) { height: 18px; } .meter i:nth-child(5) { height: 22px; } .meter i:nth-child(6) { height: 26px; }
progress { width: 100%; height: 18px; }
.col.center { align-items: center; }
.col.center > .card { align-self: stretch; }

/* Botón Reportar (solo modo revisión y panel) */
.report-fab { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; border: 2px solid var(--secondary); background: var(--card); color: var(--secondary); font: inherit; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,.12); cursor: pointer; }
.review-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.review-list button { text-align: left; }
.review-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--hint-soft); border-radius: 16px; padding: 8px 12px; }
textarea { font: inherit; font-size: 18px; padding: 10px; border-radius: 12px; border: 2px solid var(--bg2); width: 100%; box-sizing: border-box; }

.clap-pad { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px; }
.clap-btn { width: 104px; height: 104px; border-radius: 26px; border: 0; background: var(--hint); display: grid; place-items: center; cursor: pointer; box-shadow: 0 7px 0 #B38E00; }
.clap-btn.hit { animation: clap-hit .2s ease-out; }
@keyframes clap-hit { 0% { transform: translateY(5px) scale(.94); box-shadow: 0 2px 0 #B38E00; } 100% { transform: none; } }

/* Pantalla de ejercicio: todo cabe sin desplazarse (iPad horizontal 1180×820) */
.screen.fit { flex: 0 0 auto; height: 100dvh; overflow-y: auto; }
.runner { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.runner-head h2 { margin: 0; }
.runner-sub { gap: 10px; }
.runner-sub .steps { margin-left: auto; }
.runner-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: hidden; }
.runner-notation { flex: 1; width: 100%; min-height: 0; }
.runner-notation .notation { height: 100%; }
.runner-notation .notation svg { height: 100%; max-height: 300px; }
.runner-actions { justify-content: center; flex-shrink: 0; }
.runner-actions .btn.huge-btn { min-height: 84px; font-size: 28px; padding: 14px 40px; }
.runner .huge { font-size: clamp(36px, 6vw, 72px); }
.runner .ok-box, .runner .notice { flex-shrink: 0; }
.clap-pad { flex-shrink: 0; }

/* Teclado: haz de luz sobre la tecla que brilla, y zona suave (agudos / graves) */
.keyboard .kb-beam { position: absolute; bottom: 100%; height: 110px; z-index: 0; pointer-events: none; border-radius: 12px 12px 0 0;
  background: linear-gradient(to top, var(--key-lit), rgba(61, 220, 255, 0)); opacity: .85; animation: beam 1.2s ease-in-out infinite; }
@keyframes beam { 0%, 100% { opacity: .55; } 50% { opacity: .95; } }
.keyboard .kb-zone { position: absolute; top: -34px; bottom: 0; z-index: 5; pointer-events: none; border: 3px dashed var(--hint); border-radius: 14px; background: rgba(255, 210, 63, 0.10); }
.keyboard .kb-zone span { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-weight: 800; font-size: 17px; color: var(--hint); }
.keyboard { margin-top: 40px; }

/* Busca la tecla: insignia + título grande + cuadritos de avance */
.target { display: flex; align-items: center; gap: 22px; }
.target .badge { width: 100px; height: 100px; border-radius: 26px; background: var(--primary); display: grid; place-items: center; box-shadow: 0 0 26px rgba(236,63,140,.5); flex-shrink: 0; }
.target .badge svg { filter: brightness(1.15); }
.target .huge { font-weight: 800; line-height: 1.05; }
.progress-squares { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.progress-squares i { width: 24px; height: 24px; border-radius: 7px; background: var(--line); display: block; }
.progress-squares i.done { background: var(--good); }
.progress-squares i.now { background: transparent; border: 3px solid var(--secondary); }

/* Pista de pulsos: las bolitas llegan al aro */
.beat-track { position: relative; width: 100%; height: 96px; flex-shrink: 0; border-radius: 20px; background: var(--bg2); overflow: hidden; }
.beat-track .bt-line { position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; background: var(--line); }
.beat-track .bt-ring { position: absolute; left: 22px; top: 50%; width: 96px; height: 96px; margin-top: -48px; border-radius: 50%; border: 7px solid var(--hint); box-sizing: border-box; box-shadow: 0 0 24px rgba(255,210,63,.55); }
.beat-track .bt-ball { position: absolute; left: 0; top: 50%; width: 64px; height: 64px; margin-top: -32px; border-radius: 50%; background: var(--secondary); color: var(--secondary-ink); display: grid; place-items: center; font-weight: 800; font-size: 20px; will-change: transform; }
.beat-track .bt-ball.ok { background: var(--good); box-shadow: 0 0 20px rgba(184,243,90,.7); }
.beat-track .bt-ball.wrong { background: var(--line); color: var(--ink-soft); }
.combo { font-weight: 800; font-size: 22px; color: var(--good); border: 2px solid var(--good); border-radius: 14px; padding: 6px 14px; background: var(--good-soft); }

/* Confeti al sacar 3 estrellas */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: confetti 1.8s ease-in forwards; }
.confetti i:nth-child(4n+1) { background: var(--primary); } .confetti i:nth-child(4n+2) { background: var(--secondary); }
.confetti i:nth-child(4n+3) { background: var(--good); } .confetti i:nth-child(4n) { background: var(--hint); }
.confetti i:nth-child(1) { left: 33.4%; animation-delay: 0.08s; --dx: 46px; --rot: 249deg; }
.confetti i:nth-child(2) { left: 9.8%; animation-delay: 0.27s; --dx: -27px; --rot: 259deg; }
.confetti i:nth-child(3) { left: 88.5%; animation-delay: 0.11s; --dx: -98px; --rot: 644deg; }
.confetti i:nth-child(4) { left: 42.3%; animation-delay: 0.12s; --dx: 21px; --rot: 634deg; }
.confetti i:nth-child(5) { left: 8.6%; animation-delay: 0.28s; --dx: -63px; --rot: 263deg; }
.confetti i:nth-child(6) { left: 57.2%; animation-delay: 0.2s; --dx: -64px; --rot: 247deg; }
.confetti i:nth-child(7) { left: 55.3%; animation-delay: 0.07s; --dx: -13px; --rot: 347deg; }
.confetti i:nth-child(8) { left: 53.8%; animation-delay: 0.29s; --dx: 23px; --rot: 385deg; }
.confetti i:nth-child(9) { left: 12.7%; animation-delay: 0.29s; --dx: -72px; --rot: 581deg; }
.confetti i:nth-child(10) { left: 12.2%; animation-delay: 0.36s; --dx: 24px; --rot: 261deg; }
.confetti i:nth-child(11) { left: 61.2%; animation-delay: 0.25s; --dx: 16px; --rot: 637deg; }
.confetti i:nth-child(12) { left: 76.1%; animation-delay: 0.23s; --dx: 116px; --rot: 664deg; }
.confetti i:nth-child(13) { left: 37.0%; animation-delay: 0.12s; --dx: -74px; --rot: 449deg; }
.confetti i:nth-child(14) { left: 10.7%; animation-delay: 0.15s; --dx: 6px; --rot: 551deg; }
.confetti i:nth-child(15) { left: 71.6%; animation-delay: 0.14s; --dx: -102px; --rot: 320deg; }
.confetti i:nth-child(16) { left: 51.1%; animation-delay: 0.08s; --dx: -33px; --rot: 355deg; }
.confetti i:nth-child(17) { left: 90.7%; animation-delay: 0.21s; --dx: 51px; --rot: 279deg; }
.confetti i:nth-child(18) { left: 74.9%; animation-delay: 0.29s; --dx: 104px; --rot: 521deg; }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: .9; } }

/* Mapa «Escenario» */
.map-screen .brand { font-weight: 800; font-size: 28px; letter-spacing: 1px; }
.pill.hot { border-color: var(--primary); color: #FF8FC4; font-size: 17px; font-weight: 800; }
.map-main { flex: 1; min-height: 0; display: flex; gap: 20px; }
.map-board { flex: 1; min-width: 0; position: relative; background: var(--bg2); border-radius: 26px; padding: 16px 18px; display: flex; flex-direction: column; }
.map-board svg { flex: 1; min-height: 0; width: 100%; }
.map-board .lesson-dot { cursor: pointer; }
.map-board .lesson-dot:focus-visible circle { stroke: #fff; stroke-width: 5; }
.map-board .glow { animation: beam 1.6s ease-in-out infinite; }
.world-tabs .tab[disabled] { opacity: .45; }
.world-name { font-weight: 800; color: var(--soft); font-size: 18px; letter-spacing: .6px; text-transform: uppercase; margin-top: 8px; }
.map-legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--ink-soft); font-size: 15px; }
.map-legend .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; }
.dot.now { background: var(--primary); } .dot.open { background: var(--secondary); } .dot.pend { background: var(--hint); } .dot.done { background: var(--good); }
.next-panel { width: 340px; flex-shrink: 0; background: var(--panel); border: 2px solid var(--line); border-radius: 26px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.next-panel .kicker { color: var(--secondary); font-weight: 800; letter-spacing: 1px; font-size: 16px; }
.next-panel .next-title { font-weight: 800; font-size: 32px; line-height: 1.05; }
.next-panel .next-pet { flex: 1; min-height: 0; display: grid; place-items: center; }
.next-panel .play-btn { min-height: 84px; font-size: 30px; font-weight: 800; letter-spacing: 1px; }
.map-nav { display: flex; gap: 12px; }
.map-nav .btn { flex: 1; min-height: 60px; font-size: 19px; border: 2px solid var(--line); }
.map-nav .lock-btn { flex: 0 0 64px; }
.screen.map-screen { height: 100dvh; flex: 0 0 auto; }
@media (max-width: 900px) { .map-main { flex-direction: column; } .next-panel { width: auto; } .next-panel .next-pet { display: none; } }
.runner-actions.playing { visibility: hidden; }
