/* Cartoon Club (js/toons.js). Own space palette scoped to .tn-*; layout and buttons still use the shared .btn / .ds-card. */
.tn-map, .tn-play, .tn-end, .tn-banner { --tn-bg: #0d1338; --tn-card: #18214f; --tn-ink: #f4f7ff; --tn-mute: #a9b6e6; --tn-teal: #19c6b7; --tn-pink: #ff4f9a; --tn-gold: #ffd23f; --tn-bad: #ff6b6b;
  max-width: 760px; margin: 0 auto; color: var(--tn-ink); }
.tn-map { background: radial-gradient(120% 90% at 80% 0, #26358a 0, var(--tn-bg) 60%); border-radius: 22px; padding: 20px 16px 28px; }
.tn-hero h1 { margin: 0 0 4px; font-size: 1.7rem; letter-spacing: .01em; }
.tn-hero p { margin: 0; color: var(--tn-mute); }
.tn-crew { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.tn-crew .tn-actor { width: 84px; }
.tn-unit { font-size: 1.1rem; margin: 20px 0 10px; color: var(--tn-ink); }
.tn-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tn-stop { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; background: var(--tn-card); border: 2px solid #2b3a85; border-radius: 16px; padding: 12px; }
.tn-stop.done { border-color: var(--tn-teal); }
.tn-stop.lock { opacity: .55; }
.tn-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--tn-pink), #7b3fe4); }
.tn-stop-t { display: grid; gap: 2px; min-width: 0; }
.tn-stop-t .muted { color: var(--tn-mute); }
.tn-stars { display: inline-flex; gap: 2px; margin: 0; font-size: 1.15rem; color: #44508f; }
.tn-stars .on { color: var(--tn-gold); }
.tn-due { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; background: var(--tn-card); color: var(--tn-ink); border: 2px dashed var(--tn-pink); }
.tn-soon { text-align: center; margin-top: 16px; color: var(--tn-mute); }

.tn-play { display: grid; gap: 10px; }
.tn-bar { display: flex; align-items: center; gap: 10px; }
.tn-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--tn-card); color: var(--tn-ink); font-size: 1rem; cursor: pointer; }
.tn-prog { flex: 1; height: 10px; border-radius: 6px; background: #26307a; overflow: hidden; }
.tn-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--tn-teal), var(--tn-gold)); transition: width .3s; }
.tn-sub-t { border: 2px solid #3a4aa5; background: transparent; color: var(--tn-mute); border-radius: 999px; padding: 6px 12px; cursor: pointer; font: inherit; font-size: .85rem; }
.tn-sub-t.on { background: var(--tn-teal); border-color: var(--tn-teal); color: #04141a; font-weight: 700; }
.tn-stage { position: relative; aspect-ratio: 16 / 8.5; border-radius: 18px; overflow: hidden; background: var(--tn-bg); }
.tn-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tn-cast { position: absolute; inset-inline: 4%; bottom: 0; display: flex; justify-content: space-around; align-items: flex-end; }
.tn-actor { width: min(24%, 120px); transform-origin: 50% 100%; animation: tn-bob 3.2s ease-in-out infinite; }
.tn-actor:nth-child(2) { animation-delay: -1s; } .tn-actor:nth-child(3) { animation-delay: -2s; }
.tn-actor svg { display: block; width: 100%; height: auto; }
.tn-actor .tn-eye { transform-box: fill-box; transform-origin: center; animation: tn-blink 4.5s infinite; }
.tn-actor .tn-mouth { transform-box: fill-box; transform-origin: center; }
.tn-actor.tn-talk { animation: tn-hop .9s ease-in-out infinite; }
.tn-actor.tn-talk .tn-mouth { animation: tn-talk .28s steps(2, end) infinite; }
.tn-actor.tn-talk .tn-ant { animation: tn-pulse .5s infinite alternate; }
.tn-core { animation: tn-pulse .9s infinite alternate; transform-box: fill-box; transform-origin: center; }
.tn-mini { width: 74px; animation: none; }
@keyframes tn-bob { 50% { transform: translateY(-3px); } }
@keyframes tn-hop { 50% { transform: translateY(-9px) scale(1.03); } }
@keyframes tn-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes tn-talk { 50% { transform: scaleY(.35); } }
@keyframes tn-pulse { to { opacity: .45; } }

.tn-below { display: grid; gap: 10px; }
.tn-chip { justify-self: start; background: #2a3680; color: var(--tn-mute); border-radius: 999px; padding: 4px 12px; font-size: .8rem; }
.tn-bubble { background: #fff; color: #10182f; border-radius: 18px; padding: 12px 16px; position: relative; box-shadow: 0 4px 0 #b9c4f2; }
.tn-bubble[data-who="kai"] { border-inline-start: 8px solid var(--tn-teal); }
.tn-bubble[data-who="rin"] { border-inline-start: 8px solid var(--tn-pink); }
.tn-bubble[data-who="bit"] { border-inline-start: 8px solid #ff9d2e; }
.tn-name { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: #4b5aa8; }
.tn-en { margin: 2px 0; font-size: 1.45rem; font-weight: 700; line-height: 1.35; }
.tn-tr { margin: 2px 0 0; color: #4b5578; font-size: 1rem; }
.tn-w { border-radius: 6px; padding: 0 2px; transition: background .12s; }
.tn-w.hot { background: #ffe9a1; }
.tn-target { border-bottom: 3px solid var(--tn-teal); cursor: pointer; }
.tn-hint { margin: 0; text-align: center; color: var(--tn-mute); }
.tn-act { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tn-go { min-width: 160px; font-size: 1.1rem; }
.tn-gap { display: inline-block; min-width: 3.2em; border-bottom: 4px dashed #7b3fe4; text-align: center; color: #1b8f86; }
.tn-gap.filled { border-bottom-style: solid; }
.tn-note { margin: 6px 0 0; font-weight: 700; }
.tn-note.good { color: #138a5c; } .tn-note.bad { color: #c2410c; }

.tn-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.tn-opt { background: var(--tn-card); color: var(--tn-ink); border: 3px solid #3a4aa5; border-radius: 16px; padding: 12px 8px; font: inherit; font-size: 1.2rem; font-weight: 700; cursor: pointer; min-height: 64px; display: grid; place-items: center; gap: 4px; }
.tn-opt:hover:not(:disabled) { border-color: var(--tn-gold); }
.tn-opt.yes { border-color: #2fd67b; background: #14513f; animation: tn-pop .35s; }
.tn-opt.no { border-color: var(--tn-bad); animation: tn-shake .4s; }
.tn-opt.hint { outline: 4px solid var(--tn-gold); outline-offset: 2px; }
.tn-opt:disabled:not(.yes) { opacity: .6; }
.tn-ico { font-size: 2.2rem; line-height: 1; }
.tn-olab { font-size: .95rem; color: var(--tn-mute); }
.tn-line { min-height: 56px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; border-radius: 14px; border: 3px dashed #3a4aa5; background: #101a47; }
.tn-line.no { border-color: var(--tn-bad); animation: tn-shake .4s; }
.tn-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tn-chipbtn, .tn-placed { background: var(--tn-gold); color: #241a00; border: 0; border-radius: 12px; padding: 10px 16px; font: inherit; font-size: 1.15rem; font-weight: 800; box-shadow: 0 4px 0 #b88a00; }
.tn-chipbtn { cursor: pointer; } .tn-chipbtn:disabled { opacity: .3; box-shadow: none; }
.tn-placed { background: var(--tn-teal); box-shadow: 0 4px 0 #0e8077; color: #04141a; }
@keyframes tn-pop { 50% { transform: scale(1.07); } }
@keyframes tn-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

.tn-end { background: var(--tn-card); border-radius: 22px; padding: 16px; display: grid; gap: 10px; text-align: center; }
.tn-end h2, .tn-end h3 { margin: 0; color: var(--tn-ink); }
.tn-end .tn-stars { justify-self: center; font-size: 2.4rem; }
.tn-wordlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.tn-wbtn { width: 100%; display: grid; place-items: center; gap: 2px; background: #101a47; border: 2px solid #3a4aa5; color: var(--tn-ink); border-radius: 14px; padding: 8px; font: inherit; cursor: pointer; }
.tn-spk { font-size: .95rem; opacity: .85; }

@media (max-width: 520px) { .tn-en { font-size: 1.25rem; } .tn-stop { grid-template-columns: 38px 1fr auto; } .tn-actor { width: 27%; } }
@media (prefers-reduced-motion: reduce) { .tn-actor, .tn-actor *, .tn-core, .tn-opt, .tn-line { animation: none !important; } .tn-prog i { transition: none; } }
html.pref-calm .tn-actor, html.pref-calm .tn-actor *, html.pref-calm .tn-core, html.pref-calm .tn-opt, html.pref-calm .tn-line { animation: none !important; } /* calm mode stops every club animation, like reduced motion */

/* the banner on the map: the stop point, the date and a true line for this child */
.tn-banner { max-width: 760px; margin: 12px auto 16px; padding: 18px 16px; border-radius: 20px; color: var(--tn-ink); border: 2px solid #3a4aa5;
  background: radial-gradient(120% 140% at 100% 0, rgba(255, 79, 154, .35) 0, transparent 55%), radial-gradient(120% 140% at 0 100%, rgba(25, 198, 183, .3) 0, transparent 55%), var(--tn-card); }
.tn-banner h2 { margin: 2px 0 4px; font-size: 1.5rem; }
.tn-date { margin: 0; color: var(--tn-gold); font-weight: 700; font-size: .9rem; }
.tn-praise { margin: 0 0 12px; font-size: 1.05rem; }
.tn-where { display: grid; gap: 2px; margin-bottom: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(13, 19, 56, .55); }
.tn-where b { font-size: 1.05rem; }
.tn-name { display: grid; gap: 6px; margin-top: 14px; }
.tn-name-row { display: flex; gap: 8px; min-width: 0; } /* lets the grid row shrink below the input's built-in width on phones */
.tn-name-row input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border-radius: 12px; border: 2px solid #3a4aa5; background: var(--tn-bg); color: var(--tn-ink); }
.tn-more { display: grid; gap: 6px; margin-top: 18px; background: var(--tn-card); color: var(--tn-ink); border: 2px solid #3a4aa5; }
.tn-more .muted { color: var(--tn-mute); }
.tn-vids .tn-vid { grid-column: 1 / -1; }
/* cartoon series: the tap-to-play episode box */
.tn-vid { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 16px; overflow: hidden; background: var(--tn-card); display: grid; place-items: center; }
.tn-vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tn-listen { justify-self: start; min-height: 44px; }

/* Kids home: the banner above already says hello and offers Continue, so the hero's second greeting is read by screen
   readers only (design audit 2026-10-21). The label on the name form sat dark blue on navy: it gets the muted light ink. */
html.kids .nv-hi > div:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tn-banner .tn-name label { color: var(--tn-mute); text-transform: none; letter-spacing: 0; font-size: .95rem; }
.tn-banner .tn-name > span { text-transform: none; letter-spacing: 0; } /* the hint under the name form is a sentence, not a label */
.tn-wordlist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35em; } /* the gloss never glues to the English word ("photoתמונה") */

/* Compact club page (docs/plan/2026-10-21-kids-club-compact.md): the page was 32 phone screens tall. */
.tn-stop { position: relative; }
.tn-stop:not(.lock) { cursor: pointer; } /* the whole open row is the tap target (js/toons.js forwards the tap to its button) */
.tn-stop .tn-num { width: 38px; height: 38px; }
.tn-packs { grid-template-columns: repeat(auto-fill, minmax(min(136px, calc(50% - 5px)), 1fr)); } /* two packs a row down to 360 px */
.tn-packs .tn-stop { grid-template-columns: 30px 1fr; gap: 8px; padding: 10px; align-items: start; }
.tn-packs .tn-stop .tn-num { width: 30px; height: 30px; font-size: .85rem; }
.tn-stop .tn-stars:not(:has(.on)) { display: none; } /* stars appear when earned: no row of empty stars */
.tn-packs .tn-stop .btn { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; } /* the whole tile is the button: invisible, still focusable and read aloud */
.tn-packs .tn-stop .btn::after { content: none; }
.tn-packs .tn-stop:has(.btn:focus-visible) { outline: 3px solid var(--tn-gold); outline-offset: 2px; }
.tn-packs .tn-stop:not(.lock)::after { content: '\25B6' / ''; position: absolute; inset-inline-end: 10px; inset-block-end: 8px; font-size: .8rem; color: var(--tn-gold); pointer-events: none; } /* a quiet "tap me" sign on the tile */
.tn-vids { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; }
.tn-vids .tn-stop { flex: 0 0 min(72vw, 250px); grid-template-columns: 38px 1fr; scroll-snap-align: start; align-content: space-between; } /* the Watch button sits at every card's foot */
.tn-vids .tn-stop .btn { grid-column: 1 / -1; }
.tn-vids .tn-stop:has(.tn-vid) { flex-basis: min(88vw, 520px); }
@media (max-width: 520px) {
  :is(.tn-units, .tn-extra) { grid-template-columns: 1fr 1fr; gap: 8px; }
  :is(.tn-units, .tn-extra) .tn-stop { grid-column: 1 / -1; }
  :is(.tn-units, .tn-extra) .tn-stop.lock { grid-column: auto; grid-template-columns: 28px 1fr; padding: 8px 10px; gap: 8px; align-items: start; }
  :is(.tn-units, .tn-extra) .tn-stop.lock .tn-num { width: 28px; height: 28px; font-size: .8rem; }
  :is(.tn-units, .tn-extra) .tn-stop.lock b { font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  :is(.tn-units, .tn-extra) .tn-stop.lock :is(.muted, .tn-stars) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* still read aloud */
  :is(.tn-units, .tn-extra) .tn-stop.lock .btn { display: none; }
}
@media (max-width: 374px) { .tn-packs .tn-stop { grid-template-columns: 1fr; align-content: start; } } /* icon above the title, so a title isn't one word per line */
/* tap-to-hear words in the speech bubble: a taller hit area without moving the text (design audit 3, finding 4) */
.tn-w { position: relative; }
.tn-w::after { content: ''; position: absolute; inset: -9px -3px; }
/* A0-A1 practice (docs/plan/2026-10-26-kids-practice-a0.md): listen and tap, match, sort. Tap only, no timer. */
.tn-say { text-align: center; font-size: 1.4rem; font-weight: 800; margin: 0 0 8px; }
.tn-match { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.tn-mcol { display: grid; gap: 10px; }
.tn-mw { min-height: 64px; }
.tn-mw.sel { outline: 4px solid var(--tn-ink); outline-offset: 2px; }
.tn-mw.yes, .tn-mw:disabled.yes { background: #2fd67b; color: #06301c; box-shadow: 0 4px 0 #1c8a4e; opacity: 1; }
.tn-sort { display: grid; gap: 14px; }
.tn-item { display: grid; justify-items: center; gap: 4px; background: var(--tn-card); color: var(--tn-ink); border-radius: 16px; padding: 14px; }
.tn-item .tn-ico { font-size: 3rem; }
.tn-item b { font-size: 1.4rem; }
.tn-bins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tn-bin { min-height: 96px; }
/* First steps (js/toons-first.js): the picture a question is about, big above the options; the spoken guide sits next to "Listen" */
.tn-big { margin: 0; text-align: center; font-size: 3.2rem; line-height: 1.2; letter-spacing: .08em; }
.tn-big svg { width: 1em; height: 1em; }
.tn-listen + .tn-guide { margin-inline-start: 8px; }
.tn-first .tn-num { font-size: 1.3rem; background: linear-gradient(135deg, #19c6b7, #3a7bd5); }
