/* 3dkiddies: Discover. Dream. Do. A cinematic 3D town on the home page (sunny by day, starry by
   night, following the visitor's clock) and four places, each with its own colour: Stories &
   Rhymes purple, Play & Learn teal, Events sunshine, Bookshop sky. Chunky "sticker" buttons with
   a drop shadow echo the sticker logo. */
:root {
  color-scheme: light;
  --purple: #6046B8;  --purple-deep: #3B2A86; --purple-soft: #EEE9FB;
  --teal: #0E9C97;    --teal-text: #0B7B77;   --teal-deep: #08605D;  --teal-soft: #E1F4F3;
  --coral: #E84987;   --coral-text: #C13D70;  --coral-deep: #9C2E59; --coral-soft: #FDE7F0;
  --sun: #F5B72E;     --sun-deep: #C98A0B;    --sun-soft: #FFF1CC;
  --sky: #318BD2;     --sky-text: #2973AE;    --sky-deep: #1F5E91;   --sky-soft: #E2EFFA;
  --ink: #28243B;     --ink-soft: #5B5670;
  --cream: #FFF9EF;   --white: #FFFFFF;       --line: #E6DFF2;
  --night: #121A52;   --night-2: #1E2A72;

  --display: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --t-sm: 0.9375rem; --t-md: 1.0625rem; --t-lg: 1.375rem;
  --t-2xl: clamp(1.9rem, 3.6vw, 2.6rem); --t-3xl: clamp(2.2rem, 5vw, 3.6rem);
  --r-md: 20px; --r-lg: 30px;
  --wrap: 1180px;
  --top-h: 68px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); }
body { background: var(--cream); color: var(--ink); font-family: var(--body); font-size: var(--t-md); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-3xl); font-weight: 800; }
h2 { font-size: var(--t-2xl); font-weight: 800; }
h3 { font-size: var(--t-lg); font-weight: 700; }
p { margin: 0; }
a { color: var(--purple); }
button { font: inherit; }
/* Little ones tap fast: quick taps never zoom the page, and the games and books don't pop up
   the long-press menu or select text. */
button, a, input, label, select { touch-action: manipulation; }
.game, .reader, .bak { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.game input, .bak input { -webkit-user-select: text; user-select: text; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--purple); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 800; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
.band { padding-block: clamp(44px, 6vw, 80px); }
.band.tint { background: var(--purple-soft); }
.stack { display: grid; gap: 14px; align-content: start; }
.head { display: grid; gap: 6px; margin-bottom: 26px; }
.muted { color: var(--ink-soft); }
.small { font-size: var(--t-sm); }
.lede { font-size: clamp(1.06rem, 1.6vw, 1.25rem); color: var(--ink-soft); }
.eyebrow { font-family: var(--display); font-weight: 700; font-size: var(--t-sm); letter-spacing: .06em; text-transform: uppercase; color: var(--purple); }

/* ---------- Buttons, chips, pills ---------- */
.btn { --b: var(--purple); --b-deep: var(--purple-deep); --b-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.125rem; line-height: 1;
  padding: 15px 24px 13px; border-radius: 999px; border: 0; background: var(--b); color: var(--b-fg);
  box-shadow: 0 5px 0 var(--b-deep); transition: transform .08s ease, box-shadow .08s ease; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--b-deep); }
.btn.sun   { --b: var(--sun);       --b-deep: var(--sun-deep);   --b-fg: var(--ink); }
.btn.teal  { --b: var(--teal-text); --b-deep: var(--teal-deep); }
.btn.coral { --b: var(--coral-text); --b-deep: var(--coral-deep); }
.btn.sky   { --b: var(--sky-text);  --b-deep: var(--sky-deep); }
.btn.light { --b: #fff; --b-deep: var(--line); --b-fg: var(--purple); }
.btn.small { font-size: 1rem; padding: 11px 18px 9px; box-shadow: 0 4px 0 var(--b-deep); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--purple-soft); color: var(--purple); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.pill { border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 800; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); box-shadow: 0 2px 0 var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-in { height: var(--top-h); display: flex; align-items: center; gap: 20px; }
.logo img { width: 142px; height: auto; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.menu { position: relative; }
.menu > a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.08rem; padding: 8px 14px 6px; border-radius: 999px; white-space: nowrap; }
.menu > a:hover { background: var(--purple-soft); }
.menu:has(.drop) > a::after { content: "▾"; font-size: .8em; opacity: .6; }
.menu > a[aria-current="page"] { background: var(--purple); color: #fff; }
.menu > a[data-nav="play"][aria-current="page"] { background: var(--teal-text); }
.menu > a[data-nav="events"][aria-current="page"] { background: var(--sun); color: var(--ink); }
.menu > a[data-nav="bookshop"][aria-current="page"] { background: var(--sky-text); }
.drop { position: absolute; left: 0; top: 100%; min-width: 250px; padding: 8px; background: #fff; border-radius: 18px; box-shadow: 0 16px 40px rgba(40, 36, 59, .16), 0 0 0 2px var(--line); display: grid; gap: 2px; opacity: 0; visibility: hidden; translate: 0 6px; transition: opacity .15s ease, translate .15s ease, visibility .15s; z-index: 70; }
.drop::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.menu:hover .drop, .menu:focus-within .drop { opacity: 1; visibility: visible; translate: 0 2px; }
.drop a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 9px 12px; border-radius: 12px; }
.drop a:hover, .drop a:focus-visible { background: var(--purple-soft); }
.ico { font-size: 1.15em; }
.gu-link { text-decoration: none; font-weight: 800; font-size: var(--t-sm); color: var(--ink-soft); border: 2px solid var(--line); border-radius: 999px; padding: 7px 14px; white-space: nowrap; }
.gu-link:hover, .gu-link[aria-current="page"] { border-color: var(--ink); color: var(--ink); }

/* Phones: the main places move to a big tab bar along the bottom. */
.tabbar { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .gu-link { margin-left: auto; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; background: #fff; box-shadow: 0 -2px 0 var(--line), 0 -8px 24px rgba(40, 36, 59, .08); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .tabbar a { display: grid; justify-items: center; gap: 0; text-decoration: none; color: var(--ink-soft); font-weight: 800; font-size: .75rem; padding: 4px 0; border-radius: 14px; }
  .tabbar a span { font-size: 1.55rem; line-height: 1.2; }
  .tabbar a[aria-current="page"] { color: var(--purple); background: var(--purple-soft); }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Home: the cinematic hero ---------- */
/* A 3D film of the town: an opening fly-in through the clouds, then a gently moving loop. At night
   (or with reduced motion) the painted town is shown instead, with a slow push-in. */
.hero { position: relative; height: calc(100vh - var(--top-h)); height: calc(100svh - var(--top-h)); min-height: 560px; max-height: 1000px; overflow: hidden; background: #3E8FE0; display: grid; place-items: start center; }
.hero::before { content: ""; position: absolute; inset: 0; background: url(/img/world-day.jpg) 50% 60% / cover no-repeat; }
[data-time="night"] .hero::before { background-image: url(/img/world-night.jpg); }
.hero.intro::before { background-image: url(/img/sky-open.jpg); }
.hero-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.hero-film.on { opacity: 1; }
.hero.still::before { animation: pushin 30s ease-in-out infinite alternate; }
@keyframes pushin { from { transform: scale(1); } to { transform: scale(1.08) translateY(-1%); } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24, 18, 72, .55) 0%, rgba(24, 18, 72, .18) 38%, rgba(24, 18, 72, 0) 58%, rgba(24, 18, 72, .25) 100%); pointer-events: none; }
.hero-in { position: relative; z-index: 2; display: grid; justify-items: center; gap: 14px; text-align: center; padding: clamp(36px, 7vh, 90px) 16px 0; color: #fff; }
.hello { font-family: var(--display); font-weight: 800; font-size: 1.2rem; background: var(--sun); color: var(--ink); border-radius: 999px; padding: 6px 18px 3px; box-shadow: 0 4px 0 var(--sun-deep); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.hero .hello { opacity: 0; translate: 0 10px; transition: opacity .6s ease, translate .6s ease; }
.tagline { margin: 0; font-family: var(--display); font-weight: 800; line-height: .95; font-size: clamp(3rem, 8.4vw, 7.4rem); letter-spacing: -.01em; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .28em; }
.tagline span { display: inline-block; color: #fff; opacity: 0; translate: 0 40px; scale: .9; transition: opacity .7s ease, translate .9s cubic-bezier(.2, 1.4, .4, 1), scale .9s cubic-bezier(.2, 1.4, .4, 1); }
/* Chunky 3D lettering: each word sits on its own coloured block, like a toy. */
.tagline .w1 { text-shadow: 0 2px 0 #8B6FE8, 0 4px 0 #7A5CDB, 0 6px 0 #6046B8, 0 8px 0 #523BA3, 0 10px 0 #3B2A86, 0 18px 26px rgba(20, 10, 60, .45); }
.tagline .w2 { text-shadow: 0 2px 0 #F27BA9, 0 4px 0 #EC5E96, 0 6px 0 #E84987, 0 8px 0 #C13D70, 0 10px 0 #9C2E59, 0 18px 26px rgba(60, 10, 30, .45); transition-delay: .25s; }
.tagline .w3 { text-shadow: 0 2px 0 #43C2BD, 0 4px 0 #22ADA8, 0 6px 0 #0E9C97, 0 8px 0 #0B7B77, 0 10px 0 #08605D, 0 18px 26px rgba(5, 40, 40, .45); transition-delay: .5s; }
.hero-sub { font-family: var(--display); font-weight: 700; font-size: clamp(1.1rem, 1.9vw, 1.5rem); max-width: 34ch; text-shadow: 0 2px 10px rgba(20, 16, 60, .55); opacity: 0; transition: opacity .8s ease .8s; }
.hero .cta { opacity: 0; translate: 0 12px; transition: opacity .7s ease 1s, translate .7s ease 1s; }
.hero.titled .hello, .hero.titled .tagline span, .hero.titled .hero-sub, .hero.titled .cta { opacity: 1; translate: 0 0; scale: 1; }
.film-toggle { position: absolute; z-index: 3; right: 16px; bottom: 16px; border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: .85rem; background: rgba(20, 16, 60, .55); color: #fff; cursor: pointer; backdrop-filter: blur(6px); }
.film-toggle[hidden] { display: none; }
@media (max-width: 760px) {
  .hero { height: 78vh; height: 78svh; min-height: 520px; }
  .hero-film { object-position: 42% 50%; }
  .hero-shade { background: linear-gradient(180deg, rgba(24, 18, 72, .6) 0%, rgba(24, 18, 72, .35) 55%, rgba(24, 18, 72, .1) 80%, rgba(24, 18, 72, .25) 100%); }
  .tagline { flex-direction: column; font-size: clamp(3.2rem, 16vw, 5rem); line-height: 1; }
  .hero .cta .btn { font-size: 1rem; padding: 13px 18px 11px; }
}
@media (prefers-reduced-motion: reduce) { .hero-in * { transition: none !important; } }

/* Four doors into the town */
.doors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.door { display: grid; grid-template-rows: auto 1fr; background: #fff; border-radius: var(--r-lg); overflow: hidden; border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line); transition: transform .2s ease; }
.door:hover { transform: translateY(-4px); }
.door > a { display: block; text-decoration: none; }
.door img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.door .txt { display: grid; gap: 8px; padding: 16px 18px 20px; align-content: start; }
.door h3 { font-size: 1.35rem; }
.door h3 a { color: var(--dc); text-decoration: none; }
.door p { font-size: var(--t-sm); color: var(--ink-soft); }
.door .chips a { text-decoration: none; }
@media (max-width: 1000px) { .doors { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .doors { grid-template-columns: 1fr; } .door { grid-template-columns: 40% 1fr; grid-template-rows: none; } .door img { height: 100%; aspect-ratio: auto; } }

/* Today's picks */
.today { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pick { display: grid; grid-template-rows: auto 1fr; background: #fff; border-radius: var(--r-lg); overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 6px 0 var(--line); border: 2px solid var(--line); transition: transform .2s ease; cursor: pointer; text-align: left; padding: 0; font: inherit; }
.pick:hover { transform: translateY(-4px) rotate(-.4deg); }
.pick .pic { position: relative; aspect-ratio: 4 / 3; background: var(--pbg, var(--purple-soft)); display: grid; place-items: center; overflow: hidden; }
.pick .pic img, .pick .pic canvas { width: 100%; height: 100%; object-fit: cover; }
.pick .pic canvas { position: absolute; inset: 0; margin: auto; width: auto; height: 88%; }
.pick .pic img.face { width: auto; height: 82%; aspect-ratio: 1; border-radius: 50%; border: 6px solid #fff; }
.pick .txt { display: grid; gap: 6px; padding: 16px 18px 20px; align-content: start; }
.pick .k { font-family: var(--display); font-weight: 800; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--pc, var(--purple)); }
.pick h3 { font-size: 1.3rem; }
@media (max-width: 860px) { .today { grid-template-columns: 1fr; } .pick { grid-template-columns: 42% 1fr; grid-template-rows: none; } .pick .pic { aspect-ratio: auto; min-height: 170px; } .pick .pic img { position: absolute; inset: 0; margin: auto; } }

/* Story friends */
.friends { display: grid; grid-template-columns: repeat(9, 1fr); gap: 14px; }
.friend { display: grid; justify-items: center; gap: 6px; text-align: center; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.friend img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; border: 5px solid #fff; box-shadow: 0 6px 0 rgba(96, 70, 184, .18); transition: transform .2s ease; }
.friend:hover img, .friend:focus-visible img { transform: translateY(-5px) rotate(-3deg) scale(1.04); }
.friend b { font-family: var(--display); font-size: 1.1rem; line-height: 1.1; }
.friend small { color: var(--ink-soft); font-weight: 700; font-size: .8rem; line-height: 1.2; }
@media (max-width: 1000px) {
  .friends { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 112px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 14px; margin-inline: -4px; }
  .friend { scroll-snap-align: start; }
}

/* Skills */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skill { display: grid; gap: 8px; align-content: start; text-decoration: none; color: var(--ink); background: var(--sbg); border-radius: var(--r-md); padding: 20px; border: 2px solid transparent; transition: transform .2s ease; }
.skill:hover { transform: translateY(-3px); border-color: var(--sfg); }
.skill .em { font-size: 2.2rem; line-height: 1; }
.skill h3 { color: var(--sfg); font-size: 1.25rem; }
.skill p { font-size: var(--t-sm); color: var(--ink-soft); }
@media (max-width: 900px) { .skills { grid-template-columns: 1fr 1fr; } }

/* Bedtime corner */
.bedtime { background: linear-gradient(160deg, var(--night), #2B1F6B); color: #EDE8FF; }
.bedtime h2 { color: #fff; }
.bedtime .eyebrow { color: var(--sun); }
.bedtime-in { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.bedtime-in img { border-radius: var(--r-lg); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 860px) { .bedtime-in { grid-template-columns: 1fr; } }

/* Promise */
.promise { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.promises li { background: #fff; border-radius: var(--r-md); padding: 16px 20px 16px 58px; position: relative; border: 2px solid var(--line); color: var(--ink-soft); }
.promises li::before { content: "✓"; position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--teal-text); color: #fff; display: grid; place-items: center; font-weight: 800; }
.promises b { display: block; color: var(--ink); font-family: var(--display); font-size: 1.15rem; }
@media (max-width: 860px) { .promise { grid-template-columns: 1fr; } }

/* ---------- Place banners ---------- */
.banner { padding-block: clamp(28px, 4vw, 48px); background: var(--bbg); }
.banner.purple { --bbg: var(--purple-soft); } .banner.purple .eyebrow { color: var(--purple); }
.banner.teal { --bbg: var(--teal-soft); } .banner.teal .eyebrow { color: var(--teal-text); }
.banner.coral { --bbg: var(--coral-soft); } .banner.coral .eyebrow { color: var(--coral-text); }
.banner.cream { --bbg: var(--sun-soft); } .banner.cream .eyebrow { color: var(--ink); }
.banner.sun { --bbg: var(--sun-soft); } .banner.sun .eyebrow { color: var(--sun-deep); }
.banner.sky { --bbg: var(--sky-soft); } .banner.sky .eyebrow { color: var(--sky-text); }
.banner-in { display: grid; grid-template-columns: 1fr 1.05fr; gap: 36px; align-items: center; }
.banner-in img { border-radius: var(--r-lg); border: 6px solid #fff; box-shadow: 0 10px 0 rgba(40, 36, 59, .08); rotate: 1.2deg; aspect-ratio: 3 / 2; object-fit: cover; }
.banner p { font-size: 1.15rem; color: var(--ink-soft); max-width: 40ch; }
@media (max-width: 760px) { .banner-in { grid-template-columns: 1fr; gap: 20px; } .banner-in img { order: -1; rotate: 0deg; max-height: 210px; width: 100%; } }

/* ---------- Read: the shelf ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 34px 24px; }
.book-card { display: grid; gap: 8px; justify-items: start; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.book-card canvas { width: 100%; height: auto; aspect-ratio: 600 / 790; display: block; transition: transform .25s ease; }
.book-card:hover canvas, .book-card:focus-visible canvas { transform: translateY(-6px) rotate(-1.2deg); }
.book-card .book-title { font-family: var(--display); font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.book-card .learns { font-size: .875rem; color: var(--ink-soft); line-height: 1.35; }
@media (max-width: 520px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; } }

/* The read list: books lined up for bedtime, played one after another. */
.book-item { display: grid; gap: 10px; align-content: start; }
.rl-add { justify-self: start; border: 2px solid var(--line); background: #fff; color: var(--purple); border-radius: 999px; padding: 7px 14px; font-weight: 800; font-size: .9rem; cursor: pointer; }
.rl-add[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.readlist { background: linear-gradient(160deg, var(--night), #2B1F6B); color: #EDE8FF; border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 40px; box-shadow: 0 8px 0 rgba(40, 36, 59, .12); }
.readlist h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.readlist .muted { color: #CFC6F2; max-width: 60ch; }
.rl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.rl-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rl-actions .btn.light { --b: rgba(255, 255, 255, .12); --b-deep: rgba(0, 0, 0, .25); --b-fg: #fff; }
#rl-play:disabled { opacity: .45; cursor: default; }
.rl-items { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.rl-items:empty { display: none; }
.rl-items li { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 8px 10px 8px 12px; }
.rl-n { width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.rl-t { flex: 1; font-weight: 700; min-width: 0; }
.rl-do { display: flex; gap: 6px; flex: none; }
.rl-do button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.05rem; font-weight: 800; cursor: pointer; }
.rl-do button:disabled { opacity: .3; cursor: default; }
.rl-pill { position: fixed; z-index: 55; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 999px; padding: 14px 20px 12px; background: var(--sun); color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 1.05rem; cursor: pointer; box-shadow: 0 5px 0 var(--sun-deep), 0 10px 26px rgba(40, 36, 59, .25); }
@media (max-width: 760px) { .rl-pill { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } .readlist { padding: 18px 16px; } }

/* ---------- Play ---------- */
.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.game-card { display: grid; grid-template-rows: auto 1fr; background: #fff; border-radius: var(--r-lg); border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line); overflow: hidden; }
.game-card .pic { background: var(--gbg); aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; }
.game-card .pic img { width: 62%; height: auto; border-radius: 50%; border: 6px solid #fff; box-shadow: 0 8px 0 rgba(0, 0, 0, .08); }
.game-card .pic .em { position: absolute; right: 14px; bottom: 10px; font-size: 2.6rem; }
.game-card .txt { display: grid; gap: 10px; padding: 18px 20px 22px; align-content: start; }
.game-card .goal { font-size: var(--t-sm); color: var(--ink-soft); }
.game-card .goal b { color: var(--teal-text); }
.game-card .btn { justify-self: start; margin-top: 4px; }
@media (max-width: 900px) { .games { grid-template-columns: 1fr; } .game-card { grid-template-columns: 38% 1fr; grid-template-rows: none; } .game-card .pic { aspect-ratio: auto; } }

/* ---------- Make ---------- */
.colouring { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.page-card { display: grid; gap: 10px; background: #fff; border-radius: var(--r-md); padding: 12px 12px 16px; border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line); }
.page-card img { aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.page-card h3 { font-size: 1.1rem; }
.page-card .row { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) { .colouring { grid-template-columns: 1fr 1fr; } }
.activities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.activity { background: #fff; border-radius: var(--r-md); padding: 20px 22px; display: grid; gap: 8px; align-content: start; border: 2px solid var(--line); }
.activity .em { font-size: 2.2rem; line-height: 1; }
.activity ol { margin: 0; padding-left: 1.2em; color: var(--ink-soft); font-size: var(--t-sm); display: grid; gap: 4px; }
.activity .from { font-size: .85rem; font-weight: 800; color: var(--coral-text); }
@media (max-width: 900px) { .activities { grid-template-columns: 1fr; } }

/* ---------- Grown-ups ---------- */
.gu { display: grid; gap: 48px; }
.quote { margin: 0; font-family: var(--display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 700; line-height: 1.35; background: #fff; border-left: 8px solid var(--sun); border-radius: var(--r-md); padding: 24px 28px; }
.quote small { display: block; margin-top: 10px; font-family: var(--body); font-size: var(--t-sm); color: var(--ink-soft); }
.table-scroll { overflow-x: auto; background: #fff; border-radius: var(--r-md); border: 2px solid var(--line); }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--display); font-size: 1.05rem; background: var(--purple-soft); }
tr:last-child td { border-bottom: 0; }
.gu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.gu-card { background: #fff; border-radius: var(--r-md); padding: 20px 24px; border: 2px solid var(--line); }
.gu-card ul { margin: 10px 0 0; padding-left: 1.2em; color: var(--ink-soft); display: grid; gap: 6px; }
@media (max-width: 760px) { .gu-grid { grid-template-columns: 1fr; } }
.soon { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.soon-card { display: flex; gap: 16px; align-items: center; background: var(--sky-soft); border-radius: var(--r-md); padding: 18px 22px; }
.soon-card .big { font-size: 2.6rem; }
@media (max-width: 760px) { .soon { grid-template-columns: 1fr; } }
.faq { display: grid; gap: 10px; }
details { background: #fff; border-radius: 16px; border: 2px solid var(--line); padding: 14px 18px; }
summary { font-weight: 800; cursor: pointer; }
details p { margin-top: 8px; color: var(--ink-soft); }
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.contact code { font-family: var(--body); font-weight: 800; font-size: 1.15rem; background: #fff; border: 2px solid var(--line); padding: 8px 14px; border-radius: 12px; }

/* ---------- Footer ---------- */
.foot { background: var(--purple-deep); color: #DCD5F7; padding-block: 36px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-brand { display: grid; gap: 6px; }
.foot-brand span { font-family: var(--display); font-weight: 800; color: #fff; letter-spacing: .02em; }
.foot a { color: #fff; font-weight: 800; text-decoration: none; }

/* ---------- Topic and section pills under each banner ---------- */
.subnav { position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); z-index: 40; background: rgba(255, 249, 239, .94); backdrop-filter: blur(8px); border-bottom: 2px solid var(--line); }
.subnav .pills { margin: 0; padding-block: 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.subnav .pill { text-decoration: none; white-space: nowrap; }
.subnav .pill[aria-current="page"] { background: var(--purple); border-color: var(--purple); color: #fff; }
[data-view="play"] .subnav .pill[aria-current="page"] { background: var(--teal-text); border-color: var(--teal-text); }
[data-view="bookshop"] .subnav .pill[aria-current="page"] { background: var(--sky-text); border-color: var(--sky-text); }
.empty { color: var(--ink-soft); font-weight: 700; }

/* ---------- Rhymes ---------- */
.rhymes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.rhyme { display: grid; grid-template-columns: 42% 1fr; background: #fff; border-radius: var(--r-lg); overflow: hidden; border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line); }
.rhyme img { width: 100%; height: 100%; object-fit: cover; }
.rhyme .txt { display: grid; gap: 10px; padding: 18px 20px; align-content: start; }
.rhyme h3 { font-size: 1.3rem; }
.rhyme .lines { margin: 0; color: var(--ink-soft); font-size: var(--t-sm); line-height: 1.5; }
.rhyme .btn { justify-self: start; }
.rhyme .btn[aria-pressed="true"] { --b: var(--coral-text); --b-deep: var(--coral-deep); }
@media (max-width: 900px) { .rhymes { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .rhyme { grid-template-columns: 1fr; } .rhyme img { aspect-ratio: 3 / 2; height: auto; } }

/* ---------- Events ---------- */
.event-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kind { background: #fff; border-radius: var(--r-md); padding: 20px; display: grid; gap: 8px; align-content: start; border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line); }
.kind .em { font-size: 2.4rem; line-height: 1; }
.kind p { color: var(--ink-soft); font-size: var(--t-sm); }
.kind .chip { justify-self: start; background: var(--sun-soft); color: var(--ink); }
@media (max-width: 1000px) { .event-kinds { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .event-kinds { grid-template-columns: 1fr; } }
.notify { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; background: var(--sun-soft); border-radius: var(--r-lg); padding: 22px 26px; }

/* ---------- Bookshop ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 22px; }
.product { display: grid; gap: 10px; align-content: start; background: #fff; border-radius: var(--r-lg); padding: 16px 16px 20px; border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line); }
.product canvas { width: 78%; height: auto; aspect-ratio: 600 / 790; justify-self: center; }
.product h3 { font-size: 1.15rem; line-height: 1.2; }
.product .meta { font-size: .875rem; color: var(--ink-soft); line-height: 1.4; }
.product .status { font-weight: 800; color: var(--sky-text); font-size: .9rem; display: flex; flex-direction: column; gap: 2px; }
.product .status .now { color: var(--teal-text); }
.product .row { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 520px) { .products { grid-template-columns: 1fr 1fr; gap: 16px 12px; } .product { padding: 12px 10px 14px; } .product .btn { font-size: .9rem; padding: 10px 12px 8px; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 400; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: calc(100vw - 32px); text-align: center; }

/* ---------- Games (full screen) ---------- */
.game { position: fixed; inset: 0; z-index: 140; display: grid; grid-template-rows: auto 1fr; background: var(--gbg, var(--teal-soft)); overflow: auto; }
.game-top { display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
.game-top h2 { font-size: clamp(1.2rem, 3vw, 1.7rem); margin-right: auto; }
.game-stars { font-size: 1.5rem; letter-spacing: 2px; white-space: nowrap; }
.g-btn { width: 50px; height: 50px; border-radius: 50%; border: 0; background: #fff; font-size: 1.3rem; cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); flex: none; }
.g-btn[aria-pressed="false"] { opacity: .55; }
@media (max-width: 480px) { .game-top { gap: 8px; } .game-top h2 { font-size: 1.05rem; } .game-stars { font-size: 1.05rem; letter-spacing: 0; } .g-btn { width: 42px; height: 42px; font-size: 1.1rem; } }
.game-stage { display: grid; align-content: center; justify-items: center; gap: 18px; padding: 8px 16px calc(28px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.lead { display: grid; justify-items: center; gap: 18px; }
.say { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 3.4vw, 2.1rem); line-height: 1.2; max-width: 22ch; }
.coach { display: flex; align-items: center; gap: 14px; }
.coach img { width: clamp(70px, 12vw, 110px); border-radius: 50%; border: 5px solid #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, .1); }
.coach.happy img { animation: hop .5s ease 2; }
@keyframes hop { 50% { transform: translateY(-14px) rotate(-6deg); } }
.choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.choice { min-width: 84px; height: 84px; padding: 0 18px; border-radius: 24px; border: 0; background: #fff; font-family: var(--display); font-weight: 800; font-size: 2.2rem; cursor: pointer; box-shadow: 0 6px 0 rgba(0, 0, 0, .14); color: var(--ink); transition: transform .08s ease; }
.choice:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .14); }
.choice.wrong { animation: shake .4s ease; background: #FFE3E3; }
.choice.right { background: #D8F5E1; }
@keyframes shake { 25% { translate: -8px 0; } 75% { translate: 8px 0; } }
.done { display: grid; justify-items: center; gap: 16px; }
.done .big { font-size: 4rem; animation: hop .6s ease 3; }

/* Walking children through: a bouncing hand over what to tap, and choices that light up as
   they are read aloud. */
.hint { position: relative; z-index: 2; box-shadow: 0 0 0 5px #fff, 0 0 0 10px var(--sun), 0 6px 0 rgba(0, 0, 0, .14); animation: hint-glow 1.2s ease-in-out infinite; }
.hint::after { content: "👆"; position: absolute; left: 50%; top: 62%; font-size: 2.8rem; line-height: 1; translate: -20% 0; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .25)); animation: tap 1s ease-in-out infinite; z-index: 5; }
.carrot.hint { border-radius: 20px; background: rgba(255, 255, 255, .5); }
@keyframes tap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes hint-glow { 50% { box-shadow: 0 0 0 5px #fff, 0 0 0 14px rgba(245, 183, 46, .55), 0 6px 0 rgba(0, 0, 0, .14); } }
.reading { animation: read-pop .9s ease; }
@keyframes read-pop { 0% { transform: scale(1); } 30% { transform: scale(1.14); box-shadow: 0 0 0 6px var(--sun), 0 6px 0 rgba(0, 0, 0, .14); } 100% { transform: scale(1); } }
.plate.reading .disc { box-shadow: 0 0 0 6px var(--sun); }
.rainbow path.next { stroke: #CFC5E6; animation: band 1.1s ease-in-out infinite; }
@keyframes band { 50% { stroke: #B7A8DC; } }
.banana-cuts .choice b { font-size: 1.6rem; line-height: 1; }

/* Benny's carrots */
.patch { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 640px; min-height: 120px; background: #A8D97A; border-radius: 30px; padding: 18px; box-shadow: inset 0 -8px 0 #8CC25E; }
.carrot { width: 64px; height: 92px; border: 0; background: none; cursor: pointer; padding: 0; transition: transform .25s ease, opacity .25s ease; }
.carrot svg { width: 100%; height: 100%; }
.carrot:hover { transform: rotate(-8deg); }
.carrot.picked { transform: translateY(-40px) scale(.4); opacity: 0; pointer-events: none; }
.basket { display: flex; flex-wrap: wrap; justify-content: center; align-items: end; gap: 4px; min-width: 220px; max-width: 520px; min-height: 86px; background: #C8894B; border-radius: 12px 12px 40px 40px; padding: 10px 18px 16px; box-shadow: inset 0 -8px 0 #A86F36; }
.basket span { width: 34px; height: 50px; display: grid; position: relative; }
.basket span svg { width: 100%; height: 100%; }
.basket span b { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); font-family: var(--display); font-size: 1.2rem; color: var(--ink); background: #fff; border-radius: 999px; padding: 0 8px; }

/* Ellie's rainbow */
.rainbow { width: min(560px, 92vw, calc((100vh - 470px) * 1.85)); min-width: min(300px, 92vw); height: auto; }
.rainbow path { transition: stroke .4s ease; }
.pots .choice { width: 92px; height: 92px; display: grid; place-items: center; padding: 0; font-size: .95rem; }
.pots .choice i { width: 54px; height: 54px; border-radius: 50%; background: var(--pot); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .15); }

/* Kiki's banana */
.table-top { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.plate { width: 104px; display: grid; justify-items: center; gap: 4px; }
.plate .disc { width: 96px; height: 96px; border-radius: 50%; background: #fff; box-shadow: inset 0 -6px 0 #E9E3D6, 0 4px 0 rgba(0, 0, 0, .08); display: grid; place-items: center; font-size: 2.6rem; position: relative; }
.plate .disc .slice { position: absolute; bottom: 10px; width: 46px; height: 20px; border-radius: 20px; background: #FFE066; border: 3px solid #E0B400; animation: hop .5s ease; }
.plate b { font-family: var(--display); font-size: 1.05rem; }
.banana-cuts .choice { width: auto; height: auto; padding: 10px 16px; display: grid; gap: 4px; font-size: 1.05rem; }
.banana-cuts svg { width: 150px; height: 52px; }
@media (max-width: 520px) { .banana-cuts { gap: 8px; flex-wrap: nowrap; } .banana-cuts .choice { padding: 8px 6px; flex: 1; min-width: 0; } .banana-cuts svg { width: 100%; height: 40px; } .plate { width: 80px; } .plate .disc { width: 74px; height: 74px; font-size: 2rem; } }

/* ---------- Art Studio: the colouring table ---------- */
.studio-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; }
.studio { --gbg: #FDF0F5; }
.studio-body { display: grid; grid-template-columns: auto minmax(300px, 400px); justify-content: center; align-items: start; gap: 22px; padding: 4px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
.paper-wrap { position: relative; height: calc(100vh - 110px); height: calc(100svh - 110px); max-height: 1206px; aspect-ratio: 900 / 1206; background: #fff; border-radius: 18px; box-shadow: 0 10px 0 rgba(0, 0, 0, .08), 0 0 0 4px #fff; overflow: hidden; }
.paper-wrap canvas, .paper-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; }
#paper { touch-action: none; cursor: crosshair; }
.studio[data-tool="magic"] #paper { cursor: pointer; }
.studio[data-tool="magic"] .tip-box { opacity: .6; }
#studio-print-top { flex: none; }
@media (max-width: 480px) { #studio-print-top { padding: 9px 12px 7px; font-size: .9rem; } }
#paper-lines { mix-blend-mode: multiply; pointer-events: none; object-fit: fill; }
.studio-tools { display: grid; gap: 16px; }
.lbl { font-family: var(--display); font-weight: 800; font-size: 1rem; }
.crayons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; background: #fff; border-radius: 20px; padding: 12px 10px 6px; box-shadow: 0 6px 0 rgba(0, 0, 0, .06); }
.crayon { border: 0; background: none; padding: 0; cursor: pointer; height: 74px; display: grid; align-items: end; justify-items: center; }
.crayon svg { width: 24px; height: 70px; transition: transform .15s ease; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .2)); }
.crayon[aria-pressed="true"] svg { transform: translateY(-10px) scale(1.15); }
.crayon:hover svg { transform: translateY(-5px); }
.tool-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tool { border: 0; background: #fff; border-radius: 16px; padding: 10px 14px; font-weight: 800; font-size: .95rem; cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, .1); color: var(--ink); }
.tool[aria-pressed="true"] { background: var(--coral-text); color: #fff; box-shadow: 0 4px 0 var(--coral-deep); }
.tool:disabled { opacity: .45; cursor: default; }
.tip-box, .pages-box { display: grid; gap: 8px; background: #fff; border-radius: 20px; padding: 12px 14px; box-shadow: 0 6px 0 rgba(0, 0, 0, .06); }
.tip-row { display: flex; align-items: center; gap: 10px; }
.tip-step { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--coral-soft); color: var(--coral-text); font-size: 1.6rem; font-weight: 800; cursor: pointer; flex: none; }
.tip-show { width: 66px; height: 66px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; flex: none; box-shadow: inset 0 0 0 2px var(--line); }
.tip-dot { width: var(--d, 18px); height: var(--d, 18px); max-width: 60px; max-height: 60px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0, 0, 0, .15); }
#tip-size { flex: 1; min-width: 60px; accent-color: var(--coral-text); }
.tips { display: flex; gap: 8px; }
.tip { flex: 1; height: 44px; border-radius: 14px; border: 2px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; }
.tip i { width: var(--d); height: var(--d); max-width: 34px; max-height: 34px; border-radius: 50%; background: var(--ink); }
.tip[aria-pressed="true"] { border-color: var(--coral-text); background: var(--coral-soft); }
.pages { display: flex; gap: 8px; }
.page-pick { flex: 1; border: 3px solid var(--line); border-radius: 12px; padding: 0; background: #fff; cursor: pointer; overflow: hidden; }
.page-pick img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.page-pick[aria-pressed="true"] { border-color: var(--coral-text); }
@media (max-width: 860px) {
  .studio-body { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .paper-wrap { height: auto; width: min(100%, calc(56svh * 900 / 1206)); }
  .studio-tools { width: 100%; max-width: 560px; }
  .crayons { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 40px; overflow-x: auto; justify-content: start; }
}

/* ---------- 3D reader ---------- */
.reader { position: fixed; inset: 0; z-index: 150; background: #140E30; color: #F3F0FA; }
.reader canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.r-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.r-title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; opacity: .85; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-skip { pointer-events: auto; border: 0; background: var(--sun); color: var(--ink); border-radius: 999px; padding: 8px 14px; font-weight: 800; cursor: pointer; flex: none; margin-left: auto; box-shadow: 0 3px 0 var(--sun-deep); }
.r-close { pointer-events: auto; border: 2px solid rgba(255, 255, 255, .35); background: rgba(20, 14, 48, .5); color: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 800; cursor: pointer; flex: none; }
.r-open { position: absolute; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); }
.reader.is-open .r-open { display: none; }
.r-open:disabled { cursor: progress; filter: saturate(.6); transform: translateX(-50%); }
.r-bar { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: none; align-items: center; gap: 14px; background: rgba(20, 14, 48, .65); border-radius: 999px; padding: 6px; }
.reader.is-open .r-bar { display: flex; }
.r-arrow { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--sun); color: var(--ink); font-size: 1.5rem; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 var(--sun-deep); }
.r-arrow:disabled { opacity: .35; cursor: default; box-shadow: none; }
.r-count { min-width: 10ch; text-align: center; font-weight: 800; font-size: var(--t-sm); white-space: nowrap; }
.r-read { height: 52px; padding: 0 18px 0 14px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 800; font-size: var(--t-sm); cursor: pointer; white-space: nowrap; }
.r-read[aria-pressed="true"] { background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 var(--sun-deep); }
.r-music { width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.6rem; font-weight: 800; cursor: pointer; position: relative; flex: none; }
.r-music.off { opacity: .55; }
.r-music.off::after { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; height: 3px; background: #fff; border-radius: 3px; transform: rotate(-40deg); }
@media (max-width: 480px) { .r-bar { gap: 6px; } .r-count { min-width: 6ch; font-size: .8rem; } .r-read { padding: 0 10px; font-size: .8rem; } .r-arrow, .r-music { width: 46px; height: 46px; } }

/* Printing a colouring page: just the picture, full page. */
@media print {
  body.printing > *:not(.print-page) { display: none !important; }
  .print-page { display: block !important; }
  .print-page img { width: 100%; height: auto; }
  @page { margin: 10mm; }
}
.print-page { display: none; }

/* Short wide screens (small laptops, tablets on their side): wider, smaller words and a smaller
   coach keep the games on one screen. */
@media (max-height: 860px) and (min-width: 700px) {
  .game-stage { gap: 12px; }
  .lead { gap: 10px; }
  .say { max-width: 32ch; font-size: clamp(1.3rem, 3.6vh, 1.9rem); }
  .coach img { width: clamp(70px, 11vh, 96px); }
}
/* ---------- Phones on their side (short landscape screens) ----------
   Games put Kiki and the words on the left and the play on the right, and the studio puts the
   paper beside the crayons, so nothing a child needs is below the screen. */
@media (max-height: 500px) and (orientation: landscape) {
  .game-top { padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: 6px; }
  .g-btn { width: 44px; height: 44px; font-size: 1.1rem; }
  .game-stage { grid-template-columns: minmax(180px, 34%) 1fr; grid-auto-flow: row dense; align-items: center; gap: 10px 22px; padding-top: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .game-stage > * { grid-column: 2; }
  .game-stage > .lead { grid-column: 1; grid-row: 1 / span 4; gap: 8px; }
  .game-stage > .done { grid-column: 1 / -1; gap: 8px; }
  .done .big { font-size: 2.6rem; }
  .coach img { width: 64px; border-width: 4px; }
  .say { font-size: 1.2rem; }
  .choices { gap: 10px; }
  .choice { min-width: 64px; height: 64px; font-size: 1.7rem; border-radius: 18px; }
  .patch { padding: 10px; min-height: 0; gap: 6px; }
  .carrot { width: 46px; height: 66px; }
  .basket { min-height: 60px; padding: 6px 12px 10px; }
  .basket span { width: 26px; height: 38px; }
  .rainbow { width: min(400px, 52vw, calc((100vh - 200px) * 1.85)); min-width: 0; }
  .pots .choice { width: 64px; height: 64px; }
  .pots .choice i { width: 40px; height: 40px; }
  .plate { width: 76px; } .plate .disc { width: 70px; height: 70px; font-size: 2rem; }
  .banana-cuts .choice { padding: 6px 10px; } .banana-cuts svg { width: 110px; height: 40px; }
  .studio-body { grid-template-columns: auto minmax(240px, 1fr); justify-items: stretch; align-items: start; gap: 16px; }
  .paper-wrap { height: calc(100vh - 84px); width: auto; }
  .studio-tools { max-height: calc(100vh - 84px); overflow-y: auto; width: auto; gap: 10px; }
  .crayons { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); grid-auto-columns: auto; overflow: visible; }
  .crayon { height: 60px; } .crayon svg { height: 56px; }
}
