/* =====================================================================
   SanSil English World — Child portal (sidebar · top bar · pages)
   ===================================================================== */
body.area-kid { background: #CFEFFF; padding-bottom: calc(76px + var(--safe-bottom)); }
body.area-kid .sky { display: none; }
.kid-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(80% 50% at 50% 100%, #8FD46B 0 38%, transparent 38.5%),
    radial-gradient(60% 40% at 0% 100%, #6CC04A 0 50%, transparent 50.5%),
    radial-gradient(60% 40% at 100% 100%, #6CC04A 0 50%, transparent 50.5%),
    linear-gradient(180deg, #4FB3F6 0%, #8CD2FB 40%, #D2EEFF 75%, #E9F8FF 100%); }
.kid-bg .cloud { opacity: .75; }

/* ---------- Sidebar (desktop) ---------- */
.kid-side { display: none; }
.ks-link { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 1.12rem;
  background: rgba(255,255,255,.1); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); transition: transform .12s, background .12s; }
.ks-link small { display: none; }
body.show-ar .ks-link small.ar { display: block; font-size: .8rem; opacity: .85; line-height: 1; }
.ks-link:hover { background: rgba(255,255,255,.2); transform: translateX(3px); }
.ks-link.is-active { background: linear-gradient(180deg, #FFE57F, var(--sun) 60%); color: #B23A00; box-shadow: 0 5px 0 var(--sun-d), 0 8px 16px rgba(0,0,0,.2); }
.ks-ico { width: 34px; height: 34px; display: grid; place-items: center; font-size: 1.35rem; flex: none; }

/* ---------- Top bar ---------- */
.kid-main { min-width: 0; padding: calc(8px + var(--safe-top)) 10px 16px; }
.kid-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "me actions" "counters counters" "xp xp"; align-items: center; gap: 8px 10px;
  padding: 8px 10px; border-radius: 26px; background: rgba(255,255,255,.55); backdrop-filter: blur(8px); box-shadow: var(--shadow-soft); }
.kt-me { grid-area: me; display: flex; align-items: center; gap: 8px; min-width: 0; }
.kt-avatar { width: 52px; height: 52px; flex: none; display: grid; place-items: center; font-size: 2rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--sun-l) 60%, var(--sun)); box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--sun), 0 6px 10px rgba(0,0,0,.2); }
.kt-name { display: grid; line-height: 1.1; min-width: 0; }
.kt-name b { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--brand-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kt-level { width: max-content; padding: 1px 10px; border-radius: var(--r-pill); background: linear-gradient(180deg, #B26CE0, var(--brand-purple)); color: #fff; font-weight: 800; font-size: .85rem; box-shadow: 0 2px 0 var(--grape-d); }
.kt-xp { grid-area: xp; display: flex; align-items: center; gap: 4px; }
.kt-xp-star { font-size: 1.8rem; margin-inline-end: -16px; z-index: 1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.2)); }
.kt-xp-bar { position: relative; flex: 1; height: 26px; border-radius: var(--r-pill); background: #1D3F8F; box-shadow: inset 0 3px 4px rgba(0,0,0,.35), 0 0 0 3px #fff; overflow: hidden; }
.kt-xp-bar > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(180deg, #FFE57F, var(--sun) 55%, var(--sun-d)); }
.kt-xp-bar b { position: relative; display: block; text-align: center; color: #fff; font-family: var(--font-head); font-weight: 600; line-height: 26px; text-shadow: 0 1px 2px rgba(0,0,0,.6); font-size: .95rem; }
.kt-counters { grid-area: counters; display: flex; justify-content: space-around; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: rgba(255,255,255,.7); box-shadow: inset 0 -2px 0 rgba(0,0,0,.06); }
.kt-c { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--brand-navy); }
.kt-c .coin { font-size: 1.25rem; }
.kt-plus { display: none; width: 22px; height: 22px; border-radius: 50%; place-items: center; background: var(--mint); color: #fff; font-size: 1rem; box-shadow: 0 2px 0 var(--mint-d); }
.kt-actions { grid-area: actions; display: flex; gap: 6px; }
.kt-actions .icon-btn { width: 42px; height: 42px; }
.kt-exit { background: linear-gradient(180deg, #2F5BC4, #12398F) !important; color: #fff !important; box-shadow: 0 4px 0 #0B2A6F !important; }
.kt-actions #btnSound { display: none; }
.flash-err { background: #FFEBEE; color: var(--red-d); box-shadow: inset 0 -3px 0 var(--red-l); }
.demo-pill { width: max-content; margin: 8px auto 0; padding: 2px 12px; border-radius: var(--r-pill); background: var(--pink-l); color: var(--pink-d); font-size: .8rem; font-weight: 800; }
.kid-content { margin-top: 12px; }

/* ---------- Bottom tabs (mobile) ---------- */
.kid-tabs { position: fixed; left: 8px; right: 8px; bottom: calc(8px + var(--safe-bottom)); z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px; border-radius: 26px; background: rgba(255,255,255,.96); box-shadow: 0 8px 24px rgba(11,42,111,.25); }
.kid-tabs a { display: grid; justify-items: center; gap: 0; padding: 6px 2px; border-radius: 18px; font-family: var(--font-head); font-weight: 600; font-size: .78rem; color: var(--ink-2); }
.kid-tabs a span { font-size: 1.45rem; line-height: 1.1; }
.kid-tabs a.is-active { background: linear-gradient(180deg, #FFE57F, var(--sun)); color: #B23A00; box-shadow: 0 3px 0 var(--sun-d); }

/* ---------- Home ---------- */
.kh { position: relative; display: grid; gap: 14px; }
.kh-chars { display: none; }
.welcome-cloud { position: relative; text-align: center; padding: 18px 16px 16px; border-radius: 40px; background: #fff;
  box-shadow: 0 8px 0 rgba(144,202,249,.6), var(--shadow-soft); }
.welcome-cloud::before, .welcome-cloud::after { content: ""; position: absolute; top: -22px; width: 70px; height: 70px; border-radius: 50%; background: #fff; z-index: -1; }
.welcome-cloud::before { left: 18%; } .welcome-cloud::after { right: 20%; width: 90px; height: 90px; top: -30px; }
.welcome-cloud h1 { font-size: clamp(1.5rem, 6vw, 2.3rem); color: var(--brand-navy); line-height: 1.05; }
.welcome-cloud h1 span { color: var(--orange-d); }
.welcome-cloud p { font-weight: 800; color: var(--brand-navy); margin-top: 4px; }
.welcome-cloud p .ar { color: var(--ink-2); font-weight: 700; }

.continue-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 24px; background: linear-gradient(135deg, #6EA8FE, var(--blue)); color: #fff;
  box-shadow: 0 6px 0 var(--blue-d), var(--shadow-soft); }
.cc-ico { width: 58px; height: 58px; flex: none; display: grid; place-items: center; font-size: 2rem; border-radius: 18px; background: rgba(255,255,255,.95); }
.cc-txt { display: grid; flex: 1; min-width: 0; line-height: 1.15; }
.cc-txt small { opacity: .9; font-weight: 700; }
.cc-txt b { font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; }
.cc-txt em { font-style: normal; opacity: .9; font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-play { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--sun); color: #B23A00; font-size: 1.3rem; box-shadow: 0 4px 0 var(--sun-d); animation: pulse 2s infinite; }

.wood-sign { width: max-content; max-width: 100%; margin: 6px auto 0; padding: 8px 26px; border-radius: 16px; font-size: clamp(1.15rem, 4.6vw, 1.7rem); color: #5A2D0C; text-align: center;
  background: repeating-linear-gradient(90deg, #F6C27A 0 40px, #F0B566 40px 80px); border: 3px solid #C98A3D; box-shadow: 0 6px 0 #9A5E1E, var(--shadow-soft); }
.kw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; border-radius: 30px; background: rgba(255,255,255,.45); box-shadow: inset 0 0 0 3px rgba(255,255,255,.7); }
.kw-card { position: relative; display: grid; justify-items: center; padding: 8px 6px 10px; border-radius: 24px; background: rgba(255,255,255,.75); box-shadow: 0 6px 14px rgba(11,42,111,.12); transition: transform .15s; }
.kw-card:hover { transform: translateY(-4px); }
.kw-art { width: 100%; } .kw-art img { width: 100%; height: auto; display: block; }
.kw-label { margin-top: -16px; position: relative; width: 96%; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--wc) 70%, #fff), var(--wc) 60%); color: #fff; border: 3px solid #fff;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--wc) 60%, #000); font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; line-height: 1.05; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.kw-play { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); color: #8E24AA; font-style: normal; font-size: .9rem; box-shadow: 0 3px 0 var(--sun-d); text-shadow: none; }
.kw-prog { width: 80%; height: 6px; margin-top: 6px; border-radius: 6px; background: rgba(0,0,0,.08); overflow: hidden; }
.kw-prog span { display: block; height: 100%; background: var(--wc); }

.kh-progress { position: relative; padding: 26px 12px 12px; border-radius: 28px; background: rgba(255,255,255,.85); box-shadow: var(--shadow-card); margin-top: 10px; }
.kh-progress h2 { position: absolute; top: -18px; left: 50%; translate: -50% 0; white-space: nowrap; padding: 6px 20px; border-radius: var(--r-pill); font-size: 1.2rem; color: #fff;
  background: linear-gradient(180deg, #B26CE0, var(--brand-purple)); box-shadow: 0 4px 0 var(--grape-d); }
.khp-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.khp-row > div { display: grid; justify-items: center; gap: 2px; padding: 4px; }
.khp-row > div + div { border-inline-start: 2px solid #E3F2FD; }
.khp-ico { font-size: 1.8rem; }
.khp-row small { font-weight: 800; color: var(--ink-2); font-size: .8rem; line-height: 1.1; }
.khp-row b { font-family: var(--font-head); font-size: 1.5rem; color: var(--brand-navy); }

.kh-right { display: grid; gap: 14px; align-content: start; }
.k-daily, .k-ach { position: relative; padding: 30px 14px 14px; border-radius: 28px; background: linear-gradient(180deg, #FFFDF0, #FFF3C4); box-shadow: 0 6px 0 #F2C94C, var(--shadow-soft); border: 3px solid #fff; margin-top: 12px; }
.ribbon { position: absolute; top: -18px; left: 50%; translate: -50% 0; white-space: nowrap; padding: 6px 18px; border-radius: 14px; font-size: 1.2rem; color: #fff;
  background: linear-gradient(180deg, #EF5350, var(--red)); box-shadow: 0 4px 0 var(--red-d); }
.ribbon.purple { background: linear-gradient(180deg, #B26CE0, var(--brand-purple)); box-shadow: 0 4px 0 var(--grape-d); }
.kd-task { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 18px; background: #fff; box-shadow: inset 0 -3px 0 #FDE68A; }
.kd-ico { font-size: 2.2rem; }
.kd-task p { font-weight: 800; color: var(--brand-navy); line-height: 1.2; }
.kd-task .ar { display: none; font-size: .9rem; color: var(--ink-2); }
body.show-ar .kd-task .ar { display: block; }
.kd-prog { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; font-weight: 800; color: #92400E; }
.kd-bonus { text-align: center; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: #92400E; margin-bottom: 8px; }
.btn-green { --b: var(--mint); --bl: #81C784; --bd: var(--mint-d); }
.btn-grey { --b: #B0BEC5; --bl: #CFD8DC; --bd: #78909C; }
.btn-wide { width: 100%; }
.k-ach { background: linear-gradient(180deg, #FFFDF0, #FFF6D6); }
.k-ach ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.k-ach li { display: grid; justify-items: center; gap: 4px; }
.k-ach li:not(.earned) .badge-medal { filter: grayscale(1); opacity: .5; }
.k-ach small { font-weight: 800; font-size: .8rem; line-height: 1.1; }

/* ---------- Inner pages ---------- */
.kpage { display: grid; gap: 14px; }
.kpage-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: clamp(1.6rem, 6vw, 2.2rem); color: var(--brand-navy); text-shadow: 0 2px 0 #fff; }
.kpage-title small { font-size: 1.1rem; color: var(--ink-2); }
.coin-big { margin-inline-start: auto; padding: 4px 14px; border-radius: var(--r-pill); background: #fff; font-size: 1.3rem; box-shadow: 0 4px 0 #F2C94C; }
.kcard { padding: 16px; border-radius: 26px; background: rgba(255,255,255,.92); box-shadow: var(--shadow-card); }
.kcard h2 { font-size: 1.25rem; color: var(--brand-navy); margin-bottom: 10px; }
.kcard h2 small { color: var(--ink-2); font-size: .95rem; }
.ksub { font-size: 1.35rem; color: var(--brand-navy); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ksub small { color: var(--ink-2); font-size: 1rem; }
.muted { color: var(--ink-2); }
.back-pill { width: max-content; padding: 6px 14px; border-radius: var(--r-pill); background: #fff; font-weight: 800; color: var(--blue); box-shadow: 0 3px 0 #BBDEFB; }

.kgames { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kgame { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 26px; background: #fff;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--gc) 50%, #fff), var(--shadow-soft); border-top: 6px solid var(--gc); }
.kg-ico { font-size: 2.6rem; }
.kgame h2 { font-size: 1.15rem; color: var(--brand-navy); line-height: 1.1; }
.kgame h2 small { display: none; font-size: .85rem; color: var(--ink-2); }
body.show-ar .kgame h2 small.ar { display: block; }
.kgame p { font-size: .88rem; color: var(--ink-2); font-weight: 700; }
.kgame .kg-count { color: #92400E; }
.kgame .btn { min-height: 44px; padding: 4px 18px; font-size: 1rem; margin-top: auto; }

.klevel { border-radius: 26px; background: rgba(255,255,255,.92); box-shadow: var(--shadow-card); overflow: hidden; border-top: 6px solid var(--lc); }
.klevel summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px; cursor: pointer; flex-wrap: wrap; }
.klevel summary::-webkit-details-marker { display: none; }
.kl-ico { font-size: 2rem; }
.klevel summary b { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; color: var(--brand-navy); display: block; }
.klevel summary small { color: var(--ink-2); font-weight: 700; }
.kl-bar { flex: 1 1 120px; height: 10px; border-radius: 10px; background: #E3F2FD; overflow: hidden; margin-inline-start: auto; max-width: 220px; }
.kl-bar span { display: block; height: 100%; background: var(--lc); }
.kunits { display: grid; gap: 12px; padding: 0 12px 14px; }
.kunit { padding: 10px; border-radius: 20px; background: color-mix(in srgb, var(--uc) 10%, #fff); }
.kunit h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1.1rem; color: var(--brand-navy); margin-bottom: 8px; }
.kunit h2 small { color: var(--ink-2); font-size: .9rem; }

.kstages { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ks-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 #E3F2FD; }
a.ks-row:hover { background: #F5FAFF; }
.ks-num { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--sky); color: #fff; font-family: var(--font-head); font-size: 1.1rem; box-shadow: 0 3px 0 var(--sky-d); }
.ks-completed .ks-num { background: var(--mint); box-shadow: 0 3px 0 var(--mint-d); }
.ks-current .ks-num { background: var(--orange); box-shadow: 0 3px 0 var(--orange-d); animation: pulse 1.6s infinite; }
.ks-locked .ks-row { opacity: .55; }
.ks-locked .ks-num { background: #CFD8DC; box-shadow: 0 3px 0 #90A4AE; }
.ks-num.boss { border-radius: 12px; }
.ks-txt { flex: 1; display: grid; min-width: 0; line-height: 1.15; }
.ks-txt b { font-family: var(--font-head); font-weight: 600; color: var(--brand-navy); }
.ks-txt small { color: var(--ink-2); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ks-stars i { font-style: normal; filter: grayscale(1) opacity(.3); font-size: .9rem; }
.ks-stars i.on { filter: none; }
.ks-go { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--sun); color: #B23A00; font-size: .85rem; box-shadow: 0 3px 0 var(--sun-d); }

.kworld { display: grid; gap: 12px; }
.kworld-head { display: grid; gap: 10px; align-items: center; padding: 14px; border-radius: 28px; background: linear-gradient(135deg, color-mix(in srgb, var(--wc) 18%, #fff), #fff); box-shadow: var(--shadow-card); }
.kworld-art img { width: 100%; max-width: 360px; height: auto; display: block; margin-inline: auto; }
.kworld-head h1 { font-size: 2.2rem; color: var(--wc); filter: brightness(.85); }
.kworld-head p { font-weight: 700; color: var(--brand-navy); }
.kworld-games { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kworld-games span { padding: 2px 10px; border-radius: var(--r-pill); background: #fff; box-shadow: 0 2px 0 #E3F2FD; font-size: .9rem; }

.kchal { display: grid; gap: 14px; }
.k-daily.big { margin-top: 16px; }
.khist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.khist li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: #F5FAFF; }
.khist li > span:first-child { font-size: 1.6rem; }
.khist li > span:nth-child(2) { flex: 1; display: grid; line-height: 1.15; min-width: 0; }
.khist small { color: var(--ink-2); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.khist li > span:last-child { font-weight: 800; color: #92400E; }

.kshop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kitem { display: grid; justify-items: center; gap: 4px; padding: 14px 8px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-card); text-align: center; }
.kitem.owned { background: #F1FAF2; }
.kitem.equipped { outline: 4px solid var(--mint); }
.ki-ico { font-size: 3rem; line-height: 1.1; }
.kitem b { font-family: var(--font-head); font-weight: 600; color: var(--brand-navy); }
.kitem small { color: var(--ink-2); }
.kitem form { margin: 0; }
.kitem .btn { min-height: 42px; padding: 4px 16px; font-size: 1rem; }
.kitem .btn:disabled { opacity: .6; cursor: not-allowed; }
.ki-tag { padding: 4px 12px; border-radius: var(--r-pill); background: #E8F5E9; color: var(--mint-d); font-weight: 800; }
.ki-tag.lock { background: #ECEFF1; color: #607D8B; }
.kbadges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kbadges .badge { padding: 12px 8px; background: #fff; border-radius: 22px; box-shadow: var(--shadow-soft); }
.kbadges .badge small { color: var(--ink-2); font-size: .8rem; }

.kstats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kstats > div { display: grid; justify-items: center; padding: 14px 8px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-card); }
.kstats b { font-family: var(--font-head); font-size: 2rem; color: var(--blue); line-height: 1; }
.kstats small { font-weight: 800; color: var(--ink-2); }
.kchart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 190px; padding-top: 10px; }
.kc-col { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; height: 100%; gap: 4px; }
.kc-val { font-size: .75rem; font-weight: 800; color: var(--grape-d); }
.kc-bar { align-self: end; width: 100%; max-width: 42px; border-radius: 12px 12px 6px 6px;
  background: repeating-linear-gradient(135deg, #B26CE0 0 8px, #C990EC 8px 16px); box-shadow: inset 0 3px 0 rgba(255,255,255,.4); }
.kc-col small { font-weight: 800; color: var(--ink-2); }
.kgrid2 { display: grid; gap: 14px; }
.kskills { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kskills li { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; align-items: center; gap: 8px; font-weight: 800; }
.sk-bar { height: 12px; border-radius: 12px; background: #E3F2FD; overflow: hidden; }
.sk-bar span { display: block; height: 100%; background: var(--sky); border-radius: inherit; }
.sk-bar span.hi { background: var(--mint); } .sk-bar span.lo { background: var(--orange); }

.kform { display: grid; gap: 14px; }
.kform fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.kform legend { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; color: var(--brand-navy); margin-bottom: 6px; }
.kopt, .kswitch { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px; background: #F5FAFF; font-weight: 800; cursor: pointer; }
.kopt input, .kswitch input { width: 24px; height: 24px; accent-color: var(--blue); }
.klinks { display: flex; flex-wrap: wrap; gap: 10px; }

.kid-map .map-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.kid-map .map-head .btn { min-height: 48px; }

/* ---------- Responsive ---------- */
@media (min-width: 560px) {
  .kt-plus { display: grid; }
  .kgames, .kshop { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kbadges { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kstats { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
  .kid-top { grid-template-columns: auto minmax(180px, 1fr) auto auto; grid-template-areas: "me xp counters actions"; }
  .kt-counters { justify-content: flex-end; }
  .kt-actions #btnSound { display: grid; }
  .kw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kworld-head { grid-template-columns: 1fr 1.2fr; }
  .kgrid2 { grid-template-columns: 1fr 1fr; }
  .kchal { grid-template-columns: 1fr 1.2fr; align-items: start; }
  .kgames { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kbadges { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kshop { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  body.area-kid { padding-bottom: 0; padding-inline-start: 250px; }
  .kid-tabs { display: none; }
  .kid-side { display: flex; flex-direction: column; gap: 8px; position: fixed; inset: 0 auto 0 0; width: 236px; padding: 10px 14px 16px; z-index: 20; overflow-y: auto;
    background: linear-gradient(180deg, #2C6BE8 0%, #1849B8 55%, #0F3591 100%); border-radius: 0 34px 34px 0; box-shadow: 6px 0 24px rgba(11,42,111,.3); }
  .kid-side nav { display: grid; gap: 8px; }
  .ks-logo { display: block; width: 170px; margin: 0 auto 6px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.3)); }
  .ks-logo img { width: 100%; height: auto; display: block; }
  .ks-settings { margin-top: auto; }
  .kid-main { padding: 14px 22px 26px 14px; }
  .kh { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .kh-center { display: grid; gap: 14px; }
  .kw-grid { grid-template-columns: repeat(3, minmax(0, 250px)); justify-content: center; }
  .kgames { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kshop { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .kh { padding-bottom: 20px; }
  .kh-chars { display: block; position: absolute; inset: 0; pointer-events: none; z-index: 2; }
  .kh-chars figure { position: absolute; bottom: -10px; margin: 0; width: 132px; text-align: center; }
  .kh-chars img { width: 100%; height: auto; filter: drop-shadow(0 12px 12px rgba(11,42,111,.3)); }
  .kh-chars figcaption { margin-top: -18px; position: relative; display: inline-block; padding: 4px 14px; border-radius: 18px; background: linear-gradient(180deg, #FFF3B0, var(--sun));
    color: #B23A00; font-weight: 800; font-size: .85rem; line-height: 1; box-shadow: 0 4px 0 var(--sun-d); transform: rotate(-4deg); }
  .kh-chars figcaption b { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--brand-navy); }
  .kh-san { left: -12px; }
  .kh-sil { right: 40px; }
  .kh-progress { margin: 96px 0 0 140px; }
  .kh-right { padding-bottom: 260px; }
}

/* ---------- Word Book ---------- */
.kchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.kchips::-webkit-scrollbar { display: none; }
.kchips a { flex: none; padding: 8px 14px; border-radius: var(--r-pill); background: #fff; font-family: var(--font-head); font-weight: 600; color: var(--brand-navy); box-shadow: 0 3px 0 #BBDEFB; }
.kchips a small { color: var(--ink-2); font-family: var(--font); }
.kchips a.is-active { background: linear-gradient(180deg, #FFE57F, var(--sun)); color: #B23A00; box-shadow: 0 3px 0 var(--sun-d); }
.kwords { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kword { position: relative; display: grid; justify-items: center; text-align: center; gap: 4px; padding: 12px 8px 14px; border-radius: 24px; background: #fff; box-shadow: var(--shadow-card); }
.kw-pic { width: 100%; height: 110px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(180deg, #F2F9FF, #E3F2FD); }
.kw-pic img { max-width: 90%; max-height: 100px; object-fit: contain; }
.kw-emoji { font-size: 3.6rem; }
.kw-letter { font-family: var(--font-head); font-weight: 700; font-size: 3.6rem; color: var(--blue); line-height: 1; }
.kw-letter i { font-style: normal; color: var(--red); margin-inline-start: 4px; }
.kw-letter.num { color: var(--orange-d); }
.kw-word { font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; color: var(--brand-navy); line-height: 1.1; }
.kw-pron { color: var(--grape-d); font-weight: 700; }
.kw-ar { font-family: var(--font-ar); color: var(--ink-2); font-weight: 700; }
.kw-btns { display: flex; gap: 6px; margin-top: 4px; }
.kw-btns .slow { background: var(--mint); box-shadow: 0 4px 0 var(--mint-d); }
.kw-btns .sent { background: var(--grape); box-shadow: 0 4px 0 var(--grape-d); }
.kw-ex { font-size: .85rem; color: var(--ink-2); font-weight: 700; }
.kw-ex .ar { font-size: .85rem; }
.kw-rec { position: absolute; top: 8px; inset-inline-end: 8px; font-size: .9rem; }
@media (min-width: 560px) { .kwords { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .kwords { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1300px) { .kwords { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ---------- Weekly challenge ---------- */
.k-weekly { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 26px; background: linear-gradient(135deg, #E8F5E9, #C8E6C9); box-shadow: 0 6px 0 #A5D6A7, var(--shadow-soft); border: 3px solid #fff; }
.kwk-pet { font-size: 2.8rem; animation: bob 2.6s ease-in-out infinite; }
.kwk-body { flex: 1; min-width: 0; }
.k-weekly h2 { font-size: 1.15rem; color: var(--mint-d); }
.k-weekly h2 small { display: none; } body.show-ar .k-weekly h2 small.ar { display: inline; font-size: .9rem; }
.k-weekly p { font-weight: 800; color: var(--brand-navy); font-size: .9rem; }
.k-weekly p .ar { display: none; } body.show-ar .k-weekly p .ar { display: block; color: var(--ink-2); }
.kwk-prize { color: #2E7D32 !important; margin-top: 4px; }
