:root {
  --bg: #F3F7FF;
  --bg2: #FFF6E9;
  --card: #FFFFFF;
  --ink: #1E293B;
  --muted: #64748B;
  --line: #E2E8F0;
  --brand: #4F8DFD;
  --brand-d: #2F6AE0;
  --accent: #FF7A59;
  --sun: #FACC15;
  --ok: #22C55E;
  --warn: #F59E0B;
  --danger: #EF4444;
  --purple: #8B5CF6;
  --r: 22px;
  --shadow: 0 6px 0 rgba(30, 41, 59, .08), 0 12px 28px rgba(30, 41, 59, .08);
  --font: "Nunito", "Noto Sans Armenian", system-ui, sans-serif;
  --emoji: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font); color: var(--ink); font-weight: 700;
  background: radial-gradient(1200px 600px at 10% -10%, #DCEBFF 0, transparent 60%), radial-gradient(900px 500px at 110% 10%, #FFE7D6 0, transparent 60%), var(--bg);
  min-height: 100vh; overflow-x: hidden;
}
button { font-family: inherit; font-weight: 800; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; }
input, select { font-family: inherit; }
.emo { font-family: var(--emoji); font-weight: 400; line-height: 1; display: inline-block; }
.emo.small { font-size: 22px; }
.emo.big { font-size: 64px; }
.emo.huge { font-size: 120px; }
.emo.shadow { filter: brightness(0) opacity(.75); }
#app { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 16px 40px; }

/* floating decoration */
.sky-deco i { position: fixed; font-family: var(--emoji); font-style: normal; opacity: .35; z-index: 0; pointer-events: none; animation: floaty 9s ease-in-out infinite; }
.sky-deco .d1 { top: 8%; left: 3%; font-size: 70px; }
.sky-deco .d2 { top: 30%; right: 4%; font-size: 34px; animation-delay: -2s; }
.sky-deco .d3 { bottom: 12%; right: 8%; font-size: 90px; animation-delay: -4s; }
.sky-deco .d4 { bottom: 25%; left: 2%; font-size: 44px; animation-delay: -6s; }
.sky-deco .d5 { top: 60%; left: 45%; font-size: 26px; animation-delay: -3s; }
@keyframes floaty { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-18px) } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 #CBD5E1; font-size: 17px; transition: transform .1s, box-shadow .1s; border: 2px solid var(--line); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #CBD5E1; }
.btn.big { padding: 16px 26px; font-size: 20px; border-radius: 20px; }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 12px; }
.btn.primary { background: linear-gradient(180deg, #6AA2FF, var(--brand)); color: #fff; border-color: var(--brand-d); box-shadow: 0 5px 0 var(--brand-d); }
.btn.danger { background: #FEF2F2; color: var(--danger); border-color: #FECACA; box-shadow: 0 4px 0 #FECACA; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; }
.link { color: var(--brand-d); text-decoration: underline; padding: 8px; font-size: 15px; }
.icon-btn { width: 48px; height: 48px; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 #CBD5E1; font-size: 24px; display: inline-grid; place-items: center; font-family: var(--emoji); font-weight: 400; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #CBD5E1; }
.row { display: flex; align-items: center; }
.row.center { justify-content: center; }
.gap { gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.note { color: var(--muted); font-size: 14px; font-weight: 600; }
.err { color: var(--danger); min-height: 1.2em; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 7px 12px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-size: 16px; }
.chip.star { background: #FFF7D1; }
.chip.lvl { background: #EDE9FE; color: #5B21B6; }
.chip.up { background: #DCFCE7; color: #166534; font-size: 20px; margin: 10px auto; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; margin: 14px 0; }
.input { width: 100%; padding: 13px 14px; border-radius: 14px; border: 2px solid var(--line); font-size: 17px; background: #fff; color: var(--ink); font-weight: 700; margin-top: 6px; }
.input:focus { outline: none; border-color: var(--brand); }
.big-in { font-size: 24px; text-align: center; }
label { display: block; margin: 12px 0; color: var(--muted); font-size: 15px; }
.lbl { color: var(--muted); font-size: 15px; margin: 14px 0 8px; }
.h-title { font-size: 24px; margin: 28px 4px 12px; font-weight: 900; }

/* logo */
.logo { font-weight: 900; font-size: 64px; letter-spacing: -1px; color: var(--brand); text-shadow: 0 4px 0 #CFE0FF; line-height: 1; }
.logo span { color: var(--accent); text-shadow: 0 4px 0 #FFD6C9; }
.logo.small { font-size: 26px; text-shadow: none; }
.logo.small span { text-shadow: none; }

/* mascot */
.mascot { display: flex; align-items: center; gap: 12px; justify-content: center; }
.mascot-btn { padding: 0; flex: none; }
.bubu { animation: bob 3s ease-in-out infinite; overflow: visible; }
.bubu .bb-lids { transform-box: fill-box; transform-origin: center top; transform: scaleY(0); animation: blink 4.5s infinite; }
.bubu .bb-wl { transform-box: fill-box; transform-origin: right top; }
.bubu .bb-wr { transform-box: fill-box; transform-origin: left top; }
.bubu .bb-mouth { opacity: 0; }
.bubu.talking .bb-wl { animation: flapL .4s ease-in-out infinite; }
.bubu.talking .bb-wr { animation: flapR .4s ease-in-out infinite; }
.bubu.talking .bb-mouth { animation: talk .28s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(0) } 95% { transform: scaleY(1) } }
@keyframes flapL { 50% { transform: rotate(-16deg) } }
@keyframes flapR { 50% { transform: rotate(16deg) } }
@keyframes talk { 0%, 100% { opacity: 0 } 50% { opacity: 1 } }
.bubble { position: relative; background: #fff; border-radius: 22px; padding: 14px 18px; box-shadow: var(--shadow); font-size: 19px; max-width: 520px; line-height: 1.35; min-height: 24px; }
.bubble:empty { display: none; }
.bubble::before { content: ""; position: absolute; left: -10px; top: 50%; margin-top: -10px; border: 10px solid transparent; border-right-color: #fff; border-left: 0; }
.bubble.pop { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.85); opacity: .4 } 100% { transform: scale(1); opacity: 1 } }
.hero-mascot { flex-direction: column; }
.hero-mascot .bubble::before { left: 50%; top: -10px; margin: 0 0 0 -10px; border: 10px solid transparent; border-bottom-color: #fff; border-top: 0; }
.mascot.inline { justify-content: flex-start; }

/* welcome */
.welcome .hero { text-align: center; padding: 40px 0 10px; }
.tagline { font-size: 20px; color: var(--muted); margin: 10px 0 20px; }
.langs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 22px 0; }
.lang { padding: 10px 16px; border-radius: 14px; background: #fff; box-shadow: 0 3px 0 #CBD5E1; font-size: 16px; border: 2px solid transparent; display: inline-flex; gap: 8px; align-items: center; }
.lang.on { border-color: var(--brand); background: #EEF4FF; }
.langs.mini .lang { padding: 6px 10px; font-size: 13px; }
.langs.bottom { margin-top: 20px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 30px 0; }
.feat { background: #fff; border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.feat .emo { font-size: 40px; }
.feat b { display: block; font-size: 19px; margin: 8px 0 4px; }
.feat p { margin: 0; color: var(--muted); font-weight: 600; }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; align-items: stretch; }
.plan { background: #fff; border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); border-top: 8px solid var(--pc); display: flex; flex-direction: column; }
.plan.cur { outline: 3px solid var(--pc); }
.plan h3 { margin: 0; color: var(--pc); font-size: 24px; font-weight: 900; }
.plan .price { font-size: 32px; font-weight: 900; margin: 8px 0 2px; }
.plan .price small { font-size: 15px; color: var(--muted); }
.plan .save { color: var(--ok); font-size: 14px; }
.plan ul { list-style: none; padding: 0; margin: 14px 0; flex: 1; }
.plan li { padding: 6px 0; font-weight: 600; border-bottom: 1px dashed var(--line); }
.plan .btn { margin-top: auto; }
.foot { text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; margin: 30px auto 0; max-width: 720px; }
.foot.small { font-size: 12px; }

/* forms */
.center-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 0; }
.form-card, .kids-card { width: 100%; max-width: 520px; text-align: center; }
.form-card label { text-align: left; }
.kid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin: 16px 0; }
.kid { background: #F8FAFC; border-radius: 20px; padding: 16px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 4px 0 #E2E8F0; border: 2px solid var(--line); }
.kid .emo { font-size: 56px; }
.kid b { font-size: 19px; }
.kid small { color: var(--muted); }
.kid.add { border-style: dashed; }
.age-pick { display: flex; gap: 12px; justify-content: center; }
.age { flex: 1; max-width: 140px; padding: 14px 6px; border-radius: 18px; background: #F8FAFC; border: 3px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.age b { display: block; font-size: 28px; }
.age small { color: var(--muted); }
.age.on, .av.on { border-color: var(--brand); background: #EEF4FF; }
.avatar-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.av { padding: 8px 0; border-radius: 14px; background: #F8FAFC; border: 3px solid var(--line); }
.av .emo { font-size: 34px; }
.small-links { margin-top: 10px; }

/* top bar */
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 0; position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--bg) 70%, transparent); }
.kid-chip { display: flex; align-items: center; gap: 8px; background: #fff; padding: 6px 14px 6px 8px; border-radius: 999px; box-shadow: var(--shadow); font-size: 18px; }
.kid-chip .emo { font-size: 34px; }
.tb-mid { display: flex; gap: 8px; flex: 1; justify-content: center; }
.tb-right { display: flex; gap: 8px; }

/* home */
.home-hero { position: relative; padding: 6px 0 0; }
.companion { position: absolute; right: 8%; bottom: 0; font-size: 70px; animation: bob 2.4s ease-in-out infinite; }
.path { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; }
.gcard { position: relative; background: #fff; border-radius: var(--r); padding: 20px 12px 16px; box-shadow: 0 6px 0 color-mix(in srgb, var(--sc) 55%, #fff), 0 14px 30px rgba(30,41,59,.08); border: 3px solid color-mix(in srgb, var(--sc) 35%, #fff); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; transition: transform .15s; min-height: 170px; }
.gcard:hover { transform: translateY(-3px) rotate(-.5deg); }
.gcard:active { transform: translateY(3px); }
.gcard .gicon { font-size: 58px; filter: drop-shadow(0 4px 0 rgba(0,0,0,.08)); }
.gcard b { font-size: 17px; line-height: 1.2; }
.gcard small { color: var(--muted); font-size: 13px; }
.gcard .step { position: absolute; top: -12px; left: -8px; width: 38px; height: 38px; border-radius: 50%; background: var(--sc); color: #fff; display: grid; place-items: center; font-size: 19px; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.gcard.locked { opacity: .7; }
.gcard .lock, .story-card .lock { position: absolute; top: 8px; right: 8px; background: #1E293B; color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 999px; }
.sections { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.sec { position: relative; background: linear-gradient(160deg, color-mix(in srgb, var(--sc) 22%, #fff), #fff 70%); border-radius: var(--r); padding: 18px 10px; box-shadow: 0 6px 0 color-mix(in srgb, var(--sc) 45%, #fff); display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 140px; text-align: center; border: 3px solid color-mix(in srgb, var(--sc) 30%, #fff); transition: transform .15s; }
.sec:hover { transform: translateY(-3px); }
.sec .emo { font-size: 50px; }
.sec b { font-size: 15px; line-height: 1.2; }
.sec .medal { position: absolute; top: 6px; right: 8px; font-family: var(--emoji); font-size: 24px; }

/* section */
.sec-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 10px; }
.sec-head h1 { margin: 0; font-size: 32px; font-weight: 900; color: color-mix(in srgb, var(--sc) 80%, #000); }
.back { width: 52px; height: 52px; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 #CBD5E1; font-size: 26px; }
.lesson { margin-bottom: 10px; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.lgroup h3 { font-family: var(--emoji); font-weight: 400; font-size: 28px; margin: 18px 0 8px; }
.lcard { background: #fff; border-radius: 20px; padding: 14px 8px; box-shadow: 0 5px 0 color-mix(in srgb, var(--sc) 35%, #fff); display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px solid color-mix(in srgb, var(--sc) 25%, #fff); }
.lcard .lpic { min-height: 70px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.lcard .lpic .emo { font-size: 56px; }
.lcard .lpic .emo.small { font-size: 28px; }
.lcard b { font-size: 14px; overflow-wrap: anywhere; text-align: center; line-height: 1.2; }
.lcard.pulse { animation: pulse .45s; }
.lcard .letter { font-size: 40px; white-space: nowrap; }
@keyframes pulse { 40% { transform: scale(1.12) rotate(-3deg) } }
.letter { font-size: 52px; font-weight: 900; color: var(--accent); line-height: 1; }
.letter.huge { font-size: 130px; }
.letter.syl { font-size: 40px; }
.num { font-size: 54px; font-weight: 900; color: var(--brand); line-height: 1; }
.dots { font-size: 11px; color: var(--accent); letter-spacing: 2px; line-height: 1.1; text-align: center; }
.glist { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }

/* game screen */
.game-screen, .story-screen { min-height: 100vh; display: flex; flex-direction: column; }
.gbar { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.gtitle { font-size: 19px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dots { display: flex; gap: 6px; }
.gbar .dots i { width: 14px; height: 14px; border-radius: 50%; background: #E2E8F0; display: block; }
.gbar .dots i.done { background: var(--ok); }
.gbar .dots i.now { background: var(--sc, var(--brand)); transform: scale(1.3); }
.g-body { flex: 1; display: flex; flex-direction: column; }
.g-mascot { justify-content: flex-start; min-height: 100px; }
.g-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 10px 0 60px; }
.q-visual { min-height: 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: pop .35s; }
.q-visual:empty { display: none; }
.q-text { font-size: 22px; text-align: center; max-width: 720px; line-height: 1.4; }
.q-text:empty { display: none; }
.opts { display: grid; grid-template-columns: repeat(var(--cols), minmax(120px, 190px)); gap: 16px; justify-content: center; width: 100%; }
.opt { position: relative; background: #fff; border-radius: 24px; min-height: 140px; padding: 14px; box-shadow: 0 6px 0 #CBD5E1, 0 12px 24px rgba(30,41,59,.06); border: 3px solid #E2E8F0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; transition: transform .12s; font-size: 18px; animation: pop .35s backwards; }
.opt:nth-child(2) { animation-delay: .05s } .opt:nth-child(3) { animation-delay: .1s } .opt:nth-child(4) { animation-delay: .15s } .opt:nth-child(5) { animation-delay: .2s }
.opt:hover { transform: translateY(-3px); }
.opt:active { transform: translateY(3px); box-shadow: 0 2px 0 #CBD5E1; }
.opt.good, .basket.good { border-color: var(--ok); background: #F0FDF4; box-shadow: 0 6px 0 #86EFAC; animation: bounce .5s; }
.opt.bad { animation: shake .4s; border-color: #FCA5A5; }
.opt.dim { opacity: .5; }
.opt.hint { border-color: var(--sun); box-shadow: 0 0 0 6px #FEF08A, 0 6px 0 #CBD5E1; animation: glow 1s infinite; }
.opt .listen { position: absolute; top: 6px; right: 8px; font-family: var(--emoji); font-size: 20px; font-weight: 400; padding: 4px; }
.opt-text { font-size: 19px; }
.textopts .opt { min-height: 90px; }
.panels .opt { min-height: 170px; }
@keyframes bounce { 30% { transform: scale(1.12) } 60% { transform: scale(.96) } }
@keyframes shake { 20%, 60% { transform: translateX(-10px) } 40%, 80% { transform: translateX(10px) } }
@keyframes glow { 50% { box-shadow: 0 0 0 12px #FEF9C3, 0 6px 0 #CBD5E1 } }
.wiggle { animation: shake .4s; }
.spark { position: fixed; z-index: 50; pointer-events: none; font-family: var(--emoji); font-size: 26px; animation: spark .8s ease-out forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0 } }
.count-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 520px; background: #fff; padding: 16px; border-radius: 24px; box-shadow: var(--shadow); }
.count-grid .emo { font-size: 52px; }
.count-grid.small { padding: 10px; max-width: 220px; box-shadow: none; background: transparent; }
.count-grid.small .emo { font-size: 30px; }
.count-grid .gone { opacity: .25; filter: grayscale(1); transform: translateY(-10px); }
.seq { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; background: #fff; padding: 16px 20px; border-radius: 24px; box-shadow: var(--shadow); }
.seq .emo { font-size: 52px; }
.num.hole, .letter.hole, .qmark { color: var(--accent); font-size: 54px; font-weight: 900; animation: glowText 1.2s infinite; }
@keyframes glowText { 50% { transform: scale(1.15) } }
.math, .mix { display: flex; align-items: center; gap: 14px; background: #fff; padding: 14px 22px; border-radius: 24px; box-shadow: var(--shadow); flex-wrap: wrap; justify-content: center; }
.math b, .mix b { font-size: 46px; color: var(--muted); }
.word-row { display: flex; gap: 8px; margin-top: 10px; }
.word-row .letter { background: #fff; border-radius: 14px; padding: 8px 12px; box-shadow: var(--shadow); }
.hint-pic { opacity: .9; }
.mem-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; background: #fff; padding: 20px; border-radius: 24px; box-shadow: var(--shadow); min-height: 100px; align-items: center; }
.curtain { font-family: var(--emoji); font-size: 110px; animation: pop .4s; }
.day-chip { background: #fff; padding: 14px 26px; border-radius: 18px; box-shadow: var(--shadow); font-size: 28px; }
.towers .opt { justify-content: flex-end; }
.tower { display: flex; flex-direction: column-reverse; gap: 3px; }
.block { width: 54px; height: 22px; border-radius: 6px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.pos { position: relative; width: 140px; height: 120px; }
.pos .emo { position: absolute; }
.pos .box { font-size: 64px; left: 38px; top: 42px; }
.pos .ball { font-size: 36px; }
.pos-on .ball { left: 52px; top: 4px; }
.pos-under .box { top: 8px; } .pos-under .ball { left: 52px; top: 76px; }
.pos-next .box { left: 10px; } .pos-next .ball { left: 90px; top: 66px; }
.pos-in .ball.in { left: 54px; top: 46px; font-size: 30px; clip-path: inset(0 0 45% 0); }
.baby { position: relative; display: inline-block; }
.baby .emo.small { font-size: 46px; }
.baby i { position: absolute; right: -10px; bottom: -4px; font-style: normal; font-family: var(--emoji); font-size: 20px; }
.play-snd { font-family: var(--emoji); font-size: 34px; }

/* pairs */
.pairs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 90px; width: 100%; max-width: 560px; }
.pair-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.pair-lines line { stroke: var(--ok); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw .5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0 } }
.pcol { display: flex; flex-direction: column; gap: 14px; }
.pitem { min-height: 100px; }
.pitem.sel { border-color: var(--brand); box-shadow: 0 0 0 6px #DBEAFE, 0 6px 0 #CBD5E1; }
.pitem.ok { border-color: var(--ok); background: #F0FDF4; }

/* order slots */
.order-slots { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.order-slots .slot { width: 96px; height: 96px; border-radius: 20px; border: 3px dashed #CBD5E1; display: grid; place-items: center; background: #ffffffaa; }
.order-slots .slot.filled { border-style: solid; border-color: var(--ok); background: #F0FDF4; animation: bounce .4s; }
.order-slots .slot .emo.big { font-size: 56px; }
.order-slots .slot .num { font-size: 44px; }
.order-slots.word .slot { width: 80px; height: 90px; }
.opt.used { visibility: hidden; }
.opts.letters .opt { min-height: 100px; }

/* sort */
.sort { display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; }
.sort-item { min-height: 170px; display: grid; place-items: center; }
.sort-card { background: #fff; border-radius: 30px; padding: 20px 30px; box-shadow: var(--shadow); }
.sort-card.fly { animation: fly .6s forwards; }
@keyframes fly { to { transform: translateY(120px) scale(.3); opacity: 0 } }
.pop-in { animation: pop .4s; }
.baskets { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; width: 100%; max-width: 560px; }
.basket { min-height: 170px; }
.basket b { font-size: 19px; }
.basket.hint { border-color: var(--sun); box-shadow: 0 0 0 6px #FEF08A; }

/* memory */
.memory { display: grid; grid-template-columns: repeat(var(--cols), minmax(80px, 130px)); gap: 12px; }
.mcard { aspect-ratio: 1; perspective: 600px; padding: 0; }
.mc-in { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mcard.open .mc-in { transform: rotateY(180deg); }
.mc-front, .mc-back { position: absolute; inset: 0; border-radius: 20px; display: grid; place-items: center; backface-visibility: hidden; box-shadow: 0 5px 0 rgba(30,41,59,.15); }
.mc-front { background: linear-gradient(135deg, #8B5CF6, #4F8DFD); font-family: var(--emoji); font-size: 40px; font-weight: 400; }
.mc-back { background: #fff; transform: rotateY(180deg); border: 3px solid #E2E8F0; }
.mc-back .emo.big { font-size: 52px; }
.mcard.found .mc-back { border-color: var(--ok); background: #F0FDF4; }

/* puzzle */
.puzzle-wrap { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
.puzzle-ref { width: 110px; border-radius: 16px; box-shadow: var(--shadow); opacity: .9; }
.puzzle { display: grid; grid-template-columns: repeat(var(--c), 1fr); width: min(84vw, 60vh, 420px); aspect-ratio: 1; gap: 4px; background: #fff; padding: 4px; border-radius: 20px; box-shadow: var(--shadow); }
.ptile { border-radius: 10px; background-repeat: no-repeat; transition: transform .15s; }
.ptile.sel { outline: 5px solid var(--brand); transform: scale(.94); }
.puzzle.solved { gap: 0; }
.puzzle.solved .ptile { border-radius: 0; }

/* maze */
.maze { display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(88vw, 56vh, 460px); aspect-ratio: 1; background: #fff; border-radius: 16px; box-shadow: var(--shadow); border: 4px solid #334155; overflow: hidden; touch-action: none; }
.mcell { border: 0 solid #334155; display: grid; place-items: center; }
.mcell .emo { font-size: min(7vw, 40px); }
.maze[style*="--n:9"] .mcell .emo { font-size: min(5vw, 30px); }
.mcell .dot { width: 30%; height: 30%; border-radius: 50%; background: #C4B5FD; }
.mcell.me { background: #EEF4FF; }
.maze.shake { animation: shake .3s; }
.dpad { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dpad button { width: 64px; height: 64px; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 #CBD5E1; font-size: 30px; font-family: var(--emoji); font-weight: 400; margin: 0 4px; }

/* coloring / drawing */
.color-wrap, .draw-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.pages { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pg { width: 62px; height: 62px; border-radius: 14px; background: #fff; border: 3px solid var(--line); padding: 4px; }
.pg.on { border-color: var(--brand); }
.pg svg { width: 100%; height: 100%; }
.cpage { width: min(86vw, 54vh, 440px); background: #fff; border-radius: 24px; box-shadow: var(--shadow); }
.cpage g > * { cursor: pointer; transition: fill .2s; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 620px; }
.sw { width: 48px; height: 48px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--line), 0 3px 0 rgba(0,0,0,.1); }
.sw.on { box-shadow: 0 0 0 4px var(--ink); transform: scale(1.1); }
.sw.size, .sw.tool { background: #fff; font-size: 20px; }
.sw.tool { font-family: var(--emoji); font-weight: 400; }
.dcanvas { width: min(92vw, 80vh, 900px); aspect-ratio: 900/620; background: #fff; border-radius: 22px; box-shadow: var(--shadow); touch-action: none; }
.trace-wrap { position: relative; width: min(92vw, 700px); }
.tcanvas { width: 100%; aspect-ratio: 600/320; background: #fff; border-radius: 22px; box-shadow: var(--shadow); touch-action: none; }
.trace-wrap .again { position: absolute; top: 8px; right: 8px; font-size: 22px; }

/* bubbles */
.bubbles { position: relative; width: 100%; height: min(62vh, 520px); background: linear-gradient(#E0F2FE, #BAE6FD); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); touch-action: none; }
.bub-target { position: absolute; top: 10px; left: 10px; background: #fff; border-radius: 18px; padding: 6px; z-index: 2; box-shadow: var(--shadow); }
.bubbles .bub { position: absolute; bottom: -120px; border-radius: 50%; padding: 0; min-height: 0; max-width: none; box-shadow: inset -6px -8px 14px rgba(0,0,0,.12), 0 6px 14px rgba(0,0,0,.1); animation: rise linear forwards; }
.bubbles .bub.popped { animation: popped .3s forwards; }
@keyframes rise { to { transform: translateY(calc(-1 * min(62vh, 520px) - 160px)) } }
@keyframes popped { to { transform: scale(1.6); opacity: 0 } }

/* simon / piano */
.simon { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: min(80vw, 58vh, 380px); aspect-ratio: 1; }
.spad { border-radius: 30px; box-shadow: 0 8px 0 rgba(0,0,0,.2); opacity: .75; transition: transform .1s, opacity .1s, filter .1s; }
.spad.lit { opacity: 1; transform: scale(1.05); filter: brightness(1.35) drop-shadow(0 0 18px #fff); }
.piano { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; width: min(94vw, 760px); height: min(46vh, 320px); }
.pkey { border-radius: 0 0 18px 18px; box-shadow: 0 8px 0 rgba(0,0,0,.2); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 16px; transition: transform .08s; }
.pkey .emo { font-size: min(7vw, 40px); }
.pkey.lit { transform: translateY(6px); box-shadow: 0 2px 0 rgba(0,0,0,.2); filter: brightness(1.2); }
.listen-btn, .said { font-size: 20px; }

/* result */
.result { text-align: center; padding: 10px 0; }
.res-stars { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.rs { font-family: var(--emoji); font-size: 90px; filter: grayscale(1) opacity(.25); }
.rs.on { animation: starIn .6s backwards cubic-bezier(.2, 1.6, .5, 1); filter: none; }
@keyframes starIn { from { transform: scale(0) rotate(-90deg) } }
.news { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.new-card { background: #FFF7D1; border-radius: 20px; padding: 14px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 6px; animation: pop .5s; }
.new-card .emo { font-size: 50px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg) } }

/* rewards */
.lvl-card { text-align: center; }
.big-star { font-size: 44px; font-weight: 900; }
.bar { height: 16px; border-radius: 999px; background: #E2E8F0; overflow: hidden; margin: 10px auto; max-width: 420px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--accent)); border-radius: 999px; }
.bar.big { height: 22px; max-width: none; }
.friends, .badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.friend, .badge { background: #fff; border-radius: 20px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 3px solid transparent; }
.friend .emo, .badge .emo { font-size: 50px; }
.friend.on { border-color: var(--brand); }
.friend.locked, .badge:not(.on) { opacity: .5; }
.badge:not(.on) .emo { filter: grayscale(1); }
.medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.medal-row { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px 14px; border-radius: 16px; box-shadow: var(--shadow); }
.medal-row b { flex: 1; font-size: 14px; }
.medal-row .emo { font-size: 28px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gallery img { width: 100%; border-radius: 18px; box-shadow: var(--shadow); background: #fff; }
.rest .card { text-align: center; max-width: 560px; }
.rest-ideas { font-size: 50px; display: flex; gap: 16px; justify-content: center; margin: 16px; }

/* stories */
.story-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.story-card { position: relative; border-radius: var(--r); padding: 24px 14px; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; box-shadow: var(--shadow); text-align: center; }
.story-card .emo { font-size: 74px; }
.story-card b { font-size: 19px; }
.story-card small { opacity: .75; }
.story-card.locked { filter: saturate(.5); opacity: .8; }
.scene { position: relative; border-radius: 30px; min-height: min(46vh, 380px); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; box-shadow: var(--shadow); padding-bottom: 30px; }
.scene::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: rgba(255,255,255,.25); border-radius: 50% 50% 0 0 / 30% 30% 0 0; }
.scene.night::after { background: rgba(255,255,255,.08); }
.actors { position: relative; z-index: 1; display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.actor { font-size: clamp(60px, 12vw, 120px); animation: actor 2.6s ease-in-out infinite; }
@keyframes actor { 0%, 100% { transform: translateY(0) rotate(0) } 50% { transform: translateY(-10px) rotate(2deg) } }
.cloud, .twinkle { position: absolute; font-style: normal; font-family: var(--emoji); }
.cloud { font-size: 60px; opacity: .8; animation: drift 18s linear infinite; }
.cloud.c1 { top: 8%; left: -10%; } .cloud.c2 { top: 22%; left: -30%; animation-delay: -9s; font-size: 44px; }
@keyframes drift { to { transform: translateX(140vw) } }
.twinkle { color: #FEF08A; font-size: 22px; animation: tw 2s infinite; }
.twinkle.t1 { top: 12%; left: 15% } .twinkle.t2 { top: 25%; right: 20%; animation-delay: -.7s } .twinkle.t3 { top: 8%; right: 40%; animation-delay: -1.3s }
@keyframes tw { 50% { opacity: .2; transform: scale(.6) } }
.story-text { font-size: clamp(20px, 3vw, 26px); line-height: 1.5; background: #fff; border-radius: 24px; padding: 20px 24px; box-shadow: var(--shadow); margin: 18px 0; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0 } }
.modal { background: #fff; border-radius: 26px; padding: 26px; width: 100%; max-width: 420px; text-align: center; animation: pop .3s; }
.gate-q { font-size: 44px; font-weight: 900; margin: 10px 0; color: var(--brand); }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 40px); background: #1E293B; color: #fff; padding: 12px 22px; border-radius: 14px; opacity: 0; transition: .3s; z-index: 90; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* parent */
.parent { padding-bottom: 40px; }
.p-top { display: flex; align-items: center; gap: 14px; padding: 16px 0; flex-wrap: wrap; }
.p-top .langs { margin: 0; }
.p-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.p-tabs button { white-space: nowrap; padding: 10px 14px; border-radius: 12px; background: #fff; box-shadow: 0 3px 0 #E2E8F0; font-size: 15px; }
.p-tabs button.on { background: var(--brand); color: #fff; box-shadow: 0 3px 0 var(--brand-d); }
.kid-switch { display: flex; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.kid-switch button { padding: 8px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--line); }
.kid-switch button.on { border-color: var(--brand); background: #EEF4FF; }
.banner { background: #FFF7D1; border-radius: 16px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.stat { background: #fff; border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.stat small { color: var(--muted); display: block; font-size: 13px; }
.stat b { font-size: 26px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 .card { margin: 0; }
.chart { width: 100%; height: auto; max-height: 260px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: #EEF4FF; color: var(--brand-d); padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.skills { display: flex; flex-direction: column; gap: 10px; }
.skill { display: grid; grid-template-columns: 200px 1fr 50px; align-items: center; gap: 12px; font-size: 15px; }
.skill .bar { margin: 0; max-width: none; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 700; padding: 8px; border-bottom: 2px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl .input { margin: 0; padding: 6px 8px; font-size: 14px; }
.tbl.studio td:nth-child(2) { font-size: 16px; }
.nowrap { white-space: nowrap; }
.card h3 { margin: 0 0 12px; }
.settings .set { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.settings .set b { min-width: 200px; }
.settings .langs { margin: 0; justify-content: flex-start; }
.seg { display: inline-flex; background: #F1F5F9; border-radius: 14px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { padding: 8px 14px; border-radius: 10px; font-size: 15px; }
.seg button.on { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.08); color: var(--brand-d); }
.center-seg { display: flex; width: max-content; margin: 10px auto; }
.notice { background: #F8FAFC; border: 2px dashed var(--line); box-shadow: none; font-weight: 600; }
.locked-card { text-align: center; background: #F8FAFC; }
.kid-row { display: grid; grid-template-columns: 50px 1fr 160px auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kid-row .emo { font-size: 36px; }
.kid-row .input { margin: 0; }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.report .rep-head { display: flex; gap: 16px; align-items: center; }
.report .rep-head h2 { margin: 0; }
.tips li { margin: 8px 0; font-weight: 600; }
.week-plan { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.wp-day { background: #F8FAFC; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.wp-day b { text-transform: capitalize; }
.studio-top { display: flex; flex-direction: column; gap: 10px; }
.chk { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--ink); }
.guided { text-align: center; }
.guided .phrase { font-size: 30px; margin: 14px 0 18px; line-height: 1.4; }
.huge-btn { width: 92px; height: 92px; border-radius: 50%; font-size: 40px; padding: 0; }
.huge-btn.rec { color: var(--danger); }
.huge-btn.rec.on, .btn.small.on { background: var(--danger); color: #fff; animation: glow 1s infinite; }

/* responsive */
@media (max-width: 900px) {
  .sections { grid-template-columns: repeat(3, 1fr); }
  .path { grid-template-columns: repeat(2, 1fr); }
  .features, .pricing { grid-template-columns: 1fr 1fr; }
  .week-plan { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .logo { font-size: 48px; }
  .sections { grid-template-columns: repeat(2, 1fr); }
  .features, .pricing, .grid2, .prices { grid-template-columns: 1fr; }
  .opts { grid-template-columns: repeat(min(var(--cols), 2), minmax(120px, 1fr)); gap: 12px; }
  .opt { min-height: 120px; }
  .emo.big { font-size: 52px; }
  .emo.huge { font-size: 96px; }
  .tb-mid .chip.lvl { display: none; }
  .kid-chip b { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .icon-btn { width: 42px; height: 42px; font-size: 21px; }
  .topbar { gap: 6px; }
  .tb-right { gap: 5px; }
  .bubble { font-size: 17px; }
  .g-mascot .bubu { width: 64px; height: 70px; }
  .home-hero .bubu, .result .bubu { width: 110px; height: 121px; }
  .kid-chip .emo { font-size: 28px; }
  .kid-chip { padding: 4px 10px 4px 6px; font-size: 16px; }
  .h-title { font-size: 20px; }
  .sec-head h1 { font-size: 24px; }
  .pairs { gap: 40px; }
  .skill { grid-template-columns: 1fr 2fr 44px; }
  .kid-row { grid-template-columns: 40px 1fr; }
  .gtitle { font-size: 15px; }
  .story-text { padding: 14px 16px; }
  .lgrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .lcard .lpic .emo { font-size: 44px; }
  .letter { font-size: 42px; }
}
@media print {
  .sky-deco, .p-top, .p-tabs, .kid-switch, .banner, .noprint { display: none !important; }
  body { background: #fff; }
  .card, .stat { box-shadow: none; border: 1px solid #ddd; }
}

.beta-badge{display:inline-block;margin:6px auto 0;padding:6px 14px;border-radius:999px;background:#FFF3C4;color:#8A5A00;font-weight:800;font-size:15px}
