@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url('../fonts/baloo2-800.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url('../fonts/nunito-600.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700 800; font-display: swap; src: url('../fonts/nunito-800.woff2') format('woff2'); }
:root {
  --lavender: #FFF3E3;
  --violet: #5B34B8;
  --violet-dark: #3E1F8C;
  --gold: #FFD45C;
  --gold-dark: #E0A800;
  --pink: #C4357D;
  --mint: #1F8A6A;
  --mint-soft: #E9F8F1;
  --ink: #2B2140;
  --muted: #5E5470;
  --soft: #E7DBFF;
  --white: #FFFFFF;
  --amber: #FFF2CC;
  --amber-ink: #3A2400;
  --cream: #FFF3E3;
  --coral: #FF6F61;
  --line: #3B2B4F;
  --sky: #DFF1FF;
  --grass: #BFE6A8;
  --sand: #EFE2CF;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--lavender);
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, .btn.big, .ex-word, .gap-word, .typed, .slot, .tile, .choice.letter {
  font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif; font-weight: 800;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; min-height: 48px; border: 0; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 4px solid var(--gold); outline-offset: 2px; }

.screen { max-width: 960px; margin: 0 auto; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 18px; }
.screen.center { min-height: 100vh; justify-content: center; align-items: center; text-align: center; }
.lead { color: var(--muted); font-size: 20px; }

/* Botones */
.btn { border-radius: 18px; padding: 10px 20px; background: var(--soft); color: var(--violet-dark); font-weight: 800; box-shadow: 0 4px 0 #CDBBF2; }
.btn.primary { background: var(--violet); color: var(--white); box-shadow: 0 5px 0 var(--violet-dark); }
.btn.gold { background: var(--gold); color: var(--amber-ink); box-shadow: 0 4px 0 var(--gold-dark); }
.btn.soft { background: var(--white); border: 2px solid var(--soft); box-shadow: 0 3px 0 var(--soft); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn.big { min-height: 60px; font-size: 22px; font-weight: 700; width: 100%; max-width: 420px; }
.btn:disabled { background: #D6C9F0; color: var(--muted); box-shadow: none; }
.btn:active:not(:disabled) { transform: translateY(2px); }
.round { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0; }
.round.speak { background: var(--violet); color: var(--white); box-shadow: 0 6px 0 var(--violet-dark); }
.round.slow { background: var(--mint-soft); color: var(--mint); border: 3px solid var(--mint); }
.count { display: inline-block; min-width: 24px; padding: 0 7px; border-radius: 999px; background: var(--white); color: var(--amber-ink); text-align: center; }

/* Bienvenida */
.welcome .logo { font-size: 84px; }
.welcome h1 { font-size: 44px; color: var(--violet); }

/* Mapa */
.map-head { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.hello { font-size: 30px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { background: var(--soft); color: var(--violet-dark); border-radius: 999px; padding: 4px 14px; font-weight: 800; font-size: 16px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.world { background: var(--white); border: 2px solid var(--soft); border-radius: 28px; padding: 18px; display: flex; gap: 14px; align-items: center; }
.world.open { flex-direction: column; align-items: stretch; box-shadow: 0 5px 0 var(--soft); }
.world.locked { opacity: .6; }
.world.complete { background: var(--mint-soft); border-color: #BDE8D8; }
.world h2 { font-size: 24px; }
.world p { color: var(--muted); font-size: 16px; }
.world-title { display: flex; gap: 14px; align-items: center; }
.world-creature { font-size: 44px; }
.nodes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.node { position: relative; background: var(--lavender); border: 3px solid var(--soft); border-radius: 22px; padding: 14px 8px 12px; display: flex; flex-direction: column; gap: 4px; align-items: center; min-height: 120px; font-weight: 800; }
.node-emoji { font-size: 40px; }
.node-stars { color: #C98F00; letter-spacing: 2px; }
.node.done { background: var(--mint-soft); border-color: #BDE8D8; }
.node.current { background: #FFF6D8; border-color: var(--gold); box-shadow: 0 5px 0 var(--gold-dark); }
.node.locked { opacity: .5; }
.badge { position: absolute; top: -10px; right: -6px; background: var(--gold); color: var(--amber-ink); border-radius: 999px; padding: 2px 10px; font-size: 13px; }

/* Ejercicios */
.ex { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.ex-prompt { font-size: 22px; color: var(--muted); }
.ex-picture { font-size: 92px; line-height: 1; }
.ex-word { font-size: 44px; }
.speakers { display: flex; gap: 28px; justify-content: center; }
.speaker { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.speaker-caption { font-size: 14px; color: var(--muted); }
.answer-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 64px; align-items: center; }
.slot { min-width: 48px; height: 58px; padding: 0 10px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 34px; }
.slot.filled { background: var(--white); border: 3px solid var(--violet); }
.slot.empty { color: #B9A5E8; }
.tiles, .choices { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.tile, .choice { min-width: 60px; min-height: 60px; padding: 8px 16px; border-radius: 18px; background: var(--white); border: 3px solid #B9A5E8; box-shadow: 0 4px 0 #CDBBF2; font-size: 30px; font-weight: 600; }
.tile:disabled { opacity: .35; box-shadow: none; }
.choice { font-size: 28px; min-width: 120px; }
.choice.letter { min-width: 72px; font-size: 38px; }
.picture-choice { font-size: 64px; min-width: 120px; min-height: 120px; }
.gap-word { font-size: 52px; letter-spacing: .08em; }
.ex-actions { display: flex; gap: 12px; align-items: center; }
.typed { height: 76px; width: 100%; max-width: 420px; border: 4px solid var(--violet); border-radius: 22px; padding: 0 22px; font-size: 38px; letter-spacing: .04em; background: var(--white); color: var(--ink); text-align: center; }
.typed-label { font-weight: 800; color: var(--muted); }

/* Lección */
.topbar { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--soft); color: var(--violet); font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; padding: 0; }
.progress { flex: 1; height: 14px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--mint); border-radius: 999px; transition: width .3s; }
.hearts { font-size: 20px; letter-spacing: 1px; flex: none; }
.notice { background: var(--amber); color: var(--amber-ink); border-radius: 18px; padding: 12px 16px; }
.stage { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.exercise-box { display: flex; flex-direction: column; }
.big-emoji { font-size: 84px; line-height: 1; }
.intro h1 { font-size: 40px; }
.trick { background: var(--soft); border-radius: 18px; padding: 12px 18px; color: var(--violet-dark); }
.sheet { background: var(--amber); color: var(--amber-ink); border: 2px solid var(--gold); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.sheet-title { font-size: 22px; font-weight: 800; }
.sheet-title b { font-family: 'Fredoka', sans-serif; font-size: 34px; }
.sheet-hint { background: var(--white); border-radius: 14px; padding: 8px 14px; }
.sheet-ask { color: var(--muted); }

/* Dictado y resultado */
.count-label { font-weight: 800; color: var(--muted); flex: none; }
.mode-chip { align-self: center; background: var(--soft); color: var(--violet-dark); border-radius: 999px; padding: 6px 16px; font-size: 15px; font-weight: 800; }
.selector h1, .result h1, .adult h1 { font-size: 34px; }
.mode-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; width: 100%; }
.mode-card { background: var(--white); border: 3px solid var(--soft); border-radius: 26px; padding: 22px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 5px 0 var(--soft); }
.mode-emoji { font-size: 56px; }
.mode-title { font-family: 'Fredoka', sans-serif; font-size: 24px; font-weight: 700; }
.mode-note { color: var(--muted); font-size: 15px; }
.hint-line { color: var(--muted); font-size: 15px; }
.spacer { flex: 1; min-height: 12px; }
.adult-list { text-align: left; display: flex; flex-direction: column; gap: 12px; padding-left: 28px; width: 100%; }
.adult-sentence { display: block; font-size: 22px; }
.adult-word { color: var(--violet); font-size: 20px; }
.result .stars { font-size: 56px; color: #C98F00; letter-spacing: 6px; }
.corrections { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 480px; text-align: left; }
.corrections li { background: var(--white); border-radius: 18px; padding: 12px 16px; font-size: 22px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.corrections li.ok { border: 2px solid #BDE8D8; }
.corrections li.ok .mark-sign { color: var(--mint); }
.corrections li.almost { background: var(--amber); border: 2px solid var(--gold); color: var(--amber-ink); }
.fix { font-family: 'Fredoka', sans-serif; font-size: 28px; }
.fix mark { background: var(--gold); border-radius: 6px; padding: 0 4px; color: var(--ink); }
.you-wrote { font-size: 15px; color: var(--muted); }
.saved, .rest { background: var(--soft); border-radius: 18px; padding: 12px 18px; color: var(--violet-dark); max-width: 480px; }
.rest { background: var(--amber); color: var(--amber-ink); }

/* Revisión del adulto y libro de hechizos */
.view-title { font-size: 28px; }
.muted { color: var(--muted); font-size: 16px; }
.center-text { text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.review-list { display: flex; flex-direction: column; gap: 10px; }
.review-row { display: flex; align-items: center; gap: 14px; background: var(--white); border: 2px solid var(--soft); border-radius: 20px; padding: 12px 16px; text-align: left; }
.review-info { display: flex; flex-direction: column; flex: 1; }
.chev { font-size: 28px; color: var(--violet); }
.review-words { display: flex; flex-direction: column; gap: 10px; }
.review-word { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--white); border: 2px solid var(--soft); border-radius: 20px; padding: 10px 12px 10px 16px; }
.review-word .ex-word { font-size: 30px; }
.marks { display: flex; gap: 8px; flex: none; }
.mark { min-width: 80px; height: 52px; border-radius: 14px; border: 2px solid #B9A5E8; background: var(--white); color: #3E2F73; font-weight: 800; }
.mark.bien[aria-pressed="true"] { background: var(--mint); border-color: var(--mint); color: var(--white); }
.mark.mal[aria-pressed="true"] { background: var(--gold); border-color: var(--gold-dark); color: var(--amber-ink); }
.page { background: var(--white); border: 2px solid var(--soft); border-radius: 24px; padding: 16px 18px; }
.page h2 { font-size: 22px; margin-bottom: 8px; }
.page-count { color: var(--muted); font-size: 16px; font-family: 'Nunito', sans-serif; }
.learned { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.learned li { background: var(--mint-soft); border-radius: 999px; padding: 4px 14px; font-size: 20px; }

/* Panel de papá */
.pin-box { display: flex; flex-direction: column; gap: 12px; align-items: center; max-width: 360px; margin: 0 auto; text-align: center; width: 100%; }
.typed.pin { font-size: 40px; letter-spacing: .5em; max-width: 240px; padding-left: calc(22px + .5em); }
.form-msg { color: var(--amber-ink); min-height: 1.3em; font-size: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.card { background: var(--white); border: 2px solid var(--soft); border-radius: 24px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.card h2 { font-size: 20px; color: var(--violet-dark); }
.big-line { font-size: 20px; }
.plain { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.reset-body { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ex-word.phrase { font-size: 30px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Letras Mágicas 2: la casa de los perritos ===== */
body { background: var(--cream); }
.screen.home, .screen.barrio, .screen.create { max-width: 480px; padding-bottom: 96px; }
.title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 28px; line-height: 1.05; color: var(--violet); }
.sub, .kicker { color: var(--muted); font-size: 15px; font-weight: 800; }
.h2 { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 22px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.icon { display: inline-flex; line-height: 0; }
.back { width: 46px; height: 46px; min-height: 46px; flex: none; border-radius: 14px; border: 3px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.topbar { display: flex; align-items: center; gap: 12px; }
.link-btn { background: none; color: var(--violet); font-weight: 800; text-decoration: underline; min-height: 44px; padding: 0 6px; }
.link-btn.light { color: #E6DCFF; }
.warn { background: #FFF0C2; border: 3px solid var(--line); border-radius: 16px; padding: 10px 14px; font-weight: 800; }
.cta { width: 100%; min-height: 60px; border-radius: 20px; background: var(--violet); color: #fff; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 22px; box-shadow: 0 6px 0 #3B1F86; }
.cta.small { min-height: 50px; font-size: 20px; box-shadow: 0 4px 0 var(--line); background: var(--coral); }
.cta.coral { background: var(--coral); box-shadow: 0 6px 0 #B5463B; }
.cta.gold { background: var(--gold); color: var(--ink); box-shadow: 0 6px 0 #C79A1E; }
.cta:disabled { background: #D9CDBB; color: #6F6457; box-shadow: none; }
.cta:active:not(:disabled) { transform: translateY(3px); }
.bone-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 3px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 8px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 20px; }

/* Crear cachorrita */
.pet-card { position: relative; height: 240px; border-radius: 28px; background: var(--sky); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 12px; }
.pet-card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 66px; background: var(--grass); }
.pet-sun { position: absolute; top: 16px; right: 22px; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); }
.pet-stage, .pet-name { position: relative; z-index: 1; }
.pet-name { background: #fff; border: 3px solid var(--line); border-radius: 999px; padding: 0 16px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 20px; }
.opt { display: flex; flex-direction: column; gap: 6px; }
.opt h2, .opt-label { font-size: 15px; font-weight: 800; }
.swatches, .pills { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 52px; height: 52px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--line) inset; padding: 0; }
.swatch.on { border-color: var(--violet); }
.pill { flex: 1; min-width: 88px; min-height: 46px; border-radius: 16px; border: 3px solid #E4D7C4; background: #fff; font-weight: 800; font-size: 15px; }
.pill.on { border-color: var(--violet); background: #EFE7FF; }
.pet-input { height: 52px; border-radius: 16px; border: 3px solid var(--line); padding: 0 16px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 22px; color: var(--ink); background: #fff; width: 100%; }

/* Casa */
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-scene { position: relative; }
.room { position: relative; width: 352px; max-width: 100%; height: 300px; margin: 0 auto; border-radius: 26px; border: 3px solid var(--line); overflow: hidden; }
.room-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 92px; background: #E9B989; border-top: 6px solid #C98F5E; }
.room-window { position: absolute; top: 20px; left: 20px; width: 100px; height: 80px; border-radius: 14px; background: #BFE6FF; border: 3px solid var(--line); overflow: hidden; }
.room-window .sun { position: absolute; top: 10px; right: 12px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); }
.placed { position: absolute; }
.family { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: flex-end; }
.bubble { position: absolute; right: 14px; top: 16px; max-width: 180px; background: #fff; border: 3px solid var(--line); border-radius: 18px; padding: 6px 12px; font-weight: 800; font-size: 15px; }
.play-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 3px solid var(--line); border-radius: 20px; padding: 10px 14px; box-shadow: 0 5px 0 var(--line); }
.play-card.done { justify-content: center; }
.play-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--gold); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.play-text { display: flex; flex-direction: column; flex: 1; }
.play-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 20px; line-height: 1.1; }
.play-sub { font-size: 14px; color: var(--muted); }
.play-go { font-family: 'Baloo 2', sans-serif; font-weight: 800; color: #fff; background: var(--coral); border-radius: 999px; padding: 4px 12px; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: space-around; background: #fff; border-top: 3px solid var(--line); padding: 6px 6px calc(10px + env(safe-area-inset-bottom)); }
.bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 72px; background: none; color: var(--muted); font-weight: 800; font-size: 13px; }
.bottom-nav button.on { color: var(--violet); }

/* Barrio */
.progress-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; }
.bar { flex: 1; height: 14px; border-radius: 999px; background: var(--sand); border: 2.5px solid var(--line); overflow: hidden; }
.bar-fill { height: 100%; background: var(--coral); }
.map { position: relative; width: 360px; max-width: 100%; height: 464px; margin: 0 auto; border-radius: 28px; border: 3px solid var(--line); background: var(--grass); overflow: hidden; }
.map-art { position: absolute; inset: 0; }
.place, .map-home { position: absolute; width: 86px; padding: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 0; }
.place.locked { opacity: .72; }
.map-tag { background: #fff; border: 2.5px solid var(--line); border-radius: 999px; padding: 0 8px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 13px; white-space: nowrap; }
.place.locked .map-tag { background: #F3E8D8; }
.place.sel .map-tag { background: var(--violet); color: #fff; }
.map-badge { font-size: 12px; font-weight: 800; }
.map-me { position: absolute; pointer-events: none; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.place-card { background: #fff; border: 3px solid var(--line); border-radius: 22px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 5px 0 var(--line); }
.place-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 19px; line-height: 1.1; }
.focus-chip { background: #EFE7FF; color: var(--violet); border-radius: 999px; padding: 2px 10px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.place-desc { color: var(--muted); font-size: 15px; }
.locked-msg { text-align: center; background: #F3E8D8; color: #6F6457; border-radius: 16px; padding: 12px; font-weight: 800; font-size: 15px; }

/* Historia */
.screen.story { min-height: 100vh; max-width: 480px; background: #2B2140; color: #fff; }
body:has(.screen.story) { background: #2B2140; }
.story-chapter { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 17px; }
.story-stage { min-height: 470px; overflow: hidden; }
.scene { position: relative; height: 470px; border-radius: 28px; border: 4px solid #fff; background: #FFE2B8; overflow: hidden; }
.scene::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: #E9B989; border-top: 4px solid var(--line); }
.scene-pup { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); z-index: 1; }
.speech { position: absolute; left: 16px; right: 16px; top: 18px; z-index: 2; background: #fff; color: var(--ink); border: 4px solid var(--line); border-radius: 24px; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.speech-who { color: var(--violet); font-size: 14px; font-weight: 800; }
.speech-line { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 23px; line-height: 1.2; }
.todo { min-height: 470px; border-radius: 28px; border: 4px solid #fff; background: #FFFDF6; color: var(--ink); padding: 18px; }
.todo-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 26px; }
.todo ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.todo li { display: flex; align-items: center; gap: 12px; border-bottom: 2.5px dashed #E4D7C4; padding: 6px 0; }
.todo li span:last-child { display: flex; flex-direction: column; }
.todo small { color: var(--muted); font-weight: 800; }
.box { width: 30px; height: 30px; border-radius: 9px; border: 3px solid var(--line); background: #fff; flex: none; }
.box.now { background: var(--gold); }
.dots { display: flex; justify-content: center; gap: 8px; }
.dots span { width: 10px; height: 10px; border-radius: 999px; background: #5E5470; }
.dots span.on { width: 28px; background: var(--gold); }
.slide-in { animation: slide .35s ease-out both; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Misión */
.screen.mission, .screen.decorate, .screen.shop, .screen.gift { max-width: 480px; }
.screen.decorate, .screen.shop { padding-bottom: 96px; }
.grow { flex: 1; min-width: 0; }
.trick-card { display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--line); border-radius: 20px; padding: 8px 12px; font-weight: 800; font-size: 15px; }
.steps { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 14px; position: relative; }
.steps::before { content: ''; position: absolute; left: 50%; top: 20px; bottom: 20px; border-left: 6px dotted #E4D7C4; }
.step { position: relative; display: flex; align-items: center; gap: 12px; width: 78%; }
.step.right { align-self: flex-end; flex-direction: row-reverse; text-align: right; }
.step-dot { width: 64px; height: 64px; min-height: 64px; flex: none; border-radius: 50%; border: 4px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 26px; background: var(--sand); color: #8C7B66; }
.step-dot.done { background: #5CBF73; color: #fff; }
.step-dot.gift { background: var(--gold); color: #fff; }
.step-now { width: 76px; height: 76px; background: var(--coral); color: #fff; font-size: 30px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,111,97,.55); } 50% { box-shadow: 0 0 0 12px rgba(255,111,97,0); } }
.step-text { display: flex; flex-direction: column; background: var(--cream); padding: 2px 4px; }
.step-text b { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 18px; line-height: 1.1; }
.step-text small { color: var(--muted); font-weight: 800; font-size: 13px; }
.mission-words { background: #FFFDF6; border: 3px solid var(--line); border-radius: 20px; padding: 10px 12px; }
.mission-words h2 { font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.word-chip { background: #fff; border: 2.5px solid var(--line); border-radius: 999px; padding: 0 10px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 16px; }
.word-chip.rule { background: #EFE7FF; }
.lesson .intro .puppy-wrap { display: flex; justify-content: center; }
.result-inline { text-align: center; }

/* Premio */
.screen.gift { min-height: 100vh; background: var(--violet); color: #fff; align-items: center; text-align: center; padding-top: 40px; }
body:has(.screen.gift) { background: var(--violet); }
.gift-kicker { color: #E6DCFF; font-weight: 800; }
.gift-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 36px; line-height: 1.05; }
.gift-body { width: 100%; display: flex; justify-content: center; min-height: 330px; align-items: center; }
.gift-box { background: none; display: flex; flex-direction: column; align-items: center; color: #fff; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 22px; }
.wiggle .icon { animation: wiggle 1.2s ease-in-out infinite; }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.gift-card { width: 100%; background: #fff; color: var(--ink); border: 4px solid var(--line); border-radius: 28px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: 0 8px 0 #2A1670; }
.pop { animation: pop .5s ease-out both; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); } }
.gift-art { width: 150px; height: 150px; }
.gift-name { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 26px; }
.gift-sub { color: var(--muted); font-weight: 800; }
.gift-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* Decorar */
.walls { display: flex; align-items: center; gap: 8px; }
.wall-swatch { width: 42px; height: 42px; min-height: 42px; border-radius: 12px; border: 3px solid var(--line); padding: 0; }
.wall-swatch.on { outline: 3px solid var(--violet); outline-offset: 2px; }
.walls-label { font-size: 14px; font-weight: 800; color: var(--muted); }
.room.big { width: 358px; height: 430px; max-width: none; flex: none; align-self: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.room.big .room-floor { height: 130px; }
.room-window.night { background: #1F2A5C; left: 124px; }
.room-window.night .sun { background: #FFF4C2; left: 14px; right: auto; }
.room-me { position: absolute; right: 18px; bottom: 96px; pointer-events: none; }
.placed-btn { position: absolute; padding: 0; min-height: 0; background: none; cursor: grab; touch-action: none; }
.placed-btn.dragging { cursor: grabbing; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); z-index: 3; }
.tray { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tray-item { display: flex; flex-direction: column; align-items: center; gap: 2px; background: #fff; border: 3px solid var(--line); border-radius: 18px; padding: 6px; box-shadow: 0 4px 0 var(--line); font-size: 12px; font-weight: 800; }
.tray-item.used { background: var(--sand); color: #6F6457; }
.tray-art { width: 52px; height: 44px; }
.tray-name { font-family: 'Baloo 2', sans-serif; font-size: 14px; line-height: 1.1; text-align: center; }
.tray-empty { grid-column: 1 / -1; color: var(--muted); }

/* Tienda */
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.shop-item { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border: 3px solid var(--line); border-radius: 18px; padding: 8px 6px; }
.shop-item.owned { background: var(--sand); }
.shop-art { width: 64px; height: 56px; }
.shop-name { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 14px; text-align: center; line-height: 1.1; min-height: 30px; }
.shop-buy { min-height: 40px; width: 100%; border-radius: 12px; background: var(--gold); border: 2.5px solid var(--line); font-weight: 800; font-size: 14px; white-space: nowrap; }
.shop-buy:disabled { background: #EFE2CF; color: #6F6457; }
.play-card.letter .play-icon { background: #F8DDEB; font-size: 28px; }
.screen.spellbook { max-width: 480px; }

/* ---- Cuenta familiar ---- */
.family-code { font-family: 'Baloo 2', system-ui, sans-serif; font-weight: 800; font-size: 32px; letter-spacing: .06em; color: var(--violet-dark); background: var(--soft); border-radius: 16px; padding: 4px 16px; user-select: all; }
.typed.code-input { font-size: 30px; text-transform: uppercase; letter-spacing: .08em; }
.pin-digits { display: flex; gap: 12px; justify-content: center; }
.pin-digit { width: 64px; height: 76px; border: 4px solid var(--violet); border-radius: 20px; background: var(--white); color: var(--ink); font-size: 40px; text-align: center; }
.pin-digit:focus, .typed:focus { outline: 4px solid var(--amber); outline-offset: 2px; }
.papa-actions { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
