/* ===== Fonts: self-hosted (SIL Open Font License, see fonts/OFL-*.txt). Faster than Google Fonts,
   and no visitor data goes to Google (GDPR). Latin + Latin Extended cover en/fr/es/de; Chinese
   uses the system font. Variable fonts: one file per script covers all weights. ===== */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../fonts/fredoka-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../fonts/fredoka-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/nunito-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ===== IntelloKids theme (colours taken from Brainy) ===== */
:root {
  --brainy-cyan: #3ED8E8;
  --brainy-cyan-soft: #BDF3F8;
  --brainy-teal: #0E6E7E;
  --brainy-teal-dark: #08474F;
  --sunshine: #FFD21F;
  --sunshine-dark: #E0B100;
  --sky-mist: #EAFBFD;
  --cloud: #FFFFFF;
  --bubblegum: #F47C8A;
  --leaf: #5CCB6F;
  --grape: #A855F7;
  --ink: #1F3A44;
  --ink-soft: #557079;
  --radius: 22px;
  --shadow: 0 6px 0 rgba(14, 110, 126, .14), 0 12px 28px rgba(14, 110, 126, .12);
  --font-head: 'Fredoka', 'Baloo 2', 'Comic Sans MS', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.5;
  background: var(--sky-mist);
  background-image: radial-gradient(circle at 10% 0%, #fff 0, transparent 40%), radial-gradient(circle at 90% 20%, #d9f8fb 0, transparent 35%);
  min-height: 100vh;
}
h1, h2, h3 { font-family: var(--font-head); color: var(--brainy-teal); line-height: 1.15; margin: .2em 0 .4em; }
h1 { font-size: clamp(28px, 4.5vw, 44px); }
h2 { font-size: clamp(24px, 3.4vw, 34px); }
h3 { font-size: 22px; }
a { color: var(--brainy-teal); font-weight: 700; }
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.center { text-align: center; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.empty { text-align: center; color: var(--ink-soft); font-size: 18px; padding: 24px; }

/* ===== Buttons & inputs ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 12px 22px; font-family: var(--font-head); font-weight: 600; font-size: 18px;
  text-decoration: none; background: var(--cloud); color: var(--brainy-teal);
  box-shadow: 0 4px 0 rgba(14, 110, 126, .25); transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(14, 110, 126, .25); }
.btn.primary { background: var(--sunshine); color: var(--brainy-teal-dark); box-shadow: 0 4px 0 var(--sunshine-dark); }
.btn.ghost { background: rgba(255, 255, 255, .8); border: 2px solid var(--brainy-cyan); box-shadow: none; }
.btn.small { padding: 8px 16px; font-size: 15px; }
.btn.big { padding: 16px 30px; font-size: 21px; }
.btn.full { width: 100%; }
.input {
  width: 100%; font: inherit; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--brainy-cyan-soft);
  background: #fff; color: var(--ink); outline: none; margin-top: 6px;
}
.input:focus { border-color: var(--brainy-cyan); box-shadow: 0 0 0 4px rgba(62, 216, 232, .25); }
.input.big { font-size: 20px; padding: 14px 18px; }
label { display: block; font-weight: 700; margin-bottom: 14px; }
.form-error { color: #D2344A; font-weight: 700; min-height: 1.2em; margin: 4px 0 10px; }
.note { font-size: 13px; color: var(--ink-soft); text-align: center; background: var(--sky-mist); border-radius: 12px; padding: 8px; }
:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }

/* ===== Top bar ===== */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px clamp(16px, 4vw, 40px); background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--brainy-cyan-soft);
}
.topbar:empty { display: none; }
.brand img { height: 54px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
/* Every item in the top bar shares one height, shape and font so they line up. */
.nav > .btn, .nav > .nav-link, .nav > .kid-pill, .lang-select select {
  height: 42px; padding: 0 18px; margin: 0; border-radius: 999px; font-family: var(--font-head); font-size: 16px; font-weight: 600;
  display: inline-flex; align-items: center; box-shadow: none; line-height: 1;
}
.nav > .btn { border: 2px solid var(--brainy-cyan); background: #fff; color: var(--brainy-teal); }
.nav > .btn.primary { border-color: var(--sunshine); background: var(--sunshine); color: var(--brainy-teal-dark); }
.nav > .btn:hover { transform: none; background: var(--sky-mist); }
.nav > .btn.primary:hover { background: #FFDA45; }
.nav-link { text-decoration: none; color: var(--brainy-teal); border: 2px solid transparent; }
.nav-link:hover { background: var(--sky-mist); }
.lang-select { margin: 0; display: inline-flex; align-items: center; }
.lang-select select { border: 2px solid var(--brainy-cyan-soft); background: #fff; color: var(--brainy-teal); cursor: pointer; padding-right: 12px; }
.kid-pill { white-space: nowrap; background: var(--brainy-cyan-soft); color: var(--brainy-teal-dark); border-radius: 999px; padding: 6px 14px; font-family: var(--font-head); font-weight: 600; }

main { max-width: 1160px; margin: 0 auto; padding: 0 16px 60px; outline: none; }
.page { padding-top: 24px; }
.card { background: var(--cloud); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }

/* ===== Language screen ===== */
.lang-screen { min-height: 92vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 0; }
.lang-brainy { width: 170px; animation: bob 3s ease-in-out infinite; }
.lang-logo { width: min(360px, 80vw); height: auto; margin: -10px 0 4px; }
.lang-modal { text-align: center; }
.lang-modal .lang-logo { width: min(200px, 50vw); margin: 0; }
.lang-modal h2 { margin: 4px 0; }
.lang-modal .lang-grid { width: 100%; gap: 10px; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; width: min(640px, 100%); margin-top: 18px; }
.lang-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; border: 3px solid transparent; border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); padding: 22px 14px; font-family: var(--font-head); font-size: 22px; color: var(--brainy-teal);
  transition: transform .15s, border-color .15s;
}
.lang-btn:hover { transform: translateY(-4px) rotate(-1deg); border-color: var(--sunshine); }
/* Round, glossy flag badges */
.flag-badge { position: relative; flex: none; width: 74px; height: 74px; border-radius: 50%; overflow: hidden; display: block;
  border: 4px solid #fff; box-shadow: 0 0 0 3px var(--brainy-cyan-soft), 0 6px 0 rgba(14, 110, 126, .18); transition: transform .25s; }
.flag-badge svg { width: 100%; height: 100%; display: block; }
.flag-shine { position: absolute; left: 14%; top: 8%; width: 46%; height: 28%; border-radius: 50%; background: rgba(255, 255, 255, .55); transform: rotate(-18deg); filter: blur(1px); }
.lang-btn:hover .flag-badge, .lang-btn:focus-visible .flag-badge { transform: rotate(-10deg) scale(1.08); animation: wiggle .5s ease-in-out; }
@keyframes wiggle { 0%, 100% { transform: rotate(0) scale(1.08); } 30% { transform: rotate(-12deg) scale(1.1); } 60% { transform: rotate(8deg) scale(1.1); } }
.lang-modal .lang-btn { flex-direction: row; justify-content: flex-start; gap: 16px; padding: 10px 18px; }
.lang-modal .flag-badge { width: 52px; height: 52px; border-width: 3px; }
.lang-modal .lang-grid { grid-template-columns: 1fr 1fr; }
.lang-modal .lang-btn:last-child:nth-child(odd) { grid-column: 1 / -1; justify-content: center; }
/* Sign-up steps (account → payment → play) */
.steps { list-style: none; display: flex; justify-content: center; gap: 8px; padding: 0; margin: 8px 0 14px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); color: var(--ink-soft); padding: 6px 14px; border-radius: 999px; background: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .06); }
.steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brainy-cyan-soft); color: var(--brainy-teal-dark); font-size: 14px; }
.steps li.done span { background: var(--leaf); color: #fff; }
.steps li.current { color: var(--brainy-teal-dark); outline: 3px solid var(--sunshine); }
.steps li.current span { background: var(--sunshine); }
.demo-pay { background: #FFF4D6; border-radius: 14px; padding: 10px 14px; max-width: 560px; margin: 10px auto; font-size: 14px; }
.flip-rtl { display: inline-block; }
html[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
/* Chinese: Fredoka/Nunito have no Chinese letters, so use friendly system CJK fonts */
html[lang="zh"] body { font-family: var(--font-body), 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif; }
html[lang="zh"] h1, html[lang="zh"] h2, html[lang="zh"] h3, html[lang="zh"] .btn, html[lang="zh"] button, html[lang="zh"] .tile, html[lang="zh"] .bubble { font-family: var(--font-head), 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif; }

/* ===== Landing ===== */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; padding: 40px 0 20px; }
.hero-text p { font-size: 20px; color: var(--ink-soft); max-width: 36em; }
.hero-text h1 { font-size: clamp(34px, 5.5vw, 58px); }
.hero-art { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 340px;
  background: radial-gradient(ellipse at 50% 80%, #fff 0, #d6f7fa 55%, transparent 70%); }
.hero-brainy { width: 52%; z-index: 2; animation: bob 3s ease-in-out infinite; margin: 0 -6%; }
.hero-friend { width: 28%; }
.hero-friend.f1 { animation: bob 3.4s ease-in-out infinite .3s; }
.hero-friend.f2 { animation: bob 3.2s ease-in-out infinite .8s; }
.spark { position: absolute; font-size: 30px; animation: twinkle 2s ease-in-out infinite; }
.s1 { top: 6%; left: 10%; } .s2 { top: 0; right: 16%; animation-delay: .6s; } .s3 { top: 40%; right: 2%; animation-delay: 1.1s; }
.section { padding: 40px 0 10px; }
.section-title { text-align: center; margin-bottom: 26px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { text-align: center; transition: transform .2s; }
.feature:hover { transform: translateY(-4px); }
.feature-icon { font-size: 48px; width: 86px; height: 86px; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 50%; background: var(--sky-mist); }
.feature p, .age p { color: var(--ink-soft); margin: 0; }
.age-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.age { text-align: center; border-top: 10px solid var(--brainy-cyan); }
.age.c2 { border-color: var(--sunshine); } .age.c3 { border-color: var(--bubblegum); }
.age-icon { font-size: 52px; }
.meet { display: grid; grid-template-columns: 260px 1fr; gap: 30px; align-items: center; background: linear-gradient(135deg, var(--brainy-teal), #12899B); color: #fff; border-radius: 32px; padding: 30px; margin-top: 50px; }
.meet h2 { color: var(--sunshine); }
.meet p { font-size: 19px; }
.meet-art { animation: bob 3s ease-in-out infinite; }
.footer { text-align: center; padding: 50px 0 10px; }
.footer img { height: 70px; width: auto; }
.faq { max-width: 860px; margin-left: auto; margin-right: auto; }
.faq-item { margin-bottom: 12px; padding: 0; }
.faq-item summary { cursor: pointer; list-style: none; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-family: var(--font-head); font-size: 28px; color: var(--brainy-teal); line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-item summary h3 { margin: 0; font-size: 19px; }
.faq-item p { margin: 0; padding: 0 22px 18px; }
.seo-static { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
/* Load: visitors with JavaScript see a calm loading screen (not the raw SEO text flashing). */
.boot { display: none; }
.js .seo-static { display: none; }
.js .boot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; min-height: 80vh; animation: fade .3s .15s both; }
.boot img { width: min(260px, 60vw); height: auto; animation: bob 2.4s ease-in-out infinite; }
.boot-dots { display: flex; gap: 8px; }
.boot-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--brainy-cyan); animation: bootDot 1s ease-in-out infinite; }
.boot-dots i:nth-child(2) { animation-delay: .15s; background: var(--sunshine); }
.boot-dots i:nth-child(3) { animation-delay: .3s; background: var(--bubblegum); }
@keyframes bootDot { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-8px); opacity: 1; } }.footer p { margin: 4px; }

/* ===== Landing: the first visit explains the features (js/landing.js) ===== */
.lang-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; width: fit-content; max-width: 100%; margin: 14px auto 0; padding: 8px 14px; background: #fff; border-radius: 28px; box-shadow: 0 4px 0 rgba(14, 110, 126, .1); }
.lang-bar-title { font-family: var(--font-head); color: var(--brainy-teal); font-size: 17px; }
.lang-bar-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lang-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 5px; border: 2px solid var(--brainy-cyan-soft); border-radius: 999px; background: #fff; font-family: var(--font-head); font-size: 16px; color: var(--brainy-teal-dark); cursor: pointer; }
.lang-chip .flag-badge, .lang-menu .flag-badge { width: 32px; height: 32px; border-width: 2px; }
.lang-chip.on { border-color: var(--sunshine); background: #FFF8D6; }
.lang-chip:hover, .lang-chip:focus-visible { border-color: var(--brainy-cyan); }
.hero-points { list-style: none; padding: 0; margin: 4px 0 22px; display: grid; gap: 9px; text-align: start; }
.hero-points li { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.hp-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 2px solid var(--brainy-cyan-soft); font-size: 22px; line-height: 1; }
.trust { margin: 16px 0 0; font-family: var(--font-head); color: var(--brainy-teal); font-size: 17px; }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 40em; margin: -14px auto 26px; }
.how-steps { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how-step { position: relative; padding-top: 38px; text-align: center; }
.how-step p { color: var(--ink-soft); margin: 0; }
.how-num { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--sunshine); color: var(--brainy-teal-dark); font-family: var(--font-head); font-size: 23px; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.mini-games { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.mini-games li { background: var(--sky-mist); border-radius: 999px; padding: 4px 12px; font-size: 15px; font-weight: 700; color: var(--brainy-teal-dark); }
.more-link { font-family: var(--font-head); font-size: 18px; color: var(--brainy-teal); text-decoration: none; }
.more-link:hover, .more-link:focus-visible { text-decoration: underline; }
.subject-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.subject { display: flex; align-items: center; gap: 12px; padding: 16px 18px; text-decoration: none; font-family: var(--font-head); font-size: 19px; line-height: 1.2; color: var(--brainy-teal-dark); transition: transform .15s; }
.subject:hover, .subject:focus-visible { transform: translateY(-3px); }
.subject-icon { flex: none; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--sky-mist); font-size: 28px; }
.footer-explore { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; max-width: 780px; margin: 12px auto; }
.footer-explore a, .footer-langs a { color: var(--brainy-teal); }
@media (max-width: 860px) { .how-steps { grid-template-columns: 1fr; gap: 34px; } .subject-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 800px) { .hero-points { max-width: 30em; margin-left: auto; margin-right: auto; } .hero .trust { text-align: center; } }
@media (max-width: 600px) { .nav > .nav-games { display: none; } .hero-points li { font-size: 16px; } .subject-grid { grid-template-columns: 1fr; } .lang-bar { border-radius: 22px; } }

/* ===== Static SEO pages: /fr/, /games/, /ages/3-4/, /maths-games/ … (generated by infra/build-seo.ps1) ===== */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 4px; border: 2px solid var(--brainy-cyan-soft); border-radius: 999px; background: #fff; font-family: var(--font-head); font-size: 16px; color: var(--brainy-teal); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; display: grid; gap: 2px; min-width: 180px; padding: 8px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); }
.lang-menu-list a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; text-decoration: none; font-family: var(--font-head); color: var(--brainy-teal-dark); }
.lang-menu-list a:hover, .lang-menu-list a[aria-current] { background: var(--sky-mist); }
.crumbs { margin: 18px 0 8px; font-size: 15px; color: var(--ink-soft); }
.crumbs a { color: var(--brainy-teal); }
.seo-hero { display: grid; grid-template-columns: 1fr 210px; gap: 24px; align-items: center; }
.seo-hero h1 { font-size: clamp(30px, 4.6vw, 48px); }
.seo-hero .lead { font-size: 19px; color: var(--ink-soft); margin-top: 0; }
.seo-hero-art { width: 190px; justify-self: center; animation: bob 3s ease-in-out infinite; }
.seo-hero-art svg { width: 100%; height: auto; display: block; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 22px; }
.check-list li { position: relative; padding-left: 36px; font-weight: 700; }
.check-list li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--leaf); color: #fff; font-size: 14px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.game-card { display: flex; gap: 14px; align-items: flex-start; }
.game-card h3 { margin: 0 0 2px; font-size: 20px; }
.game-card p { margin: 0; color: var(--ink-soft); }
.game-card .game-ages { margin-bottom: 4px; font-family: var(--font-head); font-size: 14px; color: var(--brainy-teal); }
.game-icon { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--sky-mist); font-size: 30px; }
.cta-band { margin-top: 44px; padding: 30px 22px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--brainy-teal), #12899B); }
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 36em; margin: 0 auto 18px; }
@media (max-width: 700px) { .seo-hero { grid-template-columns: 1fr; text-align: center; } .seo-hero .row { justify-content: center; } .seo-hero-art { width: 140px; grid-row: 1; } }

/* ===== Auth ===== */
.auth { display: grid; place-items: center; padding-top: 40px; }
.auth-card { width: min(460px, 100%); }
.auth-card h1 { text-align: center; font-size: 30px; }
.auth-brainy { width: 110px; margin: -70px auto 0; }

/* ===== Parent dashboard ===== */
.sub-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; border-left: 8px solid var(--sunshine); }
.add-child { margin-bottom: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.add-child .form-error, .add-child .row { grid-column: 1 / -1; }
.add-child[hidden] { display: none; }
.children { display: grid; gap: 16px; }
.child-card { display: grid; grid-template-columns: 90px 1fr auto; gap: 18px; align-items: center; }
.child-avatar { width: 90px; height: 100px; display: grid; place-items: center; background: var(--sky-mist); border-radius: 18px; }
.child-avatar svg { max-height: 96px; }
.child-info h3 { margin: 0; }
.child-info p { margin: 2px 0; }
.child-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.bar { height: 14px; background: var(--brainy-cyan-soft); border-radius: 999px; overflow: hidden; min-width: 120px; flex: 1; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sunshine), #FFB703); border-radius: 999px; transition: width .6s; }

/* ===== Pricing ===== */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 340px)); gap: 24px; justify-content: center; margin: 26px 0; }
.plan { position: relative; text-align: center; }
.plan.featured { border: 4px solid var(--sunshine); }
.plan ul { list-style: none; padding: 0; text-align: left; margin: 16px 0 22px; }
.plan li { padding: 4px 0; }
.price { font-family: var(--font-head); font-size: 44px; color: var(--brainy-teal-dark); margin: 0; }
.price span { font-size: 18px; color: var(--ink-soft); }
.badge { display: inline-block; background: var(--bubblegum); color: #fff; font-family: var(--font-head); font-size: 14px; border-radius: 999px; padding: 4px 12px; }
.plan .badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); }

/* ===== Friend setup ===== */
.setup-intro { display: flex; align-items: center; gap: 16px; justify-content: center; flex-wrap: wrap; }
.setup-brainy { width: 130px; animation: bob 3s ease-in-out infinite; }
.bubble { position: relative; background: #fff; border-radius: 22px; padding: 14px 18px; box-shadow: var(--shadow); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.bubble.big { font-size: 20px; max-width: 520px; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: center; }
.setup-preview { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 320px; background: radial-gradient(ellipse at 50% 90%, #fff 0, var(--brainy-cyan-soft) 60%, transparent 72%); }
.setup-preview .friend { width: 220px; }
.preview-brainy { width: 130px; margin-left: -30px; }
.toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.toggle-btn { border: 3px solid var(--brainy-cyan-soft); background: #fff; border-radius: 18px; padding: 14px; font-family: var(--font-head); font-size: 20px; }
.toggle-btn.active { border-color: var(--brainy-cyan); background: var(--sky-mist); }
.label { font-weight: 700; margin: 4px 0; }
.skins { display: flex; gap: 12px; margin-bottom: 16px; }
.skin { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--brainy-cyan-soft); }
.skin.active { box-shadow: 0 0 0 4px var(--brainy-cyan); }

/* ===== Kid home ===== */
.scene { position: relative; height: 340px; border-radius: 32px; overflow: hidden; background: linear-gradient(#9BE7F0, #DDF8FB); box-shadow: var(--shadow); }
.scene-sky span { position: absolute; font-size: 54px; }
.cloud.c1 { top: 20px; left: -60px; animation: drift 26s linear infinite; }
.cloud.c2 { top: 70px; left: -60px; animation: drift 34s linear infinite 9s; font-size: 40px; }
.sun { top: 14px; right: 26px; animation: spin 20s linear infinite; }
.scene-ground { position: absolute; bottom: 0; left: 0; right: 0; height: 80px; background: linear-gradient(#7BD88A, #5CCB6F); border-radius: 50% 50% 0 0 / 30px 30px 0 0; }
.scene-chars { position: absolute; z-index: 2; bottom: 30px; left: 0; right: 0; display: flex; justify-content: center; align-items: flex-end; gap: 10px; }
.scene-friend, .scene-brainy { position: relative; display: flex; flex-direction: column; align-items: center; }
.scene-friend svg { width: 190px; animation: bob 3.2s ease-in-out infinite; }
.scene-brainy svg { width: 170px; animation: bob 3s ease-in-out infinite .4s; }
.name-tag { background: #fff; border-radius: 999px; padding: 2px 14px; font-family: var(--font-head); color: var(--brainy-teal); box-shadow: 0 3px 0 rgba(0, 0, 0, .08); margin-top: -6px; }
.kid-hello { text-align: center; margin: 20px auto; max-width: 560px; }
.kid-hello p { margin: 4px 0; font-size: 19px; }
.level-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; font-family: var(--font-head); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; padding: 22px 12px; border-radius: 26px;
  font-family: var(--font-head); font-size: 21px; color: #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .15); transition: transform .15s;
}
.tile:hover { transform: translateY(-4px) scale(1.02); }
.tile-icon { font-size: 52px; }
.t1 { background: var(--brainy-teal); } .t2 { background: #F59E0B; } .t3 { background: var(--bubblegum); } .t4 { background: var(--grape); } .t5 { background: var(--leaf); }

/* ===== Adventure map ===== */
.map {
  position: relative; width: 100%; border-radius: 32px; overflow: hidden; box-shadow: var(--shadow); margin-top: 10px;
  background: radial-gradient(circle at 30% 30%, #A7E8A0 0, transparent 40%), radial-gradient(circle at 75% 70%, #9EE2A9 0, transparent 40%), linear-gradient(135deg, #C8F2C2, #A9E6B4);
}
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-road { fill: none; stroke: #F5DEB3; stroke-width: 34; stroke-linecap: round; }
.map-road-dash { fill: none; stroke: #fff; stroke-width: 4; stroke-dasharray: 14 14; stroke-linecap: round; }
.map-deco { position: absolute; font-size: clamp(22px, 4vw, 40px); transform: translate(-50%, -50%); pointer-events: none; }
.map-node {
  position: absolute; transform: translate(-50%, -50%); width: clamp(54px, 7.5vw, 78px); height: clamp(54px, 7.5vw, 78px); border-radius: 50%;
  background: #fff; border: 5px solid var(--brainy-cyan); display: grid; place-items: center; text-decoration: none; box-shadow: 0 5px 0 rgba(0, 0, 0, .15);
  transition: transform .15s; z-index: 2;
}
.map-node:hover { transform: translate(-50%, -50%) scale(1.08); }
.map-node.done { border-color: var(--leaf); }
.map-node.current { border-color: var(--sunshine); animation: pulse 1.4s ease-in-out infinite; }
.map-node.locked { background: #E6EEF0; border-color: #B8C7CB; cursor: not-allowed; filter: grayscale(.6); }
.node-icon { font-size: clamp(22px, 3.4vw, 34px); }
.node-num { position: absolute; top: -10px; left: -6px; background: var(--brainy-teal); color: #fff; font-family: var(--font-head); font-size: 13px; border-radius: 999px; padding: 1px 8px; }
.node-stars { position: absolute; bottom: -16px; color: var(--sunshine-dark); font-size: 14px; letter-spacing: -1px; white-space: nowrap; text-shadow: 0 1px 0 #fff; }
.map-plane {
  position: absolute; z-index: 3; font-size: clamp(30px, 5vw, 50px); transform: translate(-30%, -110%); pointer-events: none;
  transition: left 1.6s cubic-bezier(.5, 0, .3, 1), top 1.6s cubic-bezier(.5, 0, .3, 1); filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .2));
}

/* ===== Game shell ===== */
.play .game-root { padding: 18px; min-height: 420px; }
.play-buddies { display: flex; justify-content: flex-end; margin-top: -60px; pointer-events: none; }
.play-buddies svg { width: 90px; }
.game-head { display: flex; align-items: center; gap: 12px; }
.game-brainy { width: 84px; flex: none; }
.game-head .bubble { flex: 1; font-size: clamp(19px, 2.6vw, 26px); font-family: var(--font-head); color: var(--brainy-teal-dark); justify-content: space-between; }
.icon-btn { border: 0; background: var(--sky-mist); border-radius: 50%; width: 46px; height: 46px; font-size: 22px; flex: none; }
.dots { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.dots span { width: 16px; height: 16px; border-radius: 50%; background: var(--brainy-cyan-soft); transition: background .3s, transform .3s; }
.dots span.done { background: var(--sunshine); transform: scale(1.15); }
.play-area { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; width: 100%; }
.choice {
  border: 4px solid var(--brainy-cyan-soft); background: #fff; border-radius: 24px; padding: 14px; min-width: 110px; min-height: 110px;
  display: grid; place-items: center; box-shadow: 0 5px 0 rgba(14, 110, 126, .18); transition: transform .12s, border-color .2s;
}
.choice:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--brainy-cyan); }
.choice:disabled { cursor: default; }
.choice.small { min-width: 64px; min-height: 64px; font-size: 28px; padding: 6px; }
.choice.right, .right { border-color: var(--leaf) !important; background: #E9F9EC; animation: pop .4s; }
.wrong { animation: shake .4s; border-color: #F87171 !important; }
.choices.shapes .choice { width: clamp(110px, 18vw, 150px); height: clamp(110px, 18vw, 150px); }
.shape-svg { width: 100%; height: 100%; }
.choices.balloons .choice { border: 0; box-shadow: none; background: transparent; min-height: 150px; }
.balloon-svg { width: 90px; animation: float 2.6s ease-in-out infinite; }
.choice:nth-child(2) .balloon-svg { animation-delay: .4s; } .choice:nth-child(3) .balloon-svg { animation-delay: .8s; } .choice:nth-child(4) .balloon-svg { animation-delay: 1.2s; }
.choice.popped .balloon-svg { animation: popout .35s forwards; }
.num { font-family: var(--font-head); font-size: 48px; color: var(--brainy-teal-dark); }
.choices.four .choice { min-width: 120px; }
.emoji-big { font-size: 58px; line-height: 1; }
.choices.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 140px)); }

/* sorter */
.sorter-holes, .sorter-pieces { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; width: 100%; }
.sorter-holes { background: #F2E3C6; border-radius: 24px; padding: 18px; box-shadow: inset 0 4px 0 rgba(0, 0, 0, .08); }
.hole { width: clamp(90px, 15vw, 130px); height: clamp(90px, 15vw, 130px); background: #E7D2AB; border-radius: 18px; padding: 8px; }
.hole.filled { background: #E9F9EC; }
.piece { width: clamp(90px, 15vw, 130px); height: clamp(90px, 15vw, 130px); border: 0; background: transparent; padding: 8px; touch-action: none; position: relative; z-index: 5; }
.piece.dragging { z-index: 50; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, .25)); transition: none; }
.piece.selected { outline: 4px dashed var(--sunshine); border-radius: 16px; }

/* counting */
.count-field { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 560px; }
.count-item { position: relative; font-size: 50px; border: 0; background: #fff; border-radius: 20px; width: 84px; height: 84px; box-shadow: 0 4px 0 rgba(0, 0, 0, .08); }
.count-item.counted { background: #FFF6CC; }
.count-item.counted::after { content: attr(data-n); position: absolute; top: -8px; right: -8px; background: var(--brainy-teal); color: #fff; font-family: var(--font-head); font-size: 18px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }

/* memory */
.memory-grid { display: grid; gap: 12px; width: min(560px, 100%); }
.memory-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.memory-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.mcard { aspect-ratio: 1; border: 0; background: transparent; padding: 0; perspective: 600px; }
.card-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mcard.flipped .card-inner { transform: rotateY(180deg); }
.card-back, .card-front { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-size: clamp(34px, 7vw, 54px); }
.card-back { background: linear-gradient(135deg, var(--brainy-cyan), var(--brainy-teal)); color: #fff; font-family: var(--font-head); box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.card-front { background: #fff; transform: rotateY(180deg); border: 4px solid var(--brainy-cyan-soft); }
.mcard.right .card-front { border-color: var(--leaf); background: #E9F9EC; }

/* pattern, sums, race */
.pattern-row, .sum-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; font-size: clamp(36px, 6vw, 56px); background: var(--sky-mist); border-radius: 22px; padding: 14px 18px; }
.pattern-q { display: grid; place-items: center; min-width: 1.3em; border: 4px dashed var(--brainy-cyan); border-radius: 16px; color: var(--brainy-teal); font-family: var(--font-head); }
.pattern-q.solved { border-style: solid; border-color: var(--leaf); animation: pop .4s; }
.sum-row { align-items: center; }
.sum-row .group { font-size: clamp(26px, 4vw, 40px); max-width: 260px; text-align: center; }
.sum-row .op { font-family: var(--font-head); color: var(--brainy-teal); }
.race-track { position: relative; height: 70px; margin: 0 0 12px; background: repeating-linear-gradient(90deg, #fff 0 20px, var(--sky-mist) 20px 40px); border-radius: 999px; box-shadow: inset 0 0 0 3px var(--brainy-cyan-soft); }
.race-plane { position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-size: 44px; transition: left .6s cubic-bezier(.3, 1.4, .5, 1); }
.race-flag { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 40px; }
.race-q { font-family: var(--font-head); font-size: clamp(40px, 7vw, 64px); color: var(--brainy-teal-dark); }

/* coding */
.code-board { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); width: min(380px, 100%); aspect-ratio: 1; background: #DFF7DF; border-radius: 18px; overflow: hidden; border: 4px solid var(--leaf); }
.cell { border: 1px solid rgba(92, 203, 111, .4); display: grid; place-items: center; font-size: clamp(22px, 6vw, 36px); min-height: 0; min-width: 0; overflow: hidden; line-height: 1; }
.code-bot { position: absolute; top: 0; left: 0; width: calc(100% / var(--n)); height: calc(100% / var(--n)); padding: 4px; transition: transform .35s ease; z-index: 2; }
.code-queue { display: flex; flex-wrap: wrap; gap: 4px; min-height: 48px; font-size: 30px; background: var(--sky-mist); border-radius: 14px; padding: 6px 12px; width: min(520px, 100%); justify-content: center; align-items: center; }
.code-controls { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; }
.code-pad { display: flex; gap: 8px; }
.code-actions { display: flex; gap: 10px; }

/* quiz */
.quiz-count { font-family: var(--font-head); color: var(--ink-soft); }
.quiz-visual { font-size: 54px; letter-spacing: 6px; background: var(--sky-mist); border-radius: 22px; padding: 10px 20px; }

/* ===== Modal & result ===== */
.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(8, 71, 79, .45); backdrop-filter: blur(3px); animation: fade .2s; }
.modal { background: #fff; border-radius: 30px; padding: 26px; width: min(520px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); animation: pop .35s; }
.modal h3 { text-align: center; }
.modal .row { justify-content: center; margin-top: 14px; }
.result { text-align: center; }
.result-chars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.result-chars div:first-child { width: 110px; } .result-chars div:last-child { width: 130px; }
.result-chars svg { animation: jump .8s ease-in-out infinite alternate; }
.result-stars { font-size: 56px; margin: 0; color: #DCE6E8; letter-spacing: 4px; }
.result-stars .on { color: var(--sunshine); text-shadow: 0 3px 0 var(--sunshine-dark); display: inline-block; animation: pop .5s backwards; }
.result-stars .on:nth-child(2) { animation-delay: .2s; } .result-stars .on:nth-child(3) { animation-delay: .4s; }
.level-up { background: #FFF6CC; border-radius: 14px; padding: 8px; font-weight: 800; }
.sticker-win span { font-size: 40px; vertical-align: middle; }

/* ===== Colouring ===== */
.tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 12px; }
.tab { border: 3px solid var(--brainy-cyan-soft); background: #fff; border-radius: 999px; padding: 8px 18px; font-family: var(--font-head); font-size: 18px; }
.tab.active, .chip.active { background: var(--brainy-cyan); border-color: var(--brainy-cyan); color: #fff; }
.pic-picker { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.chip { border: 2px solid var(--brainy-cyan-soft); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; }
.canvas-wrap { width: min(620px, 100%); margin: 0 auto; background: #fff; border-radius: 20px; border: 4px solid var(--brainy-cyan-soft); overflow: hidden; }
.colour-svg { display: block; width: 100%; height: auto; cursor: pointer; }
.colour-svg [data-r] { transition: fill .2s; }
.free-canvas { display: block; width: 100%; touch-action: none; cursor: crosshair; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 14px; }
.swatch { width: 42px; height: 42px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #cfe3e6; }
.swatch.active { box-shadow: 0 0 0 4px var(--ink); transform: scale(1.1); }
.brush-sizes { display: inline-flex; gap: 6px; margin: 0 6px; }
.brush { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #cfe3e6; background: #fff; display: grid; place-items: center; }
.brush i { background: var(--ink); border-radius: 50%; display: block; }
.brush.active { border-color: var(--ink); }
.colour-svg [data-r].just { animation: fillPop .35s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes fillPop { 0% { transform: scale(.94); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }

/* Colouring catalog */
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.cat-head h2 { margin: 0; }
.cat-head p { margin: 2px 0 0; }
.cat-bar { max-width: 280px; height: 14px; }
.cat-filters { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 12px; scrollbar-width: none; }
.cat-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 3px solid transparent; background: var(--sky-mist); border-radius: 999px;
  padding: 8px 18px 8px 10px; font-family: var(--font-head); font-size: 18px; color: var(--brainy-teal-dark); box-shadow: 0 4px 0 rgba(14, 110, 126, .12); transition: transform .15s; }
.cat-chip span { font-size: 26px; width: 40px; height: 40px; display: grid; place-items: center; background: #fff; border-radius: 50%; }
.cat-chip:hover { transform: translateY(-2px); }
.cat-chip.active { background: var(--sunshine); border-color: #fff; box-shadow: 0 0 0 3px var(--sunshine), 0 4px 0 rgba(0, 0, 0, .12); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.pic-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px 12px; border: 3px solid var(--brainy-cyan-soft);
  background: #fff; border-radius: 22px; box-shadow: 0 5px 0 rgba(14, 110, 126, .12); transition: transform .15s, border-color .15s; font-family: var(--font-head); color: var(--brainy-teal-dark); }
.pic-card:hover { transform: translateY(-4px) rotate(-1deg); border-color: var(--sunshine); }
.pic-card strong { font-size: 17px; font-weight: 600; }
.pic-thumb { width: 100%; aspect-ratio: 1; background: #fff; border-radius: 14px; }
.pic-card:not(.is-done) .pic-thumb { filter: grayscale(1); }
.pic-card.is-done { border-color: var(--leaf); background: #F4FCF5; }
.pic-badge { font-family: var(--font-body); font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--sky-mist); color: var(--ink-soft); }
.pic-badge.done { background: #E3F7E6; color: #2F7D3E; }
.pic-badge.wip { background: #FFF4D6; color: #8A5A00; }
.free-card { justify-content: center; background: linear-gradient(135deg, #FFE0EE, #E7D3FF, #D7F3FF); border-color: #fff; }
.free-art { font-size: 72px; line-height: 1.4; animation: bob 3s ease-in-out infinite; }
.studio-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-bottom: 10px; }
.studio-head h2 { margin: 0; text-align: center; }
.studio-prog { font-family: var(--font-head); background: var(--sky-mist); border-radius: 999px; padding: 6px 14px; color: var(--brainy-teal-dark); }
.studio-actions { margin-top: 14px; }
.studio-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }
.colour-done { text-align: center; }
.done-pic { width: min(260px, 70vw); margin: 0 auto; background: #fff; border-radius: 20px; border: 4px solid var(--sunshine); animation: stickerIn .8s cubic-bezier(.2, 1.6, .4, 1) both; }
.done-pic svg { display: block; width: 100%; }
@media (max-width: 600px) { .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .studio-head { grid-template-columns: auto 1fr; } .studio-right { grid-column: 1 / -1; justify-self: center; } }

/* ===== Videos & stickers ===== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.video { position: relative; border: 0; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.video-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16/10; border-radius: 16px; background: linear-gradient(135deg, var(--brainy-cyan-soft), #FFF2B3); font-size: 60px; }
.play-icon { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%; background: var(--sunshine); font-size: 18px; display: grid; place-items: center; color: var(--brainy-teal-dark); }
.video.soon .video-thumb { filter: saturate(.7); }
.video .badge { position: absolute; top: 20px; left: 20px; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; display: block; }
.video-thumb:has(img) { aspect-ratio: 16/9; overflow: hidden; }
.video .lang-badge { left: auto; right: 20px; font-size: 12px; }
/* ===== Sticker album ===== */
.stk { position: relative; display: block; width: 88px; aspect-ratio: 1; flex: none; }
.stk svg { width: 100%; height: 100%; display: block; overflow: visible; }
.stk.got svg { filter: drop-shadow(0 4px 0 rgba(14, 110, 126, .18)) drop-shadow(0 6px 10px rgba(0, 0, 0, .12)); }
.stk-emoji { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; line-height: 1; }
.stk.locked .stk-emoji { font-family: var(--font-head); color: #9FB3B8; font-size: 40px; font-weight: 700; }
.stk-emoji.sil { filter: brightness(0); opacity: .22; font-size: 46px; }
.stk-lock { position: absolute; right: -2px; bottom: -2px; font-size: 20px; }
.stk-sparkle { position: absolute; top: -6px; right: -4px; font-size: 22px; animation: twinkle 1.6s ease-in-out infinite; }
.stk.r2 svg { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 4px 0 rgba(14, 110, 126, .18)) drop-shadow(0 0 8px rgba(168, 85, 247, .35)); }
.stk.r3 svg { animation: epicGlow 2.4s ease-in-out infinite; }
.stk.big { width: 150px; margin: 0 auto; }
.stk.big .stk-emoji { font-size: 76px; }
.stk.huge { width: 190px; margin: 0 auto; animation: stickerIn .8s cubic-bezier(.2, 1.6, .4, 1) both; }
.stk.huge .stk-emoji { font-size: 98px; }
@keyframes twinkle { 0%, 100% { transform: scale(.8) rotate(0); opacity: .6; } 50% { transform: scale(1.2) rotate(20deg); opacity: 1; } }
@keyframes epicGlow { 0%, 100% { filter: drop-shadow(0 4px 0 rgba(14, 110, 126, .18)) drop-shadow(0 0 6px #FFD21F); } 50% { filter: drop-shadow(0 4px 0 rgba(14, 110, 126, .18)) drop-shadow(0 0 16px #FF8AD8); } }
@keyframes stickerIn { 0% { transform: scale(0) rotate(-200deg); } 100% { transform: scale(1) rotate(-6deg); } }

.album-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.album-head h2 { margin: 0 0 8px; }
.album-head .bar { max-width: 420px; height: 16px; }
.album-brainy { width: 110px; flex: none; animation: bob 3s ease-in-out infinite; }
.album-page { margin-bottom: 16px; background: linear-gradient(#fff, #FBFEFF); }
.album-page h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; }
.album-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border: 0; border-radius: 20px; background: var(--sky-mist); transition: transform .15s; }
.album-slot:hover { transform: translateY(-3px) rotate(-1.5deg); }
.album-slot.is-got { background: #FFFBEA; }
.album-slot.is-got .stk { transform: rotate(-6deg); }
.album-slot.is-new { box-shadow: 0 0 0 3px var(--sunshine); animation: pop .5s; }
.album-slot.wiggle .stk { animation: wiggle .5s ease-in-out; }
.slot-name { font-family: var(--font-head); font-size: 14px; color: var(--brainy-teal-dark); text-align: center; line-height: 1.15; }
.is-locked .slot-name { color: #9FB3B8; letter-spacing: 2px; }
.slot-prog { width: 70%; height: 6px; border-radius: 99px; background: #D5E9EC; overflow: hidden; }
.slot-prog i { display: block; height: 100%; background: var(--leaf); }
.new-tag { position: absolute; top: 6px; left: 6px; background: var(--bubblegum); color: #fff; font-family: var(--font-head); font-size: 12px; padding: 1px 8px; border-radius: 99px; transform: rotate(-8deg); }
.tile-count { font-size: 14px; background: rgba(255, 255, 255, .25); border-radius: 99px; padding: 0 10px; }

.stk-challenge { text-align: center; }
.stk-challenge h2 { margin: 6px 0 10px; }
.stk-challenge .bubble { justify-content: center; text-align: center; font-weight: 600; }
.stk-progress { display: flex; align-items: center; gap: 10px; margin: 14px auto 0; max-width: 320px; font-family: var(--font-head); }
.stk-rarity { display: inline-block; margin: 8px 0 0; padding: 2px 12px; border-radius: 99px; font-family: var(--font-head); font-size: 13px; }
.stk-rarity.r1 { background: #E3F7E6; color: #2F7D3E; }
.stk-rarity.r2 { background: #EDE3FF; color: #6B2BC4; }
.stk-rarity.r3 { background: linear-gradient(90deg, #FFE29A, #FFB8E6, #A9E4FF); color: #7A3E00; }

/* The reveal */
.reveal-back { background: radial-gradient(circle at 50% 40%, rgba(20, 30, 90, .75), rgba(5, 10, 40, .9)); }
.reveal-back .modal { background: transparent; box-shadow: none; overflow: visible; color: #fff; }
.stk-reveal { position: relative; text-align: center; min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stk-reveal .rays { position: absolute; left: 50%; top: 48%; width: 620px; height: 620px; margin: -310px 0 0 -310px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 210, 31, .28) 0 10deg, transparent 10deg 20deg); animation: spin 14s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); }
.reveal-title { position: relative; font-family: var(--font-head); font-size: clamp(28px, 6vw, 44px); color: var(--sunshine); text-shadow: 0 4px 0 rgba(0, 0, 0, .25); margin: 0 0 10px; animation: pop .6s; }
.gift { position: relative; font-size: 130px; background: none; border: 0; line-height: 1; animation: giftShake 1.2s ease-in-out infinite; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35)); }
.gift.open { animation: giftOpen .45s ease-in forwards; }
@keyframes giftShake { 0%, 60%, 100% { transform: rotate(0) scale(1); } 70% { transform: rotate(-10deg) scale(1.05); } 80% { transform: rotate(10deg) scale(1.05); } 90% { transform: rotate(-6deg); } }
@keyframes giftOpen { to { transform: scale(1.6); opacity: 0; } }
.tap-hint { position: relative; font-family: var(--font-head); font-size: 20px; animation: bob 1.6s ease-in-out infinite; }
.reveal-sticker { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.reveal-sticker[hidden] { display: none; }
.reveal-sticker h2 { color: #fff; font-size: clamp(26px, 5vw, 38px); margin: 4px 0; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.reveal-sticker .muted { color: #D6E6FF; }
.reveal-sticker .btn { margin-top: 12px; }
.confetti { position: absolute; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; }
.cf { position: absolute; width: 10px; height: 14px; border-radius: 3px; animation: confetti 1.6s cubic-bezier(.15, .7, .4, 1) forwards; }
.cf.emo { width: auto; height: auto; font-size: 22px; font-style: normal; }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) + 260px)) rotate(var(--r)); opacity: 0; } }
.gift-btn { display: block; margin: 10px auto; font-family: var(--font-head); font-size: 20px; color: var(--brainy-teal-dark); background: linear-gradient(90deg, #FFE29A, #FFB8E6); border: 0; border-radius: 999px; padding: 12px 22px; box-shadow: 0 5px 0 rgba(0, 0, 0, .12); animation: pulse 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .gift, .stk-reveal .rays, .stk.r3 svg, .stk-sparkle, .gift-btn { animation: none; } }

/* ===== Toast ===== */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 40px); opacity: 0; z-index: 200; background: var(--brainy-teal-dark); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 700; transition: all .3s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Animations ===== */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.7); opacity: .6; } }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes popout { to { transform: scale(1.6); opacity: 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 31, .7), 0 5px 0 rgba(0, 0, 0, .15); } 50% { box-shadow: 0 0 0 14px rgba(255, 210, 31, 0), 0 5px 0 rgba(0, 0, 0, .15); } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(1400px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes jump { to { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== Phones & tablets ===== */
/* ===== Adventure worlds (a new background every 10 levels) ===== */
.world-bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 10px; }
.world-name { display: flex; flex-direction: column; align-items: center; font-family: var(--font-head); color: var(--brainy-teal-dark); text-align: center; }
.world-name strong { font-size: clamp(20px, 3vw, 28px); }
.world-name span { color: var(--ink-soft); }
.world-arrow { min-width: 48px; justify-content: center; text-decoration: none; }
.world-arrow.disabled { opacity: .35; pointer-events: none; }
.world-dots { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.world-dot { display: flex; flex-direction: column; align-items: center; min-width: 56px; padding: 6px 6px 4px; border-radius: 16px; background: #fff; text-decoration: none;
  border: 3px solid transparent; font-size: 22px; line-height: 1.1; box-shadow: 0 3px 0 rgba(0, 0, 0, .08); color: var(--brainy-teal-dark); }
.world-dot small { font-size: 11px; font-family: var(--font-head); color: var(--ink-soft); }
.world-dot.active { border-color: var(--sunshine); transform: translateY(-2px); }
.world-dot.locked { opacity: .5; filter: grayscale(1); cursor: not-allowed; }
.map-node.boss { width: clamp(64px, 9vw, 92px); height: clamp(64px, 9vw, 92px); border-width: 6px; }
.map-node.boss::after { content: '👑'; position: absolute; top: -26px; right: -10px; font-size: 24px; }

.map.world-1 { background: radial-gradient(circle at 20% 25%, #fff 0, transparent 18%), radial-gradient(circle at 70% 60%, #fff 0, transparent 16%), linear-gradient(#7FD4F5, #D7F3FF); }
.map.world-2 { background: radial-gradient(circle at 30% 30%, #4FAE5A 0, transparent 35%), radial-gradient(circle at 80% 70%, #3F9A4C 0, transparent 35%), linear-gradient(135deg, #6CC46F, #2F7D3E); }
.map.world-3 { background: radial-gradient(circle at 75% 20%, #E9B8FF 0, transparent 25%), radial-gradient(circle at 20% 80%, #7C3AED 0, transparent 40%), linear-gradient(135deg, #A855F7, #4C1D95); }
.map.world-4 { background: radial-gradient(circle at 30% 20%, #8BE3F5 0, transparent 30%), radial-gradient(circle at 70% 85%, #0B5E8A 0, transparent 40%), linear-gradient(#2BB3E0, #0A4F7A); }
.map.world-5 { background: radial-gradient(circle at 25% 30%, #FFE3F1 0, transparent 25%), radial-gradient(circle at 80% 70%, #FFC2DE 0, transparent 30%), linear-gradient(135deg, #FFB3D4, #F98FC0); }
.map.world-6 { background: radial-gradient(circle at 80% 15%, #FFF1A8 0, transparent 22%), radial-gradient(ellipse at 30% 90%, #E2A84F 0, transparent 50%), linear-gradient(#F9DC8E, #E9B65C); }
.map.world-7 { background: radial-gradient(circle at 25% 25%, #fff 0, transparent 30%), radial-gradient(circle at 75% 75%, #EAF6FF 0, transparent 35%), linear-gradient(135deg, #D8EEFF, #A9D3F2); }
.map.world-8 { background: radial-gradient(circle at 80% 20%, #FFB067 0, transparent 25%), radial-gradient(circle at 25% 75%, #3E8E3B 0, transparent 40%), linear-gradient(135deg, #8CCB5E, #4E8A2E); }
.map.world-9 { background: radial-gradient(1.5px 1.5px at 20% 30%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 60% 15%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 80% 60%, #fff 50%, transparent 51%),
  radial-gradient(1.5px 1.5px at 35% 75%, #fff 50%, transparent 51%), radial-gradient(circle at 70% 70%, #3B2A8C 0, transparent 40%), linear-gradient(135deg, #1B1F5C, #0A0B24); }
.map.world-10 { background: linear-gradient(135deg, #FFB3B3, #FFE29A 20%, #B9F5A9 40%, #A9E4FF 60%, #CDB6FF 80%, #FFB8E6); }
.map.world-2 .map-road, .map.world-8 .map-road { stroke: #C99A62; }
.map.world-3 .map-road { stroke: #E7D3FF; }
.map.world-4 .map-road { stroke: #F3E2B5; }
.map.world-5 .map-road { stroke: #fff; } .map.world-5 .map-road-dash { stroke: #F47C8A; }
.map.world-6 .map-road { stroke: #B9773A; }
.map.world-7 .map-road { stroke: #fff; } .map.world-7 .map-road-dash { stroke: #9CC9EA; }
.map.world-9 .map-road { stroke: #5A4FCF; } .map.world-9 .map-road-dash { stroke: #FFD21F; }
.map.world-10 .map-road { stroke: #fff; } .map.world-10 .map-road-dash { stroke: #A855F7; }
.wt1 { background: #D7F3FF; } .wt2 { background: #CDEFCB; } .wt3 { background: #EBDDFF; } .wt4 { background: #CBEFFA; } .wt5 { background: #FFE0EE; }
.wt6 { background: #FBEBC4; } .wt7 { background: #EAF6FF; } .wt8 { background: #DDEFC9; } .wt9 { background: #D5D7F5; } .wt10 { background: #FFF0D6; }
.world-dot.locked { background: #EEF2F3; }

/* ===== Quiz extras ===== */
.emo-set { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; font-size: 30px; max-width: 170px; line-height: 1.15; }
.choices.sets .choice { padding: 12px; min-width: 150px; }
.quiz-shape { width: 120px; margin: 0 auto 8px; }

/* ===== Terms ===== */
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; margin: 6px 0; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--brainy-teal); }
.legal-card { max-width: 860px; margin: 0 auto; }
.legal-card h2, .legal-modal h2 { font-size: 22px; margin-top: 1.2em; }
.legal-card li, .legal-scroll li { margin: 4px 0; }
.legal-intro { font-size: 18px; }
.modal-back.wide .modal { width: min(820px, 100%); }
.legal-scroll { max-height: 55vh; overflow: auto; padding: 4px 14px; border: 2px solid var(--brainy-cyan-soft); border-radius: 16px; font-size: 15px; }
.legal-modal > h2 { margin-top: 0; text-align: center; }

/* ===== Child progress dashboard ===== */
.child-card.clickable { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.child-card.clickable:hover { transform: translateY(-2px); }
.see-progress { font-size: 15px; font-family: var(--font-body); font-weight: 700; color: var(--brainy-teal); background: var(--sky-mist); border-radius: 999px; padding: 2px 10px; margin-left: 6px; white-space: nowrap; }
.dashboard h2 { font-size: 22px; }
.dash-head { display: grid; grid-template-columns: 90px 1fr auto; gap: 18px; align-items: center; margin-bottom: 18px; }
.dash-head h1 { margin: 0; font-size: clamp(24px, 3.6vw, 34px); }
.dash-head p { margin: 2px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px; }
.stat-icon { font-size: 24px; }
.stat-value { font-family: var(--font-head); font-size: 30px; color: var(--brainy-teal-dark); line-height: 1.1; }
.stat-label { color: var(--ink-soft); font-size: 14px; }
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.dashboard > .card { margin-bottom: 18px; }
.week-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 190px; align-items: end; }
.wk-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; cursor: default; }
.wk-col:hover .wk-bar { filter: brightness(.9); }
.wk-bar { width: 70%; max-width: 34px; min-height: 2px; background: var(--brainy-teal); border-radius: 4px 4px 0 0; }
.wk-val { font-size: 13px; color: var(--ink); font-weight: 700; min-height: 18px; }
.wk-day { font-size: 13px; color: var(--ink-soft); }
.pill-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li { border-radius: 999px; padding: 6px 14px; background: var(--sky-mist); }
.pill-list.good li { background: #E9F9EC; }
.pill-list.practice li { background: #FFF4D6; }
.table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.dash-table th { text-align: left; font-size: 13px; color: var(--ink-soft); font-weight: 700; padding: 8px; border-bottom: 2px solid var(--brainy-cyan-soft); white-space: nowrap; }
.dash-table td { padding: 10px 8px; border-bottom: 1px solid #E3F3F5; white-space: nowrap; }
.dash-table td:last-child { color: var(--sunshine-dark); }
.acc { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.acc .bar { height: 10px; min-width: 70px; }
.acc .bar i { background: var(--brainy-teal); }
.mistake-list, .recent-list { list-style: none; padding: 0; margin: 0; }
.mistake-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #E3F3F5; }
.mistake-list b { white-space: nowrap; color: var(--brainy-teal-dark); }
.recent-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 8px 0; border-bottom: 1px solid #E3F3F5; }
.recent-list li > span:nth-child(2) { text-align: right; }
.recent-list li > span:nth-child(3) { grid-column: 1 / -1; font-size: 14px; color: var(--ink-soft); }

@media (max-width: 800px) {
  .dash-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .dash-head { grid-template-columns: 70px 1fr; }
  .dash-head .btn { grid-column: 1 / -1; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .world-dot { min-width: 48px; font-size: 18px; }
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 20px; }
  .hero-text .row { justify-content: center; }
  .hero-art { min-height: 240px; }
  .meet { grid-template-columns: 1fr; text-align: center; }
  .meet-art { width: 180px; margin: 0 auto; }
  .setup-grid { grid-template-columns: 1fr; }
  .setup-preview { min-height: 260px; }
  .setup-preview .friend { width: 170px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .brand img { height: 42px; }
  .topbar { flex-wrap: wrap; justify-content: center; }
  .nav { justify-content: center; }
  .nav-link { display: none; }
  .topbar.kid-mode { flex-wrap: nowrap; justify-content: space-between; }
  .topbar.kid-mode .lang-select { display: none; }
  .topbar.kid-mode .nav { flex-wrap: nowrap; }
  .child-card { grid-template-columns: 70px 1fr; }
  .child-avatar { width: 70px; height: 80px; }
  .child-actions { grid-column: 1 / -1; flex-direction: row; }
  .child-actions .btn { flex: 1; }
  .add-child { grid-template-columns: 1fr; }
  .scene { height: 280px; }
  .scene-friend svg { width: 140px; } .scene-brainy svg { width: 130px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .game-brainy { width: 60px; }
  .choice { min-width: 88px; min-height: 88px; }
  .choices.grid4 { grid-template-columns: repeat(2, minmax(0, 140px)); }
  .num { font-size: 38px; }
  .play-buddies { display: none; }
}

/* ===== Parent dashboard: summary, skills, timeline, achievements ===== */
.dash-summary .summary-text { font-size: 18px; line-height: 1.6; background: var(--sky-mist); border-radius: 16px; padding: 14px 18px; margin: 0 0 14px; }
.stat .delta { font-size: 12px; font-weight: 700; margin-top: 4px; }
.delta.up { color: #2F7D3E; } .delta.down { color: #B4232F; } .delta.flat { color: var(--ink-soft); }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.skill-card { border-radius: 18px; padding: 14px; background: #F7FBFC; border: 2px solid #E3F3F5; }
.skill-card p { margin: 6px 0 0; }
.skill-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.skill-top strong { flex: 1; font-family: var(--font-head); color: var(--brainy-teal-dark); }
.skill-icon { font-size: 22px; }
.skill-badge { font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: #E3F3F5; color: var(--ink-soft); white-space: nowrap; }
.st-strong { border-color: #BDE8C4; background: #F2FBF3; } .st-strong .skill-badge { background: #D4F2D9; color: #2F7D3E; } .st-strong .acc .bar i { background: var(--leaf); }
.st-good .skill-badge { background: #D7F3FF; color: #0E6E7E; }
.st-practice { border-color: #FFE3A3; background: #FFFAEB; } .st-practice .skill-badge { background: #FFEFC2; color: #8A5A00; } .st-practice .acc .bar i { background: #F59E0B; }
.trend.up { color: #2F7D3E; font-weight: 700; } .trend.down { color: #B4232F; font-weight: 700; }
.tips-title { font-size: 18px; margin-top: 14px; }
.tips { margin: 0; padding-left: 0; list-style: none; }
.tips li { background: #F2FBF3; border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; }
.timeline { max-height: 520px; overflow: auto; padding-right: 6px; }
.tl-day h3 { font-size: 16px; color: var(--ink-soft); margin: 10px 0 6px; position: sticky; top: 0; background: #fff; padding: 4px 0; }
.tl-day ul { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--brainy-cyan-soft); margin-left: 14px; }
.tl-day li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 6px 0 6px 0; margin-left: -17px; }
.tl-icon { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 2px solid var(--brainy-cyan-soft); display: grid; place-items: center; font-size: 16px; }
.tl-text { display: flex; flex-direction: column; }
.tl-text small { font-size: 13px; }
.ach-stickers { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.stk.mini { width: 54px; }
.stk.mini .stk-emoji { font-size: 26px; }
.stk.mini .stk-sparkle { font-size: 14px; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.art-item { margin: 0; text-align: center; background: #fff; border: 3px solid var(--sunshine); border-radius: 16px; padding: 6px; transform: rotate(-1.5deg); }
.art-item:nth-child(even) { transform: rotate(1.5deg); }
.art-item svg { width: 100%; aspect-ratio: 1; display: block; }
.art-item figcaption { font-family: var(--font-head); font-size: 13px; color: var(--brainy-teal-dark); }
/* Difficulty badge (game header and world bar) */
.diff-badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-head); font-size: 14px; padding: 4px 12px; border-radius: 999px; white-space: nowrap; box-shadow: 0 3px 0 rgba(0, 0, 0, .08); }
.diff-badge.d1 { background: #E3F7E6; color: #2F7D3E; }
.diff-badge.d2 { background: #FFF4D6; color: #8A5A00; }
.diff-badge.d3 { background: #FFE0EE; color: #A3214B; }
.world-name .diff-badge { font-size: 12px; padding: 2px 10px; vertical-align: middle; }
.footer-links a, .site-footer a { white-space: nowrap; }
.pay-legal { max-width: 620px; margin: 6px auto 0; line-height: 1.6; }
.legal-part { margin-top: 1.4em; }

/* ===== New adventure games ===== */
.maze { --n: 6; display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(440px, 100%); aspect-ratio: 1; margin: 6px auto 0; background: #F2FBF3; border: 4px solid #0E6E7E; border-radius: 16px; overflow: hidden; touch-action: manipulation; }
.mz { position: relative; border: 0 solid #0E6E7E; display: grid; place-items: center; cursor: pointer; }
.mz.n { border-top-width: 3px; } .mz.e { border-right-width: 3px; } .mz.s { border-bottom-width: 3px; } .mz.w { border-left-width: 3px; }
.mz.trail { background: #D7F3FF; }
.mz-goal { font-size: clamp(16px, 4vw, 30px); animation: pulse 1.4s ease-in-out infinite; border-radius: 50%; }
.mz-me { width: 86%; aspect-ratio: 1; display: grid; place-items: center; animation: pop .25s; }
.mz-me svg { width: 100%; height: 100%; }
.maze-pad { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; }
.maze-pad > div { display: flex; gap: 6px; }
.mz-btn { min-width: 64px; min-height: 56px; font-size: 26px; padding: 4px; }
.shadow-target { font-size: clamp(70px, 14vw, 110px); text-align: center; line-height: 1.2; margin-bottom: 8px; animation: bob 3s ease-in-out infinite; }
.shadow-emo { font-size: 56px; filter: brightness(0) opacity(.75); transition: filter .4s; display: inline-block; }
.shadow-emo.revealed { filter: none; }
.dots-board { position: relative; width: min(520px, 100%); aspect-ratio: 1.3; margin: 0 auto; background: #FFFDF5; border: 3px dashed #BDF3F8; border-radius: 20px; }
.dots-board svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dots-board line { stroke: #A855F7; stroke-width: 1.2; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-width: 5px; }
.dot { position: absolute; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; border: 3px solid #0E6E7E; background: #fff; font-family: var(--font-head); font-size: 18px; color: #08474F; box-shadow: 0 3px 0 rgba(0, 0, 0, .1); }
.dot.on { background: #FFD21F; border-color: #E0B100; }
.clock-wrap { display: flex; justify-content: center; margin-bottom: 10px; }
.clock-face { width: min(220px, 60vw); filter: drop-shadow(0 6px 0 rgba(14, 110, 126, .15)); }
.num.time { font-size: 34px; }
.puzzle-wrap { display: flex; gap: 16px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.puzzle { --n: 3; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; width: min(420px, 100%); aspect-ratio: 1; background: #BDF3F8; padding: 4px; border-radius: 16px; }
.pz { padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #fff; cursor: pointer; transition: transform .15s; }
.pz svg { width: 100%; height: 100%; display: block; }
.pz.sel { outline: 4px solid #FFD21F; transform: scale(.94); }
.puzzle.solved { gap: 0; }
.puzzle.solved .pz { border-radius: 0; }
.puzzle-preview { width: 110px; border: 3px solid #FFD21F; border-radius: 12px; overflow: hidden; background: #fff; }
.puzzle-preview svg { display: block; width: 100%; }
/* ===== The child's own character ===== */
.scene-me svg { width: 175px; animation: bob 3.4s ease-in-out infinite .2s; }
.preview-me { width: 150px; margin-right: -30px; }
.preview-meonly { display: flex; flex-direction: column; align-items: center; }
.preview-meonly .friend { width: 220px; }
.result-chars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.result-chars > div { width: 110px; }
.play-buddies { gap: 0; }
.play-buddies > div { width: 110px; }
.shirts .skin { border-radius: 14px; }
@media (max-width: 600px) { .scene-me svg { width: 120px; } .scene-friend svg { width: 120px; } .scene-brainy svg { width: 110px; } .result-chars > div { width: 84px; } }
.trial-note { margin: -4px 0 10px; font-size: 14px; font-weight: 700; color: #2F7D3E; background: #E3F7E6; border-radius: 999px; padding: 4px 12px; display: inline-block; }

/* Legal pages: trust summary box */
.legal-promise { background: linear-gradient(135deg, #EAFBFD, #F2FBF3); border: 2px solid #BDF3F8; border-radius: 18px; padding: 14px 20px; margin: 6px 0 18px; }
.legal-promise h2 { margin-top: 4px !important; font-size: 20px; }
.legal-promise ul { list-style: none; padding: 0; margin: 0; }
.legal-promise li { margin: 6px 0; }
.contact-email { font-family: var(--font-head); font-size: 24px; margin: 4px 0 8px; }

/* ===== Family progress (all children at a glance, next to the Parents' area) ===== */
.nav > .btn.is-active { background: var(--brainy-cyan-soft); border-color: var(--brainy-cyan); }
.family-head { align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.family-head h1 { margin-bottom: 2px; }
.family-head p { margin: 0; }
.family-totals { margin-top: 10px; }
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.fam-card { display: flex; flex-direction: column; gap: 12px; }
.fam-top { display: flex; gap: 14px; align-items: center; }
.fam-who h2 { margin: 0; font-size: 26px; }
.fam-who p { margin: 2px 0; }
.fam-adventure .row { margin-bottom: 4px; font-family: var(--font-head); color: var(--brainy-teal-dark); }
.fam-adventure .bar { height: 12px; }
.fam-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.fam-kpis div { background: var(--sky-mist); border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; }
.fam-kpis b { font-family: var(--font-head); font-size: 18px; color: var(--brainy-teal-dark); white-space: nowrap; }
.fam-kpis span { font-size: 11px; color: var(--ink-soft); line-height: 1.2; }
.fam-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 70px; align-items: end; }
.fw-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.fw-bar { width: 60%; max-width: 22px; background: var(--brainy-teal); border-radius: 4px 4px 0 0; }
.fw-bar[data-empty="1"] { background: #D5E9EC; }
.fw-day { font-size: 11px; color: var(--ink-soft); }
.fam-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fam-chips span { border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.chip-good { background: #E3F7E6; color: #2F7D3E; }
.chip-practice { background: #FFF4D6; color: #8A5A00; }
.chip-neutral { background: var(--sky-mist); color: var(--brainy-teal-dark); }
.fam-actions { margin-top: auto; }
.fam-actions .btn { flex: 1; justify-content: center; white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.empty-family { text-align: center; padding: 30px; }
.empty-family .empty-brainy { width: 130px; margin: 0 auto; }
@media (max-width: 600px) { .family-grid { grid-template-columns: 1fr; } .fam-kpis b { font-size: 16px; } }

/* ===== Free week (7 days, no card) ===== */
.trial-banner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: linear-gradient(90deg, #FFF4D6, #E3F7E6); color: var(--brainy-teal-dark); font-weight: 700; border-bottom: 2px solid #FFE3A3; }
.trial-banner .btn { padding: 4px 14px; }
.free-week-cta { text-align: center; background: linear-gradient(135deg, #FFF4D6, #E3F7E6); border-radius: 22px; padding: 16px; max-width: 640px; margin: 10px auto 4px; }
.free-week-cta p { margin: 0 0 10px; font-weight: 700; font-size: 18px; color: var(--brainy-teal-dark); }
.free-week-note { background: #FFF4D6; border-radius: 14px; padding: 10px 16px; max-width: 640px; margin: 8px auto; font-weight: 700; color: #8A5A00; }
.ask-grownup .ask-card { max-width: 560px; margin: 20px auto; text-align: center; padding: 26px; }
.ask-chars { display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.ask-chars svg { width: 150px; animation: bob 3s ease-in-out infinite; }
.ask-grownup h1 { margin: 10px 0 6px; }
.ask-grownup p { font-size: 18px; }

/* Payment opening soon (no provider connected yet) */
.pay-soon { text-align: center; }
.pay-soon-brainy { width: 120px; margin: 0 auto; }
.pay-soon-email { font-family: var(--font-head); font-size: 20px; }
