/*
  Kids: "a picture book you can touch" (LD2 §3.3). Big pictures, big round buttons that press down, Nunito heavy and
  rounded, bright paper, stars everywhere. Loaded only on kids pages (_Styles), last, so it may dress the player and
  the sheet too. With teen.css, it was looks.css until LD2-0 split that file by look.
  LD2-G adds: Noor the cat guide (Looks/CatGuide.cs) in every pose; the home of islands (Views/Home/KidHome); the
  sticker book and the grown-ups' corner (Views/Kids); and the kids details of the lesson (Noor in the bar's corner,
  64 px targets, the dua screen a line at a time, the sticker at the end). Day and Lantern time (dark), right to left,
  a tablet and a 390 px phone; with less motion nothing moves and Noor only changes pose. No search box, no stats.
*/

/* Nunito Bold (SIL Open Font License 1.1), Latin only; Arabic and Urdu keep the Arabic faces. */
@font-face { font-family: "Learn Kids"; font-style: normal; font-weight: 700 900; font-display: swap; src: url(../fonts/nunito-latin.woff2) format("woff2"); }

/* ---------- Kids ---------- */
.ln--kid {
  --ln-display: "Learn Kids", var(--font-display, "Baloo 2"), "Trebuchet MS", "Learn Sans", system-ui, sans-serif;
  --ln-sans: "Learn Kids", var(--font-body, "Nunito"), "Learn Sans", system-ui, sans-serif;
  --ln-r: 26px;
  --ln-r-s: 18px;
  --ln-paper: #fff8ec;
  --ln-card: #ffffff;
  --k-ink: #1f2a44;
  --k-muted: #4f5a78;
  --k-sun: #ffb020;
  --k-sun-deep: #c76f00;
  --k-pink: #ff6fa5;
  --k-sky: #2b59c3;
  --k-cream: #fff3d6;
  --k-edge: #f1e3c4;
  font-size: 18px;
  font-family: var(--ln-sans);
  background: radial-gradient(circle at 8% 12%, rgba(255, 176, 32, .18) 0 60px, transparent 61px), radial-gradient(circle at 92% 30%, rgba(255, 111, 165, .14) 0 90px, transparent 91px), radial-gradient(circle at 70% 90%, rgba(90, 169, 255, .14) 0 120px, transparent 121px), var(--ln-paper);
}
html[data-theme="dark"] .ln--kid { --ln-paper: #121a33; --ln-card: #1c2648; --k-ink: #f6f1ff; --k-muted: #c3c9e6; --k-cream: #26315a; --k-edge: #0b1126; background: radial-gradient(circle at 10% 10%, rgba(255, 216, 77, .09), transparent 160px), var(--ln-paper); }
.ln--kid .ln-hero-title, .ln--kid .ln-world-title, .ln--kid .ln-page-title, .ln--kid .ln-course-title { font-weight: 800; letter-spacing: -.01em; }
.ln--kid .ln-hero-title { font-size: clamp(38px, 6vw, 70px); }
.ln--kid .ln-btn { min-height: 58px; border-radius: 22px; font-size: 18px; padding: 14px 26px; }
.ln--kid .ln-btn--primary { background: linear-gradient(180deg, #ffc23d, #ff9f1a); color: #2b2100; box-shadow: 0 6px 0 #d97a00, 0 14px 26px -10px rgba(217, 122, 0, .8); }
.ln--kid .ln-btn--primary:active { transform: translateY(4px); box-shadow: 0 2px 0 #d97a00; }
.ln--kid .ln-path-card { border-radius: 30px; box-shadow: 0 8px 0 rgba(43, 89, 195, .12), 0 20px 36px -20px rgba(43, 89, 195, .5); }
.ln--kid .ln-path-title { font-size: 28px; font-weight: 800; }
.ln--kid .ln-beads i { height: 12px; border-radius: 8px; }
.ln--kid .ln-beads i.is-done::after { background: #ffb020; }
.ln--kid .ln-opt { border-radius: 24px; padding: 20px; font-size: 20px; min-height: 64px; }
.ln--kid .ln-opts--pics { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ln--kid .ln-opt.has-pic img { background: #fff3d6; }
.ln--kid .ln-q { font-size: clamp(22px, 3vw, 30px); }
.ln--kid .ln-prose { font-size: 22px; line-height: 1.55; }
.ln--kid .ln-screen-title { font-size: clamp(28px, 4vw, 40px); font-weight: 900; }
.ln--kid .ln-read { background: #d2306a; font-size: 16px; }
.ln--kid .ln-read svg { fill: #fff; }
/* The kids' bucket numbers were pink on blue (LD2 §1.2): now dark on sunshine. */
.ln--kid .ln-stage-n { font-size: 20px; color: #3b2200; background: #ffd36b; letter-spacing: -2px; }
.ln--kid .ln-feedback.is-right b::before { content: "★ "; color: #ffb020; }
.ln--kid .ln-flash { min-height: 180px; }
.ln--kid .ln-flash-front { font-size: 24px; }
.ln--kid .ln-counter-n b { color: #ff6fa5; }
.ln--kid .ln-burst i { width: 14px; height: 14px; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ln--kid .ln-bar-star { fill: #ffb020; }
.ln--kid .ln-dip-paper { background: linear-gradient(160deg, #fffaf0, #ffe9bd); }

/* ---------- LD1: the new shells ---------- */
/* Kids: big, round and bright; stars on the map, stickers on the posters. */
.ln--kid .ln-path-card { min-height: 320px; }
.ln--kid .ln-path-emblem { width: 34px; height: 34px; border-radius: 12px; background: #ffb020; transform: rotate(-6deg); box-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.ln--kid .ln-path-emblem .ln-emblem { width: 20px; height: 20px; stroke: #2b2100; stroke-width: 2.2; }
.ln--kid .ln-feature, .ln--kid .ln-rail-card, .ln--kid .ln-pmap-panel, .ln--kid .ln-dash > section, .ln--kid .ln-stage { border-radius: 32px; }
.ln--kid .ln-feature-title { font-weight: 800; }
.ln--kid .ln-feature-go, .ln--kid .ln-search-go { background: linear-gradient(180deg, #ffc23d, #ff9f1a); color: #2b2100; box-shadow: 0 4px 0 #d97a00; }
.ln--kid .ln-stop-dot { width: 64px; height: 64px; font-size: 20px; }
.ln--kid .ln-stop.is-done .ln-stop-dot { background: #ffb020; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); border-radius: 0; box-shadow: none; }
.ln--kid .ln-stop.is-done .ln-stop-dot .ln-emblem { display: none; }
.ln--kid .ln-stop-label { font-size: 15px; border-radius: 14px; }
.ln--kid .ln-route-done { stroke: #ffb020; stroke-width: 7px; }
.ln--kid .ln-route-todo { stroke-width: 5px; stroke-dasharray: 1 14; }
.ln--kid .ln-stage-pin { width: auto; min-width: 58px; height: 46px; padding: 0 10px; border-radius: 23px; color: #ffb020; font-size: 18px; letter-spacing: -2px; }
.ln--kid .ln-me-tile b { font-family: var(--ln-display); font-weight: 800; }
.ln--kid .ln-bar-fill { background: linear-gradient(180deg, #ffd84d, #ffb020); border-radius: 10px 10px 0 0; }
.ln--kid .ln-screen-in { border-radius: 36px; }
.ln--kid .ln-player-nav { border-radius: 28px; }
.ln--kid .ln-player-nav .ln-btn { min-height: 64px; border-radius: 22px; }
.ln--kid .ln-trophy-shelf::after { background: linear-gradient(180deg, #ff9f1a, #d97a00); }

/* ---------- LD2-G: no grown-up clutter for children ---------- */
/* No search box (the islands and the sticker book are how a child finds things), no stats strip. */
.ln--kid .ln-find, .ln--kid .ln-search, .ln--kid .ln-filter-bar .ln-filter, .ln--kid .ln-stats { display: none; }
.ln--kid .ln-bar-link { font-size: 15px; font-weight: 800; }

/* ---------- Noor, the cat guide ---------- */
/* Every pose is in the one drawing; the cat's data-pose shows the parts of that pose. */
.ln-noor { display: block; width: 100%; height: auto; overflow: visible; }
.ln-noor .n-arms, .ln-noor .n-eyes, .ln-noor .n-mouth--open, .ln-noor .n-extra { display: none; }
.ln-noor[data-pose="sit"] .n-arms--sit, .ln-noor[data-pose="wave"] .n-arms--wave, .ln-noor[data-pose="point"] .n-arms--point,
.ln-noor[data-pose="think"] .n-arms--think, .ln-noor[data-pose="cheer"] .n-arms--cheer, .ln-noor[data-pose="sleep"] .n-arms--sleep { display: inline; }
.ln-noor[data-pose="sit"] .n-eyes--open, .ln-noor[data-pose="wave"] .n-eyes--open, .ln-noor[data-pose="point"] .n-eyes--open,
.ln-noor[data-pose="think"] .n-eyes--up, .ln-noor[data-pose="cheer"] .n-eyes--happy, .ln-noor[data-pose="sleep"] .n-eyes--closed { display: inline; }
.ln-noor[data-pose="cheer"] .n-mouth--smile { display: none; }
.ln-noor[data-pose="cheer"] .n-mouth--open { display: inline; }
.ln-noor[data-pose="think"] .n-extra--think, .ln-noor[data-pose="sleep"] .n-extra--sleep, .ln-noor[data-pose="cheer"] .n-extra--cheer { display: inline; }
.ln-noor .n-tail, .ln-noor .n-wave, .ln-noor .n-eyes--open, .ln-noor .n-mouth--open, .ln-noor .n-head { transform-box: fill-box; }
.ln-noor .n-tail { transform-origin: 0% 100%; }
.ln-noor .n-wave { transform-origin: 0% 100%; }
.ln-noor .n-eyes--open { transform-origin: 50% 50%; }
.ln-noor .n-head { transform-origin: 50% 100%; }
/* Speaking: the smile opens and closes. */
.is-talking .ln-noor .n-mouth--smile { display: none; }
.is-talking .ln-noor .n-mouth--open { display: inline; transform-origin: 50% 0%; }

@media (prefers-reduced-motion: no-preference) {
  .ln-noor .n-eyes--open { animation: noor-blink 5.5s 2s infinite; }
  .ln-noor[data-pose="wave"] .n-wave { animation: noor-wave 1.1s ease-in-out 3; }
  .ln-noor[data-pose="cheer"] .n-head { animation: noor-hop .5s var(--ip-ease-spring, cubic-bezier(.34, 1.56, .64, 1)) 2; }
  .ln-noor[data-pose="cheer"] .n-extra--cheer { animation: noor-sparkle .9s ease-out both; }
  .ln-noor[data-pose="sleep"] .n-extra--sleep { animation: noor-zz 2.6s ease-in-out infinite; }
  .is-talking .ln-noor .n-mouth--open { animation: noor-talk .28s ease-in-out infinite alternate; }
  .is-talking .ln-noor .n-tail { animation: noor-tail 1.6s ease-in-out infinite alternate; }
}
@keyframes noor-blink { 0%, 96%, 100% { transform: scaleY(1); } 98% { transform: scaleY(.12); } }
@keyframes noor-wave { 50% { transform: rotate(-16deg); } }
@keyframes noor-hop { 50% { transform: translateY(-6px); } }
@keyframes noor-sparkle { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes noor-zz { 50% { transform: translateY(-3px); opacity: .6; } }
@keyframes noor-talk { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
@keyframes noor-tail { from { transform: rotate(-5deg); } to { transform: rotate(7deg); } }

/* Noor with a speech bubble. */
.ln-guide { display: flex; align-items: flex-end; gap: 6px; color: var(--k-ink); }
.ln-guide-cat { flex: none; width: 128px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 30px; }
.ln-guide-cat:focus-visible { outline: 4px solid var(--k-sky); outline-offset: 4px; }
.ln-guide-say { position: relative; min-width: 0; padding: 16px 20px 14px; margin-block-end: 44px; border-radius: 28px; background: var(--ln-card); box-shadow: 0 6px 0 var(--k-edge), 0 18px 30px -22px rgba(31, 42, 68, .55); }
/* The bubble's tail points at Noor. */
.ln-guide-say::before { content: ""; position: absolute; inset-inline-start: -12px; bottom: 22px; border: 12px solid transparent; border-inline-end-color: var(--ln-card); border-inline-start: 0; }
.ln-guide-hi { display: block; font-size: 24px; font-weight: 900; line-height: 1.15; }
.ln-guide-words { margin: 2px 0 0; font-size: 21px; font-weight: 800; line-height: 1.3; }
.ln-guide-hear { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 6px; padding: 0 14px 0 10px; border: 0; border-radius: 22px; font: inherit; font-size: 16px; font-weight: 800; color: var(--k-sky); background: color-mix(in srgb, var(--k-sky) 10%, transparent); cursor: pointer; }
.ln-guide-hear svg { width: 22px; height: 22px; fill: currentColor; }
.ln-guide-hear:focus-visible { outline: 3px solid var(--k-sky); outline-offset: 2px; }
html[data-theme="dark"] .ln--kid .ln-guide-hear { color: #9fc0ff; background: rgba(159, 192, 255, .14); }
/* Waiting for the child's first touch before it may speak: Noor's speaker glows. */
.ln-guide.is-waiting .ln-guide-hear, .ln-noor-corner.is-waiting { box-shadow: 0 0 0 4px color-mix(in srgb, var(--k-sun) 55%, transparent); }

/* A small Noor in a page's corner (a path, a course, the quiz): the bubble shows while Noor speaks. */
.ln-guide--corner { position: fixed; z-index: 35; inset-inline-start: 14px; bottom: calc(14px + var(--ln-tabs-h, 0px) + env(safe-area-inset-bottom)); align-items: flex-end; pointer-events: none; }
.ln-guide--corner > * { pointer-events: auto; }
.ln-guide--corner .ln-guide-cat { width: 84px; padding: 6px; border-radius: 50%; background: var(--ln-card); box-shadow: 0 5px 0 var(--k-edge), 0 14px 26px -16px rgba(31, 42, 68, .6); }
.ln-guide--corner .ln-guide-say { max-width: min(300px, calc(100vw - 130px)); margin-block-end: 30px; padding: 12px 16px; opacity: 0; transform: translateY(8px) scale(.96); transform-origin: 0 100%; transition: opacity .2s, transform .3s var(--ip-ease-spring, ease-out); pointer-events: none; }
.ln-guide--corner.is-open .ln-guide-say, .ln-guide--corner.is-talking .ln-guide-say { opacity: 1; transform: none; }
.ln-guide--corner .ln-guide-words { font-size: 18px; }

/* ---------- The home: a sea of islands ---------- */
.kh { --sea-1: #9fdcff; --sea-2: #3fa9e8; --sea-3: #2a86cf; --sand: #f7d58b; --grass: #7ccf6a; --isle-shadow: rgba(16, 70, 130, .35);
  max-width: 1440px; margin: 0 auto; padding: 16px clamp(12px, 2.4vw, 28px) 40px; display: grid; gap: 18px; color: var(--k-ink); }
html[data-theme="dark"] .ln--kid .kh { --sea-1: #1d3f7a; --sea-2: #12306a; --sea-3: #0b1f4a; --sand: #d9b86e; --grass: #4f9a5b; --isle-shadow: rgba(0, 0, 0, .45); }
.ln-st-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* The deck: Noor and the one big Play. On a wide screen it sits at the sea's foot. */
.kh-deck { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.kh-noor { flex: 1 1 420px; min-width: 0; }
.kh-noor .ln-guide-say { max-width: 520px; }
.kh-who { min-height: 64px; padding: 0 24px; border: 0; border-radius: 24px; font: inherit; font-size: 19px; font-weight: 900; color: #fff; background: var(--k-sky); box-shadow: 0 6px 0 #173a8c; cursor: pointer; }
.kh-play { flex: 0 1 470px; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px; border-radius: 32px; color: var(--k-ink); background: var(--ln-card); box-shadow: 0 8px 0 #d6c39a, 0 24px 40px -20px rgba(0, 0, 0, .4); text-decoration: none; transition: transform .15s var(--ip-ease-out, ease-out), box-shadow .15s; }
html[data-theme="dark"] .ln--kid .kh-play { box-shadow: 0 8px 0 #0a0f22, 0 24px 40px -20px rgba(0, 0, 0, .7); }
.kh-play:hover { transform: translateY(-2px); }
.kh-play:active { transform: translateY(6px); box-shadow: 0 2px 0 #d6c39a; }
.kh-play:focus-visible { outline: 5px solid var(--k-sky); outline-offset: 4px; }
.kh-play-pic { display: grid; place-items: center; width: 150px; height: 112px; overflow: hidden; border-radius: 22px; background: var(--k-cream); }
.kh-play-pic img { width: 100%; height: 100%; object-fit: cover; }
.kh-play-pic .ln-emblem { width: 56px; height: 56px; stroke: var(--k-sun); }
.kh-play-words { display: grid; gap: 4px; min-width: 0; }
.kh-play-words small { font-size: 14px; font-weight: 800; color: var(--k-muted); letter-spacing: .02em; }
.kh-play-words b { font-size: 24px; font-weight: 900; line-height: 1.15; }
.kh-go { margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 10px; height: 64px; border-radius: 24px; font-size: 24px; font-weight: 900; color: #3b2200; background: linear-gradient(#ffbe3d, #ff9f0a); box-shadow: 0 6px 0 #c76f00; }
.kh-go svg { width: 26px; height: 26px; fill: currentColor; }
[dir="rtl"] .kh-go svg { transform: scaleX(-1); }
.kh-all-done { flex: 0 1 470px; margin: 0; padding: 18px 22px; border-radius: 28px; font-size: 20px; font-weight: 800; background: var(--ln-card); }

/* The sea */
.kh-sea { position: relative; isolation: isolate; overflow: hidden; border-radius: 40px; min-height: 560px;
  background: radial-gradient(ellipse at 50% -10%, var(--sea-1), transparent 60%), linear-gradient(var(--sea-1), var(--sea-2) 42%, var(--sea-3));
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .06), 0 14px 34px -24px rgba(16, 70, 130, .8); }
html[data-theme="dark"] .ln--kid .kh-sea {
  background: radial-gradient(circle at 7% 9%, rgba(255, 236, 170, .9) 0 22px, rgba(255, 236, 170, .18) 23px 60px, transparent 61px),
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 30% 9%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 55% 14%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 70% 26%, #fff 50%, transparent 51%),
    linear-gradient(var(--sea-1), var(--sea-2) 45%, var(--sea-3)); }
.kh-world { position: absolute; inset: 0; transition: transform .45s cubic-bezier(.55, 0, .8, .4), opacity .45s; }
.kh-sea.is-diving .kh-world { transform: scale(2.6); opacity: .2; }
.kh-waves { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, .42); stroke-width: 2.4px; stroke-linecap: round; }
.kh-waves path { vector-effect: non-scaling-stroke; }
.kh-route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: none; }
.kh-route path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.kh-route-todo { stroke: rgba(255, 255, 255, .85); stroke-width: 6px; stroke-dasharray: 1 16; }
.kh-route-done { stroke: #ffd36b; stroke-width: 7px; stroke-dasharray: 1 16; filter: drop-shadow(0 0 5px rgba(255, 211, 107, .8)); }
.kh-route--wide { display: block; }
[dir="rtl"] .kh-route { transform: scaleX(-1); }

/* The HUD: the star jar, the sticker book, sound and the grown-ups' corner. */
.kh-hud { position: absolute; z-index: 3; top: 14px; inset-inline-end: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.kh-jar, .kh-book { display: inline-flex; align-items: center; gap: 6px; height: 64px; padding: 0 16px 0 8px; border-radius: 22px; color: var(--k-ink); background: var(--ln-card); box-shadow: 0 5px 0 var(--k-edge); text-decoration: none; }
.kh-jar b, .kh-book b { font-size: 26px; font-weight: 900; }
.kh-hud-word { font-size: 15px; font-weight: 800; color: var(--k-muted); }
.kh-jar-art, .kh-book-art { width: 44px; height: 50px; }
.kh-jar-glass { fill: color-mix(in srgb, #9fdcff 30%, transparent); stroke: #6fb6e6; stroke-width: 3; }
.kh-jar-lid { fill: #c97b2a; }
.kh-jar-star { fill: #ffb020; stroke: #c76f00; stroke-width: 1.4; }
.kh-book-cover { fill: #ff6fa5; }
.kh-book-spine { fill: #d2306a; }
.kh-book-dot { fill: #ffd36b; }
.kh-book-line { stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.kh-book.is-new { box-shadow: 0 5px 0 var(--k-edge), 0 0 0 4px #ffd36b, 0 0 24px 4px rgba(255, 211, 107, .9); }
.kh-sound { display: grid; place-items: center; width: 64px; height: 64px; border: 0; border-radius: 22px; color: var(--k-ink); background: var(--ln-card); box-shadow: 0 5px 0 var(--k-edge); cursor: pointer; }
.kh-sound svg { width: 28px; height: 28px; fill: currentColor; }
.kh-sound .ln-sound-off, .kh-sound.is-on .ln-sound-on { display: inline; }
.kh-sound .ln-sound-on, .kh-sound.is-on .ln-sound-off { display: none; }
.kh-grown { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 16px; font-family: system-ui, sans-serif; font-size: 14px; font-weight: 700; color: #fff; background: rgba(15, 40, 90, .38); text-decoration: none; }
.kh-jar:focus-visible, .kh-book:focus-visible, .kh-sound:focus-visible, .kh-grown:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }

/* The islands, placed by the layout of the sea's size (wide, medium, tall). */
.kh-isles { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.kh-isle { --x: var(--wx); --y: var(--wy); position: absolute; inset-inline-start: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: clamp(150px, 12.6vw, 196px); transform: translate(-50%, -38%); }
[dir="rtl"] .kh-isle { transform: translate(50%, -38%); }
.ln-isle { position: relative; display: grid; justify-items: center; color: var(--k-ink); text-decoration: none; border-radius: 30px; transition: transform .2s var(--ip-ease-spring, ease-out); }
.ln-isle:hover { transform: translateY(-4px) scale(1.03); }
.ln-isle:focus-visible { outline: 5px solid #fff; outline-offset: 2px; }
.ln-isle-art { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .08)); }
.ln-isle-shadow { fill: var(--isle-shadow); }
.ln-isle-sand { fill: var(--sand); }
.ln-isle-grass { fill: var(--grass); }
.kh-isle-name { margin-top: -6px; max-width: 100%; padding: 4px 12px; border-radius: 16px; font-size: 16px; font-weight: 900; line-height: 1.15; text-align: center; background: var(--ln-card); box-shadow: 0 4px 0 rgba(16, 70, 130, .25); }
.kh-isle-stars { display: flex; gap: 4px; margin-top: 6px; }
.kh-isle-stars i { width: 13px; height: 13px; background: rgba(255, 255, 255, .55); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.kh-isle-stars i.half { background: linear-gradient(90deg, #ffd36b 50%, rgba(255, 255, 255, .55) 50%); }
.kh-isle-stars i.on { background: #ffd36b; }
.kh-isle.is-here .ln-isle-art { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 16px rgba(255, 255, 255, .9)); }
.kh-isle.is-here .kh-isle-name { background: var(--k-sun); color: #3b2200; }
.kh-boat { position: absolute; width: 38%; inset-inline-end: -16%; top: 44%; }
[dir="rtl"] .kh-boat { transform: scaleX(-1); }
.kh-boat-hull { fill: #ff6fa5; }
.kh-boat-rim { stroke: #fff; stroke-width: 4; }
.kh-boat-mast { fill: #8a5a2b; }
.kh-boat-sail { fill: #fff; }
.kh-boat-flag { fill: #ffb020; }
@media (prefers-reduced-motion: no-preference) { .kh-boat { animation: kh-bob 3.2s ease-in-out infinite; } }
@keyframes kh-bob { 50% { translate: 0 -5px; rotate: -2deg; } }
.kh-flag { position: absolute; width: 18%; top: -4%; inset-inline-start: 18%; }
.ln-isle.is-chosen { z-index: 2; }

/* Below the sea: the stars of the week, the newest stickers. */
.kh-below { display: grid; grid-template-columns: 1fr 1.25fr; gap: 18px; }
.kh-panel { padding: 18px 22px 20px; border-radius: 32px; background: var(--ln-card); box-shadow: 0 6px 0 var(--k-edge); }
.kh-panel h2 { margin: 0 0 12px; font-size: 24px; font-weight: 900; }
.kh-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; text-align: center; }
.kh-days li { padding: 10px 0 8px; border-radius: 18px; font-size: 14px; font-weight: 800; color: var(--k-muted); background: var(--k-cream); }
.kh-days li b { display: block; font-size: 28px; line-height: 1; color: var(--k-muted); }
.kh-days li.on b { color: var(--k-sun); text-shadow: 0 2px 0 var(--k-sun-deep); }
.kh-days li.today { box-shadow: inset 0 0 0 3px var(--k-sun); }
.kh-stickers { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.kh-sticker { display: block; border-radius: 50%; }
.kh-sticker:focus-visible { outline: 4px solid var(--k-sky); outline-offset: 3px; }
.kh-stickers li:nth-child(odd) .ln-sticker { rotate: -6deg; }
.kh-stickers li:nth-child(even) .ln-sticker { rotate: 5deg; }
.kh-none { margin: 0 0 10px; font-size: 18px; font-weight: 800; color: var(--k-muted); }
.kh-open-book { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-size: 18px; font-weight: 900; color: var(--k-sky); text-decoration: none; }
html[data-theme="dark"] .ln--kid .kh-open-book { color: #9fc0ff; }

/* ---------- Stickers ---------- */
.ln-sticker { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 0 rgba(31, 42, 68, .16)) drop-shadow(0 6px 10px rgba(31, 42, 68, .14)); }
.ln-sticker.is-empty { filter: none; opacity: .35; }
.ln-sticker.is-empty use { filter: grayscale(1); opacity: .45; }
.ln-sticker.is-empty circle:first-child { fill: none; stroke: var(--k-muted); stroke-width: 2.5; stroke-dasharray: 3 5; }

.ks { max-width: 1240px; margin: 0 auto; padding: 18px clamp(12px, 2.4vw, 28px) 44px; color: var(--k-ink); }
.ks-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.ks-title h1 { margin: 0; font-size: clamp(32px, 4.6vw, 48px); font-weight: 900; line-height: 1.05; }
.ks-count { margin: 6px 0 0; font-size: 18px; font-weight: 800; color: var(--k-muted); }
.ks-count b { font-size: 30px; color: var(--k-sun-deep); }
html[data-theme="dark"] .ln--kid .ks-count b { color: var(--k-sun); }
.ks-noor { flex: 1 1 420px; justify-content: flex-end; }
.ks-noor .ln-guide-cat { width: 108px; }
.ks-keep { flex-basis: 100%; margin: 0; font-size: 17px; font-weight: 800; color: var(--k-muted); }
/* The book: a cover of the island tabs, then the open page. */
.ks-book { border-radius: 36px; padding: 16px; background: linear-gradient(90deg, #ff6fa5 0 14px, transparent 14px), var(--k-cream); box-shadow: 0 8px 0 var(--k-edge), inset 0 0 0 3px color-mix(in srgb, #ff6fa5 30%, transparent); }
[dir="rtl"] .ks-book { background: linear-gradient(270deg, #ff6fa5 0 14px, transparent 14px), var(--k-cream); }
.ks-tabs { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 4px 14px 20px; }
.ks-tabs[hidden] { display: none; }
.ks-tab { flex: none; display: grid; justify-items: center; gap: 4px; width: 112px; min-height: 64px; padding: 10px 6px 8px; border: 0; border-radius: 24px; font: inherit; color: var(--k-ink); background: var(--ln-card); box-shadow: 0 4px 0 var(--k-edge); cursor: pointer; }
.ks-tab[aria-selected="true"] { background: var(--k-sun); color: #3b2200; box-shadow: 0 4px 0 var(--k-sun-deep); }
.ks-tab:focus-visible { outline: 4px solid var(--k-sky); outline-offset: 2px; }
.ks-tab-art { width: 44px; }
.ks-tab-name { font-size: 13px; font-weight: 900; line-height: 1.15; text-align: center; }
.ks-tab-n { font-size: 12px; font-weight: 800; opacity: .8; }
.ks-page { padding: 8px 8px 8px 24px; border-radius: 26px; }
[dir="rtl"] .ks-page { padding: 8px 24px 8px 8px; }
.ks-page[hidden] { display: none; }
.ks-page + .ks-page { margin-top: 18px; }
.ks.is-tabbed .ks-page + .ks-page { margin-top: 0; }
.ks-page-title { margin: 6px 0 10px; font-size: 28px; font-weight: 900; }
.ks-page-title small { font-size: 18px; color: var(--k-muted); }
.ks-course { padding: 12px 0 14px; border-top: 3px dashed color-mix(in srgb, var(--k-muted) 25%, transparent); }
.ks-course h3 { margin: 0 0 10px; font-size: 18px; font-weight: 900; }
.ks-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 12px; }
.ks-st { display: block; border-radius: 50%; }
a.ks-st { transition: transform .2s var(--ip-ease-spring, ease-out); }
a.ks-st:hover { transform: scale(1.08) rotate(-4deg); }
a.ks-st:focus-visible { outline: 4px solid var(--k-sky); outline-offset: 3px; }
.ks-slots li:nth-child(3n) a.ks-st .ln-sticker { rotate: 6deg; }
.ks-slots li:nth-child(3n+1) a.ks-st .ln-sticker { rotate: -5deg; }
@media (prefers-reduced-motion: no-preference) {
  .ks-st.is-new .ln-sticker { animation: ks-land .7s var(--ip-ease-spring, ease-out) both; }
}
.ks-st.is-new { box-shadow: 0 0 0 4px #ffd36b, 0 0 22px rgba(255, 211, 107, .9); }
@keyframes ks-land { from { transform: scale(1.8) rotate(-30deg); opacity: 0; } }

/* ---------- The grown-ups' corner ---------- */
.kg { max-width: 1180px; margin: 0 auto; padding: 18px clamp(12px, 2.4vw, 28px) 48px; color: var(--k-ink); }
.kg-gate { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 40px; padding: 28px; border-radius: 36px; background: var(--ln-card); box-shadow: 0 8px 0 var(--k-edge); }
.kg-gate-in { display: grid; gap: 12px; justify-items: center; text-align: center; max-width: 440px; }
.kg-gate-in h1 { margin: 0; font-size: clamp(32px, 4.4vw, 44px); font-weight: 900; }
.kg-gate-in p { margin: 0; font-family: system-ui, sans-serif; font-size: 17px; font-weight: 500; color: var(--k-muted); }
.kg-noor { flex: 0 1 460px; }
.kg-noor .ln-guide-cat { width: 112px; }
.kg-hold { position: relative; display: grid; place-items: center; width: 132px; height: 132px; border: 0; border-radius: 50%; font: inherit; color: #fff; background: var(--k-sky); box-shadow: 0 7px 0 #173a8c; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.kg-hold:focus-visible { outline: 5px solid var(--k-sun); outline-offset: 4px; }
.kg-hold.is-holding { transform: translateY(5px); box-shadow: 0 2px 0 #173a8c; }
.kg-hold-ring { position: absolute; inset: -10px; width: calc(100% + 20px); max-width: none; height: calc(100% + 20px); transform: rotate(-90deg); }
[dir="rtl"] .kg-hold-ring { transform: rotate(-90deg) scaleY(-1); }
.kg-hold-track, .kg-hold-fill { fill: none; stroke-width: 5; }
.kg-hold-track { stroke: color-mix(in srgb, var(--k-sky) 22%, transparent); }
.kg-hold-fill { stroke: var(--k-sun); stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .2s; }
.kg-hold.is-holding .kg-hold-fill { stroke-dasharray: 100 100; transition: stroke-dasharray var(--hold, 3s) linear; }
.kg-hold.is-done .kg-hold-fill { stroke-dasharray: 100 100; }
.kg-hold-word { font-size: 26px; font-weight: 900; }
.kg-gate.is-open { padding: 14px 24px; }
.kg-gate.is-open .kg-noor, .kg-gate.is-open .kg-hold, .kg-gate.is-open #kg-hold-help { display: none; }
.kg-report { margin-top: 20px; display: grid; gap: 22px; }
.kg-report[hidden] { display: none; }
.ln .kg-report:focus, .ln .kg-report:focus-visible { outline: none; box-shadow: none; }
.kg-empty { padding: 20px; border-radius: 24px; background: var(--ln-card); font-size: 18px; }
/* The report is for grown-ups: the calmer system face for reading, Nunito for the headings. */
.kg-child { padding: 22px; border-radius: 34px; background: var(--ln-card); box-shadow: 0 8px 0 var(--k-edge); font-family: system-ui, sans-serif; }
.kg-child h3, .kg-child h4, .kg-facts b { font-family: var(--ln-display); }
.kg-child-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.kg-ava { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 20px; font-family: var(--ln-display); font-size: 26px; font-weight: 900; color: #3b2200; background: linear-gradient(135deg, #ffd36b, #ffb020); box-shadow: 0 4px 0 #d18a00; }
.kg-child-head h3 { margin: 0; font-size: 28px; font-weight: 900; }
.kg-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; margin-inline-start: auto; padding: 0; }
.kg-facts li { padding: 8px 14px; border-radius: 16px; font-size: 15px; color: var(--k-muted); background: var(--k-cream); }
.kg-facts b { font-size: 22px; color: var(--k-ink); }
.kg-stickers { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.kg-stickers li { width: 52px; }
.kg-stickers svg { display: block; width: 100%; height: auto; }
.kg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 18px; }
.kg-box { padding: 16px 18px; border-radius: 24px; background: color-mix(in srgb, var(--k-cream) 70%, var(--ln-card)); }
.kg-box h4 { margin: 0 0 10px; font-size: 20px; font-weight: 900; }
.kg-box ol, .kg-box ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 10px; font-size: 16px; line-height: 1.45; }
.kg-box small { color: var(--k-muted); }
.kg-box li p { margin: 2px 0 0; }
.kg-quiet { margin: 0; color: var(--k-muted); }
.kg-talk { grid-column: 1 / -1; }
.kg-cards { list-style: none; padding: 0 !important; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.kg-card { padding: 14px 16px; border-radius: 20px; background: var(--ln-card); box-shadow: 0 4px 0 var(--k-edge); }
.kg-ask { margin: 0; font-size: 17px; font-weight: 700; }
.kg-listen { margin: 8px 0 0; font-size: 15px; color: var(--k-muted); }
.kg-listen span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--k-sky); }
html[data-theme="dark"] .ln--kid .kg-listen span { color: #9fc0ff; }
.kg-tricky li span { display: block; color: var(--k-muted); }
.kg-tricky li small { display: block; }

/* ---------- Lessons ---------- */
/* Noor in the bar's corner, peeking over its edge (out of the bar's own grid). */
.ln--kid .ln-player-bar { position: sticky; }
.ln--kid .ln-noor-corner { position: absolute; z-index: 2; top: calc(100% + 8px); inset-inline-end: 10px; width: 76px; height: 76px; padding: 6px; border: 0; border-radius: 50%; background: var(--ln-card); box-shadow: 0 4px 0 var(--k-edge), 0 12px 22px -14px rgba(31, 42, 68, .6); cursor: pointer; }
.ln--kid .ln-noor-corner:focus-visible { outline: 4px solid var(--k-sky); outline-offset: 3px; }
/* Every target a finger can find: 64 px at least. */
.ln--kid .ln-player-close, .ln--kid .ln-read, .ln--kid .ln-sound { min-width: 48px; min-height: 48px; }
.ln--kid .ln-screen .ln-btn, .ln--kid .ln-screen button.ln-opt, .ln--kid .ln-tf button { min-height: 64px; }
/* In the sheet, Noor instead of the plain mark. */
.ln--kid .ln-sheet-icon:has(.ln-noor--sheet) { width: 76px; height: 76px; background: none; box-shadow: none; }
.ln--kid .ln-sheet-icon:has(.ln-noor--sheet) .ln-sheet-mark { display: none; }
.ln--kid .ln-sheet-in:has(.ln-noor--sheet) { grid-template-columns: 76px minmax(0, 1fr) auto; }
.ln-noor--sheet { width: 76px; }

/* The dua screen: the first line large, "Hear it", the rest behind "Show all". */
.ln--kid .ln-dua--kid .ln-dua-ar { font-size: clamp(32px, 5vw, 46px); line-height: 1.9; }
.ln--kid .ln-dua--kid:not(.is-all) .ln-dua-ar { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; }
.ln--kid .ln-dua--kid:not(.is-all) .ln-dua-en { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 20px; }
.ln--kid .ln-dua--kid:not(.is-all) .ln-dua-tr, .ln--kid .ln-dua--kid:not(.is-all) .ln-dua-repeat, .ln--kid .ln-dua--kid:not(.is-all) [data-dua-practise], .ln--kid .ln-dua--kid:not(.is-all) .ln-ref { display: none; }
.ln--kid .ln-dua.ln-dua--kid .ln-btn.ln-dua-hear { min-height: 64px; padding: 0 28px; font-size: 22px; font-weight: 900; color: #3b2200; background: linear-gradient(180deg, #ffc23d, #ff9f1a); box-shadow: 0 6px 0 #d97a00; }
.ln--kid .ln-dua--kid .ln-dua-more { min-height: 64px; }

/* The lesson's end: the sticker lands and Noor cheers. */
.ln-kid-prize { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin: 0 auto 16px; }
.ln-kid-sticker { width: 112px; height: 112px; filter: drop-shadow(0 6px 10px rgba(31, 42, 68, .25)); rotate: -6deg; }
.ln-kid-prize.is-guest .ln-kid-sticker { opacity: .55; }
.ln-guide--prize { align-items: center; }
.ln-guide--prize .ln-guide-cat { width: 96px; }
.ln-guide--prize .ln-guide-say { margin-block-end: 0; }
@media (prefers-reduced-motion: no-preference) {
  .ln-kid-sticker { animation: ks-land .8s .2s var(--ip-ease-spring, ease-out) both; }
}

/* ---------- A tablet: three rows of islands, Noor and Play above the sea ---------- */
@media (max-width: 1099px) {
  .kh-sea { min-height: 640px; }
  .kh-route--wide { display: none; }
  .kh-route--medium { display: block; }
  .kh-isle { --x: var(--mx); --y: var(--my); width: clamp(140px, 19vw, 180px); transform: translate(-50%, -45%); }
  [dir="rtl"] .kh-isle { transform: translate(50%, -45%); }
  .kh-sea { padding-top: 84px; }
  .kh-isles, .kh-world { top: 84px; }
}

/* ---------- A wide screen: Noor and Play at the sea's foot ---------- */
@media (min-width: 1100px) {
  .kh { grid-template-areas: "sea" "below"; }
  .kh-sea { grid-area: sea; min-height: clamp(640px, 80vh, 740px); }
  .kh-deck { grid-area: sea; align-self: end; z-index: 4; padding: 0 22px 22px; pointer-events: none; }
  .kh-deck > * { pointer-events: auto; }
  .kh-noor .ln-guide-say { box-shadow: 0 6px 0 rgba(16, 70, 130, .3), 0 18px 30px -22px rgba(0, 0, 0, .55); }
  .kh-below { grid-area: below; }
}

/* ---------- A phone: one island a row ---------- */
@media (max-width: 699px) {
  .kh { gap: 14px; padding-top: 10px; }
  .kh-deck { gap: 12px; }
  .kh-noor { flex-basis: 100%; }
  .ln-guide-cat { width: 92px; }
  .ln-guide-say { margin-block-end: 30px; padding: 12px 14px; }
  .ln-guide-hi { font-size: 20px; }
  .ln-guide-words { font-size: 18px; }
  .kh-play { flex-basis: 100%; grid-template-columns: 108px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: 28px; }
  .kh-play-pic { width: 108px; height: 96px; }
  .kh-play-words b { font-size: 20px; }
  .kh-go { height: 58px; font-size: 22px; }
  .kh-sea { min-height: 0; height: calc(var(--isles, 10) * 150px + 96px); padding-top: 0; border-radius: 32px; }
  .kh-isles, .kh-world { top: 88px; bottom: 44px; }
  .kh-boat { width: 34%; inset-inline-end: -6%; }
  .kh-route--medium { display: none; }
  .kh-route--tall { display: block; }
  .kh-isle { --x: var(--tx); --y: var(--ty); width: 168px; transform: translate(-50%, -50%); }
  [dir="rtl"] .kh-isle { transform: translate(50%, -50%); }
  .kh-hud { top: 12px; inset-inline: 12px; justify-content: flex-start; gap: 8px; }
  .kh-jar, .kh-book { height: 60px; padding: 0 10px 0 4px; }
  .kh-hud-word { display: none; }
  .kh-sound { width: 60px; height: 60px; }
  .kh-grown { margin-inline-start: auto; }
  .kh-below { grid-template-columns: 1fr; }
  .kh-stickers { grid-template-columns: repeat(3, 1fr); }
  .ks-noor { justify-content: flex-start; }
  .ks-tab { width: 96px; }
  .ks-page { padding-inline-start: 14px; }
  .ks-slots { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
  .kg-gate { padding: 20px 16px; }
  .kg-child { padding: 16px; }
  .ln--kid .ln-noor-corner { width: 58px; height: 58px; top: calc(100% + 6px); }
  .ln-guide--corner .ln-guide-cat { width: 68px; }
}

/* ---------- Less motion: nothing moves; Noor only changes pose ---------- */
@media (prefers-reduced-motion: reduce) {
  .kh-world, .ln-isle, .kh-play, a.ks-st, .ln-guide--corner .ln-guide-say { transition: none; }
  .ln-isle:hover, a.ks-st:hover { transform: none; }
}
