/* ================= LittleFunKids — "toy block" design system ================= */
:root {
  --ink: #2a2440;
  --ink-soft: #5b5673;
  --bg: #f4f1ff;
  --paper: #ffffff;
  --line: #2a2440;
  --tomato: #ff6f59; --tomato-bg: #ffe4de;
  --sun: #ffd23f;    --sun-bg: #fff4c7;
  --sky: #5bb8ff;    --sky-bg: #dff1ff;
  --grass: #5cc36b;  --grass-bg: #ddf6df;
  --berry: #a66bdb;  --berry-bg: #efe3ff;
  --bubble: #ff8fc1; --bubble-bg: #ffe3f0;
  --teal: #2ec4b6;   --teal-bg: #d8f6f2;
  --r: 20px;
  --bw: 3px;
  --lift: 0 5px 0 var(--ink);
  --head: 'Grandstander', 'Arial Rounded MT Bold', ui-rounded, system-ui, sans-serif;
  --body: 'Andika', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.t-tomato { --tone: var(--tomato); --tone-bg: var(--tomato-bg); }
.t-sun    { --tone: var(--sun);    --tone-bg: var(--sun-bg); }
.t-sky    { --tone: var(--sky);    --tone-bg: var(--sky-bg); }
.t-grass  { --tone: var(--grass);  --tone-bg: var(--grass-bg); }
.t-berry  { --tone: var(--berry);  --tone-bg: var(--berry-bg); }
.t-bubble { --tone: var(--bubble); --tone-bg: var(--bubble-bg); }
.t-teal   { --tone: var(--teal);   --tone-bg: var(--teal-bg); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; } /* nothing may push the page sideways on small phones */
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.6 var(--body); }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.1; margin: 0 0 .35em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sub, .muted { color: var(--ink-soft); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 12px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; border-radius: 10px; }

/* ================= Header: a striped awning ================= */
.top { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: var(--bw) solid var(--ink); }
.top::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none;
  background: radial-gradient(circle at 12px -2px, var(--sun) 11px, var(--ink) 11.5px, var(--ink) 13.5px, transparent 14px) 0 0 / 24px 14px repeat-x; }
.top-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.logo-mark { width: 50px; height: 50px; border-radius: 50%; background: var(--sky-bg); border: var(--bw) solid var(--ink); display: grid; place-items: center; overflow: hidden; transition: transform .25s; }
.logo-mark img { width: 46px; height: 46px; margin-top: 6px; }
.logo:hover .logo-mark { transform: rotate(-10deg) scale(1.05); }
.logo-word { display: inline-flex; align-items: baseline; font-family: var(--head); font-weight: 800; font-size: 1.7rem; line-height: 1; }
.lw-little { font-size: .62em; font-weight: 600; transform: rotate(-8deg) translateY(-6px); margin-right: 2px; color: var(--berry); }
.lw-fun { position: relative; padding: 2px 8px 5px; margin: 0 1px; z-index: 0; }
.lw-fun::before { content: ''; position: absolute; inset: 0; background: var(--sun); border: 2.5px solid var(--ink); border-radius: 46% 54% 42% 58% / 56% 44% 56% 44%; z-index: -1; transform: rotate(-4deg); }
.lw-kids { color: var(--tomato); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { flex-shrink: 0; display: flex; align-items: center; gap: 6px; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 1.02rem; padding: 5px 12px 5px 6px; border-radius: 999px; border: 2.5px solid transparent; white-space: nowrap; transition: background .15s, transform .15s; }
.nav a img { width: 30px; height: 30px; transition: transform .2s; }
.nav a:hover { background: var(--tone-bg); }
.nav a:hover img { transform: rotate(-12deg) scale(1.12); }
.nav a.on { background: var(--tone); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.top-tools { display: flex; gap: 6px; }
.tool { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; border: 2.5px solid var(--ink); background: var(--paper); box-shadow: 0 3px 0 var(--ink); color: var(--ink); text-decoration: none; }
.tool:hover { background: var(--sun-bg); }
.tool:active { transform: translateY(3px); box-shadow: none; }
.box-count { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--tomato); color: #fff; border: 2px solid var(--ink); font: 800 12px/18px var(--head); text-align: center; }
/* Ten sections never fit beside the logo, so the nav always gets its own row: spread out on wide screens, scrolling on narrow ones */
.top-row { flex-wrap: wrap; row-gap: 4px; }
.top-tools { margin-left: auto; }
.nav { order: 3; width: 100%; margin-left: 0; justify-content: space-between; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 8px; }
.nav::-webkit-scrollbar { display: none; }
@media (min-width: 900px) and (max-width: 1200px) { .nav a { font-size: .9rem !important; padding: 4px 7px 4px 3px !important; gap: 4px; } .nav a img { width: 24px !important; height: 24px !important; } }
@media (min-width: 900px) and (max-width: 1000px) { .nav a { font-size: .84rem !important; padding: 4px 5px 4px 2px !important; } .nav a img { width: 22px !important; height: 22px !important; } }
@media (max-width: 1200px) { .nav { justify-content: flex-start; gap: 2px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent); } .nav a { font-size: .98rem; padding: 5px 10px 5px 5px; } .nav a img { width: 28px; height: 28px; } }
@media (max-width: 520px) { .logo-word { font-size: 1.4rem; } .logo-mark { width: 42px; height: 42px; } .logo-mark img { width: 38px; height: 38px; } }

/* ================= Hero ================= */
main { padding-bottom: 40px; }
.hero { background: var(--tone-bg); border-bottom: var(--bw) solid var(--ink); position: relative; overflow: hidden; padding: 46px 0 34px;
  background-image: radial-gradient(color-mix(in srgb, var(--tone) 35%, transparent) 2.5px, transparent 3px); background-size: 26px 26px; }
.hero-in { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; }
.hero-txt p { font-size: 1.2rem; max-width: 38em; }
.hero-art { position: relative; height: 230px; }
.hero-art img { position: absolute; width: 160px; height: 160px; filter: drop-shadow(0 5px 0 rgba(42, 36, 64, .15)); }
.hero-art .b0 { left: 4%; top: 8%; } .hero-art .b1 { left: 38%; top: 30%; width: 180px; height: 180px; } .hero-art .b2 { right: 2%; top: 0; }
.bob { animation: bob 4s ease-in-out infinite; }
.b1.bob { animation-delay: -1.3s; } .b2.bob { animation-delay: -2.6s; }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: -3deg; } 50% { translate: 0 -10px; rotate: 3deg; } }
@media (prefers-reduced-motion: reduce) { .bob { animation: none; } }
@media (max-width: 760px) { .hero { padding: 28px 0 20px; } .hero-in { grid-template-columns: 1fr; } .hero-art { height: 130px; } .hero-art img { width: 100px; height: 100px; } .hero-art .b1 { width: 110px; height: 110px; left: 36%; top: 8%; } }

/* ================= Blocks, cards, grids ================= */
.block { margin: 46px auto 0; width: min(1180px, 100% - 32px); }
.block-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; margin-bottom: 18px; }
.block-head > div { min-width: 0; }
.block-head h2 { margin: 0; }
.block-head .sub { margin: 4px 0 0; }
.more { font-family: var(--head); font-weight: 700; text-decoration: none; white-space: nowrap; padding: 6px 14px; border-radius: 999px; border: 2.5px solid var(--ink); background: var(--paper); box-shadow: 0 3px 0 var(--ink); }
.more:hover { background: var(--sun); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 20px; }
.grid.big { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } .grid.big { grid-template-columns: 1fr; } }
:where(.card) { --tone: var(--sun); --tone-bg: var(--sun-bg); }
.card { position: relative; display: flex; flex-direction: column; text-decoration: none; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--lift); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 9px 0 var(--ink); }
.card:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.card-pic { display: grid; place-items: center; aspect-ratio: 1; background: var(--tone-bg); border-bottom: var(--bw) solid var(--ink); padding: 10%; }
.card.wide .card-pic { aspect-ratio: 17 / 22; padding: 6%; background: #fff; }
.card.wide .card-pic img { box-shadow: 0 0 0 1px #e6e2f2; background: #fff; }
.card-pic img { width: 100%; height: 100%; object-fit: contain; }
.card-big.wide-letters { font-size: clamp(2.6rem, 6.5vw, 3.9rem) !important; }
.card-big { font-family: var(--head); font-weight: 800; font-size: clamp(3.4rem, 9vw, 5.2rem); line-height: 1; color: var(--tone); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); }
.card-txt { display: flex; flex-direction: column; padding: 10px 14px 13px; gap: 1px; }
.card-txt b { font-family: var(--head); font-weight: 700; font-size: 1.08rem; line-height: 1.2; }
.card-txt small { color: var(--ink-soft); font-size: .88rem; line-height: 1.35; }
.card-pic { position: relative; }
.tag.tag-low { top: auto; bottom: 8px; left: 8px; }
.tag { position: absolute; top: 10px; left: 10px; font: 700 .75rem/1 var(--head); padding: 5px 9px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.chip { font-family: var(--head); font-weight: 600; text-decoration: none; padding: 6px 14px; border-radius: 999px; background: var(--paper); border: 2.5px solid var(--ink); }
.chip:hover { background: var(--sun-bg); }
.chip.on { background: var(--ink); color: #fff; }

/* Big section tiles on the home page */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.tile { position: relative; display: grid; grid-template-columns: 1fr 96px; align-items: center; gap: 10px; min-height: 150px; padding: 20px 18px 20px 22px; text-decoration: none; border: var(--bw) solid var(--ink); border-radius: 26px; background: var(--tone-bg); box-shadow: var(--lift); transition: transform .15s, box-shadow .15s; overflow: hidden; }
.tile::before { content: ''; position: absolute; right: -40px; bottom: -40px; width: 170px; height: 170px; border-radius: 50%; background: var(--tone); opacity: .55; }
.tile:hover { transform: translateY(-4px) rotate(.5deg); box-shadow: 0 9px 0 var(--ink); }
.tile h3 { font-size: 1.55rem; margin: 0 0 4px; }
.tile p { margin: 0; color: var(--ink-soft); font-size: .98rem; line-height: 1.4; }
.tile .count { display: inline-block; margin-top: 10px; font: 700 .85rem/1 var(--head); padding: 6px 11px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); }
.tile img { position: relative; width: 96px; height: 96px; transition: transform .25s; }
.tile:hover img { transform: rotate(-10deg) scale(1.1); }

/* ================= Buttons ================= */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 700 1.02rem/1 var(--head); padding: 12px 18px; border-radius: 16px; border: var(--bw) solid var(--ink); background: var(--paper); color: var(--ink); box-shadow: 0 4px 0 var(--ink); cursor: pointer; text-decoration: none; transition: transform .1s, box-shadow .1s, background .15s; }
.btn:hover { background: var(--sun-bg); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn.go { background: var(--grass); }
.btn.go:hover { background: #4fb35e; }
.btn.hot { background: var(--sun); }
.btn.hot:hover { background: #ffc61a; }
.btn.save[aria-pressed='true'] { background: var(--bubble); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }

/* ================= Content pages ================= */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .92rem; color: var(--ink-soft); margin: 20px 0 6px; }
.crumbs a { text-decoration: none; font-weight: 700; color: var(--ink); }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { opacity: .5; }
.page-head { margin: 4px 0 8px; }
.page-head h1 { margin-bottom: .2em; }
.page-head p { font-size: 1.12rem; color: var(--ink-soft); max-width: 46em; }
.panel { background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 26px; box-shadow: var(--lift); padding: 24px; }
.two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.prose { max-width: 44em; }
.prose h2 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: .3em 0; }
.note { background: var(--sun-bg); border: 2.5px dashed var(--ink); border-radius: 18px; padding: 14px 18px; margin: 18px 0; }
.note b { font-family: var(--head); }
.kv { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.kv span { font: 700 .88rem/1 var(--head); padding: 7px 12px; border-radius: 999px; background: var(--tone-bg, var(--sun-bg)); border: 2px solid var(--ink); }

/* ================= Coloring ================= */
.color-app { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: start; }
@media (max-width: 860px) { .color-app { grid-template-columns: 1fr; } }
.canvas-box { background: #fff; border: var(--bw) solid var(--ink); border-radius: 26px; box-shadow: var(--lift); padding: 14px; }
.canvas-box svg { width: 100%; height: auto; touch-action: manipulation; }
.canvas-box .r { cursor: pointer; transition: fill .12s; }
.canvas-box .r:hover { filter: brightness(.94); }
.paints { position: sticky; top: 140px; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 26px; box-shadow: var(--lift); padding: 16px; }
.paints h2 { font-size: 1.15rem; margin: 0 0 10px; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.swatch { aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--ink); cursor: pointer; padding: 0; transition: transform .1s; }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); transform: scale(1.08); }
.paint-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.paint-tools .btn { padding: 9px 12px; font-size: .92rem; flex: 1 1 auto; justify-content: center; }
.hint { font-size: .9rem; color: var(--ink-soft); margin: 10px 0 0; }
@media (max-width: 860px) { .paints { position: static; } .swatches { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); } .swatch { min-height: 42px; } }

/* ================= Printable sheets ================= */
.sheet-wrap { background: #fff; border: var(--bw) solid var(--ink); border-radius: 18px; box-shadow: var(--lift); padding: 18px; max-width: 760px; }
.sheet-wrap svg { width: 100%; height: auto; }
.sheet-side { display: flex; flex-direction: column; gap: 16px; }

/* ================= Letters & numbers ================= */
.giant { display: flex; align-items: center; justify-content: center; gap: .1em; font-family: var(--body); font-weight: 700; font-size: clamp(7rem, 20vw, 12rem); line-height: 1; color: var(--tone); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 0 8px 0 var(--ink); padding: 18px 0 26px; }
.say { cursor: pointer; }
.word-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.word { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; border: var(--bw) solid var(--ink); border-radius: 20px; background: var(--paper); box-shadow: 0 4px 0 var(--ink); font: 700 1.25rem/1.1 var(--body); cursor: pointer; text-align: center; color: var(--ink); }
.word img { width: 96px; height: 96px; }
.word b { color: var(--tomato); }
.word:active { transform: translateY(4px); box-shadow: none; }
.count-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 10px; }
.count-row img { width: 64px; height: 64px; cursor: pointer; transition: transform .15s; }
.count-row img.popped { transform: scale(1.25) rotate(-10deg); }
.ten-frame { display: inline-grid; grid-template-columns: repeat(5, 46px); gap: 0; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; background: #fff; }
.ten-frame span { width: 46px; height: 46px; border: 1.5px solid var(--ink); display: grid; place-items: center; }
.ten-frame span.on::after { content: ''; width: 30px; height: 30px; border-radius: 50%; background: var(--tomato); border: 2.5px solid var(--ink); }

/* ================= Stories ================= */
.story { max-width: 760px; margin-inline: auto; }
.story-cover { display: grid; place-items: center; background: var(--tone-bg); border: var(--bw) solid var(--ink); border-radius: 30px; box-shadow: var(--lift); padding: 20px; margin: 10px 0 24px; }
.story-cover .cast { display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.story-cover .cast img { width: 150px; height: 150px; }
.story-cover .cast img:nth-child(2) { width: 120px; height: 120px; }
@media (max-width: 520px) { .story-cover .cast img { width: 31%; height: auto; max-width: 120px; } .story-cover .cast img:nth-child(2) { width: 26%; } }
.canvas-box .r:focus { outline: none; }
.canvas-box .r:focus-visible { stroke: #3d7bf0; stroke-width: 12; }
.story-text { font-size: 1.32rem; line-height: 1.75; }
.story-text p { margin: 0 0 .9em; padding: 4px 8px; border-radius: 12px; transition: background .2s; }
.story-text p.reading { background: var(--sun-bg); box-shadow: inset 4px 0 0 var(--sun); }
.story-text .sfx { font-family: var(--head); font-weight: 800; color: var(--tomato); }
.rhyme { font-size: 1.45rem; line-height: 1.7; text-align: center; }
.rhyme p { margin: 0 0 1em; }
.talk { background: var(--berry-bg); border: var(--bw) solid var(--ink); border-radius: 22px; padding: 18px 22px; margin-top: 26px; }
.talk h2 { font-size: 1.3rem; }
.talk ul { margin: 0; padding-left: 1.2em; }

/* ================= Games ================= */
.stage { position: relative; background: var(--tone-bg, var(--sky-bg)); border: var(--bw) solid var(--ink); border-radius: 28px; box-shadow: var(--lift); min-height: 440px; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: var(--bw) solid var(--ink); background: var(--paper); font-family: var(--head); font-weight: 700; font-size: 1.15rem; }
.stage-body { position: relative; padding: 20px; }
.big-msg { font-family: var(--head); font-weight: 800; font-size: clamp(1.6rem, 4vw, 2.4rem); text-align: center; margin: 10px 0; }
.choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 18px 0; }
.choice { width: 130px; height: 130px; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 24px; background: var(--paper); box-shadow: 0 5px 0 var(--ink); cursor: pointer; font: 800 3.4rem/1 var(--head); color: var(--ink); padding: 10px; }
.choice img { width: 100%; height: 100%; }
.choice:active { transform: translateY(5px); box-shadow: none; }
.choice.right { background: var(--grass); animation: hop .4s; }
.choice.wrong { animation: shake .35s; }
@keyframes hop { 40% { transform: translateY(-14px) scale(1.06); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.bubble { position: absolute; border-radius: 50%; border: 3px solid var(--ink); cursor: pointer; background: radial-gradient(circle at 32% 30%, #fff 0 14%, transparent 16%), var(--c, var(--sky)); opacity: .92; }
.bubble.pop { animation: pop .25s forwards; }
@keyframes pop { to { transform: scale(1.6); opacity: 0; } }
.keys { display: flex; gap: 8px; justify-content: center; padding: 30px 10px 40px; }
.key { flex: 1; max-width: 90px; border: var(--bw) solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); cursor: pointer; font: 800 1.3rem/1 var(--head); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; color: var(--ink); }
.key:active, .key.hit { transform: translateY(6px); box-shadow: none; }
.mem-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 120px)); gap: 12px; justify-content: center; }
.mem { aspect-ratio: 1; border: var(--bw) solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); cursor: pointer; background: var(--berry); display: grid; place-items: center; padding: 8%; }
.mem img { opacity: 0; transition: opacity .15s; width: 100%; height: 100%; }
.mem.open, .mem.done { background: var(--paper); }
.mem.open img, .mem.done img { opacity: 1; }
.mem.done { border-color: var(--grass); box-shadow: 0 4px 0 var(--grass); }
.mix-pots { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.pot { width: 92px; height: 92px; border-radius: 50%; border: var(--bw) solid var(--ink); box-shadow: 0 5px 0 var(--ink); cursor: pointer; }
.pot:active { transform: translateY(5px); box-shadow: none; }
.mix-bowl { width: 200px; height: 200px; margin: 24px auto; border-radius: 50%; border: 4px solid var(--ink); background: #fff; display: grid; place-items: center; transition: background .4s; font: 800 1.4rem/1.1 var(--head); text-align: center; padding: 20px; }
.shape-target { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.stars-row { font-size: 1.6rem; letter-spacing: 2px; }

/* ================= Ideas ================= */
.idea-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 22px; }
.idea-meta div { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; padding: 10px 14px; }
.idea-meta small { display: block; font: 700 .8rem/1.2 var(--head); color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.idea-meta b { font-family: var(--head); }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 12px 54px; min-height: 44px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tone, var(--teal)); border: 2.5px solid var(--ink); font: 800 1.1rem/1 var(--head); }

/* ================= Home extras ================= */
.home-hero { padding: 54px 0 46px; background: var(--sky-bg); border-bottom: var(--bw) solid var(--ink); position: relative; overflow: hidden; }
.home-hero::before { content: ''; position: absolute; inset: auto -10% -120px -10%; height: 220px; background: var(--grass-bg); border-top: var(--bw) solid var(--ink); border-radius: 50% 50% 0 0; }
.home-hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; }
.home-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.home-hero h1 em { font-style: normal; position: relative; z-index: 0; padding: 0 .12em; white-space: nowrap; }
.home-hero h1 em::before { content: ''; position: absolute; inset: 12% -2% 4%; background: var(--sun); border: 3px solid var(--ink); border-radius: 40% 60% 45% 55% / 60% 40% 60% 40%; z-index: -1; transform: rotate(-3deg); }
.home-hero p { font-size: 1.25rem; max-width: 30em; }
.gang { position: relative; height: 340px; }
.gang img { position: absolute; width: 150px; height: 150px; }
.gang .p0 { left: 0; bottom: 0; } .gang .p1 { left: 24%; bottom: 40px; width: 170px; height: 170px; } .gang .p2 { left: 52%; bottom: 6px; } .gang .p3 { right: 0; bottom: 70px; width: 140px; height: 140px; } .gang .p4 { left: 34%; top: 0; width: 120px; height: 120px; }
.gang img:nth-child(odd) { animation: bob 5s ease-in-out infinite; } .gang img:nth-child(even) { animation: bob 4.2s ease-in-out -2s infinite; }
@media (max-width: 860px) { .home-hero .wrap { grid-template-columns: 1fr; } .gang { height: 200px; } .gang img { width: 96px !important; height: 96px !important; } }
.today { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.pick { display: flex; gap: 14px; align-items: center; padding: 16px; text-decoration: none; border: var(--bw) solid var(--ink); border-radius: 22px; box-shadow: var(--lift); background: var(--paper); }
.pick img { width: 84px; height: 84px; flex-shrink: 0; background: var(--tone-bg); border-radius: 18px; border: 2.5px solid var(--ink); padding: 6px; }
.pick small { display: block; font: 700 .8rem/1 var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 4px; }
.pick b { font-family: var(--head); font-size: 1.15rem; line-height: 1.2; }
.pick:hover { transform: translateY(-3px); }
.promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.promise div { background: var(--paper); border: var(--bw) dashed var(--ink); border-radius: 22px; padding: 18px; }
.promise b { display: block; font-family: var(--head); font-size: 1.15rem; margin-bottom: 4px; }

/* ================= Search & My Box ================= */
.search-box { display: flex; gap: 10px; margin: 10px 0 24px; }
.search-box input { flex: 1; min-width: 0; font: inherit; font-size: 1.2rem; padding: 12px 18px; border: var(--bw) solid var(--ink); border-radius: 18px; background: #fff; box-shadow: inset 0 3px 0 rgba(42, 36, 64, .08); }
.search-box input:focus { outline: none; border-color: var(--sky); }
.empty { text-align: center; padding: 40px 10px; }
.empty img { width: 140px; margin: 0 auto 10px; }

/* ================= Footer: a grassy hill ================= */
.foot { position: relative; margin-top: 80px; background: var(--grass-bg); border-top: var(--bw) solid var(--ink); padding: 34px 0 20px; }
.foot-hill { position: absolute; left: 0; right: 0; top: -42px; height: 42px; overflow: hidden; pointer-events: none; }
.foot-hill::before { content: ''; position: absolute; left: -5%; right: -5%; top: 0; height: 120px; background: var(--grass-bg); border: var(--bw) solid var(--ink); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.foot-grid { position: relative; display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 26px; }
.foot-grid h3 { font-size: 1.05rem; margin-bottom: 8px; }
.foot-grid a:not(.logo) { display: block; text-decoration: none; padding: 2px 0; font-size: .98rem; }
.foot-grid a:not(.logo):hover { text-decoration: underline; }
.foot-about p { margin-top: 12px; color: var(--ink-soft); font-size: .98rem; max-width: 26em; }
.fine { font-size: .86rem; color: var(--ink-soft); margin-top: 26px; position: relative; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }

/* ================= Print ================= */
.print-only { display: none; }
/* ---------- my box ---------- */
.box-item { position: relative; }
.box-item .card { height: 100%; }
.box-remove { position: absolute; top: -10px; right: -10px; width: 40px; height: 40px; border-radius: 50%; border: var(--bw) solid var(--ink); background: var(--paper); box-shadow: 0 3px 0 var(--ink); font: 700 1rem var(--head); color: var(--ink); cursor: pointer; }
.box-remove:hover { background: var(--tomato-bg, #ffe1dc); }

/* ---------- bundles ---------- */
.btn.small { font-size: .88rem; padding: 8px 12px; border-radius: 12px; box-shadow: 0 3px 0 var(--ink); }
.muted.small, p.small { font-size: .9rem; }
.name-field { display: block; font: 700 1.05rem var(--head); margin: 6px 0 6px; }
.name-field small { font-weight: 500; opacity: .7; }
#kid-name { width: 100%; font: 700 1.4rem var(--head); color: var(--ink); padding: 10px 14px; border: var(--bw) solid var(--ink); border-radius: 14px; background: var(--paper); box-shadow: inset 0 3px 0 rgba(42,36,64,.08); }
#kid-name:focus { outline: 4px solid var(--sun); outline-offset: 2px; }
.bundle-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; margin: 8px 0 30px; align-items: start; }
@media (max-width: 860px) { .bundle-top { grid-template-columns: 1fr; } }
.bundle-panel h2, .bundle-tips h2 { font-size: 1.3rem; margin: 0 0 10px; }
.bundle-tips h2 + ul { margin-bottom: 16px; }
.bundle-panel .actions { margin: 16px 0 10px; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 3px 0 3px 30px; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--grass) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%232a2440' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; border: 2px solid var(--ink); }
.bundle-h { margin: 10px 0 16px; }
.bundle-pages { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px; }
@media (max-width: 480px) { .bundle-pages { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.bundle-pages figure { margin: 0; display: flex; flex-direction: column; gap: 8px; height: 100%; }
.bp-pic { position: relative; display: block; aspect-ratio: 17 / 22; background: #fff; border: var(--bw) solid var(--ink); border-radius: 14px; box-shadow: var(--lift); overflow: hidden; padding: 4%; }
.bp-pic img, .bp-live svg { width: 100%; height: 100%; display: block; object-fit: contain; }
.bp-live { position: absolute; inset: 4%; display: none; }
.bp-pic.is-live .bp-live { display: block; }
.bp-pic.is-live img { visibility: hidden; }
.bundle-pages figcaption { font: 600 .95rem/1.25 var(--head); flex: 1; }
.bp-n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); font-size: .8rem; margin-right: 4px; }
.bundle-pages .btn { align-self: flex-start; }
.print-pages { display: none; }

@media print {
  .two:has(> .prose) > aside { padding: 12px !important; }
  .sheet-head { display: none; } /* the sheet has its own title */
  .two:has(> .prose) { display: grid; grid-template-columns: 1fr 1.8in; gap: 16px; } .two:has(> .prose) > aside img { width: 1in !important; } .prose h2 { margin-top: 10px; }
  @page { margin: 0.4in; }
  body { background: #fff; font-size: 12pt; }
  .no-print, .top, .foot, .crumbs, .actions, .paints, .page-head p, .block, .talk .no-print { display: none !important; }
  main { padding: 0; }
  .print-only { display: block; }
  .canvas-box, .sheet-wrap, .story-cover, .panel { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .color-app, .two { display: block; }
  .canvas-box svg, .sheet-wrap svg { width: 100%; max-height: 9.6in; }
  body:not(.print-colored) .canvas-box .r { fill: #fff !important; }
  .page-head h1 { font-size: 22pt; text-align: center; }
  .story-text { font-size: 13pt; line-height: 1.45; }
  .story-cover { margin: 0 0 8px; }
  .story-cover .cast img { width: 1.2in; height: 1.2in; }
  .story-cover .cast img:nth-child(2) { width: 1in; height: 1in; }
  .talk { break-inside: avoid; margin-top: 10px; padding: 8px 14px; }
  body.printing-bundle main > :not(.print-pages) { display: none !important; }
  body.printing-bundle .print-pages { display: block; }
  .print-page { break-after: page; page-break-after: always; }
  .print-page:last-child { break-after: auto; page-break-after: auto; }
  .print-page svg { display: block; width: auto; height: 9.9in; max-width: 100%; margin: 0 auto; }
  .print-foot { display: block; text-align: center; font: 10pt var(--body); color: #666; margin-top: 8px; }
}
@media screen { .print-foot { display: none; } }

/* ---------- science & social games ---------- */
.sort-item { display: grid; justify-items: center; gap: 6px; min-height: 210px; margin: 6px 0 14px; }
.sort-item img { width: 170px; height: 170px; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 26px; padding: 12px; box-shadow: 0 5px 0 var(--ink); }
.sort-item span { font: 800 1.3rem var(--head); }
.bins { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.bin { flex: 1 1 100px; max-width: 240px; min-height: 150px; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 12px 10px; border: var(--bw) solid var(--ink); border-radius: 24px; background: var(--paper); box-shadow: 0 5px 0 var(--ink); cursor: pointer; font: 800 1.25rem var(--head); color: var(--ink); }
.bin > img { width: 76px; height: 76px; }
.bins:has(> :nth-child(4)) .bin { flex-basis: 40%; }
@media (max-width: 520px) { .bins:has(> :nth-child(4)) .bin { flex-basis: 20%; min-width: 0; min-height: 92px; font-size: .85rem; } .bins:has(> :nth-child(4)) .bin > img { width: 40px; height: 40px; } .bins:has(> :nth-child(4)) .bin-pile img { width: 20px; height: 20px; } }
.bin:active { transform: translateY(5px); box-shadow: none; }
.bin.right { background: var(--grass); animation: hop .4s; }
.bin.wrong { animation: shake .35s; }
.bin-pile { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 30px; }
.bin-pile img { width: 30px; height: 30px; }
.sort-count { margin-top: 16px; text-align: center; font: 700 1rem var(--head); color: var(--muted, #5b5673); }
.match-show { width: 170px; margin: 0 auto; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 26px; padding: 12px; box-shadow: 0 5px 0 var(--ink); }
.cyc-pick { height: auto; display: grid; gap: 4px; font-size: 1.1rem; }
.cyc-pick img { height: 96px; }
.cyc-ring { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); grid-template-rows: repeat(3, auto); gap: 8px; justify-content: center; align-items: center; margin: 8px auto; }
.cyc-slot { position: relative; aspect-ratio: 1; border: var(--bw) dashed var(--ink); border-radius: 22px; background: var(--paper); display: grid; place-items: center; padding: 8px; text-align: center; }
.cyc-slot img { width: 70%; height: auto; }
.cyc-slot b { font: 800 .95rem var(--head); }
.cyc-n { position: absolute; top: -10px; left: -10px; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); display: grid; place-items: center; font: 800 .95rem var(--head); }
.cyc-slot.s0 { grid-area: 1 / 2; } .cyc-slot.s1 { grid-area: 2 / 3; } .cyc-slot.s2 { grid-area: 3 / 2; } .cyc-slot.s3 { grid-area: 2 / 1; }
.cyc-mid { grid-area: 2 / 2; text-align: center; font-size: 3.4rem; }
@media (max-width: 520px) { .sort-item img, .match-show { width: 130px; height: auto; } .bins { gap: 8px; } .bin { min-height: 110px; padding: 10px 4px; font-size: 1rem; } .bin > img { width: 52px; height: 52px; } .stage-body { padding: 14px 10px; } .cyc-ring { grid-template-columns: repeat(3, minmax(0, 100px)); } }

/* ---------- science & social topic pages ---------- */
.big-idea { font: 800 1.35rem/1.3 var(--head); }
.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.facts li { position: relative; padding: 18px 18px 18px 58px; border: var(--bw) solid var(--ink); border-radius: 22px; background: var(--paper); box-shadow: 0 4px 0 var(--ink); font-size: 1.05rem; line-height: 1.45; }
.facts li::before { content: '💡'; position: absolute; left: 16px; top: 14px; font-size: 1.6rem; }
.explore-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.explore-notes h2, .explore-about h2 { margin-top: 0; }
.explore-about p { max-width: 75ch; }
@media (max-height: 780px) { .paints { position: static; } }
