/* ==========================================================================
   Kids, the Apple layer (2026-10-15). Loaded right after kids.css and refines it through the cascade only: same
   class names, same tokens, no markup or JS contract changes. Direction: "Swift Playgrounds for a 5-year-old".
   - Playful colour and characters stay (Khatu, the glazed khatam tiles, the five glazes); the craft is Apple's.
   - One geometry: radii 16 / 24 / 32 and capsules; no white rims, no hard 3D ledges. Depth is a soft, warm shadow
     (--kza-e1/e2) and, on coloured controls, a gentle inner shade (--kza-lift) so they still feel like toys.
   - Calm ground: warm paper without the lattice; chrome is a translucent material (blur + saturate).
   - Touch: feedback on pointer-down (scale), spring release (--spring); targets stay 56-72px for children.
   - Child pages stay always-light on purpose (kids.css); parent pages and the landing follow the grown-up site.
   - Reduced motion: no scaling, a brightness dip instead; reduced transparency: solid bars; more contrast: borders.
   ========================================================================== */

/* ---- tokens ----------------------------------------------------------------------------------------------------- */
body.kz {
  --paper: #fbf7f1; --paper-2: #f2ebe0; --hair: #ece3d4;
  --kza-well: #f1e9dc;
  --kza-r-sm: 16px; --kza-r: 24px; --kza-r-lg: 32px;
  --kza-e1: 0 0 0 .5px rgb(70 50 20 / .06), 0 1px 2px rgb(70 50 20 / .06), 0 10px 24px -12px rgb(70 50 20 / .22);
  --kza-e2: 0 0 0 .5px rgb(70 50 20 / .06), 0 2px 6px rgb(70 50 20 / .06), 0 24px 48px -20px rgb(70 50 20 / .34);
  --kza-e3: 0 -1px 0 rgb(70 50 20 / .04), 0 -16px 48px -12px rgb(29 26 58 / .3);
  --kza-lift: inset 0 -4px 0 rgb(0 0 0 / .09), inset 0 2px 0 rgb(255 255 255 / .3),
    0 10px 22px -12px color-mix(in srgb, var(--d, #b9a98a) 80%, transparent);
  --kza-lift-press: inset 0 -2px 0 rgb(0 0 0 / .09), 0 4px 10px -6px color-mix(in srgb, var(--d, #b9a98a) 70%, transparent);
  --kza-spring: var(--spring, cubic-bezier(.2, .9, .3, 1));
  background: var(--paper);
}
html:has(body.kz) { background: #fbf7f1; }

/* tactile press, shared by every kid control: instant on pointer-down, spring on release */
:is(.kz-round, .kz-btn, .kz-chip, .kz-who-btn, .kz-today, .kz-extra, .kz-track, .kz-sess, .kz-bigplay, .kz-speaker, .kz-tile,
  .kz-mini, .kz-next, .kz-book, .kz-channel, .kz-help, .kz-ask-btn, .kz-drum, .kz-word-btn) {
  transition: transform 460ms var(--kza-spring), box-shadow 200ms var(--ease-std), background-color 200ms var(--ease-std),
    opacity 200ms var(--ease-std), filter 120ms;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; /* a long press must not select or open a menu */
}
/* pieces that are dragged (kids-core.js pickDrop) keep touch-action: none, or a finger pans the page instead, and follow the
   finger with no spring */
.kz-tile.kz-piece { touch-action: none; }
.kz-tile.is-dragging { transition: none; }
:is(.kz-round, .kz-btn, .kz-chip, .kz-who-btn, .kz-today, .kz-extra, .kz-track, .kz-sess, .kz-bigplay, .kz-speaker, .kz-tile,
  .kz-mini, .kz-next, .kz-book, .kz-channel, .kz-help, .kz-ask-btn, .kz-drum):active {
  transition-duration: 90ms; transition-timing-function: var(--ease-out);
}

/* ---- shell bar: a translucent material, content scrolls under it ------------------------------------------------- */
.kz-bar { padding-block: max(8px, var(--safe-t)) 8px; padding-inline: max(16px, var(--safe-r)) max(16px, var(--safe-l));
  background: rgb(251 247 241 / .72); background: color-mix(in srgb, var(--paper) 72%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 .5px 0 rgb(70 50 20 / .1); }
html[data-motion="0"] .kz-bar, html[data-motion="1"] .kz-bar { -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  background: color-mix(in srgb, var(--paper) 72%, transparent); }
.kz-night .kz-bar { box-shadow: none; }
/* scroll edge: the hairline appears only once content scrolls under the bar */
@supports (animation-timeline: scroll()) {
  body.kz:not(.kz-night) .kz-bar { box-shadow: 0 .5px 0 transparent; animation: kza-edge linear both; animation-timeline: scroll(root); animation-range: 0 32px; }
  @keyframes kza-edge { to { box-shadow: 0 .5px 0 rgb(70 50 20 / .12); } }
}

/* round icon buttons: solid glaze, no white rim, soft lift */
.kz-round { border: 0; box-shadow: var(--kza-lift); }
.kz-round:active { transform: scale(.9); box-shadow: var(--kza-lift-press); }
.kz-round .ic { stroke-width: 2.4; }
.kz-round.t-ghost, .kz-round:not([class*="t-"]) { --d: #d9ccb6; background: #fff; box-shadow: var(--kza-e1); }
/* the grown-up door: quiet, smaller, plainly not a toy */
.kz-round.kz-grown { inline-size: 44px; block-size: 44px; background: rgb(70 50 20 / .07); color: var(--ink-2); box-shadow: none; }
.kz-round.kz-grown:active { background: rgb(70 50 20 / .13); }
.kz-bar-start { gap: 10px; }
.kz-bar-start .kz-round[aria-current="page"] { outline: 0; box-shadow: var(--kza-lift), 0 0 0 3px var(--paper), 0 0 0 5.5px var(--kz-rose-d); }
.kz-me { gap: 10px; font-size: var(--fs-lg); font-weight: 800; }

/* ---- type ------------------------------------------------------------------------------------------------------ */
.kz-h1 { font-family: "Estedad", var(--f-body); font-weight: 800; font-size: clamp(1.625rem, 2.4vw + 1rem, 2.25rem); line-height: 1.35; text-wrap: balance; }
.kz-en.big { letter-spacing: -0.012em; line-height: 1.2; }
.kz-parent-line { font-size: 0.9375rem; line-height: 1.85; color: var(--ink-2); text-wrap: pretty; }
.kz-page { inline-size: min(100% - 32px, 960px); gap: 16px; padding-block: 16px 40px; }

/* ---- generic surfaces ------------------------------------------------------------------------------------------ */
.kz-btn { border: 0; min-block-size: 64px; padding-inline: 26px; gap: 10px; box-shadow: var(--kza-lift); }
.kz-btn:active { transform: scale(.95); box-shadow: var(--kza-lift-press); }
.kz-btn.t-ghost { background: #fff; box-shadow: var(--kza-e1); }
.kz-actions { gap: 12px; margin-block-start: 10px; }
.kz-chip { min-block-size: 44px; padding: 6px 16px 6px 12px; border: 0; background: #fff; box-shadow: var(--kza-e1); }
.kz-chip:active { transform: scale(.96); }

/* avatars, stickers and map tiles keep the glazed khatam star; the hard ledge becomes a shallow one plus a soft shadow */
:is(.kz-av, .kz-node-tile, .kz-sticker) .k-ledge { transform: translateY(-3px); }
:is(.kz-node-tile, .kz-sticker:not(.kz-scene .kz-sticker)) svg { filter: drop-shadow(0 8px 10px rgb(70 50 20 / .16)); }
.kz-av svg { filter: drop-shadow(0 4px 6px rgb(70 50 20 / .14)); }
.kz-mascot .m-shadow ellipse { fill: rgb(70 50 20 / .08); }

/* ---- who is playing ---------------------------------------------------------------------------------------------- */
.kz-who { padding-block-start: 24px; }
.kz-who-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-block-start: 12px; }
.kz-who-grid > .kz-who-btn { flex: 0 1 calc(50% - 8px); max-inline-size: 220px; }
@media (min-width: 700px) { .kz-who-grid > .kz-who-btn { flex-basis: calc(25% - 12px); } }
.kz-who-btn { border: 0; border-radius: var(--kza-r-lg); padding: 20px 10px 16px; gap: 8px; box-shadow: var(--kza-e1); }
.kz-who-btn:active { transform: scale(.95); box-shadow: var(--kza-e1); }
.kz-who-btn.is-last { box-shadow: 0 0 0 3px var(--kz-sun), var(--kza-e1); }

/* ---- map --------------------------------------------------------------------------------------------------------- */
.kz-map { gap: 18px; }
.kz-page.kz-map { inline-size: min(100% - 32px, 780px); }
.kz-hello-text { gap: 10px; }
.kz-today { gap: 16px; padding: 16px; border: 0; border-radius: var(--kza-r-lg); background: linear-gradient(160deg, #ffd873, #ffb627 70%);
  box-shadow: inset 0 -3px 0 rgb(160 100 0 / .1), inset 0 2px 0 rgb(255 255 255 / .4), 0 20px 36px -20px rgb(212 138 0 / .75); }
.kz-today:active { transform: scale(.97); box-shadow: inset 0 -2px 0 rgb(160 100 0 / .14), 0 8px 16px -10px rgb(212 138 0 / .6); }
.kz-today-pic { border-radius: 22px; box-shadow: 0 1px 2px rgb(70 50 20 / .08), 0 6px 14px -8px rgb(70 50 20 / .3); }
.kz-today-text small { font-size: var(--fs-sm); opacity: .9; }
.kz-play-ico { background: #1d1a3a; box-shadow: 0 8px 18px -8px rgb(29 26 58 / .6); }
.kz-today.is-rest { background: linear-gradient(160deg, #dcdeff, #b9c0ff 75%); box-shadow: inset 0 -4px 0 rgb(47 52 166 / .12), 0 20px 36px -20px rgb(74 80 216 / .6); }
.kz-today.is-check { background: linear-gradient(160deg, #d3f6f1, #93e2d8 75%); box-shadow: inset 0 -4px 0 rgb(8 102 95 / .12), 0 20px 36px -20px rgb(8 102 95 / .55); }
.kz-today.is-bridge { background: linear-gradient(160deg, #d3f4dc, #ade9e2 75%); box-shadow: inset 0 -4px 0 rgb(30 111 53 / .12), 0 20px 36px -20px rgb(30 111 53 / .5); }

.kz-extras { gap: 12px; }
.kz-extra { border: 0; border-radius: var(--kza-r); padding: 12px 14px; gap: 12px; min-block-size: 76px;
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--c) 18%, transparent), 0 12px 24px -16px color-mix(in srgb, var(--d) 70%, transparent); }
.kz-extra:active { transform: scale(.96); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--c) 22%, transparent); }
@media (max-width: 380px) {
  .kz-extra { flex-direction: column; align-items: flex-start; gap: 4px; }
  .kz-extra img { inline-size: 36px; block-size: 36px; }
}
.kz-badge.new { border: 0; box-shadow: 0 0 0 3px var(--paper); }

/* the three tracks: one segmented control in a warm well; the chosen one rises and gets its glaze as an underline */
.kz-tracks { gap: 4px; padding: 4px; border-radius: 28px; background: var(--kza-well); }
.kz-tracks .kz-track { position: relative; border: 0; border-radius: var(--kza-r); background: transparent; color: var(--ink); box-shadow: none; padding: 10px 6px 12px; min-block-size: 64px; }
.kz-tracks .kz-track:active { transform: scale(.95); }
.kz-tracks .kz-track.is-on { background: #fff; color: var(--ink); box-shadow: var(--kza-e1); }
.kz-tracks .kz-track.is-on small { color: var(--ink-2); }
.kz-tracks .kz-track.is-on::after { content: ""; position: absolute; inset-block-end: 5px; inset-inline: 36%; block-size: 4px; border-radius: 2px; background: var(--c); }
.kz-track small { color: var(--ink-2); }

.kz-badge { border-width: 2.5px; box-shadow: 0 2px 6px rgb(70 50 20 / .2); }

/* session sheet: a real bottom sheet with a grabber, a dimming scrim and a spring */
.kz-pop { padding: 28px 16px max(24px, var(--safe-b)); border-radius: var(--kza-r-lg) var(--kza-r-lg) 0 0; background: var(--paper); box-shadow: var(--kza-e3); }
.kz-pop::before { content: ""; position: absolute; inset-block-start: 8px; inset-inline: 0; margin-inline: auto; inline-size: 40px; block-size: 5px; border-radius: 3px; background: rgb(70 50 20 / .18); }
.kz-pop::backdrop { background: rgb(29 26 58 / .3); }
html:not([data-motion="0"]) .kz-pop:popover-open { animation: kza-sheet 520ms var(--kza-spring); }
@keyframes kza-sheet { from { transform: translateY(100%); } }
.kz-pop-head { font-family: "Estedad", var(--f-body); font-weight: 800; margin-block-end: 16px; }
.kz-pop-head .kz-round.sm { --d: #d9ccb6; background: rgb(70 50 20 / .07); color: var(--ink-2); box-shadow: none; }
.kz-sess-list { gap: 10px; }
.kz-sess { border: 0; border-radius: 20px; padding: 12px 14px; min-block-size: 76px; box-shadow: var(--kza-e1); }
.kz-sess:active { transform: scale(.97); box-shadow: var(--kza-e1); }
.kz-sess-num { border-radius: 16px; }
.kz-sess.is-next { box-shadow: 0 0 0 3px var(--kz-sun), var(--kza-e1); }
.kz-sess.is-locked { box-shadow: var(--kza-e1); }

/* ---- session player ---------------------------------------------------------------------------------------------- */
.kz-stars { gap: 4px; }
.kz-playbar { padding-inline: max(12px, var(--safe-r)) max(12px, var(--safe-l)); }
/* the player fills exactly the screen under the bar (56px buttons + 16px padding + the status bar inside the app). It was
   sized for an 80px bar, so in the app the page overflowed by ~25px and kids-play.js's scrollIntoView on the stage slid the
   instruction line (#kz-hint) half under the frosted bar. */
body.kz-play-page .kz-play { min-block-size: calc(100vh - 64px - max(8px, var(--safe-t)) - 24px); min-block-size: calc(100dvh - 64px - max(8px, var(--safe-t)) - 24px); }  /* 24px: body.kz main padding (kids.css) */
body.kz-play-page .kz-hint { scroll-margin-block-start: calc(72px + var(--safe-t)); }
.kz-dock { inset-block-end: max(8px, var(--safe-b)); }  /* the app's injected inset, same as env() on WebView 140+ */
.kz-stars svg { fill: #e7decf; stroke: none; }
.kz-stars li.now svg { fill: var(--kz-tq); transform: scale(1.2); }
.kz-hint { font-size: var(--fs-md); line-height: 1.7; padding: 4px 12px 8px; }
.kz-start { gap: 28px; }
.kz-start-title { letter-spacing: -0.015em; }
.kz-bigplay { border: 0; box-shadow: inset 0 -6px 0 rgb(160 100 0 / .16), inset 0 3px 0 rgb(255 255 255 / .4), 0 24px 44px -18px rgb(212 138 0 / .8); }
.kz-bigplay:active { transform: scale(.93); box-shadow: inset 0 -3px 0 rgb(160 100 0 / .16), 0 10px 20px -10px rgb(212 138 0 / .7); }
html:not([data-motion="0"]) .kz-bigplay { animation: kza-breathe 2.6s ease-in-out infinite; }
@keyframes kza-breathe { 50% { transform: scale(1.04); } }
/* a running animation would swallow the press: stop it while the finger is down */
html:not([data-motion="0"]) :is(.kz-bigplay, .kz-speaker, .kz-next, .kz-tile):active { animation: none; }
.kz-speaker { border: 0; --d: var(--kz-tq-d); box-shadow: var(--kza-lift); }
.kz-speaker:active { transform: scale(.92); box-shadow: var(--kza-lift-press); }
.kz-speaker.is-playing { --d: var(--kz-ind-d); box-shadow: var(--kza-lift); }

/* tiles: white or glazed cards with a soft lift; states keep their own rings (kids.css) */
.kz-tile { border-color: transparent; border-radius: 28px; background-image: linear-gradient(180deg, rgb(255 255 255 / .16), rgb(70 50 20 / .045));
  background-origin: border-box; box-shadow: 0 0 0 .5px rgb(70 50 20 / .05), 0 1px 2px rgb(70 50 20 / .06), 0 12px 24px -14px rgb(70 50 20 / .3); }
.kz-tile:active { transform: scale(.95); box-shadow: 0 0 0 .5px rgb(70 50 20 / .05), 0 4px 10px -6px rgb(70 50 20 / .25); }
.kz-tile:focus-visible { outline-offset: 4px; }
.kz-tile.is-right { --c: #e6f7ec; border-color: #2f9a4c; }
.kz-tile.is-model { box-shadow: 0 0 0 8px var(--kz-sun-l), 0 0 0 11px var(--kz-sun), 0 12px 24px -14px rgb(70 50 20 / .3); }
.kz-tile.is-said { box-shadow: 0 0 0 7px var(--kz-tq-l), 0 12px 24px -14px rgb(70 50 20 / .3); }
html:not([data-motion="0"]) .kz-tile.is-hint { animation-name: kza-glow; }
@keyframes kza-glow { 50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgb(255 182 39 / .32), 0 12px 24px -14px rgb(70 50 20 / .3); } }
.kz-opts { gap: 16px; }
body.kz-band-small .kz-tile { border-radius: 32px; }
body.kz-band-big .kz-tile { border-radius: 24px; }
.kz-check { border-width: 2.5px; box-shadow: 0 4px 10px -4px rgb(23 122 69 / .6); }

.kz-card { border: 0; border-radius: 36px; padding: 26px 18px; box-shadow: var(--kza-e2); }
.kz-mini { border: 0; border-radius: 20px; box-shadow: var(--kza-lift); }
.kz-mini:active { transform: scale(.95); box-shadow: var(--kza-lift-press); }
.kz-mini.t-ghost { background: #fff; box-shadow: var(--kza-e1); }
.kz-mini.is-playing { outline-offset: 2px; }
.kz-next { border: 0; --d: var(--kz-grn-d); box-shadow: var(--kza-lift); }
.kz-next:active { transform: scale(.92); box-shadow: var(--kza-lift-press); }
html:not([data-motion="0"]) .kz-next.nudge { animation: kza-nudge 1.6s ease-in-out infinite; }
@keyframes kza-nudge { 50% { transform: translateX(5px) scale(1.03); } }

.kz-target { border-color: #e2d6c1; border-style: dashed; box-shadow: none; background: #fffdf9; }
.kz-target.is-over { border-color: var(--kz-tq); background: var(--kz-tq-l); }
.kz-target.is-right { border-style: solid; border-color: #2f9a4c; }
.kz-target-chip { box-shadow: var(--kza-e1); }
.kz-popped i { border: 0; background: #e7decf; }
.kz-popped i.on { background: var(--kz-sun); }
.kz-sky { border-radius: var(--kza-r-lg); box-shadow: inset 0 0 0 .5px rgb(70 50 20 / .08); }

.kz-memcard > span { border: 0; border-radius: 22px; box-shadow: var(--kza-e1); }
.kz-memcard .back { background: linear-gradient(160deg, #5c62e8, #3d43c4); box-shadow: inset 0 -4px 0 rgb(0 0 0 / .12), 0 12px 24px -14px rgb(47 52 166 / .6); }
.kz-memcard .back svg { stroke: none; }
.kz-memcard.is-done .front { background: #e6f7ec; box-shadow: inset 0 0 0 3px #2f9a4c, var(--kza-e1); }

.kz-slot { border: 3px dashed #e2d6c1; border-radius: 22px; background: #fffdf9; }
.kz-slot.is-filled { border-color: transparent; background: #fff; box-shadow: var(--kza-e1); }
.kz-slot.is-next { border-color: var(--kz-tq); }

.kz-canvas { border-radius: var(--kza-r-lg); box-shadow: var(--kza-e1); }
.kz-canvas.is-done { box-shadow: inset 0 0 0 4px #b9ecc9, var(--kza-e1); }

.kz-lyrics, .kz-readcard, .kz-frame-word, .kz-rhyme-target .kz-pic, .kz-did li { box-shadow: var(--kza-e1); }
.kz-lyrics { border-radius: var(--kza-r-lg); padding: 16px; }
.kz-readcard { border-radius: var(--kza-r-lg); }
.kz-syl { border: 0; box-shadow: var(--kza-e1); }
.kz-syl.is-lit { box-shadow: inset 0 0 0 3px var(--kz-sun); }
.kz-help { border: 0; --d: var(--kz-tq); box-shadow: var(--kza-e1); }
.kz-help:active { transform: scale(.92); }
.kz-thumb { border: 0; box-shadow: inset 0 -4px 0 rgb(160 100 0 / .16), 0 10px 20px -10px rgb(212 138 0 / .7); }
.kz-track-bar { background: var(--kza-well); box-shadow: inset 0 1px 3px rgb(70 50 20 / .1); }
.kz-drum { border: 0; box-shadow: inset 0 -6px 0 color-mix(in srgb, var(--kz-rose-d) 30%, transparent), 0 18px 32px -16px rgb(172 47 85 / .55); }
.kz-drum:active { transform: scale(.94); }
.kz-beats i { box-shadow: inset 0 -3px 0 rgb(160 100 0 / .2); }

/* praise toast and the "Stop?" dialog: materials over the game */
.kz-praise { border-radius: 999px; padding: 12px 22px; background: color-mix(in srgb, #fff 84%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--kza-e2); }
html:not([data-motion="0"]) .kz-praise { transition: opacity 240ms var(--ease-std), transform 520ms var(--kza-spring); transform: translateY(12px) scale(.96); }
html:not([data-motion="0"]) .kz-praise.is-on { transform: none; }
.kz-ask { background: rgb(29 26 58 / .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.kz-ask-card { border-radius: 36px; padding: 28px 30px; background: var(--paper); box-shadow: var(--kza-e2); }
html:not([data-motion="0"]) .kz-ask-card { animation: kza-pop-in 460ms var(--kza-spring); }
@keyframes kza-pop-in { from { transform: scale(.9); opacity: 0; } }
.kz-ask-btn { border: 0; box-shadow: var(--kza-lift); }
.kz-ask-btn:active { transform: scale(.92); }

/* ---- stories ----------------------------------------------------------------------------------------------------- */
.kz-shelf-grid { gap: 16px; }
.kz-book { border: 0; border-radius: 28px; padding: 16px 12px 14px; gap: 6px; box-shadow: var(--kza-e1); }
.kz-book:active { transform: scale(.96); box-shadow: var(--kza-e1); }
.kz-book-cover { border-radius: 22px; }
.kz-book.is-later, .kz-book.is-locked { opacity: .7; box-shadow: none; background: rgb(255 255 255 / .6); }
.kz-story-page .kz-bar { gap: 10px; }
.kz-story { inline-size: min(100% - 32px, 820px); }
.kz-story-tools { gap: 8px; }
.kz-story-tools .kz-mini { min-block-size: 48px; border-radius: 999px; background: #fff; box-shadow: var(--kza-e1); }
.kz-story-tools .kz-mini.is-on { background: var(--kz-tq); color: #fff; --d: var(--kz-tq-d); box-shadow: var(--kza-lift); }
.kz-spage { border-radius: 36px; padding: 24px 16px 28px; box-shadow: var(--kza-e2); }
.kz-word-btn:active { transform: scale(.95); }
.kz-story-nav .kz-round.t-ghost { background: #fff; box-shadow: var(--kza-e1); }
.kz-story-dots { gap: 8px; align-items: center; }
.kz-story-dots li { inline-size: 8px; block-size: 8px; background: rgb(70 50 20 / .18); transition: inline-size 300ms var(--kza-spring), background-color 200ms; }
.kz-story-dots li.on { inline-size: 22px; border-radius: 4px; background: var(--kz-sun-d); transform: none; }

/* ---- reward, sticker book, enough, locked ------------------------------------------------------------------------ */
.kz-sticker .k-ledge { fill: #e8dcc6; stroke: #e8dcc6; }
.kz-sticker.big .k-ledge { fill: var(--kz-sun-d); stroke: var(--kz-sun-d); }
.kz-sticker.big svg { filter: drop-shadow(0 18px 24px rgb(212 138 0 / .3)); }
.kz-book-grid { padding: 20px; gap: 14px; border-radius: var(--kza-r-lg); background: var(--kza-well); box-shadow: inset 0 1px 3px rgb(70 50 20 / .08); }
.kz-times { box-shadow: 0 0 0 2.5px #fff; font-weight: 700; }
.kz-night .kz-round.kz-grown { background: rgb(255 255 255 / .14); color: #e1e3ff; }
body.kz.kz-night { background: linear-gradient(180deg, #252a6e 0%, #3c42bf 58%, #8a91e6 100%); }

/* ---- the parent gate (grown-ups): the site's form card ----------------------------------------------------------- */
.kz-gate { padding-block-start: 32px; }
.kz-gate-card { gap: 14px; padding: 28px 24px; border-radius: 28px; box-shadow: var(--kza-e2); }
.kz-gate-card h1 { font-family: "Estedad", var(--f-body); font-weight: 800; }
.kz-gate-q { border-radius: 16px; background: var(--kza-well); padding: 14px 16px; }

/* ---- radio (markup and JS untouched: CSS only) ------------------------------------------------------------------- */
.kz-channels { gap: 4px; padding: 4px; border-radius: 28px; background: var(--kza-well); }
.kz-channels .kz-channel { position: relative; border: 0; border-radius: var(--kza-r); background: transparent; color: var(--ink); box-shadow: none; padding: 8px 4px 12px; }
.kz-channels .kz-channel:active { transform: scale(.95); }
.kz-channels .kz-channel.is-on { background: #fff; color: var(--ink); box-shadow: var(--kza-e1); }
.kz-channels .kz-channel.is-on::after { content: ""; position: absolute; inset-block-end: 5px; inset-inline: 34%; block-size: 4px; border-radius: 2px; background: var(--c); }
.kz-onair { border-radius: 36px; padding: 16px 16px 24px; gap: 14px; box-shadow: var(--kza-e2); }
.kz-scene canvas { border-radius: 24px; box-shadow: inset 0 0 0 .5px rgb(70 50 20 / .1); }
.kz-eq { border-radius: 12px; }
.kz-live-chip { padding: 3px 12px; }
.kz-progress { block-size: 6px; background: var(--kza-well); }
.kz-radio-play { border: 0; }
.kz-volume { border: 0; min-block-size: 52px; padding-inline: 16px; background: #fff; box-shadow: var(--kza-e1); }
.kz-sleep .kz-mini { border-radius: 999px; }
.kz-sleep .kz-mini.t-ghost:not(.is-on) { background: #fff; box-shadow: var(--kza-e1); }
.kz-lyrics-box { border-radius: var(--kza-r-lg); }
.kz-next-box h2 { font-family: "Estedad", var(--f-body); font-weight: 800; font-size: var(--fs-lg); }
.kz-next-list { gap: 0; border-radius: var(--kza-r); background: #fff; box-shadow: var(--kza-e1); overflow: hidden; }
.kz-next-list li { border: 0; border-radius: 0; background: transparent; padding: 10px 16px; min-block-size: 60px; }
.kz-next-list li + li { box-shadow: inset 0 .5px 0 var(--hair); }
.kz-credit-list li { border: 0; border-radius: 20px; box-shadow: var(--kza-e1); }

/* ---- landing (site tokens, follows light/dark) -------------------------------------------------------------------- */
.kzl-float { border: 0; border-radius: var(--r-lg); box-shadow: var(--e2); }
.kzl-track { border-block-start: 0; }
.kzl-track img { inline-size: 44px; block-size: 44px; padding: 10px; box-sizing: content-box; border-radius: 18px;
  background: color-mix(in srgb, var(--c) 20%, transparent); }
.kzl-facts li { border: 0; border-radius: var(--r-lg); box-shadow: var(--e1); padding: 16px 18px; }
.kzl-facts b { letter-spacing: -0.01em; }

/* ---- parent area (grown-up Apple design, kids accents only where they carry meaning) ----------------------------- */
.kzp-kpis li { border: 0; border-radius: var(--r-lg); box-shadow: var(--e1); padding: 14px 16px; }
.kzp-add { border: 1.5px dashed color-mix(in srgb, var(--indigo) 35%, var(--hair)); background: transparent; box-shadow: none; }
.kzp-avatar, .kzp-nick { border: 0; background: var(--paper-2); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow var(--dur-2) var(--ease-std), background-color var(--dur-2) var(--ease-std); }
.kzp-avatar { border-radius: var(--r-lg); padding: 10px 4px 8px; }
.kzp-avatar:has(input:checked), .kzp-nick:has(input:checked) { box-shadow: inset 0 0 0 2px var(--indigo); background: color-mix(in srgb, var(--indigo) 10%, var(--card)); }
.kzp-letters li, .kzp-sounds li { border: 0; border-radius: var(--r-md); background: var(--paper-2); }
.kzp-letters li.met, .kzp-sounds li.met { border: 0; }
.kzp-sounds i { border: 0; box-shadow: 0 0 0 1.5px var(--card); }
.kzp-channel { border: 0; border-radius: var(--r-lg); background: var(--paper-2); padding: 12px 14px; }
.kzp-consent { border-radius: var(--r-lg); }
.kzp .notice { border-radius: var(--r-lg); }

/* ---- accessibility: motion, transparency, contrast ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .kz :is(.kz-round, .kz-btn, .kz-chip, .kz-who-btn, .kz-today, .kz-extra, .kz-track, .kz-sess, .kz-bigplay, .kz-speaker, .kz-tile,
    .kz-mini, .kz-next, .kz-book, .kz-channel, .kz-help, .kz-ask-btn, .kz-drum, .kz-word-btn):active,
  .kz .kz-node-btn:active .kz-node-tile { transform: none; filter: brightness(.93); }
  .kz .kz-praise { transform: none; }
}
html[data-motion="0"] .kz :is(.kz-round, .kz-btn, .kz-chip, .kz-who-btn, .kz-today, .kz-extra, .kz-track, .kz-sess, .kz-bigplay, .kz-speaker,
  .kz-tile, .kz-mini, .kz-next, .kz-book, .kz-channel, .kz-help, .kz-ask-btn, .kz-drum):active,
html[data-motion="0"] .kz .kz-node-btn:active .kz-node-tile { transform: none; filter: brightness(.93); }
@media (prefers-reduced-transparency: reduce) {
  .kz-bar, html[data-motion] .kz-bar, .kz-praise { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--paper); }
  .kz-praise { background: #fff; }
  .kz-ask { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(29 26 58 / .55); }
}
@media (prefers-contrast: more) {
  :is(.kz-who-btn, .kz-sess, .kz-book, .kz-card, .kz-spage, .kz-onair, .kz-gate-card, .kz-book-grid, .kz-lyrics, .kz-volume, .kz-next-list, .kz-chip,
    .kz-tile:not(.kz-target), .kz-memcard > span, .kz-canvas) { outline: 1.5px solid var(--line); outline-offset: -1.5px; }
  .kz-bar { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 1px 0 var(--line); }
  .kz-tracks, .kz-channels { box-shadow: inset 0 0 0 1.5px var(--line); }
}

/* ---- UI review 2026-10-21 (hands-on pass as parent and child, 390px and 1024-1280px) ------------------------------ */
/* kids pages are Persian only (core.middleware.UILanguageMiddleware): the site's فا/EN switch does nothing here */
:is(.kzp, .kzl) :is(.lang-pill-form, .lang-switch, .lang-switch-foot) { display: none; }
/* the page you are on (map, radio): a ring in the button's own glaze */
.kz-bar-start .kz-round[aria-current="page"] { box-shadow: var(--kza-lift), 0 0 0 3px var(--paper), 0 0 0 5.5px var(--d); }
/* while a game's how-to line plays, the stage shows a big "listening" speaker instead of an empty page (kids-play.js);
   a tap anywhere skips the line, as before. Not a button: it only shows that something is being said. */
.kz-listen { pointer-events: none; inline-size: 112px; block-size: 112px; }
.kz-listen svg { inline-size: 54px; block-size: 54px; }
html:not([data-motion="0"]) .kz-speaker.kz-listen { animation: kz-listen-in 240ms var(--ease-out) 200ms both, kz-pulse 0.9s ease-in-out 440ms infinite; }
@keyframes kz-listen-in { from { opacity: 0; transform: scale(.8); } }
/* "listen and do": Kino's action fills the tile (the arms and effects need the wide viewBox, so the figure was ~45% of it) */
.kz-tile.is-fig { padding: 2px; }
.kz-tile.is-fig .kz-pic { inline-size: 100%; }
.kz-tile.is-fig .kz-pic .kz-kh { inline-size: 100%; }
/* "enough for today" (indigo night): the sticker-book button stands off the background */
.kz-night .kz-btn.t-ind { --c: #fff; --t: var(--kz-ind-d); --d: #c9ccff; }
/* a book the child cannot open yet answers a tap with a small wiggle (kids-core.js), so the tap is not lost */
.kz-book.is-later { cursor: default; }
/* sticker book: empty dashed places show there is more to collect */
.kz-book-grid .kz-sticker.is-empty svg { filter: none; }
.kz-book-grid .kz-sticker.is-empty .k-face { fill: rgb(255 255 255 / .55); stroke: #d9cbb2; stroke-width: 3; stroke-dasharray: 7 6; }
/* parent pages: the child's name, its line and the report button wrap on a phone instead of squeezing */
.kzp .page-head.kzp-head { flex-wrap: wrap; }
.kzp .page-head.kzp-head > div { flex: 1 1 12rem; min-inline-size: 0; }
.kzp-act { margin-block: 10px; }
/* worksheets page: one row per worksheet with «دانلود» (PDF) and «چاپ», a lock when the plan does not open it */
.kzp-sheet-list { list-style: none; margin: 0; padding: 0; display: grid; }
.kzp-sheet-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding-block: 8px; }
.kzp-sheet-list .kzp-sheet-row + .kzp-sheet-row { border-block-start: 1px solid var(--hair); }
.kzp-sheet-btns { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kzp-sheet-btns .btn { min-block-size: 44px; }
.kzp-sheet-letters { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); margin-block-start: 6px; }
.kzp-sheet-letters a { display: flex; gap: 4px; align-items: center; justify-content: center; min-block-size: 48px; }
.kzp-sheet-letters a .ic { inline-size: 14px; block-size: 14px; color: var(--ink-2); }
.kzp-sheet-letters li.is-free { background: color-mix(in srgb, var(--kz-grn) 16%, var(--card)); }
.kzp-sheet-letters li.is-locked a { color: var(--ink-2); }
.kzp-free { display: inline-flex; align-items: center; min-block-size: 28px; padding: 2px 12px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--kz-grn) 16%, var(--card)); color: var(--ok); font-weight: 700; font-size: var(--fs-xs); }

/* ---- map: the «کارتون‌ها» card spans the row, with the three series posters fanned at its end (kids/cartoons.py) -- */
.kz-extra.kz-extra-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-block-size: 92px; overflow: hidden; }
.kz-extra-wide > span:not(.kz-extra-posters) { flex: 0 1 auto; min-inline-size: 0; }
.kz-extra-posters { position: relative; flex: none; inline-size: 180px; block-size: 72px; margin-inline: auto 4px; }
.kz-extra-posters img { position: absolute; inset-block-start: 6px; inline-size: 108px; block-size: 61px; border-radius: 10px; object-fit: cover;
  box-shadow: 0 0 0 2px #fff, 0 6px 14px -6px rgb(29 26 58 / .45); }
.kz-extra-posters img:nth-child(1) { inset-inline-end: 0; rotate: 4deg; z-index: 3; }
.kz-extra-posters img:nth-child(2) { inset-inline-end: 36px; rotate: -3deg; z-index: 2; }
.kz-extra-posters img:nth-child(3) { inset-inline-end: 72px; rotate: 3deg; z-index: 1; }
@media (max-width: 400px) { .kz-extra-posters { inline-size: 150px; } .kz-extra-posters img:nth-child(3) { inset-inline-end: 42px; } .kz-extra-posters img:nth-child(2) { inset-inline-end: 21px; } }
.kz-extra-wide .kz-badge.new { inset-inline-end: auto; inset-inline-start: 34px; inset-block-start: 6px; }
