/* TheSmallBook Kids · kids.css (v324)
   A storybook, not a dashboard: warm paper, painted skies, one big
   friendly typeface (Baloo 2 covers English and Hindi), huge tap targets. */
:root {
  --k-paper: #fff8e6; --k-ink: #2b2118; --k-mu: #6B5C49; --k-yel: #ffc800; --k-yel-soft: #fff1bf;
  --k-edge: rgba(43, 33, 24, .12); --k-sh: 0 2px 4px rgba(43, 33, 24, .05), 0 14px 30px -14px rgba(43, 33, 24, .35);
  --k-spring: cubic-bezier(.16, 1, .3, 1); --k-ease: cubic-bezier(.22, 1, .36, 1);
  --k-font: "Baloo 2", "Nirmala UI", "Noto Sans Devanagari", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--k-paper); color: var(--k-ink); font-family: var(--k-font); }
body.kids-body { min-height: 100vh; min-height: 100dvh; overscroll-behavior: none;
  background: radial-gradient(120% 60% at 50% -10%, #ffe9a8 0%, rgba(255, 233, 168, 0) 60%), var(--k-paper); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
.kids { max-width: 620px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 18px); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- top bar ---------- */
.k-top { display: flex; align-items: center; gap: 10px; height: 52px; }
.k-icon, .k-stars, .k-exit { flex: none; height: 48px; min-width: 48px; border-radius: 16px; background: #fff; border: 1px solid var(--k-edge); box-shadow: var(--k-sh); display: inline-flex; align-items: center; justify-content: center; }
.k-stars { padding: 0 14px; gap: 6px; font-weight: 800; font-size: 20px; }
/* v384: a gold star on white is 1.5:1. The glyph is a picture, so it needs 3:1,
   and the deeper amber holds it without losing the warm kids palette. */
.k-stars b { color: #8A5F00; font-size: 22px; text-shadow: 0 1px 0 #d9a400; }
.k-lang { margin-left: auto; display: flex; padding: 4px; border-radius: 16px; background: #fff; border: 1px solid var(--k-edge); box-shadow: var(--k-sh); }
.k-lang button { border: 0; background: none; height: 40px; min-width: 52px; border-radius: 12px; font-weight: 800; font-size: 17px; color: var(--k-mu); transition: background-color .2s, color .2s, transform .3s var(--k-spring); }
.k-lang button.on { background: var(--k-yel); color: var(--k-ink); }
.k-lang button:active { transform: scale(.92); }
.k-exit { position: relative; padding: 0; border-radius: 50%; width: 48px; font-size: 18px; color: var(--k-mu); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.k-exit svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.k-exit__ring { fill: none; stroke: var(--k-yel); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 0 100; opacity: 0; }
.k-exit.is-holding .k-exit__ring { opacity: 1; stroke-dasharray: 100 100; transition: stroke-dasharray 2s linear; }
.k-exit.is-holding { transform: scale(.94); }
.k-tip { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 72px); transform: translate(-50%, -10px); opacity: 0; pointer-events: none; z-index: 50; max-width: calc(100vw - 32px);
  background: var(--k-ink); color: #fff8e6; font-weight: 700; font-size: 15px; padding: 10px 16px; border-radius: 14px; transition: opacity .25s, transform .35s var(--k-spring); text-align: center; }
.k-tip.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- picker ---------- */
.kp-head { padding: 18px 4px 6px; }
.kp-title { margin: 0; font-size: 42px; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; }
.kp-sub { margin: 6px 0 0; font-size: 18px; line-height: 1.4; color: var(--k-mu); font-weight: 600; }
.kp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.kp-card { position: relative; display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; background: #fff; border: 1px solid var(--k-edge); box-shadow: var(--k-sh);
  animation: kpIn .6s var(--k-spring) both; animation-delay: calc(var(--i) * .07s); transition: transform .3s var(--k-spring); }
.kp-card:active { transform: scale(.96); }
.kp-card .ks-scene { aspect-ratio: 1 / .82; border-radius: 0; }
.kp-card__t { padding: 10px 14px 0; font-size: 19px; line-height: 1.15; font-weight: 800; }
.kp-card__m { padding: 2px 14px 14px; font-size: 14px; font-weight: 700; color: var(--k-mu); display: flex; align-items: center; gap: 6px; }
.kp-star { color: var(--k-yel); font-size: 20px; text-shadow: 0 1px 0 #d9a400; }
@keyframes kpIn { from { opacity: 0; transform: translateY(18px) scale(.94); } }
.kp-foot { margin: auto 0 0; padding-top: 22px; text-align: center; font-size: 13px; font-weight: 600; color: var(--k-mu); }

/* ---------- scenes ---------- */
.ks-scene { position: relative; overflow: hidden; border-radius: 28px; isolation: isolate; }
.ks-actor { position: absolute; transform: translate(-50%, -50%); line-height: 1; z-index: 2; animation: ksPop .6s var(--k-spring) both; animation-delay: var(--d); filter: drop-shadow(0 6px 6px rgba(43, 33, 24, .18)); }
.ks-sun { position: absolute; right: 12%; top: 10%; width: 18%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #fff6c9 0 40%, #ffd85a 41% 100%); box-shadow: 0 0 40px 10px rgba(255, 216, 90, .45); z-index: 0; }
.ks-hill { position: absolute; border-radius: 50%; z-index: 1; }
.ks-hill--a { left: -20%; right: 30%; bottom: -38%; height: 70%; }
.ks-hill--b { left: 35%; right: -25%; bottom: -44%; height: 72%; }
.ks-bg-forest { background: linear-gradient(#bfe8ff, #e9f7ff 58%); } .ks-bg-forest .ks-hill--a { background: #8fd18a; } .ks-bg-forest .ks-hill--b { background: #6cbf6a; }
.ks-bg-river { background: linear-gradient(#bfe8ff, #e9f7ff 50%, #7cc8e8 50%, #4fb0d9); } .ks-bg-river .ks-hill--a { background: #8fd18a; left: -30%; right: 50%; bottom: 30%; height: 40%; } .ks-bg-river .ks-hill--b { display: none; }
.ks-bg-lake { background: linear-gradient(#cdeeff, #eaf8ff 46%, #8fd3ec 46%, #5bbbe0); } .ks-bg-lake .ks-hill { display: none; }
.ks-bg-dry { background: linear-gradient(#ffe2a8, #fff3d6 55%); } .ks-bg-dry .ks-hill--a { background: #e9c58c; } .ks-bg-dry .ks-hill--b { background: #d9ad6b; }
.ks-bg-sky { background: linear-gradient(#9fd8ff, #dff3ff); } .ks-bg-sky .ks-hill--a { background: #a7dc9c; bottom: -52%; } .ks-bg-sky .ks-hill--b { background: #8bcf80; bottom: -56%; }
.ks-bg-farm { background: linear-gradient(#bfe8ff, #fff4d6 60%); } .ks-bg-farm .ks-hill--a { background: #f1d27a; } .ks-bg-farm .ks-hill--b { background: #e4bf55; }
.ks-bg-well { background: radial-gradient(circle at 50% 70%, #2f6f8f 0 26%, #4d4033 27% 34%, #bfe8ff 35%); } .ks-bg-well .ks-hill, .ks-bg-well .ks-sun { display: none; }
@keyframes ksPop { from { opacity: 0; transform: translate(-50%, -30%) scale(.4); } }
.ks-m-bob { animation: ksPop .6s var(--k-spring) both, ksBob 3.2s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.ks-m-sway { animation: ksPop .6s var(--k-spring) both, ksSway 5s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); transform-origin: 50% 100%; }
.ks-m-swim { animation: ksPop .6s var(--k-spring) both, ksSwim 4s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.ks-m-hop { animation: ksPop .6s var(--k-spring) both, ksHop 1.4s var(--k-ease) infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.ks-m-fly { animation: ksPop .6s var(--k-spring) both, ksFly 2.4s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.ks-m-pulse { animation: ksPop .6s var(--k-spring) both, ksPulse 1.8s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.ks-m-shake { animation: ksPop .6s var(--k-spring) both, ksShake 2.2s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.ks-m-leap { animation: ksLeap 1.1s var(--k-spring) both; animation-delay: var(--d); }
.ks-m-drop { animation: ksDrop 1.2s cubic-bezier(.5, 0, .75, 0) both infinite; animation-delay: var(--d); }
.ks-m-fall { animation: ksFall 1.6s cubic-bezier(.5, 0, .75, 0) both; animation-delay: var(--d); }
.ks-m-mirror { transform: translate(-50%, -50%) scaleY(-1); opacity: .55; filter: blur(.5px) hue-rotate(180deg) saturate(.6); animation: ksMirror 2.4s ease-in-out infinite; }
.ks-m-think { animation: ksPop .6s var(--k-spring) both, ksThink 2s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.ks-m-slither { animation: ksPop .6s var(--k-spring) both, ksSwim 2.6s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.ks-m-dig { animation: ksPop .6s var(--k-spring) both, ksDig .7s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .6s); }
.ks-m-away { animation: ksAway 2.4s var(--k-ease) both; animation-delay: var(--d); }
.ks-m-none { }
@keyframes ksBob { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, -60%); } }
@keyframes ksSway { 0%, 100% { transform: translate(-50%, -50%) rotate(-2deg); } 50% { transform: translate(-50%, -50%) rotate(2deg); } }
@keyframes ksSwim { 0%, 100% { transform: translate(-56%, -50%); } 50% { transform: translate(-44%, -54%); } }
@keyframes ksHop { 0%, 100% { transform: translate(-50%, -50%); } 40% { transform: translate(-50%, -85%); } }
@keyframes ksFly { 0%, 100% { transform: translate(-50%, -50%) rotate(-3deg); } 50% { transform: translate(-50%, -66%) rotate(3deg); } }
@keyframes ksPulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.15); } }
@keyframes ksShake { 0%, 80%, 100% { transform: translate(-50%, -50%); } 84% { transform: translate(-56%, -50%); } 88% { transform: translate(-44%, -50%); } 92% { transform: translate(-54%, -50%); } }
@keyframes ksLeap { 0% { opacity: 0; transform: translate(-50%, 160%) scale(.8); } 60% { opacity: 1; transform: translate(-50%, -80%); } 100% { transform: translate(-50%, -50%); } }
@keyframes ksDrop { 0% { transform: translate(-50%, -260%); opacity: 0; } 15% { opacity: 1; } 80% { transform: translate(-50%, -50%); opacity: 1; } 100% { transform: translate(-50%, -50%); opacity: 0; } }
@keyframes ksFall { 0% { transform: translate(-50%, -150%) rotate(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(-50%, 120%) rotate(200deg); opacity: 1; } }
@keyframes ksMirror { 0%, 100% { transform: translate(-50%, -50%) scaleY(-1) skewX(0); } 50% { transform: translate(-50%, -50%) scaleY(-1) skewX(4deg); } }
@keyframes ksThink { 0%, 100% { transform: translate(-50%, -50%) rotate(0); } 50% { transform: translate(-50%, -50%) rotate(-8deg); } }
@keyframes ksDig { 0%, 100% { transform: translate(-50%, -50%) rotate(0); } 50% { transform: translate(-50%, -42%) rotate(10deg); } }
@keyframes ksAway { 0% { opacity: 0; transform: translate(-200%, -50%); } 30% { opacity: 1; } 100% { transform: translate(-50%, -50%); opacity: .9; } }

/* ---------- story ---------- */
.kr-title { margin: 8px 4px 10px; font-size: 18px; font-weight: 800; color: var(--k-mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kr-stage { flex: 1; display: flex; flex-direction: column; gap: 14px; transition: opacity .18s ease, transform .18s ease; }
.kr-stage .ks-scene { flex: none; height: min(38vh, 330px); box-shadow: var(--k-sh); border: 1px solid var(--k-edge); }
.kr-stage.is-out { opacity: 0; transform: translateX(-30px); } .kr-stage.is-outback { opacity: 0; transform: translateX(30px); }
.kr-stage.is-in { animation: krIn .42s var(--k-ease) both; } .kr-stage.is-inback { animation: krInBack .42s var(--k-ease) both; }
.kr-stage.is-fresh { animation: krFresh .5s var(--k-ease) both; }
@keyframes krIn { from { opacity: 0; transform: translateX(34px); } }
@keyframes krInBack { from { opacity: 0; transform: translateX(-34px); } }
@keyframes krFresh { from { opacity: 0; transform: translateY(16px); } }
.kr-text { background: #fff; border-radius: 26px; border: 1px solid var(--k-edge); box-shadow: var(--k-sh); padding: 18px 20px; }
.kr-text p { margin: 0; font-size: clamp(23px, 6.4vw, 30px); line-height: 1.5; font-weight: 600; letter-spacing: .005em; }
.kr-text[lang="hi"] p { line-height: 1.65; font-size: clamp(24px, 6.6vw, 31px); }
.kw { display: inline-block; border-radius: 10px; padding: 0 3px; margin: 0 -3px; transition: background-color .15s, color .15s, transform .25s var(--k-spring); cursor: pointer; }
.kw--g { background-image: radial-gradient(circle, var(--tint, #e76f51) 1.4px, transparent 1.6px); background-size: 7px 4px; background-repeat: repeat-x; background-position: 0 100%; padding-bottom: 2px; }
.kw.is-read { color: #6d5f4f; }
.kw.is-now { background-color: var(--k-yel); color: var(--k-ink); transform: translateY(-2px) scale(1.06); box-shadow: 0 6px 12px -6px rgba(217, 164, 0, .8); }
.kw.is-tap { animation: kwTap .45s var(--k-spring); }
@keyframes kwTap { 40% { transform: scale(1.22) rotate(-3deg); background-color: var(--k-yel-soft); } }
.kr-dots { display: flex; justify-content: center; gap: 7px; margin: 14px 0 10px; }
.kr-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(43, 33, 24, .14); transition: width .35s var(--k-spring), background-color .2s; }
.kr-dots i.done { background: rgba(43, 33, 24, .38); }
.kr-dots i.on { width: 26px; border-radius: 6px; background: var(--k-ink); }
.kr-dots i.star { background: none; width: auto; height: auto; font-style: normal; line-height: 9px; font-size: 13px; color: var(--k-yel); }
.kr-dots i.star::before { content: "★"; }
.kr-ctrl { display: flex; align-items: center; gap: 12px; }
.kr-nav { flex: none; width: 64px; height: 64px; border-radius: 22px; border: 1px solid var(--k-edge); background: #fff; box-shadow: var(--k-sh); display: flex; align-items: center; justify-content: center; transition: transform .3s var(--k-spring), opacity .2s; }
.kr-nav:active { transform: scale(.9); }
.kr-nav[disabled] { opacity: .35; pointer-events: none; }
.kr-play { flex: 1; height: 64px; border-radius: 22px; border: 0; background: var(--k-yel); color: var(--k-ink); font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 12px;
  box-shadow: 0 2px 0 #e0ae00, 0 16px 30px -14px rgba(217, 164, 0, .9); transition: transform .3s var(--k-spring); }
.kr-play:active { transform: scale(.95); }
.kr-play__ico { width: 38px; height: 38px; border-radius: 50%; background: var(--k-ink); color: var(--k-yel); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; letter-spacing: -2px; }
.kr-play.is-on .kr-play__ico { animation: krBeat 1s ease-in-out infinite; }
@keyframes krBeat { 50% { transform: scale(1.12); } }
.kr-play--home { text-align: center; }

/* meaning bubble */
.kb { position: fixed; z-index: 60; background: var(--k-ink); color: #fff8e6; border-radius: 18px; padding: 12px 16px 14px; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .55);
  opacity: 0; transform: translateY(8px) scale(.9); transform-origin: var(--ax, 50%) 100%; transition: opacity .2s, transform .38s var(--k-spring); pointer-events: none; }
.kb.kb--below { transform-origin: var(--ax, 50%) 0; }
.kb.show { opacity: 1; transform: none; }
.kb::after { content: ""; position: absolute; left: calc(var(--ax, 50%) - 9px); bottom: -8px; border: 9px solid transparent; border-bottom: 0; border-top-color: var(--k-ink); }
.kb.kb--below::after { bottom: auto; top: -8px; border-top: 0; border-bottom: 9px solid var(--k-ink); }
.kb b { display: block; font-size: 22px; line-height: 1.2; color: var(--k-yel); font-weight: 800; }
.kb span { display: block; font-size: 17px; line-height: 1.35; font-weight: 600; margin-top: 2px; }

/* moral + star */
.kr-moral { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 8px 0; }
.kr-starburst { position: relative; width: 150px; height: 150px; display: flex; align-items: center; justify-content: center; }
.kr-starburst span { font-size: 128px; line-height: 1; color: var(--k-yel); text-shadow: 0 4px 0 #d9a400, 0 18px 40px rgba(255, 200, 0, .6); animation: krStar 1s var(--k-spring) both; }
.kr-starburst i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--tint, #e76f51); animation: krSpark 1s var(--k-ease) both .25s; }
.kr-starburst i:nth-child(2) { --a: 0deg; } .kr-starburst i:nth-child(3) { --a: 45deg; background: var(--k-yel); } .kr-starburst i:nth-child(4) { --a: 90deg; } .kr-starburst i:nth-child(5) { --a: 135deg; background: #3a86ff; }
.kr-starburst i:nth-child(6) { --a: 180deg; } .kr-starburst i:nth-child(7) { --a: 225deg; background: var(--k-yel); } .kr-starburst i:nth-child(8) { --a: 270deg; } .kr-starburst i:nth-child(9) { --a: 315deg; background: #2a9d8f; }
@keyframes krStar { 0% { transform: scale(0) rotate(-180deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes krSpark { 0% { transform: translate(-50%, -50%) rotate(var(--a)) translateY(0) scale(1); opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(var(--a)) translateY(-110px) scale(.2); opacity: 0; } }
.kr-earned { margin: 6px 0 0; font-size: 24px; font-weight: 800; animation: krFresh .5s var(--k-ease) both .5s; }
.kr-moral__k { margin-top: 18px; font-size: 14px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--k-mu); }
.kr-moral__t { margin: 6px 0 22px; font-size: clamp(28px, 8vw, 38px); line-height: 1.25; font-weight: 800; max-width: 22ch; }
.kr-again { display: inline-flex; align-items: center; height: 56px; padding: 0 26px; border-radius: 20px; background: #fff; border: 1px solid var(--k-edge); box-shadow: var(--k-sh); font-size: 19px; font-weight: 800; }

@media (min-width: 560px) { .kp-grid { gap: 18px; } .kp-title { font-size: 52px; } }
@media (max-width: 350px) { .kp-grid { grid-template-columns: 1fr; } .kr-nav { width: 56px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== v334 Kids mode: grown-up setup, living sky hero, today's story ===== */
/* setup */
.kg { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 0 12px; }
.kg-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.kg-dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--k-edge); transition: width .4s var(--k-spring), background-color .3s; }
.kg-dots i.on { width: 26px; background: var(--k-yel); }
.kg-card { background: #fff; border: 1px solid var(--k-edge); border-radius: 30px; box-shadow: var(--k-sh); padding: 22px 20px 20px; text-align: center; animation: kgIn .6s var(--k-spring) both; }
@keyframes kgIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.kg-art { position: relative; height: 132px; display: grid; place-items: center; margin: 2px 0 18px; overflow: hidden; }
.kg-shield { font-size: 56px; animation: kBob 3s ease-in-out infinite; }
.kg-orbit { position: absolute; inset: 0; animation: kSpin 14s linear infinite; }
.kg-orbit i { position: absolute; left: 50%; top: 50%; font-style: normal; font-size: 24px; transform: rotate(calc(var(--i) * 90deg)) translate(58px) rotate(calc(var(--i) * -90deg)); margin: -14px 0 0 -12px; }
@keyframes kSpin { to { transform: rotate(360deg); } }
.kg-wave { font-size: 76px; display: inline-block; transform-origin: 70% 80%; animation: kWave 1.6s ease-in-out infinite; }
@keyframes kWave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-10deg); } }
.kg-kick { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9a6a00; }
.kg-h { margin: 4px 0 12px; font-size: 30px; line-height: 1.1; font-weight: 800; }
.kg-list { list-style: none; margin: 0 0 18px; padding: 0; text-align: left; display: grid; gap: 8px; }
.kg-list li { position: relative; padding: 10px 12px 10px 40px; border-radius: 16px; background: var(--k-paper); font-size: 16px; font-weight: 600; line-height: 1.3; }
.kg-list li::before { content: ""; position: absolute; left: 14px; top: 50%; width: 14px; height: 8px; margin-top: -6px; border-left: 3px solid #2a9d8f; border-bottom: 3px solid #2a9d8f; transform: rotate(-45deg); }
.kg-list li.kg-lock { background: var(--k-yel-soft); }
.kg-list li.kg-lock::before { border: 0; width: 12px; height: 10px; margin-top: -3px; border-radius: 2px; background: #9a6a00; transform: none; box-shadow: 0 -7px 0 -2px #fff1bf, 0 -8px 0 0 #9a6a00; }
.kg-foot { margin: -6px 0 14px; font: 600 13px/1.4 var(--k-font); color: var(--k-mu); text-align: center; }
.kg-foot::before { content: "\1F512"; margin-right: 6px; font-size: 11px; }
.kg-in { width: 100%; height: 58px; border-radius: 18px; border: 2px solid var(--k-edge); background: var(--k-paper); padding: 0 18px; font: 700 20px var(--k-font); color: var(--k-ink); text-align: center; margin-bottom: 16px; outline: none; transition: border-color .2s; }
.kg-in:focus { border-color: var(--k-yel); }
.kg-in::placeholder { color: var(--k-mu); font-weight: 600; font-size: 16px; }
.kg-go { width: 100%; height: 60px; border: 0; border-radius: 20px; background: var(--k-yel); font-size: 20px; font-weight: 800; box-shadow: 0 6px 0 #d9a400, 0 14px 24px -12px rgba(160, 110, 0, .6); transition: transform .15s, box-shadow .15s; }
.kg-go:active { transform: translateY(4px); box-shadow: 0 2px 0 #d9a400; }
.kg-skip { margin-top: 10px; border: 0; background: none; font-size: 16px; font-weight: 700; color: var(--k-mu); min-height: 44px; padding: 0 16px; }
.kg-buddies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 6px 0 20px; }
.kg-bud { aspect-ratio: 1; border-radius: 24px; border: 3px solid transparent; background: var(--k-paper); font-size: 44px; transition: transform .35s var(--k-spring), border-color .2s, background-color .2s; }
.kg-bud.on { border-color: var(--k-yel); background: var(--k-yel-soft); transform: scale(1.06); animation: kPop .5s var(--k-spring); }
@keyframes kPop { 0% { transform: scale(.9); } 60% { transform: scale(1.12); } 100% { transform: scale(1.06); } }

/* living sky hero */
.kh { margin: 8px 0 4px; }
.kh-sky { position: relative; height: 196px; border-radius: 30px; overflow: hidden; background: linear-gradient(180deg, #8fd3ff 0%, #c4ecff 62%, #fff4d1 100%); box-shadow: var(--k-sh); isolation: isolate; }
.kh-sun { position: absolute; right: 22px; top: 18px; width: 54px; height: 54px; border-radius: 50%; background: #ffd23f; box-shadow: 0 0 0 10px rgba(255, 210, 63, .25), 0 0 40px 12px rgba(255, 210, 63, .45); }
.kh-sun i { position: absolute; inset: -22px; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 210, 63, .55) 0 8deg, transparent 8deg 30deg); -webkit-mask: radial-gradient(closest-side, transparent 62%, #000 64%); mask: radial-gradient(closest-side, transparent 62%, #000 64%); animation: kSpin 18s linear infinite; }
.kh-rain { position: absolute; left: -10%; right: -10%; top: 58px; height: 220px; border-radius: 50%; background: radial-gradient(closest-side, transparent 78%, rgba(255, 99, 99, .32) 79%, rgba(255, 170, 60, .32) 83%, rgba(255, 230, 80, .32) 87%, rgba(90, 200, 120, .3) 91%, rgba(80, 150, 255, .28) 95%, transparent 96%); opacity: 0; animation: kRain 1.4s .5s ease-out forwards; }
@keyframes kRain { to { opacity: 1; } }
.kh-cloud { position: absolute; width: 90px; height: 28px; border-radius: 99px; background: #fff; opacity: .95; animation: kDrift linear infinite; }
.kh-cloud::before, .kh-cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.kh-cloud::before { width: 40px; height: 40px; left: 14px; top: -20px; }
.kh-cloud::after { width: 30px; height: 30px; left: 46px; top: -13px; }
.kh-cloud--a { top: 40px; animation-duration: 26s; animation-delay: -6s; }
.kh-cloud--b { top: 78px; transform: scale(.7); animation-duration: 34s; animation-delay: -20s; opacity: .8; }
.kh-cloud--c { top: 26px; transform: scale(.55); animation-duration: 40s; animation-delay: -30s; opacity: .7; }
@keyframes kDrift { from { left: -110px; } to { left: 110%; } }
.kh-tw { position: absolute; left: var(--x); top: var(--y); width: 10px; height: 10px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: kTw 2.4s calc(var(--i) * .7s) ease-in-out infinite; }
@keyframes kTw { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
.kh-hill { position: absolute; border-radius: 50%; }
.kh-hill--a { left: -12%; right: 30%; bottom: -70px; height: 130px; background: #7cc96b; }
.kh-hill--b { left: 34%; right: -14%; bottom: -64px; height: 120px; background: #5fb35a; }
.kh-parade { position: absolute; left: 0; bottom: 14px; display: flex; gap: 14px; animation: kWalk 22s linear infinite; }
.kh-parade i { font-style: normal; font-size: 30px; display: inline-block; animation: kHop .6s calc(var(--i) * .1s) ease-in-out infinite alternate; }
@keyframes kWalk { from { transform: translateX(-110%); } to { transform: translateX(110vw); } }
@keyframes kHop { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-6px) rotate(4deg); } }
.kh-buddy { position: absolute; left: 18px; top: 46px; font-size: 64px; transform-origin: 50% 100%; animation: kBuddy 2.8s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(0, 60, 90, .25)); }
.kh--fresh .kh-buddy { animation: kLand .9s var(--k-spring) both, kBuddy 2.8s .9s ease-in-out infinite; }
@keyframes kLand { from { transform: translateY(-160px) rotate(-20deg); } 70% { transform: translateY(6px) rotate(4deg); } to { transform: none; } }
@keyframes kBuddy { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes kBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.kh-title { margin: 14px 0 0; font-size: 40px; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; }
.kh-title span { display: inline-block; animation: kLetter .7s calc(var(--i) * .04s + .15s) var(--k-spring) both; }
@keyframes kLetter { from { opacity: 0; transform: translateY(18px) scale(.6) rotate(-8deg); } to { opacity: 1; transform: none; } }
.kh-sub { margin: 4px 0 0; font-size: 17px; line-height: 1.4; color: var(--k-mu); font-weight: 600; }
/* today's story */
.kp-card--today { margin-top: 16px; }
.kp-card--today .ks-scene { aspect-ratio: 16 / 8; }
.kp-card--today .kp-card__t { font-size: 24px; padding-top: 4px; }
.kp-card__k { padding: 12px 14px 0; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9a6a00; }
.kp-h { margin: 22px 4px 0; font-size: 22px; font-weight: 800; }
.kp-grid { margin-top: 10px; }
.kp-card { animation: kCard .6s calc(var(--i) * .06s + .2s) var(--k-spring) both; }
@keyframes kCard { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
.kp-change { display: block; margin: 8px auto 0; border: 0; background: none; font: 700 14px var(--k-font); color: var(--k-mu); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
@media (max-width: 350px) { .kh-title { font-size: 32px; } .kh-sky { height: 170px; } .kh-buddy { font-size: 52px; } }
@media (prefers-reduced-motion: reduce) {
  .kh-sky *, .kh-title span, .kp-card, .kg-card, .kg-orbit, .kg-shield, .kg-wave, .kg-bud.on { animation: none !important; }
  .kh-rain { opacity: 1; } .kh-parade { left: 40%; }
}
/* the You page door into Kids mode */

/* v337: parent-owned private voice control inside the safe Kids room. */
.kp-voice{margin:14px 0 0;padding:10px 12px;border:2px solid rgba(62,54,31,.16);border-radius:18px;background:#fff8df;display:flex;align-items:center;gap:10px;justify-content:space-between;font:700 11px/1.2 "Baloo 2",system-ui;color:#68542c}.kp-voice .kp-change{margin:0}.kp-voice span{max-width:45%;text-align:right}

/* v351 · the reader's bottom row was 16px wider than the phone, so the next
   arrow sat half off the screen. The row now shrinks to fit, and the page
   sits in the middle of the space instead of leaving a hole below the text. */
.kr-ctrl { min-width: 0; }
.kr-play { min-width: 0; font-size: clamp(17px, 5vw, 22px); padding: 0 10px; }
.kr-play__ico { flex: none; }
.kr-stage { justify-content: center; }
.kr-stage .ks-scene { height: min(42vh, 360px); }
