:root { color-scheme: light; font: 100% Nunito, system-ui, sans-serif; --ink:#241744; --sub:#594d70; --purple:#5632ca; --line:#e4d8f5; }
*,*::before,*::after { box-sizing:border-box }
body { margin:0; background:#fcfaff; color:var(--ink) }
a { color:inherit }
button { font:inherit; cursor:pointer }
img { display:block; max-width:100%; height:auto }
h1,h2,h3 { font-family:Fredoka,Nunito,sans-serif; line-height:1.1; margin:0; font-weight:650 }
h1 { font-size:clamp(2.4rem,6vw,4.5rem); letter-spacing:-.035em }
h2 { font-size:clamp(1.65rem,4vw,2.45rem) }
h3 { font-size:1.38rem }
p { line-height:1.6; color:var(--sub); margin:.65rem 0 0 }
[hidden] { display:none !important }
:focus-visible { outline:3px solid #6849cf; outline-offset:4px }
.wrap { width:min(1100px,calc(100% - 40px)); margin-inline:auto }
.skip-link { position:fixed; z-index:3; padding:12px; background:#fff; inset:8px auto auto 8px; transform:translateY(-150%) }
.skip-link:focus { transform:none }
.site-nav,.site-footer { background:#f8f3ff; border-block:1px solid var(--line) }
.nav-row { min-height:72px; display:flex; gap:12px 24px; align-items:center; justify-content:space-between }
.nav-row nav { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px }
.nav-row nav a { text-decoration:none; font-weight:850; padding-block:6px }
.nav-row nav a:hover { color:var(--purple); text-decoration:underline }
.site-footer { margin-top:48px }
.catalog-hero { margin-top:24px; border-radius:30px; background:#eee5ff; display:grid; grid-template-columns:1.4fr 1fr; align-items:center; gap:24px; padding:clamp(22px,5vw,54px) }
.catalog-hero img { border-radius:24px; box-shadow:0 8px 0 #d7c4f5; rotate:4deg; width:100%; aspect-ratio:5/3; object-fit:cover }
.games-section { margin-top:36px }
.activity-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,225px),1fr)); gap:16px; margin-top:16px }
.activity-card { border-radius:20px; border:1px solid #e4d8f5; background:var(--tile); overflow:hidden; text-decoration:none; box-shadow:0 5px 0 #e7ddf4; transition:transform .18s }
.activity-card:hover { transform:translateY(-4px) }
.activity-card img { width:100%; aspect-ratio:2/1; object-fit:cover }
.activity-card div { padding:15px }
.activity-card span { color:#5636a3; font-weight:900; font-size:.92rem }
.activity-card h3 { margin-top:5px }
.activity-card strong { display:inline-block; margin-top:12px; color:var(--purple) }
.lilac { --tile:#f1e5ff; --accent:#6a43bd }
.peach { --tile:#fff0dc; --accent:#a65523 }
.mint { --tile:#e7f7ec; --accent:#2e785a }
.sky { --tile:#e5f4ff; --accent:#285eab }
.all-games { display:inline-block; margin-top:20px; font-weight:850; color:var(--purple) }
.activity-intro { display:flex; align-items:center; gap:15px; margin:16px 0 }
.activity-intro p { margin:0; color:var(--purple); font-weight:850 }
.activity-intro h1 { font-size:clamp(2.25rem,6vw,3.5rem) }
.activity-emblem { display:grid; place-items:center; width:66px; height:66px; flex:none; border-radius:18px; font:700 1.9rem Fredoka,sans-serif; background:var(--tile); color:var(--accent); box-shadow:0 3px 0 var(--line) }
.play-board { min-height:420px; padding:clamp(14px,3vw,28px); border:1px solid var(--line); background:radial-gradient(circle at top right,#fff7,transparent 55%),var(--tile); border-radius:26px; box-shadow:0 6px 0 #e8dff5 }
.game-loading { min-height:360px; display:grid; place-content:center; justify-items:center; background:radial-gradient(circle,#fff7 0 16%,transparent 17%) 0 0 / 54px 54px; animation:dots 6s linear infinite }
.game-loading img { animation:bob 1.5s ease-in-out infinite alternate }
.game-loading p { font-weight:850 }
.game-head { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px }
.game-head p { color:var(--ink); font-weight:900; margin:0 }
.progress-dots { display:flex; gap:6px }
.progress-dots span { width:12px; height:12px; border-radius:50%; background:#fff; border:1px solid var(--accent) }
.progress-dots .filled { background:var(--accent) }
.prompt { text-align:center; font-size:clamp(1.25rem,4vw,1.75rem); margin:10px 0 14px }
.visual { min-height:133px; display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap; text-align:center; padding:10px; border-radius:21px; background:#ffffffa8 }
.picture { font-size:clamp(3.2rem,11vw,5.5rem); line-height:1 }
.picture-name { color:var(--ink); font-weight:900; font-size:1.35rem; margin:4px }
.arrive { animation:arrive .32s cubic-bezier(.15,.85,.35,1.2) both }
.answer-row { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:14px }
.choice,.counter,.memory-card,.firefly-cell { min-width:55px; min-height:55px; border:2px solid #ded3ee; border-radius:15px; background:#fff; color:var(--ink); box-shadow:0 4px 0 #d8ccea; transition:transform .16s,background .18s }
.choice { font-size:clamp(1.4rem,5vw,2rem); padding:8px 16px; font-weight:900; display:grid; place-items:center }
.choice:hover,.counter:hover,.memory-card:hover,.firefly-cell:hover { background:#f7efff }
.choice:active,.counter:active,.memory-card:active,.firefly-cell:active { transform:translateY(3px) }
.choice.good,.counter.counted,.memory-card.matched { border-color:#309964; background:#dcf8e4; color:#174e36; box-shadow:0 4px 0 #a9e0b8 }
.choice.try { border-color:#bd7b25; background:#fff2d3 }
.counter { position:relative; font-size:2rem }
.counter.counted::after { content:'✓'; position:absolute; inset:0 0 auto auto; font-size:1rem; color:#146d47; font-weight:900 }
.count-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:7px; width:min(100%,365px) }
.count-grid button { width:100%; min-width:0 }
.pattern-tile { display:grid; place-items:center; min-width:42px; min-height:52px; border-radius:14px; background:#fff; border:1px solid var(--line); font-size:clamp(1.5rem,6vw,2.7rem) }
.pattern-gap { border:2px dashed var(--accent); color:var(--accent); font-weight:900 }
.shape { display:inline-block; width:42px; height:42px; background:var(--shape,#8964ea); clip-path:var(--clip); vertical-align:middle }
.shape.circle { --clip:circle(48%); --shape:#df4c86 }
.shape.square { --clip:inset(4% round 3px); --shape:#6b49ce }
.shape.triangle { --clip:polygon(50% 3%,98% 96%,2% 96%); --shape:#dd8a2a }
.shape.rectangle { --clip:inset(21% 1% round 3px); --shape:#187e86 }
.shape.diamond { --clip:polygon(50% 0,100% 50%,50% 100%,0 50%); --shape:#356dc9 }
.shape.star { --clip:polygon(50% 0,64% 32%,99% 38%,73% 60%,81% 97%,50% 78%,19% 97%,27% 60%,1% 38%,36% 32%); --shape:#ed9321 }
.shape-outline { display:grid; grid-template:1fr/1fr; width:100px; height:100px }
.shape-outline .shape { grid-area:1/1; width:100%; height:100%; background:#5d4681 }
.shape-outline .shape + .shape { transform:scale(.87); background:#fff }
.feedback { min-height:30px; margin:12px 0 0; text-align:center; color:var(--ink); font-weight:900 }
.controls { display:flex; justify-content:center; gap:10px; flex-wrap:wrap; margin-top:8px }
.primary,.secondary { display:inline-flex; min-height:48px; justify-content:center; align-items:center; padding:9px 16px; border:1px solid transparent; border-radius:12px; background:var(--purple); color:white; text-decoration:none; font-weight:900 }
.primary:hover { background:#4425a8 }
.secondary { border-color:#d9c8f1; background:#fff; color:var(--purple) }
.secondary:hover { background:#f5eeff }
.finish { min-height:328px; display:grid; justify-items:center; align-content:center; text-align:center; gap:12px }
.memory-grid { width:min(100%,440px); display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-inline:auto }
.memory-card { min-width:0; aspect-ratio:1; font-size:clamp(1.4rem,6vw,2.7rem); background:#7551cf; color:white }
.memory-card:not(.revealed):hover { background:#6544b9 }
.memory-card.revealed { background:#fff; color:var(--ink) }
.meadow { background:linear-gradient(#40276a,#226252); border-radius:22px; width:min(100%,480px); display:grid; grid-template-columns:repeat(3,1fr); gap:9px; margin:0 auto; padding:14px }
.firefly-cell { width:100%; min-width:0; background:#ffffff20; color:#fdf7b7; border-color:#fff6; box-shadow:none; font-size:2.2rem; aspect-ratio:1.45 }
.firefly-cell:hover { background:#ffffff35 }
.firefly-cell .glow { display:inline-block; color:#ffe681; text-shadow:0 0 14px #ffe65c; animation:bob .7s ease-in-out infinite alternate }
.grownup { margin-top:35px; padding:clamp(17px,4vw,32px); background:#fff; border:1px solid var(--line); border-radius:21px; max-width:820px }
.grownup h3 { margin-top:18px }
.grownup .primary { margin-top:16px }
.game-more { margin-top:28px }
.game-more a { margin:10px 6px 0 0 }
@keyframes arrive { from { opacity:.45; transform:translateY(9px) scale(.88) } to { opacity:1; transform:none } }
@keyframes bob { to { transform:translateY(-7px) scale(1.05) } }
@keyframes dots { to { background-position:54px -54px } }
@media(max-width:560px) { .wrap{width:calc(100% - 24px)} .nav-row{flex-wrap:wrap;padding:8px 0} .nav-row nav{gap:4px 14px} .catalog-hero{grid-template-columns:1fr} .catalog-hero img{width:min(75%,300px);justify-self:center} .activity-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px} .activity-card div{padding:10px} .memory-grid{gap:5px} .count-grid{gap:4px} }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition:none !important} }

.info-hero { margin-top:24px; padding:clamp(22px,5vw,48px); background:#eee5ff; border:1px solid var(--line); border-radius:26px }
.info-hero p { max-width:62ch; font-size:1.1rem }
.grownup a:not(.primary) { color:var(--purple); font-weight:800; text-underline-offset:3px }
.print-action { margin-top:18px }
.worksheet-dots { font-size:clamp(1.18rem,4vw,2rem); color:var(--ink); letter-spacing:.07em }
@media print {
  .site-nav,.site-footer,.skip-link,.print-action { display:none }
  .wrap { width:100% }
  .info-hero,.grownup { background:none; border-color:#777; padding:12px; break-inside:avoid }
  .info-hero h1 { font-size:24pt }
}

.play-store-link { display:inline-flex; align-items:center; gap:7px }
.play-store-link > img { width:18px; height:18px; flex:none }
.legal-page { max-width:850px; margin-inline:auto }
.legal-page .grownup { max-width:none; margin-top:18px }
.legal-page .info-hero p { max-width:75ch }
.legal-page .legal-meta { font-size:.95rem; font-weight:800 }
.legal-page li { margin-block:7px; line-height:1.55; color:var(--sub) }
.legal-page a { overflow-wrap:anywhere }
