/* Direccion: un cuaderno de clase colorido. Sticker chunky, bordes de tinta azul marino,
   tipografia Andika (letras a y g de una sola vuelta, como las que aprenden a escribir). */
:root {
  --sky: #CFEAFF; --paper: #FFFFFF; --ink: #1F2A5C; --muted: #566087;
  --sun: #FFC93C; --coral: #FF6B6B; --leaf: #2FBF71; --ocean: #2D9CFF; --grape: #8B5CF6;
  --line: #B7D6F0; --c: #2D9CFF; --sec: #2D9CFF;
  --display: 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Andika', 'Comic Sans MS', 'Trebuchet MS', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background-color: color-mix(in srgb, var(--sec) 14%, #fff); color: var(--ink); transition: background-color .3s; font-family: var(--body); font-size: 18px; line-height: 1.4;
  background-image: radial-gradient(circle at 12% 8%, #ffffffaa 0 90px, transparent 91px), radial-gradient(circle at 88% 14%, #ffffff88 0 60px, transparent 61px), radial-gradient(circle at 70% 90%, #ffffff77 0 110px, transparent 111px);
  background-attachment: fixed;
}
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.1; text-wrap: balance; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 4px solid var(--grape); outline-offset: 3px; }
.screen { max-width: 980px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.ttl { font-size: 38px; }
.lead { font-size: 22px; margin: 0; }
.note { color: var(--muted); font-size: 16px; margin: 0; }

/* cabecera */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--sec) 16%, #fff); border-bottom: 3px solid var(--ink); }
.bar1 { display: flex; align-items: center; gap: 10px; padding: 8px 16px 4px; max-width: 980px; margin: 0 auto; }
.logo { width: 46px; height: 46px; flex: none; }
.logo svg { width: 100%; height: 100%; }
.snd { min-height: 44px; min-width: 44px; padding: 4px 10px; box-shadow: 0 4px 0 var(--ink); }
.secnav { display: flex; gap: 8px; overflow-x: auto; padding: 6px 16px 10px; max-width: 980px; margin: 0 auto; scrollbar-width: none; }
.secnav::-webkit-scrollbar { display: none; }
.sn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 4px 14px 4px 6px; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper); font-family: var(--display); font-size: 17px; }
.sn .si { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c); font-size: 16px; }
.sn.on { background: var(--c); color: var(--fg); box-shadow: 0 3px 0 var(--ink); }
.sn.on .si { background: #fff; }
.bwrap { max-width: 980px; margin: 14px auto 0; padding: 0 16px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--sec); color: var(--fg, #fff); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); }
.banner b { font-family: var(--display); font-size: 30px; display: block; line-height: 1; }
.banner small { font-size: 16px; }
.bicon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 16px; background: #fff; border: 3px solid var(--ink); font-size: 30px; }
.who { margin: 0 auto 0 0; display: flex; align-items: center; gap: 8px; background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 2px 14px 2px 4px; cursor: pointer; font-family: var(--display); font-size: 20px; }
.who .mini { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #E9F6FF; }
.starcount { display: flex; align-items: center; gap: 6px; background: var(--paper); border: 3px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-family: var(--display); font-size: 24px; }
.star { fill: #E3E8F5; stroke: #B8C0DA; stroke-width: 1.5; }
.star.on { fill: var(--sun); stroke: #D49A00; }
.stars3 { display: inline-flex; gap: 2px; }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 8px 20px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); font-family: var(--display); font-weight: 800; font-size: 20px; transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--sun); }
.btn.big { min-height: 64px; font-size: 24px; padding: 10px 28px; }
.btn.say { background: var(--ocean); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; text-decoration: underline; }
.btn.home { padding: 6px 14px; min-height: 48px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; margin-top: 6px; }
.row.left { justify-content: flex-start; }
.spk { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 3px solid var(--ink); background: var(--ocean); color: #fff; padding: 0; }
.spk.sm { width: 36px; height: 36px; }
.spk svg { width: 20px; height: 20px; }

/* mascota y burbuja */
.pipwrap { display: flex; align-items: center; gap: 12px; }
.pip { width: 84px; height: 84px; flex: none; animation: bob 3s ease-in-out infinite; }
.pip svg, .bigpip svg { width: 100%; height: 100%; }
.bubble { position: relative; background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; font-size: 20px; }
.bubble::before { content: ''; position: absolute; left: -13px; top: 50%; width: 20px; height: 20px; background: var(--paper); border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateY(-50%) rotate(45deg); }
.bigpip { width: 150px; height: 150px; margin: 0 auto; animation: bob 3s ease-in-out infinite; }
.bigpip.small { width: 110px; height: 110px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* bienvenida */
.welcome { align-items: center; text-align: center; padding-top: 28px; }
.welcome h1 { font-size: 52px; }
.field { font-family: var(--display); font-size: 22px; align-self: flex-start; }
.welcome .field { align-self: center; }
.input { width: 100%; max-width: 420px; min-height: 60px; font: inherit; font-size: 26px; padding: 8px 16px; border: 3px solid var(--ink); border-radius: 16px; background: var(--paper); color: var(--ink); }
.who-list { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.who-card { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 150px; padding: 14px 8px; background: var(--paper); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); font-family: var(--display); font-size: 22px; }
.who-card.new { justify-content: center; background: var(--sun); }
.who-card .plus { font-size: 60px; line-height: 1; }
.pick2 { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.bigpick { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 190px; padding: 18px; border: 3px solid var(--ink); border-radius: 28px; box-shadow: 0 6px 0 var(--ink); font-family: var(--display); font-size: 26px; background: var(--paper); }
.bigpick span { font-size: 80px; line-height: 1.1; }
.bigpick.boy { background: #DDF0FF; } .bigpick.girl { background: #FFE3EC; }
.chars { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.char { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 130px; padding: 12px 6px; background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; font-family: var(--display); font-size: 22px; }
.char.sel { background: var(--sun); box-shadow: 0 5px 0 var(--ink); transform: translateY(-3px); }

/* inicio */
.home .greet { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 26px; }
.daily { display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px 18px; background: var(--sun); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); }
.daily b { display: block; font-family: var(--display); font-size: 26px; }
.daily small { font-size: 16px; }
.daily.done { background: #CFF5E0; }
.dstar { animation: spin 5s linear infinite; display: inline-flex; }
@keyframes spin { to { transform: rotate(360deg); } }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.tiles.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; background: var(--paper); border: 3px solid var(--ink); border-radius: 28px; box-shadow: 0 7px 0 var(--ink); transition: transform .08s, box-shadow .08s; }
.tile:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--ink); }
.tile .tpic { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--c); border: 3px solid var(--ink); font-size: 50px; }
.tile b { font-family: var(--display); font-size: 28px; }
.tile small { color: var(--muted); font-size: 16px; }

/* tarjetas de unidad */
.ugrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.ucard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 12px; background: var(--paper); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); text-align: center; }
.ucard:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.ucard .num { position: absolute; top: -12px; left: -8px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--c); color: #fff; border: 3px solid var(--ink); font-family: var(--display); font-size: 20px; text-shadow: 0 1px 0 #0004; }
.uicon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; background: color-mix(in srgb, var(--c) 28%, white); border: 3px solid var(--ink); font-size: 40px; }
.uicon.big { width: 84px; height: 84px; font-size: 48px; }
.uicon.sm { width: 40px; height: 40px; font-size: 22px; border-radius: 12px; border-width: 2px; }
.ucard b { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.ucard small { color: var(--muted); font-size: 16px; }
.lv { font-style: normal; font-size: 14px; padding: 2px 10px; border-radius: 999px; border: 2px solid var(--ink); background: #EEF1FA; }
.lv.mid { background: #FFE9A8; } .lv.done { background: #BDEFD3; }

/* aula */
.board { background: #1F5C4A; background-image: linear-gradient(135deg, #ffffff10 0 12%, transparent 12%); color: #fff; border: 6px solid #B5834F; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.board .bhead { display: flex; align-items: center; gap: 14px; }
.board h2 { font-size: 36px; } .board p { margin: 0; opacity: .9; }
.board .bubble { color: var(--ink); }
.rule { display: flex; flex-wrap: wrap; gap: 12px; }
.rp { display: flex; align-items: center; gap: 10px; background: #ffffff1c; border: 2px dashed #fff9; border-radius: 16px; padding: 8px 14px; font-size: 26px; font-family: var(--display); }
.rp b { background: var(--sun); color: var(--ink); border-radius: 12px; padding: 0 12px; }
.rp span { font-size: 22px; }
.phr { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.phr li { display: flex; align-items: center; gap: 12px; background: #ffffff14; border-radius: 16px; padding: 8px 12px; }
.phr b { display: block; font-size: 24px; } .phr small { opacity: .85; font-size: 16px; }
.dots { display: flex; gap: 8px; justify-content: center; }
.dots i { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); }
.dots i.past { background: var(--leaf); } .dots i.cur { background: var(--sun); transform: scale(1.35); }
.wcard { display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--paper); border: 4px solid var(--ink); border-radius: 32px; box-shadow: 0 8px 0 var(--ink); padding: 22px 16px; text-align: center; }
.wpic { min-height: 150px; display: grid; place-items: center; }
.wen { font-size: clamp(44px, 11vw, 82px); font-weight: 700; line-height: 1; }
.wes { color: var(--muted); font-size: 22px; margin: 0; }
.wsent { display: flex; align-items: center; gap: 10px; font-size: 22px; margin-top: 6px; background: #F1F7FF; border-radius: 16px; padding: 6px 12px; }
.pic { font-size: 56px; line-height: 1.1; display: inline-block; }
.pic.xl { font-size: 120px; } .pic.lg { font-size: 64px; } .pic.md { font-size: 48px; } .pic.optp { font-size: 64px; }
.swatch { display: inline-block; width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--ink); vertical-align: middle; }
.swatch.xl { width: 130px; height: 130px; } .swatch.lg { width: 72px; height: 72px; } .swatch.md { width: 56px; height: 56px; } .swatch.optp { width: 70px; height: 70px; }

/* constructor "todo sobre mi" */
.builder { background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; padding: 14px; display: grid; gap: 6px; }
.bl { margin: 6px 0 0; font-family: var(--display); font-size: 22px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { min-width: 56px; min-height: 56px; padding: 4px 14px; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; font-family: var(--display); font-size: 24px; display: inline-grid; place-items: center; }
.chip.sel { background: var(--sun); box-shadow: 0 4px 0 var(--ink); transform: translateY(-2px); }
.chip .pic { font-size: 34px; } .chip .swatch { width: 34px; height: 34px; }
.chip.cat { font-size: 18px; min-height: 46px; }
.chip.cat.sel { background: var(--c); color: #fff; }
.chips.wrap { margin-bottom: 4px; }
.idcard { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--paper); border: 4px solid var(--cc); outline: 3px solid var(--ink); border-radius: 24px; padding: 14px; }
.idav { background: #E9F6FF; border-radius: 50%; padding: 6px; }
.idtx { flex: 1; min-width: 220px; display: grid; gap: 6px; }
.idtx p { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 22px; }
.idfood { font-size: 64px; }

/* practica */
.prac { align-items: center; text-align: center; }
.plabel { margin: 0; color: var(--muted); }
.q { font-size: 30px; display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.stage { min-height: 160px; display: grid; place-items: center; gap: 8px; }
.stagepic { display: grid; place-items: center; min-height: 120px; }
.bigspk { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 170px; height: 150px; justify-content: center; border: 4px solid var(--ink); border-radius: 32px; background: var(--ocean); color: #fff; box-shadow: 0 7px 0 var(--ink); font-family: var(--display); font-size: 24px; }
.bigspk svg { width: 64px; height: 64px; }
.sent { font-size: 40px; font-weight: 700; }
.blank { display: inline-block; min-width: 90px; border-bottom: 5px dashed var(--ink); margin: 0 6px; color: transparent; }
.opts { display: grid; gap: 14px; width: 100%; max-width: 760px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.opt { min-height: 112px; display: grid; place-items: center; padding: 8px; background: var(--paper); border: 4px solid var(--ink); border-radius: 26px; box-shadow: 0 6px 0 var(--ink); font-size: 38px; font-weight: 700; transition: transform .08s; }
.opt:active:not(:disabled) { transform: translateY(4px); }
.opt:disabled { cursor: default; }
.opt.ok { background: #BDEFD3; border-color: #118A4C; animation: pop .4s; }
.opt.bad { background: #FFD6D6; opacity: .7; animation: shake .4s; }
.otxt { font-size: 40px; }
.fb { min-height: 44px; font-family: var(--display); font-size: 28px; }
.fb.good { color: #0E7A41; } .fb.soft { color: #B2461A; }
@keyframes pop { 50% { transform: scale(1.08); } }
@keyframes shake { 20% { transform: translateX(-8px); } 60% { transform: translateX(8px); } }
.shake { animation: shake .4s; }

/* resultado */
.result { align-items: center; text-align: center; }
.result h2 { font-size: 40px; }
.bigstars { display: flex; gap: 8px; }
.bigstars .star.on { animation: pop .6s backwards; }
.bigstars .star:nth-child(2) { animation-delay: .2s; } .bigstars .star:nth-child(3) { animation-delay: .4s; }
.gain { margin: 0; font-family: var(--display); font-size: 26px; color: #A66B00; }
.newsticker { display: grid; gap: 0; place-items: center; background: var(--paper); border: 3px dashed var(--ink); border-radius: 22px; padding: 10px 26px; }
.newsticker span { font-size: 64px; } .newsticker b { font-family: var(--display); font-size: 24px; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: fall 2.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* vocabulario */
.grp { margin: 4px 0 -6px; font-family: var(--display); font-size: 22px; }
.vhead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.vhead h3 { font-size: 32px; } .vhead small { font-size: 18px; color: var(--muted); font-family: var(--body); }
.tog { display: flex; align-items: center; gap: 8px; font-size: 18px; } .tog input { width: 26px; height: 26px; accent-color: var(--grape); }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.vtile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 160px; padding: 12px 6px; background: var(--paper); border: 3px solid var(--ink); border-top: 10px solid var(--c, var(--ocean)); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); }
.vtile b { font-size: 24px; } .vtile small { color: var(--muted); font-size: 17px; }
.vtile:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.vtile.sm { min-height: 120px; width: 130px; }
.weak { display: flex; gap: 12px; flex-wrap: wrap; }

/* canciones */
.shead { display: flex; align-items: center; gap: 14px; }
.shead h2 { font-size: 38px; } .shead p { margin: 0; color: var(--muted); }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lines li { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 12px 18px; font-size: 26px; transition: background .2s, transform .2s; }
.lines li.on { background: var(--sun); transform: scale(1.03); }

/* juegos */
.mtop { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-size: 24px; }
.mgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 640px; margin: 0 auto; width: 100%; }
.mcard { position: relative; aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 20px; padding: 0; background: var(--ocean); box-shadow: 0 5px 0 var(--ink); perspective: 600px; }
.mcard > span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 17px; backface-visibility: hidden; transition: transform .35s; }
.mback { background: var(--ocean); color: #fff; font-family: var(--display); font-size: 46px; }
.mfront { background: var(--paper); transform: rotateY(180deg); font-size: 22px; text-align: center; padding: 4px; }
.mfront b { font-size: clamp(16px, 3.4vw, 26px); }
.mcard.up .mback { transform: rotateY(180deg); } .mcard.up .mfront { transform: rotateY(0); }
.mcard.match { border-color: #118A4C; background: #BDEFD3; } .mcard.match .mfront { background: #DDF8EA; }
.slots { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.slot { display: grid; place-items: center; width: 58px; height: 68px; border-bottom: 6px solid var(--ink); font-size: 46px; font-weight: 700; }
.slot.fill { color: #0E7A41; }
.letters { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.letter { width: 68px; height: 68px; border: 3px solid var(--ink); border-radius: 18px; background: var(--sun); box-shadow: 0 5px 0 var(--ink); font-size: 40px; font-weight: 700; }
.letter.used { opacity: .25; box-shadow: none; }
.build { align-items: center; text-align: center; }

/* mi mundo */
.me { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 28px; padding: 16px; }
.mebig { background: #E9F6FF; border-radius: 50%; padding: 10px; }
.mein { flex: 1; min-width: 240px; display: grid; gap: 8px; }
.inline { display: flex; gap: 10px; flex-wrap: wrap; } .inline .input { flex: 1; min-width: 160px; }
.world h3 { font-size: 28px; margin-top: 6px; }
.accs { display: flex; gap: 12px; flex-wrap: wrap; }
.acc { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 104px; padding: 8px 4px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; font-size: 15px; }
.acc.sel { background: var(--sun); } .acc.locked { opacity: .55; } .acc small { display: flex; align-items: center; gap: 3px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kpi { background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; padding: 10px; text-align: center; box-shadow: 0 4px 0 var(--ink); }
.kpi b { display: block; font-family: var(--display); font-size: 40px; line-height: 1; } .kpi span { font-size: 15px; color: var(--muted); }
.bar { display: grid; gap: 4px; } .barlbl { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 16px; }
.track { display: flex; height: 22px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; }
.track .a { background: var(--leaf); } .track .b { background: var(--sun); }
.ulist { display: grid; gap: 8px; }
.urow { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 6px 12px; flex-wrap: wrap; }
.urow b { flex: 1; min-width: 140px; font-family: var(--display); font-size: 20px; }
.urow .star { width: 22px; height: 22px; }
.album, .medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.stk, .medal { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; background: var(--paper); border: 3px dashed var(--line); border-radius: 18px; padding: 8px 4px; color: var(--muted); }
.stk span, .medal span { font-size: 42px; filter: grayscale(1); opacity: .35; }
.stk.has, .medal.on { border: 3px solid var(--ink); color: var(--ink); }
.stk.has span, .medal.on span { filter: none; opacity: 1; }
.stk small, .medal small { font-size: 14px; line-height: 1.2; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-family: var(--display); font-size: 20px; transition: .25s; z-index: 20; max-width: 90vw; text-align: center; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .sn { font-size: 15px; padding-right: 10px; } .banner b { font-size: 26px; } .nm { display: none; }
  .welcome h1 { font-size: 40px; } .ttl { font-size: 32px; }
  .pip { width: 64px; height: 64px; } .bubble { font-size: 18px; }
  .pic.xl { font-size: 96px; }
  .mgrid { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .confetti { display: none; }
}

/* examen final y resultados */
.finalcard { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 18px; background: var(--sec); color: #1F2A5C; border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); }
.finalcard .ficon { font-size: 46px; line-height: 1; }
.finalcard .ftx { flex: 1; } .finalcard b { display: block; font-family: var(--display); font-size: 28px; line-height: 1.1; } .finalcard small { font-size: 16px; }
.sub { font-size: 24px; margin: 6px 0 0; }
.nota { margin: 0; font-family: var(--display); font-size: 30px; } .nota b { font-size: 60px; color: #0E7A41; }
.cnt { font-family: var(--display); font-size: 20px; }

@media (min-width: 720px) { .secnav { flex-wrap: wrap; overflow: visible; } }

/* juegos nuevos */
.wheelscr { align-items: center; text-align: center; }
.wheelbox { width: min(88vw, 380px); margin: 0 auto; filter: drop-shadow(0 6px 0 rgba(31,42,92,.25)); }
.wheel { width: 100%; height: auto; display: block; }
#wg { transform-origin: 0 0; }
.wpanel { display: grid; gap: 12px; justify-items: center; width: 100%; }
.landed { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sky { position: relative; height: 440px; overflow: hidden; border: 4px solid var(--ink); border-radius: 26px; background: linear-gradient(#8FD3FF, #E6F6FF 85%); touch-action: manipulation; }
.balloon { position: absolute; left: var(--x); bottom: -140px; width: 92px; height: 124px; padding: 0; border: 0; background: none; animation: rise var(--d) linear var(--dl) forwards; }
.balloon .bb { display: grid; place-items: center; width: 92px; height: 100px; border-radius: 50% 50% 46% 46%; background: var(--col); border: 3px solid var(--ink); box-shadow: inset -8px -8px 0 #0002; }
.balloon::after { content: ''; position: absolute; left: 50%; top: 100px; width: 2px; height: 22px; background: var(--ink); }
@keyframes rise { to { transform: translateY(-620px); } }
.balloon.pop .bb { animation: burst .3s forwards; } .balloon.pop::after { display: none; }
@keyframes burst { to { transform: scale(1.7); opacity: 0; } }
.balloon.wob .bb { animation: shake .4s; }
.bgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 520px; width: 100%; margin: 0 auto; }
.bcell { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 5px 0 var(--ink); }
.bcell.on { background: #BDEFD3; border-color: #118A4C; }
.stamp { position: absolute; right: 8px; top: 2px; font-size: 30px; color: #0E7A41; font-weight: 700; }
.bingo, .balloons { text-align: center; }
.track2 { width: 100%; max-width: 760px; }
.lane { position: relative; height: 70px; border-bottom: 6px solid #566087; background: repeating-linear-gradient(90deg, #0000 0 38px, #fff6 38px 46px); border-radius: 12px; }
.rcar { position: absolute; bottom: 4px; width: 64px; height: 64px; left: 0; transition: left 1s ease-in-out; }
.rcar svg { width: 100%; height: 100%; }
.finish { position: absolute; right: 0; bottom: 8px; font-size: 40px; }
@media (prefers-reduced-motion: reduce) { .balloon { bottom: var(--b); } }

/* fondo de bienvenida */
body.welcome-bg { background: linear-gradient(#ffffff66, #ffffff22), url(bg-english.jpg) center / cover fixed no-repeat; }
body.welcome-bg .welcome { background: #FFFFFFEE; border: 3px solid var(--ink); border-radius: 28px; box-shadow: 0 6px 0 var(--ink); max-width: 640px; margin: 18px auto; padding: 24px 20px; }
.finalcard.print { margin-top: 10px; background: #fff; }
.xbtns { flex-wrap: wrap; justify-content: center; }
.xframe { width: 100%; max-width: 820px; height: 900px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; display: block; margin: 10px auto; }

/* invitación TikTok */
body.welcome-bg .invite { background: #FFFFFFEE; border: 3px solid var(--ink); border-radius: 28px; box-shadow: 0 6px 0 var(--ink); max-width: 640px; margin: 18px auto; padding: 22px 20px; align-items: center; text-align: center; }
.invite h1 { font-size: 40px; }
.qrwrap { display: grid; justify-items: center; gap: 6px; margin: 6px 0; }
.qrimg { width: min(68vw, 270px); height: auto; filter: drop-shadow(0 6px 0 rgba(31,42,92,.35)); animation: qrpop .7s cubic-bezier(.2,1.4,.4,1) both; }
.qrtip { margin: 0; font-weight: 700; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.bounce { animation: bounceY 1.6s ease-in-out infinite; }
@keyframes bounceY { 50% { transform: translateY(-10px); } }
@keyframes qrpop { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bounce, .qrimg { animation: none; } }
a.btn, a.btn:visited { color: var(--ink); }

/* ===== animaciones ===== */
.screen.enter { animation: enter .4s cubic-bezier(.2,.9,.3,1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(18px) scale(.985); } }
.enter .tile, .enter .ucard, .enter .who-card, .enter .char, .enter .bigpick { animation: popin .5s cubic-bezier(.2,1.4,.4,1) both; }
.enter .tile:nth-child(1), .enter .ucard:nth-child(1), .enter .who-card:nth-child(1) { animation-delay: .04s; }
.enter .tile:nth-child(2), .enter .ucard:nth-child(2), .enter .who-card:nth-child(2) { animation-delay: .09s; }
.enter .tile:nth-child(3), .enter .ucard:nth-child(3), .enter .who-card:nth-child(3) { animation-delay: .14s; }
.enter .tile:nth-child(4), .enter .ucard:nth-child(4), .enter .who-card:nth-child(4) { animation-delay: .19s; }
.enter .tile:nth-child(5), .enter .ucard:nth-child(5) { animation-delay: .24s; }
.enter .tile:nth-child(6), .enter .ucard:nth-child(6) { animation-delay: .29s; }
.enter .tile:nth-child(n+7), .enter .ucard:nth-child(n+7) { animation-delay: .34s; }
@keyframes popin { from { opacity: 0; transform: scale(.7) translateY(14px); } }
.tile:hover, .ucard:hover { transform: translateY(-4px) rotate(-.6deg); }
.starcount.bump { animation: bump .7s cubic-bezier(.2,1.6,.4,1); }
@keyframes bump { 30% { transform: scale(1.3) rotate(-4deg); } 60% { transform: scale(.95); } }
.opt.ok { animation: okpop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes okpop { 40% { transform: scale(1.1) rotate(-1.5deg); } }
.opt.bad { animation: shake .4s; }
.stars3 svg { animation: starin .5s cubic-bezier(.2,1.6,.4,1) both; }
.stars3 svg:nth-child(2) { animation-delay: .12s; } .stars3 svg:nth-child(3) { animation-delay: .24s; }
@keyframes starin { from { transform: scale(0) rotate(-90deg); } }
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.burst i { position: absolute; font-style: normal; font-size: 22px; animation: bursty .9s ease-out forwards; }
@keyframes bursty { from { transform: translate(-50%, -50%) scale(.3); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.3) rotate(200deg); opacity: 0; } }
.wheel .win { animation: winflash .6s ease-in-out 3; }
@keyframes winflash { 50% { filter: brightness(1.35) saturate(1.3); } }
.rcar { animation: drive .35s ease-in-out infinite alternate; }
@keyframes drive { to { transform: translateY(-3px) rotate(-1.5deg); } }
.balloon:not(.pop):not(.wob) .bb { animation: sway 2.4s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.bcell.on { animation: okpop .45s cubic-bezier(.2,1.6,.4,1); }
.stamp { animation: starin .4s cubic-bezier(.2,1.6,.4,1) both; }
.daily:not(.done) .dstar { animation: spin 4s linear infinite; display: inline-block; }
.invite a.btn.primary { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); } }

@media (prefers-reduced-motion: reduce) {
  .screen.enter, .enter .tile, .enter .ucard, .enter .who-card, .enter .char, .enter .bigpick, .stars3 svg, .rcar, .balloon .bb, .daily .dstar, .invite a.btn.primary, .wheel .win, .starcount.bump { animation: none !important; }
  .burst { display: none; }
}

/* ===== temas: niño (azul aventura) y niña (rosa mágico) ===== */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5; background-size: 150px 150px; }
body.welcome-bg::before { display: none; }
body[data-theme=boy]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cpath d='M30 18l4 9 10 1-8 7 3 10-9-5-9 5 3-10-8-7 10-1z' fill='%232D9CFF' fill-opacity='.18'/%3E%3Ccircle cx='110' cy='40' r='7' fill='%232FBF71' fill-opacity='.2'/%3E%3Cpath d='M95 110l5-14 5 14-5-4z' fill='%23FF8A3D' fill-opacity='.25'/%3E%3Cpath d='M40 100l12-7 6 12z' fill='%238B5CF6' fill-opacity='.18'/%3E%3C/svg%3E"); }
body[data-theme=girl]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cpath d='M32 32c-8-10-22-1-12 10l12 12 12-12c10-11-4-20-12-10z' fill='%23FF6FA8' fill-opacity='.22'/%3E%3Cpath d='M112 24l3 8 8 3-8 3-3 8-3-8-8-3 8-3z' fill='%238B5CF6' fill-opacity='.25'/%3E%3Ccircle cx='100' cy='106' r='6' fill='%23FFC93C' fill-opacity='.35'/%3E%3Cpath d='M42 108c-5-6-13-1-7 6l7 7 7-7c6-7-2-12-7-6z' fill='%23FF8FB8' fill-opacity='.25'/%3E%3C/svg%3E"); }
body[data-theme=girl] { --sun: #FFB6D5; --ocean: #E0559B; --ink: #3A1F5C; --muted: #6E5C8A; }
body[data-theme=girl] .btn { border-radius: 26px; }
body[data-theme=girl] .tile, body[data-theme=girl] .ucard, body[data-theme=girl] .banner, body[data-theme=girl] .finalcard { border-radius: 32px; }
body[data-theme=girl] .top { background: linear-gradient(#FFE6F1, #F3E8FF); }
body[data-theme=boy] .top { background: linear-gradient(#E3F2FF, #E6FBEF); }
body[data-theme=boy] .btn.primary { background: #FFC93C; }

/* ===== ajuste a la medida de la ventana ===== */
:root { --z: 1; }
.screen { max-width: 1000px; }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.tiles > .tile { flex: 1 1 200px; max-width: 240px; }
.tiles.two > .tile { max-width: 340px; }
.wheelbox { width: min(88vw, 380px, calc(44vh / var(--z))); min-width: 230px; }
.sky { height: min(440px, calc(52vh / var(--z))); min-height: 300px; }
@media (max-width: 560px) {
  .tiles { gap: 10px; }
  .tiles > .tile { flex: 1 1 calc(50% - 10px); max-width: none; padding: 12px 6px 10px; }
  .tile .tpic { width: 62px; height: 62px; font-size: 34px; }
  .tile b { font-size: 21px; } .tile small { font-size: 14px; }
  .ugrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-height: 560px) { .top { position: static; } }
