:root {
  --sky-top: #7fd1f7;
  --sky-bot: #d7f2ff;
  --sea: #3fb5e5;
  --ink: #3b2a1a;
  --card: #ffffff;
  --accent: #ff8a3d;
  --accent-dark: #e0661a;
  --good: #22c55e;
  --leo: clamp(110px, 21vmin, 190px);
  --tap: clamp(64px, 11vmin, 96px);
  font-family: 'Baloo 2', 'Comic Sans MS', system-ui, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--sky-top); }
body { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
svg { display: block; }

#app {
  position: fixed; inset: 0;
  background: linear-gradient(var(--sky-top), var(--sky-bot) 70%);
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- Nubes ---------- */
.clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.clouds span { position: absolute; top: var(--y); left: -160px; opacity: .9; animation: drift var(--t) linear infinite; animation-delay: var(--d); }
@keyframes drift { to { transform: translateX(calc(100vw + 320px)); } }

/* ---------- Botones comunes ---------- */
.tap { transition: transform .12s; }
.tap:active { transform: scale(.92); }
.icon-btn {
  width: var(--tap); height: var(--tap); border-radius: 50%;
  background: var(--accent); box-shadow: 0 6px 0 var(--accent-dark);
  display: grid; place-items: center; position: relative; flex: none;
}
.icon-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--accent-dark); }
.icon-btn svg { width: 58%; height: 58%; }
.icon-btn b {
  position: absolute; top: -6px; right: -6px; background: #fff; color: var(--accent-dark);
  border-radius: 999px; min-width: 32px; height: 32px; display: grid; place-items: center; font-size: 20px;
  box-shadow: 0 2px 6px #0003;
}
.icon-btn.repeat { background: #3b82f6; box-shadow: 0 6px 0 #1d5fd0; }
.icon-btn.album-btn { background: #a855f7; box-shadow: 0 6px 0 #7e2fd0; }

.topbar {
  position: absolute; top: max(14px, env(safe-area-inset-top)); left: 16px; right: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 5;
}
.progress { flex: 1; max-width: 520px; height: 26px; background: #ffffffaa; border-radius: 999px; overflow: hidden; box-shadow: inset 0 3px 0 #0001; }
.bar { height: 100%; width: 0; background: linear-gradient(90deg, #4ade80, #22c55e); border-radius: 999px; transition: width .5s cubic-bezier(.3, 1.5, .5, 1); }

/* ---------- Leo y el globo ---------- */
.leo { width: 100%; height: auto; overflow: visible; }
.leo .leo-head { transform-origin: 100px 150px; animation: headbob 3s ease-in-out infinite; }
.leo .leo-tail { transform-origin: 150px 205px; animation: tail 1.6s ease-in-out infinite; }
@keyframes headbob { 50% { transform: rotate(3deg) translateY(-2px); } }
@keyframes tail { 50% { transform: rotate(-12deg); } }
.leo-wow .leo-paw-l { transform-origin: 54px 205px; animation: clapL .4s ease-in-out 3; }
.leo-wow .leo-paw-r { transform-origin: 146px 205px; animation: clapR .4s ease-in-out 3; }
@keyframes clapL { 50% { transform: rotate(35deg) translate(16px, -30px); } }
@keyframes clapR { 50% { transform: rotate(-35deg) translate(-16px, -30px); } }
.leo-sad .leo-head { animation: none; transform: rotate(-4deg); transform-origin: 100px 150px; }

.mascot { position: absolute; left: 12px; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 6; display: flex; align-items: flex-end; pointer-events: none; }
.leo-wrap { width: var(--leo); pointer-events: auto; }
.mascot.talking .leo-wrap { animation: talk .35s ease-in-out infinite alternate; }
@keyframes talk { to { transform: translateY(-5px) scale(1.02); } }
.bubble {
  order: 2; margin: 0 0 calc(var(--leo) * .78) -10px; max-width: min(46vw, 420px);
  background: #fff; border-radius: 26px; padding: 10px 20px; font-size: clamp(20px, 3.6vmin, 32px); font-weight: 800; line-height: 1.15;
  box-shadow: 0 6px 0 #0001, 0 6px 20px #0002; position: relative; transition: opacity .2s, transform .2s;
}
.bubble::before { content: ''; position: absolute; left: -12px; bottom: 14px; border: 12px solid transparent; border-right-color: #fff; border-left: 0; }
.bubble.hidden { opacity: 0; transform: scale(.8); }
.bubble mark { background: none; color: var(--c, var(--accent-dark)); text-decoration: underline wavy; text-underline-offset: 6px; }

/* ---------- Inicio ---------- */
.screen-home { display: grid; place-items: center; align-content: center; gap: 2vmin; }
.logo { margin: 0; font-size: clamp(48px, 11vmin, 110px); line-height: 1; font-weight: 800; letter-spacing: -1px; z-index: 1; text-align: center; }
.logo span { color: #fff; text-shadow: 0 6px 0 #2b9fd3; }
.logo b { color: #ffd23f; text-shadow: 0 6px 0 #e08e0b; }
.home-leo { width: clamp(180px, 38vmin, 340px); z-index: 1; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.big-play {
  width: clamp(110px, 20vmin, 170px); height: clamp(110px, 20vmin, 170px); border-radius: 50%; z-index: 1;
  background: var(--good); box-shadow: 0 10px 0 #15803d; display: grid; place-items: center;
  animation: pulse 1.6s ease-in-out infinite;
}
.big-play svg { width: 55%; height: 55%; margin-left: 8%; }
@keyframes pulse { 50% { transform: scale(1.07); } }
.sea { position: absolute; left: 0; right: 0; bottom: 0; height: 14vh; background: var(--sea); border-radius: 50% 50% 0 0 / 30px 30px 0 0; opacity: .7; }
.parent-btn {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 16px; z-index: 5;
  width: 58px; height: 58px; border-radius: 50%; background: #ffffff99; font-size: 28px;
  display: grid; place-items: center;
}
.parent-btn em { position: absolute; top: 64px; right: 0; white-space: nowrap; font-style: normal; font-size: 13px; background: #fff; border-radius: 8px; padding: 2px 8px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.parent-btn.holding em, .parent-btn:hover em { opacity: 1; }
.parent-btn::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 5px solid var(--good); clip-path: inset(100% 0 0 0); }
.parent-btn.holding::after { animation: fillring 3s linear forwards; }
@keyframes fillring { to { clip-path: inset(0 0 0 0); } }

/* ---------- Mapa ---------- */
.screen-map .islands {
  position: absolute; inset: calc(var(--tap) + 30px) 16px calc(var(--leo) * .85) 16px;
  display: flex; gap: 3vw; align-items: center; justify-content: center; overflow-y: auto;
}
.island { flex: 1; min-width: 0; width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; }
.island-art { width: min(100%, 360px); animation: float 4s ease-in-out infinite; }
.island-numbers .island-art { animation-delay: -2s; }
.stations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2vmin; width: 100%; margin-top: -2vmin; }
.station {
  background: var(--card); border-radius: 26px; padding: 10px 6px 6px; box-shadow: 0 6px 0 #0000001a;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: popin .5s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--i) * .08s + .1s);
}
@keyframes popin { from { transform: scale(0); } }
.station-thumb { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.station-stars { display: flex; }
.station-stars svg { width: clamp(14px, 2.6vmin, 24px); height: auto; }
.thumb-splats { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; width: 76%; }
.thumb-splats i { aspect-ratio: 1; border-radius: 50%; }
.thumb-balloons { display: flex; width: 86%; }
.thumb-balloons svg { width: 50%; height: auto; }
.thumb-one { width: 72%; }
.thumb-one svg { width: 100%; height: auto; }
.thumb-digits { display: flex; gap: 2px; font-size: clamp(26px, 5vmin, 44px); font-weight: 800; }
.thumb-digits b:nth-child(1) { color: #3b82f6; } .thumb-digits b:nth-child(2) { color: #ef4444; } .thumb-digits b:nth-child(3) { color: #22c55e; }

/* ---------- Juego ---------- */
.stage {
  position: absolute; inset: calc(var(--tap) + 36px) 16px calc(var(--leo) * .9) 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vmin;
}
.grid { display: grid; gap: 2.2vmin; width: min(100%, 900px); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); width: min(100%, 56vh, 520px); }
.card {
  background: var(--card); border-radius: 26px; box-shadow: 0 6px 0 #0000001a; aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;
  max-height: 30vh;
}
.card.done::after {
  content: '✓'; position: absolute; top: 6px; right: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--good); color: #fff; font-size: 20px; font-weight: 800; display: grid; place-items: center;
}
.splat { width: 62%; aspect-ratio: 1; background: var(--c); border-radius: 46% 54% 50% 50% / 55% 45% 55% 45%; box-shadow: inset -8px -8px 0 #0002; }
.word { font-size: clamp(16px, 3vmin, 28px); font-weight: 800; margin-top: 4px; }
.number-card .digit { font-size: clamp(36px, 9vmin, 80px); font-weight: 800; line-height: 1; text-shadow: 0 4px 0 #0001; }
.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; width: 80%; min-height: 12px; }
.dots i { width: clamp(7px, 1.4vmin, 12px); aspect-ratio: 1; border-radius: 50%; background: #ef4444; }
.bounce { animation: bounce .45s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes bounce { 30% { transform: scale(1.18) rotate(-4deg); } }

.balloon-row { display: flex; gap: 4vw; align-items: flex-end; justify-content: center; width: 100%; }
.balloon { width: clamp(90px, 17vmin, 170px); animation: sway 2.6s ease-in-out infinite; }
.balloon-row.small .balloon { width: clamp(76px, 13vmin, 130px); }
.balloon svg { width: 100%; height: auto; }
@keyframes sway { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
.balloon.popped { animation: popped .3s forwards; }
@keyframes popped { to { transform: scale(1.6); opacity: 0; } }

.hint { animation: hint 1s ease-in-out infinite !important; filter: drop-shadow(0 0 14px #fff) drop-shadow(0 0 6px #ffd23f); }
@keyframes hint { 50% { transform: scale(1.12); } }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-12px) rotate(-4deg); } 40%, 80% { transform: translateX(12px) rotate(4deg); } }

.paint-pic { width: min(44vmin, 340px); background: #fff; border-radius: 40px; padding: 4vmin; box-shadow: 0 8px 0 #0000001a; }
.paint-pic svg { width: 100%; height: auto; }
.paint-pic.painted { animation: bounce .5s; }
.bucket-row { display: flex; gap: 4vw; }
.bucket { width: clamp(80px, 15vmin, 140px); }

.find-grid .find-item { background: #fff; border-radius: 22px; aspect-ratio: 1; padding: 14%; box-shadow: 0 5px 0 #0000001a; }
.find-item.found { background: #dcfce7; outline: 5px solid var(--good); animation: bounce .45s; }

.apple-field { display: flex; flex-wrap: wrap; gap: 1.6vmin; justify-content: center; max-width: min(92%, 700px); }
.apple { width: clamp(52px, 10vmin, 90px); animation: popin .4s cubic-bezier(.3, 1.6, .5, 1) backwards; position: relative; }
.apple svg { width: 100%; height: auto; }
.apple.counted::after {
  content: attr(data-n); position: absolute; inset: 0; display: grid; place-items: center; padding-top: 12%;
  color: #fff; font-weight: 800; font-size: clamp(22px, 4.5vmin, 40px); text-shadow: 0 2px 0 var(--ink);
}

.stage-n-basket { flex-direction: row; gap: 6vw; }
.apple-tree {
  display: grid; grid-template-columns: repeat(3, auto); gap: 2vmin; padding: 3vmin;
  background: radial-gradient(circle at 50% 40%, #4ade80, #16a34a); border-radius: 50% 50% 46% 46%; box-shadow: 0 8px 0 #15803d;
}
.apple.drag { touch-action: none; cursor: grab; }
.apple.dragging { z-index: 20; filter: drop-shadow(0 10px 8px #0004); }
.basket { width: clamp(150px, 30vmin, 280px); position: relative; transition: transform .2s; }
.basket svg { width: 100%; height: auto; }
.basket.over { transform: scale(1.1); }
.basket-count {
  position: absolute; left: 50%; top: -18%; transform: translateX(-50%); font-size: clamp(36px, 8vmin, 72px); font-weight: 800;
  color: #fff; text-shadow: 0 4px 0 var(--accent-dark), 0 0 10px #0003;
}

/* ---------- Efectos ---------- */
.confetti, .spark { position: absolute; width: 12px; height: 16px; border-radius: 3px; animation: fly 1.3s cubic-bezier(.2, .7, .4, 1) forwards; }
.spark { width: 12px; height: 12px; border-radius: 50%; animation-duration: .7s; }
@keyframes fly {
  to { transform: translate(var(--dx), calc(var(--dy) + 160px)) rotate(var(--r)); opacity: 0; }
}

/* ---------- Premio ---------- */
.reward { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vmin; }
.reward-stars { display: flex; gap: 2vmin; }
.rstar svg { width: clamp(70px, 15vmin, 130px); height: auto; }
.rstar { animation: starin .6s cubic-bezier(.3, 1.8, .5, 1) backwards; animation-delay: var(--d); }
.rstar:nth-child(2) { transform: translateY(-20px); }
@keyframes starin { from { transform: scale(0) rotate(-180deg); } }
.sticker-reveal { font-size: clamp(70px, 16vmin, 140px); line-height: 1; animation: starin .8s 1.3s cubic-bezier(.3, 1.8, .5, 1) backwards, float 3s 2s ease-in-out infinite; filter: drop-shadow(0 6px 0 #fff) drop-shadow(0 0 2px #fff); }
.reward-leo { width: clamp(140px, 26vmin, 230px); }
.reward-btns { display: flex; gap: 6vw; }
.round-btn { width: clamp(80px, 14vmin, 120px); height: clamp(80px, 14vmin, 120px); border-radius: 50%; display: grid; place-items: center; background: var(--good); box-shadow: 0 8px 0 #15803d; }
.round-btn.tomap { background: var(--accent); box-shadow: 0 8px 0 var(--accent-dark); }
.round-btn svg { width: 55%; height: 55%; }

/* ---------- Álbum ---------- */
.album {
  position: absolute; inset: calc(var(--tap) + 36px) 16px calc(var(--leo) * .6) 16px; margin: auto; max-width: 760px; max-height: 70vh;
  background: #fff8e8; border-radius: 34px; padding: 3vmin; box-shadow: 0 10px 0 #e9d9b4;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5vmin; align-content: center;
}
.sticker { aspect-ratio: 1; border-radius: 24px; background: #fff; box-shadow: 0 5px 0 #0000001a; font-size: clamp(40px, 9vmin, 84px); display: grid; place-items: center; }
.sticker.locked { background: #efe6d2; box-shadow: inset 0 4px 0 #0000000d; }
.sticker.locked span { filter: grayscale(1) brightness(0); opacity: .14; transition: opacity .3s; }
.sticker.locked.peek span { opacity: .35; }

/* ---------- Hora de descansar ---------- */
.screen-bedtime { background: linear-gradient(#1e1b4b, #4338ca); }
.night i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff; animation: twinkle 2s ease-in-out infinite; }
.bedtime { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vmin; }
.moon { width: 18vmin; height: 18vmin; border-radius: 50%; box-shadow: 4vmin -2vmin 0 0 #fde68a; position: absolute; top: 8vh; right: 14vw; }
.sleepy-leo { width: clamp(180px, 36vmin, 320px); position: relative; filter: brightness(.9); }
.sleepy-leo .leo-head { animation: none; transform: rotate(-8deg); }
.zzz { position: absolute; top: -10%; right: -14%; color: #fff; font-weight: 800; font-size: 44px; }
.zzz b, .zzz i { display: inline-block; font-style: normal; animation: float 2s ease-in-out infinite; }
.zzz b { font-size: .75em; animation-delay: -.6s; } .zzz i { font-size: .55em; animation-delay: -1.2s; }
.parent-btn.inline { position: relative; top: auto; right: auto; width: auto; height: auto; border-radius: 999px; padding: 8px 18px; display: flex; gap: 8px; font-size: 22px; color: #fff; background: #ffffff22; }
.parent-btn.inline em { position: static; opacity: 1; background: none; font-size: 15px; color: #fff; padding: 0; }
@keyframes twinkle { 50% { opacity: .2; } }

/* ---------- Zona de papás ---------- */
.screen-parents { background: #f6f3ee; overflow-y: auto; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; user-select: text; -webkit-user-select: text; }
.parents { max-width: 680px; margin: 0 auto; padding: 20px 16px 60px; }
.parents header { display: flex; align-items: center; justify-content: space-between; }
.parents h2 { margin: 8px 0; font-size: 26px; }
.parents h3 { margin: 0 0 10px; font-size: 17px; }
.parents section { background: #fff; border-radius: 16px; padding: 16px; margin: 14px 0; box-shadow: 0 1px 3px #0001; }
.parents p { margin: 4px 0; }
.close { width: 44px; height: 44px; border-radius: 50%; background: #e7e1d4; font-size: 20px; }
.prog { list-style: none; margin: 0; padding: 0; }
.prog li { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #f0ebe2; }
.prog li.prog-head { font-weight: 700; color: #8a7a6a; font-size: 14px; border: 0; padding-top: 12px; }
.mini-stars { display: flex; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: #fef3c7; border-radius: 999px; padding: 4px 12px; font-weight: 600; }
.chip small { color: #a16207; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0ebe2; }
.row input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--good); }
.row select { font: inherit; padding: 6px 10px; border-radius: 10px; border: 1px solid #d6cfc2; background: #fff; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn { padding: 10px 16px; border-radius: 12px; background: #e7e1d4; font-weight: 600; }
.btn.danger { background: #fee2e2; color: #b91c1c; }
.muted { color: #8a7a6a; } .small { font-size: 13px; }

/* ---------- Pantallas verticales (celular) ---------- */
@media (orientation: portrait) {
  :root { --leo: clamp(100px, 26vw, 170px); }
  .screen-map .islands { flex-direction: column; justify-content: flex-start; gap: 4vh; padding-bottom: 20px; }
  .station { border-radius: 18px; padding: 6px 4px 4px; }
  .island-art { width: min(80%, 320px); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); width: min(100%, 46vh); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); width: min(100%, 44vh); }
  .grid-5 .card:last-child { grid-column: 2; }
  .stage-n-basket { flex-direction: column; }
  .bubble { max-width: 58vw; }
  .album { grid-template-columns: repeat(2, 1fr); max-height: none; }
}
@media (max-height: 520px) and (orientation: landscape) {
  :root { --leo: 96px; --tap: 56px; }
  .bubble { font-size: 18px; }
}

/* =========================================================
   Escenas animadas, mascotas y "¿quién juega?"
   ========================================================= */
.hidden { display: none !important; }
.leo-wrap .mascot-svg, .home-leo .mascot-svg, .reward-leo .mascot-svg, .sleepy-leo .mascot-svg { width: 100%; }
.sleepy-leo .m-head { animation: none; }

.scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.scene > .clouds { z-index: 1; }
.sun-big { position: absolute; top: 4%; right: 6%; width: clamp(80px, 14vmin, 150px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fff7b8, #ffd23f 55%, #ffb000); box-shadow: 0 0 0 14px #ffe36a55, 0 0 60px #ffe36a; animation: sunpulse 4s ease-in-out infinite; }
@keyframes sunpulse { 50% { box-shadow: 0 0 0 26px #ffe36a33, 0 0 80px #ffe36a; } }
.hills span { position: absolute; bottom: -12vh; border-radius: 50%; }
.hills span:first-child { left: -20%; width: 80%; height: 34vh; background: radial-gradient(ellipse at 50% 20%, #8ee67f, #46c35a 70%); }
.hills span:last-child { right: -25%; width: 90%; height: 30vh; background: radial-gradient(ellipse at 50% 20%, #a6f08f, #5bd16a 70%); }
.rainbow-bg { position: absolute; left: 50%; top: 18%; width: 140vmin; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; opacity: .28;
  background: radial-gradient(circle, transparent 54%, #a855f7 54% 56.5%, #3b82f6 56.5% 59%, #22c55e 59% 61.5%, #facc15 61.5% 64%, #fb923c 64% 66.5%, #ef4444 66.5% 69%, transparent 69%); }
.flower { position: absolute; left: var(--x); bottom: 2vh; font-size: calc(clamp(22px, 4vmin, 40px) * var(--s)); transform-origin: 50% 100%; animation: flowersway 3s ease-in-out infinite; animation-delay: var(--d); }
@keyframes flowersway { 50% { transform: rotate(12deg); } }
.butterfly { position: absolute; left: var(--x); top: var(--y); width: 34px; height: 26px; animation: flutter-path 14s ease-in-out infinite; animation-delay: var(--d); }
.butterfly i { position: absolute; top: 0; width: 17px; height: 24px; background: var(--c); border-radius: 60% 60% 40% 60%; animation: wings .25s ease-in-out infinite alternate; box-shadow: inset 0 -6px 0 #0000001a; }
.butterfly i:first-child { left: 0; transform-origin: 100% 50%; }
.butterfly i:last-child { right: 0; transform-origin: 0 50%; border-radius: 60% 60% 60% 40%; }
@keyframes wings { to { transform: scaleX(.2); } }
@keyframes flutter-path { 25% { translate: 18vw -6vh; } 50% { translate: 30vw 4vh; } 75% { translate: 10vw 10vh; } }
.tree { position: absolute; bottom: 8vh; font-size: clamp(60px, 14vmin, 140px); transform-origin: 50% 100%; animation: flowersway 6s ease-in-out infinite; }
.t1 { left: 2%; } .t2 { right: 3%; animation-delay: -2s; } .t3 { right: 14%; bottom: 20vh; font-size: clamp(30px, 6vmin, 60px); animation: float 3s ease-in-out infinite; }

/* Mar del mapa */
.scene-sea .waves { position: absolute; left: 0; right: 0; bottom: 0; height: 22vh; }
.scene-sea .waves span { position: absolute; left: -10%; width: 220%; height: 100%; bottom: 0; background: #3fb5e5; animation: wave 9s linear infinite;
  -webkit-mask: radial-gradient(34px 20px at 50% 0, transparent 97%, #000) 0 0 / 90px 100% repeat-x;
  mask: radial-gradient(34px 20px at 50% 0, transparent 97%, #000) 0 0 / 90px 100% repeat-x; }
.scene-sea .waves span:nth-child(2) { bottom: -4vh; background-color: #2aa3d8; opacity: .9; animation-duration: 13s; animation-direction: reverse; }
.scene-sea .waves span:nth-child(3) { bottom: -9vh; background-color: #1d8fc6; animation-duration: 7s; }
@keyframes wave { to { transform: translateX(-45%); } }
.boat { position: absolute; bottom: 13vh; left: -10%; font-size: clamp(36px, 7vmin, 64px); animation: sail 40s linear infinite, bob 2s ease-in-out infinite; }
@keyframes sail { to { left: 110%; } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.fish-jump { position: absolute; bottom: 4vh; left: 70%; font-size: 34px; animation: jump 5s ease-in-out infinite; opacity: 0; }
@keyframes jump { 0%, 60% { opacity: 0; transform: translate(0, 0) rotate(0); } 65% { opacity: 1; } 80% { transform: translate(-60px, -80px) rotate(-60deg); opacity: 1; } 95% { transform: translate(-120px, 0) rotate(-140deg); opacity: 0; } }
.birds { position: absolute; top: 14%; left: -10%; animation: sail 30s linear infinite; }
.birds i { display: inline-block; width: 22px; height: 10px; margin: 0 6px; border-top: 4px solid #2a2350; border-radius: 50% 50% 0 0; animation: wings .4s ease-in-out infinite alternate; }
.birds i:nth-child(2) { translate: 0 -10px; }

/* Encabezado en burbuja */
.title-bubble { position: relative; z-index: 2; margin: max(20px, 5vh) auto 0; width: fit-content; max-width: 92vw; text-align: center;
  background: #fff; border-radius: 30px; padding: 12px 30px; font-size: clamp(30px, 6vmin, 56px); box-shadow: 0 8px 0 #0000001a; animation: popin .5s cubic-bezier(.3, 1.6, .5, 1); }
.title-bubble small { display: block; font-size: .45em; color: #8a7a6a; }

/* ¿Quién juega? / Elige tu amigo */
.screen-who, .screen-pick { display: flex; flex-direction: column; align-items: center; }
.who { position: relative; z-index: 2; flex: 1; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 3vmin; padding: 3vmin 16px 16vh; }
.who-kid { width: clamp(140px, 22vmin, 220px); background: #fff; border-radius: 34px; padding: 14px 10px 12px; box-shadow: 0 8px 0 #0000001a; position: relative; overflow: hidden;
  animation: popin .6s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--i) * .1s); border: 5px solid transparent; }
.who-kid::before { content: ''; position: absolute; inset: 0 0 40% 0; background: var(--bg); border-radius: 0 0 50% 50% / 0 0 30% 30%; }
.who-pic { position: relative; width: 86%; margin: 0 auto; }
.who-kid b { position: relative; display: block; font-size: clamp(22px, 4vmin, 34px); color: var(--c); }
.who-kid.chosen { border-color: var(--c); transform: translateY(-10px) scale(1.06); }
.big-play.ok { position: absolute; bottom: 6vh; z-index: 3; }
.big-play.ok svg { margin: 0; }
@media (orientation: portrait) { .who-kid { width: 40vw; } }

/* Botón para cambiar de niño o de amigo en el inicio */
.switch-kid { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 16px; z-index: 5; display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 99px; padding: 4px 16px 4px 4px; box-shadow: 0 5px 0 #0000001a; }
.switch-kid span { width: 52px; height: 52px; border-radius: 50%; background: #fff4dc; overflow: hidden; padding-top: 4px; }
.switch-kid b { font-size: 22px; }

.panel-cta { background: linear-gradient(135deg, #ecfdf3, #f3efff) !important; }
.btn.primary { background: #2fe08a; color: #14102a; text-decoration: none; display: inline-block; }
.parents a.btn { text-decoration: none; color: inherit; }
.parents a.btn.primary { color: #14102a; }

/* Objetos con más vida */
.balloon svg, .apple svg, .bucket svg { filter: drop-shadow(0 8px 6px #0000002a); }
.station { position: relative; z-index: 1; }
.screen-map .islands, .stage, .album, .reward, .logo, .home-leo, .big-play { position: relative; z-index: 2; }
.screen-map .islands, .stage, .album, .reward { position: absolute; }
