@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/fredoka.woff2') format('woff2');
}

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --hairline: rgba(255,255,255,.20);
  --hairline-soft: rgba(255,255,255,.12);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

html, body { height: 100%; height: 100dvh; }
body { overscroll-behavior: none; }

body {
  font-family: 'Fredoka', ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  background: #141735;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  letter-spacing: .2px;
}

.screen { position: fixed; inset: 0; height: 100dvh; display: none; flex-direction: column; align-items: center; justify-content: center; padding: max(24px, env(safe-area-inset-top, 0px)) 24px max(24px, calc(env(safe-area-inset-bottom, 0px) + 10px)); background: #141735; overflow: hidden; }
.screen.active { display: flex; animation: screenIn .5s var(--ease-out); }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.bg.dim { filter: brightness(.55) saturate(.95); }

.scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,18,48,.30), rgba(16,18,48,.62)); }
/* El menú es una ruta, no una foto: el fondo se encuadra a la ventana y el
   velo cae de izquierda a derecha, donde vive el texto (#51). Así la Nubecita
   del arte se queda fuera de encuadre y no compite con la del cursor. */
#screen-menu .bg { background-position: right 24% center; }
#screen-menu .scrim { background: linear-gradient(100deg, rgba(12,14,48,.86) 0%, rgba(12,14,48,.72) 38%, rgba(12,14,48,.34) 72%, rgba(12,14,48,.46) 100%); }
.scrim.soft { background: linear-gradient(180deg, rgba(16,18,48,.20), rgba(16,18,48,.48)); }

.content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; width: 100%; max-width: 440px; }

.title { font-size: clamp(44px, 12vw, 64px); font-weight: 700; line-height: .98; letter-spacing: -.5px; text-shadow: 0 8px 40px rgba(12,14,50,.55); }
.hint { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.82); letter-spacing: .3px; }
.hint.locked { opacity: .75; }

.nubecita { width: 150px; height: auto; filter: drop-shadow(0 16px 34px rgba(24,26,80,.42)); }
.nubecita.breathe { width: 185px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); transition: transform 4s var(--ease-out); will-change: transform; }
.nubecita.breathe.grow { transform: translate(-50%, -50%) scale(1.16); }

.bob { animation: bob 4.2s var(--ease-out) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.chip { background: rgba(255,255,255,.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; padding: 9px 20px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; border: 1px solid var(--hairline-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.chip.done { background: rgba(122, 214, 164, .32); border-color: rgba(122,214,164,.40); }

.level-title { font-size: clamp(32px, 8.5vw, 44px); font-weight: 700; letter-spacing: -.3px; text-shadow: 0 6px 24px rgba(12,14,50,.5); }

.card { background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.09)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--hairline); border-radius: 28px; padding: 22px 26px; color: #fff; line-height: 1.6; font-size: 17px; font-weight: 500; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 18px 50px rgba(8,10,40,.36); }
.card p + p { margin-top: 10px; }
.card strong { font-weight: 700; }

.btn { position: relative; border: none; border-radius: 999px; padding: 18px 36px; font-size: 18px; font-weight: 600; font-family: inherit; cursor: pointer; letter-spacing: .2px; transition: transform .32s var(--ease-spring), box-shadow .3s var(--ease-out), filter .3s var(--ease-out); -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.96); }
.btn.primary { background: linear-gradient(180deg, #ffd9e3, #ffb7cb); color: #5b2b3d; box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 14px 40px rgba(255,150,180,.45); }
.btn.ghost { background: rgba(255,255,255,.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; border: 1px solid var(--hairline-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.20); }

.breathe-layout { gap: 16px; }
.round { font-size: 14px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: rgba(255,255,255,.88); }
.breathe-stage { position: relative; width: min(78vw, 300px); height: min(78vw, 300px); }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: rgba(255,255,255,.16); }
.ring-fg { stroke: #ffe0ea; stroke-linecap: round; stroke-dasharray: 741.42; stroke-dashoffset: 741.42; transition: stroke-dashoffset 4s linear; }
.phase { font-size: 28px; font-weight: 600; text-shadow: 0 2px 16px rgba(12,14,50,.5); }

.calm { width: 100%; max-width: 300px; }
.calm-track { height: 13px; background: rgba(255,255,255,.18); border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,255,255,.10); }
.calm-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ffe3ec, #ffb3c6); border-radius: 999px; transition: width .8s var(--ease-out); box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.calm-label { display: block; margin-top: 8px; font-size: 13px; font-weight: 600; letter-spacing: 1.2px; color: rgba(255,255,255,.88); text-transform: uppercase; }

#worry-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.worry { position: absolute; width: 86px; height: 86px; background: none; border: none; padding: 0; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; animation: drift 5s var(--ease-out) forwards; }
.worry:focus { outline: none; }
.worry img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(20,20,60,.4)); }
@keyframes drift { 0% { transform: translateY(16px) scale(.7); opacity: 0; } 12% { transform: translateY(0) scale(1); opacity: 1; } 78% { opacity: 1; } 100% { transform: translateY(-96px) scale(1.05); opacity: 0; } }

.burst { position: absolute; font-size: 34px; pointer-events: none; animation: burst .75s var(--ease-out) forwards; }
@keyframes burst { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.8) translateY(-28px); opacity: 0; } }
.burst-big { font-size: 52px; animation-duration: .9s; }

.score { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 16px); right: 18px; z-index: 4; font-size: 17px; font-weight: 600; background: rgba(255,255,255,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); }
.score-big { font-size: 20px; font-weight: 600; }
.stars { font-size: 36px; letter-spacing: 5px; }
.tester-code { font-size: 42px; font-weight: 700; letter-spacing: 12px; margin: 6px 0; }

/* ---- Level 2 ---- */
.hud { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 0; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
.hud-top { display: flex; justify-content: space-between; align-items: center; }
.hud-calm { max-width: 100%; }
.hud-calm .calm-label { text-align: left; }

#screen-game2 { touch-action: none; cursor: grab; }
#g2-items { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.g2-item { position: absolute; pointer-events: none; }
.g2-item img { width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(20,20,60,.4)); }

#g2-nubecita { position: absolute; bottom: calc(44px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); width: 96px; z-index: 3; pointer-events: none; }
#g2-nubecita img { width: 100%; height: auto; filter: drop-shadow(0 12px 24px rgba(24,26,80,.4)); }
#g2-nubecita.shake img { animation: shake .3s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 50% { transform: translateX(7px); } 75% { transform: translateX(-4px); } }

.g2-hint { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; z-index: 4; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.94); text-shadow: 0 2px 8px rgba(12,14,50,.5); pointer-events: none; }

#b2-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.bubble { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.95), rgba(150,190,255,.7)); box-shadow: 0 0 16px rgba(150,190,255,.65), inset 0 1px 0 rgba(255,255,255,.9); border: 2px solid rgba(255,255,255,.7); cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.bubble.up { bottom: -50px; animation: rise 4s linear forwards; }
.bubble.down { top: -50px; animation: fall 4s linear forwards; }
@keyframes rise { to { transform: translateY(-95vh); } }
@keyframes fall { to { transform: translateY(95vh); } }

/* ---- Video intro ---- */
.video-screen { background: #141735; }
.intro-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #141735; }
/* El video es 9:16. En una ventana de escritorio apaisada, cover recorta media
   imagen: a partir de 700px se muestra entero (contain) con bandas del fondo. */
@media (min-width: 700px) { .intro-video { object-fit: contain; } }
/* Boton de rescate: aparece solo si el autoplay fue rechazado o no arranca. */
.video-play { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; z-index: 6; min-width: 208px; padding: 20px 40px; font-size: 19px; }
.skip { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 16px); right: 16px; z-index: 5; }
.video-next { position: absolute; bottom: calc(48px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; display: flex; justify-content: center; z-index: 5; }

.hidden { display: none !important; }

/* --- L1: hints, per-round micro-choice, worry defusion --- */
.hint { font-size: 14px; color: rgba(255,255,255,.82); text-align: center; margin: 4px 0 0; }
.hint.soft { font-size: 13px; color: rgba(255,255,255,.62); margin-top: 6px; max-width: 320px; }
.worry.dissolve { animation: dissolve .55s var(--ease-out) forwards; pointer-events: none; }
@keyframes dissolve { 0% { opacity: 1; transform: scale(1); filter: blur(0); } 100% { opacity: 0; transform: scale(1.4) translateY(-12px); filter: blur(8px); } }
.choice { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; justify-content: center; padding: 0 18px calc(30px + env(safe-area-inset-bottom, 0px)); pointer-events: none; }
.choice-body { pointer-events: auto; width: 100%; max-width: 420px; padding: 16px 18px 18px; border-radius: 26px; background: rgba(30,26,58,.55); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--hairline-soft); box-shadow: 0 20px 50px rgba(10,8,40,.45), inset 0 1px 0 rgba(255,255,255,.18); animation: choiceIn .4s var(--ease-out) both; }
.choice-q { margin: 0 0 12px; font-size: 15px; font-weight: 600; text-align: center; color: rgba(255,255,255,.94); }
.choice-row { display: flex; gap: 8px; justify-content: center; }
.btn.tiny { padding: 11px 14px; font-size: 14px; flex: 1; white-space: nowrap; }
@keyframes choiceIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* --- L1 self-check: one before, one after, never during a breath --- */
.feel { width: 100%; max-width: 420px; margin: 4px 0 6px; }
.feel-q { font-size: 14px; font-weight: 600; letter-spacing: .2px; color: rgba(255,255,255,.78); text-align: center; margin: 0 0 10px; }
.feel .choice-row { display: flex; gap: 8px; justify-content: center; }
.btn.ghost.picked { background: rgba(255,217,227,.92); color: #5b2b3d; border-color: transparent; box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 10px 26px rgba(255,150,180,.35); }

.g2-item.hecho { display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 14px; background: rgba(255,255,255,.92); color: #5b2b3d; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 8px 22px rgba(10,8,40,.35); }
.g2-item.dissolve { animation: dissolve .55s var(--ease-out) forwards; }

/* ---- Menu: «Apúntate» (captura de email, nunca bloquea el juego) ---- */
.signup { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; justify-content: center; padding: 0 16px max(14px, calc(env(safe-area-inset-bottom, 0px) + 10px)); pointer-events: none; }
.signup-card { pointer-events: auto; width: 100%; max-width: 420px; padding: 13px 15px 11px; border-radius: 24px; background: rgba(30,26,58,.42); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--hairline-soft); box-shadow: 0 18px 44px rgba(10,8,40,.38), inset 0 1px 0 rgba(255,255,255,.20); text-align: center; }
.signup-title { margin: 0 0 9px; font-size: 13px; font-weight: 600; letter-spacing: .2px; color: rgba(255,255,255,.90); }
.signup-row { display: flex; gap: 8px; align-items: stretch; }
.signup-input { flex: 1 1 auto; min-width: 0; height: 42px; padding: 0 16px; font-family: inherit; font-size: 16px; font-weight: 500; color: #fff; background: rgba(255,255,255,.13); border: 1px solid var(--hairline-soft); border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); outline: none; -webkit-appearance: none; appearance: none; user-select: text; -webkit-user-select: text; letter-spacing: .2px; }
.signup-input::placeholder { color: rgba(255,255,255,.52); }
.signup-input:focus { border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.18); }
.btn.signup-btn { flex: 0 0 auto; height: 42px; padding: 0 20px; font-size: 15px; }
.btn.signup-btn:disabled { opacity: .6; }
.signup-msg { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.35; color: rgba(255,255,255,.90); min-height: 0; max-height: 0; overflow: hidden; transition: max-height .3s var(--ease-out), margin .3s var(--ease-out); }
.signup-msg.show { max-height: 60px; margin: 9px 0 0; }
.signup-msg.err { color: #ffd2d2; }
.signup-msg.ok { color: #b8f2cf; }
.signup-skip { margin: 7px 0 0; padding: 2px 6px; background: none; border: none; font-family: inherit; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.62); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.signup-skip:active { color: rgba(255,255,255,.9); }
.signup.done .signup-row, .signup.done .signup-skip, .signup.done .signup-title { display: none; }
.signup.done .signup-msg { max-height: 80px; margin: 0; }
.signup-sink { position: absolute; width: 0; height: 0; border: 0; opacity: 0; pointer-events: none; }
/* Pantallas cortas: el bloque se hace más compacto para no tapar los botones de jugar. */
@media (max-height: 700px) {
  .signup { padding: 0 14px max(10px, calc(env(safe-area-inset-bottom, 0px) + 8px)); }
  .signup-card { padding: 10px 12px 8px; border-radius: 22px; }
  .signup-title { display: none; }
  .signup-skip { margin-top: 5px; }
}

/* ---- Level 3: «Aguanta la subida» (mantener pulsado para subir) ---- */
#screen-game3 { touch-action: none; }
.g3-content { gap: 12px; }
.g3-line { font-size: 16px; font-weight: 600; line-height: 1.45; text-align: center; max-width: 330px; min-height: 48px; color: rgba(255,255,255,.96); text-shadow: 0 2px 14px rgba(12,14,50,.6); }
.g3-line.in { animation: g3line .5s var(--ease-out); }
@keyframes g3line { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.g3-stage { position: relative; width: min(82vw, 340px); height: min(52vh, 420px); border-radius: 30px; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04)); border: 1px solid var(--hairline-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.20), 0 18px 50px rgba(8,10,40,.35); }
.g3-band { position: absolute; left: 10px; right: 10px; border-radius: 22px; background: linear-gradient(180deg, rgba(255,227,236,.28), rgba(255,217,227,.16)); border: 1px solid rgba(255,227,236,.52); box-shadow: 0 0 26px rgba(255,190,210,.22), inset 0 1px 0 rgba(255,255,255,.32); transition: background .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.g3-band.hit { background: linear-gradient(180deg, rgba(255,227,236,.50), rgba(255,183,203,.32)); box-shadow: 0 0 34px rgba(255,190,210,.45), inset 0 1px 0 rgba(255,255,255,.5); }

.g3-nub { position: absolute; left: 50%; top: 60%; width: 74px; transform: translate(-50%, -50%); pointer-events: none; transition: filter .3s var(--ease-out); }
.g3-nub img { width: 100%; height: auto; filter: drop-shadow(0 10px 22px rgba(24,26,80,.45)); }
.g3-nub.hit img { filter: drop-shadow(0 0 16px rgba(255,214,228,.85)); }

.g3-exit { position: absolute; z-index: 5; top: calc(env(safe-area-inset-top, 0px) + 16px); left: 16px; opacity: .8; }
.g3-hint { font-size: 13px; font-weight: 600; letter-spacing: .2px; color: rgba(255,255,255,.78); text-align: center; padding: 0 12px; }
#g3-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.hud .btn.tiny { pointer-events: auto; flex: 0 0 auto; padding: 10px 16px; font-size: 14px; }
.g3-menu { cursor: pointer; }

/* ---- Paywall (#22): candado en el menu + pantalla de compra ---- */
/* Candado del menu: visible desde el primer minuto, se retira al desbloquear.
   El boton NO cambia de tamano al desbloquear (misma caja, sin reflow del menu). */
.btn-lock { display: inline-block; margin-right: 8px; font-size: .92em; transform: translateY(-1px); }
.btn-sub { display: block; margin-top: 3px; font-size: 12px; font-weight: 600; letter-spacing: .2px; opacity: .7; }
body.is-unlocked .btn-lock, body.is-unlocked .btn-sub { display: none; }

/* La pantalla de pago es la unica que puede pasar de alto: hace scroll en vez de
   recortar botones en pantallas cortas (375x667 entra casi justo). */
#screen-paywall { overflow-y: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
.pw-content { gap: 14px; padding: 8px 0 10px; margin: auto 0; }
.pw-card { padding: 20px 22px; text-align: center; }
.pw-price { display: flex; align-items: baseline; justify-content: center; gap: 12px; font-size: 20px; }
.pw-price s { color: rgba(255,255,255,.55); font-weight: 600; text-decoration-thickness: 2px; }
.pw-price strong { font-size: 34px; font-weight: 700; letter-spacing: -.5px; line-height: 1; }
.pw-price-note { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.72); margin-top: 6px; }
.pw-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; text-align: left; }
.pw-list li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.45; font-weight: 500; }
.pw-list li::before { content: "✓"; position: absolute; left: 2px; top: 0; font-weight: 700; color: #ffd9e3; }
.pw-refund { margin-top: 16px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.72); }

.restore-form { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 380px; animation: screenIn .3s var(--ease-out); }
.restore-step { display: flex; flex-direction: column; gap: 10px; }
.restore-input { height: 48px; text-align: center; }
.restore-code { letter-spacing: .32em; font-weight: 700; font-variant-numeric: tabular-nums; text-indent: .32em; }
.btn.restore-btn { padding: 14px 26px; font-size: 16px; }
.pw-hint { font-size: 12px; line-height: 1.4; font-weight: 500; color: rgba(255,255,255,.6); }
.pw-msg { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; color: rgba(255,255,255,.92); max-height: 0; overflow: hidden; transition: max-height .3s var(--ease-out), margin .3s var(--ease-out); max-width: 340px; }
.pw-msg.show { max-height: 120px; }
.pw-msg.err { color: #ffd2d2; }
.pw-msg.ok { color: #b8f2cf; }
.pw-notify { margin: 2px 0 0; padding: 4px 8px; background: none; border: none; font-family: inherit; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.62); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; -webkit-tap-highlight-color: transparent; }

@media (max-height: 760px) {
  .pw-content { gap: 10px; }
  #screen-paywall .level-title { font-size: clamp(24px, 7.4vw, 30px); }
  .pw-card { padding: 15px 18px; }
  .pw-price strong { font-size: 30px; }
  .pw-list { margin-top: 12px; gap: 6px; }
  .pw-list li { font-size: 14px; }
  .pw-refund { margin-top: 12px; }
  #screen-paywall .btn { padding: 14px 26px; font-size: 17px; }
}
/* Pantallas cortas (375x667 y menos): la lista de ventajas se retira para que
   «← Seguir jugando gratis» quede a la vista sin hacer scroll. */
@media (max-height: 700px) {
  .pw-list { display: none; }
  .pw-content { gap: 9px; }
  #screen-paywall .chip { padding: 7px 16px; font-size: 12px; }
  .pw-price { font-size: 18px; }
  .pw-price strong { font-size: 27px; }
  .pw-price-note { font-size: 12px; }
  .pw-refund { margin-top: 10px; font-size: 12px; }
}
@media (max-height: 660px) {
  #screen-paywall .chip { display: none; }
}

/* Pantallas de fin de nivel 2/3 con tres botones: en pantallas cortas se compactan
   para que «← Menú» nunca quede cortado ni fuera de la pantalla. */
@media (max-height: 780px) {
  #screen-success2 .content, #screen-success3 .content { gap: 14px; }
  #screen-success2 .nubecita, #screen-success3 .nubecita { width: 108px; }
  #screen-success2 .card, #screen-success3 .card { padding: 18px 20px; font-size: 16px; }
  #screen-success2 .btn, #screen-success3 .btn { padding: 15px 30px; font-size: 17px; }
  #screen-success2 .stars, #screen-success3 .stars { font-size: 30px; }
}
@media (max-height: 700px) {
  #screen-success2 .content, #screen-success3 .content { gap: 10px; }
  #screen-success2 .nubecita, #screen-success3 .nubecita { width: 86px; }
  #screen-success2 .card, #screen-success3 .card { padding: 13px 16px; font-size: 15px; line-height: 1.5; }
  #screen-success2 .btn, #screen-success3 .btn { padding: 11px 24px; font-size: 16px; }
  #screen-success2 .stars, #screen-success3 .stars { font-size: 24px; letter-spacing: 3px; }
  #screen-success2 .level-title, #screen-success3 .level-title { font-size: clamp(24px, 7.4vw, 30px); }
  #screen-success2 .score-big, #screen-success3 .score-big { font-size: 16px; }
}


/* =====================================================================
   La ruta: el menú como camino (#51, spec de #50)
   Una sola superficie (cabin-scene.webp), cinco nodos de 52 px y Nubecita
   de cursor. Geometría fijada en el spec: columna de 28 px, línea de puntos
   de 2 px centrada, nodos de 14 px, filas de 52 px, títulos de 15 px.
   ===================================================================== */
.home { position: relative; z-index: 2; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 440px; margin: auto 0; text-align: center; }

.home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; }
.home-title { font-size: 22px; font-weight: 700; line-height: 1.15; letter-spacing: -.2px; text-shadow: 0 6px 24px rgba(12,14,50,.5); }
.home-count { font-size: 12px; font-weight: 600; letter-spacing: .8px; color: rgba(255,255,255,.75); white-space: nowrap; }

/* Post-compra: una sola vez, encima de la ruta. Vive fuera de .route, así que
   aparecer o irse no mueve ni un píxel de los nodos. */
.postbuy { width: 100%; padding: 12px 16px; border-radius: 20px; border: 1px solid rgba(255,183,203,.55); background: linear-gradient(180deg, rgba(255,217,227,.28), rgba(255,183,203,.18)); color: #fff; font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: .1px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 12px 30px rgba(10,8,40,.28); -webkit-tap-highlight-color: transparent; }
.postbuy:active { transform: scale(.98); }

.route { position: relative; width: 100%; display: flex; flex-direction: column; --cursor-top: 6px; }
/* La línea: 2 px de puntos centrados en la columna de nodos. */
.route::before { content: ''; position: absolute; left: 13px; top: 26px; bottom: 26px; width: 0; border-left: 2px dotted rgba(255,255,255,.46); }

.route-row { position: relative; z-index: 2; flex: 0 0 52px; display: flex; align-items: center; gap: 14px; width: 100%; height: 52px; padding: 0; border: 0; background: none; font-family: inherit; color: #fff; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.route-row:active { transform: scale(.985); }

.node { position: relative; flex: 0 0 28px; align-self: stretch; display: flex; align-items: center; justify-content: center; }
.node::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); background: rgba(20,23,53,.45); transition: background .3s var(--ease-out), border-color .3s var(--ease-out), box-shadow .3s var(--ease-out); }

.route-title { font-size: 15px; font-weight: 500; letter-spacing: .1px; color: #fff; text-shadow: 0 1px 3px rgba(10,12,40,.9), 0 4px 16px rgba(10,12,40,.55); transition: color .3s var(--ease-out); }
.route-lock { display: none; font-size: 12px; opacity: .82; }

/* done — ✓ en el nodo, título atenuado, el toque repite la introducción */
.route-row.done .node::before { display: none; }
.route-row.done .node::after { content: '✓'; font-size: 15px; font-weight: 700; color: rgba(198,244,216,.92); }
.route-row.done .route-title { color: rgba(255,255,255,.64); }

/* current — nodo relleno blush, título en negrita */
/* El nodo actual no pinta su punto: ahí está Nubecita, y un punto debajo del
   sprite se veía como un pegote rosa detrás de ella (#51, revisión en móvil). */
.route-row.current .node::before { background: none; border-color: transparent; box-shadow: none; }
.route-row.current .route-title { font-weight: 700; color: #fff; }

/* locked — nodo hueco + 🔒 junto al título. Nunca un precio por nodo. */
.route-row.locked .node::before { background: rgba(20,23,53,.40); border-color: rgba(255,255,255,.30); }
.route-row.locked .route-title { color: rgba(255,255,255,.62); }
.route-row.locked { opacity: .82; }
.route-row.locked .route-lock { display: inline; }

/* Nubecita de cursor: 40 px encima de la línea. Solo anima cuando ya está
   colocada (clase .ready), para que el primer pintado no venga desde arriba. */
/* Cursor: más grande y con halo blush, que es lo único que lo distingue de
   cualquier otro sprite del fondo. drop-shadow sigue el alfa del PNG, así que
   el halo no sale cuadrado. */
.route-cursor { position: absolute; z-index: 1; left: 13px; top: var(--cursor-top); width: 48px; height: 48px; margin-left: -24px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 0 9px rgba(255,183,203,.85)) drop-shadow(0 0 22px rgba(255,183,203,.45)) drop-shadow(0 6px 14px rgba(12,14,48,.55)); }
.route.ready .route-cursor { transition: top 400ms var(--ease-out); }

/* Los cuatro objetivos grandes: la ruta, «Continuar» y los dos del rail. */
.home-cta { width: 100%; padding: 16px 22px; font-size: 17px; }
.rail { display: flex; gap: 8px; width: 100%; }
.rail-btn { flex: 1 1 0; min-width: 0; padding: 12px 10px; font-size: 14.5px; white-space: nowrap; }
/* Pie: un precio, una entrada y una promesa, en dos escalones y no en tres
   líneas sueltas (#51). */
.price-line { font-size: 12px; font-weight: 600; letter-spacing: .3px; color: rgba(255,255,255,.86); margin-top: -2px; }
.home-foot { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-top: -4px; }
#screen-menu .guarantee { opacity: .72; }
.tools-link { padding: 2px 6px; border: 0; background: none; font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: .2px; color: rgba(255,255,255,.78); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tools-link:active { color: #fff; }
/* «Apúntate» se muda a la pantalla de éxito (#52): en casa no se pinta. */
#screen-menu .signup { display: none; }

@media (max-height: 700px) {
  .home { gap: 9px; }
  .home-title { font-size: 20px; }
  .home-cta { padding: 13px 20px; font-size: 16px; }
  .rail-btn { padding: 10px 8px; font-size: 13.5px; }
}
@media (max-width: 359px) {
  .home-title { font-size: 19px; }
  .home-cta { font-size: 15px; letter-spacing: 0; }
  .rail-btn { font-size: 12.5px; padding: 9px 6px; }
  .route-title { font-size: 14.5px; }
}

/* =====================================================================
   Nivel 4 · «Atraviesa las turbulencias» (#27)
   El escenario es un recorte redondeado; dentro, un disco enorme con una
   línea de horizonte gira al contrario que Nubecita: eso es el «tilt feel».
   ===================================================================== */
#screen-game4, #screen-game5 { touch-action: none; }

.g4-stage { position: relative; width: min(84vw, 360px); height: min(46vh, 340px); border-radius: 30px; overflow: hidden; background: linear-gradient(180deg, rgba(48,54,120,.55), rgba(20,23,53,.35)); border: 1px solid var(--hairline-soft); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 18px 50px rgba(8,10,40,.35); }
.g4-horizon { position: absolute; left: 50%; top: 58%; width: 230%; height: 230%; border-radius: 50%; transform: translate(-50%, -50%) rotate(0deg); will-change: transform; background: linear-gradient(180deg, rgba(255,255,255,0) 0 49.55%, rgba(255,227,236,.42) 49.55% 49.9%, rgba(255,183,203,.16) 49.9% 100%); }
.g4-nub { position: absolute; left: 50%; top: 50%; width: 96px; transform: translate(-50%, -50%) rotate(0deg); will-change: transform; pointer-events: none; }
.g4-nub img { width: 100%; height: auto; filter: drop-shadow(0 10px 22px rgba(24,26,80,.45)); transition: filter .3s var(--ease-out); }
.g4-nub.level img { filter: drop-shadow(0 0 16px rgba(255,214,228,.85)); }
#g4-layer, #g5-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }

/* =====================================================================
   Nivel 5 · «Aterriza suave» (#28)
   Mismo escenario; Nubecita baja por la pista y la barra de arriba es el
   aire que queda: se vacía al mantener pulsado. Sin aire = apretar = golpe.
   ===================================================================== */
.g5-stage { background: linear-gradient(180deg, rgba(40,52,110,.58), rgba(18,21,50,.42)); }
.g5-nub { width: 84px; }
.g5-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); border-top: 2px dashed rgba(255,227,236,.55); transition: background .35s var(--ease-out), border-color .35s var(--ease-out); }
.g5-ground.touch { background: linear-gradient(180deg, rgba(255,227,236,.42), rgba(255,183,203,.18)); border-top-color: rgba(255,255,255,.85); }
.exhale-fill { background: linear-gradient(90deg, #cfe4ff, #a9c8ff); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); transition: width .12s linear, background .3s var(--ease-out); }
.exhale-fill.low { background: linear-gradient(90deg, #ffd9a8, #ff9f9f); }
#screen-game5 .calm-label { color: rgba(255,255,255,.92); }

/* =====================================================================
   Fin de nivel 4 y 5: tres botones. En pantallas cortas se compactan igual
   que las de los niveles 2 y 3 para que «← Menú» nunca quede cortado.
   ===================================================================== */
@media (max-height: 780px) {
  #screen-success4 .content, #screen-success5 .content { gap: 14px; }
  #screen-success4 .nubecita, #screen-success5 .nubecita { width: 108px; }
  #screen-success4 .card, #screen-success5 .card { padding: 18px 20px; font-size: 16px; }
  #screen-success4 .btn, #screen-success5 .btn { padding: 15px 30px; font-size: 17px; }
  #screen-success4 .stars, #screen-success5 .stars { font-size: 30px; }
}
@media (max-height: 700px) {
  #screen-success4 .content, #screen-success5 .content { gap: 10px; }
  #screen-success4 .nubecita, #screen-success5 .nubecita { width: 86px; }
  #screen-success4 .card, #screen-success5 .card { padding: 13px 16px; font-size: 15px; line-height: 1.5; }
  #screen-success4 .card p + p, #screen-success5 .card p + p { margin-top: 6px; }
  #screen-success4 .btn, #screen-success5 .btn { padding: 11px 24px; font-size: 16px; }
  #screen-success4 .stars, #screen-success5 .stars { font-size: 24px; letter-spacing: 3px; }
  #screen-success4 .level-title, #screen-success5 .level-title { font-size: clamp(24px, 7.4vw, 30px); }
  #screen-success4 .score-big, #screen-success5 .score-big { font-size: 16px; }
}

/* La pantalla de fin del Nivel 4 tiene tres botones y un titular largo
   («¡Has cruzado la turbulencia!»), que a 390 px se parte en dos líneas.
   Se compensa con un sprite algo más pequeño para que «← Menú» no se corte. */
/* Solo en pantallas altas: por debajo de 780 px de alto mandan las reglas
   compactas de arriba y esto las desharía. */
@media (min-height: 781px) {
  #screen-success4 .nubecita { width: 122px; }
  #screen-success4 .level-title { font-size: clamp(28px, 7.6vw, 38px); }
}
@media (max-height: 640px) {
  #screen-success4 .nubecita, #screen-success5 .nubecita { width: 64px; }
  #screen-success4 .content, #screen-success5 .content { gap: 8px; }
}

.pw-legal { margin: 10px 0 0; font-size: 11.5px; line-height: 1.5; color: rgba(255,255,255,.62); text-align: center; max-width: 320px; margin-left: auto; margin-right: auto; }
.pw-legal a { color: rgba(255,255,255,.85); text-decoration: underline; }

/* =====================================================================
   Herramientas de vuelo (#34)
   Cuatro pantallas nuevas de copy + una entrada única en el menú. El arte y
   el motor de respiración son los que ya existían: aquí solo hay layout.
   ===================================================================== */

/* --- Hub de herramientas --- */
.tool-list { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.tool-btn { position: relative; display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; padding: 13px 22px; border-radius: 22px; }
.tool-name { font-size: 17px; font-weight: 600; letter-spacing: .1px; }
.tool-note { margin-top: 2px; font-size: 12.5px; font-weight: 600; letter-spacing: .1px; opacity: .72; }
.tool-btn .btn-lock { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); margin: 0; font-size: 15px; opacity: .85; }

/* --- Modo vuelo lite (checklist de 3 pasos, gratis) --- */
#screen-modo { overflow-y: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
.modo-content { gap: 12px; margin: auto 0; padding: 8px 0; }
.modo-steps { width: 100%; display: flex; flex-direction: column; gap: 9px; }
.modo-step { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 14px 16px; border-radius: 22px; border: 1px solid var(--hairline-soft); background: rgba(255,255,255,.10); color: #fff; font-family: inherit; font-size: 14px; line-height: 1.45; font-weight: 500; cursor: pointer; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 rgba(255,255,255,.16); transition: background .3s var(--ease-out), border-color .3s var(--ease-out); -webkit-tap-highlight-color: transparent; }
.modo-step:active { transform: scale(.988); }
.modo-check { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,.45); margin-top: 1px; transition: background .3s var(--ease-out), border-color .3s var(--ease-out); }
.modo-step.done { background: rgba(122,214,164,.16); border-color: rgba(122,214,164,.36); }
.modo-step.done .modo-check { background: #7ad6a4; border-color: #7ad6a4; }
.modo-step.done .modo-check::after { content: "✓"; display: block; text-align: center; font-size: 15px; line-height: 20px; font-weight: 700; color: #14432b; }
.modo-step.done .modo-text { opacity: .78; }
.modo-text strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.modo-progress { font-size: 12.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255,255,255,.78); }

/* --- Tarjetas «por qué no pasa nada» (pago) --- */
#screen-tarjetas { overflow-y: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
.fc-content { gap: 13px; margin: auto 0; padding: 8px 0; }
.fc-card { width: 100%; padding: 20px 22px 24px; text-align: left; border-radius: 28px; background: linear-gradient(180deg, rgba(255,255,255,.17), rgba(255,255,255,.09)); border: 1px solid var(--hairline); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 18px 50px rgba(8,10,40,.36); }
.fc-card.fc-in { animation: screenIn .35s var(--ease-out); }
.fc-num { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: rgba(255,255,255,.62); }
.fc-title { font-size: clamp(24px, 7vw, 30px); font-weight: 700; letter-spacing: -.2px; margin: 6px 0 10px; }
.fc-body { font-size: 15.5px; line-height: 1.56; font-weight: 500; color: rgba(255,255,255,.94); }
.fc-nav { display: flex; gap: 10px; width: 100%; }
.fc-arrow { flex: 0 0 auto; padding: 16px 22px; font-size: 18px; }
.fc-next { flex: 1 1 auto; padding: 16px 22px; font-size: 16px; }

/* --- Práctica libre (pago): cinco niveles, sin vídeo ni estrellas --- */
#screen-repaso { overflow-y: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
#screen-repaso .content { margin: auto 0; padding: 8px 0; gap: 14px; }
.rp-list { gap: 8px; }
.rp-list .btn { padding: 13px 20px; font-size: 16px; }

/* --- Calma de 3 minutos (pago): paneles sobre el motor compartido --- */
.c3-pane { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.c3-pane .hint { max-width: 320px; }
.c3-pane .btn.tiny { max-width: 180px; }

/* La ruta cabe entera sin scroll en cualquier móvil razonable (#51 lo mide en
   320x568, 375x667 y 390x844). El scroll se queda como red de seguridad. */
#screen-menu { overflow-y: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; }

@media (max-height: 700px) {
  .tool-btn { padding: 11px 18px; }
  .tool-name { font-size: 16px; }
  .tool-note { font-size: 12px; }
  .fc-body { font-size: 14.5px; line-height: 1.5; }
  .fc-card { padding: 16px 18px 18px; }
  .modo-step { padding: 12px 14px; font-size: 13.5px; }
  .rp-list .btn { padding: 11px 18px; font-size: 15px; }
}
@media (max-height: 660px) {
  .tool-list { gap: 7px; }
  .tool-btn { padding: 9px 16px; }
  .tool-note { display: none; }
  .modo-text strong { display: inline; margin-bottom: 0; }
}

/* =====================================================================
   «En el avión» (#48) — 7 tarjetas, una por fase del vuelo.
   Estructura: cabecera (chip + menú) / tarjeta con scroll propio / «Escuchar» /
   un único «Siguiente» grande / índice secundario de 7. La tarjeta scrollea
   por dentro, así que el botón grande no se mueve ni se corta en 375x667.
   ===================================================================== */
#screen-avion { justify-content: flex-start; }
.avion-wrap { position: relative; z-index: 2; width: 100%; max-width: 440px; height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.avion-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; }
.avion-top .chip { padding: 7px 16px; font-size: 12px; letter-spacing: 1.2px; }
.btn.tiny.avion-menu { flex: 0 0 auto; opacity: .9; }

.avion-card { position: relative; flex: 0 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 20px; text-align: left; font-size: 16px; line-height: 1.55; }
.avion-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.avion-nub { width: 54px; height: auto; flex: 0 0 auto; filter: drop-shadow(0 8px 16px rgba(24,26,80,.35)); }
.avion-head-text { min-width: 0; }
.avion-step { font-size: 11.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255,255,255,.68); }
.avion-label { font-size: clamp(24px, 7vw, 30px); font-weight: 700; line-height: 1.1; letter-spacing: -.2px; }
.avion-text p { font-size: 16px; font-weight: 500; color: rgba(255,255,255,.96); }
.avion-text p + p { margin-top: 9px; }

.avion-action { margin-top: 14px; padding: 12px 14px; border-radius: 18px; background: rgba(255,217,227,.16); border: 1px solid rgba(255,183,203,.34); font-size: 15px; line-height: 1.45; font-weight: 600; }
.avion-action-key { display: block; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: #ffd9e3; margin-bottom: 4px; }

.avion-fact-btn { display: block; width: 100%; margin-top: 10px; padding: 11px 14px; text-align: left; font-family: inherit; font-size: 14px; font-weight: 600; color: #ffe6ee; background: rgba(255,255,255,.08); border: 1px dashed rgba(255,255,255,.28); border-radius: 16px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.avion-fact-btn::after { content: " ›"; }
.avion-fact-btn[aria-expanded="true"]::after { content: " ⌄"; }
.avion-fact { margin-top: 8px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.10); border: 1px solid var(--hairline-soft); font-size: 14.5px; line-height: 1.5; font-weight: 500; color: rgba(255,255,255,.94); animation: screenIn .3s var(--ease-out); }

/* Voz: un solo botón, discreto. El texto de la tarjeta manda; esto es el extra. */
.avion-audio { flex: 0 0 auto; margin-top: auto; align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; font-family: inherit; font-size: 14px; font-weight: 600; color: #fff; background: rgba(255,255,255,.12); border: 1px solid var(--hairline-soft); border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .25s var(--ease-out), transform .25s var(--ease-spring); }
.avion-audio:active { transform: scale(.96); }
.avion-audio.playing { background: rgba(255,217,227,.26); border-color: rgba(255,183,203,.55); }
.avion-audio-icon { font-size: 15px; }
.avion-audio-note { flex: 0 0 auto; font-size: 12.5px; line-height: 1.4; font-weight: 500; color: rgba(255,255,255,.72); text-align: center; }

.avion-next { flex: 0 0 auto; width: 100%; padding: 17px 30px; font-size: 19px; }

/* Índice secundario: pequeño, en una fila con scroll. Nunca es el camino
   principal, pero deja saltar a cualquier tarjeta, en cualquier orden. */
.avion-index { flex: 0 0 auto; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 2px 0 4px; scrollbar-width: none; }
.avion-index::-webkit-scrollbar { display: none; }
.avion-index-item { flex: 0 0 auto; padding: 7px 12px; font-family: inherit; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.72); background: rgba(255,255,255,.08); border: 1px solid var(--hairline-soft); border-radius: 999px; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .2s var(--ease-out), background .2s var(--ease-out); }
.avion-index-item.current { color: #5b2b3d; background: linear-gradient(180deg, #ffd9e3, #ffb7cb); border-color: transparent; }

/* Aterrizaje: la única celebración de la pantalla. Sin puntuación ni estrellas. */
.avion-card.celebrate { animation: avionCelebrate .8s var(--ease-out); }
@keyframes avionCelebrate { 0% { transform: none; } 30% { transform: translateY(-6px) scale(1.012); } 100% { transform: none; } }

@media (max-height: 800px) {
  .avion-wrap { gap: 8px; }
  .avion-card { padding: 15px 17px; font-size: 15px; }
  .avion-nub { width: 46px; }
  .avion-text p { font-size: 15px; }
  .avion-text p + p { margin-top: 7px; }
  .avion-action { margin-top: 11px; padding: 10px 12px; font-size: 14px; }
  .avion-next { padding: 15px 26px; font-size: 18px; }
}
@media (max-height: 700px) {
  .avion-card { padding: 13px 15px; }
  .avion-label { font-size: clamp(21px, 6.4vw, 26px); }
  .avion-action { font-size: 13.5px; }
  .avion-audio { padding: 8px 15px; font-size: 13px; }
  .avion-next { padding: 13px 24px; font-size: 17px; }
}
@media (max-height: 620px) {
  .avion-nub { display: none; }
  .avion-index { display: none; }
}



/* ═══ Portada (#55, spec de #54; pulido: docs/LANDING-RESEARCH.md) ═══
   Una sola pantalla, sin scroll, a 320×568 / 375×667 / 390×844. Instalar es la
   única acción principal. Si el elemento no cabe, se encoge el arte, no se añade
   scroll.
   Técnica base: móvil = pila centrada de siempre (.landing-art y .landing-copy
   son display:contents, así que sus hijos son hijos del flex); escritorio =
   grid de dos columnas a partir de 900 px. Un solo árbol de HTML. */
html[data-entry="app"] #screen-landing { display: none; }

.landing { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 9px; width: 100%; max-width: 380px; margin: auto 0; text-align: center; }
.landing-art, .landing-copy { display: contents; }
.landing-plate, .landing-glow, .landing-cloud { display: none; }

.landing-hero { width: clamp(104px, 34vw, 132px); height: auto; filter: drop-shadow(0 18px 34px rgba(10,12,40,.45)); }

.landing-h1 { font-size: clamp(28px, 8.4vw, 36px); font-weight: 700; line-height: 1.06; letter-spacing: -.02em; max-width: 17ch; text-wrap: balance; text-shadow: 0 6px 24px rgba(12,14,50,.5); }
.landing-sub { font-size: clamp(15px, 1.15vw, 19px); line-height: 1.35; color: rgba(255,255,255,.86); max-width: 32ch; text-wrap: pretty; }

/* Prueba como tira de 3 celdas (patrón App Store), no como párrafo. */
.landing-proof { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; width: 100%; max-width: 320px; margin-top: 3px; }
.proof-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); }
.proof-cell b { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.proof-cell i { font-size: 10px; font-style: normal; letter-spacing: .5px; text-transform: uppercase; color: rgba(255,255,255,.62); }
.proof-quote { font-size: 13px; line-height: 1.4; color: rgba(255,255,255,.72); max-width: 34ch; }

/* CTA: el glifo lo hace leer como el botón del sistema, no como una instrucción. */
.landing-cta { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; max-width: 320px; padding: 17px 22px; font-size: 17px; margin-top: 6px; line-height: 1.15; }
.cta-glyph { display: inline-block; flex: 0 0 auto; width: 13px; height: 15px; border: 2px solid currentColor; border-radius: 4px; position: relative; }
.cta-glyph::after { content: ''; position: absolute; left: 50%; top: -6px; width: 2px; height: 10px; border-radius: 2px; background: currentColor; transform: translateX(-50%); }
.landing-cta.no-glyph .cta-glyph { display: none; }
.landing-note { font-size: 12px; color: rgba(255,255,255,.58); }
.landing-escape { border: none; background: none; padding: 5px 8px; font-family: inherit; font-size: 12px; color: rgba(255,255,255,.62); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.landing-escape:active { color: #fff; }
.landing-chips { display: none; }

/* Entrada escalonada (mecánica de Sky): CSS puro, ~0,85 s hasta que el CTA
   se posa. Nunca pointer-events:none — el CTA es pulsable desde el frame 1. */
@keyframes arrival { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.landing-hero, .landing-h1, .landing-sub, .landing-proof, .proof-quote,
.landing-cta, .landing-note, .landing-chips { animation: arrival .56s var(--ease-out) both; }
.landing-hero.bob { animation: arrival .56s var(--ease-out) .04s both, bob 4.8s var(--ease-out) .7s infinite; }
.landing-h1    { animation-delay: .10s; }
.landing-sub   { animation-delay: .16s; }
.landing-proof { animation-delay: .22s; }
.proof-quote   { animation-delay: .26s; }
.landing-cta   { animation-delay: .30s; }
.landing-note  { animation-delay: .36s; }
.landing-chips { animation-delay: .40s; }

@keyframes ctaPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 14px 40px rgba(255,150,180,.45); }
  50%      { box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 18px 54px rgba(255,150,180,.62); }
}
.landing-cta { animation: arrival .56s var(--ease-out) .30s both, ctaPulse 4.8s ease-in-out 1.2s infinite; }

/* Velo: abajo arriba en móvil, izquierda→derecha en escritorio (como el menú). */
#screen-landing .scrim { background: linear-gradient(180deg, rgba(16,18,48,.14) 0%, rgba(16,18,48,.42) 46%, rgba(16,18,48,.80) 100%); }
/* Móvil: el encuadre se va a la ventana y deja al personaje del arte fuera de
   cuadro, para que no compita con la Nubecita del juego ni con el texto. */
#screen-landing .bg { background-position: 78% 42%; }

/* Destellos: 6 puntos, 4 en móvil. Solo opacity y transform. */
.landing-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.landing-fx span { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: 0; animation: twinkle 5.5s ease-in-out infinite; }
.landing-fx span:nth-child(1) { left: 12%; top: 14%; animation-duration: 5.5s; }
.landing-fx span:nth-child(2) { left: 78%; top: 9%;  animation-duration: 7s;   animation-delay: 1.1s; }
.landing-fx span:nth-child(3) { left: 26%; top: 42%; animation-duration: 9s;   animation-delay: 2.4s; width: 3px; height: 3px; }
.landing-fx span:nth-child(4) { left: 66%; top: 34%; animation-duration: 6.2s; animation-delay: .6s; width: 6px; height: 6px; }
.landing-fx span:nth-child(5) { left: 44%; top: 8%;  animation-duration: 8s;   animation-delay: 3.2s; }
.landing-fx span:nth-child(6) { left: 88%; top: 52%; animation-duration: 6.8s; animation-delay: 1.8s; width: 3px; height: 3px; }
.landing-fx span:nth-child(n+5) { display: none; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.6); } 50% { opacity: .55; transform: scale(1); } }
@keyframes driftUp {
  from { transform: translateY(18px); opacity: 0; }
  12%  { opacity: .18; }
  82%  { opacity: .18; }
  to   { transform: translateY(-120px); opacity: 0; }
}

/* Foco y hover: hoy no había ni anillo de foco en la portada. */
:where(.landing-cta, .landing-escape, .sheet-close):focus-visible {
  outline: 3px solid rgba(255,217,227,.95); outline-offset: 3px;
}
@media (hover: hover) {
  .landing-cta:hover { filter: brightness(1.04); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 18px 46px rgba(255,150,180,.55); }
  .landing-escape:hover { color: #fff; }
}

/* Hoja de instrucciones: iOS y Android no se pueden disparar por código, así que
   el botón enseña los pasos reales del sistema en lugar de fingir un prompt. */
.install-sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(10,12,34,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: sheetFade .2s var(--ease-out); }
@keyframes sheetFade { from { opacity: 0; } to { opacity: 1; } }
.install-sheet.hidden { display: none; }
.install-sheet-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; padding: 12px 22px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 24px 24px 0 0; background: linear-gradient(180deg, rgba(38,42,88,.96), rgba(24,27,62,.98)); border-top: 1px solid var(--hairline); box-shadow: 0 -18px 60px rgba(6,8,26,.6); animation: sheetUp .36s var(--ease-spring); }
@keyframes sheetUp { from { transform: translateY(24%); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-grabber { align-self: center; width: 36px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.28); margin: 0 0 2px; }
.sheet-title { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.sheet-steps { display: flex; flex-direction: column; gap: 8px; }
.sheet-steps.hidden { display: none; }
.sheet-step { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,.9); }
.sheet-step b { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,217,227,.92); color: #5b2b3d; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.sheet-glyph { color: rgba(255,255,255,.92); vertical-align: -1px; }
.sheet-why { font-size: 12px; color: rgba(255,255,255,.6); }
.sheet-close { width: 100%; padding: 14px 20px; font-size: 16px; }
.sheet-installed { align-self: center; margin-top: -2px; }

/* Pantallas bajas (568, 667): encoge el arte antes de tocar la estructura. */
@media (max-height: 700px) {
  .landing { gap: 7px; }
  .landing-hero { width: 112px; }
  .landing-h1 { font-size: clamp(26px, 7.6vw, 33px); }
  .landing-sub { font-size: 14px; max-width: 31ch; }
  .proof-cell { padding: 7px 6px; }
  .proof-quote { font-size: 12px; }
}
@media (max-height: 600px) {
  .landing { gap: 6px; }
  .landing-hero { width: 104px; }
  .landing-h1 { font-size: 27px; }
  .landing-sub { font-size: 13.5px; max-width: 32ch; }
  .landing-cta { padding: 14px 18px; font-size: 16px; }
  .proof-cell b { font-size: 15px; }
  .landing-note { font-size: 11px; }
}

/* ═══ Escritorio (≥900 px): placa de arte + carril de 420 px ═══
   Geometría de Duolingo (arte ~40 % del contenido, carril de conversión fijo),
   no de una columna centrada en 1440 px. */
@media (min-width: 900px) {
  #screen-landing .scrim { background: linear-gradient(100deg, rgba(12,14,48,.90) 0%, rgba(12,14,48,.74) 42%, rgba(12,14,48,.30) 74%, rgba(12,14,48,.52) 100%); }
  /* El mismo arte hace de fondo y de placa: el fondo se funde (blur + énfasis
     bajo) para que la placa lea como objeto y no como una foto repetida. */
  #screen-landing .bg { background-position: center; filter: blur(3px) brightness(.74) saturate(1.06); transform: scale(1.05); }

  #screen-landing .landing {
    display: grid; grid-template-columns: minmax(0, 1fr) 420px;
    align-items: center; gap: clamp(32px, 6vw, 96px);
    max-width: 1180px; width: 100%; margin: auto; padding: 0 24px; text-align: left;
  }

  .landing-art { display: block; position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: min(76vh, 620px); border-radius: 32px; overflow: hidden; box-shadow: 0 40px 120px -24px rgba(6,8,26,.72), inset 0 0 0 1px rgba(255,255,255,.10); will-change: transform; }
  .landing-plate { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 45%; transform: scale(1.06) translate3d(calc(var(--px, 0) * -8px), calc(var(--py, 0) * -6px), 0); transition: transform .5s var(--ease-out); }
  .landing-glow { display: block; position: absolute; left: -10%; right: -10%; bottom: -18%; height: 55%; pointer-events: none; background: radial-gradient(60% 60% at 50% 100%, rgba(255,183,203,.55), transparent 70%); filter: blur(6px); }
  .landing-hero { display: block; position: absolute; left: 47%; bottom: 5%; width: min(64%, 330px); height: auto; filter: drop-shadow(0 18px 34px rgba(10,12,40,.45)); translate: calc(var(--px, 0) * 4px) calc(var(--py, 0) * 3px); }
  .landing-cloud { display: block; position: absolute; width: 84px; opacity: 0; pointer-events: none; }
  .landing-cloud.c1 { left: 8%; top: 14%; animation: driftUp 19s linear infinite; }
  .landing-cloud.c2 { right: 10%; top: 42%; width: 64px; animation: driftUp 26s linear infinite 3s; }

  .landing-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
  .landing-h1 { font-size: clamp(44px, 4vw, 62px); line-height: .98; letter-spacing: -.02em; max-width: 15ch; }
  .landing-sub { font-size: 19px; line-height: 1.4; max-width: 34ch; }
  .landing-proof { max-width: none; align-self: stretch; }
  .proof-quote { font-size: 14px; max-width: none; }
  .landing-cta { width: 100%; max-width: none; }
  .landing-note { font-size: 13px; }
  .landing-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
  .landing-chips span { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.82); padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.12); }
}

/* Movimiento reducido: sin entrada, sin pulsos, sin bucles. La página queda
   completamente legible y el CTA se puede pulsar igual. */
@media (prefers-reduced-motion: reduce) {
  .screen.active, .bob, .landing-hero, .landing-h1, .landing-sub, .landing-proof,
  .proof-quote, .landing-cta, .landing-note, .landing-chips,
  .landing-fx span, .landing-cloud, .install-sheet, .install-sheet-card { animation: none !important; }
  .landing-plate, .landing-hero { transform: none !important; translate: none !important; transition: none !important; }
}
