@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Nunito:wght@400;600;700&display=swap");

:root {
  --page: #ffffff;
  --surface: #f8fafc;
  --ink: #0b1220;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-tint: #eff6ff;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 12px 32px rgba(15,23,42,.08);
  --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 {
  font-family: "Baloo 2", "Nunito", sans-serif;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.section { padding: 96px 0; }
.band { background: var(--accent-tint); }
.eyebrow {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: .95rem;
  margin-bottom: 18px;
}
.band .eyebrow { background: #fff; }
.lead { font-size: 1.2rem; color: var(--text); max-width: 34em; }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 0; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 1.35rem; color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 700; }
.site-nav a:not(.btn):hover, .site-nav a.active:not(.btn) { color: var(--accent); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 44px; height: 44px; border: 0; background: var(--accent-tint); border-radius: 12px; cursor: pointer; color: var(--ink); }
.nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-user { font-weight: 800; color: var(--ink); }
.site-nav [hidden] { display: none !important; }
.account-wrap h1 { font-size: clamp(1.8rem, 5vw, 3rem); overflow-wrap: anywhere; }
.nav-auth { display: flex; align-items: center; gap: 18px; }
.nav-auth a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 700; }
@media (max-width: 860px) { .nav-auth { flex-direction: column; align-items: stretch; gap: 4px; } .nav-auth a:not(.btn) { padding: 12px 4px; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  background: var(--accent); color: #fff;
  border: 2px solid var(--accent); border-radius: 999px;
  font: 700 1rem/1 "Nunito", sans-serif; text-decoration: none; cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,99,235,.28); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn[data-magnetic] { transition: background .2s, box-shadow .2s; }
.btn[data-magnetic]:hover { transform: none; }
.btn-ghost { background: #fff; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-tint); color: var(--accent-hover); box-shadow: none; }
.btn-small { min-height: 42px; padding: 0 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* forms */
input, select, textarea {
  font: inherit; color: var(--ink); width: 100%;
  padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field { margin-bottom: 18px; }

/* hero */
.hero { padding: 64px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-art { background: var(--accent-tint); border-radius: 48px; padding: 28px; transform: rotate(2deg); box-shadow: var(--shadow); }
.hero-art img { transform: rotate(-2deg); margin: auto; width: 100%; max-width: 480px; }
.hero-note { margin-top: 22px; color: var(--muted); font-size: .95rem; }

/* topic grid */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 40px; }
.topic { display: block; text-decoration: none; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s; }
.topic:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.topic .glyph { width: 64px; height: 64px; border-radius: 18px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 1.7rem; }
.topic h3 { margin-bottom: .2em; }
.topic p { margin: 0; font-size: 1rem; color: var(--muted); }

/* steps */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; display: flex; gap: 18px; margin-bottom: 22px; }
.steps li::before { content: counter(s); flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 800 1.2rem "Baloo 2", sans-serif; }
.steps strong { display: block; color: var(--ink); font-family: "Baloo 2", sans-serif; font-size: 1.2rem; }

/* sample peek */
.peek { background: #fff; border-radius: 32px; box-shadow: var(--shadow); padding: 28px; border: 2px solid var(--line); }
.peek-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { background: var(--accent-tint); border-radius: 18px; padding: 14px 8px; text-align: center; }
button.tile { font: inherit; width: 100%; cursor: pointer; border: 3px solid #93c5fd; background: #fff; box-shadow: 0 4px 0 #93c5fd; transition: transform .12s, box-shadow .12s; }
button.tile:hover { transform: translateY(-2px); }
button.tile:active, button.tile.playing { transform: translateY(3px); box-shadow: 0 1px 0 #93c5fd; }
.tile b { display: block; font: 800 2.2rem/1 "Baloo 2", sans-serif; color: var(--accent); }
.tile span { font-size: .9rem; color: var(--text); font-weight: 600; }

/* pricing */
.price-card { max-width: 520px; margin: 40px auto 0; background: #fff; border: 3px solid var(--accent); border-radius: 32px; padding: 40px; text-align: center; box-shadow: var(--shadow); }
.price { font: 800 4.5rem/1 "Baloo 2", sans-serif; color: var(--ink); }
.price small { font-size: 1.2rem; color: var(--muted); font-weight: 600; }
.ticks { list-style: none; padding: 0; margin: 24px 0; text-align: left; }
.ticks li { padding: 8px 0 8px 36px; position: relative; font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/70% no-repeat; }

/* lessons page */
.page-head { padding: 56px 0 24px; }
.cat-block { margin-bottom: 56px; }
.cat-block > h2 { display: flex; align-items: center; gap: 14px; }
.cat-block > h2 .glyph { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; font-size: 1.5rem; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.lesson-card { position: relative; display: block; text-decoration: none; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s; }
.lesson-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.lesson-card h3 { margin-bottom: .25em; }
.lesson-card p { margin: 0 0 14px; font-size: 1rem; color: var(--muted); }
.badge { display: inline-block; font-weight: 800; font-size: .85rem; padding: 4px 14px; border-radius: 999px; background: var(--accent); color: #fff; }
.badge.locked { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.lesson-card.is-locked { background: var(--surface); }

/* lesson detail */
.lesson-wrap { max-width: 860px; padding: 48px 20px 96px; width: 100%; }
.crumb { display: inline-block; margin-bottom: 18px; font-weight: 700; text-decoration: none; }
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 32px 0; }
.item-card { background: var(--accent-tint); border-radius: var(--radius); padding: 22px; text-align: center; border: 2px solid transparent; transition: transform .15s, border-color .15s; }
.item-card:hover { transform: scale(1.03); border-color: var(--accent); }
.item-card b { display: block; font: 800 3.4rem/1 "Baloo 2", sans-serif; color: var(--accent); word-break: break-word; }
.item-card.long b { font-size: 2.1rem; }
.item-card span { display: block; margin-top: 8px; font-weight: 700; color: var(--ink); }
.lock-box { background: var(--accent-tint); border-radius: 28px; padding: 40px; text-align: center; margin-top: 32px; }
.lock-box img { width: 140px; margin: 0 auto 12px; }

/* auth */
.auth-wrap { min-height: 70vh; display: grid; place-items: center; padding: 48px 0; }
.auth-card { width: min(440px, 100% - 40px); background: #fff; border: 2px solid var(--line); border-radius: 28px; padding: 36px; box-shadow: var(--shadow); }
.auth-card img { width: 90px; margin: 0 auto 8px; }
.auth-card h1 { font-size: 2rem; text-align: center; }
.auth-card .btn { width: 100%; }
.form-error { color: #b91c1c; font-weight: 700; min-height: 1.4em; margin: 0 0 12px; }
.auth-alt { text-align: center; margin: 18px 0 0; font-size: 1rem; }
altcha-widget { display: block; margin: 0 0 16px; color-scheme: light; --altcha-color-base: #fff; --altcha-color-base-content: #0b1220; --altcha-border-color: #e2e8f0; --altcha-border-radius: 14px; --altcha-max-width: 100%; }

/* cartoon background on every page */
body {
  background-color: #dbeafe;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='%23ffffff'%3E%3Cpath d='M40 120a26 26 0 0 1 8-50 34 34 0 0 1 64-6 28 28 0 0 1 16 56z'/%3E%3Cpath d='M260 330a22 22 0 0 1 6-42 30 30 0 0 1 56-4 24 24 0 0 1 14 46z'/%3E%3C/g%3E%3Cg fill='%2393c5fd'%3E%3Ccircle cx='220' cy='70' r='9'/%3E%3Ccircle cx='350' cy='190' r='6'/%3E%3Ccircle cx='90' cy='300' r='8'/%3E%3Ccircle cx='170' cy='390' r='5'/%3E%3C/g%3E%3Cg fill='none' stroke='%2360a5fa' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M330 60l6 14 15 2-11 10 3 15-13-8-13 8 3-15-11-10 15-2z'/%3E%3Cpath d='M130 200l5 11 12 2-9 8 2 12-10-6-10 6 2-12-9-8 12-2z'/%3E%3Cpath d='M20 250q10-14 20 0t20 0'/%3E%3Cpath d='M360 380q10-14 20 0t20 0'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #bfdbfe 0, #dbeafe 380px, #eff6ff 100%);
  background-size: 420px 420px, 100% 100%;
  background-attachment: fixed, scroll;
}
.band { background: rgba(255,255,255,.55); backdrop-filter: blur(2px); }
.hero-art, .peek, .price-card, .topic, .lesson-card, .auth-card, .lock-box { border-color: #93c5fd; }
.page-head .wrap, .lesson-wrap > .crumb { text-shadow: 0 1px 0 rgba(255,255,255,.7); }
button.item-card { font: inherit; width: 100%; cursor: pointer; position: relative; border: 3px solid #93c5fd; background: #fff; box-shadow: 0 5px 0 #93c5fd; transition: transform .12s, box-shadow .12s; }
button.item-card:hover { transform: translateY(-3px); box-shadow: 0 8px 0 #93c5fd; }
button.item-card:active, button.item-card.playing { transform: translateY(3px) scale(.98); box-shadow: 0 1px 0 #93c5fd; border-color: var(--accent); }
.ear { position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9z'/%3E%3Cpath d='M16 9a4 4 0 0 1 0 6'/%3E%3C/svg%3E") center/70% no-repeat; border-radius: 50%; }
.item-pic { width: 100px; height: 100px; margin: 0 auto 6px; object-fit: contain; }
.tap-hint { font-weight: 700; color: var(--accent); margin: 0; }
.lesson-wrap { background: rgba(255,255,255,.7); border-radius: 32px; margin-top: 24px; margin-bottom: 48px; padding-top: 32px; padding-bottom: 48px; }

/* account */
.account-wrap { padding: 48px 20px 80px; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 24px; }
.acct-card { background: #fff; border: 2px solid #93c5fd; border-radius: 28px; padding: 28px; box-shadow: var(--shadow); }
.acct-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; }
.acct-list dt { font-weight: 800; color: var(--ink); }
.acct-list dd { margin: 0; word-break: break-word; }
.plan-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plan { position: relative; text-align: center; border: 2px solid var(--line); border-radius: 20px; padding: 22px 12px; }
.plan.best { border-color: var(--accent); background: var(--accent-tint); }
.plan b { display: block; font: 800 2.6rem/1 "Baloo 2", sans-serif; color: var(--ink); }
.plan span { display: block; font-weight: 700; }
.plan small { color: var(--muted); }
.plan em { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-style: normal; font-weight: 800; font-size: .8rem; padding: 2px 12px; border-radius: 999px; white-space: nowrap; }
.plan-note { margin: 18px 0 0; font-size: .95rem; color: var(--muted); }
.yearly-deal { margin: 0 0 18px; padding: 12px 16px; background: var(--accent-tint); border-radius: 16px; font-weight: 700; color: var(--ink); }

.lesson-pic { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; margin-bottom: 14px; border: 2px solid #bfdbfe; }
.lesson-hero-pic { width: 160px; height: 160px; border-radius: 28px; border: 3px solid #93c5fd; margin: 4px 0 16px; box-shadow: var(--shadow); }

/* homepage: sunny school scene */
.sky-hero { background: linear-gradient(180deg, #7dd3fc 0%, #bae6fd 55%, #dcfce7 100%); padding: 40px 0 150px; position: relative; overflow: hidden; }
.sky-hero::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -60px; height: 150px; background: #86efac; border-radius: 50% 50% 0 0; }
.sky-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: center; position: relative; z-index: 1; }
.sky-mascot img { width: 100%; max-width: 430px; margin: 0 auto; filter: drop-shadow(0 14px 18px rgba(11,18,32,.25)); }
.sky-copy { position: relative; text-align: center; }
.sky-copy h1 { color: #1e3a8a; font-size: clamp(2.2rem, 5.4vw, 4rem); text-shadow: 0 3px 0 #fff; }
.sky-tag { font: 800 clamp(1.5rem, 3vw, 2.2rem)/1.1 "Baloo 2", sans-serif; color: #1e3a8a; margin-bottom: 12px; }
.sky-lead { font-weight: 700; color: #1e293b; max-width: 30em; margin: 0 auto 22px; }
.age-badge { position: absolute; top: -10px; right: 0; width: 92px; height: 92px; border-radius: 50%; background: #fde047; color: #1e3a8a; display: grid; place-content: center; text-align: center; font: 800 1rem/1 "Baloo 2", sans-serif; transform: rotate(8deg); box-shadow: 0 6px 0 #facc15; }
.age-badge b { font-size: 1.6rem; }
.btn-sun { background: #fbbf24; border-color: #f59e0b; color: #1e3a8a; font-size: 1.25rem; min-height: 60px; padding: 0 36px; gap: 10px; box-shadow: 0 6px 0 #d97706; }
.btn-sun:hover { background: #fcd34d; border-color: #f59e0b; box-shadow: 0 6px 0 #d97706; }
.btn-grape { background: #7c3aed; border-color: #7c3aed; }
.btn-grape:hover { background: #6d28d9; border-color: #6d28d9; box-shadow: 0 8px 20px rgba(124,58,237,.3); }
.subject-wrap { margin-top: -100px; position: relative; z-index: 2; }
.subject-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.subj { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 170px; padding: 16px; border-radius: 24px; color: #fff; text-decoration: none; box-shadow: 0 8px 0 rgba(11,18,32,.18), var(--shadow); transition: transform .2s; }
.subj:hover { transform: translateY(-6px); color: #fff; }
.subj-glyph { font: 800 2.6rem/1 "Baloo 2", sans-serif; text-shadow: 0 3px 0 rgba(11,18,32,.25); margin-bottom: auto; }
.subj-name { font: 800 1.2rem/1.1 "Baloo 2", sans-serif; padding-right: 36px; }
.subj-go { position: absolute; right: 14px; bottom: 14px; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: #0b1220; display: grid; place-items: center; font-weight: 800; }
.s-red { background: linear-gradient(160deg, #dc2626, #b91c1c); }
.s-green { background: linear-gradient(160deg, #16a34a, #15803d); }
.s-purple { background: linear-gradient(160deg, #7c3aed, #5b21b6); }
.s-orange { background: linear-gradient(160deg, #c2410c, #9a3412); }
.s-teal { background: linear-gradient(160deg, #0f766e, #115e59); }
.s-blue { background: linear-gradient(160deg, #2563eb, #1d4ed8); }
.info-wrap { margin-top: 28px; }
.info-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.info-card { background: rgba(255,255,255,.92); border: 3px solid #93c5fd; border-radius: 28px; padding: 24px; box-shadow: var(--shadow); }
.info-card h2 { font-size: 1.7rem; color: #4c1d95; }
.info-card p { font-weight: 600; }
.peek-tiles.mini .tile b { font-size: 1.8rem; }
.bright-band { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 40px; background: #1e3a8a; color: #fff; padding: 16px 20px; }
.bright-band p { margin: 0; font: 800 clamp(1.2rem, 3vw, 2rem)/1.1 "Baloo 2", sans-serif; text-align: center; }
.bright-band img { width: 56px; height: 56px; flex: none; }
@media (max-width: 960px) {
  .subject-row { grid-template-columns: repeat(3, 1fr); }
  .info-row { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sky-grid { grid-template-columns: 1fr; }
  .sky-mascot img { max-width: 260px; }
  .age-badge { width: 72px; height: 72px; top: -250px; right: 8px; font-size: .85rem; }
  .age-badge b { font-size: 1.2rem; }
  .sky-hero { padding-bottom: 130px; }
}
@media (max-width: 520px) {
  .subject-row { grid-template-columns: repeat(2, 1fr); }
  .bright-band img { display: none; }
}

/* quiz */
.quiz-box { margin-top: 40px; background: #fff; border: 3px solid #93c5fd; border-radius: 28px; padding: 28px; text-align: center; box-shadow: var(--shadow); }
.kh-banner { margin-bottom: 14px; font-weight: 700; font-size: 1rem; }
.kh-banner select { width: auto; display: inline-block; margin-left: 8px; }
.kh-banner label { display: inline; }
.quiz-count { font-weight: 800; color: var(--muted); margin: 0 0 6px; }
.quiz-q { font: 800 clamp(1.5rem, 4vw, 2.2rem)/1.2 "Baloo 2", sans-serif; color: var(--ink); margin: 0 0 18px; }
.quiz-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.quiz-opt { font: 800 1.5rem/1.1 "Baloo 2", sans-serif; min-height: 64px; padding: 10px; border-radius: 18px; border: 3px solid #93c5fd; background: #fff; box-shadow: 0 4px 0 #93c5fd; color: var(--ink); cursor: pointer; }
.quiz-opt:hover { background: var(--accent-tint); }
.quiz-opt.right { background: #bbf7d0; border-color: #16a34a; box-shadow: 0 4px 0 #16a34a; }
.quiz-opt.wrong { background: #fecaca; border-color: #dc2626; box-shadow: 0 4px 0 #dc2626; }
.quiz-fb { min-height: 1.6em; margin: 14px 0 0; font-weight: 800; color: var(--accent); }
.quiz-stars { display: flex; justify-content: center; gap: 8px; }
.qstar { font-size: 4rem; line-height: 1; color: #cbd5e1; }
.qstar.on { color: #fbbf24; text-shadow: 0 3px 0 #d97706; }

/* games */
[hidden] { display: none !important; }
.game-wrap { padding-bottom: 72px; }
.game-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.game-tile { font: inherit; border: 0; cursor: pointer; text-align: left; display: flex; flex-direction: column; min-height: 190px; padding: 18px; border-radius: 24px; color: #fff; box-shadow: 0 8px 0 rgba(11,18,32,.18), var(--shadow); transition: transform .2s; }
.game-tile:hover { transform: translateY(-5px); }
.game-tile small { font-weight: 700; margin-top: 4px; font-size: 1rem; }
.gstars { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 auto 18px; max-width: 420px; }
.gshape { margin: 0 auto 18px; }
.gsum { font-size: clamp(2.4rem, 8vw, 4rem); }

/* voice controls */
.voice-ctl { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.voice-fab { width: 56px; height: 56px; border-radius: 50%; border: 3px solid #fff; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 0 rgba(11,18,32,.2), var(--shadow); }
.voice-panel { width: min(280px, calc(100vw - 32px)); background: #fff; border: 3px solid #93c5fd; border-radius: 20px; padding: 16px; box-shadow: var(--shadow); }
.voice-panel strong { font-family: "Baloo 2", sans-serif; font-size: 1.2rem; color: var(--ink); display: block; margin-bottom: 8px; }
.voice-panel label { margin-bottom: 4px; }
.voice-row { display: flex; align-items: center; gap: 10px; }
.voice-row input { width: auto; }
.voice-panel input[type=range] { padding: 0; border: 0; box-shadow: none; }
.voice-btns { display: flex; gap: 8px; margin: 10px 0; }
.voice-panel p { font-size: .85rem; color: var(--muted); margin: 0; }

/* footer */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 40px 0; font-size: 1rem; }
.site-footer strong { color: #fff; font-family: "Baloo 2", sans-serif; font-size: 1.3rem; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }

/* dialog */
dialog { margin: auto; border: 0; border-radius: 24px; padding: 32px; max-width: min(440px, 92vw); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(11,18,32,.5); }

@media (prefers-reduced-motion: no-preference) {
  html.js-motion [data-animate="hero"],
  html.js-motion [data-animate="split"],
  html.js-motion [data-animate="reveal"],
  html.js-motion [data-animate="count"],
  html.js-motion [data-animate="stagger"] > * { visibility: hidden; }
}

@media (max-width: 860px) {
  .section { padding: 56px 0; }
  .hero { padding: 32px 0 56px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { max-width: 380px; margin: 0 auto; }
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 0 6px; }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 4px; }
  .site-nav .btn { margin-top: 8px; }
  .price-card { padding: 28px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
