/* ==========================================================================
   Kids section (/kids/). "Playful Kashi": the glazed khatam tiles, saffron / turquoise / indigo glazes and the girih
   lattice of kashi.css in a bigger, rounder, toy-like variant. Child pages (body.kz) are always light; parent pages
   (body.kzp) and the landing (body.kzl) use the site tokens. Andika (OFL, unmodified SIL WOFF2) for Latin letters and
   words only; Vazirmatn for Persian. Logical properties; transform/opacity animations; motion tiers html[data-motion].
   ========================================================================== */

@font-face {
  font-family: "Andika";
  src: url("../fonts/Andika-Bold.0213aa93ed70.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2010-2027, U+2190-2193;
}

/* Andika covers Latin only (unicode-range): Persian inside an English block (the LTR game stage, a nickname in
   "Hello, …!", a Persian button or praise line in the stage) falls through to Vazirmatn, not to the system font */
.kz-glyph, .kz-en, .kz [lang="en"] { font-family: "Andika", "Atkinson Next", "Vazirmatn NL", system-ui, sans-serif; font-weight: 700; }
.kz-glyph { line-height: 1; letter-spacing: 0.01em; }

/* ---- forced light tokens on child pages ------------------------------------------------------------------------ */
html:has(body.kz) { background: #fff8ec; color-scheme: light; }
body.kz {
  color-scheme: light;
  --paper: #fff8ec; --paper-2: #fbefd9; --card: #ffffff; --ink: #1d1a3a; --ink-2: #4f4b6e; --indigo: #3a3fcb;
  --on-indigo: #fff; --teal: #07756d; --teal-deco: #0b8f86; --saffron: #ffb627; --ok: #177a45; --bad: #c0322b;
  --line: #8a859c; --hair: #eadfca; --on-done: #fff; --tile-done: #0b8f86; --tile-done-ledge: #05655e;
  --kz-sun: #ffb627; --kz-sun-d: #d48a00; --kz-sun-l: #ffe1a1;
  --kz-tq: #0e958c; --kz-tq-d: #08665f; --kz-tq-l: #b8eee8;
  --kz-ind: #4a50d8; --kz-ind-d: #2f34a6; --kz-ind-l: #d3d5ff;
  --kz-rose: #e2557c; --kz-rose-d: #ac2f55; --kz-rose-l: #ffd0dd;
  --kz-grn: #2f9a4c; --kz-grn-d: #1e6f35; --kz-grn-l: #c4efd0;
  --kz-sky: #dff3ff;
  --kz-r: 22px; --kz-tap: 72px;
  --kz-lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23d48a00' stroke-opacity='.11' stroke-width='1.3'%3E%3Cpath d='M24 9L19.6 13.4L13.4 13.4L13.4 19.6L9 24L13.4 28.4L13.4 34.6L19.6 34.6L24 39L28.4 34.6L34.6 34.6L34.6 28.4L39 24L34.6 19.6L34.6 13.4L28.4 13.4Z'/%3E%3Cpath d='M24 0V9M24 39V48M0 24H9M39 24H48'/%3E%3C/g%3E%3C/svg%3E");
  background: var(--paper) var(--kz-lattice);
  color: var(--ink);
  min-block-size: 100vh; min-block-size: 100dvh;  /* vh first: dvh needs Chrome 108, the app accepts WebView 90 */
  -webkit-tap-highlight-color: transparent;
}
body.kz main { padding-block-end: 24px; }
.kz .toasts { position: relative; z-index: 5; }

/* ---- tones: one glaze per class, used by tiles, buttons, avatars, map ------------------------------------------- */
.t-sun, .t-saffron, .t-alphabet { --c: var(--kz-sun); --d: var(--kz-sun-d); --l: var(--kz-sun-l); --t: #1d1a3a; }
.t-tq, .t-turquoise, .t-sounds { --c: var(--kz-tq); --d: var(--kz-tq-d); --l: var(--kz-tq-l); --t: #fff; }
.t-ind, .t-indigo, .t-words { --c: var(--kz-ind); --d: var(--kz-ind-d); --l: var(--kz-ind-l); --t: #fff; }
.t-rose, .t-talk { --c: var(--kz-rose); --d: var(--kz-rose-d); --l: var(--kz-rose-l); --t: #fff; }
.t-green { --c: var(--kz-grn); --d: var(--kz-grn-d); --l: var(--kz-grn-l); --t: #fff; }
.t-ghost { --c: #fff; --d: #e3d4b4; --l: #fff; --t: #1d1a3a; }
/* kids tokens also on parent/landing pages (avatars, track cards) */
.kzp, .kzl { --kz-sun: #ffb627; --kz-sun-d: #c98500; --kz-sun-l: #ffe1a1; --kz-tq: #0e958c; --kz-tq-d: #08665f; --kz-tq-l: #b8eee8;
  --kz-ind: #4a50d8; --kz-ind-d: #2f34a6; --kz-ind-l: #d3d5ff; --kz-rose: #e2557c; --kz-rose-d: #ac2f55; --kz-rose-l: #ffd0dd;
  --kz-grn: #2f9a4c; --kz-grn-d: #1e6f35; --kz-grn-l: #c4efd0; }

ol.kz-stars, ol.kz-path, ol.kz-sess-list, ol.kz-lyrics, ol.kz-story-dots, ol.kz-shelf-grid, ol.kz-next-list, ol.kz-credit-list, ol.kzw-match { list-style: none; }  /* beats ui.css ol:lang(fa) */

/* ---- shell bar ------------------------------------------------------------------------------------------------ */
.kz-bar { position: sticky; inset-block-start: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px max(12px, env(safe-area-inset-left)); background: rgb(255 248 236 / .88); background: color-mix(in srgb, #fff8ec 88%, transparent);
  backdrop-filter: blur(6px); }
html[data-motion="0"] .kz-bar, html[data-motion="1"] .kz-bar { backdrop-filter: none; background: #fff8ec; }
.kz-round { position: relative; display: inline-grid; place-items: center; inline-size: 56px; block-size: 56px; flex: none;
  border-radius: 50%; border: 3px solid #fff; background: var(--c, #fff); color: var(--t, var(--ink)); box-shadow: 0 4px 0 var(--d, #e3d4b4), 0 8px 14px -8px rgb(29 26 58 / .3);
  text-decoration: none; cursor: pointer; transition: transform 90ms var(--ease-std), box-shadow 90ms var(--ease-std); }
.kz-round .ic { inline-size: 26px; block-size: 26px; stroke-width: 2.2; }
.kz-round:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--d, #e3d4b4); }
.kz-round.sm { inline-size: 44px; block-size: 44px; }
.kz-round.sm .ic { inline-size: 20px; block-size: 20px; }
.kz-grown { background: #f3ead9; color: var(--ink-2); }
.kz-grown .ic { inline-size: 20px; block-size: 20px; }
.kz-me { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-md); min-inline-size: 0; }
.kz-me b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-inline-size: 40vw; }

/* ---- avatar: preset animal on a glazed khatam tile ------------------------------------------------------------- */
.kz-av { position: relative; display: inline-grid; place-items: center; inline-size: 88px; aspect-ratio: 100 / 108; flex: none; }
.kz-av svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
.kz-av .k-ledge { fill: var(--d, #d48a00); stroke: var(--d, #d48a00); stroke-width: 7; stroke-linejoin: round; }
.kz-av .k-face { fill: var(--c, #ffb627); stroke: var(--c, #ffb627); stroke-width: 7; stroke-linejoin: round; }
.kz-av .k-glaze { fill: none; stroke: rgb(255 255 255 / .45); stroke-width: 2.5; stroke-linejoin: round; }
.kz-av img { position: relative; inline-size: 56%; block-size: auto; margin-block-end: 8%; }
.kz-av.xs { inline-size: 40px; }
.kz-av.sm { inline-size: 64px; }
.kz-av.lg { inline-size: 132px; }

/* ---- mascot «کینو» ---------------------------------------------------------------------------------------------- */
/* "Compass Kino" (templates/kids/_mascot.html): flat fills, one navy outline, the teal tip changes with the mood. A pose is
   a static rule (display of on-/off-<mood> parts, a transform); motion sits on other elements, so every mood reads as a
   still picture at motion level 0 and with reduced motion. Transform and opacity only; origins are in viewBox units. */
.kz-mascot { display: inline-block; inline-size: 96px; flex: none; }
.kz-mascot.lg { inline-size: 150px; }
.kz-mascot.dock { inline-size: 84px; }
.kz-mascot svg { display: block; inline-size: 100%; overflow: visible; }
.kz-mascot .m-shadow ellipse { fill: rgb(29 26 58 / .12); }
.kz-mascot :is(.m-head, .m-body, .m-feet rect, .m-leaf, .m-maw, .m-oh) { stroke: #14122b; stroke-width: 2.7; stroke-linejoin: round; stroke-linecap: round; }
.kz-mascot .m-head { fill: #ffb627; }
.kz-mascot :is(.m-body, .m-leaf) { fill: #0b8f86; }
.kz-mascot .m-feet rect { fill: #3a3fcb; }
.kz-mascot .m-patch { fill: #fff3dc; stroke: #fff3dc; stroke-width: 15; stroke-linejoin: round; }
.kz-mascot .m-shine { fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: round; opacity: .72; }
.kz-mascot :is(.m-arm-o, .m-arm-i, .m-curl-o, .m-curl-i) { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.kz-mascot :is(.m-arm-o, .m-curl-o) { stroke: #14122b; stroke-width: 11.2; }
.kz-mascot :is(.m-arm-i, .m-curl-i) { stroke: #0b8f86; stroke-width: 5.8; }
.kz-mascot .m-eyes ellipse { fill: #14122b; }
.kz-mascot .m-glint { fill: #fff; }
.kz-mascot :is(.m-shut path, .m-happy path, .m-smile, .m-flat, .m-brow path) { fill: none; stroke: #14122b; stroke-width: 2.8; stroke-linecap: round; }
.kz-mascot .m-brow path { stroke-width: 2.2; }
.kz-mascot .m-cheeks ellipse, .kz-mascot .m-tongue { fill: #ff8f73; }
.kz-mascot .m-cheeks { opacity: .8; }
.kz-mascot :is(.m-maw, .m-oh) { fill: #7a2742; stroke-width: 2.4; }
.kz-mascot .m-spark path { fill: #ffb627; stroke: #d48a00; stroke-width: 1; stroke-linejoin: round; transform-box: fill-box; transform-origin: center; }
.kz-mascot :is(.m-zzz, .m-waves) path { fill: none; stroke: #3a3fcb; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.kz-mascot .m-waves path { stroke: #0b8f86; }
/* which parts each mood shows */
.kz-mascot .m-opt { display: none; }
.kz-mascot[data-mood="cheer"] .on-cheer, .kz-mascot[data-mood="think"] .on-think, .kz-mascot[data-mood="listen"] .on-listen,
.kz-mascot[data-mood="sleep"] .on-sleep, .kz-mascot[data-mood="wave"] .on-wave { display: inline; }
.kz-mascot[data-mood="cheer"] .off-cheer, .kz-mascot[data-mood="think"] .off-think, .kz-mascot[data-mood="listen"] .off-listen,
.kz-mascot[data-mood="sleep"] .off-sleep, .kz-mascot[data-mood="wave"] .off-wave { display: none; }
/* poses */
.kz-mascot :is(.m-all, .m-top, .m-head-all, .m-tip, .m-arm, .m-open, .m-look, .m-brow-r, .m-feet rect) { transform-box: view-box; }
.kz-mascot .m-all { transform-origin: 60px 124px; }
.kz-mascot .m-head-all { transform-origin: 60px 88px; }
.kz-mascot .m-tip { transform-origin: 83px 27px; }
.kz-mascot .m-arm-ru { transform-origin: 73px 93px; }
.kz-mascot .m-open { transform-origin: 60px 52px; }
.kz-mascot .m-brow-r { transform-origin: 73.5px 39.5px; }
.kz-mascot .m-foot-l { transform-origin: 51px 115px; }
.kz-mascot .m-foot-r { transform-origin: 69px 115px; }
.kz-mascot[data-mood="think"] .m-head-all { transform: rotate(-6deg); }  /* a tilt and a small smile, never a sad face */
.kz-mascot[data-mood="think"] .m-look { transform: translate(1.6px, -2.2px); }
.kz-mascot[data-mood="think"] .m-brow-r { transform: translateY(-2.4px) rotate(-10deg); }
.kz-mascot[data-mood="listen"] .m-arm-ru { transform: rotate(-9deg); }
.kz-mascot[data-mood="sleep"] .m-top { transform: translateY(8px); }  /* sitting: the head sinks, the feet slide out */
.kz-mascot[data-mood="sleep"] .m-foot-l { transform: translate(-13px, 1px) rotate(-16deg); }
.kz-mascot[data-mood="sleep"] .m-foot-r { transform: translate(13px, 1px) rotate(16deg); }
/* idle bobbing and blinking only where the child rests (map, reward: class "alive"); paused while the tab is hidden */
html:not([data-motion="0"]) .kz-mascot.alive[data-mood="idle"] .m-all { animation: kz-bob 3.2s ease-in-out infinite; }
html:not([data-motion="0"]) .kz-mascot.alive[data-mood="idle"] .m-tip { animation: kzm-sway 3.2s ease-in-out infinite; }
html:not([data-motion="0"]) .kz-mascot[data-mood="wave"] .m-all { animation: kz-bob 2.6s ease-in-out 2; }
html:not([data-motion="0"]) .kz-mascot.alive .m-open { animation: kz-blink 5s steps(1) infinite; }
html.kz-hidden .kz-mascot *, html.kz-hidden .kz-eq i, html.kz-hidden .kz-live-chip i { animation-play-state: paused !important; }
html:not([data-motion="0"]) .kz-mascot[data-mood="wave"] .m-arm-ru { animation: kzm-wave 0.5s ease-in-out 4 alternate; }
html:not([data-motion="0"]) .kz-mascot[data-mood="wave"] .m-tip { animation: kzm-sway 1.3s ease-in-out 2; }
html:not([data-motion="0"]) .kz-mascot[data-mood="cheer"] .m-all { animation: kz-jump 0.6s var(--ease-pop) 2; }
html:not([data-motion="0"]) .kz-mascot[data-mood="cheer"] .m-tip { animation: kzm-perk 0.6s ease-in-out 2; }
html:not([data-motion="0"]) .kz-mascot[data-mood="cheer"] .m-spark path { animation: kzm-twinkle 0.6s ease-in-out 2; }
html:not([data-motion="0"]) .kz-mascot[data-mood="think"] .m-tip { animation: kzm-perk 1.2s ease-in-out 1; }
html:not([data-motion="0"]) .kz-mascot[data-mood="listen"] .m-all { animation: kz-lean 0.8s ease-in-out 2 alternate; }
html:not([data-motion="0"]) .kz-mascot[data-mood="listen"] .m-tip { animation: kzm-sway 0.4s ease-in-out 3; }
html:not([data-motion="0"]) .kz-mascot[data-mood="listen"] .m-waves { animation: kzm-ping 0.8s ease-in-out 3; }
html:not([data-motion="0"]) .kz-mascot[data-mood="sleep"] .m-all { animation: kz-breathe 3.2s ease-in-out infinite; }
html:not([data-motion="0"]) .kz-mascot[data-mood="sleep"] .m-zzz { animation: kz-float-z 2.4s ease-in-out infinite; }
html[data-motion="1"] .kz-mascot * { animation-iteration-count: 1 !important; }
@keyframes kzm-sway { 30% { transform: rotate(-5deg); } 70% { transform: rotate(4deg); } }
@keyframes kzm-perk { 50% { transform: rotate(-7deg) scale(1.06); } }
@keyframes kzm-wave { from { transform: rotate(7deg); } to { transform: rotate(-13deg); } }
@keyframes kzm-twinkle { 50% { opacity: .45; transform: scale(.72); } }
@keyframes kzm-ping { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes kz-bob { 50% { transform: translateY(-4px); } }
@keyframes kz-blink { 0%, 94% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes kz-wave { from { transform: rotate(0); } to { transform: rotate(-28deg); } }
@keyframes kz-jump { 0% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(0) scale(1.08, .9); } 60% { transform: translateY(-16px) scale(.95, 1.06); } 100% { transform: translateY(0) scale(1); } }
@keyframes kz-twinkle { from { opacity: .4; transform: scale(.8); } to { opacity: 1; transform: scale(1.15); } }
@keyframes kz-tilt { to { transform: rotate(-7deg); } }
@keyframes kz-lean { to { transform: rotate(5deg) translateX(3px); } }
@keyframes kz-breathe { 50% { transform: scale(1.02, .98); } }
@keyframes kz-float-z { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }

/* ---- pages, headings, buttons ---------------------------------------------------------------------------------- */
.kz-page { inline-size: min(100% - 24px, 960px); margin-inline: auto; padding-block: 8px 32px; display: grid; justify-items: center; gap: 14px; text-align: center; }
.kz-h1 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; line-height: 1.4; }
.kz-en { font-size: var(--fs-lg); color: var(--ink-2); }
.kz-en.big { font-size: clamp(1.5rem, 5vw, 2.1rem); color: var(--ink); }
.kz-parent-line { font-size: var(--fs-sm); color: var(--ink-2); max-inline-size: 34em; }
.kz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-block-start: 6px; }
.kz-btn { position: relative; display: inline-flex; align-items: center; gap: 10px; min-block-size: 64px; padding-inline: 22px; border-radius: 999px;
  background: var(--c); color: var(--t); border: 3px solid #fff; font-weight: 800; font-size: var(--fs-md); text-decoration: none; cursor: pointer;
  box-shadow: 0 5px 0 var(--d), 0 10px 18px -10px rgb(29 26 58 / .35); transition: transform 90ms var(--ease-std), box-shadow 90ms var(--ease-std); }
.kz-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--d); }
.kz-btn .ic { inline-size: 24px; block-size: 24px; stroke-width: 2.3; }
.kz-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 10px; border-radius: 999px; background: #fff; border: 2px solid var(--hair);
  font-weight: 700; font-size: var(--fs-sm); text-decoration: none; color: var(--ink); }
.kz-empty { display: grid; justify-items: center; gap: 8px; color: var(--ink-2); padding: 24px; }
.kz-sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }

/* ---- profile picker -------------------------------------------------------------------------------------------- */
.kz-who { padding-block-start: 12px; }
.kz-who-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; inline-size: min(100%, 560px); margin-block-start: 8px; }
.kz-who-btn { display: grid; justify-items: center; gap: 6px; padding: 16px 8px 14px; border-radius: 28px; background: #fff; border: 3px solid #fff;
  box-shadow: 0 6px 0 #e3d4b4, 0 12px 22px -12px rgb(29 26 58 / .35); font-weight: 800; font-size: var(--fs-lg); color: var(--ink);
  transition: transform 90ms var(--ease-std), box-shadow 90ms var(--ease-std); }
.kz-who-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #e3d4b4; }
.kz-who-btn.is-last { border-color: var(--kz-sun); }
.kz-who-btn span { max-inline-size: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 700px) { .kz-who-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); inline-size: min(100%, 860px); } }

/* ---- world map ------------------------------------------------------------------------------------------------- */
.kz-map { justify-items: stretch; text-align: start; }
.kz-hello { display: flex; align-items: center; gap: 12px; }
.kz-hello .kz-mascot { inline-size: 84px; }
.kz-hello-text { display: grid; gap: 6px; justify-items: start; }
.kz-hello-text .kz-en.big { font-size: clamp(1.4rem, 5vw, 1.9rem); }
.kz-today { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px; border-radius: 28px; text-decoration: none;
  color: #1d1a3a; background: linear-gradient(135deg, #ffd977, #ffb627); border: 3px solid #fff; box-shadow: 0 6px 0 #d48a00, 0 14px 26px -14px rgb(212 138 0 / .8); }
.kz-today:active { transform: translateY(4px); box-shadow: 0 2px 0 #d48a00; }
.kz-today-pic { display: grid; place-items: center; inline-size: 72px; block-size: 72px; border-radius: 22px; background: #fff; box-shadow: inset 0 -4px 0 rgb(0 0 0 / .06); }
.kz-today-pic img { inline-size: 52px; block-size: 52px; }
.kz-today-pic .kz-glyph { font-size: 1.1rem; color: var(--kz-ind-d); text-align: center; padding: 4px; }
.kz-today-pic .kz-glyph.big { font-size: 2.6rem; padding: 0; }
.kz-today-text { display: grid; gap: 2px; min-inline-size: 0; }
.kz-today-text small { font-weight: 700; font-size: var(--fs-sm); }
.kz-today-text b { font-size: clamp(1.3rem, 5vw, 1.8rem); overflow: hidden; text-align: start; line-height: 1.25;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }  /* long titles wrap to two lines at 360px */
.kz-play-ico { display: grid; place-items: center; inline-size: 64px; block-size: 64px; border-radius: 50%; background: #1d1a3a; }
.kz-play-ico svg { inline-size: 32px; fill: #ffb627; margin-inline-start: 4px; }
html:not([data-motion="0"]) .kz-play-ico { animation: kz-pulse 1.6s ease-in-out 3; }
@keyframes kz-pulse { 50% { transform: scale(1.08); } }
.kz-today.is-rest { grid-template-columns: auto 1fr; background: linear-gradient(135deg, #d3d5ff, #b9c4ff); box-shadow: 0 6px 0 #8f96e8; }
.kz-today.is-rest b { display: block; font-size: var(--fs-xl); }
.kz-today.is-rest img { inline-size: 64px; }
.kz-tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 720px) { .kz-tracks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kz-track { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 22px; background: #fff; border: 3px solid #fff;
  text-decoration: none; color: var(--ink); box-shadow: 0 4px 0 #e3d4b4; text-align: center; }
.kz-track img { inline-size: 40px; block-size: 40px; }
.kz-track b { font-size: var(--fs-sm); line-height: 1.5; }
.kz-track small { display: block; font-family: "Andika", system-ui; font-size: var(--fs-2xs); color: var(--ink-2); }
.kz-track.is-on { background: var(--c); color: var(--t); box-shadow: 0 5px 0 var(--d); }
.kz-track.is-on small { color: inherit; opacity: .85; }
@media (min-width: 640px) { .kz-track { flex-direction: row; justify-content: center; text-align: start; } }

/* the world map's stops and road (the "sticker map") live in kids-home.css, loaded by the map page only */
.kz-badge { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; display: grid; place-items: center; inline-size: 30px; block-size: 30px; border-radius: 50%;
  border: 3px solid #fff; color: #fff; }
.kz-badge .ic { inline-size: 16px; block-size: 16px; stroke-width: 3; }
.kz-badge.ok { background: #177a45; }
.kz-badge.lock { background: #6b6684; }

/* session sheet (Popover API) */
.kz-pop { inset: auto 0 0 0; margin: 0 auto; inline-size: min(100%, 560px); max-block-size: 80vh; max-block-size: 80dvh; overflow: auto; overscroll-behavior: contain; border: 0; padding: 16px 16px max(20px, env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0; background: #fff8ec; color: var(--ink); box-shadow: 0 -18px 40px -20px rgb(29 26 58 / .45); text-align: start; direction: rtl; }
.kz-pop::backdrop { background: rgb(29 26 58 / .35); }
html:not([data-motion="0"]) .kz-pop:popover-open { animation: kz-sheet 260ms var(--ease-out); }
/* no Popover API (Chrome < 114, Safari < 17): kids-core.js sets html.kz-no-popover, moves the tapped stop's sheet to <body>
   and gives it .is-open; the wide shadow is the scrim */
html.kz-no-popover .kz-pop { display: none; }
html.kz-no-popover .kz-pop.is-open { display: block; position: fixed; z-index: 80; inset: auto 0 0 0; box-shadow: 0 0 0 100vmax rgb(29 26 58 / .35); }
/* ... and before that script has run (it is deferred): an engine that does not know :popover-open has no Popover API, so
   the sheets are hidden by CSS alone and never flash open, all at once, while the page loads */
@supports not selector(:popover-open) {
  .kz-pop { display: none; }
  .kz-pop.is-open { display: block; }
}
@keyframes kz-sheet { from { transform: translateY(40px); opacity: 0; } }
.kz-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 12px; font-size: var(--fs-lg); }
.kz-sess-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kz-sess { display: flex; align-items: center; gap: 14px; padding: 10px 12px; min-block-size: 72px; border-radius: 22px; background: #fff; border: 3px solid #fff;
  box-shadow: 0 4px 0 #e3d4b4; text-decoration: none; color: var(--ink); }
.kz-sess:active { transform: translateY(3px); box-shadow: 0 1px 0 #e3d4b4; }
.kz-sess > span:last-child { display: grid; text-align: start; }
.kz-sess b { font-size: var(--fs-lg); text-align: start; }
.kz-sess small { color: var(--ink-2); font-size: var(--fs-xs); }
.kz-sess-num { display: grid; place-items: center; inline-size: 48px; block-size: 48px; flex: none; border-radius: 16px; background: var(--kz-ind-l); color: var(--kz-ind-d);
  font-weight: 800; font-size: var(--fs-lg); }
.kz-sess-num .ic { inline-size: 24px; block-size: 24px; stroke-width: 3; }
.kz-sess.is-done .kz-sess-num { background: #d7f2e1; color: #177a45; }
.kz-sess.is-next { border-color: var(--kz-sun); box-shadow: 0 4px 0 var(--kz-sun-d); }
.kz-sess.is-next .kz-sess-num { background: var(--kz-sun); color: #1d1a3a; }
.kz-sess.is-locked { gap: 10px; font-weight: 700; }

/* ---- session player -------------------------------------------------------------------------------------------- */
body.kz-play-page main { display: grid; }
.kz-playbar { gap: 8px; }
.kz-stars { list-style: none; margin: 0; padding: 0; display: flex; flex: 1; min-inline-size: 0; justify-content: center; align-items: center; gap: 4px; flex-wrap: nowrap; direction: ltr; }
/* one row: stars shrink instead of wrapping a lonely last star under the home button on 360px phones */
.kz-stars li { flex: 0 1 26px; min-inline-size: 12px; aspect-ratio: 1; }
.kz-stars svg { inline-size: 100%; block-size: 100%; fill: #eadcc0; stroke: #fff; stroke-width: 6; overflow: visible; transition: transform 200ms var(--ease-pop); }
.kz-stars li.on svg { fill: var(--kz-sun); }
.kz-stars li.now svg { fill: var(--kz-tq-l); transform: scale(1.25); }
.kz-play { position: relative; display: grid; grid-template-rows: auto 1fr; inline-size: min(100%, 1000px); margin-inline: auto; padding-inline: 12px;
  min-block-size: calc(100vh - 80px); min-block-size: calc(100dvh - 80px); }
.kz-hint { text-align: center; font-size: var(--fs-sm); color: var(--ink-2); padding: 2px 8px 6px; min-block-size: 2.4em; }
.kz-hint b { color: var(--ink); }
.kz-stage { position: relative; display: grid; align-content: center; justify-items: center; gap: 18px; padding-block: 8px 104px; text-align: center; }
.kz-dock { position: fixed; inset-block-end: max(8px, env(safe-area-inset-bottom)); inset-inline-start: 8px; z-index: 6; pointer-events: none; }
.kz-start { display: grid; justify-items: center; gap: 22px; }
.kz-start-title { font-size: clamp(2rem, 8vw, 3.4rem); color: var(--kz-ind-d); }
.kz-bigplay { display: grid; place-items: center; inline-size: 132px; block-size: 132px; border-radius: 50%; border: 5px solid #fff; background: var(--kz-sun);
  box-shadow: 0 8px 0 var(--kz-sun-d), 0 18px 30px -12px rgb(212 138 0 / .7); }
.kz-bigplay svg { inline-size: 64px; fill: #1d1a3a; margin-inline-start: 8px; }
.kz-bigplay:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--kz-sun-d); }
html:not([data-motion="0"]) .kz-bigplay { animation: kz-pulse 1.4s ease-in-out infinite; }

/* speaker */
.kz-speaker { display: grid; place-items: center; inline-size: 88px; block-size: 88px; border-radius: 50%; border: 4px solid #fff; background: var(--kz-tq); color: #fff;
  box-shadow: 0 6px 0 var(--kz-tq-d); }
.kz-speaker svg { inline-size: 44px; block-size: 44px; }
.kz-speaker:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--kz-tq-d); }
.kz-speaker.is-playing { background: var(--kz-ind); box-shadow: 0 6px 0 var(--kz-ind-d); }
html:not([data-motion="0"]) .kz-speaker.is-playing { animation: kz-pulse 0.8s ease-in-out infinite; }

/* tiles: options, pieces, targets, cards */
.kz-tile { position: relative; display: grid; place-items: center; min-inline-size: var(--kz-tap); min-block-size: var(--kz-tap);
  padding: 8px; background: var(--c, #fff); color: var(--t, var(--ink)); border: 4px solid #fff; border-radius: 26px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  box-shadow: 0 6px 0 var(--d, #e3d4b4), 0 12px 20px -12px rgb(29 26 58 / .35); transition: transform 100ms var(--ease-std), box-shadow 100ms var(--ease-std), opacity 200ms; }
.kz-tile:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--d, #e3d4b4); }
.kz-tile:focus-visible { outline: 4px solid var(--kz-ind); outline-offset: 3px; }
.kz-tile .kz-glyph { font-size: clamp(2.6rem, 11vw, 4.2rem); color: var(--t, var(--ink)); }
.kz-tile.word .kz-glyph { font-size: clamp(1.5rem, 6.5vw, 2.4rem); }
.kz-tile.is-right { --c: #e3f6ea; --d: #177a45; border-color: #2f9a4c; }
.kz-tile.is-dim { opacity: .38; }
.kz-tile.is-hint { border-color: var(--kz-sun); }
html:not([data-motion="0"]) .kz-tile.is-hint { animation: kz-glow 1s ease-in-out infinite; }
@keyframes kz-glow { 50% { transform: scale(1.06); box-shadow: 0 6px 0 var(--d, #e3d4b4), 0 0 0 10px rgb(255 182 39 / .35); } }
html:not([data-motion="0"]) .kz-tile.is-right { animation: kz-tilepop 420ms var(--ease-pop); }
html:not([data-motion="0"]) .kz-wiggle { animation: kz-wiggle 360ms ease-in-out; }
@keyframes kz-tilepop { 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes kz-wiggle { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.kz-check { position: absolute; inset-block-start: -10px; inset-inline-end: -10px; display: grid; place-items: center; inline-size: 34px; block-size: 34px; border-radius: 50%;
  background: #177a45; border: 3px solid #fff; color: #fff; }
.kz-check svg { inline-size: 18px; fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }

.kz-opts { display: grid; gap: 16px; inline-size: min(100%, 640px); grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.kz-opts.n4 { --n: 2; }
.kz-opts .kz-tile { aspect-ratio: 1; }
@media (min-width: 620px) { .kz-opts.n4 { --n: 4; inline-size: min(100%, 860px); } }
@media (orientation: landscape) and (max-height: 520px) { .kz-opts.n4 { --n: 4; } .kz-opts .kz-tile { aspect-ratio: auto; block-size: 30vh; } .kz-stage { gap: 10px; } }

/* pictures */
.kz-pic { display: grid; place-items: center; inline-size: 78%; aspect-ratio: 1; }
.kz-pic img { inline-size: 100%; block-size: 100%; object-fit: contain; pointer-events: none; }
.kz-pic .kz-blob { inline-size: 100%; block-size: 100%; overflow: visible; }
.kz-count { display: grid; place-items: center; gap: 4px; inline-size: 88%; }
.kz-count b { font-family: "Andika", system-ui; font-size: clamp(2rem, 8vw, 3rem); line-height: 1; color: var(--kz-ind-d); }
.kz-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-inline-size: 100%; direction: ltr; }
.kz-dots i { inline-size: 9px; block-size: 9px; border-radius: 2px; transform: rotate(45deg); background: var(--kz-sun); }
.kz-dots i:nth-child(5n) { margin-inline-end: 4px; }
/* generated cards (kids-core.js KZ.art): a numeral, the week as seven beads with one lit, a clock face on the hour */
.kz-numcard { display: grid; place-items: center; inline-size: 88%; aspect-ratio: 1; border-radius: 18%; background: #fff; border: 3px solid var(--kz-ind-d); direction: ltr; }
.kz-numcard b { font-family: "Andika", system-ui; font-size: clamp(1.8rem, 9vw, 3.2rem); line-height: 1; color: var(--kz-ind-d); font-variant-numeric: lining-nums; }
.kz-numcard.n3 b { font-size: clamp(1.4rem, 7vw, 2.5rem); }
.kz-week { display: flex; align-items: center; justify-content: center; gap: 3%; inline-size: 96%; direction: ltr; }
.kz-week i { flex: 1 1 0; aspect-ratio: 1; border-radius: 50%; background: #fff; border: 2px solid var(--kz-ind-d); opacity: .55; }
.kz-week i.end { border-radius: 22%; }
.kz-week i.on { background: var(--kz-sun); opacity: 1; transform: scale(1.35); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--kz-ind-d); }
.kz-clock { inline-size: 92%; block-size: auto; overflow: visible; }
.kz-clock .c-face { fill: #fff; stroke: var(--kz-ind-d); stroke-width: 5; }
.kz-clock .c-tick { stroke: var(--kz-ind-d); stroke-width: 2; stroke-linecap: round; }
.kz-clock .c-tick.big { stroke-width: 4; }
.kz-clock .c-min { stroke: var(--kz-ind-d); stroke-width: 4; stroke-linecap: round; }
.kz-clock .c-hour { stroke: var(--kz-rose-d, #c2255c); stroke-width: 7; stroke-linecap: round; }
.kz-clock .c-pin { fill: var(--kz-ind-d); }

/* flash card */
.kz-flash { display: grid; justify-items: center; gap: 16px; inline-size: min(100%, 560px); }
.kz-card { display: grid; justify-items: center; gap: 10px; inline-size: 100%; padding: 22px 16px; border-radius: 34px; background: #fff; border: 4px solid #fff;
  box-shadow: 0 8px 0 #e3d4b4, 0 18px 30px -16px rgb(29 26 58 / .35); }
html:not([data-motion="0"]) .kz-card.in { animation: kz-cardin 360ms var(--ease-out); }
@keyframes kz-cardin { from { transform: translateX(30px) rotate(2deg); opacity: 0; } }
.kz-card .kz-big { font-size: clamp(5rem, 26vw, 9rem); color: var(--kz-ind-d); }
.kz-card .kz-big .up { color: var(--kz-rose-d); margin-inline-end: .08em; }
.kz-card .kz-word { font-size: clamp(2rem, 9vw, 3.2rem); color: var(--ink); }
.kz-card .kz-pic { inline-size: min(56vw, 230px); }
.kz-card-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.kz-mini { display: inline-flex; align-items: center; gap: 8px; min-block-size: 64px; padding: 6px 16px 6px 10px; border-radius: 22px; border: 3px solid #fff; background: var(--c);
  color: var(--t); box-shadow: 0 5px 0 var(--d); font-family: "Andika", system-ui; font-weight: 700; font-size: var(--fs-lg); cursor: pointer; }
.kz-mini:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--d); }
.kz-mini svg { inline-size: 30px; block-size: 30px; }
.kz-mini.is-playing { outline: 4px solid var(--kz-sun); }
.kz-mini img { inline-size: 40px; block-size: 40px; }
.kz-human { font-size: var(--fs-2xs); color: var(--ink-2); font-family: "Vazirmatn NL", system-ui; }
.kz-next { display: grid; place-items: center; inline-size: 84px; block-size: 84px; border-radius: 50%; border: 4px solid #fff; background: var(--kz-grn); color: #fff;
  box-shadow: 0 6px 0 var(--kz-grn-d); cursor: pointer; }
/* the way out of a game that broke (kids-play.js): beside the mascot, above the game */
/* the "next game" arrow of a crashed game (kids-play.js); not .kz-skip, which is the map card's "start from the beginning" link */
.kz-skip-game { position: fixed; z-index: 30; inset-block-end: max(16px, env(safe-area-inset-bottom)); inset-inline-end: 16px; }
.kz-skip-game[hidden] { display: none; }
.kz-next svg { inline-size: 42px; block-size: 42px; fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.kz-next:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--kz-grn-d); }
html:not([data-motion="0"]) .kz-next.nudge { animation: kz-nudge 1.2s ease-in-out infinite; }
@keyframes kz-nudge { 50% { transform: translateX(6px); } }

/* drag and drop */
.kz-drag { display: grid; justify-items: center; gap: 22px; inline-size: min(100%, 700px); }
.kz-piece-row { display: flex; justify-content: center; min-block-size: 120px; }
.kz-piece { inline-size: 116px; block-size: 116px; touch-action: none; cursor: grab; z-index: 3; }
.kz-piece.t-sun { --c: var(--kz-sun); --d: var(--kz-sun-d); --t: #1d1a3a; }
.kz-piece.is-dragging { cursor: grabbing; box-shadow: 0 16px 28px -10px rgb(29 26 58 / .45); transition: none; z-index: 30; }
.kz-piece.is-picked { outline: 5px solid var(--kz-sun); outline-offset: 4px; }
.kz-targets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; inline-size: 100%; }
.kz-target { aspect-ratio: 1; border-style: dashed; border-color: #e0cfa8; }
.kz-target.is-over { border-color: var(--kz-tq); background: var(--kz-tq-l); }
.kz-target.is-right { border-style: solid; }

/* bubbles */
.kz-bubbles-wrap { display: grid; justify-items: center; gap: 10px; inline-size: 100%; }
.kz-target-chip { display: inline-flex; align-items: center; gap: 12px; padding: 6px 8px 6px 18px; border-radius: 999px; background: #fff; box-shadow: 0 4px 0 #e3d4b4; }
.kz-target-chip .kz-glyph { font-size: 2.6rem; color: var(--kz-ind-d); }
.kz-target-chip .kz-speaker { inline-size: 64px; block-size: 64px; }
.kz-target-chip .kz-speaker svg { inline-size: 32px; }
.kz-popped { display: flex; gap: 6px; direction: ltr; }
.kz-popped i { inline-size: 22px; block-size: 22px; border-radius: 5px; transform: rotate(45deg); background: #eadcc0; border: 3px solid #fff; transition: background-color 200ms; }
.kz-popped i.on { background: var(--kz-sun); }
/* vh before dvh: an engine without dvh (Chrome < 108) dropped the height, and the sky clipped every bubble */
.kz-sky { position: relative; inline-size: 100%; block-size: min(58vh, 520px); block-size: min(58dvh, 520px); border-radius: 30px; overflow: hidden;
  background: linear-gradient(180deg, #dff3ff, #f4fbff 70%, #fff8ec); box-shadow: inset 0 0 0 3px #fff; }
.kz-bubble { position: absolute; inset-block-end: -120px; display: grid; place-items: center; inline-size: 96px; block-size: 96px; border-radius: 50%; border: 0; padding: 0;
  background: radial-gradient(circle at 32% 28%, #fff 0 12%, rgb(255 255 255 / .2) 13% 40%, transparent 41%), radial-gradient(circle, rgb(184 238 232 / .55), rgb(14 149 140 / .38));
  box-shadow: inset 0 0 0 3px rgb(255 255 255 / .9), 0 8px 18px -10px rgb(14 149 140 / .6); cursor: pointer; touch-action: manipulation; }
.kz-bubble .kz-glyph { font-size: 2.5rem; color: #0f3d5c; }
html:not([data-motion="0"]) .kz-bubble { animation: kz-rise var(--dur, 11s) linear var(--delay, 0s) infinite; }
@keyframes kz-rise { 0% { transform: translate(0, 0); } 25% { transform: translate(14px, calc(var(--h) * -.25)); } 50% { transform: translate(-10px, calc(var(--h) * -.5)); }
  75% { transform: translate(12px, calc(var(--h) * -.75)); } 100% { transform: translate(0, calc(var(--h) * -1 - 140px)); } }
html[data-motion="0"] .kz-sky { block-size: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 14px; }
html[data-motion="0"] .kz-bubble { position: static; }
.kz-bubble.is-pop { pointer-events: none; animation: kz-popout 300ms ease-out forwards !important; }
@keyframes kz-popout { to { opacity: 0; transform: scale(1.6); } }
html[data-motion="0"] .kz-bubble.is-pop { animation: none !important; visibility: hidden; }

/* memory */
.kz-mem { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; inline-size: min(100%, 560px); perspective: 900px; }
.kz-mem.n8 { grid-template-columns: repeat(4, minmax(0, 1fr)); inline-size: min(100%, 680px); }
@media (max-width: 330px) { .kz-mem.n8 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kz-memcard { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform 380ms var(--ease-out); }
.kz-memcard > span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 22px; border: 4px solid #fff; backface-visibility: hidden;
  box-shadow: 0 5px 0 #e3d4b4; }
.kz-memcard .back { background: var(--kz-ind) var(--kz-lattice); background-size: 40px; box-shadow: 0 5px 0 var(--kz-ind-d); }
.kz-memcard .back svg { inline-size: 46%; fill: var(--kz-sun); stroke: #fff; stroke-width: 6; overflow: visible; }
.kz-memcard .front { background: #fff; transform: rotateY(180deg); }
.kz-memcard .front .kz-glyph { font-size: clamp(2rem, 9vw, 3rem); color: var(--kz-ind-d); }
.kz-memcard .front .kz-pic { inline-size: 74%; }
.kz-memcard.is-up { transform: rotateY(180deg); }
.kz-memcard.is-done .front { background: #e3f6ea; box-shadow: 0 5px 0 #2f9a4c; }
html[data-motion="0"] .kz-memcard { transition: none; transform: none !important; }
html[data-motion="0"] .kz-memcard .front { transform: none; display: none; }
html[data-motion="0"] .kz-memcard.is-up .front { display: grid; }
html[data-motion="0"] .kz-memcard.is-up .back { display: none; }

/* build the word */
.kz-build { display: grid; justify-items: center; gap: 18px; inline-size: min(100%, 640px); }
.kz-build-top { display: flex; align-items: center; gap: 16px; }
.kz-build-top .kz-pic { inline-size: 120px; }
.kz-slots { display: flex; gap: 10px; justify-content: center; direction: ltr; }
.kz-slot { display: grid; place-items: center; inline-size: clamp(64px, 20vw, 96px); block-size: clamp(76px, 24vw, 110px); border-radius: 20px; border: 4px dashed #d9c79f; background: #fffdf8; }
.kz-slot .kz-glyph { font-size: clamp(2.4rem, 10vw, 3.6rem); color: var(--kz-ind-d); }
.kz-slot.is-filled { border-style: solid; border-color: #fff; background: #fff; box-shadow: 0 5px 0 #e3d4b4; }
.kz-slot.is-vowel .kz-glyph { color: var(--kz-rose-d); text-decoration: underline 4px; text-underline-offset: 8px; }
.kz-pool .kz-tile.is-vowel { --c: var(--kz-rose); --d: var(--kz-rose-d); }
.kz-pool .kz-tile.is-vowel .kz-glyph { color: #fff; text-decoration: underline 4px; text-underline-offset: 8px; }
.kz-slot.is-next { border-color: var(--kz-tq); }
html:not([data-motion="0"]) .kz-slots.is-blend .kz-slot { animation: kz-blend 700ms var(--ease-out) forwards; }
@keyframes kz-blend { 50% { transform: translateY(-8px); } }
.kz-pool { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; direction: ltr; }
.kz-pool .kz-tile { inline-size: clamp(72px, 21vw, 96px); block-size: clamp(72px, 21vw, 96px); }
.kz-pool .kz-tile.is-used { visibility: hidden; }

/* tracing */
.kz-trace { display: grid; justify-items: center; gap: 12px; inline-size: 100%; }
.kz-canvas { inline-size: min(88vw, 56vh, 440px); inline-size: min(88vw, 56dvh, 440px); min-inline-size: 280px; aspect-ratio: 1; border-radius: 30px; background: #fff; box-shadow: 0 6px 0 #e3d4b4, inset 0 0 0 3px #fff;
  touch-action: none; user-select: none; -webkit-user-select: none; display: block; overflow: visible; cursor: crosshair; }
.kz-canvas:focus-visible { outline: 4px solid var(--kz-ind); outline-offset: 4px; }
.kz-canvas .ln { stroke: #e7dcc4; stroke-width: .6; }
.kz-canvas .ln.mid { stroke-dasharray: 2 2; }
.kz-canvas .ln.base { stroke: #c9b78f; stroke-width: .8; }
.kz-canvas .guide { fill: none; stroke: #efe6d6; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.kz-canvas .guide-c { fill: none; stroke: #c9b78f; stroke-width: .9; stroke-dasharray: 2.5 2.5; stroke-linecap: round; }
.kz-canvas .ink { fill: none; stroke: var(--kz-ind); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.kz-canvas .ink.done { stroke: var(--kz-tq); }
.kz-canvas .trail { fill: none; stroke: rgb(74 80 216 / .25); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.kz-canvas .start { fill: #2f9a4c; stroke: #fff; stroke-width: 1.5; }
.kz-canvas .start-n { fill: #fff; font: 700 6px "Andika", system-ui; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.kz-canvas .end { fill: #e2557c; stroke: #fff; stroke-width: 1.2; }
.kz-canvas .arrow { fill: #2f9a4c; }
.kz-canvas .hand { font-size: 12px; pointer-events: none; }
.kz-canvas .ghost { fill: rgb(255 182 39 / .9); stroke: #fff; stroke-width: 1.2; }
html:not([data-motion="0"]) .kz-canvas .start { animation: kz-dot 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes kz-dot { 50% { transform: scale(1.25); } }
.kz-trace-bar { display: flex; gap: 12px; align-items: center; justify-content: center; }
.kz-trace-glyph { font-size: 2.6rem; color: var(--kz-ind-d); min-inline-size: 64px; }
.kz-canvas.is-done { box-shadow: 0 6px 0 #2f9a4c, inset 0 0 0 4px #b9ecc9; }
/* the guide fades (kids-trace.js): dots = no grey letter, the numbered dots and the thin line stay; dot = only the start dot
   of the stroke being drawn (its dashed line comes back as a hint); free = only the writing lines and the child's own ink */
.kz-mini[hidden] { display: none; }
.kz-trace-bar.is-off { visibility: hidden; }
.kz-trace-note { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--kz-ind-d); }
.kz-trace-note:empty { display: none; }
.kz-canvas.is-dots .guide, .kz-canvas.is-dot .guide, .kz-canvas.is-free .guide, .kz-canvas.is-mini .guide,
.kz-canvas.is-dot .guide-c, .kz-canvas.is-free .guide-c, .kz-canvas.is-mini .guide-c { display: none; }
.kz-canvas.is-dot .guide-c.is-shown, .kz-canvas.is-free .guide-c.is-shown { display: inline; stroke: var(--kz-tq-d); stroke-width: 1.4; }
.kz-canvas .start.is-later { fill: #8cc79b; }
html:not([data-motion="0"]) .kz-canvas .start.is-later { animation: none; }
.kz-canvas .ring { fill: none; stroke: #2f9a4c; stroke-width: 2; opacity: .75; }
html:not([data-motion="0"]) .kz-canvas .ring { animation: kz-ring 1.3s ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes kz-ring { from { transform: scale(.5); opacity: .95; } to { transform: scale(1.6); opacity: 0; } }
.kz-canvas .pen-ink { fill: none; stroke: var(--kz-ind); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.kz-canvas.is-shown .pen-ink { stroke: #c9cbf3; }  /* the child's ink goes pale under the model that draws itself */
.kz-canvas.is-mini { pointer-events: none; cursor: default; }
@media (prefers-reduced-motion: reduce) { .kz-canvas .ring { animation: none !important; } }

/* Letter Detective (kids-games.js spot): the same printed glyph flipped or turned; a wrong form turns itself right and back */
.kz-detect .kz-glyph { display: inline-block; transition: transform .45s cubic-bezier(.3, 1.3, .6, 1); }
.kz-flip-h { transform: scaleX(-1); }
.kz-flip-v { transform: scaleY(-1); }
.kz-flip-r { transform: rotate(180deg); }
.kz-flip-cw { transform: rotate(90deg); }
.kz-flip-ccw { transform: rotate(-90deg); }
.kz-detect-tile.is-righting .kz-glyph { transform: none; }
.kz-detect-tile.is-ghosted .kz-glyph { opacity: .12; }
html[data-motion="0"] .kz-detect .kz-glyph { transition: none; }
@media (prefers-reduced-motion: reduce) { .kz-detect .kz-glyph { transition: none; } }
.kz-detect-tile .kz-canvas.is-over { position: absolute; inset: 7%; inline-size: 86%; block-size: 86%; min-inline-size: 0; aspect-ratio: auto;
  background: none; box-shadow: none; border-radius: 0; outline: 0; }
.kz-detect-tile .kz-canvas.is-over .ln { display: none; }
.kz-detect-tile .kz-canvas.is-over .ink, .kz-detect-tile .kz-canvas.is-over .ink.done { stroke: var(--kz-sun); }
.kz-detect-top { display: grid; grid-template-columns: 88px auto 88px; align-items: center; justify-content: center; gap: 12px; }
.kz-detect-top .kz-speaker { grid-column: 2; }
.kz-detect-clue { grid-column: 3; inline-size: 88px; block-size: 88px; }
.kz-detect-clue .kz-canvas { inline-size: 88px; min-inline-size: 0; border-radius: 20px; }

/* write the first sound (kids-trace.js write): the word with its gap, and one free board (two for a digraph, left one first) */
.kz-write { display: grid; justify-items: center; gap: 12px; inline-size: 100%; }
.kz-write-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.kz-write-top .kz-gloss { flex-basis: 100%; margin: 0; }
.kz-write-boxes { display: flex; gap: 14px; justify-content: center; align-items: flex-start; }
.kz-write-box { position: relative; }
.kz-write .kz-canvas { inline-size: min(74vw, 40vh, 320px); inline-size: min(74vw, 40dvh, 320px); min-inline-size: 200px; }
.kz-write-boxes.n2 .kz-canvas { inline-size: min(43vw, 36vh, 250px); inline-size: min(43vw, 36dvh, 250px); min-inline-size: 136px; }
.kz-write-box.is-wait { opacity: .45; }
.kz-write-box.is-first::before { content: ""; position: absolute; z-index: 1; left: -6px; top: -6px; inline-size: 14px; block-size: 14px; border-radius: 50%;
  background: #2f9a4c; border: 3px solid #fff; }
html:not([data-motion="0"]) .kz-frame.is-drop .kz-gap { animation: kz-drop .5s cubic-bezier(.3, 1.4, .6, 1) both; }
@keyframes kz-drop { from { transform: translateY(-70%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .kz-frame.is-drop .kz-gap { animation: none !important; } }

/* sing-along */
.kz-sing { display: grid; justify-items: center; gap: 14px; inline-size: min(100%, 680px); }
.kz-sing-step { margin: 0; padding: 6px 16px; border-radius: 999px; background: #e8f4ff; color: #1b4f8a; font-weight: 800; font-size: var(--fs-md); }
.kz-sing-step.is-sing { background: #fff1c7; color: #8a5a00; animation: kz-tilepop .4s ease-out; }
.kz-sing-title { font-size: clamp(1.4rem, 5vw, 2rem); color: var(--kz-ind-d); }
.kz-lyrics { list-style: none; margin: 0; padding: 14px; display: grid; gap: 6px; inline-size: 100%; border-radius: 28px; background: #fff; box-shadow: 0 6px 0 #e3d4b4; }
.kz-lyrics li { padding: 6px 10px; border-radius: 16px; font-family: "Andika", system-ui; font-weight: 700; font-size: clamp(1.2rem, 4.6vw, 1.7rem); line-height: 1.45;
  color: #8f89a8; cursor: pointer; transition: background-color 200ms, color 200ms; }
.kz-lyrics li.is-on { background: #fff4d6; color: var(--ink); }
.kz-lyrics .w { display: inline-block; padding-inline: 2px; border-radius: 8px; transition: transform 160ms var(--ease-pop), color 120ms; }
.kz-lyrics .w.lit { color: var(--kz-rose-d); }
html:not([data-motion="0"]) .kz-lyrics .w.lit { transform: translateY(-3px) scale(1.06); }
.kz-sing-btns { display: flex; gap: 14px; align-items: center; }
.kz-sing-note { margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--kz-ind-l); color: var(--kz-ind-d); font-weight: 700; font-size: var(--fs-sm); text-align: center; }
.kz-sing-credit { margin: 0; font-size: var(--fs-2xs); color: var(--ink-2); text-align: center; overflow-wrap: anywhere; }
.kz-sing.is-karaoke .kz-lyrics li { letter-spacing: .04em; }
.kz-note { font-size: var(--fs-2xs); color: var(--ink-2); font-family: "Vazirmatn NL", system-ui; }

/* sparkle burst + confetti-lite */
.kz-burst { position: fixed; inline-size: 0; block-size: 0; pointer-events: none; z-index: 40; }
.kz-burst i { position: absolute; inline-size: 14px; block-size: 14px; margin: -7px; background: var(--kz-sun); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.kz-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.kz-confetti i { position: absolute; inset-block-start: -20px; inline-size: 12px; block-size: 12px; border-radius: 2px; }

/* reward, sticker book, enough */
.kz-reward { padding-block-start: 16px; }
.kz-sticker { position: relative; display: inline-grid; place-items: center; inline-size: 96px; aspect-ratio: 100 / 108; }
.kz-sticker svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; }
.kz-sticker .k-ledge { fill: #e3d4b4; stroke: #e3d4b4; stroke-width: 7; stroke-linejoin: round; }
.kz-sticker .k-face { fill: #fff; stroke: #fff; stroke-width: 7; stroke-linejoin: round; }
.kz-sticker .k-glaze { fill: none; stroke: var(--kz-sun-l); stroke-width: 3; stroke-linejoin: round; }
.kz-sticker img { position: relative; inline-size: 58%; block-size: auto; margin-block-end: 8%; }
.kz-sticker.big { inline-size: min(56vw, 230px); }
.kz-sticker.big .k-face { fill: #fffaf0; }
.kz-sticker.big .k-ledge { fill: var(--kz-sun-d); stroke: var(--kz-sun-d); }
.kz-sticker.big .k-glaze { stroke: var(--kz-sun); stroke-width: 4; }
html:not([data-motion="0"]) .kz-reward[data-fresh="1"] .kz-sticker.big { animation: kz-stickerin 900ms var(--ease-pop) both; }
@keyframes kz-stickerin { 0% { transform: scale(.2) rotate(-200deg); opacity: 0; } 70% { transform: scale(1.1) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.kz-book-grid { list-style: none; margin: 8px 0 0; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; inline-size: 100%;
  border-radius: 30px; background: #fff; box-shadow: 0 6px 0 #e3d4b4; }
.kz-book-grid li { position: relative; display: grid; place-items: center; }
.kz-times { position: absolute; inset-block-end: 0; inset-inline-end: 6px; padding: 0 8px; border-radius: 999px; background: var(--kz-ind); color: #fff; font-size: var(--fs-xs); }
body.kz.kz-night { background: linear-gradient(180deg, #2b2f73, #4a50d8 60%, #8f96e8); }
html:has(body.kz-night) { background: #2b2f73; }
.kz-night .kz-enough .kz-h1, .kz-night .kz-enough .kz-en.big { color: #fff; }
.kz-night .kz-enough .kz-parent-line { color: #e1e3ff; }
.kz-night .kz-bar { background: transparent; backdrop-filter: none; }

/* gate */
.kz-gate { padding-block-start: 24px; }
.kz-gate-card { inline-size: min(100%, 440px); display: grid; gap: 12px; padding: 22px; border-radius: 24px; background: #fff; text-align: start; box-shadow: 0 6px 0 #e3d4b4; }
.kz-gate-card h1 { display: flex; gap: 8px; align-items: center; font-size: var(--fs-xl); }
.kz-gate-card h1 .ic { inline-size: 22px; block-size: 22px; }
.kz-gate-q { font-size: var(--fs-lg); font-weight: 700; padding: 12px 14px; border-radius: 14px; background: var(--paper-2); }
.kz-gate-card input { font-size: var(--fs-lg); min-block-size: 48px; text-align: center; letter-spacing: .1em; }
.kz-gate-err { color: var(--bad); font-weight: 600; font-size: var(--fs-sm); }

/* ---- parent pages (site tokens) -------------------------------------------------------------------------------- */
.kzp .page-head.kzp-head { display: flex; align-items: center; gap: 14px; }
.kzp-kids { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-block-end: 20px; }
.kzp-kid { display: grid; gap: 12px; }
.kzp-kid-head { display: flex; align-items: center; gap: 12px; }
.kzp-kid-head h2 { margin: 0; font-size: var(--fs-lg); }
.kzp-kid-actions { justify-content: flex-end; }
.kzp-add { display: grid; place-items: center; align-content: center; gap: 4px; min-block-size: 160px; border-style: dashed; text-decoration: none; color: var(--indigo); font-weight: 700; }
.kzp-add .ic { inline-size: 28px; block-size: 28px; }
.kzp-cta { display: grid; justify-items: start; gap: 6px; margin-block-end: 20px; }
.kzp-note ul, .kzp-tips { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; }
.kzp-narrow { inline-size: min(100% - 2 * var(--gutter), 720px); }
.kzp-avatars { border: 0; padding: 0; margin: 0; }
.kzp-avatars legend { padding: 0; margin-block-end: 6px; }
.kzp-avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.kzp-avatar { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: var(--r-md); border: 2px solid var(--hair);
  background: var(--card); cursor: pointer; font-size: var(--fs-xs); }
.kzp-avatar input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.kzp-avatar:has(input:checked) { border-color: var(--indigo); background: color-mix(in srgb, var(--indigo) 8%, var(--card)); }
.kzp-avatar:has(input:focus-visible) { outline: 2px solid var(--indigo); outline-offset: 2px; }
@supports not selector(:has(a)) {
  .kzp-avatar input:checked ~ span, .kzp-nick input:checked ~ span { color: var(--indigo); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
  .kzp-avatar input:checked ~ .kz-avatar { outline: 3px solid var(--indigo); outline-offset: 2px; }
}
.kzp-consent { padding: 12px; border-radius: var(--r-md); background: var(--paper-2); }
.kzp-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .kzp-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.kzp-tracks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.kzp-tracks .bar { display: block; margin-block-start: 4px; }
.kzp-letters, .kzp-sounds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.kzp-letters li, .kzp-sounds li { position: relative; display: grid; place-items: center; align-content: center; min-block-size: 42px; border-radius: var(--r-sm); border: 1px solid var(--hair); color: var(--ink-2); opacity: .7; }
.kzp-letters li.met, .kzp-sounds li.met { opacity: 1; color: var(--ink); background: color-mix(in srgb, var(--kz-sun) 30%, var(--card)); border-color: color-mix(in srgb, var(--kz-sun) 60%, var(--hair)); font-weight: 700; }
.kzp-letters .kz-glyph, .kzp-sounds .kz-glyph { font-family: "Andika", system-ui; font-size: var(--fs-md); }
.kzp-sounds i { position: absolute; inset-block-start: -6px; inset-inline-end: -6px; display: grid; place-items: center; inline-size: 18px; block-size: 18px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--hair); color: var(--ink-2); }
.kzp-sounds i .ic { inline-size: 11px; block-size: 11px; }
.kzp-sub { font-size: var(--fs-sm); margin-block: 14px 8px; }
.kzp .notice { display: flex; gap: 8px; align-items: flex-start; margin-block-start: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--warning-bg, #fff1d6); color: var(--ink); }
.kzp .notice .ic { flex: none; inline-size: 18px; block-size: 18px; margin-block-start: 4px; color: var(--warning-fg, #8a5300); }
.kzp-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.kzp-recent li { display: flex; justify-content: space-between; gap: 8px; }
.kzp .danger-zone { border-color: color-mix(in srgb, var(--bad) 30%, var(--hair)); }
.kzp .weekbars .wb i { background: var(--kz-ind); }
.kzp .weekbars .wb.today i { background: var(--kz-sun); }

/* ---- landing (site tokens + a little play) ---------------------------------------------------------------------- */
.kzl-hero { padding-block: clamp(28px, 6vw, 72px); background: radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--saffron) 22%, transparent), transparent 60%),
  radial-gradient(ellipse at 90% 30%, color-mix(in srgb, var(--teal-deco) 16%, transparent), transparent 55%); }
.kzl-hero-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 860px) { .kzl-hero-grid { grid-template-columns: 1.2fr 1fr; } }
.kzl-hero-text { display: grid; gap: 14px; justify-items: start; }
.kzl-hero-text h1 { font-size: var(--fs-hero); line-height: var(--lh-display); }
.kzl-hero-text h1 .kz-glyph { color: var(--indigo); }
.kzl-hero-text > p { color: var(--ink-2); max-inline-size: 36em; }
.kzl-hero-art { position: relative; display: grid; place-items: center; min-block-size: 260px; }
.kzl-hero-art .kz-mascot { inline-size: 170px; }
.kzl-float { position: absolute; display: grid; place-items: center; inline-size: 76px; block-size: 76px; border-radius: 22px; background: var(--card); border: 3px solid var(--card);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--saffron) 55%, var(--hair)); font-size: 1.6rem; color: var(--indigo); }
.kzl-float img { inline-size: 48px; block-size: 48px; }
.kzl-float.f1 { inset-block-start: 6%; inset-inline-start: 12%; transform: rotate(-8deg); }
.kzl-float.f2 { inset-block-start: 10%; inset-inline-end: 10%; transform: rotate(7deg); }
.kzl-float.f3 { inset-block-end: 8%; inset-inline-start: 6%; inline-size: auto; padding-inline: 14px; transform: rotate(5deg); font-size: 1.3rem; }
.kzl-float.f4 { inset-block-end: 4%; inset-inline-end: 14%; transform: rotate(-6deg); }
html:not([data-motion="0"]) .kzl-float { animation: kz-bob 3s ease-in-out 3; }
.kzl-tracks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.kzl-track { display: grid; gap: 6px; border-block-start: 5px solid var(--c); }
.kzl-track h3 { font-size: var(--fs-md); }
.kzl-track h3 small { display: block; font-family: "Andika", system-ui; font-weight: 700; color: var(--ink-2); font-size: var(--fs-xs); }
.kzl-facts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kzl-facts li { display: grid; gap: 2px; padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--hair); }
.kzl-facts b { font-size: var(--fs-2xl); color: var(--indigo); }
.kzl-facts span { font-size: var(--fs-sm); color: var(--ink-2); }
.kzl-two { display: grid; gap: 28px; }
@media (min-width: 860px) { .kzl-two { grid-template-columns: 1fr 1fr; } }
.kzl-two h2 { font-size: var(--fs-h2-mkt); margin-block: 6px 12px; }
.kzl-faq { display: grid; gap: 10px; max-inline-size: 760px; }
.kzl-faq details { border-radius: 16px; background: var(--paper, #fff); border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); padding: 12px 16px; }
.kzl-faq summary { cursor: pointer; font-weight: 700; min-block-size: 32px; display: flex; align-items: center; }
.kzl-faq p { margin-block: 8px 2px; color: var(--ink-2); line-height: 1.9; }
.kzl-list { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 8px; color: var(--ink-2); }

/* ---- motion: reduced motion means no movement at all ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .kz *, .kz *::before, .kz *::after, .kzl * { animation: none !important; transition-duration: 0ms !important; }
}
html[data-motion="0"] .kz *, html[data-motion="0"] .kz *::before { animation-duration: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0ms !important; }
html[data-motion="0"] .kz-bubble.is-pop { animation: none !important; }
/* Persian notes for the parent inside the LTR game stage */
.kz-note, .kz-human, .kz-stage .kz-sr { direction: rtl; unicode-bidi: isolate; }
@media (min-width: 700px) {
  .kz-hello .kz-mascot { inline-size: 110px; }
}
.kzp-sounds small { font-family: "Andika", system-ui; font-size: 10px; line-height: 1.1; color: var(--ink-2); padding-block-end: 3px; }
.kzp-sounds { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }


/* ==========================================================================
   v2: radio, stories, checks, mouths, preview, parent report/settings/plans, worksheets
   ========================================================================== */
.kz-bar-start { display: inline-flex; gap: 8px; }
.kz-bar-start .kz-round[aria-current="page"] { outline: 3px solid var(--kz-rose-d); outline-offset: 2px; }

/* ---- map extras ---- */
.kz-extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kz-extra { position: relative; display: flex; align-items: center; gap: 10px; min-block-size: 72px; padding: 10px 12px; border-radius: 22px; border: 3px solid #fff;
  background: var(--l); color: var(--ink); text-decoration: none; box-shadow: 0 4px 0 var(--c); }
.kz-extra:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--c); }
.kz-extra img { inline-size: 44px; block-size: 44px; flex: none; }
.kz-extra b { display: block; font-size: var(--fs-md); line-height: 1.5; }
.kz-extra small { display: block; font-family: "Andika", system-ui; font-size: var(--fs-xs); color: var(--ink-2); }
.kz-badge.new { inline-size: auto; min-inline-size: 30px; padding-inline: 8px; border-radius: 999px; background: var(--kz-rose); color: #fff; font-style: normal;
  font-weight: 800; font-size: var(--fs-xs); inset-block-start: -8px; inset-inline-end: -6px; block-size: 26px; }
.kz-check-card { display: grid; gap: 6px; }
.kz-today.is-check { background: linear-gradient(135deg, #c8f3ee, #8fe0d6); box-shadow: 0 6px 0 var(--kz-tq-d), 0 14px 26px -14px rgb(8 102 95 / .6); }
.kz-skip { justify-self: center; min-block-size: 44px; padding-inline: 14px; border: 0; background: none; color: var(--ink-2); font-size: var(--fs-sm); text-decoration: underline; cursor: pointer; }

/* ---- radio ---- */
.kz-radio { gap: 16px; }
.kz-channels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; inline-size: min(100%, 640px); }
.kz-channel { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; min-block-size: 72px; border-radius: 20px; background: #fff; border: 3px solid #fff;
  color: var(--ink); text-decoration: none; box-shadow: 0 4px 0 #e3d4b4; }
.kz-channel img { inline-size: 36px; block-size: 36px; }
.kz-channel b { font-size: var(--fs-sm); line-height: 1.4; }
.kz-channel.is-on { background: var(--c); color: var(--t); box-shadow: 0 5px 0 var(--d); }
.kz-channel:active { transform: translateY(3px); }
.kz-onair { position: relative; display: grid; justify-items: center; gap: 12px; inline-size: min(100%, 640px); padding: 18px 16px 20px; border-radius: 34px; background: #fff;
  box-shadow: 0 8px 0 #e3d4b4, 0 18px 30px -18px rgb(29 26 58 / .35); }
.kz-onair-art { position: relative; display: grid; place-items: center; }
/* the pixel room (static/js/kids-pixel.js): 192x108 canvas scaled up with crisp pixels; the track's picture sits in a corner */
.kz-scene { position: relative; inline-size: 100%; }
.kz-scene canvas { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 16 / 9; border-radius: 22px; image-rendering: pixelated;
  image-rendering: crisp-edges; background: #ffe9c7; box-shadow: inset 0 0 0 3px #fff, 0 4px 0 #e3d4b4; }
.kz-scene .kz-onair-art { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; }
.kz-scene .kz-onair-art .kz-sticker.big { inline-size: clamp(48px, 13vw, 72px); }
.kz-scene .kz-eq { inset-inline-end: -14px; block-size: 20px; }
.kz-onair-art .kz-sticker.big { inline-size: min(46vw, 190px); }
.kz-eq { position: absolute; inset-block-end: 4px; inset-inline-end: -10px; display: flex; align-items: flex-end; gap: 3px; block-size: 28px; padding: 4px 6px; border-radius: 10px;
  background: var(--kz-rose); opacity: 0; transition: opacity 200ms; }
.kz-eq i { display: block; inline-size: 4px; block-size: 100%; border-radius: 2px; background: #fff; transform-origin: bottom; transform: scaleY(.3); }
.kz-radio.is-playing .kz-eq { opacity: 1; }
html:not([data-motion="0"]) .kz-radio.is-playing .kz-eq i { animation: kz-eq 900ms ease-in-out infinite alternate; }
.kz-eq i:nth-child(2) { animation-delay: -300ms !important; } .kz-eq i:nth-child(3) { animation-delay: -600ms !important; } .kz-eq i:nth-child(4) { animation-delay: -150ms !important; }
@keyframes kz-eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.kz-onair-text { display: grid; justify-items: center; gap: 4px; min-inline-size: 0; inline-size: 100%; }
.kz-live-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: 999px; background: #ffe3ea; color: var(--kz-rose-d); font-weight: 800; font-size: var(--fs-xs); }
.kz-live-chip i { inline-size: 9px; block-size: 9px; border-radius: 50%; background: var(--kz-rose); }
html:not([data-motion="0"]) .kz-radio.is-playing .kz-live-chip i { animation: kz-pulse 1.2s ease-in-out infinite; }
.kz-now-title { margin: 0; font-size: clamp(1.4rem, 5.5vw, 2rem); line-height: 1.3; overflow-wrap: anywhere; }
.kz-now-title .kz-en { font-size: inherit; color: var(--ink); }
.kz-now-fa { margin: 0; font-weight: 700; color: var(--ink-2); min-block-size: 1em; }
.kz-now-meta { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; align-items: center; max-inline-size: 100%; }
.kz-now-meta small { overflow-wrap: anywhere; font-size: var(--fs-xs); }
.kz-type { padding: 1px 10px; border-radius: 999px; background: var(--kz-ind-l); color: var(--kz-ind-d); font-weight: 700; font-size: var(--fs-xs); }
.kz-progress { inline-size: min(100%, 360px); block-size: 8px; border-radius: 99px; background: #f1e7d3; overflow: hidden; direction: ltr; }
.kz-progress i { display: block; block-size: 100%; inline-size: 100%; background: var(--kz-rose); transform-origin: left; transform: scaleX(0); }
.kz-radio-play { inline-size: 104px; block-size: 104px; }
.kz-radio-play svg { inline-size: 52px; }
.kz-radio-play .i-pause { display: none; margin: 0; }
.kz-radio-play.is-on .i-play { display: none; }
.kz-radio-play.is-on .i-pause { display: block; }
html:not([data-motion="0"]) .kz-radio-play.is-on { animation: none; }
.kz-radio.is-waiting .kz-radio-play { opacity: .75; }
.kz-lyrics-box { inline-size: min(100%, 640px); max-block-size: 42vh; max-block-size: 42dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 28px; }
.kz-lyrics-box .kz-lyrics li { font-size: clamp(1.05rem, 4vw, 1.4rem); }
.kz-lyrics-box:not(.is-timed) .kz-lyrics li { color: var(--ink); }
.kz-radio-tools { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 18px; inline-size: min(100%, 640px); }
.kz-volume { display: inline-flex; align-items: center; gap: 8px; min-block-size: 48px; padding-inline: 14px; border-radius: 999px; background: #fff; border: 2px solid var(--hair); }
.kz-volume .ic { inline-size: 22px; block-size: 22px; }
.kz-volume input { inline-size: min(48vw, 200px); accent-color: var(--kz-rose); block-size: 32px; direction: ltr; }
.kz-sleep { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.kz-sleep[hidden] { display: none; }
.kz-next[hidden] { display: none; }  /* shown once the step's sounds were heard (kids-core.js KZ.revealWhenHeard) */
.kz-sleep-label { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--kz-ind-d); }
.kz-sleep .kz-mini { min-block-size: 48px; min-inline-size: 56px; justify-content: center; padding: 4px 12px; font-weight: 800; }
.kz-mini.is-on { --c: var(--kz-ind); --d: var(--kz-ind-d); color: #fff; }
.kz-sleep-left { font-size: var(--fs-sm); color: var(--ink-2); min-inline-size: 5em; }
.kz-next-box { inline-size: min(100%, 640px); text-align: start; }
.kz-next-box h2 { font-size: var(--fs-md); margin: 0 0 8px; }
.kz-next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kz-next-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 18px; background: #fff; border: 2px solid var(--hair); min-inline-size: 0; }
.kz-next-list img { inline-size: 40px; block-size: 40px; flex: none; }
.kz-next-list span { display: grid; min-inline-size: 0; }
.kz-next-list b { font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kz-next-list small { color: var(--ink-2); font-size: var(--fs-xs); }
.kz-sleeping { display: grid; justify-items: center; gap: 6px; }
.kz-sleeping[hidden] { display: none; }
.kz-credits-link a { display: inline-flex; align-items: center; gap: 6px; min-block-size: 44px; color: var(--ink-2); font-size: var(--fs-sm); }
.kz-credits { text-align: start; justify-items: stretch; }
.kz-credit-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.kz-credit-list li { padding: 12px 14px; border-radius: 18px; background: #fff; border: 2px solid var(--hair); }
.kz-credit-list p { margin: 0; overflow-wrap: anywhere; }
.kz-url { font-family: ui-monospace, monospace; font-size: var(--fs-2xs); user-select: all; overflow-wrap: anywhere; }

/* ---- stories ---- */
.kz-shelf-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 14px; inline-size: 100%; }
.kz-book { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 10px 12px; border-radius: 24px; border: 3px solid #fff; background: #fff;
  color: var(--ink); text-decoration: none; box-shadow: 0 6px 0 var(--d, #e3d4b4); block-size: 100%; }
.kz-book:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--d, #e3d4b4); }
.kz-book-cover { display: grid; place-items: center; inline-size: 88px; block-size: 88px; border-radius: 22px; background: var(--l, #fbefd9); }
.kz-book-cover img, .kz-book-cover .kz-blob { inline-size: 64px; block-size: 64px; }
.kz-book b { font-size: var(--fs-md); line-height: 1.3; }
.kz-book small { font-size: var(--fs-xs); color: var(--ink-2); }
.kz-book.is-later, .kz-book.is-locked { opacity: .62; box-shadow: 0 4px 0 #e3d4b4; }
.kz-book.is-later .kz-book-cover :is(img, .kz-blob) { filter: grayscale(.7); }
.kz-story-page .kz-bar { gap: 8px; }
.kz-story-tools { display: inline-flex; gap: 6px; }
.kz-story-tools .kz-mini { min-block-size: 48px; padding: 4px 12px; font-weight: 700; font-size: var(--fs-sm); --c: #fff; --d: #e3d4b4; color: var(--ink); }
.kz-story-tools .kz-mini.is-on { --c: var(--kz-tq); --d: var(--kz-tq-d); color: #fff; }
.kz-story-tools .ic { inline-size: 20px; block-size: 20px; }
.kz-dots-ico { font-family: "Andika", system-ui; letter-spacing: 1px; }
.kz-story { display: grid; gap: 8px; inline-size: min(100% - 24px, 820px); margin-inline: auto; padding-block-end: 24px; }
.kz-story-stage { display: grid; min-block-size: 56vh; }
.kz-spage { display: grid; justify-items: center; align-content: center; gap: 16px; padding: 18px 14px 22px; border-radius: 34px; background: #fff; box-shadow: 0 8px 0 #e3d4b4; text-align: center; }
html:not([data-motion="0"]) .kz-spage.in { animation: kz-page-in 320ms var(--ease-out); }
html:not([data-motion="0"]) .kz-spage.in-back { animation: kz-page-back 320ms var(--ease-out); }
@keyframes kz-page-in { from { opacity: 0; transform: translateX(40px) rotate(1.5deg); } }
@keyframes kz-page-back { from { opacity: 0; transform: translateX(-40px) rotate(-1.5deg); } }
.kz-spage .kz-pic { inline-size: min(52vw, 220px); }
.kz-stitle { font-size: clamp(1.8rem, 7vw, 2.8rem); margin: 0; color: var(--kz-ind-d); }
.kz-stext { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 6px 4px; font-family: "Andika", system-ui; font-weight: 700;
  font-size: clamp(1.6rem, 6.4vw, 2.6rem); line-height: 1.25; }
.kz-sw { display: inline-grid; justify-items: center; gap: 2px; }
.kz-word-btn { min-block-size: 48px; padding: 2px 6px; border: 0; border-radius: 14px; background: none; font: inherit; color: var(--ink); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .kz-word-btn:hover { background: #fff4d6; } }
.kz-word-btn.is-on { background: var(--kz-sun-l); color: var(--kz-rose-d); }
.kz-sw.is-tricky .kz-word-btn { text-decoration: underline wavy var(--kz-rose) 2px; text-underline-offset: 8px; }
.kz-sbtns { display: none; gap: 3px; justify-content: center; min-block-size: 24px; }
.show-sb .kz-sbtns { display: inline-flex; }
.kz-sbtns { gap: 6px; }
.kz-sbtn { inline-size: 16px; block-size: 16px; border-radius: 50%; border: 0; background: var(--kz-tq); cursor: pointer; padding: 0; position: relative; margin-block: 4px; }
.kz-sbtn::after { content: ""; position: absolute; inset: -14px -3px; }  /* 44px tall touch target */
.kz-sbtn.is-di { inline-size: 30px; border-radius: 6px; block-size: 8px; margin-block: 8px; }
.kz-page-speaker { inline-size: 64px; block-size: 64px; }
.kz-page-speaker svg { inline-size: 32px; block-size: 32px; }
.kz-story-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kz-story-nav .kz-round { inline-size: 64px; block-size: 64px; }
.kz-story-nav .kz-round svg { inline-size: 30px; block-size: 30px; }
.kz-story-nav .kz-round:disabled { opacity: .35; }
.kz-story-dots { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.kz-story-dots li { inline-size: 10px; block-size: 10px; border-radius: 50%; background: #e3d4b4; }
.kz-story-dots li.on { background: var(--kz-sun-d); transform: scale(1.3); }


/* ---- preview banner ---- */
.kz-preview-banner { margin: 6px auto 0; padding: 6px 14px; border-radius: 999px; background: var(--kz-ind-l); color: var(--kz-ind-d); font-weight: 700; font-size: var(--fs-sm); text-align: center; }

/* ---- parent: report, settings, plans, tools ---- */
.kzp .page-head.kzp-head .kzp-head-act { margin-inline-start: auto; }
.kzp-kpis { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.kzp-kpis li { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--hair); }
.kzp-kpis b { font-size: var(--fs-xl); color: var(--indigo); }
.kzp-kpis span { font-size: var(--fs-sm); color: var(--ink-2); }
.kzp .weekbars.two .wb-bars { display: flex; align-items: flex-end; justify-content: center; gap: 3px; block-size: 100%; inline-size: 100%; }
.kzp .weekbars.two .wb-bars i { inline-size: 40%; min-block-size: 2px; }
.kzp .weekbars.two .wb-bars i.r { background: var(--kz-rose); }
.kzp-key { display: inline-block; inline-size: 10px; block-size: 10px; border-radius: 3px; background: var(--kz-ind); margin-inline: 6px 2px; }
.kzp-key.r { background: var(--kz-rose); }
.kzp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.kzp-chips .kz-glyph { padding: 2px 10px; border-radius: 10px; background: color-mix(in srgb, var(--kz-sun) 30%, var(--card)); font-family: "Andika", system-ui; }
.kzp-chips .kz-glyph.soft { background: color-mix(in srgb, var(--kz-tq) 18%, var(--card)); }
.kzp-check { padding-block: 8px; border-block-end: 1px solid var(--hair); }
.kzp-check p { margin: 0; }
.kzp-check ul { margin: 4px 0; padding-inline-start: 1.2em; }
.kzp-check .ok { color: var(--ok); }
.kzp-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-block-end: 20px; }
.kzp-tool { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: var(--ink); }
.kzp-tool .ic { inline-size: 24px; block-size: 24px; color: var(--indigo); flex: none; margin-block-start: 4px; }
.kzp-tool b { display: block; }
.kzp-tool small { display: block; font-size: var(--fs-xs); }
.kzp-channel { border: 1px solid var(--hair); border-radius: var(--r-md); padding: 10px 12px; margin: 0; }
.kzp-channel legend { padding-inline: 4px; }
.kzp-tracklist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; max-block-size: 260px; overflow-y: auto; overscroll-behavior: contain; }
.kzp-plan { display: grid; gap: 16px; margin-block-start: 20px; }
@media (min-width: 760px) { .kzp-plan { grid-template-columns: 1.4fr 1fr; align-items: center; } }
.kzp-price { display: grid; gap: 8px; justify-items: start; }
.kzp-price > b { font-size: var(--fs-2xl); color: var(--indigo); }
.kzp-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.kzp-links a { display: inline-block; min-block-size: 32px; padding-block: 4px; }
.kzp-letters a { display: grid; place-items: center; min-block-size: 42px; inline-size: 100%; text-decoration: none; color: var(--ink); }
.kzp-letters li:has(a) { opacity: 1; }

/* ---- printable worksheets (A4) ---- */
.kzw-page main { background: var(--paper-2); }
.kzw-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-block: 12px; }
.kzw-sheet { inline-size: min(100% - 24px, 210mm); margin: 0 auto 20px; padding: 12mm 12mm 8mm; background: #fff; color: #1d1a3a; border-radius: 8px;
  box-shadow: 0 2px 10px rgb(0 0 0 / .08); display: grid; gap: 6mm; }
.kzw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4mm 8mm; border-block-end: 2px solid #eadfca; padding-block-end: 3mm; }
.kzw-head h1 { margin: 0; font-size: 34pt; color: #2f34a6; }
.kzw-head h1 .kz-glyph { font-size: 16pt; color: #4f4b6e; margin-inline-start: 8px; }
.kzw-pics { list-style: none; margin: 0; padding: 0; display: flex; gap: 6mm; }
.kzw-pics li { display: grid; justify-items: center; font-size: 11pt; }
.kzw-pics :is(img, .kz-blob) { inline-size: 14mm; block-size: 14mm; }
.kzw-name { margin: 0 0 0 auto; font-family: "Andika", system-ui; font-size: 12pt; }
.kzw-sub { margin: 0; font-size: 11pt; }
.kzw-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2mm; }
.kzw-row svg { inline-size: 100%; block-size: auto; }
.kzw-row .ln { stroke: #c9bfa8; stroke-width: .6; }
.kzw-row .ln.mid { stroke-dasharray: 2 2; }
.kzw-row .ln.base { stroke: #8a859c; stroke-width: .9; }
.kzw-row .st { fill: none; stroke: #b9c4ff; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.kzw-row .dash { fill: none; stroke: #8a859c; stroke-width: 1.6; stroke-dasharray: 1.5 3; stroke-linecap: round; }
.kzw-row .arr { fill: #e2557c; }
.kzw-row .sd { fill: #2f9a4c; }
.kzw-row .sd.small { fill: #2f9a4c; opacity: .8; }
.kzw-row .sn { fill: #fff; font: 700 6px "Andika", system-ui; text-anchor: middle; dominant-baseline: central; }
.kzw-foot { font-size: 9pt; color: #4f4b6e; border-block-start: 1px solid #eadfca; padding-block-start: 2mm; }
.kzw-match { list-style: none; margin: 0; padding: 0; display: grid; gap: 7mm; }
.kzw-match li { display: grid; grid-template-columns: 30mm 4mm 1fr 4mm 30mm; align-items: center; }
.kzw-l { font-size: 30pt; color: #2f34a6; text-align: center; }
.kzw-dot { inline-size: 4mm; block-size: 4mm; border-radius: 50%; background: #1d1a3a; }
.kzw-r { display: grid; place-items: center; }
.kzw-r :is(img, .kz-blob) { inline-size: 24mm; block-size: 24mm; }
.kzw-grid { inline-size: 100%; border-collapse: collapse; table-layout: fixed; }
.kzw-grid th, .kzw-grid td { border: 1px solid #c9bfa8; padding: 2mm; text-align: center; font-size: 10pt; }
.kzw-grid td svg { inline-size: 100%; max-inline-size: 22mm; fill: none; stroke: #e3d4b4; stroke-width: 4; }
.kzw-chart .kzw-head h1 { font-size: 22pt; }
@media print {
  /* a top and bottom page margin (not the sheet's padding), so the second page of a long sheet (the listen-and-do cards)
     does not start at the paper's edge, where home printers cut */
  @page { size: A4; margin: 10mm 0 8mm; }
  html, body, .kzw-page main { background: #fff !important; }
  .kzw-page .site-header, .kzw-page .no-print, .kzw-page .skip, .kzw-page .toasts, .kzw-page .tabbar, .kzw-page .site-footer { display: none !important; }
  .kzw-sheet { inline-size: 210mm; min-block-size: 278mm; margin: 0; padding-block: 2mm 0; border-radius: 0; box-shadow: none; break-after: page; }
  .kzw-sheet:last-of-type { break-after: auto; }
  .kzw-row .st, .kzw-row .arr, .kzw-row .sd { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* The per-unit sheets (kids/sheet_units.py, .kzu-*) have their own stylesheet: kids-sheets.css. */
.kzp-data { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; }
.kzp .notice a { font-weight: 700; }
/* contrast (WCAG AA for the small labels): white text sits on the darker glaze */
.kz-track.is-on small { opacity: 1; }
.kz-track.is-on.t-sounds, .kz-track.is-on.t-talk, .kz-channel.is-on:not(.t-sun) { background: var(--d); box-shadow: 0 5px 0 color-mix(in srgb, var(--d) 70%, #000); }

/* ==========================================================================
   v2 pedagogy (docs/KIDS.md §7): sound frames, modelling, reading games, alien names, TPR figure, minimal pairs,
   captions (visual mode), reading-direction cue, specific praise, exit question, tutorial hand, age-band looks.
   Motion only when html[data-motion] > 0 and the system does not ask for reduced motion; every state has a still look.
   ========================================================================== */
.kz-caption { justify-self: center; margin: 0 0 4px; padding: 6px 16px; border-radius: 16px; background: #1d1a3a; color: #fff;
  font-family: "Andika", system-ui; font-size: clamp(1.2rem, 4.5vw, 1.7rem); max-inline-size: 90%; }

/* a word with a gap: "sun" heard, _un shown */
.kz-frame { display: flex; align-items: center; justify-content: center; gap: 14px; }
.kz-frame .kz-pic { inline-size: 92px; }
.kz-frame-word { display: inline-flex; gap: 6px; align-items: flex-end; padding: 8px 14px; border-radius: 20px; background: #fff; box-shadow: 0 4px 0 #e3d4b4; }
.kz-frame-word .kz-glyph { font-size: clamp(2.2rem, 9vw, 3.2rem); color: var(--ink); }
.kz-gap { display: inline-grid; place-items: center; min-inline-size: 1.4em; padding-inline: 4px; border-block-end: 5px solid var(--kz-tq); font-family: "Andika", system-ui;
  font-weight: 700; font-size: clamp(2.2rem, 9vw, 3.2rem); line-height: 1; color: var(--kz-tq-d); }
.kz-gap.is-ghost { color: rgb(14 149 140 / .45); }
.kz-gap.is-filled { color: var(--kz-grn-d); border-color: var(--kz-grn); }

/* modelling the answer after two misses: a steady thick ring and a ✓-hand (no blinking needed), options stay usable */
.kz-tile.is-model { border-color: var(--kz-sun); box-shadow: 0 6px 0 var(--d, #e3d4b4), 0 0 0 8px var(--kz-sun-l), 0 0 0 11px var(--kz-sun); }
.kz-hand { position: absolute; z-index: 60; inline-size: 64px; block-size: 64px; margin: -6px 0 0 -18px; pointer-events: none; }
.kz-hand svg { inline-size: 100%; block-size: 100%; filter: drop-shadow(0 4px 6px rgb(29 26 58 / .3)); }
.kz-hand-ring { position: absolute; inset-inline-start: 12px; inset-block-start: -2px; inline-size: 28px; block-size: 28px; border-radius: 50%; border: 4px solid var(--kz-sun); }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="0"]) .kz-hand { animation: kz-tap 1s ease-in-out 3; }
  html:not([data-motion="0"]) .kz-hand.is-drag { animation: kz-dragdemo 1.6s ease-in-out 1 forwards; }
  html:not([data-motion="0"]) .kz-hand-ring { animation: kz-ring 1s ease-out 3; }
}
@keyframes kz-tap { 50% { transform: translate(0, 8px) scale(.94); } }
@keyframes kz-ring { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes kz-dragdemo { 15% { transform: translate(0, 6px); } 85%, 100% { transform: translate(var(--dx, 0), var(--dy, 0)); } }

/* left-to-right reading cue: a green start dot and an underline that sweeps under the word */
.kz-ltr { position: relative; display: inline-block; direction: ltr; padding-inline-start: 18px; }
.kz-ltr::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-end: .18em; inline-size: 11px; block-size: 11px; border-radius: 50%; background: var(--kz-grn); }
.kz-ltr::after { content: ""; position: absolute; inset-inline-start: 18px; inset-inline-end: 0; inset-block-end: -6px; block-size: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--kz-grn), var(--kz-tq)); transform-origin: left; }
@media (prefers-reduced-motion: no-preference) { html:not([data-motion="0"]) .kz-ltr.is-sweep::after { animation: kz-sweep 900ms var(--ease-out) both; } }
@keyframes kz-sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* 4-6 hear the question first; options come after it */
.kz-opts.is-wait { visibility: hidden; }
.kz-opts.is-listen { pointer-events: none; opacity: .72; transition: opacity .2s; }  /* 7-10: answers open once the question was heard */
.kz-opts.n2 { --n: 2; inline-size: min(100%, 520px); }

/* read and match */
.kz-readcard { position: relative; display: grid; justify-items: center; gap: 8px; padding: 16px 22px 18px; border-radius: 30px; background: #fff; box-shadow: 0 6px 0 #e3d4b4; max-inline-size: 100%; }
.kz-printed { font-size: clamp(2.4rem, 11vw, 4rem); color: var(--ink); line-height: 1.2; }
.kz-printed .g.is-vowel { color: var(--kz-rose-d); }
.kz-printed.is-sentence { font-size: clamp(1.6rem, 6.5vw, 2.6rem); text-align: left; }
.kz-rw { border: 0; background: none; font: inherit; color: inherit; padding: 0 2px; border-radius: 10px; cursor: pointer; }
.kz-rw.is-helped { background: var(--kz-sun-l); }
.kz-help { position: absolute; inset-block-start: -14px; inset-inline-end: -14px; display: grid; place-items: center; inline-size: 52px; block-size: 52px; border-radius: 50%;
  border: 3px solid #fff; background: var(--kz-tq-l); color: var(--kz-tq-d); box-shadow: 0 4px 0 var(--kz-tq); cursor: pointer; }
.kz-help svg { inline-size: 26px; block-size: 26px; }
.kz-help.is-on { background: var(--kz-sun-l); }
.kz-gloss { font-family: "Vazirmatn NL", system-ui; font-size: var(--fs-lg); color: var(--kz-ind-d); margin: 0; }
.kz-tile.is-pic .kz-pic { inline-size: 74%; }

/* blend slider */
.kz-blend { display: grid; justify-items: center; gap: 18px; inline-size: min(100%, 560px); }
.kz-blend-row { display: flex; gap: 18px; font-size: clamp(3rem, 14vw, 5rem); color: var(--ink); transition: gap 500ms var(--ease-out); }
.kz-bl { display: inline-block; opacity: .25; transition: opacity 200ms, transform 200ms, color 200ms; }
.kz-blend-row.is-in .kz-bl { opacity: .55; }
.kz-bl.is-vowel { color: var(--kz-rose-d); }
.kz-bl.is-lit { opacity: 1; transform: translateY(-6px); color: var(--kz-ind-d); }
.kz-bl.is-lit.is-vowel { color: var(--kz-rose-d); }
.kz-blend-row.is-blended { gap: 2px; }
.kz-blend-row.is-blended .kz-bl { transform: none; }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="0"]) .kz-blend-row.is-in .kz-bl { animation: kz-blin 420ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 450ms); }
}
@keyframes kz-blin { from { opacity: 0; transform: translateY(-14px); } }
.kz-track-bar { --p: 0; position: relative; inline-size: min(100%, 420px); block-size: 26px; border-radius: 13px; background: #eadcc0; box-shadow: inset 0 3px 0 rgb(0 0 0 / .06); }
.kz-track-fill { position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: calc(var(--p) * 100%); border-radius: 13px; background: linear-gradient(90deg, var(--kz-grn), var(--kz-tq)); }
.kz-thumb { position: absolute; inset-block-start: 50%; inset-inline-start: calc(var(--p) * (100% - 72px)); margin-block-start: -36px; display: grid; place-items: center;
  inline-size: 72px; block-size: 72px; border-radius: 50%; border: 4px solid #fff; background: var(--kz-sun); color: #1d1a3a; box-shadow: 0 5px 0 var(--kz-sun-d);
  touch-action: none; cursor: grab; }
.kz-thumb svg { inline-size: 34px; fill: none; stroke: #1d1a3a; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.kz-track-bar.is-done .kz-thumb { background: var(--kz-grn); box-shadow: 0 5px 0 var(--kz-grn-d); }

/* alien names */
.kz-alien-note { margin: 0; display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: baseline; justify-content: center; padding: 6px 14px; border-radius: 16px;
  background: #ede7ff; color: #3b2f87; font-size: var(--fs-sm); }
.kz-alien-note .kz-glyph { font-size: var(--fs-lg); }
.kz-alien-tile { display: grid; gap: 4px; padding: 10px 6px 12px; }
.kz-alien { inline-size: 70%; max-inline-size: 110px; }
.kz-alien-tile .kz-printed { font-size: clamp(1.4rem, 6vw, 2.2rem); padding: 2px 10px 6px 24px; border-radius: 12px; background: #fff; border: 2px dashed #b9b0e8; }
.kz-aliens.is-read .kz-alien-tile { pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { html:not([data-motion="0"]) .kz-alien-tile.is-hop .kz-alien { animation: kz-hop 500ms var(--ease-pop) 2; } }
@keyframes kz-hop { 50% { transform: translateY(-14px); } }
.kz-alien-badge { position: absolute; inset-block-start: 6px; inset-inline-end: 8px; padding: 0 8px; border-radius: 8px; background: #ede7ff; color: #3b2f87;
  font-family: "Andika", system-ui; font-size: var(--fs-xs); }

/* Kino doing an action ("act:<verb>"; kids-core.js KZ.figure): the same Compass Kino as .kz-mascot (same colours and line),
   with an arm rig. Hands stay at or above chest height in every pose; the feet only take still poses. */
.kz-kh { inline-size: 100%; block-size: 100%; overflow: visible; --ul: 66deg; --fl: 56deg; --ur: 66deg; --fr: 56deg; --al: 1; --ar: 1; }
.kz-pic .kz-kh { inline-size: 92%; }
.kz-kh g, .kz-kh rect, .kz-kh path, .kz-kh image { transform-box: view-box; }
.kz-kh .kh-shadow { fill: rgb(29 26 58 / .12); }
.kz-kh :is(.kh-cushion, .kh-body, .kh-feet rect, .kh-leaf, .kh-mouth) { stroke: #14122b; stroke-width: 2.7; stroke-linejoin: round; stroke-linecap: round; }
.kz-kh .kh-cushion { fill: #ffb627; }
.kz-kh :is(.kh-body, .kh-leaf) { fill: #0b8f86; }
.kz-kh .kh-feet rect { fill: #3a3fcb; }
.kz-kh .kh-patch { fill: #fff3dc; stroke: #fff3dc; stroke-width: 15; stroke-linejoin: round; }
.kz-kh .kh-shine { fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: round; opacity: .72; }
.kz-kh .kh-arms line { fill: none; stroke-linecap: round; }
.kz-kh .kh-arms .kh-ol { stroke: #14122b; stroke-width: 11.2; }
.kz-kh .kh-arms .kh-in { stroke: #0b8f86; stroke-width: 5.8; }
.kz-kh .kh-eyes ellipse { fill: #14122b; }
.kz-kh .kh-glint { fill: #fff; }
.kz-kh :is(.kh-shut, .kh-smile, .kh-brow) { fill: none; stroke: #14122b; stroke-width: 2.8; stroke-linecap: round; }
.kz-kh .kh-brow { stroke-width: 2.2; }
.kz-kh .kh-cheeks ellipse { fill: #ff8f73; opacity: .8; }
.kz-kh .kh-mouth { fill: #7a2742; stroke-width: 2.4; }
.kz-kh .kh-z { fill: none; stroke: #3a3fcb; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.kz-kh :is(.kh-shut, .kh-mouth, .kh-z, .kh-prop, .kh-arms-f, .kh-tip-perk, .kh-tip-droop) { display: none; }
.kz-kh .kh-up { transform-origin: 46px 93px; }
.kz-kh .kh-fore { transform-origin: 46px 111px; }
.kz-kh .kh-up.kh-arm-l { transform: rotate(var(--ul)) scaleY(var(--al)); }
.kz-kh .kh-up.kh-arm-r { transform: rotate(var(--ur)) scaleY(var(--ar)); }
.kz-kh .kh-arm-l > .kh-fore { transform: rotate(var(--fl)); }
.kz-kh .kh-arm-r > .kh-fore { transform: rotate(var(--fr)); }
.kz-kh .kh-all { transform-origin: 60px 124px; }
.kz-kh .kh-head { transform-origin: 60px 88px; }
.kz-kh .kh-tip { transform-origin: 83px 27px; }
.kz-kh .kh-foot-l { transform-origin: 51px 115px; }
.kz-kh .kh-foot-r { transform-origin: 69px 115px; }
.kz-kh .kh-fx > *, .kz-kh .kh-fxf > * { display: none; fill: none; stroke: #3a3fcb; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.kz-kh .kh-fx :is(.fx-bench, .fx-bench2) { fill: #c98a2b; stroke: #14122b; stroke-width: 2.2; }
.kz-kh .kh-fx .fx-note { fill: #3a3fcb; stroke: none; font: 700 22px "Andika", system-ui; }
.kz-kh .kh-fxf .fx-wave { stroke: #2a8be0; stroke-width: 4; }
.kz-kh .kh-fxf .fx-burst { stroke: #d48a00; }
.kz-kh .kh-fx .fx-nodmark { stroke: #d48a00; }
/* still poses: [left upper, left forearm, right upper, right forearm]; 90deg = straight out to the side, more = higher */
.kz-kh[data-act="jump"] { --ul: 96deg; --fl: 60deg; --ur: 96deg; --fr: 60deg; }
.kz-kh[data-act="stretch"] { --ul: 122deg; --fl: 18deg; --ur: 122deg; --fr: 18deg; }
.kz-kh[data-act="clap"] { --ul: 244deg; --fl: 0deg; --ur: 244deg; --fr: 0deg; --al: .43; --ar: .43; }  /* short: the hands come forward */
.kz-kh[data-act="touch_head"] { --ul: 118deg; --fl: 70deg; --ur: 118deg; --fr: 70deg; }
.kz-kh[data-act="wave"] { --ur: 98deg; --fr: 62deg; }
.kz-kh[data-act="dance"] { --ul: 104deg; --fl: 58deg; --ur: 68deg; --fr: 50deg; }
.kz-kh[data-act="swim"] { --ul: 118deg; --fl: 24deg; --ur: 64deg; --fr: 30deg; }
.kz-kh[data-act="point"] { --ur: 90deg; --fr: 0deg; }
.kz-kh[data-act="run"] { --ul: 62deg; --fl: 100deg; --ur: 96deg; --fr: 96deg; }
.kz-kh[data-act="eat"], .kz-kh[data-act="drink"] { --ur: 105deg; --fr: 90deg; }
.kz-kh:is([data-act="clap"], [data-act="touch_head"], [data-act="eat"], [data-act="drink"]) .kh-arms-f { display: inline; }
.kz-kh:is([data-act="clap"], [data-act="touch_head"], [data-act="eat"], [data-act="drink"], [data-act="sleep"]) .kh-arms-b { display: none; }
.kz-kh:is([data-act="jump"], [data-act="hop"], [data-act="stretch"], [data-act="dance"]) .kh-tip-perk { display: inline; }
.kz-kh:is([data-act="sit"], [data-act="sleep"]) .kh-tip-droop { display: inline; }
.kz-kh:is([data-act="jump"], [data-act="hop"], [data-act="stretch"], [data-act="dance"], [data-act="sit"], [data-act="sleep"]) .kh-tip-up { display: none; }
.kz-kh[data-act="sit"] .kh-top, .kz-kh[data-act="sleep"] .kh-top { transform: translateY(8px); }  /* sitting: the head sinks, the feet point out */
.kz-kh[data-act="sit"] .kh-foot-l { transform: translate(-8px, 1px) rotate(-14deg); }  /* still, also while he stands: under the body */
.kz-kh[data-act="sit"] .kh-foot-r { transform: translate(8px, 1px) rotate(14deg); }
.kz-kh[data-act="sleep"] .kh-foot-l { transform: translate(-13px, 1px) rotate(-16deg); }
.kz-kh[data-act="sleep"] .kh-foot-r { transform: translate(13px, 1px) rotate(16deg); }
.kz-kh[data-act="hop"] .kh-foot-r { transform: translate(1px, -7px) rotate(-12deg); }  /* on one foot */
.kz-kh[data-act="sleep"] .kh-all { transform: rotate(8deg); }
.kz-kh[data-act="nod"] .kh-head { transform: rotate(7deg); }
.kz-kh[data-act="run"] .kh-all { transform: rotate(7deg); }
.kz-kh[data-act="stretch"] .kh-all { transform: scaleY(1.1); }
.kz-kh[data-act="jump"] .kh-all { transform: translateY(-9px); }
.kz-kh[data-act="hop"] .kh-all { transform: translateY(-5px); }
.kz-kh[data-act="dance"] .kh-all { transform: rotate(-6deg); }
.kz-kh[data-act="turn"] .kh-all { transform: scaleX(.8); }
.kz-kh[data-act="sleep"] .kh-shut, .kz-kh[data-act="sleep"] .kh-z { display: inline; }
.kz-kh[data-act="sleep"] .kh-eyes { display: none; }
.kz-kh[data-act="sit"] .fx-bench { display: inline; }
.kz-kh[data-act="stand"] .fx-bench2, .kz-kh[data-act="stand"] .fx-arrow-up { display: inline; }
.kz-kh[data-act="run"] .fx-speed, .kz-kh[data-act="walk"] .fx-speed { display: inline; }
.kz-kh[data-act="walk"] .fx-speed { stroke-dasharray: 3 7; }
.kz-kh[data-act="swim"] .fx-wave { display: inline; }
.kz-kh[data-act="stretch"] .fx-arrow-up, .kz-kh[data-act="jump"] .fx-spring, .kz-kh[data-act="hop"] .fx-spring { display: inline; }
.kz-kh[data-act="turn"] .fx-turn, .kz-kh[data-act="point"] .fx-point, .kz-kh[data-act="nod"] .fx-nodmark { display: inline; }
.kz-kh[data-act="clap"] .fx-burst, .kz-kh[data-act="dance"] .fx-note { display: inline; }
.kz-kh[data-act="eat"] .kh-prop, .kz-kh[data-act="drink"] .kh-prop { display: inline; }
.kz-kh[data-act="eat"] .kh-mouth, .kz-kh[data-act="drink"] .kh-mouth { display: inline; }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="0"]) .kz-kh[data-act="jump"] .kh-all { animation: kzk-jump 900ms ease-in-out infinite; }
  html:not([data-motion="0"]) .kz-kh[data-act="jump"] .kh-tip { animation: kzk-perk 900ms ease-in-out infinite; }
  html:not([data-motion="0"]) .kz-kh[data-act="hop"] .kh-all { animation: kzk-hop 600ms ease-in-out infinite; }
  html:not([data-motion="0"]) .kz-kh[data-act="hop"] .kh-tip { animation: kzk-perk 600ms ease-in-out infinite; }
  html:not([data-motion="0"]) .kz-kh[data-act="clap"] .kh-up { animation: kzk-clap 450ms ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="clap"] .fx-burst { animation: kzk-blink 450ms steps(1) infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="run"] .kh-all { animation: kzk-run 380ms ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="run"] .kh-arm-l.kh-up { animation: kzk-pump 380ms ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="run"] .kh-arm-r.kh-up { animation: kzk-pump 380ms ease-in-out infinite alternate-reverse; }
  html:not([data-motion="0"]) .kz-kh[data-act="walk"] .kh-all { animation: kzk-walk 900ms ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="walk"] .kh-arm-l.kh-up { animation: kzk-step 900ms ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="walk"] .kh-arm-r.kh-up { animation: kzk-step 900ms ease-in-out infinite alternate-reverse; }
  html:not([data-motion="0"]) .kz-kh[data-act="swim"] .kh-all { animation: kzk-bob 1.2s ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="swim"] .kh-arm-l.kh-up { animation: kzk-crawl 1.2s ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="swim"] .kh-arm-r.kh-up { animation: kzk-crawl 1.2s ease-in-out infinite alternate-reverse; }
  html:not([data-motion="0"]) .kz-kh[data-act="swim"] .fx-wave { animation: kzk-wave 1.2s ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="dance"] .kh-all { animation: kzk-dance 800ms ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="dance"] .kh-arm-l.kh-up { animation: kzk-dancearm 800ms ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="dance"] .kh-arm-r.kh-up { animation: kzk-dancearm 800ms ease-in-out infinite alternate-reverse; }
  html:not([data-motion="0"]) .kz-kh[data-act="wave"] .kh-arm-r > .kh-fore { animation: kzk-wave-f 450ms ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="sit"] .kh-top { animation: kzk-sit 1.8s ease-in-out infinite; }
  html:not([data-motion="0"]) .kz-kh[data-act="stand"] .kh-top { animation: kzk-stand 1.8s ease-in-out infinite; }
  html:not([data-motion="0"]) .kz-kh[data-act="turn"] .kh-all { animation: kzk-turn 1.6s ease-in-out infinite; }
  html:not([data-motion="0"]) .kz-kh[data-act="stretch"] .kh-all { animation: kzk-tall 1.4s ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="sleep"] .kh-z { animation: kzk-z 2s ease-in-out infinite; }
  html:not([data-motion="0"]) .kz-kh[data-act="sleep"] .kh-all { animation: kzk-breathe 3s ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="nod"] .kh-head { animation: kzk-nod 700ms ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="point"] .fx-point { animation: kzk-point 700ms ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh[data-act="touch_head"] .kh-fore { animation: kzk-pat 500ms ease-in-out infinite alternate; }
  html:not([data-motion="0"]) .kz-kh:is([data-act="eat"], [data-act="drink"]) .kh-prop { animation: kzk-bite 1.6s ease-in-out infinite; }
  html:not([data-motion="0"]) .kz-kh:is([data-act="eat"], [data-act="drink"]) .kh-arm-r.kh-up { animation: kzk-lift 1.6s ease-in-out infinite; }
  html:not([data-motion="0"]) .kz-kh:is([data-act="eat"], [data-act="drink"]) .kh-arm-r > .kh-fore { animation: kzk-lift-f 1.6s ease-in-out infinite; }
  html:not([data-motion="0"]) .kz-kh:is([data-act="eat"], [data-act="drink"]) .kh-mouth { animation: kzk-chew 1.6s steps(1) infinite; }
  html:not([data-motion="0"]) .kz-kh[data-act="dance"] .fx-note { animation: kzk-note 800ms ease-in-out infinite alternate; }
}
@keyframes kzk-jump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes kzk-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes kzk-perk { 50% { transform: rotate(-7deg) scale(1.06); } }
@keyframes kzk-clap { from { transform: rotate(205deg) scaleY(.43); } to { transform: rotate(244deg) scaleY(.43); } }
@keyframes kzk-blink { from { opacity: 0; } to { opacity: 1; } }
@keyframes kzk-run { from { transform: rotate(4deg) translateX(-3px); } to { transform: rotate(9deg) translateX(3px); } }
@keyframes kzk-pump { from { transform: rotate(62deg); } to { transform: rotate(96deg); } }
@keyframes kzk-walk { from { transform: rotate(-3deg) translateX(-3px); } to { transform: rotate(3deg) translateX(3px); } }
@keyframes kzk-step { from { transform: rotate(60deg); } to { transform: rotate(84deg); } }
@keyframes kzk-bob { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@keyframes kzk-crawl { from { transform: rotate(118deg); } to { transform: rotate(64deg); } }
@keyframes kzk-wave { from { transform: translateX(-4px); } to { transform: translateX(4px); } }
@keyframes kzk-dance { from { transform: rotate(-7deg) translateY(0); } to { transform: rotate(7deg) translateY(-5px); } }
@keyframes kzk-dancearm { from { transform: rotate(104deg); } to { transform: rotate(68deg); } }
@keyframes kzk-wave-f { from { transform: rotate(40deg); } to { transform: rotate(84deg); } }
@keyframes kzk-sit { 0%, 30% { transform: translateY(0); } 60%, 100% { transform: translateY(8px); } }
@keyframes kzk-stand { 0%, 30% { transform: translateY(8px); } 60%, 100% { transform: translateY(0); } }
@keyframes kzk-turn { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(-1); } }
@keyframes kzk-tall { from { transform: scaleY(1); } to { transform: scaleY(1.12); } }
@keyframes kzk-z { 0% { transform: translate(0, 4px); opacity: 0; } 50% { opacity: 1; } 100% { transform: translate(6px, -8px); opacity: 0; } }
@keyframes kzk-breathe { from { transform: rotate(8deg) scale(1); } to { transform: rotate(8deg) scale(1.03); } }
@keyframes kzk-nod { from { transform: rotate(-3deg); } to { transform: rotate(12deg); } }
@keyframes kzk-point { from { transform: translateX(-3px); } to { transform: translateX(4px); } }
@keyframes kzk-pat { from { transform: rotate(54deg); } to { transform: rotate(72deg); } }
@keyframes kzk-bite { 0%, 15% { transform: translate(14px, 7px); } 45%, 60% { transform: translate(0, 0); } 90%, 100% { transform: translate(14px, 7px); } }
@keyframes kzk-lift { 0%, 15% { transform: rotate(92deg); } 45%, 60% { transform: rotate(105deg); } 90%, 100% { transform: rotate(92deg); } }
@keyframes kzk-lift-f { 0%, 15% { transform: rotate(58deg); } 45%, 60% { transform: rotate(90deg); } 90%, 100% { transform: rotate(58deg); } }
@keyframes kzk-chew { 0%, 40% { opacity: 0; } 41%, 65% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes kzk-note { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.kz-tile.is-fig { aspect-ratio: 1; }
.kz-tile.is-fig .kz-pic { inline-size: 88%; }
/* listen and do: a new command is modelled once before it is asked (Kino does it alone, nothing to tap) */
.kz-do-model { display: grid; place-items: center; inline-size: min(62vw, 300px); aspect-ratio: 1; margin: 0 auto; padding: 10px;
  background: var(--kz-card, #fff); border-radius: 28px; box-shadow: 0 6px 18px rgba(20, 18, 43, .1); }
.kz-do-model .kz-pic { inline-size: 92%; }
.kz-do-model .kz-pic .kz-kh, .kz-do-model .kz-pic img { inline-size: 100%; block-size: auto; }

/* drag: tap a picture to hear its name */
.kz-ear { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; display: grid; place-items: center; inline-size: 26px; block-size: 26px; border-radius: 50%;
  background: var(--kz-tq-l); color: var(--kz-tq-d); }
.kz-ear svg { inline-size: 16px; block-size: 16px; }
.kz-target.is-heard .kz-ear { background: var(--kz-tq); color: #fff; }
.kz-drag.n4 .kz-targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .kz-drag.n4 .kz-targets { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kz-mem-ear { display: grid; place-items: center; inline-size: 56%; aspect-ratio: 1; border-radius: 50%; background: var(--kz-tq); color: #fff; }
.kz-mem-ear svg { inline-size: 60%; block-size: 60%; }

/* specific praise between games, the end-of-session list, the surprise gift */
.kz-praise { position: fixed; inset-inline: 0; inset-block-end: 110px; margin-inline: auto; inline-size: max-content; max-inline-size: 90vw; z-index: 8; display: flex; gap: 8px;
  align-items: baseline; padding: 10px 18px; border-radius: 20px; background: #fff; box-shadow: 0 6px 0 #e3d4b4; font-weight: 700; opacity: 0; pointer-events: none;
  transition: opacity 200ms; }
.kz-praise.is-on { opacity: 1; }
.kz-praise b { font-size: var(--fs-xl); color: var(--kz-ind-d); }
.kz-did { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kz-did li { display: flex; gap: 8px; align-items: baseline; justify-content: center; padding: 8px 16px; border-radius: 16px; background: #fff; box-shadow: 0 3px 0 #e3d4b4;
  font-weight: 700; direction: rtl; }
.kz-did b { font-size: var(--fs-lg); color: var(--kz-ind-d); }
.kz-gift { display: grid; justify-items: center; gap: 6px; text-decoration: none; color: var(--kz-rose-d); font-size: var(--fs-xl); }
.kz-gift img { inline-size: 120px; block-size: 120px; }
@media (prefers-reduced-motion: no-preference) { html:not([data-motion="0"]) .kz-gift img { animation: kz-wiggle 900ms ease-in-out infinite; } }

/* "Stop?" before leaving a session */
.kz-ask { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgb(29 26 58 / .45); padding: 16px; }
.kz-ask-card { display: grid; justify-items: center; gap: 10px; padding: 22px 26px; border-radius: 30px; background: var(--paper, #fffaf0); box-shadow: 0 10px 0 #e3d4b4; }
.kz-ask-q { font-size: 2.6rem; margin: 0; color: var(--kz-ind-d); }
.kz-ask-row { display: flex; gap: 22px; direction: ltr; }
.kz-ask-btn { display: grid; place-items: center; inline-size: 96px; block-size: 96px; border-radius: 50%; border: 5px solid #fff; background: var(--c); color: #fff;
  box-shadow: 0 6px 0 var(--d); cursor: pointer; }
.kz-ask-btn svg { inline-size: 46px; block-size: 46px; }

/* first-run tutorial */
.kz-demo-row { display: flex; gap: 28px; justify-content: center; }
.kz-demo { inline-size: 120px; block-size: 120px; pointer-events: none; }

/* stories: modes, help taps, sound buttons that light without a recording */
.kz-modes { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.kz-word-btn.is-helped { background: var(--kz-sun-l); }
.kz-sbtn.is-on { background: var(--kz-sun); }

/* age bands: 4-6 bigger and rounder with the mascot in front; 7-10 calmer and more compact, more room for text */
body.kz-band-small .kz-tile { border-radius: 32px; }
body.kz-band-small .kz-opts { gap: 20px; }
body.kz-band-small .kz-mascot.dock { inline-size: 96px; }
body.kz-band-big { --kz-tap: 64px; }
body.kz-band-big .kz-mascot.dock { inline-size: 64px; opacity: .9; }
body.kz-band-big .kz-tile { border-radius: 20px; }
body.kz-band-big .kz-hint { font-size: var(--fs-md); }
body.kz-band-big .kz-stars li { flex-basis: 22px; }
/* parent: ready-made nicknames */
.kzp-nicks { border: 0; padding: 0; margin: 0; }
.kzp-nick-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 8px; }
.kzp-nick { position: relative; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--hair); background: var(--card); cursor: pointer; font-size: var(--fs-sm); }
.kzp-nick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.kzp-nick:has(input:checked) { border-color: var(--indigo); background: color-mix(in srgb, var(--indigo) 8%, var(--card)); }
.kzp-nick:has(input:focus-visible) { outline: 2px solid var(--indigo); outline-offset: 2px; }
/* printable listen-and-do cards */
.kzp-tpr { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kzp-tpr-card { display: grid; justify-items: center; gap: 4px; padding: 10px; border: 2px dashed #c9b78f; border-radius: 14px; break-inside: avoid; text-align: center; }
.kzp-tpr-card .kz-kh, .kzp-tpr-card .kz-pic-img { inline-size: 120px; block-size: 124px; }
.kzp-tpr-card b { font-family: "Andika", system-ui; font-size: 1.3rem; }
@media print { .kzp-tpr { grid-template-columns: repeat(3, 1fr); } .kz-kh * { animation: none !important; } }
.kz-today.is-bridge { background: linear-gradient(135deg, #c4efd0, #b8eee8); box-shadow: 0 6px 0 #2f9a4c; }
.kz-btn { white-space: nowrap; }
.kz-kw { margin: 0; font-size: clamp(1.8rem, 7vw, 2.6rem); color: var(--ink); }
.kz-kw b { color: var(--kz-rose-d); text-decoration: underline 4px; text-underline-offset: 6px; }
.kz-card .kz-pic { inline-size: min(44vw, 190px); }
.kz-alien-tile .kz-printed { font-size: clamp(1.05rem, 4.6vw, 1.9rem); max-inline-size: 100%; overflow-wrap: normal; white-space: nowrap; }
/* a made-up word is read as one piece: it never breaks across lines; small tiles shrink the type and the side padding instead */
.kz-alien-tile { min-inline-size: 0; }
@media (max-width: 480px) { .kz-alien-tile .kz-printed { font-size: clamp(.95rem, 4.2vw, 1.3rem); padding-inline: 18px 8px; letter-spacing: .01em; } }
.kz-btn > svg, .kz-ask-btn > svg { inline-size: 26px; block-size: 26px; flex: none; }
.kz-spage .kz-opts { inline-size: 100%; }
.kz-spage .kz-opts .kz-tile { aspect-ratio: 1; }
.kz-spage .kz-opts .kz-pic { inline-size: 74%; }

/* Persian guidance (docs/KIDS-PERSIAN-REVIEW.md): the «؟» help button, a highlighted hint, the Persian line buttons on
   child pages and the parent pages' playable chips */
.kz-bar-end { display: inline-flex; gap: 8px; align-items: center; }
.kz-fahelp > span { font: 800 1.7rem/1 "Vazirmatn NL", system-ui; color: var(--ink); }  /* the family is "Vazirmatn NL" (app.css) */
.kz-fahelp.is-playing { outline: 3px solid var(--kz-tq); outline-offset: 2px; }
.kz-hint.is-flash { background: color-mix(in srgb, var(--kz-sun) 34%, transparent); border-radius: 14px; }
.kz-caption[lang="fa"] { font-family: "Vazirmatn NL", system-ui; }
.kz-say { margin-inline: auto; }
.kzp-chips .kzp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 12px;
  background: color-mix(in srgb, var(--kz-sun) 26%, var(--card)); font-size: var(--fs-sm); }
.kzp-chip.soft { background: color-mix(in srgb, var(--kz-tq) 16%, var(--card)); }
.kzp-chip .kz-glyph { font-family: "Andika", system-ui; padding: 0; background: none; }
.kzp-chip small { color: var(--ink-2); }
.kzp-play { position: relative; display: inline-grid; place-items: center; inline-size: 30px; block-size: 30px; border-radius: 50%; border: 0;
  background: var(--card); color: var(--ink); cursor: pointer; }
.kzp-play::after { content: ""; position: absolute; inset: -7px; }  /* 44px touch target around the 30px disc */
.kzp-channel summary { padding-block: 10px; cursor: pointer; }  /* keeps the disclosure marker; ~46px tall */
.kzp-play .ic { inline-size: 16px; block-size: 16px; }
.kzp-play.is-playing { outline: 2px solid var(--kz-tq); }
.kzp-week h3 { margin-block: 12px 4px; }
.kzp-week .kzp-tip { margin: 4px 0; }
.kzp-table { inline-size: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.kzp-table th, .kzp-table td { padding: 6px 4px; border-block-end: 1px solid var(--line); text-align: start; vertical-align: middle; }

/* ---- kids sub-brand «اسپیکینو کودک» (design/logo, mark B-kids: Kino in the khatam speech bubble) ---------------- */
.kz-brand { display: inline-flex; align-items: center; gap: 8px; min-inline-size: 0; }
.kz-brand img { inline-size: 40px; block-size: 40px; flex: none; }
.kz-brand-fa { font-family: "Estedad", var(--f-body); font-weight: 800; font-size: 1.1875rem; line-height: 1; color: var(--ink); white-space: nowrap; }
.kz-brand-fa b { color: var(--teal); font-weight: 800; }
.kz-brand-en { display: none; font-family: "Andika", "Atkinson Next", sans-serif; font-weight: 700; font-size: 1rem; line-height: 1;
  color: var(--indigo); padding-inline-start: 10px; border-inline-start: 1.5px solid var(--saffron); white-space: nowrap; }
@media (min-width: 600px) { .kz-brand-en { display: inline; } }
.kz-mid { display: inline-flex; align-items: center; gap: 10px; min-inline-size: 0; }
.kz-bar .kz-brand img { inline-size: 46px; block-size: 46px; }
@media (max-width: 480px) { .kz-mid:has(.kz-me) .kz-brand, .kz-mid.has-me .kz-brand { display: none; } }  /* the kid's own name wins on narrow bars */

/* rhyme: the word heard (big picture), the option whose name is being said, the two picked in "find two" */
.kz-rhyme-target { display: flex; align-items: center; justify-content: center; gap: 16px; }
.kz-rhyme-target .kz-pic { inline-size: clamp(96px, 28vw, 140px); padding: 8px; border-radius: 24px; background: #fff; box-shadow: 0 6px 0 #e3d4b4; }
.kz-tile.is-said { border-color: var(--kz-tq); box-shadow: 0 6px 0 var(--d, #e3d4b4), 0 0 0 7px var(--kz-tq-l); }
html:not([data-motion="0"]) .kz-tile.is-said { transform: scale(1.05); }
.kz-tile.is-picked { border-color: var(--kz-ind); --c: var(--kz-ind-l); }

/* syllables: the picture, the word in beats (7-10 and the visual mode), the beat dots and a big drum */
.kz-syl-top { display: flex; align-items: center; justify-content: center; gap: 16px; }
.kz-syl-top .kz-pic { inline-size: clamp(96px, 28vw, 140px); }
.kz-syls { display: flex; gap: 6px; justify-content: center; margin: 0; font-size: clamp(1.8rem, 8vw, 2.6rem); }
.kz-syls.is-hidden { display: none; }
.kz-syl { padding: 2px 10px; border-radius: 14px; background: #fff; border: 3px solid #fff; box-shadow: 0 4px 0 #e3d4b4; }
.kz-syl.is-lit { background: var(--kz-sun-l); border-color: var(--kz-sun); }
.kz-beats { display: flex; gap: 10px; justify-content: center; min-block-size: 30px; }
.kz-beats i { inline-size: 26px; block-size: 26px; border-radius: 50%; background: var(--kz-sun); box-shadow: 0 3px 0 var(--kz-sun-d); }
.kz-drum-row { display: flex; align-items: center; justify-content: center; gap: 22px; }
.kz-drum { display: grid; place-items: center; inline-size: clamp(120px, 34vw, 156px); block-size: clamp(120px, 34vw, 156px); border-radius: 50%;
  border: 5px solid #fff; background: var(--kz-rose-l); box-shadow: 0 8px 0 var(--kz-rose-d); cursor: pointer; touch-action: manipulation; }
.kz-drum .kz-pic { inline-size: 70%; }
.kz-drum:focus-visible { outline: 4px solid var(--kz-ind); outline-offset: 4px; }
.kz-drum:active { transform: translateY(5px); box-shadow: 0 3px 0 var(--kz-rose-d); }
html:not([data-motion="0"]) .kz-drum.is-hit { animation: kz-drumhit 220ms ease-out; }
@keyframes kz-drumhit { 40% { transform: scale(0.92); } 100% { transform: scale(1); } }
.kz-claps { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-items: center; inline-size: 100%; }
.kz-claps .kz-pic { inline-size: 36%; }
.kz-claps.n3 .kz-pic, .kz-claps.n4 .kz-pic { inline-size: 30%; }
.kz-drum.is-small { inline-size: clamp(88px, 24vw, 112px); block-size: clamp(88px, 24vw, 112px); }
.kz-syl-top + .kz-syls.is-hidden + .kz-beats:empty { min-block-size: 12px; }
.kz-night .kz-me b { color: #fff; }  /* the nickname on the night background ("enough for today") */
/* split digraph (phase 5): the vowel and the final e of c-a-k-e are one sound, joined by an arc above the word */
.kz-printed .g.is-split { position: relative; color: var(--kz-rose-d); }
.kz-printed .g.is-split.s1::after { content: ""; position: absolute; inset-block-start: -.18em; inset-inline-start: 50%;
  inline-size: 2.05em; block-size: .32em; border: 3px solid var(--kz-rose); border-block-end: 0; border-radius: .5em .5em 0 0; }

/* ---- Talk Town (talk track): sentence cards, question and answer, yes or no ---------------------------------------- */
.kz-word.is-sentence { font-size: clamp(1.25rem, 5vw, 1.9rem); line-height: 1.3; text-align: center; max-inline-size: 18ch; margin-inline: auto; }
.kz-sayit { display: inline-flex; gap: 6px; align-items: center; justify-content: center; margin-block-start: 8px; min-block-size: 18px; }
.kz-sayit i { inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--kz-rose); opacity: .25; }
.kz-sayit.is-on i { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .kz-sayit.is-on i { animation: kz-say 1s ease-in-out infinite; }
  .kz-sayit.is-on i:nth-child(2) { animation-delay: .15s; }
  .kz-sayit.is-on i:nth-child(3) { animation-delay: .3s; }
}
@keyframes kz-say { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.kz-talk-q { display: flex; align-items: center; justify-content: center; gap: 12px; margin-block-end: 14px; }
.kz-talk-q .kz-pic img { inline-size: 88px; block-size: 88px; }
.kz-talk-bubble { position: relative; display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px;
  border-radius: 18px; background: #fff; box-shadow: 0 3px 0 var(--kz-rose-l); font-size: 1.25rem; font-weight: 700; }
.kz-talk-bubble > span { min-inline-size: min(52vw, 15ch); text-wrap: balance; }  /* a short question stays on one or two lines */
.kz-talk-opts { display: grid; gap: 10px; inline-size: min(100%, 560px); margin-inline: auto; }
.kz-answer { display: flex; align-items: center; gap: 10px; justify-content: flex-start; min-block-size: 64px; padding: 10px 16px;
  font-size: 1.2rem; text-align: start; }
.kz-answer svg { inline-size: 26px; block-size: 26px; flex: none; }
.kz-answer.a0 { --c: var(--kz-sun-l); } .kz-answer.a1 { --c: var(--kz-tq-l); } .kz-answer.a2 { --c: var(--kz-ind-l); }
.kz-answer-dots { display: inline-flex; gap: 6px; } .kz-answer-dots i { inline-size: 12px; block-size: 12px; border-radius: 50%; background: currentColor; opacity: .55; }
.kz-answer.is-said { outline: 4px solid var(--kz-rose); outline-offset: 2px; }
.kz-answer .kz-sayit { margin: 0 auto 0 0; }
.kz-yn-pic { display: flex; justify-content: center; }
.kz-yn-pic .kz-pic img { inline-size: min(52vw, 220px); block-size: min(52vw, 220px); }
.kz-yn-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 14px;
  font-size: 1.3rem; font-weight: 700; text-align: center; }
.kz-yn-fix { flex-basis: 100%; color: var(--teal); }
.kz-yn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; inline-size: min(100%, 420px); margin-inline: auto; }
.kz-yn { display: flex; flex-direction: column; align-items: center; gap: 4px; min-block-size: 92px; font-size: 1.25rem; font-weight: 800; }
.kz-yn svg { inline-size: 36px; block-size: 36px; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* many:<n>:<key> pictures (Talk Town: There are three apples.) */
.kz-many { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 4%; place-items: center; inline-size: 100%; block-size: 100%; padding: 6%; box-sizing: border-box; }
.kz-many img { inline-size: 100%; block-size: auto; max-block-size: 100%; }
.kz-many.n1 { --cols: 1; } .kz-many.n3, .kz-many.n5, .kz-many.n6, .kz-many.n9 { --cols: 3; }
.kz-many.n7, .kz-many.n8, .kz-many.n10 { --cols: 4; }
.kzp-phrases { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; }
.kzp-phrases .kz-glyph { font-family: "Andika", system-ui; font-weight: 700; }

/* ---- arcade games (kids-arcade.js): Hungry Monster, Mole Pairs, Where's Kitty?, Little Shop, Word Magic ------------- */
.kz-meter { display: flex; justify-content: center; gap: 6px; margin-block-start: 10px; }
.kz-meter i { inline-size: 16px; block-size: 16px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--kz-sun-l); transition: background .25s, transform .25s; }
.kz-meter i.on { background: var(--kz-sun); box-shadow: 0 2px 0 var(--kz-sun-d); transform: scale(1.12); }
.kz-thing { display: grid; place-items: center; }
.kz-thing .kz-pic img { inline-size: clamp(54px, 15vw, 84px); block-size: clamp(54px, 15vw, 84px); }

/* Hungry Monster */
.kz-feed { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: center; max-inline-size: 760px; margin-inline: auto; }
@media (min-width: 720px) { .kz-feed { grid-template-columns: 1.1fr 1fr; } .kz-feed-side { order: 2; } }
.kz-feed-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kz-feed-bubble { display: flex; align-items: center; gap: 8px; min-block-size: 54px; padding: 8px 14px; border-radius: 18px; background: #fff;
  box-shadow: 0 3px 0 var(--kz-sun-l); }
.kz-feed-bubble .kz-printed { font-size: clamp(1.8rem, 8vw, 2.6rem); }
.kz-feed-free { font: 800 1.8rem/1 "Andika", system-ui; color: var(--kz-rose-d); }
.kz-mon { inline-size: clamp(140px, 42vw, 220px); aspect-ratio: 1; border-radius: 28px; cursor: pointer; outline-offset: 4px; }
.kz-mon svg { inline-size: 100%; block-size: 100%; overflow: visible; }
.kz-mon-body { fill: #6f5bd6; } .kz-mon-horn { fill: #ffb627; } .kz-mon-belly { fill: #a99cf0; }
.kz-mon-pupil { fill: #1d1a3a; } .kz-mon-lid { stroke: #1d1a3a; stroke-width: 3; stroke-linecap: round; opacity: 0; }
.kz-mon-mouth { fill: #3a1d4f; transform-origin: 60px 66px; transition: transform .2s; } .kz-mon-tooth { fill: #fff; }
.kz-mon.is-open .kz-mon-mouth, .kz-mon.is-over .kz-mon-mouth { transform: scaleY(1.45); }
.kz-mon.is-sleep .kz-mon-eyes { opacity: 0; } .kz-mon.is-sleep .kz-mon-lid { opacity: 1; } .kz-mon.is-sleep .kz-mon-mouth { transform: scale(.5, .3); }
.kz-mon.is-over { filter: drop-shadow(0 0 10px var(--kz-sun)); }
html:not([data-motion="0"]) .kz-mon.is-chomp svg { animation: kz-chomp .6s ease-in-out; }
html:not([data-motion="0"]) .kz-mon.is-sniff svg { animation: kz-wiggle .5s ease-in-out 2; }
@keyframes kz-chomp { 20% { transform: scale(1.08, .92); } 45% { transform: scale(.94, 1.06); } 70% { transform: scale(1.04, .96); } }
.kz-feed-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 12px; border-radius: 24px;
  background: color-mix(in srgb, var(--kz-sun-l) 55%, #fff); }
.kz-feed-item { inline-size: clamp(76px, 22vw, 104px); block-size: clamp(76px, 22vw, 104px); }
.kz-feed-item.is-eaten { visibility: hidden; }
.kz-feed-item.is-picked { outline: 4px solid var(--kz-sun); outline-offset: 2px; }

/* Mole Pairs */
.kz-whack-sign { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 auto 10px; padding: 8px 16px;
  inline-size: fit-content; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 #c9a97a; font-size: 1.5rem; }
.kz-whack-sign .kz-pic img { inline-size: 64px; block-size: 64px; }
.kz-whack-field { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 3vw, 18px); max-inline-size: 520px; margin-inline: auto;
  padding: 16px; border-radius: 28px; background: linear-gradient(#9fdc7c, #6fbf55); }
.kz-hole { position: relative; aspect-ratio: 1.15; border-radius: 50% / 40%; background: radial-gradient(ellipse at 50% 70%, #5a3b2a 55%, #7a5238 56%);
  overflow: hidden; }
.kz-mole { position: absolute; inset-inline: 10%; inset-block-end: -6%; block-size: 92%; padding: 0; border: 0; background: none;
  transform: translateY(105%); transition: transform .22s ease-out; cursor: pointer; }
.kz-mole svg { inline-size: 100%; block-size: 100%; }
.kz-mole.is-up { transform: translateY(0); }
.kz-mole.is-bonk { filter: brightness(1.2) drop-shadow(0 0 8px var(--kz-sun)); }
html[data-motion="0"] .kz-mole { transition: none; }
.kz-mole-tag { position: absolute; inset: 6% 18% auto; display: grid; place-items: center; padding: 2px; border-radius: 12px; background: #fffbe9; z-index: 2; font-size: 1.1rem; }
.kz-mole-tag .kz-pic img { inline-size: 40px; block-size: 40px; }
.kz-whack-model { position: fixed; inset: 30% 8% auto; z-index: 20; display: flex; justify-content: center; gap: 18px; padding: 16px; border-radius: 24px;
  background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.kz-whack-model > span { display: grid; place-items: center; gap: 4px; font-size: 1.4rem; }
.kz-whack-model .kz-pic img { inline-size: 80px; block-size: 80px; }
.kz-whack-field.is-done { filter: saturate(1.3); }

/* Where's Kitty? */
.kz-hide-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px; font-size: 1.25rem; font-weight: 700; }
.kz-hide-stage { position: relative; inline-size: min(100%, 620px); aspect-ratio: 48 / 32; margin-inline: auto; border-radius: 24px;
  background: linear-gradient(#fff7e8 0 74%, #f1dfc2 74%); overflow: hidden; }
.kz-hide-stage img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; pointer-events: none; }
.kz-hide-back { z-index: 1; } .kz-hide-front { z-index: 3; }
.kz-hide-thing.z-behind { z-index: 0; } .kz-hide-thing.z-between { z-index: 2; } .kz-hide-thing.z-over { z-index: 4; }
html:not([data-motion="0"]) .kz-hide-thing.is-pop { animation: kz-pop .45s cubic-bezier(.3,1.5,.6,1); }
@keyframes kz-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.kz-spot { position: absolute; z-index: 6; border: 0; border-radius: 18px; background: transparent; cursor: pointer; }
.kz-spot:focus-visible, .kz-spot.is-model { outline: 4px dashed var(--kz-rose); outline-offset: -4px; background: color-mix(in srgb, var(--kz-sun-l) 35%, transparent); }
.kz-spot.is-free { outline: 3px dashed rgb(14 149 140 / .6); outline: 3px dashed color-mix(in srgb, var(--kz-tq) 60%, transparent); outline-offset: -6px; }
.kz-spot.is-right { background: transparent; }
.kz-spot .kz-check { inset-block-start: 4px; inset-inline-end: 4px; }

/* Little Shop */
.kz-shop-top { display: flex; align-items: center; justify-content: center; gap: 10px; margin-block-end: 10px; }
.kz-shop-customer .kz-pic img { inline-size: clamp(72px, 20vw, 104px); block-size: clamp(72px, 20vw, 104px); }
.kz-shop-you { display: grid; place-items: center; inline-size: 84px; block-size: 84px; border-radius: 50%; background: var(--kz-tq-l); font: 800 2rem/1 "Andika", system-ui; }
html:not([data-motion="0"]) .kz-shop-customer.is-in { animation: kz-walk-in .5s ease-out; }
html:not([data-motion="0"]) .kz-shop-customer.is-out { transition: transform .6s ease-in, opacity .6s; transform: translateX(-120%); opacity: 0; }
@keyframes kz-walk-in { from { transform: translateX(-80%); opacity: 0; } }
.kz-shop-shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-inline-size: 460px; margin-inline: auto; padding: 12px;
  border-radius: 20px; background: linear-gradient(#f3c07b, #e19747); box-shadow: inset 0 -6px 0 #b46f2e; }
@media (min-width: 640px) { .kz-shop-shelf { grid-template-columns: repeat(6, 1fr); max-inline-size: 720px; } }
.kz-shop-item { aspect-ratio: 1; }
.kz-shop-till { display: flex; align-items: center; justify-content: center; gap: 12px; margin-block-start: 12px; }
.kz-shop-bag { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; min-inline-size: 180px; min-block-size: 84px;
  padding: 8px 12px; border-radius: 16px 16px 26px 26px; background: #fff; border: 3px dashed #d6b98c; }
.kz-shop-in { padding: 0; border: 0; background: none; cursor: pointer; }
.kz-shop-in .kz-pic img { inline-size: 48px; block-size: 48px; }
.kz-shop-bell { inline-size: 76px; block-size: 76px; border-radius: 50%; border: 0; background: var(--c); color: var(--t); box-shadow: 0 5px 0 var(--d); cursor: pointer; }
.kz-shop-bell svg { inline-size: 40px; block-size: 40px; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
html:not([data-motion="0"]) .kz-shop-bell.nudge { animation: kz-wiggle .9s ease-in-out infinite; }

/* Word Magic */
.kz-change-machine { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px; border-radius: 26px;
  background: linear-gradient(135deg, #e8e4ff, #fff3d6); max-inline-size: 520px; margin-inline: auto; }
.kz-change-pic { position: relative; display: grid; place-items: center; inline-size: clamp(110px, 32vw, 160px); aspect-ratio: 1; border-radius: 22px; background: #fff; }
.kz-change-pic .kz-pic img { inline-size: 80%; block-size: 80%; }
html:not([data-motion="0"]) .kz-change-pic.is-magic { animation: kz-pop .6s cubic-bezier(.3,1.5,.6,1); }
.kz-change-peek { position: absolute; inset: 8%; display: grid; place-items: center; border-radius: 18px; background: rgba(255,255,255,.92); }
.kz-change-peek .kz-pic img, .kz-change-peek svg { inline-size: 80%; block-size: 80%; }
.kz-change-goal { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kz-change-goal .kz-pic img { inline-size: 64px; block-size: 64px; opacity: .9; }
.kz-change-word { display: flex; justify-content: center; gap: 8px; margin: 14px 0; font-size: clamp(2.4rem, 11vw, 3.6rem); }
.kz-change-slot { min-inline-size: 1.2em; padding: 0 .12em; border-radius: 14px; background: #fff; box-shadow: 0 4px 0 #d9d2f5; text-align: center; }
.kz-change-slot.is-vowel { color: var(--kz-rose-d); }
.kz-change-slot.is-target { box-shadow: 0 0 0 4px var(--kz-sun), 0 4px 0 #d9d2f5; }
.kz-change-slot.is-over { background: var(--kz-sun-l); }
.kz-change-tray { display: flex; justify-content: center; gap: 12px; }
.kz-change-tile { inline-size: 76px; block-size: 76px; font-size: 2.2rem; }
.kz-spot::after { content: ""; position: absolute; inset-inline-start: 50%; inset-block-start: 50%; inline-size: 26px; block-size: 26px;
  margin: -13px 0 0 -13px; border-radius: 50%; background: radial-gradient(circle, #fff 0 30%, rgb(255 182 39 / .7) 32% 60%, transparent 62%);
  background: radial-gradient(circle, #fff 0 30%, color-mix(in srgb, var(--kz-sun) 70%, transparent) 32% 60%, transparent 62%);
  opacity: .9; pointer-events: none; }
html:not([data-motion="0"]) .kz-spot::after { animation: kz-twinkle 1.8s ease-in-out infinite; }
.kz-spot.is-right::after, .kz-spot.is-done::after { display: none; }
@keyframes kz-twinkle { 50% { transform: scale(1.25); opacity: .55; } }
.kz-talk-bubble .kz-speaker, .kz-hide-line .kz-speaker, .kz-feed-bubble .kz-speaker, .kz-whack-sign .kz-speaker,
.kz-change-goal .kz-speaker { inline-size: 52px; block-size: 52px; min-inline-size: 52px; }
.kz-talk-bubble .kz-speaker svg, .kz-hide-line .kz-speaker svg, .kz-feed-bubble .kz-speaker svg, .kz-whack-sign .kz-speaker svg,
.kz-change-goal .kz-speaker svg { inline-size: 26px; block-size: 26px; }
.kz-whack-field, .kz-feed, .kz-shop-shelf, .kz-change-machine, .kz-talk-opts { inline-size: min(100%, var(--w, 560px)); }
.kz-whack-field { --w: 520px; } .kz-feed { --w: 760px; } .kz-shop-shelf { --w: 460px; } .kz-change-machine { --w: 520px; }
@media (min-width: 640px) { .kz-shop-shelf { --w: 720px; } }
.kz-feed-cap { font-size: 1.2rem; font-weight: 700; }
.kz-shop-customer .kz-pic img { inline-size: clamp(88px, 26vw, 120px); block-size: clamp(88px, 26vw, 120px); }
.kz-yn.is-right { color: var(--ok); }
.kz-carrier { margin: 2px 0 0; font-family: "Andika", system-ui; font-size: 1.05rem; color: var(--ink-2); text-align: center; }

/* ---- Listen and Colour, Dress-up, Mystery Friend (kids-arcade.js games 6-8) ------------------------------------------ */
.kz-line { display: block; inline-size: 100%; block-size: 100%; }
.kz-line svg { display: block; inline-size: 100%; block-size: 100%; }
.kz-line [data-part="main"] { transition: fill .35s ease; }
.kz-colour-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; inline-size: min(100%, 460px); margin-inline: auto; }
.kz-colour-board.n6 { grid-template-columns: repeat(3, 1fr); inline-size: min(100%, 560px); }
.kz-colour-pic { aspect-ratio: 1; padding: 8%; border: 0; border-radius: 22px; background: #fff; box-shadow: 0 4px 0 #ecdcc0; cursor: pointer; }
.kz-colour-pic .kz-line { margin: auto; }
.kz-colour-pic.is-small .kz-line { inline-size: 58%; block-size: 58%; margin-block-start: 21%; }
.kz-colour-pic:focus-visible, .kz-paint:focus-visible, .kz-guess-card:focus-visible { outline: 4px solid var(--kz-tq); outline-offset: 3px; }
.kz-colour-pic.is-pop { transform: scale(1.06); transition: transform .2s; }
.kz-palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-block-start: 14px; }
.kz-paint { inline-size: 52px; block-size: 52px; padding: 0; border: 4px solid #fff; border-radius: 50%;
  box-shadow: 0 3px 0 rgb(0 0 0 / .18); cursor: pointer; }
.kz-paint i { display: block; inline-size: 34%; block-size: 22%; margin: 18% 0 0 24%; border-radius: 50%; background: rgb(255 255 255 / .45); }
.kz-paint.is-on { transform: scale(1.15); border-color: var(--kz-ind); }
.kz-paint.is-model { box-shadow: 0 0 0 5px var(--kz-sun); }
.kz-gallery { display: flex; justify-content: center; gap: 10px; margin-block-start: 12px; }
.kz-gallery-card { display: grid; grid-template-columns: repeat(2, 30px); gap: 2px; padding: 6px; border-radius: 12px; background: #fff;
  box-shadow: 0 3px 0 #ecdcc0; }
.kz-gallery-card .is-mini { inline-size: 30px; block-size: 30px; }
.kz-dress-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 14px; }
.kz-dress-figure { position: relative; inline-size: clamp(150px, 42vw, 220px); aspect-ratio: 2 / 3; border-radius: 24px;
  background: radial-gradient(circle at 50% 30%, #fff, #fdf1dc); box-shadow: inset 0 -8px 0 #f4dfbb; }
.kz-dress-figure > .kz-line { position: absolute; inset: 0; }
.kz-dress-layer.is-pop { animation: kz-dress-pop .35s ease-out; }
@keyframes kz-dress-pop { from { transform: translateY(-6%) scale(1.04); opacity: .4; } to { transform: none; opacity: 1; } }
.kz-dress-tray { display: grid; grid-template-columns: repeat(2, minmax(78px, 104px)); gap: 10px; align-content: start; }
.kz-dress-item { aspect-ratio: 1; padding: 12%; }
.kz-dress-item .kz-line { pointer-events: none; }
.kz-guess-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(84px, 22%), 1fr)); gap: 8px; inline-size: min(100%, 560px); margin: 10px auto 0; }
.kz-guess-grid.n4 { inline-size: min(100%, 480px); grid-template-columns: repeat(4, 1fr); }
.kz-guess-grid.n6 { inline-size: min(100%, 440px); grid-template-columns: repeat(3, 1fr); }
.kz-guess-clue { padding: 8px 14px; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 var(--kz-ind-l); inline-size: fit-content; margin-inline: auto; }
.kz-guess-clue[hidden] { display: none; }
.kz-guess-mag svg { inline-size: 28px; block-size: 28px; color: var(--kz-ind); }
.kz-guess-card { position: relative; aspect-ratio: 3 / 4; padding: 8%; perspective: 600px; }
.kz-guess-face, .kz-guess-back { position: absolute; inset: 6%; display: grid; place-items: center; border-radius: 16px;
  backface-visibility: hidden; transition: transform .35s ease; }
.kz-guess-face .kz-pic img { inline-size: 100%; block-size: auto; max-block-size: 100%; }
.kz-guess-back { transform: rotateY(180deg); background: repeating-linear-gradient(45deg, var(--kz-ind) 0 10px, var(--kz-ind-d) 10px 20px); }
.kz-guess-card.is-down .kz-guess-face { transform: rotateY(180deg); }
.kz-guess-card.is-down .kz-guess-back { transform: rotateY(360deg); }
.kz-guess-asks { margin-block: 6px; }
.kz-guess-yn { padding: 2px 12px; border-radius: 999px; color: #fff; }
.kz-guess-yn.is-yes { background: var(--ok); } .kz-guess-yn.is-no { background: var(--kz-ind); }
@media (prefers-reduced-motion: reduce) {
  .kz-guess-face, .kz-guess-back, .kz-line [data-part="main"] { transition: none; }
  .kz-dress-layer.is-pop { animation: none; }
}

/* ==========================================================================
   QA round 2026-11-14 (a hands-on pass at 360×740 and 390×844, child and parent)
   ========================================================================== */

/* ---- worksheets on a screen: the A4 page itself, whole ------------------------------------------------------------------
   A sheet is laid out at the paper's real width (210mm) on every screen and scaled to the window by --kzw-fit
   (static/js/kids-sheet-fit.js; 1 on a wide screen), so a phone shows the whole page at its true proportions instead of
   a clipped one (the unit and star sheets: their left part could not be reached) or a re-flowed one (the letter, match,
   chart and cards sheets). Two fingers enlarge it. Screen only: the print rules above and in kids-sheets.css, and the
   PDFs made from them, are untouched. 296mm = the 278mm sheet of the print rule plus the page's 10mm and 8mm margins. */
@media screen {
  .kzw-page main { overflow-x: auto; min-block-size: calc(100vh - 64px); }
  .kzw-sheet { inline-size: 210mm; max-inline-size: none; min-block-size: 296mm; zoom: var(--kzw-fit, 1); }
  .kzw-sheet .kzp-tpr { grid-template-columns: repeat(3, 1fr); }  /* the cards three across, as they print */
  .kzw-bar { gap: 10px 12px; }
  .kzw-bar > p { margin: 0; flex: 1 1 100%; }
  .kzw-bar .btn { min-block-size: 44px; }
}
.kzw-fit-note[hidden] { display: none; }

/* ---- pictures of Kino doing something (kids-core.js KZ.art, .is-kino) fill a tile like every other picture (m8) -------- */
.kz-tile .kz-pic.is-kino, .kz-memcard .front .kz-pic.is-kino { inline-size: calc(100% + 12px); margin: -6px; }  /* his box has air around him */
.kz-pic.is-kino .kz-kh { inline-size: 100%; }

/* ---- write the first sound: the meaning's line is kept before it shows (kids-trace.js), so nothing jumps ----------------- */
.kz-gloss.is-wait { visibility: hidden; }

/* ---- the end of a session: the gift is a button with room around its picture and its word ------------------------------- */
.kz-gift { padding: 12px 22px 14px; border-radius: 28px; outline-offset: 2px; }
.kz-gift .kz-glyph { line-height: 1.2; }

/* ---- Kino's corner on phones and small tablets (m3) -----------------------------------------------------------------------
   While a game is on the stage (kids-play.js: .is-game) Kino steps aside: fixed in his corner he stood on the color
   swatches, the feed tray, the shop's bell, the song's next arrow, bubbles and cards. He is back for the how-to line, for
   the praise after the game (.is-cheer: the game is over, nothing under him is tapped any more) and for the end. The
   room the stage kept free for him at its foot goes to the game. */
.kz-dock { transition: opacity 160ms var(--ease-std); }
@media (max-width: 899px), (max-height: 599px) {
  .kz-play.is-game:not(.is-cheer) .kz-dock { opacity: 0; visibility: hidden; }
  .kz-play.is-game .kz-stage { padding-block-end: 16px; }
}

/* ---- a game on one phone screen (m4) ----------------------------------------------------------------------------------------
   Phones in portrait (the app is portrait only). Touch targets stay 44px or more; pictures take their size from the
   screen's height where the width alone made them too tall. */
@media (max-width: 599px) {
  /* 4-6: the line above the game is for the grown-up beside the child (docs/KIDS.md §1): a grown-up's small print, so
     the game itself gets the room. 7-10 read their own short line at the full size. */
  body.kz-band-small .kz-hint { font-size: var(--fs-sm); line-height: 1.65; padding-block: 2px 6px; }
  /* the swatches of Listen and Color in rows of equal length: six on one row (they wrapped 5 + 1), eight as 4 + 4, ten
     as 5 + 5 (kids-arcade.js gives the palette its count) */
  .kz-palette { --paint: clamp(44px, calc((100vw - 64px) / 6), 52px); --per: 6; gap: 8px; margin-block-start: 0;
    max-inline-size: calc(var(--per) * var(--paint) + (var(--per) - 1) * 8px); }
  .kz-palette.n7, .kz-palette.n8 { --per: 4; }
  .kz-palette.n9, .kz-palette.n10 { --per: 5; }
  .kz-paint { flex: none; inline-size: var(--paint); block-size: var(--paint); }
  /* write the first sound: the word with its gap and its speaker on one row (the speaker wrapped under the word and
     pushed the board off the screen) */
  .kz-write-top { gap: 8px 12px; }
  .kz-write-top .kz-speaker { inline-size: 64px; block-size: 64px; }
  .kz-write-top .kz-speaker svg { inline-size: 32px; block-size: 32px; }
  .kz-write-top .kz-frame { gap: 10px; }
  .kz-write-top .kz-frame .kz-pic { inline-size: 76px; }
}
@media (max-width: 599px) and (max-height: 820px) {
  .kz-play.is-game .kz-stage { gap: 12px; }
  .kz-colour-board { inline-size: min(100%, 460px, 40vh); inline-size: min(100%, 460px, 40dvh); gap: 8px; }
  .kz-colour-board.n6 { inline-size: min(100%, 560px, 58vh); inline-size: min(100%, 560px, 58dvh); }
  .kz-guess-grid.n6 .kz-guess-card { aspect-ratio: 1 / 1.12; }
  .kz-guess-asks { gap: 8px; margin-block: 0; }
  .kz-talk-q { margin-block-end: 4px; }
  .kz-sky { block-size: min(54vh, 520px); block-size: min(54dvh, 520px); }
  .kz-shop-top { margin-block-end: 0; }
  .kz-shop-till { margin-block-start: 0; }
  .kz-meter { margin-block-start: 2px; }
  /* sing along: a long song scrolls inside its own card (the line being sung is kept in view by kids-games.js), so the
     play button and the next arrow stay on the screen */
  .kz-sing { gap: 10px; }
  .kz-sing .kz-lyrics { max-block-size: 40vh; max-block-size: 40dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
}

/* ---- 44px targets on the grown-ups' pages, and for the grown-ups' links on the children's (m6) ---------------------------- */
/* a link inside a line of text («بخش والدین» under the cartoons, «همه‌ی کاربرگ‌ها», the breadcrumb, the footer's app
   link): the line keeps its height; the link's own box grows above and below its words (the negative margin keeps the
   layout the same where the link is a flex item or an inline block) */
.kz-parent-line a, .kzp main a:not([class]), .kzp .crumbs a, :is(.kzp, .kzl) .foot-h a { padding-block: 12px; margin-block: -12px; }
/* the listen button of a letter, sound, word or phrase chip: a 44px button around the same 30px disc (the transparent
   border is part of the button, the negative margin keeps the chip's size) */
.kzp-play { box-sizing: border-box; inline-size: 44px; block-size: 44px; margin: -7px; border: 7px solid transparent; background-clip: padding-box; }
.kzp-play::after { content: none; }
.kzp-play.is-playing { outline: 0; box-shadow: inset 0 0 0 2px var(--kz-tq); }
.kzp-play:focus-visible { outline: 2px solid var(--indigo); outline-offset: -5px; }
/* small buttons, the ready-made nicknames and the theme switch of the account menu */
.kzp .btn-sm { min-block-size: 44px; }
.kzp-nick { display: inline-flex; align-items: center; min-block-size: 44px; }
.kzp-nick input, .kzp-avatar input { inset: -2px; }  /* the radio covers the pill, its border too */
.kzp .mini-seg button { inline-size: 44px; block-size: 44px; border-radius: 10px; }
.kzp .mini-seg button::before { content: none; }
.kzp .mini-seg { border-radius: 12px; }
