/* Sunny English — diseño para tablet en horizontal, dedos pequeños y mucho color. */
:root {
  --bg: #FFF7E6;
  --bg2: #FFEFD1;
  --ink: #2E2A3B;
  --muted: #7A7391;
  --purple: #6C5CE7;
  --purple-d: #5143C9;
  --pink: #FF6F91;
  --yellow: #FFC93C;
  --teal: #00C2A8;
  --blue: #4FC3F7;
  --orange: #FF9F43;
  --green: #2ECC71;
  --red: #FF5A5F;
  --card: #FFFFFF;
  --shadow: 0 0.35rem 0 rgba(46, 42, 59, 0.12), 0 0.6rem 1.4rem rgba(46, 42, 59, 0.08);
  --radius: 1.4rem;
  --font: 'Fredoka', 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --read: 'Andika', 'Fredoka', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: clamp(13px, 2.25vh, 24px); }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  background-image: radial-gradient(circle at 10% 20%, #FFE9C7 0 6%, transparent 6.2%), radial-gradient(circle at 85% 80%, #FFE2EC 0 8%, transparent 8.2%), radial-gradient(circle at 70% 10%, #E5F6FF 0 5%, transparent 5.2%);
  color: var(--ink);
  font-family: var(--font);
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; border: 0; cursor: pointer; background: none; touch-action: manipulation; }
button:disabled { cursor: default; }
input, select { font: inherit; }

/* ---------- Estructura ---------- */
#app { display: grid; grid-template-columns: 21vw 1fr; height: 100dvh; transition: grid-template-columns .3s; }
#app.no-tutor { grid-template-columns: 0 1fr; }
#app.no-tutor #tutor-pane { opacity: 0; pointer-events: none; }
#tutor-pane { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 1rem .6rem 1.2rem; gap: .6rem; overflow: hidden; }
#main { display: grid; grid-template-rows: auto 1fr; min-width: 0; min-height: 0; }
#app.no-top #topbar { display: none; }
#topbar { display: flex; align-items: center; gap: .8rem; padding: .6rem 1rem .2rem; font-size: 1.15rem; }
#topbar .who { display: flex; align-items: center; gap: .4rem; font-weight: 600; }
#topbar .who .av { font-size: 1.6rem; }
#topbar .stars, #topbar .streak, #topbar .recess-timer { background: #fff; border-radius: 99px; padding: .25rem .8rem; box-shadow: var(--shadow); font-weight: 600; }
#topbar .recess-timer { background: var(--yellow); }
#topbar .spacer { flex: 1; }
#stage { position: relative; overflow: auto; padding: .6rem 1.2rem 1rem; min-height: 0; }

#rotate { display: none; }
@media (orientation: portrait) {
  #rotate { display: flex; position: fixed; inset: 0; z-index: 99; background: var(--purple); color: #fff; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: 1.6rem; }
  #rotate div { font-size: 5rem; animation: tilt 1.6s infinite ease-in-out; }
}
@keyframes tilt { 50% { transform: rotate(-90deg); } }

/* ---------- Sunny ---------- */
.sunny { width: 100%; max-width: 15rem; cursor: pointer; }
.sunny-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 .4rem .6rem rgba(0,0,0,.12)); }
.sunny .rays { transform-origin: 100px 100px; animation: spin 30s linear infinite; }
.sunny .mouth.open { display: none; }
.sunny.talking .mouth.open { display: block; animation: talk .28s infinite alternate; transform-origin: 100px 138px; }
.sunny.talking .mouth.smile { display: none; }
.sunny .eyes { animation: blink 4s infinite; transform-origin: 100px 106px; }
.sunny.jump { animation: jump .6s ease; }
.sunny.wiggle { animation: wiggle .5s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes talk { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes jump { 40% { transform: translateY(-1.4rem) scale(1.05); } 70% { transform: translateY(0) scale(.97); } }
@keyframes wiggle { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.bubble { position: relative; background: #fff; border-radius: 1.2rem; padding: .7rem .9rem; font-size: 1.1rem; font-family: var(--read); line-height: 1.25; box-shadow: var(--shadow); width: 100%; max-height: 40vh; overflow: hidden; text-align: center; }
.bubble::after { content: ''; position: absolute; bottom: -.8rem; left: 50%; border: .5rem solid transparent; border-top: .8rem solid #fff; transform: translateX(-50%); }
.bubble.hidden { visibility: hidden; }

/* ---------- Botones ---------- */
.big-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; min-height: 7rem; transition: transform .12s; font-weight: 600; font-size: 1.15rem; }
.big-btn:active, .opt-card:active, .skill-tile:active, .play-card:active, .pill-btn:active, .tile:active, .key:active { transform: translateY(.2rem) scale(.98); box-shadow: 0 .1rem 0 rgba(0,0,0,.12); }
.big-btn .ico { font-size: 2.6rem; line-height: 1; }
.big-btn.primary { background: var(--purple); color: #fff; }
.big-btn.recess { background: #FFF1B8; }
.big-btn.locked { background: #EEE; color: var(--muted); }
.big-btn.glow { animation: glow 1.6s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 .4rem rgba(255, 201, 60, .7), var(--shadow); } }
.icon-btn { width: 3.2rem; height: 3.2rem; border-radius: 50%; background: #fff; box-shadow: var(--shadow); font-size: 1.6rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-btn.small { width: 2.6rem; height: 2.6rem; font-size: 1.2rem; }
.icon-btn.replay { width: 4.4rem; height: 4.4rem; font-size: 2.2rem; background: var(--blue); }
.pill-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: #fff; border-radius: 99px; padding: .7rem 1.3rem; font-size: 1.1rem; font-weight: 600; box-shadow: var(--shadow); }
.pill-btn.ok { background: var(--teal); color: #fff; }
.pill-btn.big { font-size: 1.3rem; padding: .9rem 1.8rem; }
.pill-btn.small { padding: .35rem .8rem; font-size: .9rem; }
.pill-btn input[type=file] { display: none; }
.row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; justify-content: center; }

/* ---------- Inicio y perfiles ---------- */
.start-btn { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; width: 100%; }
.sun.big { font-size: 8rem; animation: spin 20s linear infinite; }
.start-title { font-size: 3.4rem; font-weight: 700; color: var(--purple); }
.start-tap { font-size: 1.6rem; background: var(--yellow); padding: .6rem 1.6rem; border-radius: 99px; animation: glow 1.6s infinite; }
.profiles { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; padding-top: 3vh; }
.brand { font-size: 2.6rem; font-weight: 700; color: var(--purple); }
.profile-row { display: flex; gap: 1.4rem; flex-wrap: wrap; justify-content: center; }
.profile-card { width: 11rem; height: 13rem; background: #fff; border-radius: 1.8rem; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; }
.profile-card .av { font-size: 5rem; }
.profile-card .nm { font-size: 1.5rem; font-weight: 700; }
.profile-card .st { color: var(--muted); }
.profile-card.add { background: #F1EEFF; color: var(--purple); }
.parent-link { margin-top: 1rem; opacity: .8; }

/* ---------- Menú principal ---------- */
.home { display: grid; grid-template-rows: auto auto auto; gap: 1rem; height: 100%; align-content: center; }
.play-card { display: flex; align-items: center; justify-content: center; gap: 1rem; background: linear-gradient(135deg, var(--purple), #8E7CFF); color: #fff; border-radius: 2rem; padding: 1.1rem; font-size: 2.4rem; font-weight: 700; box-shadow: 0 .45rem 0 var(--purple-d), var(--shadow); }
.play-ico { display: inline-flex; width: 4rem; height: 4rem; border-radius: 50%; background: var(--yellow); color: var(--ink); align-items: center; justify-content: center; font-size: 2rem; animation: glow 1.8s infinite; }
.skill-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.skill-tile { background: var(--c); color: #fff; border-radius: var(--radius); padding: .9rem .5rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; box-shadow: 0 .4rem 0 rgba(0,0,0,.15); text-shadow: 0 .1rem 0 rgba(0,0,0,.15); }
.skill-tile .ico { font-size: 3rem; }
.skill-tile .lbl { font-size: 1.5rem; font-weight: 700; }
.skill-tile .lvl { font-size: .9rem; letter-spacing: .05em; }
.more-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: .8rem; }
.more-row .big-btn { min-height: 6.4rem; font-size: 1rem; }
.menu-wrap { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; padding-top: 4vh; }
.menu-title { font-size: 2.2rem; font-weight: 700; color: var(--purple); }
.menu-grid { display: grid; grid-template-columns: repeat(3, 13rem); gap: 1.4rem; }
.menu-grid.four { grid-template-columns: repeat(4, 12rem); }
.menu-grid .big-btn { min-height: 12rem; font-size: 1.5rem; }
.menu-grid .big-btn .ico { font-size: 4.6rem; }

/* ---------- Imágenes de ítems ---------- */
.vis { display: flex; align-items: center; justify-content: center; line-height: 1; }
.vis-emoji.vis-sm { font-size: 3.2rem; } .vis-emoji.vis-md { font-size: 5rem; } .vis-emoji.vis-lg { font-size: 7.5rem; }
.vis-color { border-radius: 50%; border: .3rem solid rgba(0,0,0,.08); }
.vis-color.vis-sm { width: 3.6rem; height: 3.6rem; } .vis-color.vis-md { width: 5.6rem; height: 5.6rem; } .vis-color.vis-lg { width: 8rem; height: 8rem; }
.vis-shape svg { fill: var(--purple); width: 100%; height: 100%; }
.vis-shape.vis-sm { width: 3.6rem; height: 3.6rem; } .vis-shape.vis-md { width: 5.6rem; height: 5.6rem; } .vis-shape.vis-lg { width: 8rem; height: 8rem; }
.vis-number { flex-direction: column; gap: .3rem; }
.vis-number b { font-size: 3.4rem; color: var(--orange); }
.vis-number.vis-sm b { font-size: 2.4rem; } .vis-number.vis-lg b { font-size: 5rem; }
.dots { display: flex; flex-wrap: wrap; gap: .2rem; max-width: 6rem; justify-content: center; }
.dots span { width: .7rem; height: .7rem; border-radius: 50%; background: var(--pink); }

/* ---------- Lecciones ---------- */
.lesson { display: grid; grid-template-rows: auto 1fr; height: 100%; gap: .4rem; }
.lesson-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lesson-title { font-size: 1.4rem; font-weight: 700; color: var(--purple); }
.lesson-body { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem; min-height: 0; }
.progress-dots { display: flex; gap: .45rem; }
.progress-dots i { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #E6E0D2; transition: .2s; }
.progress-dots i.current { background: var(--yellow); transform: scale(1.3); }
.progress-dots i.good { background: var(--green); } .progress-dots i.ok { background: var(--orange); } .progress-dots i.miss { background: #F3B0B6; } .progress-dots i.done { background: var(--blue); }
.q-display { display: flex; justify-content: center; }
.listen-big { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.listen-big .icon-btn.replay { width: 6rem; height: 6rem; font-size: 3rem; animation: glow 2s infinite; }
.hint-txt { color: var(--muted); font-size: 1.1rem; }
.read-word { font-family: var(--read); font-size: 4rem; font-weight: 700; background: #fff; border-radius: 1.2rem; padding: .3rem 1.6rem; box-shadow: var(--shadow); text-align: center; }
.read-word.sentence { font-size: 2.2rem; max-width: 52rem; line-height: 1.3; }
.pic-prompt { display: flex; align-items: center; gap: 1.2rem; }
.opt-grid { display: grid; gap: 1.1rem; justify-content: center; grid-template-columns: repeat(var(--cols, 3), minmax(9rem, 12rem)); }
.opt-grid.n2 { --cols: 2; } .opt-grid.n3 { --cols: 3; } .opt-grid.n4 { --cols: 4; } .opt-grid.n5 { --cols: 5; } .opt-grid.n6 { --cols: 6; }
.opt-grid.talk-grid { grid-template-columns: repeat(var(--cols, 3), minmax(7rem, 9.5rem)); }
.opt-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); min-height: 10rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: .8rem; transition: transform .15s, background .2s; border: .25rem solid transparent; }
.opt-card.small { min-height: 8rem; }
.opt-card.right { background: #DFF8EA; border-color: var(--green); transform: scale(1.06); }
.opt-card.wrong { background: #FFE3E5; opacity: .55; }
.opt-card.reveal { animation: glow 1s infinite; }
.opt-card.hint, .tile.hint, .chip.hint, .tray-item.hint { animation: glow .9s infinite; }
.opt-label { font-family: var(--read); font-size: 1.2rem; font-weight: 700; text-align: center; }
.letter-card { min-height: 9rem; }
.big-letter { font-family: var(--read); font-size: 5rem; font-weight: 700; color: var(--purple); line-height: 1; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-.5rem); } 40%, 80% { transform: translateX(.5rem); } }

/* hablar */
.speak-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.mic-btn { width: 7.5rem; height: 7.5rem; border-radius: 50%; background: var(--pink); font-size: 3.6rem; box-shadow: 0 .4rem 0 #D94E73, var(--shadow); }
.mic-btn.small { width: 4.6rem; height: 4.6rem; font-size: 2.2rem; }
.mic-btn.ready { animation: glow 1.4s infinite; }
.mic-btn.listening { background: var(--red); animation: pulse .9s infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
.heard { font-family: var(--read); font-size: 1.3rem; color: var(--muted); min-height: 1.6rem; }

/* escribir */
.slots { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.slot { width: 3.6rem; height: 4.2rem; border-bottom: .35rem solid var(--purple); font-family: var(--read); font-size: 3rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.slot.fixed { border-color: transparent; width: 1.4rem; }
.slot.filled { color: var(--teal); }
.slot.blank { color: var(--pink); background: #FFF0F4; border-radius: .6rem .6rem 0 0; }
.tiles { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; max-width: 52rem; }
.tile { width: 4.6rem; height: 4.6rem; background: var(--yellow); border-radius: 1rem; font-family: var(--read); font-size: 2.6rem; font-weight: 700; box-shadow: 0 .3rem 0 #E0A800; }
.tile.used { visibility: hidden; }
.missing { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.typed { font-family: var(--read); font-size: 3rem; font-weight: 700; min-width: 18rem; text-align: center; background: #fff; border-radius: 1rem; padding: .2rem 1rem; box-shadow: var(--shadow); letter-spacing: .1em; }
.typed.right { color: var(--green); } .typed.wrong { color: var(--red); } .typed.reveal { color: var(--purple); }
.keyboard { display: flex; flex-direction: column; gap: .45rem; align-items: center; }
.kb-row { display: flex; gap: .45rem; }
.key { width: 3.8rem; height: 3.8rem; border-radius: .8rem; background: #fff; box-shadow: var(--shadow); font-family: var(--read); font-size: 1.8rem; font-weight: 700; }
.key.wide { width: 5.2rem; } .key.go { width: 14rem; background: var(--teal); color: #fff; font-size: 1.4rem; }
.sentence-line { min-height: 4.2rem; min-width: 30rem; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; border-bottom: .3rem dashed #D8D0F5; padding: .3rem; }
.chips { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; max-width: 54rem; }
.chip { background: var(--blue); color: #fff; font-family: var(--read); font-size: 1.9rem; font-weight: 700; padding: .45rem 1rem; border-radius: 1rem; box-shadow: 0 .3rem 0 #2B9FD4; }
.chip.used { visibility: hidden; } .chip.placed { background: var(--teal); box-shadow: none; }
.trace-wrap { display: flex; gap: 2rem; align-items: center; }
.trace-box { position: relative; background: #fff; border-radius: 1.6rem; box-shadow: var(--shadow); }
.trace-box canvas { position: absolute; inset: 0; touch-action: none; }
.trace-side { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.trace-word { font-family: var(--read); font-size: 2rem; font-weight: 700; }

/* resumen */
.summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; height: 100%; }
.summary-stars { font-size: 3.4rem; display: flex; gap: .3rem; }
.summary-stars span { animation: pop .5s backwards; }
.summary-stars span.off { filter: grayscale(1); opacity: .3; }
.summary-stars span:nth-child(2) { animation-delay: .1s; } .summary-stars span:nth-child(3) { animation-delay: .2s; } .summary-stars span:nth-child(4) { animation-delay: .3s; } .summary-stars span:nth-child(5) { animation-delay: .4s; } .summary-stars span:nth-child(6) { animation-delay: .5s; }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.3); } }
.summary-title { font-size: 3rem; font-weight: 700; color: var(--purple); }
.medal { font-size: 7rem; animation: pop .6s; }
.skill-badges { display: flex; gap: 1rem; }
.skill-badge { background: #fff; border-radius: 1rem; padding: .6rem 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; font-size: 2rem; }
.skill-badge b { font-size: 1rem; }
.like-ask { position: absolute; left: 0; right: 0; bottom: 1rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.like-q { font-size: 1.6rem; font-weight: 700; }
.like-row { display: flex; gap: 1.6rem; }
.like-btn { font-size: 4.4rem; background: #fff; border-radius: 50%; width: 7rem; height: 7rem; box-shadow: var(--shadow); }

/* cuentos */
.story { display: grid; grid-template-rows: auto 1fr auto; height: 100%; gap: .6rem; }
.story-head { display: flex; justify-content: space-between; align-items: center; }
.story-title { font-size: 1.6rem; font-weight: 700; color: var(--purple); }
.story-counter { color: var(--muted); font-size: 1.2rem; }
.story-main { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; min-height: 0; }
.nav-arrow { width: 4.6rem; height: 4.6rem; font-size: 2.2rem; }
.nav-arrow.next { background: var(--yellow); animation: glow 2s infinite; }
.story-page { background: #fff; border-radius: 2rem; box-shadow: var(--shadow); height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: 1.2rem 2rem; }
.story-pic { font-size: 7rem; line-height: 1.1; text-align: center; }
.story-text { font-family: var(--read); font-size: 2.1rem; line-height: 1.45; text-align: center; }
.story-text .word { border-radius: .4rem; padding: 0 .05em; }
.story-text .word:active { background: #FFF1B8; }
.story-text.reading { color: var(--purple); }
.story-tools { display: flex; justify-content: center; }

/* conversación */
.talk { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; padding-top: 2vh; }
.talk-mic { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: 1.1rem; }

/* juegos */
.game { display: flex; flex-direction: column; height: 100%; gap: .6rem; }
.game-head { font-size: 1.6rem; font-weight: 700; color: var(--purple); display: flex; align-items: center; gap: 1rem; }
.game-score { background: #fff; border-radius: 99px; padding: .2rem .9rem; box-shadow: var(--shadow); font-size: 1.2rem; }
.memory-grid { flex: 1; display: grid; gap: .9rem; grid-template-columns: repeat(4, 1fr); align-content: center; max-width: 54rem; margin: 0 auto; width: 100%; }
.memory-grid.c12 { grid-template-columns: repeat(4, 1fr); }
.mem-card { perspective: 60rem; height: 9rem; }
.memory-grid.c8 .mem-card { height: 12rem; }
.mem-inner { position: relative; width: 100%; height: 100%; transition: transform .4s; transform-style: preserve-3d; }
.mem-card.open .mem-inner { transform: rotateY(180deg); }
.mem-back, .mem-front { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 1.2rem; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.mem-back { background: linear-gradient(135deg, var(--purple), var(--pink)); font-size: 3rem; color: #fff; }
.mem-front { background: #fff; transform: rotateY(180deg); }
.mem-card.matched .mem-front { background: #DFF8EA; }
.mem-word { font-family: var(--read); font-size: 1.9rem; font-weight: 700; }
.bubble-field { position: relative; flex: 1; overflow: hidden; border-radius: 2rem; background: linear-gradient(#BDEBFF, #E9F9FF); }
.soap { position: absolute; bottom: -9rem; width: 8.5rem; height: 8.5rem; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(255,255,255,.35) 40%, rgba(108,92,231,.25)); border: .2rem solid rgba(255,255,255,.9); display: flex; align-items: center; justify-content: center; animation: rise linear forwards; box-shadow: inset 0 0 1.2rem rgba(255,255,255,.8); }
.soap .vis-emoji.vis-sm { font-size: 3.6rem; }
.bubble-word { font-family: var(--read); font-size: 1.5rem; font-weight: 700; }
.soap.popped { animation: popit .25s forwards; }
@keyframes rise { from { transform: translateY(0) translateX(0); } 50% { transform: translateY(-45vh) translateX(1.5rem); } to { transform: translateY(-95vh) translateX(-1rem); } }
@keyframes popit { to { transform: scale(1.6); opacity: 0; } }
.monster-game .monster-zone { flex: 1; display: flex; align-items: center; justify-content: center; gap: 2rem; }
.monster { position: relative; width: 16rem; height: 16rem; border-radius: 50% 50% 45% 45%; background: radial-gradient(circle at 35% 30%, #8CF0A8, #2ECC71 60%, #1E9E55); box-shadow: var(--shadow); transition: transform .3s; }
.m-eyes { position: absolute; top: 18%; left: 0; right: 0; display: flex; justify-content: center; gap: 1.6rem; }
.m-eyes i { width: 3.6rem; height: 3.6rem; background: #fff; border-radius: 50%; position: relative; }
.m-eyes i::after { content: ''; position: absolute; width: 1.5rem; height: 1.5rem; background: var(--ink); border-radius: 50%; top: 1.1rem; left: 1.1rem; }
.m-mouth { position: absolute; left: 50%; top: 56%; width: 7rem; height: 1.6rem; background: #7A1F3D; border-radius: 0 0 4rem 4rem; transform: translateX(-50%); transition: height .2s; }
.monster.open .m-mouth { height: 4.6rem; }
.monster.chew { animation: chew .25s 3; }
.monster.no { animation: wiggle .5s; }
@keyframes chew { 50% { transform: scaleY(.9) scaleX(1.05); } }
.m-belly { position: absolute; bottom: 6%; left: 50%; width: 6rem; height: 3rem; margin-left: -3rem; background: rgba(255,255,255,.3); border-radius: 50%; transition: transform .4s; }
.m-say { background: #fff; border-radius: 1.4rem; padding: 1rem 1.4rem; font-family: var(--read); font-size: 1.8rem; font-weight: 700; max-width: 22rem; box-shadow: var(--shadow); }
.tray { display: flex; gap: 1.2rem; justify-content: center; padding-bottom: .6rem; }
.tray-item { width: 9rem; height: 9rem; background: #fff; border-radius: 1.4rem; box-shadow: var(--shadow); transition: transform .45s ease-in; }
.tray-item.eaten { opacity: .2; }

/* ajedrez */
.chess { display: flex; gap: 1.4rem; height: 100%; align-items: center; justify-content: center; }
.chess-board { display: grid; grid-template-columns: repeat(8, 1fr); width: min(calc(100dvh - 7rem), 62vw); aspect-ratio: 1; border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow); border: .4rem solid #8B5E3C; }
.sq { position: relative; display: flex; align-items: center; justify-content: center; }
.sq.light { background: #FCE9C8; } .sq.dark { background: #C98B5A; }
.sq.sel { background: #FFE066 !important; }
.sq.last { box-shadow: inset 0 0 0 .25rem rgba(108,92,231,.6); }
.sq.target::after { content: ''; position: absolute; width: 32%; height: 32%; border-radius: 50%; background: rgba(46, 204, 113, .8); }
.sq.capture::after { width: 86%; height: 86%; background: transparent; border: .3rem solid rgba(255, 90, 95, .9); }
.piece { font-size: min(5.4vh, 3.7vw); line-height: 1; position: relative; z-index: 1; }
.piece.white { color: #fff; text-shadow: 0 0 .12rem #000, 0 0 .12rem #000, 0 .1rem .2rem rgba(0,0,0,.5); }
.piece.black { color: #222; }
.coord { position: absolute; font-size: .7rem; font-weight: 700; opacity: .65; }
.coord.rank { top: .1rem; left: .2rem; } .coord.file { bottom: .05rem; right: .25rem; }
.chess-side { display: flex; flex-direction: column; gap: 1rem; width: 16rem; align-items: center; }
.chess-info { background: #fff; border-radius: 1.2rem; padding: 1rem; box-shadow: var(--shadow); font-family: var(--read); font-size: 1.3rem; min-height: 7rem; text-align: center; }

/* música */
.music { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto 1fr; gap: 1rem; height: 100%; }
.music .game-head { grid-column: 1 / -1; }
.xylo { display: flex; align-items: center; gap: .6rem; padding: 1rem; background: #8B5E3C; border-radius: 1.6rem; box-shadow: var(--shadow); }
.xylo-key { flex: 1; border-radius: 1rem; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 1rem; color: #fff; font-weight: 700; font-size: 1.1rem; text-shadow: 0 .1rem .2rem rgba(0,0,0,.4); box-shadow: 0 .35rem 0 rgba(0,0,0,.25); transition: transform .08s; }
.xylo-key.hit { transform: translateY(.3rem) scale(.97); filter: brightness(1.25); }
.music-side { display: flex; flex-direction: column; gap: .8rem; min-height: 0; overflow: auto; }
.songs { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill-btn.song { font-size: .95rem; padding: .5rem .9rem; }
.lyrics { background: #fff; border-radius: 1.2rem; padding: .8rem 1rem; box-shadow: var(--shadow); font-family: var(--read); }
.lyrics:empty { display: none; }
.lyrics-title { font-weight: 700; color: var(--purple); margin-bottom: .3rem; }
.lyric { font-size: 1.25rem; padding: .15rem .4rem; border-radius: .5rem; transition: .2s; }
.lyric.on { background: var(--yellow); font-weight: 700; transform: scale(1.03); }

/* dibujo */
.draw { display: grid; grid-template-columns: 1fr 11rem; gap: 1rem; height: 100%; }
.draw-main { display: grid; grid-template-rows: auto 1fr; gap: .5rem; min-height: 0; }
.draw-prompt { font-family: var(--read); font-size: 1.7rem; font-weight: 700; text-align: center; }
.draw-canvas { width: 100%; height: 100%; background: #fff; border-radius: 1.4rem; box-shadow: var(--shadow); touch-action: none; }
.draw-side { display: flex; flex-direction: column; gap: .6rem; align-items: stretch; overflow: auto; }
.palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.swatch { aspect-ratio: 1; border-radius: 50%; border: .25rem solid #fff; box-shadow: var(--shadow); }
.swatch.on { outline: .25rem solid var(--ink); }
.sizes { display: flex; justify-content: space-around; }
.size-btn { width: 3rem; height: 3rem; border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; }
.size-btn i { background: var(--ink); border-radius: 50%; display: block; }

/* simon */
.simon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; height: 100%; }
.simon-big { font-size: 11rem; line-height: 1; }
.simon-big.pulse { animation: pop .5s; }
.simon-text { font-family: var(--read); font-size: 2.6rem; font-weight: 700; text-align: center; }

/* álbum */
.album { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.sticker-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: .8rem; }
.sticker { width: 5.4rem; height: 5.4rem; border-radius: 1rem; background: #fff; box-shadow: var(--shadow); font-size: 3.2rem; }
.sticker.locked { background: #F0ECE3; font-size: 2rem; opacity: .6; }

/* celebración y efectos */
.celebrate { position: fixed; inset: 0; z-index: 50; background: rgba(46, 42, 59, .55); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; animation: fade .25s; }
.cel-icon { font-size: 10rem; animation: pop .6s; }
.cel-text { background: #fff; border-radius: 1.6rem; padding: 1rem 2rem; font-size: 2rem; font-weight: 700; max-width: 80vw; text-align: center; }
@keyframes fade { from { opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -2rem; width: .8rem; height: 1.2rem; border-radius: .2rem; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.burst { position: fixed; z-index: 61; font-size: 1.8rem; pointer-events: none; animation: burst .9s ease-out forwards; }
@keyframes burst { from { transform: translate(-50%, -50%) scale(.4); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2); opacity: 0; } }

/* ---------- Zona de padres y formularios ---------- */
.parent-gate { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding-top: 2vh; }
.parent-gate h2, .form h2, .parent h2 { margin: 0; color: var(--purple); }
.note { max-width: 44rem; text-align: center; color: var(--muted); font-size: 1rem; line-height: 1.4; }
.pin-pad { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.pin-msg { font-size: 1.2rem; }
.pin-dots { display: flex; gap: .8rem; }
.pin-dots i { width: 1.2rem; height: 1.2rem; border-radius: 50%; border: .2rem solid var(--purple); }
.pin-dots i.on { background: var(--purple); }
.pin-keys { display: grid; grid-template-columns: repeat(3, 4.6rem); gap: .7rem; }
.pin-key { height: 4.2rem; border-radius: 1rem; background: #fff; box-shadow: var(--shadow); font-size: 1.8rem; font-weight: 700; }
.form { max-width: 56rem; margin: 0 auto; display: flex; flex-direction: column; gap: .8rem; padding-bottom: 2rem; }
.form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; }
.text-in { font-size: 1.3rem; padding: .6rem .9rem; border-radius: .9rem; border: .15rem solid #DDD5F5; background: #fff; user-select: text; -webkit-user-select: text; }
.age-row { display: flex; align-items: center; gap: 1rem; font-weight: 600; }
.age-row b { font-size: 2rem; min-width: 3.4rem; text-align: center; }
.round-btn { width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--purple); color: #fff; font-size: 1.8rem; font-weight: 700; }
.lbl { font-weight: 600; }
.avatar-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.avatar-opt { width: 3.8rem; height: 3.8rem; font-size: 2.2rem; border-radius: 1rem; background: #fff; box-shadow: var(--shadow); }
.avatar-opt.on, .topic-opt.on { outline: .25rem solid var(--purple); background: #F1EEFF; }
.topic-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.topic-opt { background: #fff; border-radius: 1rem; box-shadow: var(--shadow); padding: .5rem; display: flex; flex-direction: column; align-items: center; font-size: .95rem; }
.topic-opt span { font-size: 2rem; }
.err { color: var(--red); font-weight: 600; min-height: 1.2rem; }
.parent { max-width: 72rem; margin: 0 auto; display: flex; flex-direction: column; gap: .7rem; padding-bottom: 2rem; font-family: system-ui, sans-serif; user-select: text; -webkit-user-select: text; }
.p-head { display: flex; align-items: center; justify-content: space-between; }
.p-tabs, .p-who { display: flex; flex-wrap: wrap; gap: .4rem; }
.p-tab { padding: .55rem 1rem; border-radius: .8rem; background: #fff; box-shadow: var(--shadow); font-weight: 600; }
.p-tab.on { background: var(--purple); color: #fff; }
.p-chip { padding: .35rem .8rem; border-radius: 99px; background: #fff; border: .12rem solid #DDD5F5; font-size: .95rem; }
.p-chip.on { background: #F1EEFF; border-color: var(--purple); font-weight: 700; }
.p-body h3 { margin: 1.2rem 0 .4rem; color: var(--purple); }
.p-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.p-card { background: #fff; border-radius: 1rem; padding: .7rem 1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .1rem; }
.p-card b { font-size: 1.5rem; }
.muted { color: var(--muted); font-size: .9rem; }
.p-skills { display: flex; flex-direction: column; gap: .4rem; }
.p-skill { display: grid; grid-template-columns: 11rem 1fr 15rem 12rem; align-items: center; gap: .8rem; background: #fff; padding: .45rem .8rem; border-radius: .8rem; }
.bar { height: .8rem; background: #EEE8DA; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--purple)); border-radius: 99px; }
.bar.neg i { background: #ccc; }
.p-minutes { display: flex; gap: .8rem; align-items: flex-end; height: 8rem; background: #fff; padding: .6rem 1rem; border-radius: 1rem; }
.p-day { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; font-size: .85rem; }
.p-col { flex: 1; width: 1.6rem; display: flex; align-items: flex-end; }
.p-col i { display: block; width: 100%; background: var(--orange); border-radius: .4rem .4rem 0 0; min-height: 2px; }
.p-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 1rem; overflow: hidden; font-size: .92rem; }
.p-table th, .p-table td { padding: .45rem .7rem; text-align: left; border-bottom: 1px solid #F0EBDD; vertical-align: middle; }
.p-table th { background: #F7F3FF; }
.p-words { display: flex; flex-wrap: wrap; gap: .4rem; }
.p-word { background: #fff; border-radius: 99px; padding: .25rem .7rem; font-size: .9rem; }
.p-set { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: .5rem 0; font-weight: 600; flex-direction: row; }
.p-set input[type=range] { width: 18rem; }
.fatal { padding: 3rem; font-size: 1.4rem; text-align: center; }

/* sin conexión y descargas */
#topbar .offline-badge { background: #2E2A3B; color: #fff; border-radius: 99px; padding: .25rem .8rem; font-weight: 600; font-size: .95rem; }
.dl-list { display: flex; flex-direction: column; gap: .45rem; }
.dl-row { display: grid; grid-template-columns: 3rem 1fr 7rem 12rem 13rem; align-items: center; gap: .8rem; background: #fff; border-radius: .9rem; padding: .55rem .9rem; }
.dl-emoji { font-size: 2rem; text-align: center; }
.dl-title { font-weight: 700; }
.dl-state { font-weight: 600; font-size: .92rem; }
.dl-state.ok { color: #1E9E55; } .dl-state.upd { color: #E08600; } .dl-state.net { color: var(--muted); }
.dl-actions { display: flex; gap: .4rem; justify-content: flex-end; }
.dl-net { display: inline-block; padding: .3rem .8rem; border-radius: 99px; font-weight: 700; }
.dl-net.on { background: #DFF8EA; color: #1E9E55; } .dl-net.off { background: #2E2A3B; color: #fff; }
.pill-btn:disabled { opacity: .4; filter: grayscale(1); box-shadow: none; }
