@import url('fonts.css');
@import url('fonts-world.css');
/* CodingMarble Kids — "The Goli Jar". Quiet paper-and-ink screens; colour lives on objects and the one active control.
   Tokens from research/PRODUCT-SPEC.md §7. Kid targets >= 120px on touch, feedback < 200ms, calm mode everywhere. */
:root {
  --paper: #F4F6FB; --sheet: #fff; --ink: #14163A; --ink-2: #474C70; --muted: #6A6F91; --line: #DCE2EE; --sun: #FFD83D;
  --grape: #6E4BF2; --grape-t: #ECE5FF; --grape-d: #4B2BC9;
  --teal: #14BFAE; --teal-t: #D4F4F0; --teal-d: #0A6E64;
  --tomato: #FF6A3D; --tomato-t: #FFE3D9; --tomato-d: #B53A10;
  --mango: #FFB224; --mango-t: #FFF1D2; --mango-d: #8A4B00;
  --leaf: #35C16B; --leaf-t: #DCF5E5; --leaf-d: #146B38;
  --sky: #46BDFF; --sky-t: #DCF1FF; --sky-d: #0A58A3;
  --berry: #FF4F86; --berry-t: #FFE0EA; --berry-d: #B0164D;
  --w: var(--grape); --wt: var(--grape-t); --wd: var(--grape-d);
  --display: 'Baloo 2', 'Nirmala UI', 'Noto Sans Devanagari', system-ui, sans-serif;
  --body: 'Mukta', 'Nirmala UI', 'Noto Sans Devanagari', system-ui, sans-serif;
  --teach: 'Andika', 'Baloo 2', system-ui, sans-serif;
  --r: 22px; --r-lg: 30px;
  --dur-tap: 90ms; --dur-quick: 160ms; --dur-base: 280ms; --dur-enter: 420ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-over: cubic-bezier(.34, 1.56, .64, 1);
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.067, 1.089 25%, 1.094 27.4%, 1.083 30.4%, 1.035 38.1%, 1.008 43.9%, 0.993 51%, 0.999 71.9%, 1);
  color-scheme: light;
}
.w-grape { --w: var(--grape); --wt: var(--grape-t); --wd: var(--grape-d); }
.w-teal { --w: var(--teal); --wt: var(--teal-t); --wd: var(--teal-d); }
.w-tomato { --w: var(--tomato); --wt: var(--tomato-t); --wd: var(--tomato-d); }
.w-mango { --w: var(--mango); --wt: var(--mango-t); --wd: var(--mango-d); }
.w-leaf { --w: var(--leaf); --wt: var(--leaf-t); --wd: var(--leaf-d); }
.w-sky { --w: var(--sky); --wt: var(--sky-t); --wd: var(--sky-d); }
.w-berry { --w: var(--berry); --wt: var(--berry-t); --wd: var(--berry-d); }
[data-contrast="1"] { --paper: #fff; --sheet: #fff; --ink: #000; --ink-2: #000; --muted: #222; --line: #000; --wt: #fff; }
[data-contrast="1"] body { --wt: #fff; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
[data-big="1"] body { font-size: 20px; }
img { max-width: 100%; height: auto; }
a { color: var(--wd); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 8px var(--sun); border-radius: 12px; }
[lang="hi"] { font-family: var(--body); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[data-voice="en"] .lbl [lang="hi"], [data-voice="hi"] .lbl [lang="en"] { display: none; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 14px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand svg { width: 44px; height: 44px; transition: transform var(--dur-base) var(--ease-over); }
.brand:hover svg { transform: rotate(-18deg) scale(1.06); }
.brand b { display: block; font: 800 1.45rem/1 var(--display); letter-spacing: -.01em; }
.brand small { display: block; font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { display: flex; flex-direction: column; align-items: center; padding: 6px 12px 4px; border-radius: 14px; text-decoration: none; color: var(--ink); font: 700 .98rem/1.1 var(--display); transition: background var(--dur-quick); }
.nav a small { font: 500 .72rem/1.2 var(--body); color: var(--muted); }
.nav a:hover { background: var(--wt); }
.nav a[aria-current="page"] { background: var(--w); color: #fff; box-shadow: 0 4px 0 var(--wd); }
.nav a[aria-current="page"] small { color: rgba(255, 255, 255, .85); }
.ctl { display: flex; gap: 6px; align-items: center; }
.cbtn { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--paper); box-shadow: inset 0 -4px 0 var(--line); cursor: pointer; font-size: 1.15rem; display: grid; place-items: center; transition: transform var(--dur-tap); }
.cbtn i { font-style: normal; font: 800 .82rem/1 var(--display); }
.cbtn i:not(:only-child) { font-size: 1.1rem; }
.cbtn[data-mute] i, .cbtn[data-still] i { font-size: 1.15rem; }
.cbtn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 var(--line); }
.cbtn[aria-pressed="true"] { background: var(--sun); box-shadow: inset 0 -4px 0 #d9b200; }
.menu-btn { display: none; width: 46px; height: 46px; border: 0; border-radius: 14px; background: var(--ink); cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 2.5px; background: #fff; border-radius: 2px; margin: auto; position: relative; content: ''; }
.menu-btn span::before { position: absolute; top: -7px; } .menu-btn span::after { position: absolute; top: 7px; }
@media (max-width: 1000px) {
  .menu-btn { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: row; flex-wrap: wrap; padding: 12px 16px 16px; gap: 8px; border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .nav a { flex: 1 1 30%; padding: 12px; }
}
@media (max-width: 480px) { .brand small { display: none; } .cbtn { width: 48px; height: 48px; } .top-in { gap: 6px; } .ctl { gap: 4px; } }

/* ---------- hero ---------- */
.hero { padding: 26px 0 10px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--ink-2); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
h1 { font: 800 clamp(2rem, 1.3rem + 3vw, 3.3rem)/1.05 var(--display); letter-spacing: -.02em; margin: 0; max-width: 22ch; text-wrap: balance; }
h1 em { font-style: normal; color: var(--w); }
h1 [lang="hi"] { font-family: var(--display); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; margin: 10px 0 0; }

/* ---------- the play zone ---------- */
.play { margin-top: 18px; }
.play-top { display: flex; align-items: flex-end; gap: 12px; padding: 0 6px; }
.play-golu { width: 72px; height: 72px; flex: none; margin-bottom: -14px; position: relative; z-index: 2; }
.play-t { margin: 0 0 6px; font: 700 1.15rem/1.15 var(--display); flex: 1; }
.play-t span { display: block; font: 500 .95rem/1.2 var(--body); color: var(--muted); }
.play-box { position: relative; background: var(--sheet); border-radius: var(--r-lg); box-shadow: 0 10px 0 var(--wd), 0 18px 40px -18px rgba(20, 22, 58, .35); border: 3px solid var(--w); min-height: 460px; overflow: hidden; }
.app { padding: 18px; }
.app.live { animation: rise var(--dur-enter) var(--ease-out); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.start { position: absolute; inset: 0; border: 0; cursor: pointer; background: radial-gradient(120% 90% at 50% 0%, var(--wt), #fff 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.start-ball { width: min(180px, 42vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff 0 8%, color-mix(in srgb, var(--w) 65%, #fff) 20%, var(--w) 62%, var(--wd) 100%); box-shadow: 0 16px 0 -6px rgba(20, 22, 58, .12), inset 0 -10px 24px rgba(0, 0, 0, .15); position: relative; animation: breathe 2.6s ease-in-out infinite; }
.start-ball::after { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 3.4rem; text-shadow: 0 3px 0 var(--wd); padding-left: 10px; }
.start-t { text-align: center; }
.start-t b { display: block; font: 800 1.9rem/1 var(--display); }
.start-t span { font-size: 1.1rem; color: var(--ink-2); }
.start:hover .start-ball { transform: scale(1.04); }
@keyframes breathe { 50% { transform: scale(1.05) translateY(-4px); } }

/* mode tabs */
.modes { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.modes::-webkit-scrollbar { display: none; }
.mode { flex: none; display: flex; align-items: center; gap: 8px; min-height: 58px; padding: 6px 18px 6px 10px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 -4px 0 var(--line); cursor: pointer; transition: transform var(--dur-tap); }
.mode .mi { font-size: 1.7rem; line-height: 1; }
.mode .mt { display: flex; flex-direction: column; text-align: left; line-height: 1.05; }
.mode .mt [lang="en"] { font: 700 1.05rem/1.1 var(--display); }
.mode .mt [lang="hi"] { font-size: .85rem; color: var(--muted); }
.mode[aria-selected="true"] { background: var(--w); color: #fff; box-shadow: inset 0 -5px 0 var(--wd); }
.mode[aria-selected="true"] .mt [lang="hi"] { color: rgba(255, 255, 255, .88); }
.mode:active { transform: translateY(2px); }
.stage { position: relative; min-height: 340px; }
.hint { margin: 2px 0 12px; font: 600 1.05rem/1.3 var(--display); color: var(--ink-2); }

/* picture tiles */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; padding: 12px 8px 10px; background: #fff; border: 3px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 0 var(--line); cursor: pointer; touch-action: manipulation; user-select: none; transition: transform var(--dur-tap), box-shadow var(--dur-tap), border-color var(--dur-quick); }
.tile:hover { border-color: var(--w); }
@media (hover: hover) { .tile:hover .art { transform: translateY(-4px) rotate(-3deg) scale(1.05); } }
.tile:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--line); }
.tile.on { border-color: var(--w); background: var(--wt); box-shadow: 0 6px 0 var(--wd); }
.art { width: 96px; height: 96px; object-fit: contain; transition: transform var(--dur-base) var(--ease-over); pointer-events: none; filter: drop-shadow(0 6px 6px rgba(20, 22, 58, .12)); }
.art.xl { width: min(220px, 50vw); height: min(220px, 50vw); }
.glyph { display: grid; place-items: center; font: 700 4.2rem/1 var(--display); color: var(--w); filter: none; text-shadow: 0 4px 0 var(--wt); }
.glyph[lang="en"] { font-family: var(--teach); font-size: 3.4rem; letter-spacing: .02em; }
.swatch { border-radius: 50%; background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .7) 0 10%, transparent 30%), var(--sw); box-shadow: inset 0 -8px 16px rgba(0, 0, 0, .18); }
.shape svg { width: 100%; height: 100%; filter: drop-shadow(0 5px 0 rgba(20, 22, 58, .12)); }
.tile .art-mini { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; object-fit: contain; opacity: .95; pointer-events: none; }
.choices .tile .art-mini { width: 56px; height: 56px; }
.tile:has(.art-mini) { padding-top: 40px; }
.tile .glyph { width: auto; min-width: 96px; }
@media (max-width: 560px) { .tile .art-mini, .choices .tile .art-mini { width: 34px; height: 34px; top: 6px; right: 6px; } .choices .glyph { font-size: clamp(2.2rem, 10vw, 3.4rem); min-width: 0; } .tile:has(.art-mini) { padding-top: 34px; } }
.lbl { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.15; }
.lbl b { font: 700 1.15rem/1.15 var(--display); }
.lbl b + b { font: 600 1rem/1.2 var(--display); color: var(--ink-2); }
.lbl small { font-size: .8rem; color: var(--muted); }
.tile.pop { animation: pop 420ms var(--spring); }
@keyframes pop { 0% { transform: scale(.94); } 100% { transform: scale(1); } }
.tile.wob { animation: wob 380ms ease; }
@keyframes wob { 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-2deg); } 80% { transform: rotate(1deg); } }
.tile.right { border-color: var(--leaf); background: var(--leaf-t); box-shadow: 0 6px 0 var(--leaf-d); }
.tile.hint { border-color: var(--sun); box-shadow: 0 0 0 6px rgba(255, 216, 61, .55), 0 6px 0 #d9b200; animation: glow 1.2s ease-in-out 3; }
.tile.point::after { content: '👆'; position: absolute; bottom: -8px; right: 6px; font-size: 2.4rem; animation: tap 900ms ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 12px rgba(255, 216, 61, .35), 0 6px 0 #d9b200; } }
@keyframes tap { 50% { transform: translateY(-8px); } }
.board-foot { display: flex; justify-content: center; padding: 18px 0 4px; }

/* question rounds */
.q { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.replay { width: 64px; height: 64px; flex: none; border-radius: 50%; border: 0; background: var(--sun); box-shadow: inset 0 -5px 0 #d9b200; font-size: 1.7rem; cursor: pointer; }
.replay:active { transform: translateY(3px); box-shadow: inset 0 -2px 0 #d9b200; }
.q-t { flex: 1; margin: 0; font: 700 clamp(1.3rem, 1rem + 1.4vw, 1.9rem)/1.15 var(--display); min-width: 12ch; }
.dots { display: flex; gap: 6px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--w); } .dots i.now { background: var(--sun); box-shadow: 0 0 0 3px var(--ink); }
.choices { display: grid; gap: 16px; grid-template-columns: repeat(var(--c, 3), minmax(0, 1fr)); max-width: 820px; margin-inline: auto; }
.choices.c2 { --c: 2; max-width: 560px; } .choices.c3 { --c: 3; } .choices.c4 { --c: 4; }
.choices .tile { min-height: 190px; }
.choices .art { width: min(130px, 26vw); height: min(130px, 26vw); }
@media (max-width: 560px) { .choices.c4 { --c: 2; } .choices.c3 { --c: 3; gap: 10px; } .choices.c3 .tile { min-height: 150px; } }

/* silly or right */
.silly { display: grid; justify-items: center; gap: 12px; text-align: center; }
.yn { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 20px; border: 0; border-radius: 16px; background: var(--paper); box-shadow: inset 0 -4px 0 var(--line); font: 700 1rem/1.1 var(--display); color: var(--ink); cursor: pointer; text-decoration: none; transition: transform var(--dur-tap); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 -1px 0 var(--line); }
.btn.big { min-height: 64px; padding: 10px 26px; font-size: 1.2rem; border-radius: 20px; }
.btn.huge { min-width: 160px; min-height: 96px; font-size: 1.5rem; border-radius: 24px; flex-direction: column; gap: 0; }
.btn.huge span[lang="hi"] { font-size: 1rem; }
.btn.primary { background: var(--w); color: #fff; box-shadow: inset 0 -5px 0 var(--wd); }
.btn.yes { background: var(--leaf); color: #fff; box-shadow: inset 0 -5px 0 var(--leaf-d); }
.btn.no { background: var(--mango); color: var(--ink); box-shadow: inset 0 -5px 0 var(--mango-d); }
.btn.danger { background: var(--berry-t); color: var(--berry-d); }
.btn span[lang="hi"] { font-weight: 600; }
.btn.primary [lang="hi"], .btn.big [lang="hi"] { opacity: .9; }

/* end card */
.endcard { position: absolute; inset: -18px; background: rgba(255, 255, 255, .96); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 24px; z-index: 5; animation: rise var(--dur-enter) var(--ease-out); border-radius: var(--r-lg); }
.end-t { margin: 0; font: 800 2.2rem/1 var(--display); }
.end-t [lang="hi"] { display: block; font-size: 1.3rem; color: var(--muted); }
.end-m { margin: 0 0 8px; color: var(--ink-2); max-width: 40ch; }
.end-act { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.end-golu .golu { animation: hop 900ms var(--ease-over) 2; }
@keyframes hop { 40% { transform: translateY(-22px) rotate(-8deg); } 70% { transform: translateY(0) scale(1.06, .94); } }

/* memory */
.memory { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); max-width: 760px; margin-inline: auto; }
.card-m { aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; position: relative; }
.card-m .back, .card-m .front { position: absolute; inset: 0; border-radius: 20px; display: grid; place-items: center; transition: transform 220ms var(--ease-out), opacity 220ms; }
.card-m .back { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .5), transparent 40%), var(--w); box-shadow: inset 0 -6px 0 var(--wd); }
.card-m .back::after { content: ''; width: 34%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, rgba(255, 255, 255, .25) 55%); }
.card-m .front { background: #fff; border: 3px solid var(--line); opacity: 0; transform: scaleX(0); }
.card-m .front .art { width: 72%; height: 72%; }
.card-m.up .back { opacity: 0; transform: scaleX(0); }
.card-m.up .front { opacity: 1; transform: none; transition-delay: 120ms; }
.card-m.got .front { border-color: var(--leaf); background: var(--leaf-t); }

/* ---------- Golu + Goli Jar ---------- */
.golu { display: block; overflow: visible; }
.golu .g-body { transform-origin: 50% 90%; animation: idle 4s ease-in-out infinite; }
.golu .g-eyes { transform-origin: 50% 56%; animation: blink 5s infinite; }
.golu.m-wow .g-body { animation: hop 700ms var(--ease-over); }
@keyframes idle { 50% { transform: translateY(-3px) rotate(2deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.jar { position: relative; width: 84px; height: 104px; flex: none; border: 0; background: none; padding: 0; cursor: pointer; margin-bottom: -6px; }
.jar-lid { position: absolute; left: 18px; right: 18px; top: 0; height: 14px; border-radius: 6px; background: linear-gradient(#ffcf5c, #e0a21b); box-shadow: inset 0 -3px 0 #b77a05; z-index: 2; }
.jar-glass { position: absolute; left: 6px; right: 6px; top: 11px; bottom: 0; border-radius: 16px 16px 24px 24px; background: linear-gradient(100deg, rgba(255, 255, 255, .9), rgba(220, 235, 255, .55) 35%, rgba(255, 255, 255, .25) 60%, rgba(200, 220, 255, .6)); border: 3px solid #b9c7e6; overflow: hidden; }
.jar-glass::after { content: ''; position: absolute; left: 8px; top: 10px; width: 7px; height: 55%; border-radius: 6px; background: rgba(255, 255, 255, .9); }
.jar-in { position: absolute; inset: auto 4px 4px; display: flex; flex-wrap: wrap-reverse; gap: 2px; justify-content: center; align-content: flex-start; }
.marble { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0 12%, var(--l) 28%, var(--m) 62%, var(--d)); display: inline-block; }
.marble.big { width: 24px; height: 24px; }
.jar-n { position: absolute; right: -6px; top: -4px; min-width: 28px; height: 28px; border-radius: 14px; background: var(--ink); color: #fff; font: 800 .95rem/28px var(--display); text-align: center; padding: 0 6px; z-index: 3; }
.jar.bump { animation: jarbump 420ms var(--spring); }
@keyframes jarbump { 0% { transform: scale(1.12, .9); } 100% { transform: none; } }
.fly { position: fixed; z-index: 90; pointer-events: none; animation: fly 900ms cubic-bezier(.45, 0, .55, 1) forwards; }
.fly .marble { width: 28px; height: 28px; }
@keyframes fly { 0% { transform: translate(0, 0) scale(1.4); } 45% { transform: translate(calc(var(--dx) * .45), calc(var(--dy) * .45 - 120px)) scale(1.2); } 100% { transform: translate(var(--dx), var(--dy)) scale(.6); } }
.confetti { position: fixed; z-index: 91; pointer-events: none; }
.confetti i { position: absolute; width: 12px; height: 16px; border-radius: 3px; animation: burst 1.1s var(--ease-out) forwards; }
.confetti i.star { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); width: 18px; height: 18px; border-radius: 0; }
@keyframes burst { 0% { transform: translate(0, 0) rotate(0) scale(.4); opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) + 90px)) rotate(var(--r)) scale(1); opacity: 0; } }
.caption { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; margin: 0; max-width: min(92vw, 640px); padding: 10px 20px; border-radius: 999px; background: var(--ink); color: #fff; font: 700 1.2rem/1.3 var(--display); text-align: center; opacity: 0; pointer-events: none; transition: opacity var(--dur-base); }
.caption.show { opacity: .96; animation: capfade 3.4s forwards; }
@keyframes capfade { 0%, 80% { opacity: .96; } 100% { opacity: 0; } }
.caption:empty { display: none; }

/* ---------- grids (barakhadi, 1-100, tables) ---------- */
.gridbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.cells { display: grid; gap: 6px; grid-template-columns: repeat(var(--cols, 10), minmax(0, 1fr)); }
.cell { aspect-ratio: 1; min-height: 44px; border: 2px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 3px 0 var(--line); cursor: pointer; display: grid; place-items: center; font: 700 clamp(.95rem, .6rem + 1.4vw, 1.7rem)/1 var(--display); padding: 0; transition: transform var(--dur-tap); }
.cell:hover { border-color: var(--w); }
.cell:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.cell.on { background: var(--w); color: #fff; border-color: var(--wd); box-shadow: 0 3px 0 var(--wd); }
.cell.head { background: var(--wt); border-color: transparent; box-shadow: none; }
.cell small { display: block; font: 500 .6em/1 var(--body); color: var(--muted); }
.cell.on small { color: rgba(255, 255, 255, .85); }
.big-show { display: flex; align-items: center; gap: 16px; min-height: 110px; margin-bottom: 12px; padding: 10px 16px; border-radius: var(--r); background: var(--wt); }
.big-show .bs-n { font: 800 clamp(3rem, 2rem + 4vw, 5rem)/1 var(--display); color: var(--wd); min-width: 2ch; }
.big-show .bs-w { font: 700 1.4rem/1.2 var(--display); }
.big-show .bs-w small { display: block; font: 500 1rem/1.3 var(--body); color: var(--ink-2); }
.seg { display: inline-flex; background: var(--paper); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; border-radius: 10px; min-height: 44px; padding: 4px 14px; font: 700 1rem var(--display); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 2px 0 var(--line); color: var(--wd); }

/* count / objects */
.objs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 10px; min-height: 160px; }
.obj { width: 104px; height: 104px; border: 0; background: none; cursor: pointer; position: relative; border-radius: 20px; padding: 0; }
.obj .art { width: 100%; height: 100%; }
.obj.counted .art { transform: translateY(-6px) scale(1.04); }
.obj .num { position: absolute; top: -6px; right: -6px; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font: 800 1.2rem/36px var(--display); text-align: center; animation: pop 300ms var(--spring); }
.numcards { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.numcard { min-width: 110px; min-height: 120px; border: 3px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: 0 6px 0 var(--line); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 800 3.4rem/1 var(--display); color: var(--wd); }
.numcard small { font: 600 1rem/1.2 var(--body); color: var(--ink-2); }
.numcard .pips { display: flex; flex-wrap: wrap; gap: 3px; max-width: 80px; justify-content: center; margin-top: 4px; }
.numcard .pips i { width: 9px; height: 9px; border-radius: 50%; background: var(--w); }
.numcard.right { border-color: var(--leaf); background: var(--leaf-t); }
.numcard.wob { animation: wob 380ms ease; }
.sum { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; font: 800 2.6rem/1 var(--display); }
.sum .grp { display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; justify-content: center; padding: 10px; border-radius: 18px; background: var(--paper); }
.sum .grp .art { width: 54px; height: 54px; }
.seq { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; font: 800 3rem/1 var(--display); }
.seq span { min-width: 90px; min-height: 90px; display: grid; place-items: center; border-radius: 20px; background: var(--paper); }
.seq span.gap { background: var(--sun); color: var(--ink); }

/* good or not / text choice cards */
.gb { display: grid; gap: 14px; justify-items: center; text-align: center; }
.gb .art { width: min(200px, 46vw); height: min(200px, 46vw); }
.gb-t { font: 700 1.5rem/1.2 var(--display); margin: 0; max-width: 28ch; }
.gb-t small { display: block; font: 500 1.05rem/1.3 var(--body); color: var(--ink-2); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 640px; margin: 0 auto; }
.wordshow { font: 700 clamp(2.6rem, 2rem + 3vw, 4.4rem)/1 var(--teach); letter-spacing: .08em; text-align: center; margin: 4px 0 10px; }
.wordshow[lang="hi"] { font-family: var(--display); letter-spacing: 0; }
.wordshow b { color: var(--w); }

/* keyboard game */
.kb { position: relative; min-height: 420px; border-radius: var(--r); background: radial-gradient(90% 80% at 50% 100%, var(--wt), #fff); overflow: hidden; touch-action: manipulation; user-select: none; }
.kb-bar { position: relative; z-index: 3; display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; }
.kb-shape { position: absolute; display: flex; flex-direction: column; align-items: center; pointer-events: none; animation: kbin 600ms var(--ease-over) both; }
.kb-shape .kb-g { font: 800 clamp(5rem, 3rem + 8vw, 9rem)/1 var(--display); color: var(--c); text-shadow: 0 6px 0 rgba(20, 22, 58, .15); }
.kb-shape .art { width: clamp(120px, 20vw, 200px); height: clamp(120px, 20vw, 200px); }
.kb-shape .kb-w { font: 700 1.5rem/1 var(--display); color: var(--ink); background: #fff; padding: 4px 14px; border-radius: 999px; margin-top: 6px; }
.kb-shape.out { animation: kbout 700ms ease forwards; }
@keyframes kbin { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
@keyframes kbout { to { transform: scale(.6) translateY(40px); opacity: 0; } }
.kb-pad { position: absolute; inset: auto 10px 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; z-index: 3; }
.kb-pad button { min-height: 64px; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 -5px 0 var(--line); font: 800 1.6rem var(--display); cursor: pointer; }
.kb-pad button:active { transform: translateY(3px); }

/* paint */
.paint { display: grid; gap: 10px; }
.paint canvas { width: 100%; height: min(60vh, 520px); background: #fff; border-radius: var(--r); border: 3px dashed var(--line); touch-action: none; cursor: crosshair; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatches button { width: 54px; height: 54px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--line); background: var(--sw); cursor: pointer; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--ink); transform: scale(1.08); }

/* jokes */
.joke { max-width: 640px; margin: 0 auto; text-align: center; display: grid; gap: 14px; justify-items: center; }
.joke-q { font: 700 clamp(1.4rem, 1.1rem + 1.4vw, 2rem)/1.2 var(--display); margin: 0; }
.joke-a { font: 700 1.5rem/1.25 var(--display); color: var(--wd); background: var(--wt); padding: 14px 20px; border-radius: 20px; margin: 0; animation: rise var(--dur-enter) var(--ease-out); }
.joke-q small, .joke-a small { display: block; font: 500 1.05rem/1.35 var(--body); color: var(--ink-2); margin-top: 4px; }

/* ---------- page cards (hubs, related, home) ---------- */
.pcards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.pcard { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px 16px; background: var(--wt); border-radius: var(--r); text-decoration: none; color: var(--ink); position: relative; overflow: hidden; min-height: 150px; box-shadow: inset 0 -5px 0 color-mix(in srgb, var(--w) 35%, transparent); transition: transform var(--dur-base) var(--ease-over), box-shadow var(--dur-base); }
.pcard::before { content: ''; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), transparent 45%), var(--w); opacity: .18; transition: transform var(--dur-enter) var(--ease-out); }
.pc-art { width: 72px; height: 72px; display: grid; place-items: center; position: relative; }
.pc-art img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(20, 22, 58, .15)); transition: transform var(--dur-base) var(--ease-over); }
.pi-g { font: 800 2.6rem/1 var(--display); color: var(--wd); }
.pc-t { font: 700 1.12rem/1.15 var(--display); position: relative; }
.pc-d { font-size: .9rem; color: var(--ink-2); line-height: 1.3; position: relative; }
@media (hover: hover) {
  .pcard:hover { transform: translateY(-4px); box-shadow: inset 0 -5px 0 var(--w), 0 14px 24px -14px color-mix(in srgb, var(--wd) 60%, transparent); }
  .pcard:hover::before { transform: scale(1.35); }
  .pcard:hover .pc-art img { transform: rotate(-8deg) scale(1.1); }
}
.world { padding: 26px 0 6px; }
.world-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.world-head h2 { margin: 0; font: 800 1.7rem/1.1 var(--display); }
.world-head h2 [lang="hi"] { color: var(--wd); font-size: 1.2rem; }
.more { font: 700 1rem var(--display); color: var(--wd); text-decoration: none; }
.hub { padding: 22px 0; }
.related { padding: 30px 0 40px; }
.related h2 { font: 800 1.6rem/1.1 var(--display); margin: 0 0 14px; }

/* home hero */
.home-hero { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 20px; padding: 30px 0 10px; }
.home-hero .hh-golu { justify-self: center; width: min(280px, 60vw); position: relative; }
.home-hero .hh-golu .golu { width: 100%; height: auto; }
.bubble { position: absolute; top: 2%; left: -10%; background: #fff; border-radius: 22px; padding: 10px 16px; font: 700 1.1rem/1.2 var(--display); box-shadow: 0 6px 0 var(--line); }
.bubble::after { content: ''; position: absolute; right: 26px; bottom: -12px; border: 12px solid transparent; border-top-color: #fff; border-bottom: 0; }
@media (max-width: 760px) { .home-hero { grid-template-columns: 1fr; } .home-hero .hh-golu { width: 180px; order: -1; } .bubble { left: auto; right: -40%; } }
.band-pick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.band-pick a { display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; border-radius: 999px; background: #fff; box-shadow: inset 0 -4px 0 var(--line); text-decoration: none; color: var(--ink); font: 700 1.05rem var(--display); }
.band-pick a img { width: 40px; height: 40px; }

/* ---------- grown-ups zone ---------- */
.grown { margin-top: 44px; background: #fff; border-top: 1px solid var(--line); padding-bottom: 20px; }
.grown-head { display: flex; align-items: center; gap: 10px; padding: 18px 0 6px; color: var(--muted); }
.grown-head p { margin: 0; font: 700 1rem var(--display); letter-spacing: .02em; }
.gh-i { font-size: 1.4rem; }
.article-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; }
@media (max-width: 900px) { .article-wrap { grid-template-columns: 1fr; } .toc { position: static !important; } }
.toc { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 16px; background: var(--paper); font-size: .92rem; }
.toc p { margin: 0 0 6px; font: 700 .85rem var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.toc a { color: var(--ink-2); text-decoration: none; padding: 4px 6px; border-radius: 8px; }
.toc a:hover { background: #fff; color: var(--ink); }
.prose { max-width: 76ch; font-size: 1.06rem; }
.prose h2 { font: 800 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.15 var(--display); margin: 1.8em 0 .5em; letter-spacing: -.01em; scroll-margin-top: 90px; }
.prose h3 { font: 700 1.3rem/1.2 var(--display); margin: 1.5em 0 .4em; }
.prose p, .prose li { color: #2a2d52; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--w); }
.prose .note { background: var(--wt); border-radius: 14px; padding: 14px 18px; border-left: 5px solid var(--w); }
.prose .tip { background: var(--mango-t); border-radius: 14px; padding: 14px 18px; }
.words { margin-bottom: 20px; }
.words h2 { margin-top: .6em; }
.words-sub { color: var(--muted); margin-top: -4px; }
.table-scroll { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
.prose table, .wt { width: 100%; border-collapse: collapse; font-size: 1rem; background: #fff; }
.wt th, .prose th { text-align: left; background: var(--paper); font: 700 .88rem var(--display); color: var(--ink-2); padding: 10px 12px; position: sticky; top: 0; }
.wt td, .prose td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.wt td:first-child { width: 64px; }
.wt td img { width: 48px; height: 48px; object-fit: contain; display: block; }
.wt td[lang="hi"] { font: 600 1.15rem var(--display); }
.wt .sw { display: block; width: 40px; height: 40px; border-radius: 50%; background: var(--sw); }
.wt .sh { display: block; width: 44px; height: 44px; }
.wt .sh svg { width: 100%; height: 100%; }
.wt .gl { font: 800 1.8rem/1 var(--display); color: var(--wd); }
.wt .say { white-space: nowrap; text-align: right; }
.wt .say button { border: 0; background: var(--paper); border-radius: 10px; padding: 6px 10px; margin: 2px; cursor: pointer; font: 700 .85rem var(--display); min-height: 36px; }
.wt .say button:hover { background: var(--wt); }
.wt.num td, .wt.bk td { font-size: 1.05rem; }
.wt.bk td { text-align: center; font: 600 1.3rem var(--display); }
.tables-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.wt.tb caption { font: 700 1rem var(--display); text-align: left; padding: 6px 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font: 700 1.12rem/1.3 var(--display); padding: 12px 0; list-style: none; display: flex; gap: 10px; }
.faq summary::before { content: '+'; color: var(--w); font-weight: 800; width: 1em; flex: none; }
.faq details[open] summary::before { content: '–'; }
.faq summary::-webkit-details-marker { display: none; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #c9cce6; margin-top: 30px; padding: 44px 0 20px; font-size: .95rem; }
.foot a { color: #e8e9f7; text-decoration: none; } .foot a:hover { text-decoration: underline; }
.foot-in { display: grid; grid-template-columns: 1.4fr repeat(6, 1fr); gap: 24px; }
.foot .brand { color: #fff; } .foot .brand small { color: #9ea3cc; }
.foot-brand p { margin-top: 12px; }
.foot-col h2 { font: 700 .95rem var(--display); color: #fff; margin: 0 0 8px; }
.foot-col a { display: block; padding: 3px 0; font-size: .9rem; }
.foot-sis { margin-top: 30px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 18px; }
.sis { display: flex; flex-wrap: wrap; gap: 10px; }
.sis a { padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); display: flex; flex-direction: column; }
.sis a span { font-size: .8rem; color: #9ea3cc; }
.foot-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 22px; font-size: .85rem; color: #9ea3cc; }
@media (max-width: 1000px) { .foot-in { grid-template-columns: 1fr 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .foot-in { grid-template-columns: 1fr 1fr; } }

/* ---------- dialogs ---------- */
dialog { border: 0; border-radius: 26px; padding: 0; max-width: min(560px, 94vw); width: 100%; box-shadow: 0 30px 80px -20px rgba(20, 22, 58, .5); color: var(--ink); }
dialog::backdrop { background: rgba(20, 22, 58, .55); backdrop-filter: blur(3px); }
.gate-in, .sheet-in { padding: 22px 24px; }
.gate-in h2, .sheet-in h2 { font: 800 1.6rem/1.1 var(--display); margin: 0 0 10px; }
.gate-in h2 span, .sheet-in h2 span { font-size: 1rem; color: var(--muted); }
.gate-w { font: 800 1.3rem var(--display); }
.gate-note { background: var(--mango-t); padding: 10px 14px; border-radius: 12px; }
.gate-out { display: block; text-align: center; font: 800 2rem/1.4 var(--display); letter-spacing: .2em; }
.gate-keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gate-keys button { min-height: 56px; border: 0; border-radius: 14px; background: var(--paper); box-shadow: inset 0 -4px 0 var(--line); font: 800 1.4rem var(--display); cursor: pointer; }
.gate-msg { min-height: 1.4em; color: var(--berry-d); }
.gate-act, .sheet-act { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.sheet { max-width: min(640px, 96vw); }
.sheet-in { max-height: 88vh; overflow: auto; }
.sheet fieldset { border: 0; border-top: 1px solid var(--line); padding: 14px 0; margin: 0; }
.sheet legend { font: 700 1.05rem var(--display); padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.opt input, .tog input { position: absolute; opacity: 0; }
.opt span { display: inline-block; padding: 10px 16px; border-radius: 12px; background: var(--paper); cursor: pointer; font-weight: 600; }
.opt input:checked + span { background: var(--grape); color: #fff; }
.opt input:focus-visible + span, .tog input:focus-visible + span { outline: 3px solid var(--ink); }
.tog { display: flex; gap: 12px; align-items: center; padding: 8px 0; cursor: pointer; position: relative; }
.tog span { padding-left: 62px; position: relative; display: block; }
.tog span::before { content: ''; position: absolute; left: 0; top: 2px; width: 50px; height: 30px; border-radius: 15px; background: var(--line); transition: background var(--dur-quick); }
.tog span::after { content: ''; position: absolute; left: 4px; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform var(--dur-quick); }
.tog input:checked + span::before { background: var(--leaf); }
.tog input:checked + span::after { transform: translateX(20px); }
.tog small { display: block; color: var(--muted); }
.rng { display: flex; align-items: center; gap: 12px; margin: 6px 0; } .rng input { flex: 1; accent-color: var(--grape); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.file { position: relative; }
.small { font-size: .9rem; color: var(--ink-2); }
.brk { text-align: center; } .brk-in { padding: 26px; display: grid; justify-items: center; gap: 10px; font: 700 1.3rem/1.3 var(--display); }
.app-err { padding: 40px; text-align: center; }

/* ---------- calm mode + reduced motion ---------- */
[data-calm="1"] *, [data-calm="1"] *::before, [data-calm="1"] *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
[data-calm="1"] .golu .g-body, [data-calm="1"] .golu .g-eyes, [data-calm="1"] .start-ball { animation: none !important; }
[data-calm="1"] .confetti, [data-calm="1"] .fly { display: none; }
/* ---------- language cards: a big friendly letter in a bubble, one colour per language ---------- */
.hub .pcard .pi-g, .hub .pcard .pc-art img { position: relative; z-index: 1; }
.hub .pcard .pi-g { font-size: 3.1rem; }
.hub .pcard .pc-art::after {                         /* soft bubble behind the letter */
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff 0 14%, color-mix(in srgb, var(--w) 45%, #fff) 100%);
  box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--wd) 70%, transparent);
  transition: transform var(--dur-base) var(--ease-over);
}
.hub .pcard { animation: cardIn var(--dur-enter) var(--ease-out) both; }
.hub .pcard:nth-child(6n+2) { animation-delay: 40ms } .hub .pcard:nth-child(6n+3) { animation-delay: 80ms }
.hub .pcard:nth-child(6n+4) { animation-delay: 120ms } .hub .pcard:nth-child(6n+5) { animation-delay: 160ms }
.hub .pcard:nth-child(6n)   { animation-delay: 200ms }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.96) } to { opacity: 1; transform: none } }
@keyframes letterHop { 40% { transform: translateY(-7px) rotate(-6deg) scale(1.08) } 70% { transform: translateY(0) rotate(3deg) scale(1.02) } }
@media (hover: hover) {
  .hub .pcard:hover .pi-g, .hub .pcard:focus-visible .pi-g { animation: letterHop 520ms var(--ease-over); }
  .hub .pcard:hover .pc-art::after { transform: scale(1.12) rotate(6deg); }
}
.hub .pcard:active { transform: translateY(-1px) scale(.985); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .confetti, .fly { display: none; }
  .hub .pcard { animation: none; opacity: 1; }
}
@media print { .top, .foot, .play, .caption, .related { display: none !important; } .grown { margin: 0; border: 0; } .article-wrap { display: block; } .toc { display: none; } }

/* ---------- world languages ---------- */
:lang(ta) { font-family: 'Baloo Thambi 2', var(--display); } :lang(te) { font-family: 'Baloo Tammudu 2', var(--display); }
:lang(kn) { font-family: 'Baloo Tamma 2', var(--display); } :lang(ml) { font-family: 'Baloo Chettan 2', var(--display); }
:lang(bn) { font-family: 'Baloo Da 2', var(--display); } :lang(gu) { font-family: 'Baloo Bhai 2', var(--display); }
:lang(pa) { font-family: 'Baloo Paaji 2', var(--display); } :lang(or) { font-family: 'Baloo Bhaina 2', var(--display); }
:lang(ar) { font-family: 'Baloo Bhaijaan 2', system-ui, sans-serif; direction: rtl; unicode-bidi: isolate; }
:lang(ur) { font-family: 'Noto Nastaliq Urdu', system-ui, serif; direction: rtl; unicode-bidi: isolate; line-height: 2; }
:lang(ru), :lang(uk) { font-family: 'Nunito', var(--display); }
:lang(zh) { font-family: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif; }
:lang(ja) { font-family: 'Hiragino Maru Gothic ProN', 'Noto Sans JP', 'Yu Gothic', system-ui, sans-serif; }
:lang(ko) { font-family: 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif; }
:lang(th) { font-family: 'Noto Sans Thai', 'Leelawadee UI', system-ui, sans-serif; }
.langs .lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.lang-chip { position: relative; cursor: pointer; }
.lang-chip input { position: absolute; opacity: 0; }
.lang-chip span { display: block; padding: 10px 12px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 -3px 0 var(--line); font: 700 1.05rem var(--display); text-align: center; }
.lang-chip input:checked + span { background: var(--grape); color: #fff; box-shadow: inset 0 -4px 0 var(--grape-d); }
.lang-chip input:focus-visible + span { outline: 3px solid var(--ink); }

/* no sideways scroll on phones: grid children may shrink, long words and tables wrap/scroll inside */
.article-wrap > * { min-width: 0; }
.toc a, .prose { overflow-wrap: anywhere; }
.prose img, .prose table { max-width: 100%; }
html, body { max-width: 100%; overflow-x: clip; }

/* hidden always wins over component display rules */
[hidden] { display: none !important; }

.lbl b { overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
.lbl { max-width: 100%; }
.modes { mask-image: linear-gradient(90deg, #000 88%, transparent); }

/* "your language" strip, shown when the chosen language is not Hindi or English */
.langstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 10px auto 0; padding: 12px 16px; border-radius: var(--r); background: var(--sky-t); }
.langstrip p { margin: 0; font: 700 1.05rem var(--display); }
.langstrip-links { display: flex; flex-wrap: wrap; gap: 8px; }
.langstrip-links a { padding: 8px 14px; border-radius: 999px; background: #fff; text-decoration: none; color: var(--ink); font: 600 .95rem var(--body); box-shadow: inset 0 -3px 0 var(--line); }

/* language sheet: Done stays in view, with a short how-to */
.sheet-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 10px; background: #fff; }
.sheet-top h2 { margin: 0; }
.sheet-guide { margin: 0 0 6px; padding: 10px 14px; border-radius: 14px; background: var(--mango-t); font-size: .95rem; }
.sheet-guide b { color: var(--mango-d); }

/* ---------- Golu's Day (daily path), emotion check-in, calm corner ---------- */
.gd-cta { display: flex; align-items: center; gap: 14px; margin: 18px 0 4px; padding: 12px 18px 12px 12px; border-radius: 26px; text-decoration: none; color: var(--ink);
  background: linear-gradient(135deg, #FFF1D2, #FFE3A8); box-shadow: inset 0 -5px 0 #f2c25a, 0 10px 24px -14px rgba(138, 75, 0, .5); max-width: 520px; transition: transform var(--dur-base) var(--ease-over); }
.gd-cta:hover, .gd-cta:focus-visible { transform: translateY(-3px); }
.gd-sun { width: 64px; height: 64px; flex: none; animation: sunSpin 14s linear infinite; }
.gd-sun svg { width: 100%; height: 100%; }
.gd-cta-t b { display: block; font: 800 1.35rem/1.1 var(--display); }
.gd-cta-t small { color: var(--ink-2); font-size: .92rem; }
.gd-cta-go { margin-left: auto; width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.2rem; color: var(--mango-d); box-shadow: inset 0 -4px 0 var(--line); flex: none; }
@keyframes sunSpin { to { transform: rotate(360deg) } }
[data-calm="1"] .gd-sun { animation: none; }

.gd { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 6px 0 12px; }
.gd-golu .golu { width: 150px; height: 150px; }
.gd-golu.sm .golu { width: 84px; height: 84px; }
.gd-q { font: 800 1.5rem/1.2 var(--display); margin: 0; }
.gd-q.big { font-size: 1.9rem; }
.gd-q span, .calm-t span { display: block; }
.gd-q span[lang="hi"], .calm-t span[lang="hi"] { font-weight: 700; color: var(--ink-2); font-size: .9em; }
.faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; width: min(640px, 100%); }
.face { border: 0; background: #fff; border-radius: 24px; padding: 10px 6px 10px; box-shadow: inset 0 -5px 0 var(--line); cursor: pointer; display: grid; gap: 6px; justify-items: center; transition: transform var(--dur-base) var(--ease-over), box-shadow var(--dur-base); min-height: 120px; }
.face svg { width: min(88px, 100%); aspect-ratio: 1; }
.face span b, .face span i { display: block; font: 700 .95rem/1.1 var(--display); font-style: normal; }
.face span i { color: var(--ink-2); font-size: .82rem; }
.face:hover, .face:focus-visible { transform: translateY(-4px) scale(1.04); }
.face.on { box-shadow: inset 0 -5px 0 var(--w), 0 0 0 4px var(--wt); transform: scale(1.06); }
.face:active { transform: scale(.96); }
.gd-act { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn.huge .ico { font-size: 1.6rem; line-height: 1; margin-bottom: 4px; }
.btn.huge span[lang="hi"] { font-size: .95rem; color: var(--ink-2); }
.btn.primary { background: var(--w); color: #fff; box-shadow: inset 0 -4px 0 var(--wd); }
.btn.primary span[lang="hi"] { color: #fff; opacity: .9; }
.calm-go { background: var(--sky-t); }
.gd-head { display: flex; align-items: center; gap: 14px; text-align: left; width: min(640px, 100%); }
.gd-emoji { font-size: 2.6rem; line-height: 1; }
.gd-head b { display: block; font: 800 1.3rem/1.15 var(--display); }
.gd-head b[lang="hi"] { font-size: 1.05rem; color: var(--ink-2); }
.gd-head small { display: block; color: var(--muted); font-size: .9rem; }
.gd-head small span { display: inline; margin-right: 8px; }
.gd-head .gd-golu { margin-left: auto; }
.gd-road { width: min(660px, 100%); height: auto; }
.gd-now { animation: sunPulse 1.6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes sunPulse { 50% { transform: scale(1.12) } }
.gd-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; width: min(640px, 100%); }
.gd-steps li { background: #fff; border-radius: 18px; padding: 10px 6px; box-shadow: inset 0 -4px 0 var(--line); display: grid; justify-items: center; gap: 4px; }
.gd-steps .si { font-size: 1.6rem; line-height: 1; }
.gd-steps b { display: block; font: 700 .9rem/1.1 var(--display); }
.gd-steps b[lang="hi"] { color: var(--ink-2); font-size: .8rem; }
.gd-steps small { color: var(--muted); font-size: .72rem; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.gd-meter { color: var(--muted); font-size: .9rem; margin: 0; }
.gd-meter span { display: block; }

/* the strip on a session page */
.gd-bar { display: flex; align-items: center; gap: 12px; margin: 12px auto 0; padding: 8px 10px 8px 8px; background: linear-gradient(135deg, #FFF1D2, #FFE9BE); border-radius: 22px; box-shadow: inset 0 -4px 0 #f2c25a; position: sticky; top: 74px; z-index: 30; }
.gd-bar-golu .golu { width: 44px; height: 44px; display: block; }
.gd-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.gd-dots li { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.15rem; opacity: .45; box-shadow: inset 0 -3px 0 var(--line); }
.gd-dots li.done { opacity: 1; background: #FFD83D; }
.gd-dots li.now { opacity: 1; box-shadow: 0 0 0 3px var(--mango); }
.gd-next { margin-left: auto; min-height: 52px; font-size: 1.05rem; gap: 6px; }
.gd-next span[lang="hi"] { font-size: .85rem; opacity: .85; }
.gd-bar.ready .gd-next { animation: nextGlow 1.4s ease-in-out infinite; }
@keyframes nextGlow { 50% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(255, 178, 36, .35), inset 0 -4px 0 var(--wd); } }
.gd-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: var(--muted); cursor: pointer; box-shadow: inset 0 -3px 0 var(--line); }
@media (max-width: 640px) { .gd-bar { top: 66px; gap: 8px; } .gd-dots li { width: 32px; height: 32px; font-size: .95rem; } .gd-next span[lang="hi"] { display: none; } .faces { gap: 8px; } .face { border-radius: 18px; min-height: 100px; } .face span i { display: none; } .gd-steps small { display: none; } }

/* calm corner */
.calm-btn { position: fixed; left: 14px; bottom: 14px; z-index: 35; width: 72px; height: 48px; display: grid; place-items: center; filter: drop-shadow(0 6px 8px rgba(10, 88, 163, .25)); transition: transform var(--dur-base) var(--ease-over); animation: cloudFloat 5s ease-in-out infinite; }
.calm-btn svg { width: 100%; height: 100%; }
.calm-btn:hover, .calm-btn:focus-visible { transform: scale(1.1); outline: none; }
.calm-btn:focus-visible svg path { stroke: var(--sky); stroke-width: 3.5; }
@keyframes cloudFloat { 50% { transform: translateY(-5px) } }
[data-calm="1"] .calm-btn { animation: none; }
@media print { .calm-btn, .gd-bar { display: none !important; } }
.calm-box { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 10px 0 16px; }
.calm-bubble { width: min(260px, 70vw); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 35% 30%, #fff 0 10%, #DCF1FF 40%, #86d6ff 100%); box-shadow: 0 20px 40px -20px rgba(10, 88, 163, .5), inset 0 -12px 30px rgba(10, 88, 163, .12);
  transform: scale(.72); transition: transform 4s ease-in-out; }
.calm-bubble.in { transform: scale(1.08); }
.calm-bubble.squeeze { transform: scale(.6); transition-duration: 1.2s; }
.calm-bubble .golu { width: 120px; height: 120px; transition: transform 4s ease-in-out; }
.calm-bubble.in .golu { transform: scale(1.12); }
.calm-t { font: 800 1.6rem/1.2 var(--display); margin: 0; min-height: 2.6em; }
.calm-dots { display: flex; gap: 8px; }
.calm-dots i { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--line); }
.calm-dots i.on { background: var(--sky); box-shadow: none; }
.calm-after { display: flex; flex-direction: column; align-items: center; gap: 14px; animation: rise var(--dur-enter) var(--ease-out); }
[data-nohi="1"] :is(.gd, .calm-box, .gd-bar, .gd-cta, .gd-act) [lang="hi"] { display: none !important; }

/* ---------- picture books ---------- */
.book { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.book-page { width: min(560px, 100%); min-height: 380px; background: #fff; border-radius: 28px; box-shadow: 0 14px 30px -18px rgba(20, 22, 58, .35), inset 0 -6px 0 var(--wt); padding: 22px 22px 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; position: relative; cursor: pointer; user-select: none; touch-action: pan-y; }
.book-page::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 10px; border-radius: 6px 0 0 6px; background: linear-gradient(90deg, var(--wt), transparent); }
.book-page:focus-visible { outline: 4px solid var(--w); outline-offset: 4px; }
.book-art img { width: min(220px, 50vw); height: auto; filter: drop-shadow(0 10px 10px rgba(20, 22, 58, .15)); animation: artIn var(--dur-enter) var(--ease-over); }
.book-art .golu { width: min(200px, 48vw); height: auto; animation: artIn var(--dur-enter) var(--ease-over); }
@keyframes artIn { from { transform: scale(.85); opacity: 0 } }
.book-line { font: 700 clamp(1.4rem, 4.5vw, 2rem)/1.3 var(--teach); margin: 0; color: var(--ink); }
.book-line2 { font: 500 clamp(1rem, 3vw, 1.2rem)/1.3 var(--body); margin: 0; color: var(--ink-2); }
.book-num { position: absolute; right: 18px; bottom: 12px; color: var(--muted); font: 700 .85rem var(--display); }
.book-page.turn-r { animation: turnR var(--dur-base) var(--ease-out); }
.book-page.turn-l { animation: turnL var(--dur-base) var(--ease-out); }
@keyframes turnR { from { transform: translateX(24px) rotate(1deg); opacity: .4 } }
@keyframes turnL { from { transform: translateX(-24px) rotate(-1deg); opacity: .4 } }
.book-nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.book-nav .btn[disabled] { opacity: .35; cursor: default; }
.book-nav .btn span[lang="hi"] { font-size: .85rem; opacity: .85; margin-left: 4px; }
.book.reading [data-page] { box-shadow: 0 0 0 4px var(--wt), 0 14px 30px -18px rgba(20, 22, 58, .35); }
.book-dots { display: flex; gap: 8px; }
.book-dots i { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; }
.book-dots i.on { background: var(--w); box-shadow: none; transform: scale(1.2); }
.book-text { columns: 2; gap: 24px; } .book-text li { break-inside: avoid; margin-bottom: 6px; } .book-text [lang="hi"] { color: var(--ink-2); }
@media (max-width: 640px) { .book-page { min-height: 320px; padding: 16px 14px 28px; } .book-text { columns: 1; } }

/* ---------- Think & Remember games ---------- */
.brain .tray { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; transition: opacity .5s, transform .5s; }
.brain .tray .tile { width: 132px; min-height: 132px; }
.brain .tray.hide { opacity: 0; transform: scale(.9); pointer-events: none; height: 0; overflow: hidden; margin: 0; }
.brain .tray .tile.gone { animation: walkAway .7s var(--ease-out) forwards; }
@keyframes walkAway { to { transform: translateX(120%) rotate(12deg); opacity: 0 } }
.brain .pads { display: grid; gap: 14px; width: min(420px, 100%); margin: 8px auto; }
.brain .pads.p2 { grid-template-columns: 1fr 1fr; } .brain .pads.p3 { grid-template-columns: repeat(3, 1fr); } .brain .pads.p4 { grid-template-columns: 1fr 1fr; }
.brain .pad { aspect-ratio: 1; border: 0; border-radius: 28px; cursor: pointer; background: color-mix(in srgb, var(--c) 45%, #fff); box-shadow: inset 0 -8px 0 color-mix(in srgb, var(--c) 70%, #000 10%); transition: transform var(--dur-tap), background var(--dur-quick), box-shadow var(--dur-quick); }
.brain .pad.lit { background: var(--c); transform: scale(1.06); box-shadow: 0 0 0 8px color-mix(in srgb, var(--c) 35%, transparent), inset 0 -8px 0 color-mix(in srgb, var(--c) 70%, #000 10%); }
.brain .pad:active { transform: scale(.96); }
.brain .sw-item { width: 150px; margin: 4px auto 14px; animation: rise var(--dur-enter) var(--ease-over); }
.brain .sw-item svg { width: 100%; height: auto; filter: drop-shadow(0 8px 8px rgba(20, 22, 58, .15)); }
.brain .bins { display: flex; gap: 16px; justify-content: center; }
.brain .bin { width: min(200px, 44vw); min-height: 150px; border: 4px dashed var(--line); border-radius: 26px; background: #fff; cursor: pointer; display: grid; place-items: center; gap: 6px; padding: 10px; transition: transform var(--dur-tap), border-color var(--dur-quick); }
.brain .bin:hover { border-color: var(--w); } .brain .bin:active { transform: scale(.97); }
.brain .bin-ico { width: 70px; } .brain .bin-ico svg { width: 100%; height: auto; }
.brain .brain-note { text-align: center; color: var(--muted); font: 700 1rem var(--display); margin: 10px 0 0; }
.brain .spot { display: grid; gap: 14px; }
.brain .spot .row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 10px; border-radius: 24px; background: #fff; }
.brain .spot .row .tile { width: 108px; min-height: 108px; }
.brain .spot .row .tile .lbl { display: none; }
.brain .count-big { text-align: center; font: 800 3rem/1 var(--display); color: var(--wd); margin-top: 8px; }
.brain .sizes .tile .art { transform: scale(var(--sc)); transform-origin: center; }
.brain .sizes .tile { min-height: 170px; }
.brain .q-mark { display: grid; place-items: center; font: 800 3rem var(--display); background: var(--sun); border-radius: 20px; }
.brain .nums .tile.num .art { font-size: 3rem; }
.brain .rocket { text-align: center; font-size: 3.4rem; margin-top: 10px; transition: transform 1s cubic-bezier(.5, 0, 1, .6), opacity 1s; }
.brain .rocket.go { transform: translateY(-260px) scale(1.3); opacity: 0; }
.brain .ispy .tile.right { outline: 4px solid var(--leaf); }
.brain .tile[disabled] { opacity: 1; cursor: default; }
@media (max-width: 640px) { .brain .tray .tile { width: 100px; min-height: 100px; } .brain .spot .row .tile { width: 84px; min-height: 84px; } }

/* ---------- audit fixes: kid-sized tap targets, calmer focus, safer text ---------- */
.nav a { min-height: 48px; display: flex; flex-direction: column; justify-content: center; }
.more { min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; }
.langstrip-links a { min-height: 48px; display: inline-flex; align-items: center; }
.band-pick a { min-height: 56px; }
.crumbs a { min-height: 32px; display: inline-flex; align-items: center; }
.book-dots i, .calm-dots i { padding: 10px; box-sizing: content-box; margin: -10px; }   /* bigger touch area, same look */
/* one clear, high-contrast focus ring everywhere (keyboard and switch users) */
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; border-radius: 12px; }
.tile:focus-visible, .pcard:focus-visible, .pad:focus-visible { outline: 5px solid var(--ink); outline-offset: 4px; }
/* never let a long word in any script push the layout sideways */
.pc-t, .pc-d, .lbl b, .q-t, .book-line, .gd-q { overflow-wrap: anywhere; }

.app-load { display: grid; place-items: center; gap: 10px; padding: 48px 12px; min-height: 240px; }
.app-load p { margin: 0; text-align: center; font: 700 1.1rem var(--display); color: var(--ink-2); }
.app-load p span { display: block; }
.app-load p span[lang="hi"] { font-size: .9rem; color: var(--muted); }
[data-nohi="1"] .app-load p span[lang="hi"] { display: none; }
/* when the family does not read Hindi, no Hindi in the chrome (titles, buttons, tabs, step names) */
[data-nohi="1"] :is(h1, h2, .play-t, .start-t, .mode .mt, .btn, .end-t, .gd-steps, .book-nav, .world-head, .hint, .modes) [lang="hi"] { display: none !important; }

/* ---- apps/arts.css ---- */
/* ---------- arts engine: music, moves, songs, colour mixing, rangoli ---------- */
.arts-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.arts-stage > * { max-width: 100%; }
.arts-glow { box-shadow: 0 0 0 6px #FFD23F, 0 0 22px 6px rgba(255, 210, 63, .8) !important; }
.arts-point { position: relative; }
.arts-point::after { content: '👆'; position: absolute; right: -6px; bottom: -18px; font-size: 38px; pointer-events: none; animation: arts-tap 1s ease-in-out infinite; }
@keyframes arts-tap { 50% { transform: translateY(-8px); } }

/* xylophone: stacked bars on two wooden rails */
.arts-xylo { position: relative; width: min(100%, 440px); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 10px 0; }
.arts-xylo::before, .arts-xylo::after { content: ''; position: absolute; top: 0; bottom: 0; width: 12px; border-radius: 6px; background: #8A5A3B; }
.arts-xylo::before { left: 22%; } .arts-xylo::after { right: 22%; }
.arts-bar { position: relative; z-index: 1; width: var(--w); min-height: 60px; border: 0; border-radius: 16px; background: var(--c); box-shadow: inset 0 -7px 0 rgba(0, 0, 0, .18), 0 4px 0 rgba(0, 0, 0, .12); cursor: pointer; transition: transform .12s; }
.arts-bar i { position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #F4F1EA; box-shadow: inset 0 2px 0 rgba(0, 0, 0, .25); }
.arts-bar i:first-child { left: 14px; } .arts-bar i:last-child { right: 14px; }
.arts-bar:active, .arts-hit { transform: scale(.96); }
.arts-lit { transform: scale(1.05); box-shadow: 0 0 0 5px #fff, 0 0 26px 8px var(--c); }
.arts-golu { height: 96px; } .arts-golu svg { width: 96px; height: 96px; }

/* drum pads */
.arts-pads { display: grid; grid-template-columns: repeat(2, minmax(0, 150px)); gap: 18px; }
.arts-pad { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; font: inherit; }
.arts-skin { width: 128px; height: 128px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #3A2E2A 0 22%, #F1E3C8 23% 100%); border: 10px solid #B5542C; box-shadow: 0 6px 0 #7C3517; transition: transform .1s; }
.arts-na .arts-skin { border-color: #D98A1C; box-shadow: 0 6px 0 #8F5A10; background: radial-gradient(circle, #3A2E2A 0 26%, #F7EBD3 27%); }
.arts-dhol .arts-skin { border-color: #C0392B; box-shadow: 0 6px 0 #7B1F16; background: repeating-conic-gradient(#F7D774 0 15deg, #F2C94C 15deg 30deg); }
.arts-clap .arts-skin { border-color: #6E4BF2; box-shadow: 0 6px 0 #3E23A8; background: #FFE3EE; }
.arts-pad:active .arts-skin, .arts-pad.pop .arts-skin { transform: scale(.93); }
.arts-pl { font-weight: 700; display: flex; flex-direction: column; text-align: center; line-height: 1.2; }
.arts-pl span + span, .arts-ly span + span, .arts-lt .lbl span + span { font-size: .85em; opacity: .75; }
.arts-lt img { width: 96px; height: 96px; }

/* moves */
.arts-mv { height: 170px; display: grid; place-items: center; }
.arts-mvp { width: 150px; height: 150px; animation: arts-bob 1.2s ease-in-out infinite; }
.arts-gm svg { width: 150px; height: 150px; }
.arts-march svg { animation: arts-bob .5s ease-in-out infinite; }
.arts-spin svg { animation: arts-spin 4s linear infinite; }
.arts-cnt { font: 800 56px/1 var(--display, inherit); min-height: 56px; margin: 0; color: #6E4BF2; }
@keyframes arts-bob { 50% { transform: translateY(-12px); } }
@keyframes arts-spin { to { transform: rotate(360deg); } }
.arts-dfloor { width: min(100%, 360px); padding: 18px; border-radius: 28px; text-align: center; background: repeating-linear-gradient(45deg, #FFF3C4 0 24px, #FFE8F0 24px 48px); }
.arts-gd svg { width: 140px; height: 140px; }
.arts-dancing svg { animation: arts-sway .6s ease-in-out infinite alternate; }
@keyframes arts-sway { from { transform: rotate(-12deg) translateY(0); } to { transform: rotate(12deg) translateY(-10px); } }
.arts-call { font-size: 32px; font-weight: 800; min-height: 40px; margin: 6px 0 0; display: flex; flex-direction: column; }
.arts-call span + span { font-size: .6em; }

/* songs */
.arts-songs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; width: min(100%, 640px); }
.arts-song img { width: 80px; height: 80px; }
.arts-line { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; width: min(100%, 520px); }
.arts-act { width: 130px; height: 130px; animation: arts-bob 1s ease-in-out infinite; }
.arts-ly { font-size: 1.35rem; font-weight: 700; line-height: 1.35; margin: 0; display: flex; flex-direction: column; gap: 6px; }

/* colour mixing */
.arts-mixw { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.arts-bowl { width: 220px; height: 132px; }
.arts-paint { transition: fill .6s ease; }
.arts-res { min-height: 64px; display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.arts-res img, .arts-goal img { width: 56px; height: 56px; }
.arts-res b, .arts-goal b { display: flex; flex-direction: column; }
.arts-pots { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: min(100%, 560px); }
.arts-pot { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 88px; border: 0; background: none; cursor: pointer; font: inherit; border-radius: 20px; padding: 4px; }
.arts-blob { width: 76px; height: 76px; border-radius: 42% 58% 50% 50% / 50% 46% 54% 50%; background: var(--c); border: 4px solid #3A3350; box-shadow: inset -8px -10px 0 rgba(0, 0, 0, .12), inset 8px 8px 0 rgba(255, 255, 255, .35); transition: transform .15s; }
.arts-on .arts-blob { transform: translateY(-8px) scale(1.06); box-shadow: 0 0 0 5px #fff, 0 0 0 9px #3A3350; }
.arts-goal { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-radius: 22px; background: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .08); }
.arts-goal .arts-blob { width: 60px; height: 60px; }

/* rangoli: chalk outlines on a dark floor, colours fill the mirrored parts */
.arts-rang { width: min(100%, 360px); height: auto; aspect-ratio: 1; touch-action: manipulation; }
.arts-parts [data-part] { fill: rgba(255, 255, 255, .08); stroke: rgba(255, 255, 255, .75); stroke-width: 1.5; stroke-dasharray: 4 3; cursor: pointer; transition: fill .25s; }
.arts-parts [data-part].arts-set { stroke-dasharray: none; stroke: rgba(255, 255, 255, .5); }
.arts-parts [data-part]:focus-visible { outline: none; stroke: #FFD23F; stroke-width: 4; }
.arts-pal { display: grid; grid-template-columns: repeat(4, 60px); gap: 14px; }
.arts-sw { width: 60px; height: 60px; border-radius: 50%; border: 4px solid #3A3350; background: var(--c); cursor: pointer; }
.arts-sw.arts-on { box-shadow: 0 0 0 4px #fff, 0 0 0 8px #6E4BF2; transform: scale(1.08); }

[data-calm="1"] .arts-mvp, [data-calm="1"] .arts-gm svg, [data-calm="1"] .arts-act, [data-calm="1"] .arts-dancing svg, [data-calm="1"] .arts-point::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .arts-mvp, .arts-gm svg, .arts-act, .arts-dancing svg, .arts-point::after { animation: none; } }
@media (max-width: 400px) { .arts-skin { width: 112px; height: 112px; } .arts-pads { gap: 14px; } .arts-ly { font-size: 1.15rem; } }
.arts .q-t { font-size: 1.15rem; } .arts .q-t span { display: block; } .arts .q-t span + span { font-size: .85em; opacity: .8; margin-top: 2px; }
.arts .mt span { display: block; }

/* ---- apps/clock.css ---- */
/* clock: friendly analogue clock + digital pill */
.clock-svg { display: block; width: 100%; height: auto; overflow: visible; }
.clock-rim { fill: var(--w); }
.clock-face { fill: #fff; }
.clock-svg text { font: 800 22px var(--display); fill: var(--ink); text-anchor: middle; }
.clock-smile circle { fill: var(--ink); }
.clock-smile .clock-cheek { fill: var(--berry); opacity: .28; }
.clock-smile path { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.clock-h, .clock-m { transition: transform 500ms var(--ease-over); }
.clock-h line, .clock-m line { stroke-linecap: round; }
.clock-h line { stroke: var(--tomato); }
.clock-m line { stroke: var(--sky-d); }
.clock-svg .clock-hit { stroke: transparent; cursor: pointer; pointer-events: stroke; }
.clock-pin { fill: var(--sun); stroke: var(--ink); stroke-width: 3; }
[data-calm="1"] .clock-h, [data-calm="1"] .clock-m { transition: none; }

.clock-learn { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: center; }
.clock-big { width: min(300px, 82vw); filter: drop-shadow(0 8px 0 var(--wd)); }
.clock-side { display: flex; flex-direction: column; gap: 14px; align-items: stretch; min-width: 220px; }
.clock-dig { margin: 0; padding: 6px 22px; border-radius: 18px; background: var(--ink); color: var(--mango); font: 800 3.4rem/1.1 var(--display); text-align: center; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.clock-dig.pop { animation: pop 420ms var(--spring); }
.clock-side .btn { display: flex; align-items: center; gap: 10px; justify-content: flex-start; min-height: 64px; font-size: 1.2rem; }
.clock-sw { flex: none; width: 34px; height: 12px; border-radius: 6px; background: var(--tomato); }
.clock-mb .clock-sw { width: 46px; height: 8px; background: var(--sky-d); }

.clock-tile { min-height: 0; padding: 10px; }
.clock-tile .clock-svg { width: min(150px, 100%); }
.clock-dg { font: 800 1.3rem var(--display); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.clock-pic { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 auto 14px; padding: 8px 18px; width: fit-content; max-width: 100%; border-radius: var(--r); background: var(--wt); }
.clock-pic img { width: 96px; height: 96px; object-fit: contain; }
.clock-cap { display: flex; flex-direction: column; font: 700 1.3rem/1.2 var(--display); }
.clock-cap b + b { font-weight: 600; font-size: 1.05rem; color: var(--ink-2); }

.clock-lvl { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap; }
.clock-lvl button { min-height: 48px; padding: 6px 16px; border: 2px solid var(--line); border-radius: 999px; background: #fff; font: 700 1rem var(--display); color: var(--ink); cursor: pointer; }
.clock-lvl [aria-pressed="true"] { border-color: var(--w); background: var(--wt); box-shadow: inset 0 -3px 0 var(--w); }

.clock-days { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.clock-day { min-height: 110px; }
.clock-day .lbl b { font-size: 1.35rem; }

@media (max-width: 560px) {
  .clock-side { min-width: 0; width: 100%; flex-direction: row; flex-wrap: wrap; }
  .clock-dig { flex: 1 1 100%; font-size: 2.8rem; }
  .clock-side .btn { flex: 1 1 0; min-height: 96px; flex-direction: column; justify-content: center; gap: 4px; font-size: 1.05rem; }
  .clock-pic img { width: 76px; height: 76px; }
  .clock-days { grid-template-columns: repeat(2, 1fr); }
  .clock-dg { font-size: 1.1rem; }
}
.clock-svg text.clock-q { font-size: 30px; }

/* ---- apps/feel.css ---- */
/* Feel: soft, warm, slow. Pastel peach paper, plum ink, nothing snaps. */
.feel { --fl-paper: #FFF6F0; --fl-ink: #4A3B52; --fl-rose: #F6B8C8; --fl-rose-d: #D98AA1; --fl-sage: #CFE8D8; --fl-slow: 700ms; color: var(--fl-ink); }
.feel .mode[aria-selected="true"] { background: var(--fl-rose); color: var(--fl-ink); box-shadow: inset 0 -5px 0 var(--fl-rose-d); }
.feel .mode[aria-selected="true"] .mt [lang="hi"] { color: var(--fl-ink); }
.feel .mt span + span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.feel .mt span:first-child { font: 700 1.05rem/1.1 var(--display); color: inherit; }
.feel-stage { background: var(--fl-paper); border-radius: var(--r-lg); padding: 16px; min-height: 420px; }
.feel .btn.primary { background: var(--fl-rose); color: var(--fl-ink); box-shadow: inset 0 -5px 0 var(--fl-rose-d); }
.feel .btn span + span, .feel-lb span + span, .feel-big span + span, .feel-idea span + span, .feel-story span + span, .feel-talk p span + span, .feel-ph span + span, .feel-small span + span, .feel .q-t span + span { display: block; font-size: .82em; font-weight: 600; opacity: .8; }
.feel .btn { flex-direction: column; gap: 0; line-height: 1.15; }
.feel-faces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 640px; margin: 0 auto; }
.feel-fb, .feel-tb { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 120px; padding: 12px 6px; border: 0; border-radius: 26px; background: #fff; box-shadow: 0 3px 0 #F1DFD6; color: var(--fl-ink); cursor: pointer; transition: transform var(--dur-base) var(--ease-out), box-shadow var(--fl-slow) ease, opacity var(--fl-slow) ease; }
.feel-fb:active, .feel-tb:active { transform: scale(.97); }
.feel-face { width: min(96px, 24vw); height: auto; }
.feel-lb { font: 700 1rem/1.15 var(--display); text-align: center; }
.feel-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; animation: feel-in var(--fl-slow) var(--ease-out); }
.feel-card .feel-face { width: 160px; }
.feel-big { margin: 0; font: 700 clamp(1.25rem, 1rem + 1.2vw, 1.7rem)/1.25 var(--display); max-width: 30ch; }
.feel-idea { margin: 0; padding: 12px 18px; border-radius: 20px; background: var(--fl-sage); font: 600 1.1rem/1.3 var(--display); max-width: 32ch; }
.feel-hero { width: 140px; height: 140px; }
@keyframes feel-in { from { opacity: 0; transform: translateY(8px); } }

/* signature: Tara the turtle breathing with a soft halo */
.feel-breath { position: relative; display: grid; place-items: center; height: 260px; margin: 4px auto 0; }
.feel-halo { position: absolute; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, #FFE3EA 0%, #FDEFE8 55%, rgba(253, 239, 232, 0) 72%); transform: scale(.72); transition: transform 4s ease-in-out; }
.feel-turtle { position: relative; width: 170px; transform: scale(.78); transition: transform 4s ease-in-out; }
.feel-breath[data-ph="in"] .feel-halo { transform: scale(1.3); }
.feel-breath[data-ph="in"] .feel-turtle { transform: scale(1.12); }
.feel-ph { min-height: 3.2em; margin: 0 0 8px; text-align: center; font: 700 1.5rem/1.2 var(--display); }
.feel-stage .dots { justify-content: center; margin-bottom: 12px; }
.feel .dots i.on { background: var(--fl-rose-d); }

.feel-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 640px; margin: 0 auto; }
.feel-tb img { width: min(84px, 22vw); height: auto; }
.feel-count { display: flex; gap: 10px; min-height: 64px; }
.feel-count span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #fff; font: 800 1.8rem var(--display); animation: feel-in var(--fl-slow) var(--ease-out); }

.feel-scene { display: flex; justify-content: center; gap: 18px; }
.feel-scene img { width: min(110px, 28vw); height: auto; }
.feel-story { margin: 10px auto 16px; max-width: 36ch; text-align: center; font: 700 1.2rem/1.3 var(--display); }
.feel-fb.feel-on { box-shadow: 0 0 0 5px var(--fl-rose); }
.feel-fb.feel-best { box-shadow: 0 0 0 5px #9FD6B6, 0 0 22px 6px rgba(159, 214, 182, .55); }
.feel-talk { margin-top: 14px; text-align: center; }
.feel-talk p { margin: 0 auto 12px; max-width: 36ch; padding: 12px 16px; border-radius: 20px; background: #fff; font: 600 1.1rem/1.35 var(--display); animation: feel-in var(--fl-slow) var(--ease-out); }

.feel-bed { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; align-items: end; height: 110px; margin: 0 auto 16px; max-width: 560px; padding: 0 8px; border-radius: 0 0 24px 24px; background: linear-gradient(transparent 70%, #E7CDB8 70%); }
.feel-plot { display: grid; place-items: end center; height: 100%; }
.feel-plot::after { content: ''; width: 70%; height: 12px; border-radius: 50% 50% 0 0; background: #D7B79E; }
.feel-plot:has(img)::after { display: none; }
.feel-flower { width: 100%; max-width: 72px; height: auto; transform-origin: bottom center; animation: feel-grow 1.4s var(--ease-out); }
@keyframes feel-grow { from { opacity: 0; transform: scale(.2); } }
.feel-tb.feel-did { opacity: .55; }

.feel-mirror { padding: 18px; border-radius: 50%; background: linear-gradient(145deg, #fff, #F3E6F4); box-shadow: 0 0 0 8px #EADCF0; }
.feel-mirror .feel-face { width: 170px; }
.feel-small { font-size: .95rem; max-width: 36ch; }
.feel-small span + span { font-size: .9em; }

.feel button:focus-visible { outline: 4px solid var(--fl-ink); outline-offset: 3px; }
[data-calm="1"] .feel-card, [data-calm="1"] .feel-count span, [data-calm="1"] .feel-talk p { animation: none; }
[data-calm="1"] .feel-flower { animation-duration: 2s; animation-name: feel-fade; }
@keyframes feel-fade { from { opacity: 0; } }
@media (max-width: 420px) {
  .feel-stage { padding: 12px 10px; }
  .feel-faces, .feel-tools { gap: 12px; }
  .feel-faces.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- apps/globe.css ---- */
/* ---------- globe: hello, counting, symbols, map, neighbourhood, desert, trees ---------- */
/* Signature: greetings float as colourful speech bubbles; the map is a little town on a road grid. */
.globe .lbl b { font-size: 1.02rem; }
.globe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px; }
.globe-t { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; padding: 12px 8px; border: 3px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: 0 5px 0 var(--line); cursor: pointer; font: inherit; color: var(--ink); touch-action: manipulation; transition: transform var(--dur-tap); }
.globe-t img { width: min(100px, 24vw); height: auto; aspect-ratio: 1; }
.globe-t:hover { border-color: var(--w); }
.globe-t:active, .globe-bub:active, .globe-num:active, .globe-pl:active { transform: translateY(3px); }
.globe-t.pop, .globe-bub.pop, .globe-num.pop, .globe-pl.pop { animation: pop 420ms var(--spring); }
.globe-flag { display: block; width: 88px; height: 58px; border-radius: 6px; box-shadow: 0 0 0 1.5px rgba(20, 22, 58, .14); overflow: hidden; }

/* hello bubbles */
.globe-bub, .globe-qb { --bc: hsl(var(--h) 80% 93%); --bd: hsl(var(--h) 55% 38%); }
.globe-bub { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 132px; padding: 14px 10px 12px; border: 0; border-radius: 36px 36px 36px 10px; background: var(--bc); box-shadow: inset 0 -5px 0 hsl(var(--h) 60% 82%); cursor: pointer; font: inherit; color: var(--ink); touch-action: manipulation; transition: transform var(--dur-tap); }
.globe-bub:nth-child(even) { border-radius: 36px 36px 10px 36px; }
.globe-bub > b, .globe-qb > b { font: 800 clamp(1.35rem, 1rem + 1.6vw, 1.8rem)/1.15 var(--display); color: var(--bd); overflow-wrap: anywhere; }
.globe-bub > i, .globe-qb > i { font: 600 .9rem/1.2 var(--body); font-style: normal; color: var(--ink-2); }
.globe-bub .lbl { gap: 0; } .globe-bub .lbl b { font: 600 .82rem/1.25 var(--body); color: var(--muted); }
.globe-qb { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 110px; padding: 10px; border-radius: 30px 30px 30px 8px; background: var(--bc); }

/* counting */
.globe-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; font: 700 1rem/1.2 var(--display); }
.globe-pick .lbl { flex-direction: row; gap: 6px; }
.globe-pick select { flex: 1 1 220px; min-height: 52px; max-width: 100%; padding: 8px 12px; border: 3px solid var(--line); border-radius: 16px; background: #fff; font: 600 1.05rem/1.2 var(--body); color: var(--ink); }
.globe-pick select:focus-visible { outline: 3px solid var(--w); outline-offset: 2px; }
.globe-num { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 124px; padding: 10px 6px; border: 3px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: 0 5px 0 var(--line); cursor: pointer; font: inherit; color: var(--ink); touch-action: manipulation; }
.globe-num b { font: 800 2.2rem/1 var(--display); color: var(--w); }
.globe-num span { font: 700 1.2rem/1.2 var(--display); overflow-wrap: anywhere; }
.globe-num i { font: 500 .85rem/1.2 var(--body); font-style: normal; color: var(--muted); }
.globe-num.on { border-color: var(--sun); background: #FFF8D6; }
.globe-nav { display: flex; justify-content: center; margin-top: 18px; }
.globe-nav .lbl { flex-direction: row; gap: 6px; }
.globe-objs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 560px; margin: 0 auto 16px; padding: 12px; border-radius: var(--r); background: var(--wt); }
.globe-objs img { width: clamp(44px, 12vw, 64px); height: auto; }
.globe-dig { font: 800 clamp(2.6rem, 2rem + 3vw, 3.6rem)/1 var(--display); color: var(--w); }

/* symbols */
.globe-c .globe-flag { width: 96px; height: 64px; }
.globe-back { margin: 0 0 12px; }
.globe-back .lbl { flex-direction: row; gap: 6px; }
.globe-card { text-align: center; }
.globe-bigflag .globe-flag { width: min(220px, 64vw); height: auto; margin: 0 auto; border-radius: 12px; }
.globe-name { margin: 12px 0; }
.globe-name .lbl b { font-size: 1.5rem; }
.globe-top { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 520px; margin: 0 auto 16px; padding: 10px 18px; border-radius: 24px; background: var(--wt); }
.globe-top img { width: 76px; height: 76px; }
.globe-top .globe-flag { width: 84px; height: 56px; }
.globe-top .lbl b { font-size: 1.35rem; }

/* map: a 5 x 5 town on a road grid */
.globe-map { position: relative; width: min(100%, 520px); aspect-ratio: 1; margin: 0 auto 16px; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(90deg, transparent 8.5%, #CBD2DF 8.5% 11.5%, transparent 11.5% 28.5%, #CBD2DF 28.5% 31.5%, transparent 31.5% 48.5%, #CBD2DF 48.5% 51.5%, transparent 51.5% 68.5%, #CBD2DF 68.5% 71.5%, transparent 71.5% 88.5%, #CBD2DF 88.5% 91.5%, transparent 91.5%),
    linear-gradient(transparent 8.5%, #CBD2DF 8.5% 11.5%, transparent 11.5% 28.5%, #CBD2DF 28.5% 31.5%, transparent 31.5% 48.5%, #CBD2DF 48.5% 51.5%, transparent 51.5% 68.5%, #CBD2DF 68.5% 71.5%, transparent 71.5% 88.5%, #CBD2DF 88.5% 91.5%, transparent 91.5%), #D5F0C8; }
.globe-pl, .globe-tree, .globe-me { position: absolute; left: 0; top: 0; width: 20%; height: 20%; transform: translate(calc(var(--x) * 100%), calc(var(--y) * 100%)); }
.globe-tree { display: grid; place-items: center; pointer-events: none; }
.globe-tree img { width: 52%; height: auto; opacity: .9; }
.globe-pl { z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px; border: 3px solid transparent; border-radius: 18px; background: rgba(255, 255, 255, .78); cursor: pointer; font: inherit; color: var(--ink); touch-action: manipulation; }
.globe-pl img { width: 62%; height: auto; }
.globe-pl small .lbl b { font: 700 clamp(.58rem, .4rem + .8vw, .82rem)/1.05 var(--body); }
.globe-pl small .lbl b + b { display: none; }
.globe-pl.glow { border-color: var(--sun); box-shadow: 0 0 0 5px rgba(255, 216, 61, .55); }
.globe-me { z-index: 3; display: grid; place-items: center; pointer-events: none; transition: transform 380ms var(--ease-out, ease-out); }
.globe-me::before { content: ''; width: 44%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0 12%, #B9A6FF 30%, #6E4BF2 70%, #3F22B8); box-shadow: 0 4px 0 rgba(20, 22, 58, .25); transform: translate(-40%, -40%); }
.globe-n { position: absolute; z-index: 4; right: 8px; top: 8px; padding: 2px 10px; border-radius: 12px; background: #fff; font: 800 1rem/1.4 var(--display); color: var(--tomato, #E5484D); box-shadow: 0 3px 0 var(--line); }
.globe-pad { display: grid; grid-template-columns: repeat(3, minmax(96px, 120px)); grid-template-areas: '. u .' 'l d r'; justify-content: center; gap: 12px; }
.globe-arrow { position: relative; min-height: 104px; padding: 6px; }
.globe-arrow > b { font: 800 2.4rem/1 var(--display); color: var(--w); }
.globe-up { grid-area: u; } .globe-left { grid-area: l; } .globe-down { grid-area: d; } .globe-right { grid-area: r; }
.globe-pt { position: absolute; right: -4px; bottom: -6px; font-size: 2rem; animation: tap 1.2s ease-in-out 3; }
.globe-o { position: relative; }
@media (max-width: 400px) { .globe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .globe-pad { grid-template-columns: repeat(3, minmax(88px, 1fr)); gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .globe-me { transition: none; } }
[data-calm="1"] .globe-me { transition: none; }

/* ---- apps/life.css ---- */
/* life engine: sort bins, then-and-now, sequence slots, tangram, arrow coding, brushing timer */
.life-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; min-height: 60px; margin-bottom: 18px; }
.life-it { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 108px; min-height: 120px; padding: 8px 4px; background: #fff; border: 3px solid var(--line); border-radius: 22px; box-shadow: 0 5px 0 var(--line); cursor: pointer; font: inherit; color: inherit; touch-action: manipulation; transition: transform .15s; }
.life-it img, .life-slot img { width: 64px; height: 64px; object-fit: contain; pointer-events: none; }
.life-it.on { border-color: var(--w); background: var(--wt); box-shadow: 0 5px 0 var(--wd); transform: translateY(-6px); }
.life-l { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.1; }
.life-l b { font: 700 .95rem/1.1 var(--display); }
.life-l b + b { font: 600 .8rem/1.15 var(--display); color: var(--ink-2); }
.life-bins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 720px; margin-inline: auto; }
.life-bins.b3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.life-bin { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 170px; padding: 12px 6px 10px; border: 3px dashed color-mix(in srgb, var(--w) 55%, #fff); border-top: 8px solid var(--w); border-radius: 10px 10px 28px 28px; background: var(--wt); cursor: pointer; font: inherit; color: inherit; }
.life-bin > img { width: 64px; height: 64px; object-fit: contain; }
.life-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 34px; margin-top: auto; }
.life-in img { width: 32px; height: 32px; object-fit: contain; }
.life-hint { border-color: var(--sun) !important; box-shadow: 0 0 0 6px rgba(255, 216, 61, .55); animation: glow 1.2s ease-in-out 3; }
.life-point { position: relative; }
.life-point::after { content: '👆'; position: absolute; bottom: -12px; right: 2px; font-size: 2.1rem; animation: tap 900ms ease-in-out infinite; pointer-events: none; }
.life-it.wob, .life-bin.wob, .tile.wob, .life-pc.wob, .life-pieces.wob, .life-grid.wob, .life-prog.wob, .life-go.wob { animation: wob 380ms ease; }
.life-bin.pop, .life-slot.pop, .life-prog b.pop, .life-golu.pop { animation: pop 420ms var(--spring); }

/* then and now */
.life-then { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 150px; margin: 0 auto 16px; padding: 12px; border-radius: 26px; background: #F4ECDD; border: 3px solid #D9C6A3; }
.life-then img { width: 96px; height: 96px; object-fit: contain; filter: sepia(.35); }
.choices .tile img { width: 84px; height: 84px; object-fit: contain; }

/* sequence */
.life-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; list-style: none; margin: 0 0 18px; padding: 0; }
.life-slot { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 108px; min-height: 124px; padding: 8px 4px; border: 3px dashed var(--line); border-radius: 22px; background: var(--paper); }
.life-slot.full { border: 3px solid var(--leaf); background: var(--leaf-t); }
.life-n { position: absolute; top: -12px; left: -8px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--w); color: #fff; font: 800 1.05rem/1 var(--display); box-shadow: 0 3px 0 var(--wd); }
.life-slot:not(.full) .life-n { width: 44px; height: 44px; font-size: 1.5rem; top: 50%; left: 50%; transform: translate(-50%, -50%); background: transparent; color: var(--muted); box-shadow: none; }

/* tangram */
.life-tan { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; max-width: 640px; margin-inline: auto; }
.life-board { width: 100%; max-width: 380px; aspect-ratio: 1; margin-inline: auto; background: var(--paper); border-radius: 28px; }
.life-board polygon { fill: #fff; stroke: var(--muted); stroke-width: 1.4; stroke-dasharray: 4 3; stroke-linejoin: round; cursor: pointer; transition: fill .3s; }
.life-board polygon.full { stroke: #fff; stroke-dasharray: none; stroke-width: 1.2; }
.life-board polygon:focus-visible { outline: none; stroke: var(--ink); stroke-width: 2.5; }
.life-board polygon.life-hint { stroke: #E0B400; stroke-width: 3; stroke-dasharray: none; animation: none; box-shadow: none; }
.life-board polygon.life-point { fill: #FFF2A8; }
.life-board.life-made { animation: pop 500ms var(--spring); }
.life-pieces { display: flex; flex-direction: column; flex-wrap: wrap; gap: 12px; }
.life-pc { display: grid; place-items: center; width: 100px; height: 100px; padding: 10px; background: #fff; border: 3px solid var(--line); border-radius: 22px; box-shadow: 0 5px 0 var(--line); cursor: pointer; transition: transform .15s; }
.life-pc svg { width: 100%; height: 100%; }
.life-pc.on { border-color: var(--w); background: var(--wt); box-shadow: 0 5px 0 var(--wd); transform: translateY(-6px); }

/* coding */
.life-code { display: grid; gap: 14px; justify-items: center; max-width: 440px; margin-inline: auto; }
.life-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); width: min(100%, 340px); aspect-ratio: 1; padding: 0; border-radius: 22px; overflow: hidden; background: #CFEFC4; box-shadow: inset 0 0 0 4px #9ED68D; }
.life-cell { display: grid; place-items: center; border: 1px dashed rgba(40, 110, 40, .25); }
.life-cell img { width: 72%; height: 72%; object-fit: contain; }
.life-golu { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 25%; height: 25%; transition: transform .42s cubic-bezier(.3, 1.3, .6, 1); }
.life-golu svg { width: 78%; height: auto; }
.life-prog { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 56px; width: 100%; padding: 8px; border-radius: 18px; background: var(--paper); border: 3px dashed var(--line); }
.life-prog b { display: inline-flex; align-items: center; gap: 2px; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 12px; background: var(--w); color: #fff; font: 800 1.6rem/1 var(--display); }
.life-prog small { font-size: .9rem; }
.life-empty { color: var(--muted); font-size: 1.4rem; align-self: center; }

.life-ar { width: 96px; height: 96px; border-radius: 24px; border: 3px solid var(--line); background: #fff; box-shadow: 0 5px 0 var(--line); font: 800 2.6rem/1 var(--display); color: var(--ink); cursor: pointer; }
.life-ar:active { transform: translateY(3px); }
.life-rep[aria-pressed="true"] { background: var(--sun); border-color: #d9b200; }
.life-rep, .life-undo { font-size: 1.7rem; }
.life-go { min-width: 200px; }

/* brushing */
.life-brush { position: relative; width: min(100%, 300px); margin: 0 auto 16px; }
.life-ring { width: 100%; display: block; }
.life-track, .life-prog-c { fill: none; stroke-width: 8; }
.life-track { stroke: var(--line); }
.life-prog-c { stroke: var(--w); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1s linear; }
.life-q { fill: #FFF6F2; stroke: #fff; stroke-width: 3; transition: fill .4s; }
.life-q.now { fill: #BDEBFF; }
.life-tb { position: absolute; left: 50%; top: 50%; width: 38%; transform: translate(-50%, -50%); pointer-events: none; }
.life-brush.go .life-tb { animation: life-scrub 700ms ease-in-out infinite; }
@keyframes life-scrub { 50% { transform: translate(-40%, -50%) rotate(8deg); } }
.life-bb { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

[data-calm="1"] .life-brush.go .life-tb, [data-calm="1"] .life-point::after { animation: none; }
[data-calm="1"] .life-golu { transition: none; }
@media (prefers-reduced-motion: reduce) { .life-golu, .life-prog-c { transition: none; } .life-brush.go .life-tb { animation: none; } }
@media (max-width: 480px) {
  .life-it, .life-slot { width: calc((100% - 20px) / 3); min-width: 96px; }
  .life-tray, .life-slots { gap: 10px 8px; }
  .life-bins.b3 { gap: 8px; }
  .life-bins.b3 .life-l b { font-size: .85rem; }
  .life-tan { grid-template-columns: 1fr; }
  .life-pieces { flex-direction: row; justify-content: center; }
  .life-pc { width: 96px; height: 96px; }
}
.life-pad { display: grid; grid-template-columns: repeat(3, 96px); gap: 12px; justify-content: center; }
.life-pad .life-go { grid-column: 1 / -1; }
@media (max-width: 480px) { .life-grid { width: min(100%, 250px); } }

/* ---- apps/match.css ---- */
/* match engine */
.match-sil { width: 190px; height: 190px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #fff 0 55%, var(--paper) 56%); box-shadow: inset 0 0 0 4px var(--line); }
.match-sil img { width: 150px; height: 150px; object-fit: contain; filter: brightness(0); opacity: .82; transition: filter 600ms ease, opacity 600ms ease, transform 600ms var(--spring, ease); }
.match-sil.fill img { filter: none; opacity: 1; transform: scale(1.06); }
.match-baby, .match-pair { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 auto 16px; text-align: center; }
.match-baby { flex-direction: column; gap: 4px; }
.match-baby p { margin: 0; font: 700 1.3rem/1.2 var(--display); display: flex; flex-direction: column; }
.match-baby small, .match-a small small { font: 500 .9rem var(--body); color: var(--muted); }
.match-bb { position: relative; width: 130px; height: 130px; display: grid; place-items: center; background: #fff; border: 3px dashed var(--line); border-radius: 50%; }
.match-bb img { width: 104px; height: 104px; object-fit: contain; }
.match-bb img.small { width: 72px; height: 72px; }
.match-bb b { position: absolute; bottom: -4px; right: -4px; font-size: 1.8rem; }
.match-a { display: flex; flex-direction: column; align-items: center; font: 700 1.1rem var(--display); }
.match-a > small { display: flex; flex-direction: column; align-items: center; font: 700 1.1rem/1.2 var(--display); }
.match-a img { width: 110px; height: 110px; object-fit: contain; }
.match-pair > span[aria-hidden] { font: 800 2.4rem var(--display); color: var(--ink-2); }
.match-pair .match-q { width: 96px; height: 96px; display: grid; place-items: center; border: 3px dashed var(--w); border-radius: var(--r); color: var(--w); }
.match-grp, .match-dots, .match-word { position: relative; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 6px; min-height: 170px; padding: 14px; background: #fff; border: 3px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 0 var(--line); cursor: pointer; touch-action: manipulation; transition: transform var(--dur-tap); }
.match-grp img { width: 52px; height: 52px; object-fit: contain; }
.match-grp:active, .match-dots:active, .match-word:active { transform: translateY(4px); }
.match-dots { max-width: 100%; }
.match-dots i { width: 26px; height: 26px; border-radius: 50%; background: var(--w); }
.match-num { font-size: 5rem; margin: 0 0 12px; text-align: center; }
.match-letter { font-size: 5rem; margin: 0 0 12px; text-align: center; }
.match-word { flex-direction: column; min-height: 130px; }
.match-word b { font: 800 clamp(2.4rem, 11vw, 3.6rem)/1 var(--display); color: var(--ink); }
.match-word small { font-size: .9rem; color: var(--muted); }
.choices.match-words.c3 { --c: 3; }
:is(.match-grp, .match-dots, .match-word).right { border-color: var(--leaf); background: var(--leaf-t); box-shadow: 0 6px 0 var(--leaf-d); }
:is(.match-grp, .match-dots, .match-word).hint { border-color: var(--sun); box-shadow: 0 0 0 6px rgba(255, 216, 61, .55), 0 6px 0 #d9b200; }
:is(.match-grp, .match-dots, .match-word).point::after { content: '👆'; position: absolute; bottom: -8px; right: 6px; font-size: 2.4rem; }
:is(.match-grp, .match-dots, .match-word).wob { animation: wob 380ms ease; }
:is(.match-grp, .match-dots, .match-word).pop { animation: pop 420ms var(--spring); }
:is(.match-grp, .match-dots, .match-word):focus-visible { outline: 4px solid var(--w); outline-offset: 3px; }
@media (max-width: 560px) { .match-grp img { width: 38px; height: 38px; } .match-dots i { width: 20px; height: 20px; } .match-sil { width: 160px; height: 160px; } .match-sil img { width: 124px; height: 124px; } .match-word { padding: 10px 4px; } }
[data-calm="1"] .match-sil img { transition: none; }
[data-calm="1"] .match-sil.fill img { transform: none; }
@media (prefers-reduced-motion: reduce) { .match-sil img { transition: none; } }
.match-qt small { display: block; font: 500 .95rem/1.25 var(--body); color: var(--muted); }

/* ---- apps/math1.css ---- */
/* math1: ten-frames, take-away scenes, sticks, rocket, frog, dice, measuring */
.math1 .pop { animation: pop 420ms var(--spring); }
.math1-scene { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 16px; }
.math1-ans:empty { display: none; }
.math1-n { min-height: 112px !important; gap: 2px; }
.math1-n b { font: 800 clamp(2.4rem, 11vw, 3.4rem)/1 var(--display); color: var(--wd); font-variant-numeric: tabular-nums; }
.math1-n small { font: 600 .95rem/1.2 var(--body); color: var(--ink-2); }

/* ten-frame: 2 rows of 5 (five-frame: 1 row) */
.math1-tfb { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 18px; touch-action: manipulation; }
.math1-tf { display: grid; grid-template-columns: repeat(5, var(--cell, clamp(48px, 14vw, 72px))); gap: 0; border: 4px solid var(--ink); border-radius: 14px; background: #fff; overflow: hidden; box-shadow: 0 6px 0 var(--line); }
.math1-tf i { width: 100%; aspect-ratio: 1; border: 2px solid var(--line); position: relative; }
.math1-tf i::after { content: ''; position: absolute; inset: 14%; border-radius: 50%; transform: scale(0); transition: transform var(--dur-base, 200ms) var(--spring); }
.math1-tf i.r::after { background: var(--tomato); box-shadow: inset 0 -5px 0 var(--tomato-d); transform: scale(1); }
.math1-tf i.b::after { background: var(--sky); box-shadow: inset 0 -5px 0 var(--sky-d); transform: scale(1); }
.math1-tfb .math1-tf i:not(.r):not(.b) { background: var(--wt); }
.math1-teen { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; --cell: clamp(28px, 8.4vw, 44px); }
.math1-teen .math1-tf i::after { box-shadow: none; }

/* take away */
.math1-objs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 560px; padding: 14px; border-radius: var(--r); background: var(--leaf-t); }
.math1-apple { background: var(--mango-t); } .math1-fish { background: var(--sky-t); } .math1-butterfly { background: var(--berry-t); }
.math1-o { width: 88px; height: 88px; padding: 6px; border: 0; border-radius: 20px; background: rgba(255, 255, 255, .7); cursor: pointer; transition: transform 700ms ease, opacity 700ms ease; }
.math1-o img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.math1-o.gone { transform: translate(40px, -90px) scale(.6); opacity: 0; }
.math1-apple .math1-o.gone { transform: scale(.2); }
@media (max-width: 420px) { .math1-o { width: 68px; height: 68px; } }

/* sticks and bundles */
.math1-sticks { display: flex; flex-wrap: wrap; gap: 6px 5px; align-items: flex-end; justify-content: center; max-width: 560px; min-height: 120px; padding: 14px; border: 3px dashed var(--line); border-radius: var(--r); background: var(--mango-t); cursor: pointer; }
.math1-st, .math1-bun b { display: block; width: 8px; height: 64px; border-radius: 4px; background: var(--mango); box-shadow: inset -2px 0 0 var(--mango-d); }
.math1-bun { display: flex; gap: 1px; padding: 0 4px; margin-right: 8px; background: linear-gradient(transparent 44%, var(--tomato) 44%, var(--tomato) 56%, transparent 56%); }
.math1-bun b { width: 5px; }

/* countdown */
.math1-launch { display: flex; gap: 12px; align-items: flex-end; justify-content: center; }
.math1-pad { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; max-width: 560px; }
.math1-cd { min-height: 72px !important; padding: 4px; }
.math1-cd b { font-size: clamp(1.6rem, 7vw, 2.4rem); }
.math1-rk { flex: none; width: 64px; height: 260px; display: flex; align-items: flex-end; justify-content: center; border-radius: 32px; background: linear-gradient(var(--sky-t), var(--wt)); }
.math1-rk img { width: 64px; height: 64px; transform: translateY(calc(var(--k, 0) * -150px)) rotate(-45deg); transition: transform 500ms ease; }
.math1-rk.go img { transform: translateY(-700px) rotate(-45deg); opacity: 0; transition: transform 1.4s ease-in, opacity 1.4s ease-in; }
@media (max-width: 480px) { .math1-pad { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } .math1-rk { width: 52px; } .math1-rk img { width: 52px; height: 52px; } }

/* frog on stones */
.math1-pond { display: flex; gap: 8px; align-items: flex-end; justify-content: center; padding: 70px 10px 14px; border-radius: var(--r); background: var(--sky-t); width: 100%; max-width: 560px; }
.math1-stone { position: relative; display: grid; place-items: center; width: 64px; height: 44px; border-radius: 50%; background: var(--leaf); box-shadow: inset 0 -6px 0 var(--leaf-d); font: 800 1.35rem var(--display); color: #fff; }
.math1-stone.q { background: #fff; color: var(--ink); box-shadow: inset 0 -6px 0 var(--line); border: 3px dashed var(--leaf-d); }
.math1-frog { position: absolute; bottom: 30px; left: 0; width: 64px; height: 64px; animation: hop 600ms ease; }
@media (max-width: 420px) { .math1-stone { width: 52px; } .math1-frog { width: 52px; height: 52px; } }

/* quick look */
.math1-flash { position: relative; display: grid; place-items: center; min-width: 200px; min-height: 170px; }
.math1-flash > :first-child { transition: opacity 250ms; }
.math1-flash.hide > :first-child { opacity: 0; }
.math1-cloud { position: absolute; font-size: 7rem; opacity: 0; transition: opacity 250ms; pointer-events: none; }
.math1-flash.hide .math1-cloud { opacity: 1; }
.math1-die { display: grid; grid-template-columns: repeat(3, 44px); gap: 8px; padding: 16px; border-radius: 26px; background: #fff; border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--line); }
.math1-die i { width: 44px; height: 44px; border-radius: 50%; }
.math1-die i.on { background: var(--ink); }
.math1-dots { display: grid; grid-template-columns: repeat(4, 48px); gap: 6px; padding: 12px; border-radius: var(--r); background: var(--wt); }
.math1-dots i { width: 36px; height: 36px; margin: 6px; border-radius: 50%; transform: translate(var(--dx), var(--dy)); }
.math1-dots i.on { background: var(--berry); }
.math1-peek { min-height: 56px; }

/* measuring */
.math1-ruler { --u: min(40px, calc((100vw - 120px) / 8)); max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 14px 14px; border-radius: var(--r); background: var(--wt); border-left: 6px solid var(--ink); }
.math1-thing { position: relative; width: calc(var(--u) * var(--L)); height: calc(var(--u) * 1.6); }
.math1-thing img { position: absolute; left: 50%; top: 50%; width: calc(var(--u) * var(--L) / 1.3); translate: -50% -50%; rotate: var(--rot); pointer-events: none; }
.math1-track { display: flex; min-width: calc(var(--u) * 8); height: calc(var(--u) + 24px); padding: 12px 0; border: 3px dashed var(--line); border-left: 0; border-radius: 0 14px 14px 0; background: #fff; cursor: pointer; }
.math1-track .u { flex: none; width: var(--u); height: var(--u); border-radius: 6px; background: var(--sky); box-shadow: inset 0 -5px 0 var(--sky-d), inset 0 0 0 2px #fff; }
.math1-track.c .u { height: calc(var(--u) * .5); margin-top: calc(var(--u) * .25); border-radius: 999px; background: none; border: 4px solid var(--muted); box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 8px var(--muted); }

.math1-show { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 60px; margin-bottom: 14px; }
.math1-big { font: 800 3.4rem/1 var(--display); color: var(--wd); }
.math1-nums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.math1-nums .btn { min-height: 64px; font-size: 1.6rem; padding: 6px; }

[data-calm="1"] .math1-frog, [data-calm="1"] .math1 .pop { animation: none; }
[data-calm="1"] .math1-o, [data-calm="1"] .math1-rk img { transition-duration: 1ms; }
@media (prefers-reduced-motion: reduce) { .math1-frog, .math1 .pop { animation: none; } }

/* ---- apps/math2.css ---- */
/* math2 (math2.js): measure, race, left/right, crocodile, socks, halves, pictograph, 3D shapes.
   Signature: the chalk-line "ground" every comparison stands on, so size is always read from one base line. */
.m2 { --m2-ground: #8C6A4A; }
.m2-opts { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 16px; margin-top: 8px; }
.m2-opt, .m2-side, .m2-sock, .m2-fr, .m2-row, .m2-cut { position: relative; border: 0; background: var(--paper); border-radius: 20px; box-shadow: inset 0 -5px 0 var(--line); padding: 10px; cursor: pointer; font: inherit; color: inherit; min-width: 96px; min-height: 96px; }
.m2 button:focus-visible { outline: 4px solid var(--focus, #6E4BF2); outline-offset: 3px; }
.m2 .pop { animation: pop 420ms var(--spring); }
.m2 .wob { animation: wob 380ms ease; }
.m2-hint { box-shadow: 0 0 0 6px rgba(255, 216, 61, .7); animation: glow 1.2s ease-in-out 3; }
.m2-point::after { content: '👆'; position: absolute; bottom: -12px; right: -4px; font-size: 2.4rem; animation: tap 900ms ease-in-out infinite; pointer-events: none; }
.m2-right { box-shadow: 0 0 0 6px rgba(53, 193, 107, .55); }
.m2 .lbl span { display: block; font: 700 .95rem/1.2 var(--display); }

/* long / tall / holds: everything stands on the same ground line */
.m2-col { flex-direction: column; align-items: flex-start; max-width: 320px; margin-inline: auto; border-left: 4px dashed var(--m2-ground); padding-left: 0; }
.m2-pen { min-height: 64px; padding: 14px 10px 14px 0; border-radius: 0 20px 20px 0; max-width: 100%; }
.m2-pen svg { display: block; max-width: 100%; height: auto; }
.m2-ground { border-bottom: 5px solid var(--m2-ground); padding-bottom: 0; gap: 28px; }
.m2-tall, .m2-jug { background: none; box-shadow: none; padding: 6px 6px 0; border-radius: 16px 16px 0 0; }
.m2-tall img { display: block; width: auto; max-width: 140px; object-fit: contain; object-position: bottom; }
.m2-jug svg { display: block; height: auto; }

/* seesaw */
.m2-saw { position: relative; width: min(340px, 100%); height: 210px; margin: 0 auto; }
.m2-plank { position: absolute; left: 0; right: 0; top: 70px; height: 110px; display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 12px solid #B7773A; border-radius: 0 0 6px 6px; transition: transform .6s var(--spring); }
.m2-w { background: none; box-shadow: none; padding: 0 4px; }
.m2-w img { width: 104px; height: 104px; object-fit: contain; display: block; }
.m2-w img.m2-big { width: 124px; height: 124px; } .m2-w img.m2-sm { width: 76px; height: 76px; }
.m2-pivot { position: absolute; left: 50%; top: 190px; width: 0; height: 0; margin-left: -22px; border: 22px solid transparent; border-bottom: 26px solid #6B4A2E; border-top: 0; }

/* race */
.m2-track { flex-direction: column; align-items: stretch; gap: 6px; position: relative; padding: 6px 40px 6px 0; background: repeating-linear-gradient(0deg, #F2E6D0 0 60px, #EAD9BA 60px 120px); border-radius: 18px; }
.m2-lane { position: relative; height: 100px; border-bottom: 2px dashed #fff; }
.m2-run { position: absolute; top: 2px; left: calc((100% - 100px) * var(--p)); background: none; box-shadow: none; padding: 0; animation: m2-in .9s ease-out both; }
.m2-run img { width: 92px; height: 92px; object-fit: contain; transform: scaleX(-1); }
.m2-finish { position: absolute; top: 0; bottom: 0; right: 0; width: 36px; background: repeating-conic-gradient(#2B2440 0 25%, #fff 0 50%) 0 0 / 18px 18px; border-radius: 0 18px 18px 0; }
.m2-finish img { position: absolute; top: -30px; left: -4px; width: 44px; }
.m2-badge { position: absolute; top: -4px; right: -4px; width: 32px; height: 32px; border-radius: 50%; background: #FFD24A; font: 800 1.1rem/32px var(--display); color: #4A2A00; opacity: 0; transform: scale(.5); transition: .3s; }
.m2-shown .m2-badge { opacity: 1; transform: none; }
@keyframes m2-in { from { transform: translateX(-60px); opacity: 0; } }

/* left & right */
.m2-kid { position: relative; width: 200px; margin: 0 auto 6px; }
.m2-kid svg { display: block; width: 200px; height: auto; }
.m2-wave { position: absolute; top: -8px; width: 70px; height: 70px; }
.m2-R .m2-wave { right: -12px; } .m2-L .m2-wave { left: -12px; transform: scaleX(-1); }
.m2-wave { animation: m2-wave 1s ease-in-out infinite; transform-origin: 50% 90%; }
.m2-L .m2-wave { animation-name: m2-waveL; }
@keyframes m2-wave { 50% { transform: rotate(14deg); } }
@keyframes m2-waveL { 0%, 100% { transform: scaleX(-1); } 50% { transform: scaleX(-1) rotate(14deg); } }
.m2-lr { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 130px; font: 800 1.2rem/1.2 var(--display); }
.m2-lr > span[aria-hidden] { font-size: 2.2rem; }
.m2-lr span[lang] { display: block; }
.m2-give { display: flex; justify-content: center; margin: 0 0 8px; }
.m2-give img { width: 96px; height: 96px; object-fit: contain; }
.m2-plate { flex-wrap: nowrap; gap: 0; width: min(340px, 100%); margin: 8px auto 0; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #fff 0 56%, #E9EEF5 57% 70%, #fff 71%); box-shadow: 0 6px 0 #D5DAE3, 0 0 0 3px #D5DAE3; overflow: hidden; }
.m2-side { flex: 1; height: 100%; border-radius: 0; background: none; box-shadow: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.m2-side + .m2-side { border-left: 3px dashed #C9CED6; }
.m2-side.m2-right, .m2-side.m2-hint { box-shadow: inset 0 0 0 6px rgba(53, 193, 107, .5); }
.m2-side.m2-hint { box-shadow: inset 0 0 0 6px rgba(255, 216, 61, .8); }
.m2-lbl { font: 800 1rem/1.2 var(--display); color: var(--ink-2); }
.m2-lbl span { display: block; }
.m2-food { width: 76px; height: 76px; object-fit: contain; }

/* crocodile compare */
.m2-vs { flex-wrap: nowrap; align-items: center; gap: 8px; }
.m2-cmp { min-width: 120px; min-height: 120px; display: grid; place-items: center; }
.m2-n { font: 800 3.4rem/1 var(--display); }
.m2-dots { display: grid; grid-template-columns: repeat(3, 22px); gap: 8px; }
.m2-dots b, .m2-pairs b { width: 22px; height: 22px; border-radius: 50%; background: #E0445A; display: block; }
.m2-croc { width: 84px; flex: none; transition: transform .4s var(--spring); }
.m2-croc svg { width: 100%; display: block; }
.m2-croc.m2-eatL { transform: scaleX(-1) scale(1.15); }
.m2-croc.m2-eatR { transform: scale(1.15); }
.m2-sum { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 4px 0 10px; }
.m2-sum .numcard { font-size: 2.4rem; }
.m2-gap { width: 72px; height: 72px; display: grid; place-items: center; border: 4px dashed #3BAA5C; border-radius: 16px; font: 800 2.4rem/1 var(--display); color: #2E8F4B; }
.m2-sign { min-width: 84px; padding: 10px 6px; font: 800 2.6rem/1 var(--display); }

/* socks */
.m2-line { min-height: 70px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 16px 8px 4px; margin-bottom: 10px; border-top: 4px solid #B7773A; border-radius: 6px; }
.m2-pair { display: flex; }
.m2-pair svg { width: 38px; height: 56px; }
.m2-pile { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.m2-sock { background: #FFF7EA; }
.m2-pile .m2-sock svg, .m2-pile svg { width: 64px; height: 92px; }
.m2-alone { box-shadow: 0 0 0 5px #FFD24A; border-radius: 20px; }
.m2-oe { min-width: 130px; font: 800 1.4rem/1.25 var(--display); }
.m2-oe span { display: block; }
.m2-oenum { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 10px; }
.m2-oenum .numcard { font-size: 2.6rem; }
.m2-pairs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 320px; }
.m2-pairs span { display: flex; flex-direction: column; gap: 6px; padding: 5px; border-radius: 12px; background: #FFF1D6; }

/* halves */
.m2-cut { display: block; margin: 4px auto 10px; width: 200px; height: 200px; padding: 16px; }
.m2-cut svg { width: 100%; height: 100%; overflow: visible; }
.m2-cut:disabled { cursor: default; }
.m2-hl, .m2-hr { transition: transform .6s var(--spring); }
.m2-cutdone .m2-hl { transform: translateX(-16px); } .m2-cutdone .m2-hr { transform: translateX(16px); }
.m2-cutdone line { opacity: 0; }
.m2-friends { display: flex; justify-content: center; gap: 48px; }
.m2-friend img { width: 84px; height: 84px; object-fit: contain; display: block; }
.m2-hs svg { width: 110px; height: 110px; display: block; }

/* pictograph */
.m2-basket { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 12px; margin-bottom: 12px; border-radius: 24px; background: repeating-linear-gradient(45deg, #F6E3C3 0 10px, #EFD5A8 10px 20px); min-height: 60px; }
.m2-fr { min-width: 72px; min-height: 72px; padding: 6px; }
.m2-fr img { width: 60px; height: 60px; object-fit: contain; display: block; }
.m2-graph { display: flex; flex-direction: column; gap: 8px; max-width: 460px; margin: 0 auto; }
.m2-row { display: grid; grid-template-columns: 64px repeat(5, 1fr); gap: 4px; align-items: center; min-height: 64px; padding: 6px; width: 100%; }
div.m2-row { cursor: default; }
.m2-key { width: 52px; height: 52px; object-fit: contain; border-right: 3px solid var(--m2-ground); padding-right: 6px; }
.m2-cell { aspect-ratio: 1; max-height: 56px; border-radius: 12px; background: #F3EFE6; display: grid; place-items: center; }
.m2-cell img { width: 80%; height: 80%; object-fit: contain; }

/* 3D shapes */
.m2-sh { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 124px; }
.m2-sh svg, .m2-obj { width: 104px; height: 104px; display: block; object-fit: contain; }
.m2-give.m2-sh svg, .m2-give .m2-obj, .m2-give > svg { width: 130px; height: 130px; }
.m2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.m2-mini { display: flex; gap: 4px; }
.m2-mini svg, .m2-mini img { width: 40px; height: 40px; }

@media (max-width: 420px) {
  .m2-opts { gap: 12px; }
  .m2-cmp { min-width: 104px; min-height: 104px; }
  .m2-croc { width: 64px; }
  .m2-n { font-size: 2.8rem; }
  .m2-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .m2-sh { min-width: 0; }
  .m2-run img { width: 80px; height: 80px; }
  .m2-row { grid-template-columns: 52px repeat(5, 1fr); }
  .m2-key { width: 44px; height: 44px; }
}
[data-calm="1"] .m2-point::after, [data-calm="1"] .m2-hint, [data-calm="1"] .m2-wave, [data-calm="1"] .m2-run { animation: none; }
[data-calm="1"] .m2-plank, [data-calm="1"] .m2-hl, [data-calm="1"] .m2-hr, [data-calm="1"] .m2-croc { transition: none; }
@media (prefers-reduced-motion: reduce) { .m2-wave, .m2-run, .m2-point::after { animation: none; } }
.m2-signs { flex-wrap: nowrap; gap: 12px; }

/* ---- apps/money.css ---- */
/* Money & shop (money.js). Signature: Bholu's striped bazaar awning and the hand-tied price tags. */
.money-cur { display: flex; justify-content: flex-end; gap: 6px; margin: 0 0 8px; }
.money-cur button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--paper); box-shadow: inset 0 -3px 0 var(--line); font: 800 1.35rem/1 var(--display); color: var(--ink-2); cursor: pointer; }
.money-cur button[aria-pressed="true"] { background: #FFD24A; color: #5A3B00; box-shadow: inset 0 -3px 0 #D9A400; }
.money-c { --s: 1; display: inline-grid; place-items: center; width: 108px; height: 108px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; border-radius: 50%; }
.money-c svg { width: calc(100% * var(--s)); height: auto; filter: drop-shadow(0 4px 0 rgba(40, 30, 60, .18)); }
.money-c.money-n { width: 160px; height: 96px; border-radius: 14px; }
.money-c.money-n svg { width: 100%; }
.money-c:focus-visible, .money-item:focus-visible, .money-cur button:focus-visible { outline: 4px solid var(--focus, #6E4BF2); outline-offset: 3px; }
.money-c.pop, .money-item.pop, .money-bholu.pop { animation: pop 420ms var(--spring); }
.money-c.wob, .money-item.wob, .money-tray.wob, .numcard.wob { animation: wob 380ms ease; }
.money-hint { border-radius: 18px; box-shadow: 0 0 0 6px rgba(255, 216, 61, .6); animation: glow 1.2s ease-in-out 3; }
.money-point::after { content: '👆'; position: absolute; bottom: -10px; right: 0; font-size: 2.4rem; animation: tap 900ms ease-in-out infinite; }
.money-right { box-shadow: 0 0 0 6px rgba(53, 193, 107, .5); border-radius: 18px; }

.money-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; justify-items: center; }
.money-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.money-cell .lbl span { display: block; font: 700 .95rem/1.2 var(--display); }
.money-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 8px; }
.money-num { min-width: 110px; font: 800 2rem/1 var(--display); position: relative; }
.money-pile { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; padding: 14px; margin: 4px auto 14px; max-width: 420px; border-radius: 22px; background: repeating-linear-gradient(45deg, #FFF6DD 0 12px, #FFEFC7 12px 24px); }
.money-pile .money-c { cursor: default; width: 92px; height: 92px; }
.money-pile .money-n { width: 140px; height: 84px; }

.money-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 140px; padding: 14px 12px 10px; border: 0; border-radius: 22px; background: var(--paper); box-shadow: inset 0 -5px 0 var(--line); cursor: pointer; font: inherit; }
.money-item img { width: 110px; height: 110px; object-fit: contain; }
.money-item .lbl span { display: block; font: 700 1rem/1.2 var(--display); }
.money-tag { position: absolute; top: 8px; right: -6px; padding: 4px 12px 4px 18px; font: 800 1.35rem/1 var(--display); color: #4A2A00; background: #FFD24A; border-radius: 4px 10px 10px 4px; clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%); transform: rotate(8deg); box-shadow: 0 2px 0 #D9A400; }
.money-tag::before { content: ''; position: absolute; left: 7px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #fff; }

.money-shop { max-width: 560px; margin: 0 auto; }
.money-awn { height: 34px; border-radius: 14px 14px 0 0; background: repeating-linear-gradient(90deg, #FF5C8A 0 34px, #FFF3F6 34px 68px); -webkit-mask: radial-gradient(17px 12px at 17px 100%, #0000 98%, #000) 0 0 / 34px 100%; mask: radial-gradient(17px 12px at 17px 100%, #0000 98%, #000) 0 0 / 34px 100%; }
.money-stall { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 12px 10px 14px; background: #FFF4E0; border-radius: 0 0 22px 22px; margin-bottom: 10px; }
.money-bholu { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 1; min-width: 0; }
.money-bholu img { width: 88px; height: 88px; object-fit: contain; }
.money-say { order: -1; margin: 0; padding: 8px 12px; background: #fff; border-radius: 16px 16px 16px 4px; font: 700 .95rem/1.25 var(--display); box-shadow: 0 2px 0 var(--line); }
.money-say span { display: block; }
.money-want { cursor: default; flex: none; }
.money-tray { position: relative; min-height: 132px; margin: 6px 0 14px; padding: 30px 10px 10px; border-radius: 60px / 26px; background: radial-gradient(ellipse at 50% 30%, #D9A36B, #A8703E); box-shadow: inset 0 6px 14px rgba(0, 0, 0, .25), 0 4px 0 #7C4F26; }
.money-tray.money-over { box-shadow: inset 0 6px 14px rgba(0, 0, 0, .25), 0 0 0 5px #FFD24A; }
.money-sum { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); padding: 2px 14px; border-radius: 999px; background: #fff; font: 800 1.2rem/1.3 var(--display); color: #4A2A00; white-space: nowrap; }
.money-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.money-in .money-c { width: 96px; height: 96px; }
.money-purse { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
@media (max-width: 420px) {
  .money-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .money-c.money-n { width: 150px; height: 90px; }
  .money-item { min-width: 128px; }
}
[data-calm="1"] .money-point::after, [data-calm="1"] .money-hint { animation: none; }

/* ---- apps/name.css ---- */
/* Name engine: write-your-name tracing + Arabic letter tracing */
.name-ask { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 460px; margin: 0 auto; padding: 22px 16px; border-radius: 28px; background: var(--paper, #fff); box-shadow: inset 0 0 0 3px var(--line, #e3e0ee); text-align: center; }
.name-ask label { font: 700 1.2rem/1.3 var(--display, sans-serif); }
.name-ask label [lang="hi"], .name-keep [lang="hi"] { display: block; font-weight: 400; font-size: .9em; }
.name-in { width: 100%; min-height: 72px; padding: 0 18px; border: 3px dashed var(--w, #6E4BF2); border-radius: 20px; background: #fff; font: 700 2.2rem/1 var(--display, sans-serif); text-align: center; letter-spacing: .04em; color: inherit; }
.name-in:focus-visible { outline: 4px solid var(--w, #6E4BF2); outline-offset: 3px; border-style: solid; }
.name-msg { min-height: 1.4em; margin: 0; font-weight: 700; color: #B4235A; }
.name-keep { margin: 0; font-size: .9rem; opacity: .85; }
.name-app { display: flex; flex-direction: column; gap: 12px; }
.name-ribbon { padding: 6px 10px; border-radius: 22px; background: var(--paper, #fff); box-shadow: inset 0 -4px 0 var(--line, #e3e0ee); }
.name-ribbon svg { display: block; width: 100%; max-height: 120px; }
.name-ribbon path, .name-sheet path { fill: none; stroke: #CFC8E2; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: .1 7; }
.name-ribbon path.now { stroke: var(--c); stroke-dasharray: .1 6; stroke-width: 5; }
.name-ribbon path.on { stroke: var(--c); stroke-dasharray: none; stroke-width: 7; transition: stroke .3s; }
.name-rule { stroke: #E9E4F5; stroke-width: .6; stroke-dasharray: 2 2; }
.name-rule.base { stroke: #CFC8E2; stroke-dasharray: none; }
.name-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.name-chip { flex: none; min-width: 60px; height: 60px; padding: 0 10px; border: 0; border-radius: 16px; background: var(--paper, #fff); box-shadow: inset 0 -4px 0 var(--line, #e3e0ee); font: 700 1.8rem/1 'Baloo Bhaijaan 2', system-ui, sans-serif; color: inherit; cursor: pointer; }
.name-chip[aria-pressed="true"] { background: var(--w, #6E4BF2); color: #fff; box-shadow: inset 0 -5px 0 var(--wd, #4B2BC9); }
.name-main { display: flex; gap: 16px; align-items: flex-start; justify-content: center; }
.name-pad { flex: 0 1 460px; min-width: 0; }
.name-pad canvas { display: block; width: 100%; aspect-ratio: 1; border-radius: 28px; background: #fff; box-shadow: inset 0 0 0 3px var(--line, #e3e0ee); touch-action: none; cursor: crosshair; }
.name-side { display: flex; flex-direction: column; gap: 12px; width: 190px; }
.name-side .btn { justify-content: center; min-height: 64px; }
.name-side .btn [lang="hi"], .name-won .btn [lang="hi"] { font-size: .85em; opacity: .85; }
.name-side .replay { align-self: flex-start; }
.name-won { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; padding: 14px; border-radius: 22px; background: rgba(255, 255, 255, .95); box-shadow: 0 6px 22px rgba(40, 20, 90, .16); text-align: center; animation: name-in .35s ease-out; }
.name-won[hidden] { display: none; }
.name-w { margin: 0; flex-basis: 100%; font: 700 1.4rem/1.3 var(--display, sans-serif); }
.name-w b[lang="ar"] { display: block; font-size: 2rem; }
.name-app .dots { display: flex; justify-content: center; gap: 8px; margin: 0; }
.name-app .dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line, #e3e0ee); }
.name-app .dots i.on { background: var(--w, #6E4BF2); }
.name-app button:focus-visible, .name-ask button:focus-visible { outline: 4px solid var(--w, #6E4BF2); outline-offset: 3px; }
.name-sheet { display: none; }
@keyframes name-in { from { opacity: 0; transform: translateY(12px); } }
[data-calm="1"] .name-won { animation: none; }
[data-calm="1"] .name-ribbon path.on { transition: none; }
@media (prefers-reduced-motion: reduce) { .name-won { animation: none; } }
@media (max-width: 640px) {
  .name-main { flex-direction: column; align-items: stretch; }
  .name-pad { flex: none; }
  .name-side { width: auto; flex-direction: row; flex-wrap: wrap; }
  .name-side .btn { flex: 1 1 130px; }
}
@media print {
  body.name-printing > *:not(.name-sheet) { display: none !important; }
  body.name-printing .name-sheet { display: block; }
  .name-sheet h2 { font: 700 20pt/1.2 var(--display, sans-serif); margin: 0 0 10pt; }
  .name-sheet svg { width: 100%; max-height: 24cm; }
  .name-sheet path { stroke: #9a93b0; stroke-width: 2.5; stroke-dasharray: .1 5; }
  .name-sheet path.on { stroke: #6a6380; stroke-dasharray: none; stroke-width: 3; }
  .name-sheet circle { fill: #2e9e5b; }
  .name-sheet .name-rule { stroke: #bbb; }
}
.name-in::placeholder { color: #B9B2CF; font-weight: 500; }
.name-side .btn { flex-direction: column; gap: 0; line-height: 1.15; }
.name-app [hidden] { display: none !important; }

/* ---- apps/play.css ---- */
/* ---------- play: pretend-play role-play games ---------- */
.play-stage .q-t small { display: block; font: 500 1rem/1.3 var(--body, inherit); color: var(--muted); }
.play-grid { margin-top: 14px; }
.play-grid .tile .art { width: 96px; height: 96px; object-fit: contain; }
.play-scene { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 250px; border-radius: 28px; overflow: hidden; background: linear-gradient(#bfe6ff, #eaf7ff 70%, #cdeebf 70%); }
.play-sunny { background: linear-gradient(#ffe38a, #fff5cf 70%, #cdeebf 70%); }
.play-rainy { background: linear-gradient(#9fb3c8, #dbe5ee 70%, #b9d8b0 70%); }
.play-cold { background: linear-gradient(#cfe0ff, #f3f7ff 70%, #ffffff 70%); }
.play-windy { background: linear-gradient(#bfe6ff, #eaf7ff 70%, #cdeebf 70%); }
.play-rainy::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(105deg, transparent 0 22px, rgba(70, 110, 170, .35) 22px 24px); background-size: 100% 200%; animation: play-rain 1.2s linear infinite; pointer-events: none; }
@keyframes play-rain { to { background-position: 0 100%; } }
.play-wx { position: absolute; top: 10px; left: 10px; width: 84px; height: 84px; }
.play-windy .play-wx { animation: play-sway 2.4s ease-in-out infinite; }
@keyframes play-sway { 50% { transform: translateX(10px) rotate(-6deg); } }
.play-kidbox { width: 200px; }
.play-kid { display: block; width: 100%; height: auto; }
.play-skins { position: absolute; right: 10px; top: 10px; display: grid; gap: 8px; }
.play-skin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid #fff; background: var(--sk); box-shadow: 0 3px 0 rgba(0, 0, 0, .15); cursor: pointer; }
.play-skin[aria-pressed="true"] { outline: 4px solid var(--w); outline-offset: 1px; }
.play-pen { position: relative; display: grid; place-items: center; min-height: 220px; border-radius: 28px; background: radial-gradient(circle at 50% 80%, #d9f2c7, #f4fbef 70%); }
.play-clinic { background: radial-gradient(circle at 50% 80%, #dcefff, #f6fbff 70%); }
.play-animal { width: 200px; height: 200px; object-fit: contain; }
.play-munch { animation: play-munch 700ms ease-in-out 2; }
@keyframes play-munch { 25% { transform: scale(1.08, .94); } 50% { transform: scale(.96, 1.05); } 75% { transform: scale(1.05, .97); } }
.play-fly { position: fixed; z-index: 50; object-fit: contain; pointer-events: none; transition: transform 600ms cubic-bezier(.3, -.2, .5, 1), opacity 600ms; }
.play-badge { position: absolute; top: 12px; right: 16px; font-size: 3rem; }
.play-stick { position: absolute; left: 12px; bottom: 10px; display: flex; gap: 4px; }
.play-stick img { width: 48px; height: 48px; object-fit: contain; }
.play-tools .tile { min-height: 140px; }
.play-tub { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px; border-radius: 28px; background: linear-gradient(#e2f5ff, #bfe6ff); min-height: 260px; }
.play-tubpic { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; transform: translate(-50%, -50%); opacity: .95; }
.play-bub { position: relative; width: 100%; min-height: 110px; border: 0; background: none; cursor: pointer; transition: transform 250ms, opacity 250ms; animation: play-float 3s ease-in-out infinite; animation-delay: calc(var(--i) * -.5s); }
.play-bub img { width: 96px; height: 96px; }
.play-bub.gone { transform: scale(0); opacity: 0; animation: none; }
@keyframes play-float { 50% { transform: translateY(-8px); } }
.play-teeth { position: relative; display: grid; place-items: center; min-height: 220px; border-radius: 28px; background: radial-gradient(circle, #fff, #e8f7ff); }
.play-dirt { position: absolute; inset: 30% 36%; background: radial-gradient(circle at 30% 30%, #c9a46a 0 8px, transparent 9px), radial-gradient(circle at 70% 50%, #b99155 0 10px, transparent 11px), radial-gradient(circle at 45% 75%, #c9a46a 0 7px, transparent 8px); transition: opacity 200ms; }
.play-count { position: absolute; top: 10px; right: 18px; font: 700 3rem/1 var(--display); color: var(--w); }
.play-brush { display: flex; margin: 16px auto 0; min-width: 220px; min-height: 110px; }
.play-brush img { width: 64px; height: 64px; }
.play-strip { display: flex; gap: 8px; justify-content: center; list-style: none; padding: 0; margin: 0 0 6px; }
.play-strip li { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; border: 3px dashed var(--line); font: 700 1.3rem var(--display); color: var(--muted); }
.play-strip li.on { border-style: solid; border-color: var(--leaf); background: var(--leaf-t); }
.play-strip img { width: 48px; height: 48px; object-fit: contain; }
.play-stage .pop:not(.tile) { animation: pop 420ms var(--spring); }
.play-stage .tile:disabled { cursor: default; }
@media (max-width: 400px) { .play-strip li { width: 52px; height: 52px; } .play-kidbox { width: 180px; } .play-animal { width: 170px; height: 170px; } }
[data-calm="1"] .play-rainy::before, [data-calm="1"] .play-bub, [data-calm="1"] .play-wx, [data-calm="1"] .play-munch { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .play-rainy::before, .play-bub, .play-wx, .play-munch { animation: none !important; } }
.play-grid .lbl b { overflow-wrap: anywhere; font-size: clamp(.8rem, 3.6vw, 1.05rem); text-align: center; }

/* ---- apps/puzzle.css ---- */
/* ---------- puzzle engine: spot the difference · what's missing · jigsaw · maze ---------- */
.app-puzzle .wob { animation: wob 380ms ease; }
.app-puzzle .pop { animation: pop 420ms var(--spring); }
.puzzle-hint::before { content: ''; position: absolute; inset: 3px; border-radius: 16px; background: rgba(255, 216, 61, .5); box-shadow: 0 0 0 4px var(--sun); pointer-events: none; animation: puzzle-glow 1.2s ease-in-out 3; }
.puzzle-finger { position: absolute; right: 4px; bottom: -6px; font-size: 2.2rem; line-height: 1; pointer-events: none; z-index: 3; animation: tap 900ms ease-in-out infinite; }
@keyframes puzzle-glow { 50% { opacity: .35; } }

/* spot the difference */
.puzzle-spot { display: grid; gap: 12px; }
@media (min-width: 720px) { .puzzle-spot { grid-template-columns: 1fr 1fr; } }
.puzzle-scene { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); aspect-ratio: 3 / 2; border: 3px solid var(--line); border-radius: var(--r); overflow: hidden; background: #DCF1FF; }
.puzzle-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.puzzle-slot { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; padding: 4px; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
.puzzle-slot img { width: 68%; max-width: 110px; height: auto; pointer-events: none; }
.puzzle-slot img:nth-child(2), .puzzle-slot img:has(+ img) { width: 44%; }
.puzzle-hue { filter: hue-rotate(170deg) saturate(1.8); }
.puzzle-slot::after { content: ''; position: absolute; inset: 6% 10%; border: 5px solid var(--tomato); border-radius: 50%; opacity: 0; transform: scale(1.4); transition: transform var(--dur-enter) var(--ease-over), opacity var(--dur-quick); pointer-events: none; }
.puzzle-slot.puzzle-found::after { opacity: 1; transform: none; }

/* what's missing */
.puzzle-row { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 18px 12px; background: var(--wt); border-radius: var(--r); overflow: hidden; }
.puzzle-item { display: grid; place-items: center; width: 96px; height: 96px; background: #fff; border: 3px solid var(--line); border-radius: 20px; font: 800 2.6rem/1 var(--display); color: var(--muted); }
.puzzle-item img { width: 76px; height: 76px; }
.puzzle-gap { border-style: dashed; border-color: var(--w); }
.puzzle-curtain { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, #E8553A 0 26px, #C9412A 26px 52px); border-bottom: 10px solid var(--sun); transform: scaleY(0); transform-origin: top; transition: transform 700ms var(--ease-out); z-index: 2; }
.puzzle-shut .puzzle-curtain { transform: scaleY(1); }
.puzzle-act { display: flex; justify-content: center; margin-top: 16px; }
.puzzle-act .btn [lang] + [lang] { font-size: .9em; }
.app-puzzle .choices { margin-top: 16px; }

/* jigsaw */
.puzzle-jig { --b: min(300px, 74vw); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.puzzle-board { position: relative; display: grid; grid-template-columns: repeat(var(--c), 1fr); grid-template-rows: repeat(var(--rw), 1fr); gap: 3px; width: var(--b); height: var(--b); padding: 3px; box-sizing: content-box; background: var(--line); border-radius: 16px; }
.puzzle-board::before { content: ''; position: absolute; inset: 3px; background: var(--img) center / 100% 100% no-repeat; opacity: var(--ghost); filter: grayscale(1); pointer-events: none; }
.puzzle-hole { position: relative; padding: 0; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .35); cursor: pointer; overflow: visible; }
.puzzle-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 100%; }
.puzzle-piece { box-sizing: border-box; width: calc(var(--b) / var(--c) * .82); height: calc(var(--b) / var(--rw) * .82); min-width: 76px; min-height: 76px; padding: 0; border: 3px solid #fff; border-radius: 12px; background-color: #fff; background-image: var(--img); background-size: calc(var(--c) * 100%) calc(var(--rw) * 100%); background-repeat: no-repeat; box-shadow: 0 5px 0 var(--line), 0 0 0 2px var(--line); cursor: pointer; touch-action: manipulation; transition: transform var(--dur-quick) var(--ease-out); }
.puzzle-piece.puzzle-sel { transform: translateY(-8px) scale(1.06); box-shadow: 0 0 0 4px var(--w), 0 10px 0 var(--line); }
.puzzle-hole .puzzle-piece { width: 100%; height: 100%; min-width: 0; min-height: 0; border: 0; border-radius: 6px; box-shadow: none; }
.puzzle-done .puzzle-board { gap: 0; background: #fff; box-shadow: 0 0 0 6px var(--sun); }
.puzzle-done .puzzle-hole, .puzzle-done .puzzle-hole .puzzle-piece { border-radius: 0; }
.puzzle-done .puzzle-board::before { opacity: 0; }

/* maze */
.puzzle-maze { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(340px, 86vw); aspect-ratio: 1; margin: 0 auto; background: #fff; border: 4px solid var(--ink); border-radius: 14px; overflow: hidden; }
.puzzle-cell { position: relative; border: 0 solid var(--ink); display: grid; place-items: center; }
.puzzle-cell.puzzle-trail { background: var(--wt); }
.puzzle-mango { width: 78%; height: auto; }
.puzzle-cell.puzzle-path::after { content: ''; position: absolute; width: 36%; height: 36%; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px var(--mango); animation: puzzle-glow 1.2s ease-in-out 3; }
.puzzle-golu { position: absolute; left: 0; top: 0; width: calc(100% / var(--n)); height: calc(100% / var(--n)); display: grid; place-items: center; transform: translate(calc(var(--x) * 100%), calc(var(--y) * 100%)); transition: transform 220ms var(--ease-out); pointer-events: none; z-index: 2; }
.puzzle-golu svg { width: 88%; height: 88%; }
.puzzle-bump svg { animation: puzzle-bump 300ms ease; }
@keyframes puzzle-bump { 40% { transform: translate(var(--bx), var(--by)) scale(.94); } }
.puzzle-pad { display: grid; grid-template-columns: repeat(3, 96px); grid-template-rows: repeat(2, 88px); gap: 10px; justify-content: center; margin-top: 16px; }
.puzzle-arrow { border: 0; border-radius: 22px; background: var(--w); box-shadow: inset 0 -6px 0 var(--wd); font-size: 2.4rem; line-height: 1; cursor: pointer; touch-action: manipulation; transition: transform var(--dur-tap); }
.puzzle-arrow:active { transform: translateY(3px); }
.puzzle-arrow[data-k="ArrowUp"] { grid-column: 2; }
.puzzle-arrow[data-k="ArrowLeft"] { grid-column: 1; grid-row: 2; }
.puzzle-arrow[data-k="ArrowDown"] { grid-column: 2; grid-row: 2; }
.puzzle-arrow[data-k="ArrowRight"] { grid-column: 3; grid-row: 2; }

[data-calm="1"] .app-puzzle *, [data-calm="1"] .app-puzzle *::before, [data-calm="1"] .app-puzzle *::after { animation: none !important; transition-duration: 1ms !important; }
@media (prefers-reduced-motion: reduce) { .app-puzzle *, .app-puzzle *::before, .app-puzzle *::after { animation: none !important; transition-duration: 1ms !important; } }
.app-puzzle .q-t [lang] + [lang] { display: block; margin-top: 2px; font-size: .7em; color: var(--ink-2); }

/* ---- apps/read1.css ---- */
/* read1: early reading. Signature: the sound train (letter carriages that squeeze together to blend). Letters use the teaching font. */
.read1 .read1-w, .read1-l, .read1-lt, .read1-cl, .read1-word, .read1-e, .read1-snd b, .read1-mini figcaption b, .read1-wd b, .read1-big { font-family: var(--teach); }
.read1 .read1-w b, .read1-mini figcaption b b, .read1 .lbl b b { color: var(--tomato-d); background: var(--tomato-t); border-radius: 6px; padding: 0; margin: 0; display: inline; font: inherit; font-weight: 800; }

/* the key picture strip above a question */
.read1-key { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 14px; padding: 8px 16px; width: fit-content; max-width: 100%; border-radius: var(--r); background: var(--wt); }
.read1-l { font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--wd); }
.read1-kp { width: 84px; height: 84px; object-fit: contain; flex: none; }
.read1-kw { display: flex; flex-direction: column; min-width: 0; }
.read1-kw .read1-w { font-size: 1.7rem; line-height: 1.1; font-weight: 700; }
.read1-kw small { font: 600 1rem/1.25 var(--display); color: var(--ink-2); }

/* clap the syllables */
.read1-syl { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin-bottom: 6px; }
.read1-fig { margin: 0; display: flex; flex-direction: column; align-items: center; }
.read1-fig img { width: 120px; height: 120px; object-fit: contain; }
.read1-fig .lbl b { font-size: 1.4rem; }
.read1-drum { position: relative; width: 132px; height: 132px; border-radius: 50%; border: 0; background: radial-gradient(circle at 50% 40%, var(--mango-t) 0 55%, var(--mango) 56%); box-shadow: 0 8px 0 var(--mango-d); cursor: pointer; touch-action: manipulation; }
.read1-drum:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--mango-d); }
.read1-drum.pop { animation: pop 300ms var(--spring); }
.read1-dr { font-size: 4rem; line-height: 1; }
.read1-beats { position: absolute; left: 0; right: 0; bottom: -26px; display: flex; gap: 6px; justify-content: center; }
.read1-beats i { width: 14px; height: 14px; border-radius: 50%; background: var(--w); }
.read1-how { text-align: center; margin: 26px 0 10px; font: 700 1.1rem var(--display); color: var(--ink-2); }
.read1-how span + span { font-weight: 600; }
.read1-parts { display: none; justify-content: center; gap: 8px; margin: 0 0 10px; min-height: 2.4rem; opacity: 0; }
.read1-parts.on { display: flex; opacity: 1; }
.read1-parts span { padding: 2px 12px; border-radius: 12px; background: var(--paper); font: 700 1.5rem/1.5 var(--teach); color: var(--muted); transition: background var(--dur-quick), color var(--dur-quick), transform var(--dur-base) var(--ease-over); }
.read1-parts span.lit { background: var(--sun); color: var(--ink); transform: scale(1.12); }
.choices .read1-n { min-height: 130px; gap: 2px; }
.read1-claps { font-size: 1.5rem; letter-spacing: -2px; }
.read1-big { font-size: 2.6rem; font-weight: 700; line-height: 1; }

/* letters grid (learn modes) */
.read1-abc { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.read1-dg { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.read1-lt { min-height: 72px; border: 3px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 4px 0 var(--line); font-size: 1.6rem; font-weight: 700; color: var(--ink); cursor: pointer; touch-action: manipulation; }
.read1-dg .read1-lt { min-height: 96px; font-size: 2.4rem; }
.read1-lt.on { border-color: var(--w); background: var(--wt); box-shadow: 0 4px 0 var(--wd); }
.read1-show { margin-top: 16px; min-height: 40px; }
.read1-snd { text-align: center; margin: 0 0 10px; font: 600 1.2rem var(--display); color: var(--ink-2); }
.read1-snd b { font-size: 2rem; color: var(--wd); margin-right: 6px; }
.read1-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.read1-mini { margin: 0; display: flex; flex-direction: column; align-items: center; padding: 8px; border-radius: var(--r); background: var(--paper); text-align: center; }
.read1-mini img { width: 88px; height: 88px; object-fit: contain; }
.read1-mini figcaption { display: flex; flex-direction: column; }
.read1-mini figcaption b { font-size: 1.4rem; line-height: 1.2; }
.read1-mini figcaption small, .read1-mini .lbl b + b { font: 600 .95rem var(--display); color: var(--ink-2); }

/* the sound train (signature) */
.read1-train { display: flex; align-items: flex-end; gap: 8px; margin: 10px auto 18px; max-width: 520px; padding-bottom: 6px; background: linear-gradient(var(--ink-2), var(--ink-2)) bottom / 100% 4px no-repeat; transition: gap var(--dur-enter) var(--ease-out); }
.read1-car { position: relative; flex: 1 1 0; min-width: 0; min-height: 112px; padding: 8px 4px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 3px solid var(--line); border-radius: 18px 18px 10px 10px; background: #fff; box-shadow: 0 5px 0 var(--line); cursor: pointer; touch-action: manipulation; transition: background var(--dur-quick), border-color var(--dur-quick), transform var(--dur-base) var(--ease-out); }
.read1-cl { font-size: 3rem; font-weight: 700; line-height: 1; color: var(--ink); }
.read1-car small { font: 700 .95rem var(--display); color: var(--muted); }
.read1-wh { position: absolute; left: 10px; right: 10px; bottom: -11px; height: 20px; background: radial-gradient(circle, var(--ink) 0 7px, var(--paper) 8px 10px, transparent 11px) left / 20px 20px no-repeat, radial-gradient(circle, var(--ink) 0 7px, var(--paper) 8px 10px, transparent 11px) right / 20px 20px no-repeat; }
.read1-car:nth-child(1) { --c: var(--tomato); --ct: var(--tomato-t); } .read1-car:nth-child(2) { --c: var(--sun); --ct: #FFF6C8; } .read1-car:nth-child(3) { --c: var(--sky); --ct: var(--sky-t); }
.read1-car.on { border-color: var(--c); background: var(--ct); box-shadow: 0 5px 0 var(--c); }
.read1-car.on small { color: var(--ink); }
.read1-car.nudge { animation: glow 1.2s ease-in-out 2; }
.read1-car.pop { animation: pop 380ms var(--spring); }
.read1-eng { flex: 0 0 88px; min-height: 112px; border: 3px solid var(--wd); border-radius: 18px 36px 10px 10px; background: var(--w); box-shadow: 0 5px 0 var(--wd); cursor: pointer; touch-action: manipulation; }
.read1-eng span { display: inline-block; font-size: 3.2rem; transform: scaleX(-1); }
.read1-eng.ready { box-shadow: 0 0 0 6px rgba(255, 216, 61, .7), 0 5px 0 var(--wd); animation: glow 1.2s ease-in-out 3; }
.read1-eng:disabled { cursor: default; }
.read1-train.go, .read1-train.done { gap: 0; }
.read1-train.go .read1-car, .read1-train.done .read1-car { border-radius: 10px; }
.read1-train.go { animation: read1-chug 900ms var(--ease-out); }
@keyframes read1-chug { 0% { transform: translateX(0); } 40% { transform: translateX(12px); } 100% { transform: translateX(0); } }
.read1-out { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.read1-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.read1-wd { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 112px; padding: 6px; border: 3px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 4px 0 var(--line); cursor: pointer; touch-action: manipulation; }
.read1-wi { width: 56px; height: 56px; object-fit: contain; }
.read1-wd b { font-size: 1.5rem; line-height: 1.1; }

/* magic e */
.read1-mag { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.read1-ba { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.read1-ba .read1-mini { flex: 1 1 0; max-width: 170px; opacity: .55; transition: opacity var(--dur-base), transform var(--dur-base) var(--ease-over); }
.read1-ba .read1-mini.now { opacity: 1; background: var(--wt); transform: scale(1.04); }
.read1-after img { filter: grayscale(1); } .read1-after.now img { filter: none; }
.read1-arr { font-size: 1.8rem; color: var(--muted); }
.read1-word { display: flex; align-items: flex-end; gap: 4px; margin: 0; font-size: 3.6rem; font-weight: 700; line-height: 1.1; }
.read1-word span { display: inline-block; min-width: .6em; text-align: center; transition: color var(--dur-base), transform var(--dur-base) var(--ease-over); }
.read1-slot { min-width: .7em; border-bottom: 5px dashed var(--line); color: var(--berry); }
.read1-mag.done .read1-slot { border-color: transparent; }
.read1-mag.done .read1-v { color: var(--berry-d); transform: translateY(-6px) scale(1.15); }
.read1-e { position: relative; width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--berry-d); background: var(--berry); color: #fff; box-shadow: 0 6px 0 var(--berry-d); font-size: 3.6rem; font-weight: 700; line-height: 1; cursor: pointer; touch-action: manipulation; }
.read1-e:disabled { opacity: .35; cursor: default; }
.read1-spark { position: absolute; top: -6px; right: -6px; font-size: 1.8rem; }
.read1-mag.done .read1-spark { animation: read1-tw 700ms ease-out 2; }
@keyframes read1-tw { 50% { transform: scale(1.5) rotate(20deg); opacity: .6; } }

@media (max-width: 420px) {
  .read1-key { gap: 8px; padding: 8px 10px; }
  .read1-kp { width: 64px; height: 64px; }
  .read1-l { font-size: 2rem; }
  .read1-drum { width: 112px; height: 112px; }
  .read1-fig img { width: 96px; height: 96px; }
  .read1-eng { flex-basis: 72px; }
  .read1-eng span { font-size: 2.6rem; }
  .read1-cl { font-size: 2.5rem; }
  .read1-word { font-size: 3rem; }
  .read1-mini img { width: 72px; height: 72px; }
}
[data-calm="1"] .read1-train.go, [data-calm="1"] .read1-mag.done .read1-spark, [data-calm="1"] .read1-eng.ready, [data-calm="1"] .read1-car.nudge { animation: none; }
[data-calm="1"] .read1-parts span, [data-calm="1"] .read1-car, [data-calm="1"] .read1-train, [data-calm="1"] .read1-ba .read1-mini, [data-calm="1"] .read1-word span { transition: none; }
@media (prefers-reduced-motion: reduce) { .read1-train.go, .read1-mag.done .read1-spark { animation: none; } }

/* ---- apps/read2.css ---- */
/* ---- read2: early reading. Signature: the word strip, a row of letter blocks with one dashed empty block waiting for the child. ---- */
.read2 { max-width: 860px; margin-inline: auto; }
.read2-2 { display: block; font-size: .78em; font-weight: 600; color: var(--muted); }
.read2-card { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px auto 18px; padding: 16px 14px 18px; max-width: 560px; border-radius: var(--r-lg); background: var(--sheet); box-shadow: 0 2px 0 var(--line), inset 0 -6px 0 var(--wt); text-align: center; }
.read2-pic { width: clamp(112px, 34vw, 160px); height: auto; aspect-ratio: 1; object-fit: contain; }
.read2-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 4px 0 0; }
.read2-cell { display: grid; place-items: center; min-width: 64px; height: 76px; padding: 0 10px; border-radius: 16px; background: var(--wt); color: var(--ink); font: 800 clamp(2.2rem, 10vw, 3rem)/1 var(--teach); box-shadow: inset 0 -5px 0 rgba(20, 22, 58, .12); }
.read2-strip[lang="hi"] .read2-cell { font-family: var(--display); line-height: 1.3; }
.read2-gap { background: var(--sheet); color: var(--muted); border: 3px dashed var(--w); box-shadow: none; }
.read2-gap.read2-in, .read2-in { background: var(--leaf-t); border: 3px solid var(--leaf); color: var(--leaf-d); animation: read2-in .45s var(--spring, ease-out); }
.read2-art { min-width: 88px; }
.read2-word { font: 800 clamp(1.9rem, 8vw, 2.6rem)/1 var(--teach); }
.read2-name { margin: 2px 0 0; font: 700 1.15rem/1.25 var(--display); }
.read2-glyph { display: block; font: 800 clamp(2.6rem, 12vw, 3.6rem)/1.15 var(--teach); color: var(--ink); }
.read2-glyph[lang="hi"] { font-family: var(--display); }
.read2-o { min-height: 120px; }
.read2-o .read2-pic { width: 100%; max-width: 140px; }
.read2-aan { max-width: 440px; margin-inline: auto; }
/* build a sentence */
.read2-slots { display: flex; justify-content: center; gap: 8px; margin: 6px 0 18px; }
.read2-slot { flex: 1 1 0; max-width: 130px; min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 96px; padding: 6px 4px; border: 3px dashed var(--line); border-radius: 18px; font: 800 1.5rem/1.1 var(--teach); }
.read2-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.read2-wc { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 104px; min-height: 112px; padding: 10px 14px; border: 3px solid var(--line); border-radius: 20px; background: var(--sheet); box-shadow: 0 5px 0 var(--line); color: var(--ink); font: 800 1.7rem/1.1 var(--teach); cursor: pointer; transition: transform .12s; }
.read2-words[lang="hi"] .read2-wc, .read2-slots[lang="hi"] .read2-slot { font-family: var(--display); }
.read2-wc:active { transform: translateY(3px); }
.read2-wc:disabled { opacity: 0; pointer-events: none; }
.read2-wc.hint { border-color: var(--sun); box-shadow: 0 0 0 6px rgba(255, 216, 61, .55), 0 5px 0 #d9b200; }
.read2-wc.point::after { content: '👆'; position: absolute; bottom: -10px; right: 2px; font-size: 2.2rem; animation: tap 900ms ease-in-out infinite; }
.read2-mini { width: 48px; height: 48px; object-fit: contain; }
.read2-done { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 18px; text-align: center; }
.read2-sent { margin: 6px 0 0; font: 800 clamp(1.6rem, 6.5vw, 2.2rem)/1.35 var(--teach); color: var(--ink); text-align: center; }
.read2-sent[lang="hi"] { font-family: var(--display); }
/* sentence reader */
.read2-read { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.read2-w { min-height: 56px; padding: 2px 8px; border: 0; border-radius: 12px; background: none; color: var(--muted); font: inherit; cursor: pointer; transition: color .2s, background-color .2s; }
.read2-w.on { color: var(--ink); background: var(--sun); }
.read2-card .btn { margin-top: 8px; }
/* syllable grid */
.read2-h { margin: 4px 0 14px; text-align: center; font: 800 clamp(1.2rem, 4.6vw, 1.6rem)/1.25 var(--display); }
.read2-grid { display: flex; flex-direction: column; gap: 10px; }
.read2-row { display: grid; grid-template-columns: 56px repeat(8, minmax(0, 1fr)); gap: 8px; }
.read2-grid[lang="en"] .read2-row { grid-template-columns: 56px repeat(5, minmax(0, 1fr)); }
.read2-s, .read2-play { min-width: 0; min-height: 64px; border: 0; border-radius: 16px; background: var(--sheet); box-shadow: inset 0 -5px 0 var(--wt), 0 2px 0 var(--line); color: var(--ink); font: 800 1.8rem/1 var(--display); cursor: pointer; }
.read2-grid[lang="en"] .read2-s { font-family: var(--teach); }
.read2-play { background: var(--w); color: #fff; box-shadow: 0 4px 0 var(--wd); font-size: 1.3rem; }
.read2-s.on { background: var(--sun); }
/* matra */
.read2-matra { margin: 0 auto 12px; width: max-content; padding: 4px 22px; border-radius: 18px; background: var(--wt); font: 800 2.6rem/1.3 var(--display); }
.read2-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 8px; }
.read2-chip { min-width: 64px; min-height: 64px; border: 3px solid var(--line); border-radius: 16px; background: var(--sheet); font: 800 1.8rem/1 var(--display); color: var(--ink); cursor: pointer; }
.read2-chip[aria-pressed="true"] { border-color: var(--w); background: var(--wt); }
.read2-hw { font-size: 1.5em; }
.read2 button:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }
@keyframes read2-in { from { transform: scale(.6); opacity: .3; } to { transform: none; opacity: 1; } }
[data-calm="1"] .read2-in, [data-calm="1"] .read2-wc.point::after { animation: none; }
@media (max-width: 700px) {
  .read2-row { grid-template-columns: 56px repeat(4, minmax(0, 1fr)); }
  .read2-play { grid-row: span 2; }
}
@media (max-width: 420px) {
  .read2-cell { min-width: 54px; height: 66px; }
  .read2-row, .read2-grid[lang="en"] .read2-row { grid-template-columns: 56px repeat(3, minmax(0, 1fr)); }
  .read2-play { grid-row: span 3; }
  .read2-grid[lang="en"] .read2-play { grid-row: span 2; }
  .read2-s { min-height: 64px; }
  .read2-chip { min-width: 54px; min-height: 58px; font-size: 1.5rem; }
  .read2-slot { font-size: 1.2rem; }
  .read2-wc { min-width: 92px; min-height: 100px; font-size: 1.45rem; }
}

/* ---- apps/rhymes.css ---- */
/* ---------- rhymes: sing-along ---------- */
.rhy-pick { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.rhy-chip { flex: none; scroll-snap-align: start; display: flex; align-items: center; gap: 8px; width: 196px; min-height: 76px; padding: 8px 12px 8px 8px; border: 0; border-radius: 20px; background: var(--sheet); box-shadow: inset 0 0 0 2px var(--line), inset 0 -5px 0 var(--line); text-align: left; cursor: pointer; font: 700 1rem/1.1 var(--display); color: var(--ink); transition: transform var(--dur-tap); }
.rhy-chip img { width: 56px; height: 56px; flex: none; object-fit: contain; }
.rhy-chip small { display: block; margin-top: 2px; font: 600 .82rem/1.15 var(--body); color: var(--muted); }
.rhy-chip[aria-current="true"] { background: var(--wt); box-shadow: inset 0 0 0 3px var(--w), inset 0 -6px 0 var(--w); }
.rhy-chip:active { transform: translateY(3px); }
.rhy-body .q-t small { display: block; font: 600 1rem/1.2 var(--body); color: var(--muted); }

.rhy-scene { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 420px; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(#BFE6FF, #EAF7FF 70%, #D6F2DF 70%); box-shadow: inset 0 -8px 0 rgba(20, 22, 58, .08); }
.rhy-scene[data-sky="night"] { background: radial-gradient(circle at 18% 22%, #fff 0 1.5px, transparent 2.5px) 0 0 / 70px 60px, radial-gradient(circle at 60% 70%, #FFE9A8 0 1.5px, transparent 2.5px) 0 0 / 90px 80px, linear-gradient(#1D1B4E, #3B2F86 75%, #2A2466); }
.rhy-scene[data-sky="meadow"] { background: linear-gradient(#BDE7FF, #E9F7FF 62%, #A9E3B9 62%, #7FD39A); }
.rhy-scene[data-sky="water"] { background: linear-gradient(#C9ECFF, #EAF7FF 45%, #7CCBF2 45%, #3E9FD6); }
.rhy-scene[data-sky="rain"] { background: repeating-linear-gradient(105deg, transparent 0 22px, rgba(255, 255, 255, .35) 22px 24px), linear-gradient(#9FB4CC, #D5E1EC 72%, #BFDCC7 72%); }
.rhy-thing { position: absolute; width: 30%; min-width: 96px; max-width: 150px; aspect-ratio: 1; padding: 6px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .28); transform: translate(-50%, -50%); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rhy-thing img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(20, 22, 58, .18)); }
.rhy-thing.hit img { animation: rhy-hit 700ms var(--ease-out); }
.rhy-bub { position: absolute; left: 50%; bottom: 88%; z-index: 2; padding: 5px 12px; border-radius: 14px; background: #fff; color: var(--ink); font: 700 .95rem/1.15 var(--display); width: max-content; max-width: 150px; text-align: center; box-shadow: 0 3px 0 var(--line); opacity: 0; transform: translate(-50%, 6px); pointer-events: none; }
.rhy-thing.hit .rhy-bub { animation: rhy-bub 1600ms ease forwards; }
@keyframes rhy-hit { 0% { transform: scale(1); } 25% { transform: scale(1.18) rotate(-8deg); } 50% { transform: scale(1.1) rotate(7deg); } 75% { transform: scale(1.04) rotate(-3deg); } 100% { transform: none; } }
@keyframes rhy-bub { 0% { opacity: 0; transform: translate(-50%, 6px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }

.rhy-act { position: absolute; left: 50%; top: 10px; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 6px 16px 6px 8px; border-radius: 999px; background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 #d9b200; transform: translateX(-50%); white-space: nowrap; }
.rhy-act img { width: 44px; height: 44px; }
.rhy-act b { font: 800 1.15rem/1 var(--display); }
.rhy-act b small { font: 600 .85rem var(--body); margin-left: 4px; }
.rhy-act.pop { animation: rhy-in 420ms var(--spring); }
.rhy-turn { font-size: 1.8rem; line-height: 1; }
@keyframes rhy-in { 0% { opacity: 0; transform: translateX(-50%) scale(.7); } 100% { opacity: 1; transform: translateX(-50%) scale(1); } }

.rhy-ctl { display: flex; justify-content: center; margin: 16px 0 12px; }
.rhy-ctl .btn.huge { min-width: 220px; min-height: 84px; }
.rhy-ctl .btn small { font-size: .95rem; opacity: .9; margin-left: 4px; }

.rhy-lyr { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rhy-lyr button { position: relative; display: block; width: 100%; min-height: 60px; padding: 26px 16px 10px; border: 0; border-radius: 18px; background: var(--paper); text-align: left; color: var(--ink-2); cursor: pointer; transition: background var(--dur-quick), color var(--dur-quick); }
.rhy-t { display: block; font: 700 clamp(1.2rem, 1rem + 1vw, 1.55rem)/1.25 var(--teach); }
.rhy-lyr [lang="hi"] .rhy-t, .rhy-lyr[lang="hi"] .rhy-t { font-family: var(--display); }
.rhy-lyr small { display: block; margin-top: 2px; font: 500 .92rem/1.25 var(--body); color: var(--muted); }
.rhy-lyr button.on { background: var(--sun); color: var(--ink); box-shadow: inset 0 -5px 0 #d9b200; }
.rhy-lyr button.on small { color: var(--ink-2); }
.rhy-ball { position: absolute; left: 14px; top: 4px; width: 22px; height: 22px; opacity: 0; transition: transform 180ms var(--ease-out); transition-timing-function: linear; pointer-events: none; }
.rhy-lyr button.on .rhy-ball { opacity: 1; }
.rhy-ball i { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #fff 0 16%, var(--w) 40%, var(--wd)); box-shadow: 0 2px 3px rgba(20, 22, 58, .25); }
.rhy-ball i.hop { animation: rhy-hop 300ms var(--ease-out); }
@keyframes rhy-hop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-9px) scale(1.05, .95); } }

@media (max-width: 480px) {
  .rhy-scene { aspect-ratio: 1 / 1; }
  .rhy-chip { width: 172px; }
  .rhy-act { top: auto; bottom: 8px; }
}
[data-calm="1"] .rhy-ball i.hop, [data-calm="1"] .rhy-thing.hit img { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .rhy-ball i.hop, .rhy-thing.hit img, .rhy-act.pop { animation: none; } }
.rhy-act[hidden] { display: none; }
.rhy-act { max-width: 94%; }

/* ---- apps/sci2.css ---- */
/* ---------- sci2 engine: small science lessons ---------- */
.s2 { --s2-ink: #1D2352; --s2-sky: #DCF1FF; }
.s2-head { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 10px; margin: 0 0 14px; }
.s2-head .replay { width: 56px; height: 56px; margin: 0; }
.s2-head .dots { grid-column: 1 / -1; justify-self: center; }
.s2-bub { margin: 0; padding: 10px 14px; min-height: 56px; background: #fff; border: 3px solid var(--s2-ink); border-radius: 6px 18px 18px 18px; font: 700 1.08rem/1.35 var(--display); color: var(--ink); }
.s2-bub span { display: block; }
.s2-bub span + span { margin-top: 4px; font: 600 .95rem/1.3 var(--body); color: var(--ink-2); }
.s2-card { text-align: center; }
.s2-big { width: 150px; height: 150px; object-fit: contain; }
.s2-name { margin: 6px 0 12px; text-align: center; font: 800 1.3rem/1.2 var(--display); }
.s2-name span + span { font-weight: 600; color: var(--ink-2); }
.s2-opts { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.s2-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.s2-opts .btn { min-width: 0; width: 100%; min-height: 104px; padding: 8px 6px; white-space: normal; flex-direction: column; gap: 4px; font-size: 1.15rem; line-height: 1.15; }
.s2-opts .btn span[aria-hidden] { font-size: 2rem; }
.s2-opts .btn span[lang] + span[lang] { font-size: .95rem; font-weight: 600; }
.s2-opts .btn.s2-pick { background: var(--teal-t); border-color: #0E8C80; }
.s2-hint { box-shadow: 0 0 0 6px rgba(255, 216, 61, .7) !important; border-color: var(--sun) !important; }
.s2-point { position: relative; }
.s2-point::after { content: '👆'; position: absolute; bottom: -12px; right: 6px; font-size: 2.3rem; animation: tap 900ms ease-in-out infinite; }
.s2-next { display: flex; margin: 16px auto 0; }
.s2-go { display: flex; margin: 14px auto 0; min-height: 72px; min-width: 220px; gap: 8px; font-size: 1.25rem; }
.s2-go span[aria-hidden] { font-size: 1.8rem; }
.s2 button:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }

/* picture stage */
.s2-vis { max-width: 440px; margin: 0 auto; border-radius: 20px; overflow: hidden; }
.s2-vis svg { display: block; width: 100%; height: auto; }
.s2-vis * { transform-box: view-box; }
.s2-eve, .s2-nt, .s2-st, .s2-stm, .s2-fire, .s2-rain { opacity: 0; transition: opacity .8s ease; }
.s2-sun { transition: transform 1s ease, opacity .8s ease; }
.s2-win { opacity: .25; transition: opacity .8s; }
[data-f="1"] .s2-eve { opacity: 1; } [data-f="1"] .s2-sun { transform: translate(110px, 96px); }
[data-f="2"] .s2-nt, [data-f="3"] .s2-nt { opacity: 1; }
[data-f="2"] .s2-sun, [data-f="3"] .s2-sun { transform: translate(140px, 170px); opacity: 0; }
[data-f="2"] .s2-win, [data-f="3"] .s2-win { opacity: 1; }
[data-f="3"] .s2-st { opacity: 1; }
[data-f="4"] .s2-eve { opacity: .55; } [data-f="4"] .s2-sun { transform: translate(-120px, 80px); }
/* ice, water, steam */
.s2-ice { transform-origin: 160px 118px; transition: transform .9s ease, opacity .9s ease; }
.s2-wat { transform-origin: 160px 122px; transform: scale(.3); transition: transform .9s ease, opacity .9s; }
[data-v="matter"][data-f="1"] .s2-ice, [data-v="matter"][data-f="2"] .s2-ice { transform: scaleY(.1); opacity: 0; }
[data-v="matter"][data-f="1"] .s2-wat { transform: scale(1); }
[data-v="matter"][data-f="2"] .s2-wat { transform: scale(.55); }
[data-v="matter"][data-f="1"] .s2-fire, [data-v="matter"][data-f="2"] .s2-fire, [data-v="matter"][data-f="2"] .s2-stm { opacity: 1; }
[data-v="matter"][data-f="2"] .s2-stm { animation: s2-rise 2.4s ease-in-out infinite; }
[data-v="matter"][data-f="3"] .s2-wat { transform: scale(.5); }
@keyframes s2-rise { 0% { transform: translateY(8px); } 50% { transform: translateY(-6px); } 100% { transform: translateY(8px); } }
.s2-moon { animation: s2-in .5s ease; }
@keyframes s2-in { from { opacity: .3; } to { opacity: 1; } }

/* torch and shadow */
.s2-room { position: relative; height: 230px; max-width: 440px; margin: 0 auto; border-radius: 20px; overflow: hidden; background: linear-gradient(#E3E8F7 0 70%, #CDB894 70%); }
.s2-torch { position: absolute; top: 8px; left: calc(50% - 24px); font-size: 44px; line-height: 1; transition: transform .6s ease; transform: rotate(-45deg); opacity: .6; }
.s2-beam { position: absolute; inset: 0; background: radial-gradient(circle at 50% 12%, rgba(255, 236, 150, .75), transparent 45%); opacity: 0; transition: opacity .4s, transform .6s ease; }
.s2-thing { position: absolute; left: calc(50% - 60px); bottom: 26px; width: 120px; height: 120px; }
.s2-thing img { position: absolute; inset: 0; width: 120px; height: 120px; object-fit: contain; }
.s2-sh { filter: brightness(0); opacity: 0; transform-origin: 50% 100%; transition: transform .6s ease, opacity .4s; }
.s2-room:not([data-t=""]) .s2-torch { opacity: 1; }
.s2-room:not([data-t=""]) .s2-beam { opacity: 1; }
[data-t="l"] .s2-torch { transform: translateX(-130px) translateY(30px) scaleX(-1) rotate(-20deg); }
[data-t="l"] .s2-beam { transform: translate(-30%, 12%); }
[data-t="l"] .s2-sh { opacity: .38; transform: skewX(-52deg) scaleY(.55); }
[data-t="r"] .s2-torch { transform: translateX(130px) translateY(30px) rotate(-20deg); }
[data-t="r"] .s2-beam { transform: translate(30%, 12%); }
[data-t="r"] .s2-sh { opacity: .38; transform: skewX(52deg) scaleY(.55); }
[data-t="m"] .s2-torch { transform: rotate(-45deg); }
[data-t="m"] .s2-sh { opacity: .38; transform: translateY(6px) scale(1.2, .12); }

/* swing and cart */
.s2-swg { transform-origin: 160px 22px; }
.s2-swing.go .s2-swg { animation: s2-swing 1.6s ease-in-out; }
.s2-swing[data-n="1"] { --a: 16deg; } .s2-swing[data-n="2"] { --a: 26deg; } .s2-swing[data-n="3"] { --a: 34deg; }
@keyframes s2-swing { 0% { transform: rotate(0); } 30% { transform: rotate(calc(-1 * var(--a))); } 65% { transform: rotate(calc(.6 * var(--a))); } 100% { transform: rotate(0); } }
.s2-cart { transition: transform .7s ease; }
.s2-vis[data-n="1"] .s2-cart { transform: translateX(-30px); } .s2-vis[data-n="2"] .s2-cart { transform: translateX(-60px); } .s2-vis[data-n="3"] .s2-cart { transform: translateX(-90px); }

/* plant */
.s2-pot { max-width: 260px; background: linear-gradient(#DCF1FF, #F4FBFF); }
.s2-pl { transform-origin: 100px 170px; transform: rotate(var(--dr, 0deg)) scale(var(--sc, 0)); transition: transform 1s ease; }
.s2-soil, .s2-seed, .s2-l1, .s2-l2, .s2-l3, .s2-fl { opacity: 0; transition: opacity .8s; }
.s2-pot:not([data-st="0"]) .s2-soil, .s2-pot[data-st="1"] .s2-seed { opacity: 1; }
.s2-pot[data-st="2"] { --sc: .5; } .s2-pot[data-st="3"] { --sc: .72; } .s2-pot[data-st="4"] { --sc: .88; } .s2-pot[data-st="5"] { --sc: 1; }
.s2-pot:not([data-st="0"]):not([data-st="1"]) .s2-l1, .s2-pot[data-st="3"] .s2-l2, .s2-pot[data-st="4"] .s2-l2, .s2-pot[data-st="5"] .s2-l2, .s2-pot[data-st="4"] .s2-l3, .s2-pot[data-st="5"] .s2-l3, .s2-pot[data-st="5"] .s2-fl { opacity: 1; }
.s2-droop { --dr: 16deg; }
.s2-droop .s2-l1, .s2-droop .s2-l2, .s2-droop .s2-l3 { opacity: .7 !important; }
.s2-gsun { transform-origin: 170px 30px; opacity: .5; transition: opacity .5s; }
.s2-fx-sun .s2-gsun { opacity: 1; animation: s2-glow 1.2s ease; }
.s2-fx-water .s2-rain { animation: s2-rain 1.4s ease; }
@keyframes s2-glow { 50% { transform: scale(1.35); } }
@keyframes s2-rain { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(90px); } }

/* learn grid, sun tray */
.s2-learn, .s2-tray { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 16px; }
.s2-learn .tile, .s2-tray .tile { min-width: 0; }
.s2-seen { box-shadow: inset 0 0 0 3px var(--leaf, #35C16B); }
.s2-used { opacity: .35; }
.s2-kid { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 14px; padding: 10px; max-width: 440px; min-height: 130px; border-radius: 20px; background: linear-gradient(#FFE9A8, #FFF7DD); }
.s2-hot { position: absolute; top: 6px; right: 12px; font-size: 2rem; }
.s2-me { width: 110px; height: 110px; object-fit: contain; }
.s2-got { display: flex; flex-wrap: wrap; gap: 4px; max-width: 150px; }
.s2-mini { width: 44px; height: 44px; object-fit: contain; animation: s2-in .4s ease; }

/* material swatches */
.s2-sw { display: block; width: 88px; height: 88px; margin: 0 auto; border-radius: 16px; box-shadow: inset 0 -6px 0 rgba(20, 22, 58, .12); }
.s2-opts .s2-sw { width: 44px; height: 44px; border-radius: 10px; }
.s2-wood { background: repeating-linear-gradient(100deg, #C98B4F 0 9px, #B07038 9px 12px, #D69A5C 12px 22px); }
.s2-metal { background: linear-gradient(135deg, #8E97A8, #F2F4F8 45%, #A6AFBF 60%, #6E7788); }
.s2-plastic { background: radial-gradient(circle at 30% 28%, #fff 0 8%, #FF6A8E 22%, #E0245A 100%); }
.s2-glass { background: linear-gradient(135deg, rgba(190, 235, 255, .5), rgba(120, 200, 240, .7)); border: 3px solid #7CC8EE; position: relative; }
.s2-glass::after { content: ''; position: absolute; left: 22%; top: 12%; width: 14%; height: 70%; background: rgba(255, 255, 255, .8); transform: skewX(-18deg); border-radius: 4px; }
.s2-paper { background: repeating-linear-gradient(#FFFDF4 0 12px, #BFD8F2 12px 14px); border: 2px solid #E3DCC6; }
.s2-fabric { background: repeating-linear-gradient(0deg, rgba(110, 75, 242, .45) 0 8px, transparent 8px 16px), repeating-linear-gradient(90deg, rgba(110, 75, 242, .45) 0 8px, #fff 8px 16px); }
@media (max-width: 400px) { .s2-opts { gap: 12px; } .s2-opts .btn { font-size: 1.05rem; } .s2-big { width: 128px; height: 128px; } }
[data-calm="1"] .s2-point::after { animation: none; }
.s2-vis[data-v="moon"] { max-width: 250px; }
.s2-next[hidden] { display: none; }

/* ---- apps/science.css ---- */
/* ---------- science engine: Mishu the mouse scientist ---------- */
.sci { --sci-lab: #0E8C80; --sci-water: rgba(70, 189, 255, .55); }
.sci-mishu { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 10px; margin: 0 0 14px; }
.sci-mishu .dots { grid-column: 1 / -1; justify-self: center; }
.sci-me { position: relative; width: 84px; height: 84px; padding: 6px; border: 3px solid var(--sci-lab); border-radius: 50%; background: var(--teal-t); cursor: pointer; touch-action: manipulation; }
.sci-me img { width: 100%; height: 100%; object-fit: contain; }
.sci-me i { position: absolute; right: -4px; bottom: -2px; width: 16px; height: 30px; border: 3px solid #fff; border-radius: 3px 3px 10px 10px; background: linear-gradient(to top, var(--leaf) 55%, #fff 55%); transform: rotate(18deg); box-shadow: 0 2px 0 rgba(20, 22, 58, .15); }
.sci-me:focus-visible, .sci-sun:focus-visible, .sci-cycle:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }
.sci-bub { position: relative; margin: 0; padding: 10px 14px; min-height: 64px; background: #fff; border: 3px solid var(--sci-lab); border-radius: 18px; font: 700 1.1rem/1.3 var(--display); color: var(--ink);
  background-image: repeating-linear-gradient(to bottom, transparent 0 25px, var(--teal-t) 25px 27px); }
.sci-bub::before { content: ''; position: absolute; left: -12px; top: 22px; border: 9px solid transparent; border-right-color: var(--sci-lab); border-left: 0; }
.sci-bub span { display: block; }
.sci-bub .sci-b2 { margin-top: 4px; font: 600 .95rem/1.3 var(--body); color: var(--ink-2); }
.sci-name { margin: 8px 0 10px; text-align: center; font: 800 1.35rem/1.2 var(--display); }
.sci-name span + span { font-weight: 600; color: var(--ink-2); }
.sci-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sci-two .btn { min-width: 0; width: 100%; white-space: normal; min-height: 104px; flex-direction: column; gap: 2px; font-size: 1.3rem; }
.sci-two .btn span[aria-hidden] { font-size: 2rem; }
.sci-two .btn:disabled { opacity: .55; }
.sci-two .btn.sci-pick { opacity: 1; background: var(--teal-t); border-color: var(--sci-lab); }
.sci-hint { box-shadow: 0 0 0 6px rgba(255, 216, 61, .6); border-color: var(--sun) !important; }
.sci-point { position: relative; }
.sci-point::after { content: '👆'; position: absolute; bottom: -10px; right: 8px; font-size: 2.4rem; animation: tap 900ms ease-in-out infinite; }
.sci-next { display: flex; margin: 16px auto 0; min-width: 200px; justify-content: center; }
.sci-next[hidden] { display: none; }

/* float or sink: the water tank */
.sci-tank { position: relative; height: 270px; max-width: 340px; margin: 0 auto; border: 5px solid #B9D7EA; border-top: 0; border-radius: 0 0 26px 26px; overflow: hidden; background: linear-gradient(#fff, #F4FAFF); }
.sci-tank .sci-obj { position: absolute; left: 50%; top: 6px; width: 96px; height: 96px; margin-left: -48px; object-fit: contain; transition: transform 900ms cubic-bezier(.3, .1, .3, 1); }
.sci-water { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; background: linear-gradient(var(--sci-water), rgba(10, 88, 163, .6)); border-top: 4px solid rgba(255, 255, 255, .8); pointer-events: none; }
.sci-water i { position: absolute; top: -8px; width: 14px; height: 14px; border-radius: 50%; background: #7FCBFF; opacity: 0; }
.sci-water i:nth-child(1) { left: 36%; } .sci-water i:nth-child(2) { left: 50%; } .sci-water i:nth-child(3) { left: 62%; }
.sci-tank.fl .sci-obj { transform: translateY(36px); animation: sci-bob 2.4s ease-in-out 1s infinite; }
.sci-tank.sk .sci-obj { transform: translateY(160px); }
.sci-tank.in .sci-water i { animation: sci-splash 700ms ease-out 450ms; }
.sci-tank.in .sci-water i:nth-child(1) { --x: -30px; } .sci-tank.in .sci-water i:nth-child(3) { --x: 30px; }
@keyframes sci-bob { 0%, 100% { transform: translateY(36px); } 50% { transform: translateY(42px) rotate(3deg); } }
@keyframes sci-splash { 0% { opacity: 1; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(var(--x, 0), -60px); } }

/* magnet */
.sci-mag { position: relative; display: flex; justify-content: space-between; align-items: center; max-width: 340px; height: 170px; margin: 0 auto; padding: 0 8px; border-radius: var(--r); background: var(--teal-t); }
.sci-mag .sci-obj { width: 96px; height: 96px; object-fit: contain; transition: transform 700ms cubic-bezier(.5, 0, .9, .6); }
.sci-mag .sci-mg { width: 110px; height: 110px; transform: rotate(90deg); }
.sci-mag.pull .sci-obj { transform: translateX(var(--d)); }
.sci-mag.stay .sci-obj { animation: sci-shake 500ms ease-in-out; }
@keyframes sci-shake { 25% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }

/* sorting cards */
.sci-card { max-width: 340px; margin: 0 auto 12px; padding: 14px 10px 4px; border-radius: var(--r-lg); background: var(--teal-t); text-align: center; transition: background-color 400ms; }
.sci-card .sci-big { width: 140px; height: 140px; object-fit: contain; }
.sci-card.sci-sky0 { background: linear-gradient(90deg, #FFF3C4, #D9D6F5); }
.sci-card.sci-day { background: #FFE98A; }
.sci-card.sci-night { background: #2B2F6B; }
.sci-card.sci-night .sci-name, .sci-card.sci-night .sci-name span + span { color: #fff; }
.sci-thing .sci-big { width: 120px; height: 120px; }

/* melting */
.sci-melt { display: flex; align-items: flex-end; justify-content: center; gap: 18px; max-width: 340px; margin: 0 auto; padding: 12px; border-radius: var(--r-lg); background: linear-gradient(#FFF6D6, #FFE7B0); }
.sci-sun { width: 110px; height: 110px; padding: 6px; border: 0; border-radius: 50%; background: rgba(255, 216, 61, .45); cursor: pointer; align-self: flex-start; animation: sci-glow 2.4s ease-in-out infinite; }
.sci-sun img { width: 100%; height: 100%; }
.sci-sun:disabled { animation: none; cursor: default; }
@keyframes sci-glow { 50% { transform: scale(1.06) rotate(8deg); } }
.sci-plate { position: relative; width: 150px; height: 150px; display: flex; align-items: flex-end; justify-content: center; }
.sci-plate::before { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 4px 0 #DCE2EE; }
.sci-plate .sci-obj { position: relative; width: 110px; height: 110px; object-fit: contain; transform-origin: 50% 100%; margin-bottom: 8px; transition: transform 900ms ease-in-out, opacity 900ms; }
.sci-pud { position: absolute; bottom: 4px; left: 50%; width: 130px; height: 22px; margin-left: -65px; border-radius: 50%; background: var(--c); opacity: 0; transform: scale(.2); transition: transform 900ms ease-out, opacity 900ms; }
.sci-melt[data-s="1"] .sci-obj { transform: scale(.85, .7); }
.sci-melt[data-s="1"] .sci-pud { opacity: .7; transform: scale(.55); }
.sci-melt[data-s="2"] .sci-obj { transform: scale(.4, .1); opacity: 0; }
.sci-melt[data-s="2"] .sci-pud { opacity: .9; transform: scale(1); }

/* water cycle */
.sci-cycle { display: block; width: 100%; max-width: 480px; margin: 0 auto; padding: 0; border: 0; border-radius: var(--r-lg); overflow: hidden; background: none; cursor: pointer; position: relative; }
.sci-cycle svg { display: block; width: 100%; height: auto; }
.sci-vap, .sci-cloud, .sci-rain { opacity: 0; transition: opacity 600ms; }
.sci-cycle[data-s="0"] .sci-vap { opacity: 1; animation: sci-rise 1.6s ease-out infinite; }
.sci-cycle[data-s="1"] .sci-cloud, .sci-cycle[data-s="2"] .sci-cloud, .sci-cycle[data-s="3"] .sci-cloud { opacity: 1; }
.sci-cycle[data-s="1"] .sci-cloud { animation: sci-drift 1.2s ease-out; }
.sci-cycle[data-s="2"] .sci-rain { opacity: 1; animation: sci-fall 900ms linear infinite; }
.sci-cycle[data-s="2"] .sci-cloud { fill: #C9D3E6; }
.sci-river { opacity: .5; transition: opacity 600ms; }
.sci-cycle[data-s="3"] .sci-river { opacity: 1; animation: sci-pulse 1.4s ease-in-out infinite; }
.sci-sunc { transform-origin: 270px 40px; }
.sci-cycle[data-s="0"] .sci-sunc { animation: sci-glow 1.6s ease-in-out infinite; }
@keyframes sci-rise { 0% { transform: translateY(10px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-20px); opacity: 0; } }
@keyframes sci-drift { from { transform: translateX(140px); } }
@keyframes sci-fall { from { transform: translateY(-6px); } to { transform: translateY(10px); } }
@keyframes sci-pulse { 50% { opacity: .6; } }
.sci-steps { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.sci-steps i { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .8); font: 800 .95rem/30px var(--display); font-style: normal; color: var(--ink-2); }
.sci-steps i.on { background: var(--sci-lab); color: #fff; }
.sci-dress { display: flex; text-align: center; justify-content: center; max-width: 340px; margin: 16px auto 0; text-decoration: none; }

@media (max-width: 400px) { .sci-mishu { grid-template-columns: 68px 1fr; } .sci-me { width: 68px; height: 68px; } .sci-bub { font-size: 1rem; } .sci-tank { height: 250px; } }
[data-calm="1"] .sci *, [data-calm="1"] .sci *::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .sci *, .sci *::after { animation: none !important; transition-duration: 1ms !important; } }

/* ---- apps/sort.css ---- */
/* sort engine: sorting bins, sequence slots, size ordering */
.sort-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; min-height: 124px; margin-bottom: 18px; }
.sort-it { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 104px; min-height: 120px; padding: 8px 4px; background: #fff; border: 3px solid var(--line); border-radius: 22px; box-shadow: 0 5px 0 var(--line); cursor: pointer; font: inherit; color: inherit; touch-action: manipulation; }
.sort-it img { width: 64px; height: 64px; object-fit: contain; pointer-events: none; transform: scale(var(--s, 1)); filter: drop-shadow(0 4px 4px rgba(20, 22, 58, .12)); }
.sort-it.on { border-color: var(--w); background: var(--wt); box-shadow: 0 5px 0 var(--wd); transform: translateY(-6px); }
.sort-it.drag { z-index: 5; box-shadow: 0 14px 24px rgba(20, 22, 58, .2); transition: none; }
.sort-tray:not(.seq) .sort-it { touch-action: none; }
.sort-l { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.1; }
.sort-l b { font: 700 .98rem/1.1 var(--display); }
.sort-l b + b { font: 600 .82rem/1.15 var(--display); color: var(--ink-2); }

.sort-bins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 720px; margin-inline: auto; }
.sort-bins.b3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sort-bin { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 176px; padding: 12px 6px 10px; border: 3px dashed color-mix(in srgb, var(--w) 55%, #fff); border-top: 8px solid var(--w); border-radius: 10px 10px 28px 28px; background: var(--wt); cursor: pointer; font: inherit; color: inherit; }
.sort-bp { display: grid; place-items: center; width: 72px; height: 72px; }
.sort-bp img { width: 68px; height: 68px; object-fit: contain; transform: scale(var(--s, 1)); }
.sort-in { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 36px; margin-top: auto; }
.sort-in img { width: 34px; height: 34px; object-fit: contain; }
.sort-bin:active, .sort-it:active { transform: translateY(3px); }
.sort-hint { border-color: var(--sun) !important; box-shadow: 0 0 0 6px rgba(255, 216, 61, .55); animation: glow 1.2s ease-in-out 3; }
.sort-point::after { content: '👆'; position: absolute; bottom: -10px; right: 4px; font-size: 2.2rem; animation: tap 900ms ease-in-out infinite; }
.sort-it.wob, .sort-bin.wob { animation: wob 380ms ease; }
.sort-bin.pop, .sort-slot.pop { animation: pop 420ms var(--spring); }

/* sequence slots */
.sort-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; list-style: none; margin: 0 0 18px; padding: 0; }
.sort-slot { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 104px; min-height: 124px; padding: 8px 4px; border: 3px dashed var(--line); border-radius: 22px; background: var(--paper); }
.sort-slot img { width: 60px; height: 60px; object-fit: contain; transform: scale(var(--s, 1)); }
.sort-slot.full { border: 3px solid var(--leaf); background: var(--leaf-t); }
.sort-slot.now { box-shadow: 0 0 0 5px var(--sun); transform: translateY(-4px); }
.sort-n { position: absolute; top: -12px; left: -8px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--w); color: #fff; font: 800 1.05rem/1 var(--display); box-shadow: 0 3px 0 var(--wd); }
.sort-slot:not(.full) .sort-n { width: 44px; height: 44px; font-size: 1.5rem; top: 50%; left: 50%; transform: translate(-50%, -50%); background: transparent; color: var(--muted); box-shadow: none; }
.sort-slots.sz { align-items: flex-end; }
.sort-slots.sz .sort-slot, .sort-tray.sz .sort-it { min-height: 110px; }
.sort-slots.sz img, .sort-tray.sz img { width: 80px; height: 80px; }

@media (max-width: 420px) {
  .sort-it, .sort-slot { width: calc((100% - 24px) / 3); min-width: 96px; }
  .sort-tray, .sort-slots { gap: 10px 8px; }
  .sort-bins.b3 { gap: 8px; }
  .sort-bins.b3 .sort-bp img { width: 56px; height: 56px; }
  .sort-bin { min-height: 160px; }
}
[data-calm="1"] .sort-hint, [data-calm="1"] .sort-point::after, [data-calm="1"] .sort-bin.pop, [data-calm="1"] .sort-slot.pop, [data-calm="1"] .wob { animation: none; }
@media (prefers-reduced-motion: reduce) { .sort-hint, .sort-point::after, .sort-bin.pop, .sort-slot.pop { animation: none; } }

/* ---- apps/story.css ---- */
/* ---- story: picture-book stories. Signature: the stage is a picture-book page with a soft page edge. ---- */
.story-pick { max-width: 900px; margin-inline: auto; }
.story-h, .story-q { font: 800 clamp(1.3rem, 4.6vw, 1.8rem)/1.25 var(--display); text-align: center; margin: 4px 0 16px; }
.story-2 { display: block; font-size: .72em; font-weight: 600; color: var(--muted); }
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.story-card { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 180px; padding: 16px 10px 14px; border: 0; border-radius: var(--r); background: var(--sheet); box-shadow: inset 0 -6px 0 var(--wt), 0 2px 0 var(--line); font: 700 1.05rem/1.2 var(--display); color: var(--ink); text-align: center; cursor: pointer; transition: transform var(--dur-tap); }
.story-card img { width: 88px; height: 88px; object-fit: contain; }
.story-card:active { transform: translateY(3px); }
.story { max-width: 820px; margin-inline: auto; }
.story-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.story-home { min-width: 56px; font-size: 1.5rem; padding: 6px 10px; }
.story-t { flex: 1; margin: 0; font: 800 1.1rem/1.2 var(--display); }
.story-dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; max-width: 90px; }
.story-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.story-dots i.on { background: var(--w); transform: scale(1.3); }

.story-stage { position: relative; aspect-ratio: 16 / 10; border-radius: 18px 26px 26px 18px; overflow: hidden; border: 6px solid #fff; box-shadow: 8px 8px 0 -2px #fff, 8px 8px 0 0 var(--line), 0 6px 18px rgba(20, 22, 58, .12); background: #BFE7FF; }
.story-bg-park { background: radial-gradient(120% 60% at 20% 100%, #7ACB6A 55%, transparent 56%), radial-gradient(90% 50% at 90% 100%, #8ED47A 60%, transparent 61%), linear-gradient(#AEE1FF, #E8F7FF 70%); }
.story-bg-forest { background: radial-gradient(40% 55% at 8% 62%, #3F9E5A 60%, transparent 61%), radial-gradient(35% 50% at 92% 58%, #37905A 60%, transparent 61%), radial-gradient(30% 40% at 50% 60%, #4DAE66 60%, transparent 61%), linear-gradient(#CFEFD6 0 62%, #5DB86E 62%); }
.story-bg-village { background: repeating-linear-gradient(170deg, #B9D96A 0 14px, #A7CF5A 14px 28px) bottom / 100% 34% no-repeat, radial-gradient(60% 30% at 70% 70%, #9BC6FF 40%, transparent 41%), linear-gradient(#FFE8B8, #FFF6E0 66%); }
.story-bg-room { background: linear-gradient(90deg, transparent 62%, #BFE7FF 62% 84%, transparent 84%) top 12% left 0 / 100% 36% no-repeat, linear-gradient(#FFE9C7 0 72%, #DDB07C 72%); }
.story-bg-kitchen { background: linear-gradient(#fff 0 0) left 0 top 58% / 100% 4% no-repeat, repeating-linear-gradient(90deg, #D8F1EA 0 38px, #CBEADF 38px 40px), #D8F1EA; }
.story-bg-kitchen::before { content: ""; position: absolute; inset: 60% 0 0; background: #C9966A; }
.story-bg-school { background: linear-gradient(#2F6B4F 0 0) center 16% / 56% 34% no-repeat, linear-gradient(#E8F0FF 0 74%, #C7B299 74%); }
.story-bg-night { background: radial-gradient(3px 3px at 14% 18%, #fff 60%, transparent), radial-gradient(2px 2px at 40% 10%, #fff 60%, transparent), radial-gradient(2px 2px at 62% 24%, #fff 60%, transparent), linear-gradient(#27306E 0 72%, #3B3F7A 72%); }
.story-bg-dusk { background: radial-gradient(90% 40% at 50% 100%, #3E8A57 60%, transparent 61%), linear-gradient(#5B4BB8, #F7A36B 78%); }
.story-p { position: absolute; transform: translate(-50%, -100%); padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; border-radius: 16px; z-index: 1; }
.story-p::after { content: ""; position: absolute; inset: -12%; }
.story-p img, .story-p svg { width: 100%; height: auto; pointer-events: none; }
.story-p:focus-visible { outline-offset: 0; }
.story-go[data-an="hop"] > * { animation: story-hop .5s var(--ease-out); }
.story-go[data-an="wag"] > * { animation: story-wag .6s ease-in-out; transform-origin: 50% 90%; }
.story-go[data-an="flap"] > * { animation: story-flap .5s ease-in-out; }
.story-go[data-an="spin"] > * { animation: story-spin .6s var(--ease-out); }
.story-go[data-an="sway"] > * { animation: story-sway .8s ease-in-out; transform-origin: 50% 100%; }
@keyframes story-hop { 40% { transform: translateY(-18%); } }
@keyframes story-wag { 20%, 60% { transform: rotate(-8deg); } 40%, 80% { transform: rotate(8deg); } }
@keyframes story-flap { 50% { transform: scale(1.15, .9); } }
@keyframes story-spin { to { transform: rotate(360deg); } }
@keyframes story-sway { 30% { transform: rotate(-5deg); } 70% { transform: rotate(5deg); } }
.story-bub { position: absolute; top: 4%; transform: translateX(-50%); z-index: 2; max-width: 70%; margin: 0; padding: 6px 14px; border-radius: 16px; background: #fff; box-shadow: 0 3px 0 var(--line); font: 700 .95rem/1.25 var(--display); text-align: center; animation: story-in .25s var(--ease-out); }
@keyframes story-in { from { opacity: 0; transform: translate(-50%, 8px); } }

.story-text { margin: 16px 4px 6px; }
.story-ln { margin: 0 0 4px; font: 700 clamp(1.2rem, 4.8vw, 1.55rem)/1.4 var(--teach); color: #9DA2BF; }
.story-ln.story-2 { font-size: clamp(1rem, 3.8vw, 1.15rem); margin-bottom: 12px; }
.story-ln[lang="hi"] { font-family: var(--display); }
.story-ln span.on { color: var(--ink); transition: color .15s; }
.story-ask { margin: 12px 0; }
.story-ch { min-height: 96px; padding: 12px; border: 3px solid var(--wt); border-radius: var(--r); background: var(--sheet); font: 800 1.15rem/1.2 var(--display); color: var(--ink); cursor: pointer; box-shadow: inset 0 -5px 0 var(--wt); }
.story-ch.story-yes { background: var(--leaf-t); border-color: var(--leaf); }
.story-soft { display: grid; gap: 14px; justify-items: center; padding: 16px; border-radius: var(--r); background: var(--sky-t); font: 700 1.1rem/1.4 var(--display); text-align: center; animation: story-in2 .3s var(--ease-out); }
.story-soft p { margin: 0; }
@keyframes story-in2 { from { opacity: 0; } }
.story-nav { display: flex; justify-content: center; gap: 16px; margin-top: 10px; }
.story-nav .btn { min-width: 84px; }
.story-nav [hidden] { display: none; }
.story-end { text-align: center; position: relative; }
.story-feels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 560px; margin: 0 auto; }
.story-f { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 130px; padding: 10px 4px; border: 3px solid transparent; border-radius: var(--r); background: var(--sheet); box-shadow: 0 2px 0 var(--line); font: 700 1rem/1.15 var(--display); color: var(--ink); cursor: pointer; }
.story-f img { width: 72px; height: 72px; }
.story-f.on { border-color: var(--w); background: var(--wt); }
.story-say { min-height: 3em; margin: 16px auto 0; max-width: 560px; font: 700 1.15rem/1.4 var(--display); }
@media (max-width: 480px) {
  .story-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .story-stage { border-width: 4px; box-shadow: 5px 5px 0 -2px #fff, 5px 5px 0 0 var(--line); }
  .story-bub { font-size: .8rem; padding: 4px 10px; }
  .story-f img { width: 56px; height: 56px; }
  .story-dots { max-width: 60px; }
}
[data-calm="1"] .story-go > *, [data-calm="1"] .story-bub, [data-calm="1"] .story-soft { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .story-go > *, .story-bub, .story-soft { animation: none !important; } }

/* ---- apps/story2.css ---- */
/* Extra scene background for the second story set (story2 plugin, uses the story engine). */
.story-bg-mall { background: linear-gradient(90deg, transparent 6%, #FFD6E4 6% 30%, transparent 30% 38%, #CFE8FF 38% 62%, transparent 62% 70%, #FFE9B0 70% 94%, transparent 94%) top 14% left 0 / 100% 34% no-repeat, linear-gradient(#F6F1FF 0 70%, #D9CFEA 70%); }

/* ---- apps/think.css ---- */
/* think: in-on-under scene, Golu says, traffic lights, emergency numbers, yesterday/today/tomorrow, weather */
.think .think-emo { font-size: clamp(2.6rem, 11vw, 4rem); line-height: 1; }
.think .think-big { font: 800 clamp(1.5rem, 6vw, 2.2rem)/1.1 var(--display); color: var(--ink); }
.think-card { display: flex; align-items: center; justify-content: center; gap: 14px; width: fit-content; max-width: 100%; margin: 0 auto 14px; padding: 10px 18px; border-radius: var(--r); background: var(--wt); text-align: left; }
.think-card .lbl b { display: block; font: 700 1.1rem/1.3 var(--display); }
.think-cpic { width: 96px; height: 96px; object-fit: contain; flex: none; }

/* in, on, under */
.think-scene { position: relative; max-width: 560px; margin: 0 auto 14px; border-radius: var(--r); background: linear-gradient(#fff8ec, #fff1da); overflow: hidden; }
.think-svg { display: block; width: 100%; height: auto; }
.think-floor { fill: #e9cfa6; }
.think-table rect { fill: #b97a45; }
.think-table rect:first-child { fill: #d08f55; }
.think-box rect { fill: #e2b06a; stroke: #a8733a; stroke-width: 3; }
.think-in { fill: #9c6a35; }
.think-flap { fill: #edc284; stroke: #a8733a; stroke-width: 3; stroke-linejoin: round; }
.think-tape { fill: #f4d9a8; }
.think-thing { transform-box: fill-box; transform-origin: 50% 100%; }
.think-thing.pop { animation: pop 420ms var(--spring); }
.think-spot { position: absolute; width: 20%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 4px dashed var(--w); background: rgba(255, 255, 255, .45); cursor: pointer; touch-action: manipulation; }
.think-spot:hover { background: rgba(255, 255, 255, .75); }
.think-spot:focus-visible { outline: 4px solid var(--ink); outline-offset: 2px; }
.think-spot.hint { border-style: solid; border-color: var(--sun); box-shadow: 0 0 0 6px rgba(255, 216, 61, .6); }
.think-spot.point::after { content: '👆'; position: absolute; bottom: -18px; right: -8px; font-size: 2.2rem; }
.think-spot.wob { animation: wob 380ms ease; }
.think-words { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.think-word { min-height: 64px; min-width: 120px; }
.think-word .lbl b { display: block; }

/* Golu says: numbered taps */
.think-board .tile.right::before { content: attr(data-n); position: absolute; top: 6px; left: 8px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--leaf); color: #fff; font: 800 1.3rem var(--display); }

/* traffic light */
.think-tlrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; margin-bottom: 14px; }
.think-tl { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 28px; background: #2d2a3e; box-shadow: 0 6px 0 #16141f; }
.think-lamp { display: block; width: 96px; height: 96px; border: 0; border-radius: 50%; opacity: .28; cursor: default; transition: opacity 250ms, transform 250ms; }
button.think-lamp { cursor: pointer; }
.think-lamp:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
.think-lamp.on { opacity: 1; box-shadow: 0 0 22px 4px currentColor; }
.think-red { background: #ff4b3e; color: #ff4b3e; } .think-yellow { background: #ffc629; color: #ffc629; } .think-green { background: #29c46a; color: #29c46a; }
.think-tlrow:not(:has(button)) .think-lamp { width: 64px; height: 64px; }
.think-say { min-width: 180px; margin: 0; text-align: center; font: 700 1.3rem/1.3 var(--display); }
.think-say .lbl b { display: block; }

/* street scene */
.think-street { position: relative; max-width: 560px; height: 300px; margin: 0 auto 14px; border-radius: var(--r); overflow: hidden; background: #cfe9c6; }
.think-walk { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: #d9d4cc; border-top: 6px solid #b9b2a6; }
.think-walk.think-top { top: 0; bottom: auto; border-top: 0; border-bottom: 6px solid #b9b2a6; }
.think-road { position: absolute; left: 0; right: 0; top: 22%; bottom: 22%; background: #55525f; }
.think-zebra { position: absolute; left: 50%; top: 8px; bottom: 8px; width: 34%; transform: translateX(-50%); background: repeating-linear-gradient(#fff 0 16px, transparent 16px 30px); opacity: .95; }
.think-sig { position: absolute; top: 8px; right: 10px; display: grid; place-items: center; width: 58px; height: 80px; border-radius: 12px; background: #2d2a3e; }
.think-man { display: block; width: 38px; }
.think-man svg { display: block; width: 100%; height: auto; }
.think-man.red svg { fill: #ff4b3e; } .think-man.green svg { fill: #29c46a; }
.think-pair { position: absolute; left: 50%; bottom: 4px; display: flex; align-items: flex-end; gap: 0; transform: translateX(-50%); transition: transform 1500ms ease-in-out; }
.think-pair img { width: 84px; height: 84px; object-fit: contain; }
.think-pair .think-p2 { width: 54px; height: 54px; margin-left: -14px; transition: margin 300ms; }
.think-pair.hold .think-p2 { margin-left: -24px; }
.think-pair.look img { animation: think-look 1.6s ease-in-out 1; }
.think-pair.across { transform: translate(-50%, -200px); }
@keyframes think-look { 25% { transform: scaleX(-1); } 50% { transform: scaleX(1); } 75% { transform: scaleX(-1); } }
.think-act { display: flex; justify-content: center; }
.think-act .btn { min-height: 72px; min-width: 220px; font-size: 1.3rem; }
.think-act .btn.wob { animation: wob 380ms ease; }
[data-calm="1"] .think-pair, [data-calm="1"] .think-lamp { transition: none; }
[data-calm="1"] .think-pair.look img { animation: none; }

/* emergency numbers */
.think-pick { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin: 0 auto 12px; font: 700 1rem var(--display); }
.think-pick select { min-height: 52px; max-width: 100%; padding: 6px 12px; border: 3px solid var(--line); border-radius: 14px; background: #fff; font: 700 1.05rem var(--display); color: var(--ink); }
.think-pick select:focus-visible { outline: 4px solid var(--w); }
.think-num { max-width: 520px; margin: 0 auto 14px; padding: 14px 18px; border-radius: var(--r); background: var(--wt); text-align: center; }
.think-num > b { display: block; font: 800 clamp(3.4rem, 17vw, 5rem)/1 var(--display); letter-spacing: .12em; color: var(--ink); font-variant-numeric: tabular-nums; }
.think-num .lbl b { display: block; font-weight: 600; line-height: 1.35; }
.think-x { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding-top: 10px; border-top: 2px dashed var(--line); text-align: left; }
.think-x > b { font: 800 1.8rem var(--display); letter-spacing: .08em; }
.think-phone { max-width: 340px; margin: 0 auto; padding: 14px; border-radius: 30px; background: #2d2a3e; }
.think-typed { margin: 0 0 12px; padding: 8px; border-radius: 14px; background: #eaf7ff; font: 800 2.2rem var(--display); letter-spacing: .2em; text-align: center; font-variant-numeric: tabular-nums; }
.think-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.think-key { position: relative; min-height: 64px; border: 0; border-radius: 18px; background: #fff; font: 800 1.8rem var(--display); color: var(--ink); cursor: pointer; touch-action: manipulation; }
.think-key:focus-visible { outline: 4px solid var(--sun); }
.think-key.hint { box-shadow: 0 0 0 6px rgba(255, 216, 61, .8); }
.think-key.point::after { content: '👆'; position: absolute; bottom: -14px; right: -4px; font-size: 1.8rem; }
.think-key.wob { animation: wob 380ms ease; } .think-key.pop { animation: pop 420ms var(--spring); }
.think-toy { margin: 12px 0 0; color: #fff; font: 600 .95rem/1.3 var(--display); text-align: center; }
.think-toy .lbl b { display: block; color: #fff; }
.think-pick .lbl b { display: block; text-align: center; }

/* yesterday, today, tomorrow */
.think-strip { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 6px; max-width: 720px; margin: 0 auto 14px; }
.think-day { min-height: 0; padding: 10px 6px; }
.think-day .art { width: min(110px, 22vw); height: min(110px, 22vw); }
.think-dh .lbl b { display: block; font-size: .95rem; }
.think-dy { background: #eef1ff; } .think-dt { background: #fff6d6; border-color: var(--sun); } .think-dm { background: #e8fbef; }
.think-arrow { align-self: center; font-size: 1.2rem; color: var(--ink-2); }
div.think-day { cursor: default; }

/* weather board */
.think-today { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 620px; margin: 14px auto 0; padding: 0 12px; border-radius: var(--r); background: var(--wt); }
.think-today:empty { display: none; }
.think-today .lbl b { display: block; font: 700 1.05rem/1.35 var(--display); }
.think-today > span { padding: 10px 0; }
@media (max-width: 560px) {
  .think-today .think-cpic:last-child { display: none; }
  .think-card { padding: 8px 12px; }
  .think-cpic { width: 76px; height: 76px; }
  .think-street { height: 260px; }
  .think-pair.across { transform: translate(-50%, -166px); }
  .think-strip { gap: 3px; }
  .think-arrow { font-size: .9rem; }
}
.think .think-sub { font: 700 1.05rem/1.2 var(--display); color: var(--ink-2); }

/* ---- apps/trace.css ---- */
/* Trace engine: letters, numbers, Hindi, pre-writing lines */
.trace { display: flex; flex-direction: column; gap: 12px; }
.trace-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.trace-chip { flex: none; min-width: 56px; height: 56px; padding: 0 10px; border: 0; border-radius: 16px; background: var(--paper, #fff); box-shadow: inset 0 -4px 0 var(--line, #e3e0ee); font: 700 1.6rem/1 var(--display, sans-serif); color: inherit; cursor: pointer; }
.trace-chip[lang="hi"] { font-family: var(--hindi, var(--display, sans-serif)); }
.trace-chip[aria-pressed="true"] { background: var(--w, #6E4BF2); color: #fff; box-shadow: inset 0 -5px 0 var(--wd, #4B2BC9); }
.trace-main { display: flex; gap: 16px; align-items: flex-start; justify-content: center; }
.trace-lh .trace-main { flex-direction: row-reverse; }
.trace-pad { position: relative; flex: 0 1 460px; min-width: 0; }
.trace-pad canvas { display: block; width: 100%; aspect-ratio: 1; border-radius: 28px; background: #fff; box-shadow: inset 0 0 0 3px var(--line, #e3e0ee); touch-action: none; cursor: crosshair; }
.trace-side { display: flex; flex-direction: column; gap: 12px; width: 180px; }
.trace-side .btn { justify-content: center; min-height: 64px; }
.trace-side .btn [lang="hi"] { font-size: .85em; opacity: .85; }
.trace-side .replay { align-self: flex-start; }
.trace-won { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; padding: 14px; border-radius: 22px; background: rgba(255, 255, 255, .94); box-shadow: 0 6px 22px rgba(40, 20, 90, .16); text-align: center; animation: trace-in .35s ease-out; }
.trace-won[hidden] { display: none; }
.trace-pics { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.trace-pics img { width: 44px; height: 44px; }
.trace-w { margin: 0; font: 700 1.3rem/1.2 var(--display, sans-serif); }
.trace-paper { margin: 0; font-weight: 700; flex-basis: 100%; }
.trace-paper [lang="hi"] { display: block; font-weight: 400; font-size: .9em; }
.trace .dots { display: flex; justify-content: center; gap: 8px; margin: 0; }
.trace .dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line, #e3e0ee); }
.trace .dots i.on { background: var(--w, #6E4BF2); }
.trace button:focus-visible { outline: 4px solid var(--w, #6E4BF2); outline-offset: 3px; }
@keyframes trace-in { from { opacity: 0; transform: translateY(12px); } }
[data-calm="1"] .trace-won { animation: none; }
@media (max-width: 640px) {
  .trace-main, .trace-lh .trace-main { flex-direction: column; align-items: stretch; }
  .trace-pad { flex: none; }
  .trace-side { width: auto; flex-direction: row; flex-wrap: wrap; }
  .trace-lh .trace-side { flex-direction: row-reverse; }
  .trace-side .btn { flex: 1 1 120px; }
}

/* ---- apps/world.css ---- */
/* ---------- world: countries & festivals ---------- */
/* Signature: continents are soft "islands" floating on a quiet dotted ocean. */
.world .lbl b { font-size: 1.05rem; }
.world-map { display: grid; gap: 16px; padding: 14px; border-radius: var(--r-lg); background: #DDF0FB radial-gradient(circle, rgba(10, 88, 163, .12) 1.4px, transparent 1.6px) 0 0 / 18px 18px; }
.world-isle { padding: 10px 12px 14px; border-radius: 34px 26px 38px 24px; background: var(--it, #fff); box-shadow: 0 5px 0 rgba(20, 22, 58, .08); }
.world-asia { --it: #FFF4D6; } .world-europe { --it: #E9E4FF; } .world-africa { --it: #FFE6D6; } .world-americas { --it: #DDF5E4; } .world-oceania { --it: #FFE3EC; }
.world-ct { margin: 0 0 8px 6px; }
.world-ct .lbl { flex-direction: row; gap: 8px; align-items: baseline; justify-content: flex-start; }
.world-ct .lbl b { font-size: .95rem; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); }
.world-cs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.world-cb { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 120px; padding: 12px 6px 10px; border: 3px solid transparent; border-radius: 22px; background: #fff; box-shadow: 0 5px 0 var(--line); cursor: pointer; font: inherit; color: var(--ink); touch-action: manipulation; transition: transform var(--dur-tap); }
.world-cb:active, .world-it:active, .world-f:active { transform: translateY(3px); }
.world-cb:hover { border-color: var(--w); }
.world-flag { display: block; width: 84px; height: 56px; border-radius: 6px; box-shadow: 0 0 0 1.5px rgba(20, 22, 58, .14); overflow: hidden; }
.world-back { margin: 0 0 12px; }
.world-back .lbl, .world-nav .lbl { flex-direction: row; gap: 6px; }
.world-card { text-align: center; }
.world-big .world-flag { width: min(240px, 70vw); height: auto; margin: 0 auto; border-radius: 12px; }
.world-name { margin: 12px 0 4px; }
.world-name .lbl b { font-size: 1.5rem; }
.world-hello { display: inline-flex; flex-direction: column; align-items: center; min-width: 200px; min-height: 96px; margin: 6px auto 18px; padding: 10px 28px; border: 0; border-radius: 48px 48px 48px 12px; background: var(--w); color: #fff; box-shadow: inset 0 -6px 0 var(--wd); font: 800 clamp(2rem, 1.4rem + 3vw, 3rem)/1.05 var(--display); cursor: pointer; }
.world-hello small { font-size: 1.1rem; font-weight: 600; opacity: .92; }
.world-hello.pop, .world-it.pop, .world-rx.pop { animation: pop 420ms var(--spring); }
.world-its { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.world-it, .world-f { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 150px; padding: 10px 6px; border: 3px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; font: inherit; color: var(--ink); touch-action: manipulation; transition: transform var(--dur-tap); }
.world-it img, .world-f img { width: min(96px, 22vw); height: auto; aspect-ratio: 1; }
.world-it small { color: var(--muted); }
.world-it small .lbl b { font: 600 .78rem/1.1 var(--body); color: var(--muted); }
.world-fs { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; }
.world-f { border: 0; background: color-mix(in srgb, var(--bg) 16%, #fff); box-shadow: inset 0 -5px 0 color-mix(in srgb, var(--bg) 30%, #fff); }
.world-f:hover { outline: 3px solid var(--w); }
.world-scene { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 4%; min-height: 230px; padding: 20px 14px 18px; border-radius: var(--r-lg); background: radial-gradient(120% 90% at 50% 110%, rgba(255, 255, 255, .35), transparent 60%), var(--bg); overflow: hidden; }
.world-sc { width: min(150px, 38vw); height: auto; }
.world-rx { position: relative; width: 150px; height: 150px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .22); cursor: pointer; touch-action: manipulation; }
.world-rx::after { content: '👆'; position: absolute; right: -4px; bottom: 0; font-size: 1.8rem; animation: tap 1.4s ease-in-out 3; }
.world-rx.on::after { content: none; }
.world-sym { width: 118px; height: 118px; transition: transform var(--dur-base) var(--ease-over), filter var(--dur-base); }
.world-rx i { position: absolute; inset: -10px; border-radius: 50%; opacity: 0; pointer-events: none; transition: opacity var(--dur-enter), transform var(--dur-enter) var(--ease-out); transform: scale(.6); }
.world-rx.on i { opacity: 1; transform: scale(1); }
.rx-glow i { background: radial-gradient(circle, rgba(255, 222, 110, .95) 0 22%, rgba(255, 200, 60, .45) 45%, transparent 70%); }
.rx-glow.on .world-sym { filter: brightness(1.18) drop-shadow(0 0 14px #FFE27A); }
.rx-splash i { background: radial-gradient(circle at 25% 30%, #FF4F86 0 9%, transparent 10%), radial-gradient(circle at 75% 25%, #46BDFF 0 8%, transparent 9%), radial-gradient(circle at 70% 78%, #35C16B 0 10%, transparent 11%), radial-gradient(circle at 22% 75%, #FFB224 0 9%, transparent 10%), radial-gradient(circle at 50% 12%, #6E4BF2 0 7%, transparent 8%); }
.rx-bloom.on .world-sym { transform: scale(1.22) rotate(-6deg); }
.rx-bloom i { background: radial-gradient(circle, rgba(255, 255, 255, .7) 0 30%, transparent 65%); }
.rx-shake.on .world-sym { animation: world-shake 500ms ease 2; }
.rx-shake i { background: radial-gradient(circle at 50% 10%, rgba(255, 255, 255, .9) 0 7%, transparent 8%), radial-gradient(circle at 30% 18%, rgba(255, 255, 255, .8) 0 5%, transparent 6%), radial-gradient(circle at 70% 16%, rgba(255, 255, 255, .8) 0 5%, transparent 6%); }
.rx-hatch.on .world-sym { transform: scale(1.08); }
@keyframes world-shake { 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
.world-fn { margin: 16px 0 6px; text-align: center; }
.world-fn .lbl b { font-size: 1.6rem; }
.world-facts { display: grid; gap: 8px; max-width: 640px; margin: 0 auto; }
.world-facts p { margin: 0; padding: 10px 14px; border-radius: 16px; background: var(--paper); }
.world-facts .lbl { align-items: flex-start; text-align: left; }
.world-facts .lbl b { font: 600 1.08rem/1.35 var(--body); color: var(--ink); }
.world-facts .lbl b + b { margin-top: 4px; color: var(--ink-2); }
.world-nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 16px; }
.world-top { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 16px; padding: 10px 18px; max-width: 520px; border-radius: 24px; background: color-mix(in srgb, var(--bg, var(--w)) 18%, #fff); }
.world-top img { width: 84px; height: 84px; }
.world-top .lbl b { font-size: 1.4rem; }
.world-opt .art .world-flag { width: 100%; height: auto; }
.choices .world-opt .art { width: 100%; height: auto; max-width: 150px; }
.world-opt .art { display: flex; align-items: center; }
.world-point { position: absolute; bottom: -6px; right: 4px; font-size: 2.2rem; animation: tap 1s ease-in-out 3; }
@media (max-width: 420px) {
  .world-map { padding: 10px; }
  .world-cs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .world-fs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-its { gap: 8px; }
  .world-it { min-height: 136px; padding: 8px 4px; }
  .world-it .lbl b { font-size: .92rem; }
  .world-rx { width: 132px; height: 132px; } .world-sym { width: 104px; height: 104px; }
}
[data-calm="1"] .world-rx::after, [data-calm="1"] .rx-splash i { animation: none; }
@media (prefers-reduced-motion: reduce) { .world-rx::after, .rx-shake.on .world-sym { animation: none; } }
