/* ═══════════════════════════════════════════════════════════════════
   «Tu primera nota» — experiencia de portada (VISTA PREVIA, 30-nov-2026)
   Marca: paleta y tipografías de la portada en producción (Syne + DM Sans).
   Cada escena fija su luz con --c1/--c2; la transición entre escenas es
   un cambio de color animado (@property), no un corte.
   ═══════════════════════════════════════════════════════════════════ */
@property --c1 { syntax: '<color>'; inherits: true; initial-value: #5B6EFF; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #00E5FF; }

:root {
  --bg: #080A0F;
  --surface: #131520;
  --text: #F0F2FF;
  --muted: #A3A9C2;
  --indigo: #5B6EFF;
  --cian: #00E5FF;
  --rosa: #FF4D6D;
  --oro: #FFB800;
  --verde: #00E09E;
  --lila: #B388FF;
  --display: 'Syne', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --barra: 64px;
  --curva: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  overflow-x: clip;
  transition: --c1 1.2s var(--curva), --c2 1.2s var(--curva);
}
img { max-width: 100%; display: block; }
a { color: var(--cian); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--cian); outline-offset: 3px; border-radius: 6px; }

/* Luz de cada escena */
body[data-escena="inicio"]         { --c1: #5B6EFF; --c2: #00E5FF; }
body[data-escena="empezar-cero"]   { --c1: #00E5FF; --c2: #5B6EFF; }
body[data-escena="camino"]         { --c1: #B388FF; --c2: #5B6EFF; }
body[data-escena="camino"][data-instrumento="piano"]    { --c1: #5B6EFF; --c2: #00E5FF; }
body[data-escena="camino"][data-instrumento="guitarra"] { --c1: #FFB800; --c2: #FF4D6D; }
body[data-escena="camino"][data-instrumento="bajo"]     { --c1: #FF4D6D; --c2: #B388FF; }
body[data-escena="camino"][data-instrumento="canto"]    { --c1: #00E09E; --c2: #00E5FF; }
body[data-escena="practica"]       { --c1: #00E5FF; --c2: #00E09E; }
body[data-escena="acompanamiento"] { --c1: #FF4D6D; --c2: #5B6EFF; }
body[data-escena="progreso"]       { --c1: #FFB800; --c2: #FF4D6D; }
body[data-escena="musica"]         { --c1: #00E09E; --c2: #FFB800; }
body[data-escena="empieza"]        { --c1: #5B6EFF; --c2: #00E5FF; }

/* ── Capas fijas ─────────────────────────────────────────────────── */
.cielo, .confeti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cielo { z-index: 0; }
.confeti { z-index: 60; }
.bruma {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 78% 38%, color-mix(in srgb, var(--c1) 26%, transparent), transparent 70%),
    radial-gradient(50vmax 40vmax at 12% 92%, color-mix(in srgb, var(--c2) 16%, transparent), transparent 70%),
    linear-gradient(180deg, transparent 60%, rgba(0,0,0,.35));
}

.saltar {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  font-weight: 700; transform: translateY(-160%); transition: transform .2s;
}
.saltar:focus { transform: none; }

/* Barra */
.barra {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--barra);
  display: flex; align-items: center; gap: 14px; padding: 0 clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(8,10,15,.85), rgba(8,10,15,0));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.marca { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font: 700 19px var(--display); letter-spacing: -.01em; }
.marca b { font-weight: 800; color: var(--c1); transition: color 1s; margin-left: 4px; }
.marca-punto { width: 10px; height: 10px; border-radius: 50%; background: var(--c2); box-shadow: 0 0 14px var(--c2); }
.etiqueta-previa { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--oro); border: 1px solid rgba(255,184,0,.45); border-radius: 99px; padding: 3px 9px; }
.barra-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.barra-nav > a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 500; opacity: .85; }
.barra-nav > a:not(.btn):hover { opacity: 1; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: 14px; border: 0;
  font: 700 16px var(--body); text-decoration: none; text-align: center;
  transition: transform .25s var(--curva), box-shadow .25s, background .25s;
}
.btn:active { transform: scale(.97); }
.btn-primario {
  background: linear-gradient(135deg, var(--indigo), var(--cian)); color: #050712;
  box-shadow: 0 10px 34px -10px color-mix(in srgb, var(--cian) 70%, transparent);
}
.btn-primario:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px var(--cian); }
.btn-secundario { background: rgba(255,255,255,.07); color: var(--text); border: 1px solid rgba(255,255,255,.18); }
.btn-secundario:hover { background: rgba(255,255,255,.13); }
.btn-mini { white-space: nowrap; min-height: 44px; padding: 8px 16px; font-size: 14px; background: var(--text); color: var(--bg); }

/* ── El hilo (pentagrama vertical de navegación) ────────────────── */
.hilo { position: fixed; left: clamp(10px, 2vw, 28px); top: 96px; bottom: 40px; z-index: 40; width: 24px; }
.hilo-lineas { position: absolute; inset: 0; width: 24px; height: 100%; overflow: visible; }
.hilo-lineas path {
  fill: none; stroke: var(--c1); stroke-width: 1.2; vector-effect: non-scaling-stroke; opacity: .55;
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--avance, 0)); transition: stroke .8s;
}
.hilo::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 3.5px, rgba(255,255,255,.07) 3.5px 4.7px); background-size: 4px 100%; left: 3px; right: 3px; }
.hilo ol { list-style: none; position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.hilo a { position: relative; display: block; width: 24px; height: 24px; }
.hilo a::before {
  content: ''; position: absolute; left: 5px; top: 7px; width: 14px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid rgba(255,255,255,.45); transform: rotate(-20deg);
  transition: background .4s, border-color .4s, transform .4s var(--curva), box-shadow .4s;
}
.hilo a.pasado::before { background: rgba(255,255,255,.55); border-color: transparent; }
.hilo a[aria-current="step"]::before { background: var(--c2); border-color: var(--c2); transform: rotate(-20deg) scale(1.35); box-shadow: 0 0 16px var(--c2); }
.hilo a span {
  position: absolute; left: 32px; top: 50%; transform: translate(-6px, -50%); white-space: nowrap;
  font-size: 13px; font-weight: 500; background: rgba(8,10,15,.85); padding: 4px 10px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.hilo a:hover span, .hilo a:focus-visible span { opacity: 1; transform: translate(0, -50%); }

/* ── Morita ─────────────────────────────────────────────────────── */
.compa {
  --cx: 0px; --cy: 0px; --cs: 1; --tilt: 0deg; --mx: 0; --my: 0;
  position: fixed; z-index: 20; right: 7vw; bottom: 0; height: min(80vh, 760px); aspect-ratio: 580 / 1100;
  transform: translate3d(var(--cx), var(--cy), 0) scale(var(--cs));
  transform-origin: 50% 100%;
  transition: transform 1.1s var(--curva), opacity .7s;
  pointer-events: none;
}
.compa-cuerpo {
  position: absolute; inset: 0; background: none; border: 0; padding: 0; border-radius: 40% 40% 12% 12%;
  pointer-events: auto;
  transform: perspective(900px) rotateY(calc(var(--mx) * 8deg)) rotateX(calc(var(--my) * -4deg));
  transition: transform .5s var(--curva);
  filter: drop-shadow(0 0 1px rgba(255,255,255,.25)) drop-shadow(0 22px 30px rgba(0,0,0,.55));
}
.compa-cuerpo .pose {
  position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; max-width: none;
  transform: translateX(-50%) scale(.96); opacity: 0;
  transition: opacity .55s, transform .7s var(--curva);
  animation: respira 4.8s ease-in-out infinite;
  transform-origin: 50% 100%;
}
body[data-pose="acompana"] .pose[data-pose="acompana"],
body[data-pose="neutral"]  .pose[data-pose="neutral"],
body[data-pose="feliz"]    .pose[data-pose="feliz"],
body[data-pose="celebra"]  .pose[data-pose="celebra"],
body[data-pose="saluda"]   .pose[data-pose="saluda"],
body[data-pose="senala"]   .pose[data-pose="senala"],
body[data-pose="piano"]    .pose[data-pose="piano"],
body[data-pose="guitarra"] .pose[data-pose="guitarra"],
body[data-pose="bajo"]     .pose[data-pose="bajo"],
body[data-pose="canto"]    .pose[data-pose="canto"] { opacity: 1; transform: translateX(-50%) scale(1); }
.pose[data-pose="neutral"] { height: 93%; }
@keyframes respira {
  0%, 100% { translate: 0 0; scale: 1 1; }
  50% { translate: 0 -1.2%; scale: 1.004 1.012; }
}
.compa-cuerpo.salta { animation: salta .9s var(--curva); }
@keyframes salta {
  0% { transform: none; } 30% { transform: translateY(-9%) rotate(-3deg); }
  55% { transform: translateY(0) scale(1.03, .97); } 75% { transform: translateY(-3%) rotate(2deg); } 100% { transform: none; }
}
.compa-aura {
  position: absolute; left: -30%; right: -30%; top: 8%; bottom: 10%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c1) 55%, transparent), transparent);
  filter: blur(30px); opacity: .7; animation: aura 6s ease-in-out infinite;
}
@keyframes aura { 50% { opacity: .45; transform: scale(1.06); } }
.compa-sombra {
  position: absolute; left: 12%; right: 12%; bottom: -2%; height: 7%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,.75), transparent);
}
.morita-3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.compa.con-3d .pose { visibility: hidden; }
.pie-3d a { color: var(--cian); }
.compa-globo {
  position: absolute; right: 70%; top: 6%; width: max-content; max-width: 260px;
  background: #fff; color: #12131c; font-weight: 500; font-size: 15px; line-height: 1.4;
  padding: 12px 16px; border-radius: 18px 18px 4px 18px; box-shadow: 0 14px 40px -12px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(8px) scale(.96); transform-origin: 100% 100%;
  transition: opacity .35s, transform .45s var(--curva);
}
.compa-globo.visible { opacity: 1; transform: none; }
/* cuando Morita se hace pequeña, su globo se encoge con ella y no se lee: mejor ocultarlo */
body[data-escena="camino"] .compa-globo, body[data-escena="practica"] .compa-globo { display: none; }

/* Dónde está Morita en cada escena (escritorio) */
body[data-escena="empezar-cero"]   .compa { --cx: 2vw; --cs: .8; }
body[data-escena="camino"]         .compa { --cx: 3vw; --cs: .62; }
body[data-escena="practica"]       .compa { --cx: 4vw; --cy: 4vh; --cs: .46; }
body[data-escena="acompanamiento"] .compa { --cx: -2vw; --cs: .82; }
body[data-escena="progreso"]       .compa { --cs: .86; }
body[data-escena="musica"]         .compa { --cx: 1vw; --cs: .84; }
body[data-escena="empieza"]        .compa { --cy: 30vh; --cs: .5; opacity: 0; pointer-events: none; }
body[data-escena="empieza"]        .compa-cuerpo { pointer-events: none; }

/* Guía de bienvenida */
.guia {
  position: fixed; z-index: 55; right: clamp(16px, 4vw, 48px); bottom: 96px;
  width: min(360px, calc(100vw - 32px));
  background: rgba(16,18,28,.94); border: 1px solid rgba(255,255,255,.12); border-radius: 22px;
  padding: 20px 20px 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: entra .5s var(--curva);
}
@media (min-width: 1240px) {
  .guia { bottom: auto; top: 20vh; right: calc(7vw + min(80vh, 760px) * .36); }
}
@keyframes entra { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.guia-cerrar { position: absolute; right: 8px; top: 6px; width: 44px; height: 44px; background: none; border: 0; font-size: 26px; color: var(--muted); border-radius: 12px; }
.guia-cerrar:hover { color: var(--text); }
.guia-tipo { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.guia-titulo { font: 700 20px/1.25 var(--display); margin: 6px 40px 14px 0; }
.guia-opciones { display: flex; flex-direction: column; gap: 8px; }
.guia-opciones button {
  text-align: left; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); font-weight: 500;
  transition: background .2s, border-color .2s, transform .2s;
}
.guia-opciones button:hover { background: rgba(91,110,255,.18); border-color: var(--indigo); transform: translateX(3px); }
.guia-respuesta { margin-top: 4px; font-size: 16px; }
.guia-pie { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); font-size: 14px; }
.guia-pie a, .enlace-morita { display: inline-flex; align-items: center; min-height: 44px; color: var(--cian); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; padding: 0; font-size: 14px; }

/* ── Escenas ────────────────────────────────────────────────────── */
main { position: relative; z-index: 10; }
.escena {
  --p: 0;
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--barra) + 40px) clamp(56px, 8vw, 120px) 80px;
}
.texto { position: relative; max-width: 560px; }
.texto-ancho { max-width: 1080px; margin: 0 auto; width: 100%; }
.ceja { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--c2); transition: color 1s; margin-bottom: 14px; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.025em; line-height: 1.02; }
h1 { font-size: clamp(36px, 5.6vw, 90px); }
h2 { font-size: clamp(30px, 3.7vw, 54px); }
h3 { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.linea { display: block; }
.acento { background: linear-gradient(100deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bajada { font-size: clamp(17px, 1.5vw, 20px); color: #D5D9EC; margin-top: 22px; max-width: 520px; }
.aparte { margin-top: 26px; color: var(--muted); font-size: 15.5px; max-width: 520px; }
.aparte b { color: var(--text); }
.letra-chica { margin-top: 12px; font-size: 14px; color: var(--muted); }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Aparición de textos: solo con JS y movimiento permitido */
.js .escena .texto > * { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--curva), transform .9s var(--curva); }
.js .escena.vista .texto > * { opacity: 1; transform: none; }
.js .escena.vista .texto > *:nth-child(2) { transition-delay: .08s; }
.js .escena.vista .texto > *:nth-child(3) { transition-delay: .16s; }
.js .escena.vista .texto > *:nth-child(4) { transition-delay: .24s; }
.js .escena.vista .texto > *:nth-child(5) { transition-delay: .32s; }
.js .escena.vista .texto > *:nth-child(n+6) { transition-delay: .4s; }

/* 1 · Inicio: foco de escenario que se apaga al bajar */
.escena-inicio { padding-bottom: 120px; }
.escena-inicio h1 .linea:first-child { transform: translateX(calc(var(--s, 0) * -8vw)); opacity: calc(1 - var(--s, 0) * .9); }
.escena-inicio h1 .linea.acento { transform: translateX(calc(var(--s, 0) * 5vw)); }
.escena-inicio .texto { max-width: min(640px, 54vw); }
.escenario { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.foco {
  position: absolute; right: 2vw; top: -10vh; width: 46vw; height: 120vh;
  background: conic-gradient(from 180deg at 50% 0%, transparent 160deg, color-mix(in srgb, var(--c2) 22%, transparent) 175deg, rgba(255,255,255,.18) 180deg, color-mix(in srgb, var(--c2) 22%, transparent) 185deg, transparent 200deg);
  filter: blur(14px); opacity: calc(1 - var(--s, 0) * 1.4); transform-origin: 50% 0;
  animation: foco 9s ease-in-out infinite;
}
@keyframes foco { 50% { transform: rotate(2.5deg); } }
.suelo {
  position: absolute; right: 0; bottom: 0; width: 60vw; height: 22vh;
  background: radial-gradient(50% 60% at 60% 100%, color-mix(in srgb, var(--c1) 35%, transparent), transparent 70%);
}
.bajar { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; margin-top: 46px; color: var(--muted); text-decoration: none; font-size: 15px; }
.bajar span { display: inline-block; animation: bajar 1.8s ease-in-out infinite; }
@keyframes bajar { 50% { transform: translateY(6px); } }

/* 2 · Pentagrama */
.pentagrama { margin-top: 30px; max-width: 560px; }
.pentagrama svg { width: 100%; height: auto; overflow: visible; }
/* mismos gráficos del entrenamiento: VexFlow, clave dorada, nota blanca con brillo cian */
.penta-lineas path { fill: none; stroke: rgba(255,255,255,.42); stroke-width: 1; stroke-dasharray: 300; stroke-dashoffset: calc(300 - 300 * min(1, var(--p) * 2.4)); }
.penta-lineas .barra { stroke: rgba(255,255,255,.3); stroke-dasharray: none; stroke-dashoffset: 0; opacity: calc(min(1, var(--p) * 2.4)); }
.penta-clave { fill: rgba(255,184,0,.9); opacity: calc(min(1, var(--p) * 2.4)); filter: drop-shadow(0 0 3px rgba(255,184,0,.35)); }
.penta-nota { opacity: 0; transform: translateY(-40px); transition: opacity .3s, transform .7s cubic-bezier(.3, 1.6, .5, 1); }
.penta-nota.cae { opacity: 1; transform: none; }
.penta-nota .cabeza { fill: #EEF0FF; filter: drop-shadow(0 0 3px rgba(0,229,255,.75)); }
.penta-nota .plica { fill: none; stroke: rgba(238,240,255,.82); stroke-width: 1.5; }
.penta-nota .adicional { fill: none; stroke: rgba(238,240,255,.7); stroke-width: 1.4; }
.penta-nota .nombre { fill: var(--text); font: 700 7px var(--body); text-anchor: middle; }
.penta-nota .onda { fill: none; stroke: #00E5FF; stroke-width: 1; opacity: 0; transform-origin: 162px 96px; transform-box: view-box; }
.penta-nota.suena .onda { animation: onda 1.3s ease-out; }
.penta-nota.suena .onda2 { animation-delay: .25s; }
@keyframes onda { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(5.5); } }
.btn-nota { margin-top: 16px; background: rgba(0,229,255,.12); border: 1px solid rgba(0,229,255,.45); color: var(--text); }
.btn-nota:hover { background: rgba(0,229,255,.22); }

/* 3 · Camino */
.instrumentos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.instrumentos button {
  min-height: 48px; padding: 10px 18px; border-radius: 99px; font-weight: 700;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
  transition: background .25s, border-color .25s, transform .25s var(--curva), box-shadow .25s;
}
.instrumentos button:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.4); }
.instrumentos button[aria-pressed="true"] { background: var(--c1); border-color: var(--c1); color: #07080d; box-shadow: 0 10px 30px -8px var(--c1); }
.camino-detalle { margin-top: 24px; min-height: 120px; padding: 18px 20px; border-radius: 18px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); }
.camino-msg { font-size: 18px; }
.camino-enlaces { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.camino-enlaces a, .camino-enlaces button { color: var(--c2); font-weight: 700; background: none; border: 0; padding: 6px 0; text-decoration: underline; text-underline-offset: 4px; }
.camino-foto {
  position: absolute; right: 16vw; top: 50%; width: min(36vw, 520px); aspect-ratio: 500 / 340;
  transform: translateY(-50%) perspective(1000px) rotateY(-14deg) rotateZ(2deg) translateY(calc((var(--p) - .5) * -60px));
  border-radius: 26px; overflow: hidden; opacity: .9;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08), 0 0 80px -20px var(--c1);
  transition: box-shadow 1s;
}
.camino-foto img { width: 100%; height: 100%; object-fit: cover; transition: opacity .45s, transform 1.4s var(--curva); }
.camino-foto img.cambia { opacity: 0; transform: scale(1.08); }

/* 4 · Práctica: escena alta con un tramo fijo */
.escena-practica { display: block; padding: 0; min-height: 0; height: 400vh; }
.fija {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(300px, 520px) 1fr; align-items: center; gap: 4vw;
  padding: calc(var(--barra) + 20px) clamp(56px, 8vw, 120px) 40px;
}
.herramientas { list-style: none; margin-top: 26px; display: grid; gap: 6px; counter-reset: h; }
.herramientas li {
  counter-increment: h; position: relative; padding: 12px 16px 12px 52px; border-radius: 14px;
  opacity: .42; transition: opacity .5s, background .5s;
}
.herramientas li::before { content: '0' counter(h); position: absolute; left: 14px; top: 13px; font: 800 14px var(--display); color: var(--c2); }
.herramientas li p { font-size: 15.5px; color: var(--muted); max-height: 0; overflow: hidden; transition: max-height .6s var(--curva); }
.herramientas li.activa { opacity: 1; background: rgba(255,255,255,.055); }
.herramientas li.activa p { max-height: 80px; color: #D5D9EC; }
.pantallas { position: relative; height: min(56vh, 520px); perspective: 1400px; }
.pantallas figure {
  --k: 0;
  position: absolute; inset: 0; margin: auto; width: min(100%, 760px); height: fit-content;
  border-radius: 18px; overflow: hidden; background: #0b0d16;
  box-shadow: 0 50px 100px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.1), 0 0 60px -20px var(--c1);
  transform: translate3d(calc(var(--k) * 9%), calc(var(--k) * -7%), calc(var(--k) * -260px)) rotateY(-16deg) rotateX(4deg);
  /* la del frente siempre encima; las de atrás, detrás y más oscuras (sin desenfoque: se veía sucio) */
  z-index: calc(10 - var(--k));
  opacity: calc(1 - var(--k) * .28);
  transition: transform 1s var(--curva), opacity .8s, filter .8s;
  filter: brightness(calc(1 - var(--k) * .3));
}
.pantallas figure.salio { transform: translate3d(-40%, 30%, 160px) rotateY(-16deg); opacity: 0; z-index: 11; pointer-events: none; }
.pantallas img { width: 100%; height: auto; }

/* 5 · Acompañamiento */
.trio { list-style: none; display: grid; gap: 14px; margin-top: 30px; position: relative; }
.trio::before { content: ''; position: absolute; left: 33px; top: 30px; bottom: 30px; width: 2px; background: linear-gradient(var(--c2), var(--c1)); opacity: .5; }
.nodo { position: relative; display: grid; grid-template-columns: 68px 1fr; column-gap: 16px; align-items: start; }
.nodo-icono {
  grid-row: span 2; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; font-size: 28px;
  background: #11131e; border: 2px solid color-mix(in srgb, var(--c1) 60%, transparent); box-shadow: 0 0 30px -8px var(--c1);
}
.nodo-icono img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.nodo h3 { margin-top: 6px; }
.nodo p { color: #C9CEE3; font-size: 16px; }
.js .escena-acompana .nodo { opacity: 0; transform: translateX(-20px); transition: opacity .7s, transform .8s var(--curva); }
.js .escena-acompana.vista .nodo { opacity: 1; transform: none; }
.js .escena-acompana.vista .nodo:nth-child(2) { transition-delay: .35s; }
.js .escena-acompana.vista .nodo:nth-child(3) { transition-delay: .7s; }

/* 6 · Progreso */
.escena-progreso { overflow: hidden; }
.mundos { position: absolute; inset: 0; pointer-events: none; }
.mundos img {
  position: absolute; width: 30vw; max-width: 420px; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 16px;
  opacity: .5; box-shadow: 0 30px 60px -20px rgba(0,0,0,.9);
  transform: translateY(calc((var(--p) - .5) * var(--v, 100px)));
}
.mundos img:nth-child(1) { right: 34vw; top: 8vh;  --v: 160px; width: 18vw; }
.mundos img:nth-child(2) { right: 4vw;  top: 12vh; --v: 260px; width: 22vw; opacity: .35; }
.mundos img:nth-child(3) { right: 30vw; bottom: 6vh; --v: 120px; width: 16vw; opacity: .3; }
.mundos img:nth-child(4) { right: 8vw;  bottom: 10vh; --v: 220px; width: 14vw; opacity: .28; }
.mundos img:nth-child(5) { right: 46vw; top: 40vh; --v: 300px; width: 10vw; opacity: .22; }
.escena-progreso .texto { background: radial-gradient(closest-side, rgba(8,10,15,.78), rgba(8,10,15,0)); padding: 20px; margin: -20px; }
.mundos-lista { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.mundos-lista li { font-size: 14px; padding: 6px 12px 6px 6px; border-radius: 99px; background: rgba(255,255,255,.07); display: flex; align-items: center; gap: 8px; }
.mundos-lista b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--c1); color: #0a0a0a; font-size: 13px; }
.racha { margin-top: 26px; padding: 18px 20px; border-radius: 18px; background: rgba(255,184,0,.07); border: 1px solid rgba(255,184,0,.25); }
.racha-tipo { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--oro); }
.racha-dias { display: flex; gap: 8px; margin: 12px 0 8px; }
.racha-dias i { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); transition: background .3s, transform .4s var(--curva), box-shadow .3s; }
.racha-dias i.ok { background: radial-gradient(circle at 50% 70%, #FFE27A, #FF7A00); border-color: transparent; transform: scale(1.12); box-shadow: 0 0 18px -2px #FF9A00; }
.racha-estado { font-weight: 700; margin-bottom: 12px; }
.racha-premios { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

/* 7 · Música */
.teclado { display: flex; gap: 6px; margin-top: 28px; max-width: 560px; }
.teclado button {
  flex: 1; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px;
  padding-bottom: 12px; border-radius: 0 0 12px 12px; border: 0;
  background: linear-gradient(180deg, #E9ECF8, #FFFFFF 70%, #D8DCEC); color: #2a2c3a; font-weight: 700; font-size: 14px;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.12), 0 18px 30px -18px rgba(0,0,0,.9);
  transition: transform .08s, background .2s, box-shadow .2s;
}
.teclado kbd { font: 500 11px var(--body); color: #7a7f95; }
.teclado button.on, .teclado button:active {
  transform: translateY(3px); background: linear-gradient(180deg, var(--c1), #fff 90%);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12), 0 0 34px -4px var(--c1);
}

/* 8 · Empezar */
.escena-empieza { padding-top: calc(var(--barra) + 60px); }
.escena-empieza h2 { text-align: center; }
.escena-empieza .ceja { text-align: center; }
.caminos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.via {
  display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.1);
}
.via p { color: #C9CEE3; font-size: 15.5px; flex: 1; }
.via-prueba { border-color: rgba(0,229,255,.4); box-shadow: 0 0 60px -30px var(--cian); }
.planes { margin-top: 56px; }
.planes h3, .faq h3 { font-size: 26px; }
.planes-fuente { color: var(--muted); font-size: 14px; margin-top: 4px; }
.planes-tabla { margin-top: 16px; display: grid; gap: 8px; }
.plan-fila {
  display: grid; grid-template-columns: 1.4fr 1.5fr 1fr; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 14px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07);
}
.plan-fila b { font-family: var(--display); font-size: 17px; }
.plan-fila .plan-que { color: #C9CEE3; font-size: 15px; }
.plan-fila .plan-precio { text-align: right; font-weight: 700; font-size: 18px; }
.plan-fila .plan-precio small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.plan-fila.prueba { border-color: rgba(0,229,255,.35); }
.empresas { margin-top: 36px; text-align: center; color: var(--muted); }
.faq { margin-top: 56px; max-width: 760px; }
.faq details { border-bottom: 1px solid rgba(255,255,255,.1); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: '+'; color: var(--c2); font-size: 22px; line-height: 1; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: #C9CEE3; }
.pie { position: relative; z-index: 10; text-align: center; padding: 40px 20px 60px; color: var(--muted); font-size: 14px; display: grid; gap: 8px; }
.pie a { color: var(--muted); }

/* ── Celular ───────────────────────────────────────────────────── */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .barra { height: 58px; --barra: 58px; }
  .barra-nav > a:not(.btn) { display: none; }
  .etiqueta-previa { display: none; }
  .marca { font-size: 17px; }
  /* el hilo se vuelve una línea fina de progreso arriba */
  .hilo { top: 58px; left: 0; right: 0; bottom: auto; width: auto; height: 3px; }
  .hilo::before, .hilo-lineas, .hilo a span { display: none; }
  .hilo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--c1), var(--c2)); transform-origin: 0 50%; transform: scaleX(var(--avance, 0)); }
  .hilo ol { display: none; }
  h1 { font-size: 38px; }
  h2 { font-size: 31px; }
  .escena { padding: calc(58px + 33vh) 20px 104px; align-items: flex-start; }
  /* el botón real del chat (morita-chat.js) no tapa el botón principal de la primera pantalla */
  #morita-fab { transition: opacity .4s, transform .4s; }
  body[data-escena="inicio"] #morita-fab { opacity: 0; pointer-events: none; transform: translateY(24px); }
  .escena-inicio { padding-top: calc(58px + 31vh); }
  .escena-inicio .texto { max-width: none; }
  .texto { max-width: none; }
  .bajada, .aparte { max-width: none; }
  .acciones .btn { flex: 1 1 100%; }
  /* Morita arriba, pequeña y sin tapar texto: el texto empieza debajo de ella */
  .compa { right: 50%; height: 30vh; top: 66px; bottom: auto; margin-right: calc(-30vh * 580 / 1100 / 2); }
  body:not([data-escena="inicio"]) .compa { --cs: 1; --cx: 0px; --cy: 0px; }
  body[data-escena="inicio"] .compa { --cs: 1; --cy: 0px; }
  body.lejos .compa { opacity: 0; }
  body[data-escena="camino"] .compa, body[data-escena="practica"] .compa, body[data-escena="empieza"] .compa { opacity: 0; pointer-events: none; }
  body[data-escena="camino"] .compa-cuerpo, body[data-escena="practica"] .compa-cuerpo { pointer-events: none; }
  .compa-globo { display: none; }
  .foco { right: 10vw; width: 80vw; }
  .suelo { width: 100vw; top: 20vh; bottom: auto; height: 30vh; }
  .escena-camino { padding-top: calc(58px + 30vh); }
  .camino-foto { right: 6vw; left: 6vw; top: calc(58px + 3vh); width: auto; transform: perspective(900px) rotateX(8deg); aspect-ratio: auto; height: 24vh; }
  .escena-practica { height: auto; }
  .fija { position: relative; height: auto; display: block; padding: 90px 20px 40px; overflow: visible; }
  .herramientas li { opacity: 1; }
  .herramientas li p { max-height: none; color: #D5D9EC; }
  .pantallas { height: auto; margin-top: 20px; display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; perspective: none; padding-bottom: 8px; }
  .pantallas figure { position: relative; inset: auto; transform: none !important; opacity: 1 !important; filter: none !important; scroll-snap-align: start; }
  .mundos img { opacity: .18 !important; width: 40vw !important; }
  .escena-progreso .texto { padding: 0; margin: 0; background: none; }
  .teclado button { min-height: 120px; font-size: 12px; }
  .teclado kbd { display: none; }
  .escena-empieza { padding-top: 90px; }
  .caminos { grid-template-columns: 1fr; }
  .plan-fila { grid-template-columns: 1fr auto; }
  .plan-fila .plan-que { grid-column: 1 / -1; grid-row: 2; font-size: 14px; }
  .guia { left: 12px; right: 12px; bottom: 12px; width: auto; }
}
@media (max-width: 360px) {
  h1 { font-size: 34px; }
  h2 { font-size: 28px; }
  .instrumentos button { padding: 8px 14px; }
}

/* ── Menos movimiento: todo visible, sin desplazamientos ligados al scroll ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .escena .texto > *, .js .escena-acompana .nodo { opacity: 1 !important; transform: none !important; }
  .escena { --p: .5 !important; }
  .penta-lineas path { stroke-dashoffset: 0; }
  .penta-clave { opacity: 1; }
  .escena-practica { height: auto; }
  .fija { position: relative; height: auto; }
  .herramientas li { opacity: 1; }
  .herramientas li p { max-height: none; }
  .pantallas figure:not(:first-child) { display: none; }
  .pantallas figure { transform: none !important; opacity: 1 !important; filter: none !important; }
}

/* ── Teatro: la historia en un escenario fijo ─────────────────────────
   La pantalla no se desplaza: los capítulos se apilan en .tablado y el
   desplazamiento solo decide cuál está en escena (experiencia.js, «teatro»).
   Al cambiar, el texto viejo se va hacia arriba en su sitio y el nuevo entra
   escalonado; Morita se mueve y cambia de pose y la luz del fondo se funde.
   Sin JS o con «reducir movimiento» no se activa: se lee de corrido. */
html.teatro { scroll-snap-type: y proximity; }
.teatro .historia { position: relative; height: var(--largo, 1000vh); }
.teatro .tablado { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.historia .paso { position: absolute; left: 0; width: 1px; height: 1px; scroll-snap-align: start; pointer-events: none; }
.teatro .historia .escena {
  position: absolute; inset: 0; min-height: 0; height: 100%;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .5s ease, visibility 0s linear .6s;
}
.teatro .historia .escena.activa { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .6s ease .12s, visibility 0s; }
.teatro .historia .escena.salio { visibility: visible; }
/* lo que se va: sube y se desvanece en su sitio, sin esperar a nadie */
.teatro .historia .escena.salio .texto > *,
.teatro .historia .escena.salio .nodo { opacity: 0; transform: translateY(-26px); filter: blur(5px); transition: opacity .38s ease, transform .5s ease, filter .4s ease; transition-delay: 0s !important; }
/* lo que llega: un poco más tarde, para que no se monten */
.teatro .historia .escena.activa .texto > * { transition-delay: .22s; }
.teatro .historia .escena.activa .texto > *:nth-child(2) { transition-delay: .32s; }
.teatro .historia .escena.activa .texto > *:nth-child(3) { transition-delay: .42s; }
.teatro .historia .escena.activa .texto > *:nth-child(4) { transition-delay: .52s; }
.teatro .historia .escena.activa .texto > *:nth-child(5) { transition-delay: .62s; }
.teatro .historia .escena.activa .texto > *:nth-child(n+6) { transition-delay: .72s; }
/* los decorados de cada capítulo entran con un leve acercamiento */
.teatro .historia .escena > :not(.texto):not(.fija),
.teatro .historia .pantallas { transition: opacity .8s ease, scale 1.2s var(--curva); scale: 1.06; opacity: 0; }
.teatro .historia .escena.activa > :not(.texto):not(.fija),
.teatro .historia .escena.activa .pantallas { scale: 1; opacity: 1; transition-delay: .15s; }
/* el pentagrama se dibuja al entrar el capítulo */
.teatro .penta-lineas path { transition: stroke-dashoffset 1.6s var(--curva) .45s; }
.teatro .penta-clave { transition: opacity 1s ease .9s; }
.teatro .escena-inicio h1 .linea { transform: none; opacity: 1; }
.teatro .escena-practica { height: 100%; }
.teatro .fija { position: absolute; inset: 0; height: 100%; }

/* Teatro en el celular: todo el capítulo cabe en una pantalla, Morita arriba más pequeña */
@media (max-width: 860px) {
  .teatro .compa { height: 23vh; margin-right: calc(-23vh * 580 / 1100 / 2); }
  .teatro .historia .escena { padding: calc(58px + 24vh) 18px 86px; }
  .teatro h1 { font-size: 33px; }
  .teatro .historia h2 { font-size: 27px; }
  .teatro .historia .ceja { font-size: 11.5px; margin-bottom: 8px; }
  .teatro .historia .bajada { font-size: 15.5px; margin-top: 12px; }
  .teatro .historia .aparte { font-size: 13.5px; margin-top: 12px; }
  .teatro .historia .letra-chica { font-size: 12.5px; margin-top: 8px; }
  .teatro .escena-inicio .acciones { margin-top: 18px; gap: 8px; }
  .teatro .escena-inicio .bajar { display: none; }
  .teatro .pentagrama { margin-top: 14px; }
  /* camino: Morita toca el instrumento elegido; la foto sobra */
  .teatro .camino-foto { display: none; }
  .teatro body[data-escena="camino"] .compa { opacity: 1; }
  .teatro .instrumentos { margin-top: 16px; gap: 8px; }
  .teatro .camino-detalle { margin-top: 14px; min-height: 0; padding: 14px 16px; }
  .teatro .camino-msg { font-size: 15.5px; }
  /* herramientas: una pantalla y una herramienta a la vez, como en el computador */
  .teatro .fija { display: flex; flex-direction: column; padding: 74px 18px 86px; gap: 14px; }
  .teatro .pantallas { order: -1; display: block; position: relative; height: 25vh; overflow: visible; padding: 0; perspective: none; }
  .teatro .pantallas figure { position: absolute; inset: 0; margin: 0 auto; width: fit-content; height: 100%; opacity: 0 !important; transition: opacity .5s ease; }
  .teatro .pantallas figure.frente { opacity: 1 !important; }
  .teatro .pantallas img { height: 100%; width: auto; }
  .teatro .herramientas { margin-top: 12px; gap: 2px; }
  .teatro .herramientas li { opacity: .45; padding: 8px 12px 8px 44px; }
  .teatro .herramientas li::before { top: 9px; }
  .teatro .herramientas li h3 { font-size: 17px; }
  .teatro .herramientas li p { max-height: 0; }
  .teatro .herramientas li.activa { opacity: 1; }
  .teatro .herramientas li.activa p { max-height: 90px; font-size: 14.5px; }
  .teatro .escena-practica .aparte { display: none; }
  /* acompañamiento y progreso: más compactos */
  .teatro .trio { gap: 8px; margin-top: 14px; }
  .teatro .trio::before { left: 21px; }
  .teatro .nodo { grid-template-columns: 44px 1fr; column-gap: 12px; }
  .teatro .nodo-icono { width: 44px; height: 44px; font-size: 20px; }
  .teatro .nodo-icono img { width: 36px; height: 36px; }
  .teatro .nodo h3 { font-size: 17px; margin-top: 0; }
  .teatro .nodo p { font-size: 13.5px; }
  .teatro .mundos-lista { gap: 6px; margin-top: 12px; }
  .teatro .mundos-lista li { font-size: 12px; padding: 4px 10px 4px 4px; }
  .teatro .mundos-lista b { width: 20px; height: 20px; font-size: 11px; }
  .teatro .racha { margin-top: 12px; padding: 12px 14px; }
  .teatro .racha-dias { margin: 8px 0 6px; }
  .teatro .racha-dias i { width: 24px; height: 24px; }
  .teatro .racha-estado { margin-bottom: 8px; }
  .teatro .racha-premios { font-size: 12px; margin-top: 8px; }
  .teatro .teclado { margin-top: 16px; }
}
@media (max-width: 860px) {
  /* capítulos con más texto: Morita se encoge hacia arriba y deja sitio */
  .teatro .compa { transform-origin: 50% 0; }
  .teatro body[data-escena="acompanamiento"] .compa,
  .teatro body[data-escena="progreso"] .compa { --cs: .72; }
  .teatro .historia .escena-acompana,
  .teatro .historia .escena-progreso { padding-top: calc(58px + 17.5vh); }
}
@media (max-width: 860px) and (max-height: 780px) {
  .teatro .historia h2 { font-size: 25px; }
  .teatro .mundos-lista { display: none; }
  .teatro .nodo p { font-size: 13px; }
  .teatro .racha-premios { font-size: 11.5px; }
}
@media (max-width: 860px) and (max-height: 780px) {
  /* la clase de cortesía también está en «Aprender con un profe», al final */
  .teatro .escena-acompana .aparte { display: none; }
}
@media (max-width: 860px) {
  .teatro .pantallas figure { width: min(100%, calc(25vh * 1.6)); height: auto; inset: 0 0 auto; }
  .teatro .pantallas img { width: 100%; height: auto; }
}
@media (max-width: 860px) { .teatro .pantallas { align-self: stretch; width: 100%; } }

/* ══ Lo que venía de la portada en producción (30-nov) ══════════════════ */
/* Dónde está Morita en los capítulos nuevos (escritorio) */
body[data-escena="video"]  .compa { --cx: 5vw; --cy: 6vh; --cs: .46; }
body[data-escena="zonas"]  .compa { --cx: 6vw; --cy: 8vh; --cs: .44; }
body[data-escena="mundos"] .compa { --cx: 2vw; --cs: .74; }
body[data-escena="video"] .compa-globo, body[data-escena="zonas"] .compa-globo { display: none; }

/* camino: los demás instrumentos */
.otros-ins { margin-top: 18px; }
.otros-ins > p:first-child { font-size: 14px; color: var(--muted); }
.otros-ins ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.otros-ins li { font-size: 13px; padding: 5px 11px; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #D5D9EC; }
.otros-ins .aparte { margin-top: 10px; font-size: 13.5px; }

/* vídeo */
.texto-video { max-width: min(900px, 60vw); }
.video-marco {
  position: relative; margin-top: 22px; border-radius: 18px; overflow: hidden; background: #06080E; aspect-ratio: 16 / 9;
  box-shadow: 0 50px 100px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.1), 0 0 70px -20px var(--c1);
}
.video-marco video { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.video-play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  background: rgba(8,10,15,.6); border: 2px solid rgba(255,255,255,.7); color: #fff; font-size: 26px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: opacity .3s, transform .3s var(--curva);
}
.video-play:hover { transform: scale(1.06); }
.video-marco.sonando .video-play { opacity: 0; pointer-events: none; }
.video-sonido {
  position: absolute; left: 12px; bottom: 12px; min-height: 40px; padding: 6px 14px; border-radius: 99px;
  background: rgba(8,10,15,.7); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 14px; font-weight: 700;
}
.video-capitulos { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.video-capitulos button {
  min-height: 34px; padding: 5px 12px; border-radius: 99px; font-size: 13px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #D5D9EC;
}
.video-capitulos button:hover { border-color: rgba(255,255,255,.4); }
.video-capitulos button[aria-current] { background: var(--c1); border-color: var(--c1); color: #07080d; font-weight: 700; }

/* zonas */
.zonas-foto {
  position: absolute; right: 13vw; top: 50%; width: min(36vw, 540px); aspect-ratio: 3 / 2; margin: 0;
  transform: translateY(-50%) perspective(1000px) rotateY(-12deg) rotateZ(-1.5deg);
  border-radius: 26px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08), 0 0 80px -20px var(--c1);
}
.zonas-foto img { width: 100%; height: 100%; object-fit: cover; }
.zonas-lista { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.zonas-lista li { padding: 8px 14px 8px 30px; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); font-weight: 700; font-size: 15px; position: relative; }
.zonas-lista li::before { content: '📍'; position: absolute; left: 9px; font-size: 13px; }
.escena-zonas .aparte a { color: var(--c2); }

/* los 5 mundos: el fondo de cada mundo a toda pantalla */
.escena-mundos { overflow: hidden; }
.mundos-fondo { position: absolute; inset: 0; pointer-events: none; }
.mundos-fondo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; scale: 1.08; transition: opacity 1s ease, scale 6s ease-out; }
.mundos-fondo img.activa { opacity: .75; scale: 1; }
.mundos-fondo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,10,15,.94) 0%, rgba(8,10,15,.8) 38%, rgba(8,10,15,.15) 75%), linear-gradient(0deg, rgba(8,10,15,.7), transparent 30%); }
.mundos-pasos { list-style: none; margin-top: 24px; display: grid; gap: 4px; }
.mundos-pasos li { padding: 10px 14px; border-radius: 14px; opacity: .45; transition: opacity .5s, background .5s; }
.mundos-pasos h3 { display: flex; align-items: center; gap: 10px; font-size: 19px; }
.mundos-pasos h3 b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--c1); color: #07080d; font-size: 14px; flex: none; }
.mundos-pasos h3 small { font: 500 13px var(--body); color: var(--muted); letter-spacing: 0; }
.mundos-pasos p { font-size: 15px; color: #D5D9EC; max-height: 0; overflow: hidden; transition: max-height .6s var(--curva); padding-left: 38px; }
.mundos-pasos li.activa { opacity: 1; background: rgba(8,10,15,.55); }
.mundos-pasos li.activa p { max-height: 90px; margin-top: 4px; }
html:not(.teatro) .mundos-pasos li { opacity: 1; }
html:not(.teatro) .mundos-pasos p { max-height: none; }

/* progreso: misiones y medallas reales */
.misiones { list-style: none; display: grid; gap: 6px; margin-top: 18px; }
.misiones li { font-size: 14.5px; color: #C9CEE3; padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.05); }
.misiones b { color: var(--text); }
.misiones span { color: var(--oro); font-weight: 700; }
.racha-premios b { color: var(--text); }
.medallas { position: absolute; left: calc(clamp(56px, 8vw, 120px) + 600px); top: 50%; transform: translateY(-50%); display: grid; gap: 14px; pointer-events: none; }
.medalla { display: grid; grid-template-columns: 62px auto; column-gap: 12px; align-items: center; animation: flota 6s ease-in-out infinite; }
.medalla:nth-child(2) { animation-delay: -1.2s; } .medalla:nth-child(3) { animation-delay: -2.4s; } .medalla:nth-child(4) { animation-delay: -3.6s; } .medalla:nth-child(5) { animation-delay: -4.8s; }
.medalla svg { grid-row: span 2; width: 62px; height: 62px; }
.medalla b { font-family: var(--display); font-size: 15px; align-self: end; }
.medalla small { font-size: 12px; color: var(--muted); align-self: start; }
@keyframes flota { 50% { transform: translateY(-6px); } }
@media (max-width: 1240px) { .medallas { display: none; } }

/* final: tres pasos, planes en placas y pie completo */
.legal { text-align: center; }
.legal a, .planes .letra-chica a { color: var(--muted); }
.pasos3 { margin-top: 56px; }
.pasos3 h3 { font-size: 26px; }
.pasos3 ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.pasos3 li { padding: 20px; border-radius: 18px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08); }
.pasos3 li > b { font: 800 14px var(--display); color: var(--c2); }
.pasos3 h4 { font: 700 18px var(--display); margin: 6px 0; }
.pasos3 p { color: #C9CEE3; font-size: 15px; }
.planes-eleccion { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(0,229,255,.08); border: 1px solid rgba(0,229,255,.3); font-weight: 700; }
.planes-tarjetas { margin-top: 18px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.plan-tarjeta {
  --metal: #9FE8FF;
  display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; border-radius: 20px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--metal) 16%, transparent), rgba(255,255,255,.02) 55%);
  border: 1px solid color-mix(in srgb, var(--metal) 45%, transparent);
  box-shadow: 0 0 40px -24px var(--metal);
}
.metal-bronce { --metal: #D08C5B; } .metal-plata { --metal: #C9D1DC; } .metal-oro { --metal: #FFB800; } .metal-platino { --metal: #DCD8FF; }
.plan-metal { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--metal); }
.plan-nombre { font: 700 18px/1.2 var(--display); }
.plan-lema { font-size: 13.5px; color: var(--muted); }
.plan-tarjeta .plan-precio { font: 800 24px var(--display); margin-top: 6px; text-align: left; }
.plan-tarjeta .plan-precio small { display: block; font: 400 12px var(--body); color: var(--muted); }
.plan-gancho { font-size: 13px; color: var(--metal); }
.plan-rasgos { list-style: none; display: grid; gap: 5px; margin: 8px 0 12px; flex: 1; }
.plan-rasgos li { font-size: 13.5px; color: #D5D9EC; padding-left: 20px; position: relative; }
.plan-rasgos li::before { content: '✓'; position: absolute; left: 0; color: var(--metal); font-weight: 700; }
.plan-rasgos li.no { color: var(--muted); text-decoration: line-through; }
.plan-rasgos li.no::before { content: '–'; color: var(--muted); }
.plan-tarjeta .btn { justify-content: center; text-align: center; min-height: 44px; font-size: 14px; padding: 10px 12px; }
.pie { text-align: left; padding: 56px clamp(20px, 8vw, 120px) 40px; border-top: 1px solid rgba(255,255,255,.08); }
.pie-rejilla { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 28px; max-width: 1180px; margin: 0 auto; }
.pie h4 { font: 700 15px var(--display); color: var(--text); margin-bottom: 8px; }
.pie nav { display: grid; gap: 6px; align-content: start; }
.pie-marca .marca { font-size: 18px; margin-bottom: 8px; }
.pie-marca p, .pie-profes p { margin-bottom: 8px; }
.pie-profes a { color: var(--c2); font-weight: 700; }
.pie-copy { max-width: 1180px; margin: 28px auto 0; font-size: 13px; }

@media (max-width: 1100px) {
  .planes-tarjetas { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(240px, 78%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .plan-tarjeta { scroll-snap-align: start; }
}
@media (max-width: 860px) {
  .pasos3 ol { grid-template-columns: 1fr; }
  .pie-rejilla { grid-template-columns: 1fr; gap: 22px; }
  .texto-video { max-width: none; }
  /* teatro en el celular, capítulos nuevos */
  .teatro body[data-escena="video"] .compa, .teatro body[data-escena="zonas"] .compa { opacity: 0; pointer-events: none; }
  .teatro .historia .escena-video { padding-top: 84px; }
  .teatro .video-marco { margin-top: 14px; }
  .teatro .video-capitulos button { font-size: 12px; min-height: 30px; padding: 4px 10px; }
  .zonas-foto { right: 18px; left: 18px; top: calc(58px + 2vh); width: auto; height: 21vh; aspect-ratio: auto; transform: none; border-radius: 18px; }
  .teatro .zonas-lista { margin-top: 12px; gap: 6px; }
  .teatro .zonas-lista li { font-size: 13.5px; padding: 6px 11px 6px 27px; }
  .teatro .otros-ins { margin-top: 12px; }
  /* contain: su ancho no empuja el capítulo (sin esto el texto medía 1121 px en una pantalla de 390 y se cortaba) */
  .teatro .otros-ins ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-right: -18px; contain: inline-size; }
  .teatro .otros-ins li { white-space: nowrap; }
  .teatro .otros-ins .aparte { display: none; }
  .teatro .mundos-pasos { margin-top: 12px; gap: 2px; }
  .teatro .mundos-pasos li { padding: 6px 10px; }
  .teatro .mundos-pasos h3 { font-size: 16px; }
  .teatro .mundos-pasos p { font-size: 13.5px; }
  .mundos-fondo::after { background: linear-gradient(0deg, rgba(8,10,15,.96) 0%, rgba(8,10,15,.82) 62%, rgba(8,10,15,.25) 100%); }
  .teatro .misiones { margin-top: 10px; gap: 4px; }
  .teatro .misiones li { font-size: 12.5px; padding: 5px 10px; }
}
/* capas de un capítulo (progreso): en el teatro, una por paso y en el mismo sitio */
.teatro .capas { display: grid; }
.teatro .capa { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(18px); transition: opacity .4s ease, transform .6s var(--curva), visibility 0s linear .45s; }
.teatro .capa.activa { opacity: 1; visibility: visible; transform: none; transition: opacity .5s ease .1s, transform .6s var(--curva) .1s, visibility 0s; }
/* colores que usa el dibujo de las medallas (medalla-racha.js), los mismos de la portada en producción */
.medallas { --green: #00E09E; --gold: #FFB800; --coral: #FF6B8A; --purple: #A78BFF; --accent2: #00E5FF; }
.plan-tarjeta .plan-precio { font-size: clamp(19px, 1.55vw, 24px); white-space: nowrap; }
.plan-tarjeta .plan-precio { font-size: clamp(18px, 1.4vw, 23px); letter-spacing: -.02em; }
.planes-tarjetas { gap: 10px; }
.plan-tarjeta { padding: 18px 14px; }

/* ══ 10 · Cuánto cuesta: un plan por paso ══════════════════════════════ */
body[data-escena="precios"] .compa { --cx: 5vw; --cy: 10vh; --cs: .42; }
.escena-precios .texto { max-width: 500px; }
.aviso-instrumento:not(.planes-eleccion) { margin-top: 14px; font-weight: 700; color: var(--c2); }
.precios-lista { list-style: none; display: grid; gap: 4px; margin-top: 22px; }
.precios-lista li { --metal: #9FE8FF; padding: 10px 14px; border-radius: 14px; opacity: .45; transition: opacity .45s, background .45s, box-shadow .45s; }
.precios-lista li.metal-bronce { --metal: #D08C5B; } .precios-lista li.metal-plata { --metal: #C9D1DC; }
.precios-lista li.metal-oro { --metal: #FFB800; } .precios-lista li.metal-platino { --metal: #DCD8FF; }
.precios-fila { display: grid; grid-template-columns: 74px 1fr auto; align-items: baseline; gap: 10px; }
.precios-fila .plan-metal { font-size: 11px; }
.precios-fila b { font-family: var(--display); font-size: 17px; }
.precios-cifra { font: 800 17px var(--display); white-space: nowrap; }
.precios-lema { font-size: 14px; color: #C9CEE3; max-height: 0; overflow: hidden; transition: max-height .5s var(--curva); padding-left: 84px; }
.precios-lista li.activa { opacity: 1; background: color-mix(in srgb, var(--metal) 10%, rgba(255,255,255,.03)); box-shadow: inset 3px 0 0 var(--metal); }
.precios-lista li.activa .precios-lema { max-height: 60px; margin-top: 2px; }
.placas { position: absolute; right: 17vw; top: 50%; width: min(400px, 30vw); transform: translateY(-50%); perspective: 1200px; }
.placas .plan-tarjeta.grande { padding: 26px 24px; border-radius: 26px; gap: 8px; background-color: rgba(10,12,20,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 50px 100px -40px rgba(0,0,0,.95), 0 0 70px -20px var(--metal); }
.placas .grande .plan-nombre { font-size: 26px; }
.placas .grande .plan-lema { font-size: 15px; }
.placas .grande .plan-precio { font-size: clamp(36px, 3.4vw, 50px) !important; margin-top: 8px; }
.placas .grande .plan-gancho { font-size: 14.5px; }
.placas .grande .plan-rasgos li { font-size: 14.5px; }
.placas .grande .btn { font-size: 15px; min-height: 48px; }
/* la placa que se va gira y sale por la izquierda; la nueva entra por la derecha */
.teatro .placas .capa { transform: translateX(70px) rotateY(-14deg); transition: opacity .45s ease, transform .7s var(--curva), visibility 0s linear .5s; }
.teatro .placas .capa.activa { transform: none; transition: opacity .5s ease .12s, transform .8s var(--curva) .12s, visibility 0s; }
.teatro .placas .capa:not(.activa) { pointer-events: none; }
html:not(.teatro) .placas { display: none; }
html:not(.teatro) .precios-lista li { opacity: 1; }
html:not(.teatro) .precios-lema { max-height: none; }
@media (max-width: 1240px) { .placas { right: 6vw; width: min(380px, 36vw); } body[data-escena="precios"] .compa { opacity: 0; } }
@media (max-width: 860px) {
  .teatro body[data-escena="precios"] .compa { opacity: 0; pointer-events: none; }
  .teatro .historia .escena-precios { padding-top: 74px; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 12px; }
  .teatro .escena-precios .precios-lista, .teatro .escena-precios .aparte { display: none; }
  .teatro .escena-precios .aviso-instrumento { margin-top: 8px; font-size: 14px; }
  .placas { position: relative; right: auto; top: auto; width: 100%; transform: none; }
  .placas .plan-tarjeta.grande { padding: 18px 18px; gap: 5px; }
  .placas .grande .plan-nombre { font-size: 21px; }
  .placas .grande .plan-precio { font-size: 32px !important; margin-top: 2px; }
  .placas .grande .plan-rasgos { margin: 4px 0 8px; gap: 3px; }
  .placas .grande .plan-rasgos li { font-size: 13.5px; }
}
/* luz de los capítulos nuevos y, en «Cuánto cuesta», la del metal de cada placa */
body[data-escena="video"]   { --c1: #5B6EFF; --c2: #00E5FF; }
body[data-escena="zonas"]   { --c1: #FF4D6D; --c2: #FFB800; }
body[data-escena="mundos"]  { --c1: #00E09E; --c2: #5B6EFF; }
body[data-escena="precios"] { --c1: #9FE8FF; --c2: #5B6EFF; }
body[data-escena="precios"][data-plan="Bronce"]  { --c1: #D08C5B; --c2: #FF4D6D; }
body[data-escena="precios"][data-plan="Plata"]   { --c1: #C9D1DC; --c2: #5B6EFF; }
body[data-escena="precios"][data-plan="Oro"]     { --c1: #FFB800; --c2: #FF4D6D; }
body[data-escena="precios"][data-plan="Platino"] { --c1: #DCD8FF; --c2: #B388FF; }
@media (max-width: 860px) and (max-height: 780px) { .placas .grande .plan-rasgos li { font-size: 13px; } .placas .grande .plan-lema { font-size: 13.5px; } }

/* ══ Ronda 7 (30-nov): precio arriba, «Dónde» al final, entrada con Google, Morita viaja ══ */
.desde-precio { margin-top: 6px; font-size: 14px; color: var(--muted); }
.desde-precio a { color: var(--c2); font-weight: 700; text-underline-offset: 3px; }
.via-foto { width: 100%; height: 150px; object-fit: cover; object-position: 50% 30%; border-radius: 14px; margin-bottom: 14px; }
.via-zonas { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.mundos-pasos li { cursor: pointer; }
@media (max-width: 860px) {
  .teatro .desde-precio { font-size: 12.5px; margin-top: 4px; }
}

/* entrada con Google: el botón dice que está conectando, y un aviso abajo cuenta qué pasa */
a.conectando { pointer-events: none; opacity: .75; }
.aviso-acceso {
  position: fixed; left: 50%; bottom: 22px; z-index: 60; max-width: min(92vw, 460px);
  background: #fff; color: #12131c; font-weight: 600; font-size: 15px; line-height: 1.4; text-align: center;
  padding: 12px 18px; border-radius: 16px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.6);
  opacity: 0; transform: translate(-50%, 12px); transition: opacity .3s, transform .4s var(--curva); pointer-events: none;
}
.aviso-acceso.visible { opacity: 1; transform: translate(-50%, 0); }

/* Morita viaja de un lado a otro entre capítulos: se agacha, salta en arco hacia donde va y aterriza.
   --cx se registra como longitud para poder leerla en px y saber hacia dónde se mueve. */
@property --cx { syntax: '<length>'; inherits: true; initial-value: 0px; }
.compa { --dir: 0; transition: transform 1.15s cubic-bezier(.55, 0, .25, 1), opacity .7s; }
.compa-cuerpo.viaja { animation: viaje 1.15s cubic-bezier(.4, 0, .3, 1); }
@keyframes viaje {
  0%   { transform: none; }
  14%  { transform: translateY(2%) scale(1.04, .93); }                                         /* se agacha */
  45%  { transform: translateY(-16%) rotate(calc(var(--dir) * 7deg)) scale(.98, 1.04); }       /* vuela inclinada hacia su destino */
  78%  { transform: translateY(0) rotate(calc(var(--dir) * -2deg)) scale(1.05, .94); }         /* aterriza */
  100% { transform: none; }
}
.compa-sombra { transition: transform .5s ease, opacity .5s ease; }
.compa.viajando .compa-sombra { animation: sombraViaje 1.15s cubic-bezier(.4, 0, .3, 1); }
@keyframes sombraViaje { 45% { transform: scaleX(.55); opacity: .45; } }

/* posiciones más abiertas en el escritorio: Morita cruza la pantalla, no solo se encoge */
@media (min-width: 861px) {
  .compa { --viaje: 1; }
  body[data-escena="empezar-cero"]   .compa { --cx: calc(-16vw * var(--viaje)); --cy: 3vh; --cs: .8; }
  body[data-escena="camino"]         .compa { --cx: 3vw; --cs: .62; }
  body[data-escena="acompanamiento"] .compa { --cx: calc(-18vw * var(--viaje)); --cs: .86; }
  body[data-escena="mundos"]         .compa { --cx: calc(-12vw * var(--viaje)); --cy: 2vh; --cs: .76; }
  body[data-escena="progreso"]       .compa { --cx: 2vw; --cs: .86; }
  body[data-escena="musica"]         .compa { --cx: calc(-17vw * var(--viaje)); --cy: 2vh; --cs: .84; }
}
@media (min-width: 861px) and (max-width: 1240px) { .compa { --viaje: .5; } }
/* celular: Morita va de un lado al otro por arriba (el texto está debajo) */
@media (max-width: 860px) {
  .teatro body[data-escena="empezar-cero"]   .compa { --cx: -20vw; }
  .teatro body[data-escena="camino"]         .compa { --cx: 18vw; }
  .teatro body[data-escena="acompanamiento"] .compa { --cx: -18vw; }
  .teatro body[data-escena="mundos"]         .compa { --cx: 18vw; }
  .teatro body[data-escena="progreso"]       .compa { --cx: -18vw; }
  .teatro body[data-escena="musica"]         .compa { --cx: 18vw; }
}
@media (prefers-reduced-motion: reduce) {
  .compa-cuerpo.viaja, .compa.viajando .compa-sombra { animation: none; }
}
/* cuando Morita cruza hacia el texto, su globo sale por su derecha (si no, tapa el final del título) */
@media (min-width: 861px) {
  body[data-escena="empezar-cero"] .compa-globo, body[data-escena="acompanamiento"] .compa-globo,
  body[data-escena="mundos"] .compa-globo, body[data-escena="musica"] .compa-globo {
    right: auto; left: 74%; border-radius: 18px 18px 18px 4px; transform-origin: 0 100%;
  }
}

/* ══ Portada oficial (1-dic) ══ */
/* con la sesión abierta se va al panel: una cortina tapa la portada para que no parpadee */
.acceso-cortina { display: none; }
html.con-sesion .acceso-cortina,
html.con-sesion body::after { position: fixed; inset: 0; z-index: 2147483600; background: var(--bg); }
html.con-sesion .acceso-cortina { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--text); font: 600 17px var(--body); text-align: center; padding: 24px; }
html.con-sesion body::after { content: ''; }
html.con-sesion body:has(.acceso-cortina)::after { content: none; }
.acceso-giro { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.14); border-top-color: var(--cian); animation: giro .9s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .acceso-giro { animation-duration: 2.4s; } }
/* precios con código de volante */
.precio-antes { font-size: .55em; color: var(--muted); margin-right: 4px; text-decoration-thickness: 2px; }
.plan-ahorro { margin-top: 6px; font-size: 13px; font-weight: 700; color: #F5C842; }

/* Inicio en pantallas de portátil (1280×720, 1440×900, 1536×864): el titular de 5 líneas era más alto que la
   pantalla y la ceja «Dualidad Music · Medellín» quedaba debajo de la barra. El titular se limita también por el
   alto y la flecha «Baja y empieza el viaje» se acerca. */
@media (min-width: 861px) {
  .teatro .escena-inicio h1 { font-size: min(5.6vw, 90px, 8.2vh); }
  .teatro .escena-inicio .bajar { margin-top: min(46px, 3vh); }
}
@media (min-width: 861px) and (max-height: 760px) {
  .teatro .escena-inicio .bajar { display: none; }
}

/* Logo de la marca (/img/logo-dualidad.png sin sus márgenes vacíos) */
.marca-logo { display: block; height: 46px; width: auto; }
.pie-marca .marca-logo { height: 60px; }
@media (max-width: 860px) { .barra .marca-logo { height: 38px; } }

/* Símbolo de Google en los botones que entran con Google (como en la portada anterior), sobre un círculo blanco */
.google-icon {
  display: inline-block; flex: none; width: 22px; height: 22px; border-radius: 50%; margin-right: 9px; vertical-align: -6px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334A853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23FBBC05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23EA4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.btn-mini .google-icon { width: 20px; height: 20px; margin-right: 8px; background-size: 13px; }
.conectando .google-icon { display: none; }

.btn .google-icon { margin-right: 0; }

/* ══════════ «Tu música»: estudio con piano, guitarra y bajo ══════════ */
.estudio { margin-top: 22px; max-width: 600px; }
.estudio-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.estudio-tabs button {
  min-height: 40px; padding: 6px 16px; border-radius: 10px; border: 0; background: none; color: var(--muted);
  font: 700 14.5px var(--body); cursor: pointer; transition: background .25s, color .25s, box-shadow .25s;
}
.estudio-tabs button[aria-selected="true"] { background: var(--c1); color: #07080d; box-shadow: 0 0 22px -2px var(--c1); }
.estudio-panel { margin-top: 14px; }
.estudio-panel .letra-chica { margin-top: 10px; }
.estudio-estado { margin-top: 8px; font-size: 13px; color: var(--muted); min-height: 1.4em; }

/* piano: marfil, teclas negras lacadas y fieltro rojo arriba */
.piano {
  --blancas: 10; position: relative; display: flex; height: 168px; padding: 12px 10px 12px; border-radius: 14px;
  background: linear-gradient(180deg, #1b1c22, #0c0d11); box-shadow: 0 30px 60px -28px rgba(0,0,0,.95), inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px rgba(255,255,255,.06);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.piano::before { content: ''; position: absolute; left: 10px; right: 10px; top: 9px; height: 5px; border-radius: 2px; background: linear-gradient(#8e1b2a, #5d0f1a); z-index: 3; }
.tecla { border: 0; padding: 0; cursor: pointer; font-family: var(--body); -webkit-tap-highlight-color: transparent; }
.tecla.blanca {
  position: relative; flex: 1; margin: 0 1px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; padding-bottom: 9px;
  border-radius: 0 0 7px 7px; color: #4a4c58; font-weight: 700; font-size: 12.5px;
  background: linear-gradient(180deg, #d9d6cc 0, #f8f6ef 9%, #fffdf8 70%, #e9e5da 100%);
  box-shadow: inset 0 -7px 0 #d3cfc3, inset -1px 0 0 rgba(0,0,0,.12), 0 2px 2px rgba(0,0,0,.5);
  transition: transform .06s, box-shadow .06s, background .15s;
}
.tecla.negra {
  position: absolute; top: 12px; z-index: 2; height: 58%; width: calc((100% - 20px) / var(--blancas) * .62);
  left: calc(10px + (100% - 20px) / var(--blancas) * var(--i) - (100% - 20px) / var(--blancas) * .31);
  border-radius: 0 0 5px 5px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px;
  background: linear-gradient(180deg, #050506 0, #2b2c33 70%, #3a3b44 86%, #15161a 100%);
  box-shadow: inset 0 -5px 0 #0b0b0e, inset 1px 0 0 rgba(255,255,255,.12), 0 4px 6px rgba(0,0,0,.6);
  transition: transform .06s, box-shadow .06s;
}
.tecla kbd { font: 500 10.5px var(--body); color: #9a9aa6; }
.tecla.negra kbd { color: #8c8e9c; font-size: 9.5px; }
.tecla.blanca.on, .tecla.blanca:active {
  transform: translateY(2px); background: linear-gradient(180deg, #cfcabe 0, #efece3 12%, #fffaf0 75%, color-mix(in srgb, var(--c1) 30%, #fff) 100%);
  box-shadow: inset 0 -2px 0 #d3cfc3, inset -1px 0 0 rgba(0,0,0,.12), 0 0 26px -4px var(--c1);
}
.tecla.negra.on, .tecla.negra:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 #0b0b0e, 0 0 18px -2px var(--c1); background: linear-gradient(180deg, #050506 0, #24252c 80%, color-mix(in srgb, var(--c1) 60%, #111) 100%); }
.tecla:focus-visible { outline: 2px solid var(--c2); outline-offset: -4px; }

/* guitarra y bajo: palisandro, cejuela de hueso, trastes de metal, incrustaciones de nácar */
.instrumento-cuerdas { --abierta: 13%; position: relative; display: flex; gap: 0; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.mastil {
  position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-around; padding: 6px 0; border-radius: 6px 0 0 6px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #2a1a10, #4b2e1d 18%, #3d2416 50%, #4a2c1b 82%, #26170e);
  box-shadow: 0 26px 50px -24px rgba(0,0,0,.95), inset 0 2px 0 rgba(255,255,255,.08), inset 0 -2px 0 rgba(0,0,0,.4);
}
.guitarra .mastil { height: 186px; }
.bajo .mastil { height: 150px; background: repeating-linear-gradient(90deg, rgba(0,0,0,.1) 0 2px, transparent 2px 9px), linear-gradient(180deg, #160f0b, #2b1d15 20%, #22160f 50%, #2a1b13 80%, #120c08); }
.trastes { position: absolute; inset: 0; display: flex; pointer-events: none; }
.traste { position: relative; flex: 1; }
.traste.t0 { flex: 0 0 var(--abierta); background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,.1)); }
.traste.t1 { border-left: 7px solid #e9e1cc; box-shadow: inset 1px 0 0 rgba(0,0,0,.25), -1px 0 0 rgba(0,0,0,.35); }   /* cejuela */
.traste:not(.t0):not(.t1)::before { content: ''; position: absolute; left: -2px; top: 0; bottom: 0; width: 3px; background: linear-gradient(90deg, #6f7178, #f2f3f6 45%, #9a9ca4); box-shadow: 1px 0 2px rgba(0,0,0,.6); }
.traste:last-child::after { content: ''; position: absolute; right: -2px; top: 0; bottom: 0; width: 3px; background: linear-gradient(90deg, #6f7178, #f2f3f6 45%, #9a9ca4); }
.traste .marca { position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #e6eef0 40%, #b9c6cf 75%, #8d98a3); box-shadow: 0 0 6px rgba(255,255,255,.25); opacity: .9; }
.cuerda { position: relative; z-index: 1; display: flex; flex: 1; align-items: center; }
.cuerda::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: var(--grosor, 1.5px); transform: translateY(-50%);
  background: linear-gradient(180deg, #fbfbfd, #b7bac4 55%, #6a6d78); box-shadow: 0 1.5px 2px rgba(0,0,0,.7); border-radius: 2px; pointer-events: none;
}
.cuerda.entorchada::before { background: repeating-linear-gradient(90deg, #d8b98a 0 1px, #8c6a3e 1px 2px), linear-gradient(180deg, #f2d9a8, #8c6a3e); }
.bajo .cuerda.entorchada::before { background: repeating-linear-gradient(90deg, #dfe1e6 0 1.2px, #7c7f89 1.2px 2.4px); }
.cuerda.vibra::before { animation: vibra .9s cubic-bezier(.2,.6,.3,1); }
@keyframes vibra {
  0% { box-shadow: 0 1.5px 2px rgba(0,0,0,.7), 0 0 0 transparent; filter: none; }
  6% { transform: translateY(calc(-50% + 1.6px)); filter: blur(.6px); box-shadow: 0 -2px 0 rgba(255,255,255,.35), 0 0 14px var(--c1); }
  12% { transform: translateY(calc(-50% - 1.4px)); }
  20% { transform: translateY(calc(-50% + 1px)); filter: blur(.4px); }
  30% { transform: translateY(calc(-50% - .7px)); }
  45% { transform: translateY(calc(-50% + .4px)); filter: none; box-shadow: 0 1.5px 2px rgba(0,0,0,.7), 0 0 8px color-mix(in srgb, var(--c1) 50%, transparent); }
  100% { transform: translateY(-50%); }
}
.cuerda.muda::before { opacity: .45; }
.pos { position: relative; flex: 1; height: 100%; min-height: 28px; border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pos.p0 { flex: 0 0 var(--abierta); }
.pos:hover { background: rgba(255,255,255,.04); }
.pos:focus-visible { outline: 2px solid var(--c2); outline-offset: -3px; border-radius: 6px; }
.dedo { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; z-index: 2; opacity: 0; transform: scale(.4);
  background: radial-gradient(circle at 35% 30%, #fff, var(--c2) 55%, color-mix(in srgb, var(--c1) 80%, #000)); box-shadow: 0 0 16px var(--c2); transition: opacity .18s, transform .18s var(--curva); }
.pos.pisa .dedo { opacity: .9; transform: scale(1); }
.pos.on .dedo { opacity: 1; transform: scale(1.15); }
.pos.p0.on .dedo { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: none; border: 2px solid var(--c2); }

/* boca de la guitarra: madera clara con roseta; se rasguea deslizando */
.boca {
  position: relative; flex: 0 0 92px; margin-left: -2px; border-radius: 0 40px 40px 0; display: grid; place-items: center; cursor: grab; touch-action: none;
  background:
    radial-gradient(circle at 50% 50%, #08070a 0 30%, #b88a52 31% 33%, #3a2a1a 34% 36%, #d7a967 37% 39%, transparent 40%),
    linear-gradient(90deg, #c99657, #e2b778 40%, #c58f4f);
  box-shadow: 0 26px 50px -24px rgba(0,0,0,.95), inset 0 0 0 2px rgba(0,0,0,.25);
}
.boca::before { content: ''; position: absolute; inset: 6px 0; background: repeating-linear-gradient(180deg, transparent 0 calc(100% / 6 / 2 - 1px), rgba(235,235,240,.75) calc(100% / 6 / 2 - 1px) calc(100% / 6 / 2 + .5px), transparent calc(100% / 6 / 2 + .5px) calc(100% / 6)); pointer-events: none; }
.boca span { position: relative; z-index: 1; font: 700 10.5px/1.15 var(--body); text-align: center; color: #fff; text-shadow: 0 1px 3px #000; opacity: .85; }
.boca:focus-visible { outline: 2px solid var(--c2); outline-offset: 2px; }
.pastillas { flex: 0 0 80px; margin-left: -2px; border-radius: 0 30px 30px 0; position: relative; display: flex; flex-direction: column; justify-content: center; gap: 14px; align-items: center;
  background: linear-gradient(90deg, #1a1b20, #2a2c33 50%, #17181c); box-shadow: 0 26px 50px -24px rgba(0,0,0,.95); }
.pastillas span { width: 30px; height: 46px; border-radius: 8px; background: linear-gradient(90deg, #0b0b0d, #26272d 50%, #0b0b0d); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.acordes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.acorde, .btn-groove {
  min-height: 38px; padding: 6px 16px; border-radius: 99px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06);
  color: var(--text); font: 700 14px var(--body); cursor: pointer; transition: background .2s, box-shadow .2s, border-color .2s;
}
.acorde[aria-pressed="true"], .btn-groove.sonando { background: color-mix(in srgb, var(--c1) 85%, #000); border-color: var(--c1); color: #07080d; box-shadow: 0 0 20px -2px var(--c1); }

@media (max-width: 860px) {
  .estudio { margin-top: 12px; }
  .estudio-tabs button { padding: 6px 11px; font-size: 13.5px; min-height: 38px; }
  .piano { height: 136px; padding: 10px 6px; }
  .piano::before { left: 6px; right: 6px; top: 7px; }
  .tecla.negra { top: 10px; width: calc((100% - 12px) / var(--blancas) * .62); left: calc(6px + (100% - 12px) / var(--blancas) * var(--i) - (100% - 12px) / var(--blancas) * .31); }
  .tecla kbd { display: none; }
  .tecla.blanca { font-size: 11px; margin: 0 .5px; }
  .guitarra .mastil { height: 162px; }
  .bajo .mastil { height: 128px; }
  .boca { flex-basis: 70px; }
  .pastillas { flex-basis: 56px; }
  .pastillas span { width: 22px; height: 36px; }
  .instrumento-cuerdas { --abierta: 11%; }
}

/* ══════════ Neón más presente (1-dic): luces de cada capítulo más intensas, brillo en títulos y botones ══════════ */
.bruma {
  background:
    radial-gradient(60vmax 50vmax at 78% 38%, color-mix(in srgb, var(--c1) 34%, transparent), transparent 70%),
    radial-gradient(50vmax 40vmax at 12% 92%, color-mix(in srgb, var(--c2) 22%, transparent), transparent 70%),
    linear-gradient(180deg, transparent 60%, rgba(0,0,0,.35));
}
/* segunda capa que «late» despacio, como un tubo de neón */
.bruma::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background:
    radial-gradient(34vmax 26vmax at 82% 30%, color-mix(in srgb, var(--c1) 20%, transparent), transparent 70%),
    radial-gradient(30vmax 22vmax at 6% 70%, color-mix(in srgb, var(--c2) 14%, transparent), transparent 70%);
  animation: neonLate 5.5s ease-in-out infinite;
}
@keyframes neonLate { 0%, 100% { opacity: .55; } 45% { opacity: 1; } 52% { opacity: .82; } 58% { opacity: 1; } }
.acento { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c1) 32%, transparent)); }
h1, h2 { text-shadow: 0 0 24px color-mix(in srgb, var(--c1) 14%, transparent); }
.ceja { text-shadow: 0 0 10px color-mix(in srgb, var(--c2) 35%, transparent); }
.btn-primario {
  box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset, 0 0 22px -2px color-mix(in srgb, var(--cian) 85%, transparent), 0 0 60px -12px var(--indigo);
  animation: neonBoton 3.2s ease-in-out infinite;
}
@keyframes neonBoton { 50% { box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 0 34px 0 color-mix(in srgb, var(--cian) 90%, transparent), 0 0 80px -8px var(--indigo); } }
.btn-mini { box-shadow: 0 0 18px -4px color-mix(in srgb, var(--c2) 80%, transparent); }
.compa-aura { background: radial-gradient(closest-side, color-mix(in srgb, var(--c1) 80%, transparent), transparent); opacity: .9; }
.foco { background: conic-gradient(from 180deg at 50% 0%, transparent 158deg, color-mix(in srgb, var(--c2) 36%, transparent) 174deg, rgba(255,255,255,.24) 180deg, color-mix(in srgb, var(--c2) 36%, transparent) 186deg, transparent 202deg); }
.suelo { background: radial-gradient(50% 60% at 60% 100%, color-mix(in srgb, var(--c1) 55%, transparent), transparent 70%); }
.hilo-lineas path { opacity: .9; filter: drop-shadow(0 0 4px var(--c1)); }
.hilo a[aria-current="step"]::before { box-shadow: 0 0 10px var(--c2), 0 0 26px var(--c2); }
.marca-logo { filter: drop-shadow(0 0 10px rgba(255, 196, 92, .35)); }
@media (prefers-reduced-motion: reduce) {
  .bruma::after, .btn-primario { animation: none; }
}
@media (max-width: 860px) {
  .estudio-panel .letra-chica { display: none; }
  .guitarra .mastil { height: 148px; }
  .bajo .mastil { height: 120px; }
}

/* ══════════ Notas en teclas y trastes + «Toca una canción» (2-dic) ══════════ */
.tecla.negra { flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; }
.tecla.negra .tecla-nombre { font-size: 9.5px; font-weight: 700; color: #e4e6ef; letter-spacing: -.01em; }
.pos .nota {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; pointer-events: none; white-space: nowrap;
  font: 700 9.5px/1 var(--body); color: #f4ede0; background: rgba(12, 9, 7, .74); padding: 2px 5px; border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.pos.p0 .nota { background: rgba(0,0,0,.55); color: #cfd3de; }
.pos.pisa .nota, .pos.on .nota { opacity: 0; }
.estudio-cabeza { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn-cancion {
  min-height: 48px; padding: 6px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--c2) 60%, transparent);
  background: color-mix(in srgb, var(--c2) 14%, transparent); color: var(--text); font: 700 14.5px var(--body); cursor: pointer;
  box-shadow: 0 0 16px -6px var(--c2); transition: background .2s, box-shadow .2s;
}
.btn-cancion:hover { background: color-mix(in srgb, var(--c2) 24%, transparent); }
.btn-cancion[aria-pressed="true"] { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); box-shadow: none; }
.cancion-guia { margin-top: 10px; }
.cancion-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.cancion-cab strong { font-weight: 700; }
.cancion-boton { min-height: 32px; padding: 4px 12px; border-radius: 99px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.07); color: var(--text); font: 700 13px var(--body); cursor: pointer; }
.cancion-notas { list-style: none; display: flex; gap: 4px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; padding: 3px 2px; scroll-behavior: smooth; }
.cancion-notas::-webkit-scrollbar { display: none; }
.cancion-notas li { flex: none; font: 700 12.5px var(--body); padding: 4px 9px; border-radius: 99px; background: rgba(255,255,255,.06); color: var(--muted); transition: background .2s, color .2s; }
.cancion-notas li.fin-frase { margin-right: 12px; }
.cancion-notas li.hecha { color: var(--text); background: color-mix(in srgb, var(--c1) 22%, transparent); }
.cancion-notas li.actual { background: var(--c2); color: #07080d; box-shadow: 0 0 12px -2px var(--c2); }
.cancion-notas li.fallo { animation: fallo .35s; }
@keyframes fallo { 25% { transform: translateX(-4px); background: #ff4d6d; color: #fff; } 75% { transform: translateX(4px); } }
/* lo que sigue: brilla y late */
.tecla.blanca.siguiente { background: linear-gradient(180deg, #d9d6cc 0, #f8f6ef 9%, #fffdf8 55%, color-mix(in srgb, var(--c2) 55%, #fff) 100%); box-shadow: inset 0 -7px 0 color-mix(in srgb, var(--c2) 60%, #d3cfc3), 0 0 22px -2px var(--c2); animation: sigue 1s ease-in-out infinite; }
.tecla.negra.siguiente { background: linear-gradient(180deg, #050506 0, #24252c 55%, color-mix(in srgb, var(--c2) 75%, #111) 100%); box-shadow: 0 0 18px var(--c2); animation: sigue 1s ease-in-out infinite; }
@keyframes sigue { 50% { filter: brightness(1.12); } }
.pos.siguiente .dedo { opacity: 1; transform: scale(1); background: transparent; border: 2.5px solid var(--c2); animation: sigueDedo 1s ease-in-out infinite; }
.pos.siguiente .nota { opacity: 1; background: var(--c2); color: #07080d; }
@keyframes sigueDedo { 50% { transform: scale(1.25); box-shadow: 0 0 22px var(--c2); } }
/* en la canción no se mezclan los acordes ni el groove */
.en-cancion #acordesGuitarra, .en-cancion #panel-bajo .acordes { display: none; }
.en-cancion .pos.pisa:not(.on):not(.siguiente) .dedo { opacity: 0; }
.en-cancion .pos.pisa:not(.on) .nota { opacity: 1; }
.en-cancion .cuerda.muda::before { opacity: 1; }
@media (max-width: 860px) {
  .tecla.negra .tecla-nombre { font-size: 7.5px; letter-spacing: -.03em; }
  .pos .nota { font-size: 8.5px; padding: 1px 4px; }
  .btn-cancion { min-height: 38px; padding: 6px 11px; font-size: 13.5px; }
  .cancion-guia { margin-top: 8px; }
  .cancion-cab { font-size: 12px; gap: 8px; }
  .cancion-boton { min-height: 28px; font-size: 12px; padding: 3px 10px; }
  .cancion-notas { margin-top: 6px; }
  .cancion-notas li { font-size: 11.5px; padding: 3px 8px; }
}
@media (max-width: 420px) { .btn-cancion span { display: none; } .btn-cancion { min-width: 44px; } }
@media (prefers-reduced-motion: reduce) { .tecla.siguiente, .pos.siguiente .dedo { animation: none; } }

.traste .marca { opacity: .45; width: 10px; height: 10px; margin: -5px 0 0 -5px; }
/* la fila de notas se desplaza sola: que su largo no ensanche el capítulo (en el celular cortaba título e instrumento) */
.cancion-guia, .cancion-notas { contain: inline-size; }
@media (max-width: 860px) {
  .pos { min-height: 22px; }
  /* en la canción, el espacio es para el instrumento y la tira de notas */
  #musica .texto:has(.en-cancion) .bajada { display: none; }
}
