/* Choice screen ("For me" / "For my kid") and the kids' space: bigger, rounder, more playful. */

/* ---------- the choice ---------- */
#spaceChooser {
  position: fixed; inset: 0; z-index: 2000; overflow-y: auto; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(900px 520px at 10% -10%, rgba(255,107,87,.30), transparent 62%),
    radial-gradient(760px 520px at 100% 0%, rgba(255,194,71,.20), transparent 58%),
    radial-gradient(600px 400px at 50% 110%, rgba(181,140,255,.18), transparent 60%),
    #17121f;
}
#spaceChooser[hidden] { display: none; }
body.choosing-space { overflow: hidden; }
.sc-inner { width: 100%; max-width: 760px; text-align: center; }
.sc-logo { font-size: 2.6rem; } .sc-logo img { width: 4.2rem; height: 4.2rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.sc-inner h1 { margin: 6px 0 4px; font-size: min(2.2rem, 9vw); }
.sc-sub { margin: 0 0 22px; color: var(--text-dim); }
.sc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .sc-cards { grid-template-columns: 1fr; } }
.sc-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 30px 18px 26px; border-radius: 28px; cursor: pointer; color: var(--text);
  border: 2px solid var(--glass-border); background: rgba(36,27,48,.86);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.sc-card:hover, .sc-card:focus-visible { transform: translateY(-4px); outline: none; }
.sc-emoji { font-size: 4rem; line-height: 1; }
.sc-title { font-size: 1.5rem; font-weight: 800; }
.sc-desc { color: var(--text-dim); font-size: .95rem; line-height: 1.4; }
.sc-me:hover, .sc-me:focus-visible { border-color: #ff6b57; box-shadow: 0 16px 40px rgba(255,107,87,.28); }
.sc-kid { background: linear-gradient(160deg, rgba(255,194,71,.22), rgba(255,107,87,.16) 60%, rgba(36,27,48,.9)); }
.sc-kid:hover, .sc-kid:focus-visible { border-color: #ffc247; box-shadow: 0 16px 40px rgba(255,194,71,.28); }
.sc-school { background: linear-gradient(160deg, rgba(88,166,255,.22), rgba(181,140,255,.16) 60%, rgba(36,27,48,.9)); }
.sc-school:hover, .sc-school:focus-visible { border-color: #58a6ff; box-shadow: 0 16px 40px rgba(88,166,255,.28); }
.sc-back { margin-top: 22px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--glass-border); background: transparent; color: var(--text-dim); font: inherit; font-weight: 700; cursor: pointer; }
.sc-back:hover, .sc-back:focus-visible { color: var(--text); border-color: var(--text-dim); outline: none; }
.sc-soon { max-width: 520px; margin: 0 auto; padding: 28px 22px; border-radius: 28px; border: 2px dashed var(--glass-border); background: rgba(36,27,48,.7); }
.sc-soon .sc-sub { margin: 8px 0 0; }
.sc-soon-tag { display: inline-block; margin: 4px 0 0; padding: 4px 14px; border-radius: 999px; background: rgba(255,194,71,.2); color: #ffc247; font-weight: 800; }
.sc-card.last::after {
  content: "last time"; position: absolute; top: 12px; right: 14px; font-size: .72rem; font-weight: 700;
  padding: 2px 10px; border-radius: 999px; background: var(--grad); color: #17121f;
}

/* switch button inside the adult app */
.space-switch {
  margin-top: 10px; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 700;
  border: 1px solid rgba(255,194,71,.5); background: rgba(255,194,71,.12); color: var(--text);
}

/* ---------- show the right screen ---------- */
body.space-kid #appScreen { display: none !important; }
body.space-kid { padding-bottom: 40px; }
body.space-kid #textSizeBox { bottom: 12px !important; }
#kidsScreen[hidden] { display: none; }

/* ---------- the kids' space ---------- */
#kidsScreen { max-width: 820px; margin: 0 auto; }
.k-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.k-brand { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.k-brand span { font-size: 2rem; }
.k-top-right { display: flex; align-items: center; gap: 10px; }
.k-stars { padding: 8px 16px; border-radius: 999px; font-weight: 800; background: rgba(255,194,71,.18); border: 1px solid rgba(255,194,71,.5); }
.k-stars.pop { animation: kpop .5s ease; }
@keyframes kpop { 40% { transform: scale(1.3); } }
.k-adults { padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; }
.k-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 14px; }
.k-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.k-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 700;
  border: 2px solid var(--glass-border); background: rgba(255,255,255,.05); color: var(--text);
}
.k-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.k-chip.on { border-color: transparent; background: var(--grad); color: #17121f; }
.k-trialrow { margin-bottom: 8px; }
.k-trial { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .85rem; background: rgba(255,194,71,.14); border: 1px solid rgba(255,194,71,.45); }

.k-main { background: rgba(36,27,48,.8); border: 1px solid var(--glass-border); border-radius: 28px; padding: 20px 18px 24px; }
.k-h { margin: 6px 0 14px; font-size: 1.5rem; text-align: center; }
.k-center { text-align: center; }
.k-back { margin-bottom: 4px; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 700; }
.k-hint, .k-qno { color: var(--text-dim); font-size: .9rem; }

/* menu tiles */
.k-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 520px) { .k-menu { grid-template-columns: 1fr; } }
.k-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 12px; border-radius: 26px; cursor: pointer;
  border: 2px solid transparent; color: var(--text); transition: transform .15s ease;
}
.k-tile:hover { transform: translateY(-4px) rotate(-1deg); }
.k-tile span { font-size: 4rem; line-height: 1; }
.k-tile b { font-size: 1.35rem; }
.k-tile small { color: var(--text-dim); }
.k-t1 { background: linear-gradient(160deg, rgba(255,107,87,.35), rgba(36,27,48,.9)); }
.k-t2 { background: linear-gradient(160deg, rgba(181,140,255,.35), rgba(36,27,48,.9)); }

/* topic and story cards */
.k-cats, .k-stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.k-cat, .k-story {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px 8px;
  border-radius: 22px; cursor: pointer; color: var(--text); border: 2px solid transparent; text-align: center;
  transition: transform .15s ease;
}
.k-cat:hover, .k-story:hover { transform: translateY(-3px); }
.k-cat span, .k-story span { font-size: 2.8rem; line-height: 1; }
.k-cat b, .k-story b { font-size: 1rem; }
.k-c0 { background: rgba(255,107,87,.22); } .k-c1 { background: rgba(255,194,71,.20); }
.k-c2 { background: rgba(181,140,255,.22); } .k-c3 { background: rgba(255,143,177,.22); }
.k-c4 { background: rgba(255,162,76,.22); } .k-c5 { background: rgba(196,168,255,.20); }
.k-c6 { background: rgba(255,217,138,.20); } .k-c7 { background: rgba(232,121,249,.20); }

/* words */
.k-modes { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.k-mode { padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 800; border: 2px solid var(--glass-border); background: rgba(255,255,255,.05); color: var(--text); }
.k-mode.on { border-color: transparent; background: var(--grad); color: #17121f; }
.k-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.k-word {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border-radius: 22px; cursor: pointer;
  border: 2px solid var(--glass-border); background: rgba(255,255,255,.05); color: var(--text);
}
.k-word b { font-size: 1.15rem; }
.k-word small { color: var(--text-dim); font-size: .95rem; }
.k-word.tap { animation: ktap .4s ease; border-color: var(--accent-2); }
@keyframes ktap { 40% { transform: scale(1.08) rotate(-2deg); } }
.k-pic { font-size: 3.4rem; line-height: 1.1; }
.k-huge { font-size: 7rem; }
.k-big-btn {
  padding: 14px 26px; border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 1.05rem; border: 0;
  background: var(--grad); color: #17121f; box-shadow: 0 8px 22px rgba(255,107,87,.3);
}
.k-big-btn.alt { background: rgba(255,255,255,.08); color: var(--text); box-shadow: none; border: 2px solid var(--glass-border); }
.k-big-btn:disabled { opacity: .4; }
.k-link { background: none; border: 0; color: var(--text-dim); text-decoration: underline; cursor: pointer; }

/* quiz and say-it */
.k-ask, .k-mic { padding: 14px 24px; border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 1.2rem; border: 2px solid var(--glass-border); background: rgba(255,255,255,.06); color: var(--text); }
.k-mic { border-color: transparent; background: var(--grad); color: #17121f; }
.k-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin: 14px 0; }
.k-opt { padding: 14px 6px; border-radius: 22px; cursor: pointer; border: 3px solid var(--glass-border); background: rgba(255,255,255,.05); }
.k-opt .k-pic { font-size: 4rem; }
.k-opt.right { border-color: var(--ok); background: rgba(95,214,138,.18); animation: ktap .5s ease; }
.k-opt.wrong { border-color: var(--error); opacity: .45; animation: kshake .4s ease; }
@keyframes kshake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.k-msg { min-height: 1.8em; font-size: 1.2rem; font-weight: 800; }
.k-say { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 8px 0 14px; }
.k-say b { font-size: 2rem; }
.k-say small { color: var(--text-dim); font-size: 1.1rem; }

/* stories */
.k-stories .k-story b { font-size: .95rem; }
.k-scene { padding: 14px; border-radius: 24px; background: rgba(255,255,255,.04); border: 1px solid var(--glass-border); text-align: center; }
.k-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.k-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.k-dots i.done { background: rgba(255,194,71,.6); }
.k-dots i.on { background: var(--accent); transform: scale(1.3); }
.k-scene-pic { font-size: 5rem; line-height: 1.15; margin: 6px 0 10px; }
.k-scene-text { font-size: 1.5rem; line-height: 1.6; font-weight: 700; margin: 0; }
.k-w { cursor: pointer; border-radius: 8px; padding: 0 2px; }
.k-w:hover { background: rgba(255,194,71,.2); }
.k-reader-nav { display: flex; justify-content: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }

/* boxes: end of quiz, locked, loading */
.k-box { text-align: center; padding: 24px 12px; }
.k-box .k-big { font-size: 4rem; }
.k-box h2 { margin: 8px 0 6px; }
.k-box p { color: var(--text-dim); line-height: 1.6; }
.k-lock { max-width: 520px; margin: 0 auto; }
.k-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.k-plan {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; border-radius: 20px;
  cursor: pointer; color: var(--text); border: 2px solid var(--glass-border); background: rgba(255,255,255,.05);
}
.k-plan.on { border-color: #25d366; box-shadow: 0 0 0 3px rgba(37,211,102,.25); }
.k-plan .k-price { font-size: 1.5rem; font-weight: 800; }
.k-plan em { font-style: normal; font-size: .75rem; color: var(--accent-2); }
.k-wa {
  display: block; padding: 16px; border-radius: 18px; font-weight: 800; text-decoration: none; text-align: center;
  background: #25d366; color: #06301a;
}
.k-wa.disabled { background: rgba(255,255,255,.08); color: var(--text-dim); cursor: not-allowed; }

/* ---------- the owl guide ---------- */
.k-mascot { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 14px; padding: 10px 14px; border-radius: 22px; cursor: pointer; text-align: left; color: var(--text);
  border: 2px dashed rgba(255,194,71,.5); background: rgba(255,194,71,.08); }
.k-mascot .owl { font-size: 2.6rem; line-height: 1; animation: kbob 2.4s ease-in-out infinite; }
.k-mascot .bubble { font-size: 1.05rem; font-weight: 700; line-height: 1.35; }
@keyframes kbob { 50% { transform: translateY(-5px) rotate(-6deg); } }
.k-sound { padding: 8px 12px; border-radius: 999px; cursor: pointer; font-size: 1.1rem; }

/* ---------- confetti ---------- */
.k-confetti { position: fixed; inset: 0; z-index: 3000; pointer-events: none; overflow: hidden; }
.k-confetti span { position: absolute; top: -40px; animation: kfall 1.9s ease-in forwards; }
@keyframes kfall { to { transform: translateY(110vh) rotate(360deg); opacity: .85; } }

/* ---------- progress: streak, goal, tickets ---------- */
.k-prog { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; }
.k-pchip { padding: 6px 14px; border-radius: 999px; font-weight: 800; background: rgba(255,255,255,.07); border: 1px solid var(--glass-border); }
.k-pbar { flex: 1 1 120px; max-width: 200px; height: 12px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.k-pbar i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width .4s ease; }
.k-t3 { background: linear-gradient(160deg, rgba(255,194,71,.38), rgba(36,27,48,.9)); }
.k-g0 { background: linear-gradient(160deg, rgba(255,143,177,.35), rgba(36,27,48,.9)); }
.k-g1 { background: linear-gradient(160deg, rgba(90,200,176,.0), rgba(181,140,255,.35)), rgba(36,27,48,.9); }
.k-g2 { background: linear-gradient(160deg, rgba(255,162,76,.35), rgba(36,27,48,.9)); }
.k-tile:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- win / unlock banner ---------- */
#kToast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 140%); z-index: 2500; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  max-width: 94vw; padding: 12px 18px; border-radius: 22px; font-weight: 800; background: #241b30; border: 2px solid var(--accent-2); box-shadow: 0 14px 40px rgba(0,0,0,.5); transition: transform .35s ease; }
#kToast.show { transform: translate(-50%, 0); }
#kToast button { padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 800; border: 0; background: var(--grad); color: #17121f; }
#kToast button.x { background: rgba(255,255,255,.1); color: var(--text); padding: 8px 12px; }
body:not(.space-kid) #kToast, body:not(.space-kid) .k-confetti { display: none; }

/* ---------- game 1: flip the cards ---------- */
.k-mem { display: grid; gap: 10px; max-width: 560px; margin: 0 auto; }
.k-mem.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.k-mem.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.k-card { position: relative; aspect-ratio: 1 / 1; border-radius: 18px; cursor: pointer; border: 3px solid var(--glass-border); background: linear-gradient(160deg, #ff6b57, #b58cff); color: #fff; padding: 0; overflow: hidden; }
.k-card .back, .k-card .front { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 4px; line-height: 1.1; }
.k-card .back { font-size: 2.4rem; }
.k-card .front { display: none; font-size: 2.4rem; background: #2d2340; }
.k-card .front.w { font-size: 1.05rem; font-weight: 800; word-break: break-word; color: var(--text); }
.k-card.up .back { display: none; } .k-card.up .front { display: grid; animation: kflip .35s ease; }
.k-card.ok { border-color: var(--ok); }
.k-card:disabled { opacity: 1; }
@keyframes kflip { from { transform: rotateY(90deg); } to { transform: none; } }
@media (max-width: 420px) { .k-card .front.w { font-size: .85rem; } .k-card .front, .k-card .back { font-size: 1.8rem; } }

/* ---------- game 2: word search ---------- */
.k-clues { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 8px; }
.k-clue { display: flex; flex-direction: column; align-items: center; min-width: 72px; padding: 6px 10px; border-radius: 16px; background: rgba(255,255,255,.06); border: 2px solid var(--glass-border); }
.k-clue .k-pic { font-size: 2.2rem; }
.k-clue small { letter-spacing: .12em; font-weight: 800; color: var(--text-dim); }
.k-clue.ok { border-color: var(--ok); background: rgba(95,214,138,.15); }
.k-clue.ok small { color: var(--ok); }
.k-ws { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; max-width: 460px; margin: 10px auto 0; }
.k-cell { aspect-ratio: 1 / 1; padding: 0; border-radius: 10px; cursor: pointer; font-size: clamp(1rem, 4.5vw, 1.5rem); font-weight: 800; color: var(--text); background: rgba(255,255,255,.07); border: 2px solid transparent; }
.k-cell.sel { background: var(--accent-2); color: #17121f; }
.k-cell.ok { background: rgba(95,214,138,.35); border-color: var(--ok); }

/* ---------- game 3: spell it ---------- */
.k-slots { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.k-slot { width: 52px; height: 60px; border-radius: 14px; cursor: pointer; font-size: 1.7rem; font-weight: 800; color: var(--text); background: rgba(255,255,255,.05); border: 3px dashed var(--glass-border); padding: 0; }
.k-slot.full { border-style: solid; border-color: var(--accent-2); }
.k-slots.good .k-slot { border-color: var(--ok); background: rgba(95,214,138,.2); animation: ktap .5s ease; }
.k-slots.bad .k-slot { border-color: var(--error); animation: kshake .4s ease; }
.k-letters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.k-letter { width: 56px; height: 56px; border-radius: 16px; cursor: pointer; font-size: 1.6rem; font-weight: 800; border: 0; padding: 0; background: var(--grad); color: #17121f; box-shadow: 0 6px 14px rgba(255,107,87,.25); }
.k-letter:disabled { opacity: .25; box-shadow: none; }

/* ---------- bigger and simpler for the youngest ---------- */
.k-tile, .k-cat, .k-story, .k-word, .k-opt, .k-card, .k-letter { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.k-tile:active, .k-cat:active, .k-story:active, .k-opt:active, .k-letter:active, .k-card:active { transform: scale(.95); }

/* three tiles side by side when there is room */
.k-menu { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* phones: a compact header so the games and cards start higher */
@media (max-width: 520px) {
  .k-chip .n { display: none; }
  .k-bar { gap: 8px 10px; margin-bottom: 10px; }
  .k-chip { padding: 8px 12px; }
  .k-brand { font-size: 1.25rem; }
  .k-brand span { font-size: 1.6rem; }
  .k-main { padding: 14px 12px 20px; border-radius: 22px; }
  .k-mascot { padding: 8px 10px; }
  .k-mascot .owl { font-size: 2rem; }
  .k-mascot .bubble { font-size: .95rem; }
}

/* ---------- eight games in the Game zone ---------- */
.k-games { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.k-games .k-tile { padding: 18px 8px; }
.k-games .k-tile span { font-size: 2.8rem; }
.k-games .k-tile b { font-size: 1.05rem; text-align: center; }
.k-g3 { background: linear-gradient(160deg, rgba(181,140,255,.38), rgba(36,27,48,.9)); }
.k-g4 { background: linear-gradient(160deg, rgba(255,107,87,.35), rgba(36,27,48,.9)); }
.k-g5 { background: linear-gradient(160deg, rgba(255,143,177,.35), rgba(36,27,48,.9)); }
.k-g6 { background: linear-gradient(160deg, rgba(255,194,71,.35), rgba(36,27,48,.9)); }
.k-g7 { background: linear-gradient(160deg, rgba(196,168,255,.35), rgba(36,27,48,.9)); }

/* on-screen letters (crossword, save the word) */
.k-kb { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.k-kb button { width: 40px; height: 44px; padding: 0; border-radius: 12px; cursor: pointer; font-size: 1.1rem; font-weight: 800; color: var(--text); background: rgba(255,255,255,.08); border: 2px solid transparent; }
.k-kb button.wide { width: 64px; }
.k-kb button.good { background: rgba(95,214,138,.3); border-color: var(--ok); }
.k-kb button.bad { opacity: .35; border-color: var(--error); }
.k-kb button:disabled { cursor: default; }
@media (max-width: 420px) { .k-kb button { width: 30px; height: 40px; font-size: .95rem; } .k-kb button.wide { width: 50px; } }

/* crossword */
.k-xclues { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 10px; }
.x-clue { padding: 6px 12px; border-radius: 14px; cursor: pointer; font-size: 1.3rem; color: var(--text); background: rgba(255,255,255,.06); border: 2px solid var(--glass-border); }
.x-clue.on { border-color: var(--accent-2); background: rgba(255,194,71,.18); }
.x-clue.ok { border-color: var(--ok); background: rgba(95,214,138,.18); }
.k-xgrid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 46px)); gap: 3px; justify-content: center; margin: 6px 0 4px; }
.x-empty { display: block; aspect-ratio: 1 / 1; }
.x-cell { position: relative; aspect-ratio: 1 / 1; padding: 0; border-radius: 10px; cursor: pointer; font-size: clamp(1rem, 5vw, 1.5rem); font-weight: 800; color: var(--text); background: rgba(255,255,255,.1); border: 2px solid transparent; }
.x-cell i { position: absolute; top: 1px; left: 4px; font-size: .62rem; font-style: normal; font-weight: 700; color: var(--accent-2); }
.x-cell.in { background: rgba(255,194,71,.2); }
.x-cell.sel { background: var(--accent-2); color: #17121f; }
.x-cell.ok { background: rgba(95,214,138,.35); border-color: var(--ok); color: var(--text); }

/* save the word */
.k-hang { text-align: center; font-size: 2rem; font-weight: 800; letter-spacing: .3em; margin: 6px 0; word-break: break-all; }

/* pop the bubble */
.k-sky { position: relative; height: 300px; margin: 8px 0; overflow: hidden; border-radius: 24px; background: linear-gradient(180deg, rgba(90,140,255,.18), rgba(255,194,71,.1)); border: 1px solid var(--glass-border); }
.k-bubble { position: absolute; bottom: -90px; left: var(--x); width: 84px; height: 84px; border-radius: 50%; padding: 0; font-size: 2.6rem; cursor: pointer; border: 2px solid rgba(255,255,255,.5);
  background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.55), rgba(181,140,255,.25) 60%, rgba(255,143,177,.25)); animation: krise var(--d) linear infinite; animation-delay: var(--delay); }
@keyframes krise { 0% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-190px) translateX(14px); } 100% { transform: translateY(-400px) translateX(-6px); } }
.k-bubble.pop { animation: kpopb .35s ease forwards; }
@keyframes kpopb { to { transform: scale(1.7); opacity: 0; } }
.k-bubble.wrong { border-color: var(--error); }

/* speed tap */
.k-timer { display: flex; justify-content: center; gap: 18px; font-size: 1.4rem; font-weight: 800; }

/* build a sentence */
.k-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0; padding: 10px; border-radius: 18px; background: rgba(255,255,255,.04); border: 2px dashed var(--glass-border); min-height: 64px; }
.k-wslot { min-width: 54px; height: 44px; padding: 0 10px; border-radius: 12px; font-size: 1.1rem; font-weight: 800; color: var(--text); background: rgba(255,255,255,.05); border: 2px dashed var(--glass-border); }
.k-wslot.full { border-style: solid; border-color: var(--accent-2); }
.k-line.good { border-color: var(--ok); } .k-line.good .k-wslot { border-color: var(--ok); }
.k-line.bad { border-color: var(--error); animation: kshake .4s ease; }
.k-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.k-chipw { padding: 10px 16px; border-radius: 999px; cursor: pointer; font-size: 1.1rem; font-weight: 800; border: 0; background: var(--grad); color: #17121f; }
.k-chipw:disabled { opacity: .25; }

/* ---------- the voice picker ---------- */
#kVoicePanel { position: fixed; inset: 0; z-index: 2600; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10,6,16,.7); }
#kVoicePanel[hidden] { display: none; }
.kv-card { width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto; padding: 18px; border-radius: 26px; background: #241b30; border: 2px solid var(--glass-border); box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.kv-head { display: flex; align-items: center; justify-content: space-between; font-size: 1.2rem; }
.kv-head button { padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.kv-note { margin: 8px 0; color: var(--text-dim); font-size: .92rem; }
.kv-note.small { font-size: .8rem; }
.kv-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kv-style { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; cursor: pointer; font-weight: 800; color: var(--text); background: rgba(255,255,255,.06); border: 2px solid var(--glass-border); }
.kv-style span { font-size: 1.9rem; }
.kv-style.on, .kv-voice.on { border-color: transparent; background: var(--grad); color: #17121f; }
.kv-list { display: flex; flex-direction: column; gap: 6px; }
.kv-voice { text-align: left; padding: 10px 14px; border-radius: 14px; cursor: pointer; font-weight: 700; color: var(--text); background: rgba(255,255,255,.05); border: 2px solid var(--glass-border); }

/* ---------- translation card: tap a word ---------- */
#kTip { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 160%); z-index: 2550; display: flex; align-items: center; gap: 12px; max-width: 94vw; min-width: 260px;
  padding: 12px 14px; border-radius: 22px; background: #241b30; border: 2px solid var(--accent); box-shadow: 0 14px 40px rgba(0,0,0,.55); transition: transform .3s ease; }
#kTip.show { transform: translate(-50%, 0); }
body:not(.space-kid) #kTip { display: none; }
#kTip .tip-say { width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 1.3rem; border: 0; background: var(--grad); color: #17121f; flex: none; padding: 0; }
#kTip .tip-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
#kTip .tip-body b { font-size: 1.2rem; }
#kTip .tip-tr { font-size: 1.35rem; font-weight: 800; color: var(--accent-2); line-height: 1.4; }
#kTip .tip-x { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; padding: 0; flex: none; }
.k-gloss { margin: 2px 0 8px; font-size: 1.15rem; font-weight: 800; color: var(--accent-2); }
.x-clue small { display: block; font-size: .8rem; font-weight: 800; color: var(--accent-2); line-height: 1.2; }
.k-xnow { font-size: 1.1rem; font-weight: 700; margin: 6px 0 4px; }
.k-xnow b { color: var(--accent-2); font-size: 1.25rem; }
.k-w { text-decoration: underline dotted rgba(255,194,71,.45); text-underline-offset: 6px; }

#kTip .tip-go { padding: 10px 16px; border-radius: 999px; cursor: pointer; font-weight: 800; border: 0; background: var(--grad); color: #17121f; flex: none; }

/* the line under the word that is being read aloud */
.follow { box-shadow: inset 0 -5px 0 var(--accent-2); border-radius: 3px; }
.k-w.follow { text-decoration: none; color: #fff; }
.fw { display: inline; }
.k-ask span.follow, .k-say b.follow, .k-word b.follow, #kTip .tip-body b.follow { box-shadow: inset 0 -6px 0 var(--accent-2); }
.k-wslot.follow { box-shadow: inset 0 -6px 0 var(--accent-2); }

/* numbers shown as digits (11, 20, 100...) must fit inside their cards */
.k-pic { white-space: nowrap; }
.k-opt { overflow: hidden; }
.k-clue .k-pic, .k-card .front { white-space: nowrap; }

.k-adults { white-space: nowrap; }
.k-top-right { flex-wrap: wrap; justify-content: flex-end; }

/* word search kinds: Arabic clues and the word list */
.k-g8 { background: linear-gradient(160deg, rgba(255,194,71,.30), rgba(181,140,255,.30)), rgba(36,27,48,.9); }
.k-g9 { background: linear-gradient(160deg, rgba(255,107,87,.38), rgba(36,27,48,.9)); }
.k-g10 { background: linear-gradient(160deg, rgba(196,168,255,.38), rgba(36,27,48,.9)); }
.k-clue .k-ar { font-size: 1.25rem; color: var(--accent-2); line-height: 1.3; padding: 4px 2px; }
.k-clue.words b { font-size: .95rem; letter-spacing: .05em; }
.k-clue.words.ok b { text-decoration: line-through; color: var(--ok); }

/* language search */
.k-g11 { background: linear-gradient(160deg, rgba(90,200,255,.0), rgba(255,194,71,.30)), linear-gradient(160deg, rgba(181,140,255,.30), rgba(36,27,48,.9)); }
.k-clangs { justify-content: center; margin-bottom: 10px; }
.k-clue .k-flag { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; margin: 2px auto; display: block; }

/* word search: dragging across the letters */
.k-ws { touch-action: none; -webkit-user-select: none; user-select: none; }
.k-cell { touch-action: none; }
.k-cell.drag { background: var(--accent-2); color: #17121f; transform: scale(1.06); }

/* the line that pops up from the first letter to the last */
.k-ws { position: relative; }
.k-wline { position: absolute; z-index: 3; pointer-events: none; border-radius: 999px; transform-origin: center; }
.k-wline.drag { background: rgba(255,194,71,.45); border: 3px solid var(--accent-2); box-shadow: 0 0 16px rgba(255,194,71,.5); }
.k-wline.ok { background: rgba(95,214,138,.32); border: 3px solid var(--ok); animation: klinepop .45s ease-out; }
@keyframes klinepop { 0% { opacity: 0; box-shadow: 0 0 0 0 rgba(95,214,138,.9); } 100% { opacity: 1; box-shadow: 0 0 0 14px rgba(95,214,138,0); } }
.k-cell.drag { background: rgba(255,255,255,.07); transform: none; color: inherit; }
.k-cell.ok { background: transparent; border-color: transparent; color: #fff; }

/* ---------- gentle feedback and the new games ---------- */
.k-wobble { animation: kshake .4s ease; border-color: var(--error) !important; }
.k-pulse { animation: ktap .6s ease; }
.k-slot { display: inline-grid; place-items: center; }   /* letters are placed for you now: slots are not buttons */
.k-wslot { display: inline-flex; align-items: center; justify-content: center; }

/* match lines */
.k-match { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 64px; max-width: 520px; margin: 10px auto; touch-action: none; -webkit-user-select: none; user-select: none; }
.k-mcol { display: flex; flex-direction: column; gap: 12px; }
.k-mnode { min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 8px; border-radius: 18px; text-align: center;
  border: 3px solid var(--glass-border); background: rgba(255,255,255,.06); }
.k-mnode.pic { cursor: grab; }
.k-mnode.pic .k-pic { font-size: 2.6rem; }
.k-mnode.word b { font-size: 1.1rem; }
.k-mnode.word small { color: var(--accent-2); font-size: .95rem; font-weight: 800; }
.k-mnode.ok { border-color: var(--ok); background: rgba(95,214,138,.16); }
.k-mlines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.k-mlines line { stroke-width: 7; stroke-linecap: round; }
.k-mlines line.drag { stroke: var(--accent-2); opacity: .9; }
.k-mlines line.ok { stroke: var(--ok); opacity: .85; }

/* missing letter */
.k-miss { letter-spacing: .25em; }
.k-miss .blank { display: inline-block; min-width: 1.1em; border-bottom: 5px solid var(--accent-2); color: var(--accent-2); }
.k-miss .blank.filled { color: var(--ok); border-bottom-color: var(--ok); }

/* sort it */
.k-sortcard { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 4px 0 14px; }
.k-baskets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.k-basket { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 8px; border-radius: 26px; cursor: pointer; color: var(--text); border: 3px solid var(--glass-border); }
.k-basket span { font-size: 3rem; line-height: 1; }
.k-basket b { font-size: 1.15rem; }
.k-basket.b0 { background: linear-gradient(160deg, rgba(255,107,87,.35), rgba(36,27,48,.9)); }
.k-basket.b1 { background: linear-gradient(160deg, rgba(181,140,255,.35), rgba(36,27,48,.9)); }
.k-basket:active { transform: scale(.96); }

/* ---------- storybook pages (kids/scene.js draws the picture) ---------- */
.k-book { max-width: 40rem; margin: 0 auto; }
.k-stage { position: relative; height: 15rem; border-radius: 1.2rem 1.2rem 0 0; overflow: hidden; background: linear-gradient(#7fd0ff, #d8f1ff 70%); border: 3px solid #fbf3df; border-bottom: 0; }
.k-stage.t-rain { background: linear-gradient(#8d9db3, #c4cfdb 70%); }
.k-stage.t-night, .k-night .k-stage { background: linear-gradient(#141b4d, #3a3f8f 75%); }
.k-stage.t-room { background: repeating-linear-gradient(90deg, #ffe9c7 0 2.2rem, #ffdfb0 2.2rem 4.4rem); }
.k-stage.t-sea { background: linear-gradient(#7fd0ff, #bfe9ff 55%); }
.k-hill { position: absolute; bottom: -4rem; border-radius: 50%; background: #6cc56a; }
.k-hill.h1 { left: -15%; width: 80%; height: 9.5rem; }
.k-hill.h2 { right: -20%; width: 85%; height: 8rem; background: #58b45a; }
.t-night .k-hill, .k-night .k-hill { background: #2f6b4a; } .t-night .k-hill.h2, .k-night .k-hill.h2 { background: #265a3e; }
.t-rain .k-hill { background: #5d9b69; } .t-rain .k-hill.h2 { background: #4f8a5b; }
.t-room .k-hill { left: -10%; right: -10%; width: 120%; height: 6rem; bottom: -3.2rem; border-radius: 0; background: #c98f55; }
.t-room .k-hill.h2 { display: none; }
.t-sea .k-hill { display: none; }
.k-water { display: none; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(#35a7e6, #1b7fc4); }
.t-sea .k-water { display: block; }
.t-sea .k-water::before { content: ""; position: absolute; left: 0; right: 0; top: -.5rem; height: 1rem; background: radial-gradient(circle at 50% 100%, #35a7e6 .6rem, transparent .65rem) 0 0 / 1.6rem 1rem repeat-x; animation: kwave 3s linear infinite; }
.k-stars { display: none; position: absolute; inset: 0; }
.t-night .k-stars, .k-night .k-stars { display: block; }
.k-stars i { position: absolute; width: .28rem; height: .28rem; border-radius: 50%; background: #fff8c9; animation: ktwinkle 2s ease-in-out infinite; animation-delay: var(--d); }
.k-cloud { position: absolute; font-size: 2.6rem; opacity: .9; animation: kdrift 22s linear infinite; }
.k-cloud.c1 { top: 8%; left: -12%; } .k-cloud.c2 { top: 24%; left: -40%; font-size: 1.8rem; animation-duration: 30s; }
.t-night .k-cloud, .k-night .k-cloud, .t-room .k-cloud { display: none; }
.k-it { position: absolute; transform: translateX(-50%); line-height: 1; cursor: pointer; user-select: none; -webkit-user-select: none; filter: drop-shadow(0 .25rem .2rem rgba(0,0,0,.25)); animation: kbob 2.8s ease-in-out infinite; animation-delay: var(--d); }
.k-it.scn { animation: none; }
.k-it.fel { animation: kfloat 2.4s ease-in-out infinite; animation-delay: var(--d); }
.k-it.sky { animation: kfloat 5s ease-in-out infinite; animation-delay: var(--d); }
.k-it.pop { animation: kpopit .55s ease !important; }
.k-page { position: relative; padding: 1rem 1.2rem 1.3rem 1.6rem; border-radius: 0 0 1.2rem 1.2rem; background: #fbf3df; color: #3b2a1a; border: 3px solid #fbf3df; box-shadow: 0 .6rem 1.4rem rgba(0,0,0,.35); text-align: left; }
.k-page::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: .8rem; background: linear-gradient(90deg, rgba(120,80,30,.28), transparent); }
.k-page::after { content: ""; position: absolute; right: 0; bottom: 0; width: 2rem; height: 2rem; background: linear-gradient(135deg, transparent 50%, #e6d3a8 50%, #f3e4bd 100%); border-radius: 0 0 1rem 0; box-shadow: -.15rem -.15rem .4rem rgba(0,0,0,.12); }
.k-night .k-page { background: #2b2346; color: #f6ead0; border-color: #2b2346; } .k-night .k-stage { border-color: #2b2346; }
.k-night .k-page::after { background: linear-gradient(135deg, transparent 50%, #1f1934 50%, #3a3060 100%); }
.k-page .k-scene-text { font-family: "Patrick Hand", Georgia, serif; font-size: 1.65rem; line-height: 1.55; font-weight: 700; }
.k-page .k-scene-text::first-letter { float: left; font-size: 3.4rem; line-height: .85; padding: .1rem .35rem 0 0; font-weight: 900; color: #c0392b; }
.k-night .k-page .k-scene-text::first-letter { color: #ffc247; }
.k-page .k-w { text-decoration-color: rgba(192,57,43,.35); }
.k-page .k-w:hover { background: rgba(255,194,71,.45); }
.k-page .k-w.follow { color: #7a1a0a; background: rgba(255,194,71,.75); text-decoration: none; }
.k-night .k-page .k-w.follow { color: #1a1233; background: #ffc247; }
.k-page .k-dots { margin: 0 0 .7rem; justify-content: flex-start; }
.k-page .k-dots i { background: rgba(90,60,20,.22); } .k-page .k-dots i.done { background: #e0a23a; } .k-page .k-dots i.on { background: #c0392b; }
.k-night .k-page .k-dots i { background: rgba(255,255,255,.2); } .k-night .k-page .k-dots i.on { background: #ffc247; }
.k-turn-next .k-page, .k-turn-next .k-stage { transform-origin: left center; animation: kturnn .55s ease-out; }
.k-turn-prev .k-page, .k-turn-prev .k-stage { transform-origin: right center; animation: kturnp .55s ease-out; }
@keyframes kbob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-.4rem); } }
@keyframes kfloat { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-.6rem); } }
@keyframes kpopit { 0% { transform: translateX(-50%) scale(1); } 30% { transform: translateX(-50%) translateY(-1.4rem) scale(1.3) rotate(-8deg); } 60% { transform: translateX(-50%) translateY(-.3rem) scale(1.1) rotate(8deg); } 100% { transform: translateX(-50%) scale(1); } }
@keyframes kdrift { from { transform: translateX(0); } to { transform: translateX(160vw); } }
@keyframes ktwinkle { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes kwave { to { background-position: 1.6rem 0; } }
@keyframes kturnn { from { transform: perspective(900px) rotateY(-60deg); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes kturnp { from { transform: perspective(900px) rotateY(60deg); opacity: .2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .k-it, .k-cloud, .k-stars i, .k-turn-next *, .k-turn-prev * { animation: none !important; } }

/* the cheer after a correct answer */
.k-praise { position: fixed; left: 50%; top: 16%; transform: translateX(-50%); z-index: 3100; pointer-events: none; padding: .5rem 1.4rem; border-radius: 999px;
  font-size: 2rem; font-weight: 900; color: #3b2a63; background: linear-gradient(135deg, #ffe08a, #ffb347); box-shadow: 0 .5rem 1.4rem rgba(0,0,0,.4);
  animation: kpraise 1.5s ease-out forwards; }
body:not(.space-kid) .k-praise { display: none; }
@keyframes kpraise { 0% { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.7); } 15% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.1); } 30% { transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-24px) scale(1); } }
@media (prefers-reduced-motion: reduce) { .k-praise { animation-duration: 1.5s; } }

/* the questions after a story */
.k-sq-pic { text-align: center; font-size: 5rem; line-height: 1.2; margin: .3rem 0 .6rem; }
.k-sq-gap { font-size: 1.5rem; font-weight: 800; margin: .2rem 0 .8rem; }
.k-sq-opts { display: grid; gap: 12px; margin: 10px 0; }
.k-sq-opts.row { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.k-sq-opt { padding: 14px 12px; border-radius: 20px; border: 3px solid var(--glass-border); background: rgba(255,255,255,.06); color: inherit; font: inherit; font-size: 1.25rem; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.k-sq-opt.big { font-size: 4rem; padding: 10px; }
.k-sq-opt.right { border-color: var(--ok); background: rgba(95,214,138,.2); animation: ktap .5s ease; }
.k-sq-opt.wrong { border-color: var(--error); opacity: .45; animation: kshake .4s ease; }
.k-sq-match { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; margin: 10px 0; }
.k-sq-match .col { display: grid; gap: 10px; align-content: start; }
.k-sq-m { padding: 10px 8px; min-height: 64px; border-radius: 18px; border: 3px solid var(--glass-border); background: rgba(255,255,255,.06); color: inherit; font: inherit; font-size: 1.05rem; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.k-sq-m.pic { font-size: 2.4rem; }
.k-sq-m.sel { border-color: var(--accent-2, #ffb347); background: rgba(255,179,71,.2); transform: scale(1.04); }
.k-sq-m.ok { border-color: var(--ok); background: rgba(95,214,138,.2); }
.k-sq-m.wrong { border-color: var(--error); animation: kshake .4s ease; }

/* songs */
.k-t4 { background: linear-gradient(160deg, rgba(255,120,200,.38), rgba(36,27,48,.9)); }
.k-songstage { position: relative; display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 190px; border-radius: 26px; overflow: hidden; padding: 16px; margin-bottom: 8px; border: 2px solid var(--glass-border); }
.k-sp { font-size: 4.6rem; line-height: 1; background: none; border: 0; cursor: pointer; padding: 4px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; animation: kspop .45s ease both; }
.k-songstage.playing .k-sp { animation: kspop .45s ease both, ksbounce .8s ease-in-out .45s infinite; }
.k-sp.dance { animation: ksdance .7s ease both !important; }
@keyframes kspop { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 70% { transform: scale(1.18) rotate(4deg); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes ksbounce { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(5deg); } }
@keyframes ksdance { 0% { transform: scale(1); } 25% { transform: translateY(-26px) rotate(-18deg) scale(1.2); } 50% { transform: translateY(0) rotate(14deg) scale(1.1); } 75% { transform: translateY(-14px) rotate(-8deg); } 100% { transform: scale(1); } }
.k-note { position: absolute; bottom: 8px; font-size: 1.8rem; opacity: 0; pointer-events: none; }
.k-note.n1 { left: 12%; } .k-note.n2 { left: 48%; } .k-note.n3 { left: 80%; }
.k-songstage.playing .k-note { animation: knote 2.4s ease-in infinite; }
.k-songstage.playing .k-note.n2 { animation-delay: .8s; } .k-songstage.playing .k-note.n3 { animation-delay: 1.6s; }
@keyframes knote { 0% { transform: translateY(0) rotate(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-170px) rotate(25deg); opacity: 0; } }
.k-bub { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: #fff; color: #2a1a3a; font-weight: 900; font-size: 1.4rem; padding: .3rem .9rem; border-radius: 999px; animation: kpraise 1s ease-out forwards; pointer-events: none; }
.k-songctl { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.k-songlines { display: grid; gap: 8px; margin: 10px 0; }
.k-songline { text-align: center; padding: 10px 12px; border-radius: 18px; border: 2px solid transparent; background: rgba(255,255,255,.05); color: var(--text-dim); font: inherit; font-size: 1.25rem; font-weight: 800; cursor: pointer; touch-action: manipulation; transition: all .25s ease; }
.k-songline.done { color: var(--text); }
.k-songline.on { color: var(--text); background: rgba(255,179,71,.18); border-color: var(--accent-2, #ffb347); transform: scale(1.03); }
.k-songline .sw { display: inline-block; padding: 0 .12em; border-radius: 8px; transition: all .12s ease; }
.k-songline .sw.on { background: #ffb347; color: #2a1a3a; transform: scale(1.18); }
.k-songlines.sing .k-songline:not(.done) { opacity: .25; filter: blur(5px); pointer-events: none; }
.k-songq { margin-top: 10px; }
@media (max-width: 520px) { .k-sp { font-size: 3.6rem; } .k-songline { font-size: 1.1rem; } }
@media (prefers-reduced-motion: reduce) { .k-songstage.playing .k-sp, .k-songstage.playing .k-note { animation: none; } }

/* the original video of a song */
.k-vid { position: relative; width: 100%; max-width: 640px; margin: 10px auto; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; border: 2px solid var(--glass-border); }
.k-vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.k-timing { margin-top: 8px; }
.k-timing b { font-size: 1.1rem; }
.sc-admin { background: linear-gradient(160deg, rgba(255,170,70,.22), rgba(255,100,100,.14) 60%, rgba(36,27,48,.9)); }
.sc-admin:hover, .sc-admin:focus-visible { border-color: #ffaa46; box-shadow: 0 16px 40px rgba(255,170,70,.28); }

/* learning path: today's lesson card, topics (units) and lesson stations */
.k-today { display: flex; align-items: center; gap: 14px; width: 100%; margin: 6px 0 18px; padding: 14px 18px; border-radius: 22px; cursor: pointer;
  border: 2px solid var(--accent-2, #ffc247); color: var(--text); text-align: start;
  background: linear-gradient(135deg, rgba(255,194,71,.35), rgba(255,107,87,.30)), rgba(36,27,48,.9); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.k-today:hover { transform: translateY(-2px); }
.k-today.done { border-color: var(--ok, #5ed38a); background: linear-gradient(135deg, rgba(94,211,138,.28), rgba(36,27,48,.9)); }
.k-today-ic { font-size: 3rem; line-height: 1; flex: none; }
.k-today-t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.k-today-t small { font-size: .95rem; font-weight: 800; color: var(--accent-2, #ffc247); }
.k-today.done .k-today-t small { color: var(--ok, #5ed38a); }
.k-today-t b { font-size: 1.4rem; }
.k-today-t i { font-style: normal; font-size: .85rem; color: var(--text-dim); }
.k-today-go { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: var(--grad); color: #17121f; }
.k-path { display: flex; flex-direction: column; gap: 14px; }
.k-unit { padding: 12px 14px 14px; border-radius: 22px; background: rgba(255,255,255,.04); border: 1px solid var(--glass-border, rgba(255,255,255,.12)); }
.k-unit.cur { border-color: var(--accent-2, #ffc247); }
.k-unit-h { margin: 0 0 10px; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.k-unit-h span { font-size: 1.6rem; }
.k-unit-h small { margin-inline-start: auto; font-size: .85rem; color: var(--text-dim); }
.k-stations { display: flex; flex-wrap: wrap; gap: 12px; }
.k-station { position: relative; width: 92px; height: 104px; border-radius: 26px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 2px solid transparent; color: var(--text); background: rgba(181,140,255,.22); transition: transform .15s ease; }
.k-station:hover:not(:disabled) { transform: translateY(-3px); }
.k-station.done { background: rgba(94,211,138,.22); }
.k-station.here { border-color: var(--accent-2, #ffc247); background: rgba(255,194,71,.28); animation: kHere 1.6s ease-in-out infinite; }
.k-station:disabled { cursor: default; opacity: .45; background: rgba(255,255,255,.06); }
.k-st-ic { font-size: 2.1rem; line-height: 1; }
.k-station b { font-size: .95rem; }
.k-st-stars { font-size: .7rem; letter-spacing: -1px; }
.k-st-big { font-size: 2.4rem; margin: 4px 0; }
@keyframes kHere { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,194,71,.55); } 50% { box-shadow: 0 0 0 10px rgba(255,194,71,0); } }
@media (prefers-reduced-motion: reduce) { .k-station.here { animation: none; } }
.k-story small { font-size: .8rem; font-weight: 800; color: var(--accent-2, #ffc247); }
.k-story-here { border-color: var(--accent-2, #ffc247); animation: kHere 1.6s ease-in-out infinite; }

/* new activities: listen and touch, trace the letter, sticker album, games opening one by one */
.k-t5 { background: linear-gradient(160deg, rgba(255,194,71,.38), rgba(36,27,48,.9)); }
.k-game-new { border: 2px solid var(--accent-2, #ffc247); animation: kHere 1.6s ease-in-out infinite; }
.k-opts6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.k-ear { font-size: 1.3rem; }
.k-trace { position: relative; width: min(280px, 82vw); aspect-ratio: 1; margin: 8px auto; border-radius: 22px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.k-trace canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 22px; }
.k-trace-ink { touch-action: none; cursor: crosshair; }
.k-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.k-stk { display: grid; place-items: center; aspect-ratio: 1; border-radius: 18px; font-size: 2.1rem; font-weight: 900; color: var(--text-dim);
  background: rgba(255,255,255,.05); border: 2px dashed rgba(255,255,255,.18); }
.k-stk.got { background: rgba(255,194,71,.18); border: 2px solid var(--accent-2, #ffc247); color: inherit; }
.k-sticker-pop { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 99999; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 28px; border-radius: 26px; background: rgba(36,27,48,.96); border: 2px solid var(--accent-2, #ffc247); color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: kPop .5s ease-out; pointer-events: none; }
.k-sticker-pop span { font-size: 4rem; line-height: 1; }
.k-sticker-pop b { font-size: 1.2rem; }
@keyframes kPop { from { transform: translate(-50%, -50%) scale(.3); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* learning activities (kids/activities.js) */
.k-wotd { display: flex; align-items: center; gap: 14px; width: 100%; margin: -6px 0 18px; padding: 10px 16px; border-radius: 20px; cursor: pointer; color: var(--text); text-align: start;
  border: 2px dashed rgba(181,140,255,.6); background: rgba(181,140,255,.14); }
.k-wotd.done { border-style: solid; border-color: var(--ok, #5ed38a); background: rgba(94,211,138,.12); }
.k-wotd .k-pic { font-size: 2.6rem; flex: none; }
.k-wotd-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.k-wotd-t small { font-weight: 800; color: #c4a8ff; font-size: .85rem; }
.k-wotd-t b { font-size: 1.3rem; }
.k-wotd-t i { font-style: normal; color: var(--text-dim); font-size: .9rem; }
.k-wotd-go { font-size: 1.6rem; flex: none; }
.k-input { padding: 12px 14px; border-radius: 14px; border: 2px solid var(--glass-border, rgba(255,255,255,.2)); background: rgba(255,255,255,.08); color: var(--text); font: inherit; font-size: 1.1rem; max-width: 70vw; }
.k-chatbox { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 14px; }
.k-chat { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; }
.k-chat p { margin: 0; padding: 10px 14px; border-radius: 18px; font-size: 1.1rem; line-height: 1.4; }
.k-chat.lulu p { background: rgba(181,140,255,.25); border-bottom-left-radius: 4px; }
.k-chat.me { align-self: flex-end; }
.k-chat.me p { background: rgba(255,194,71,.3); border-bottom-right-radius: 4px; }
.k-chat-owl { font-size: 2rem; }
.k-center-row { justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.k-mic.on { background: #e84a4a; color: #fff; }
.k-rep-text { font-size: 1.35rem; line-height: 1.5; text-align: center; }
.k-readself { font-size: 1.45rem; line-height: 1.9; text-align: center; }
.k-rw { padding: 1px 3px; border-radius: 6px; transition: background .2s ease; }
.k-rw.ok { background: rgba(94,211,138,.45); }
.k-colour-svg { display: block; width: min(420px, 92vw); margin: 8px auto; border-radius: 18px; touch-action: manipulation; }
.k-colour-task .k-ask { font-size: 1.25rem; }
.k-palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 10px 0; }
.k-swatch { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); cursor: pointer; }
.k-swatch.on { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 0 3px var(--accent-2, #ffc247); }
.k-draw { width: min(360px, 92vw); margin: 8px auto; }
.k-draw canvas { width: 100%; height: auto; border-radius: 18px; background: #fff; touch-action: none; display: block; cursor: crosshair; }
.k-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.k-gal { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 14px; border: 0; background: rgba(255,255,255,.08); color: var(--text); cursor: pointer; }
.k-gal img { width: 100%; border-radius: 10px; background: #fff; }
.k-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.k-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 18px; background: rgba(255,255,255,.06); }
.k-stat span { font-size: 1.8rem; } .k-stat b { font-size: 1.4rem; } .k-stat small { color: var(--text-dim); }
.k-tip { padding: 14px 16px; border-radius: 18px; background: rgba(255,194,71,.14); border: 1px solid rgba(255,194,71,.45); margin-bottom: 14px; }
.k-tip p { margin: 6px 0 0; line-height: 1.6; }
.k-cert { margin: 12px auto; max-width: 640px; padding: 14px; border-radius: 18px; background: #fffaf0; color: #3a2a12; }
.k-cert-in { border: 6px double #d4a017; border-radius: 12px; padding: 22px 18px; text-align: center; }
.k-cert-top { font-weight: 800; color: #8a6d1d; }
.k-cert h2 { margin: 8px 0; font-size: 1.8rem; color: #b45309; }
.k-cert-name { font-size: 1.9rem; font-weight: 900; margin: 10px 0; border-bottom: 2px solid #d4a017; display: inline-block; padding: 0 20px; }
.k-cert-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 12px 0; font-size: 1.1rem; }
.k-cert-well { font-weight: 800; font-size: 1.2rem; }
.k-cert-date { color: #8a6d1d; }
@media print {
  body.k-printing * { visibility: hidden !important; }
  body.k-printing #kCert, body.k-printing #kCert * { visibility: visible !important; }
  body.k-printing #kCert { position: fixed; left: 0; top: 0; width: 100%; max-width: none; margin: 0; }
}
.k-colour-page { width: min(560px, 94vw); margin: 8px auto; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.k-colour-page canvas { display: block; width: 100%; height: auto; cursor: pointer; touch-action: manipulation; }
.k-col-dot { display: inline-block; width: 1em; height: 1em; border-radius: 50%; vertical-align: -0.15em; border: 2px solid rgba(255,255,255,.7); }
.k-credit-small { font-size: .72rem; color: var(--text-dim); }
.k-colour-page > svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.k-colour-page .k-fillable { transition: fill .25s ease; }
.k-home { margin-inline-end: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--glass-border, rgba(255,255,255,.25)); background: rgba(255,255,255,.08); color: var(--text); font: inherit; font-size: .95rem; font-weight: 800; cursor: pointer; }
