/* =========================================================
   HanuLab — design system
   Brand: หนุมานลิงขาว เกราะ/มงกุฎทอง เส้นขอบ navy สายคาดส้มแดง
   โซนเด็ก (/learn) = ปุ่มใหญ่ ไอคอนนำ ตัวอักษรน้อย
   โซน public/parent = อ่านง่าย เป็นผู้ใหญ่ขึ้นเล็กน้อย
   ========================================================= */

:root {
  --navy: #16324f;
  --navy-soft: #33526f;
  --gold: #f4b400;
  --gold-dark: #cf9700;
  --gold-soft: #ffe9b3;
  --orange: #f4623a;
  --cream: #fff8ec;
  --paper: #fffdf7;
  --white: #ffffff;
  --green: #3bb273;
  --sky: #e9f4ff;
  --line: #ece4d4;

  /* สีประจำช่วงวัย */
  --kg: #ffb703;      --kg-soft: #fff1cc;
  --p13: #3f9cf5;     --p13-soft: #e2f0ff;
  --p46: #8e6cf0;     --p46-soft: #ede7ff;
  --lv1: #e5484d;     --lv1-soft: #fde5e6;
  --lv2: #e0761b;     --lv2-soft: #fdecd8;
  --lv3: #a21caf;     --lv3-soft: #f6e4fb;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 4px 14px rgba(22, 50, 79, 0.10);
  --shadow-lg: 0 10px 30px rgba(22, 50, 79, 0.14);

  --font-body: "Noto Sans Thai", "Segoe UI", sans-serif;
  --font-kid: "Mali", "Noto Sans Thai", sans-serif;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background-color: var(--paper);
  line-height: 1.65;
}

img { max-width: 100%; }

a { color: var(--navy); }

h1, h2, h3 { line-height: 1.3; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--gold); color: var(--navy); box-shadow: 0 3px 0 var(--gold-dark); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 3px 0 #c74a28; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.15rem; }

/* ---------- Header (public/parent) ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .inner {
  max-width: 1080px; margin: 0 auto; padding: 0.6rem 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand span { font-family: var(--font-kid); font-weight: 700; font-size: 1.3rem; color: var(--navy); }
.main-nav { display: flex; gap: 1.1rem; align-items: center; flex: 1; }
.main-nav a { text-decoration: none; color: var(--navy-soft); font-weight: 600; font-size: .95rem; }
.main-nav a:hover { color: var(--navy); }
.header-cta { display: flex; gap: .6rem; align-items: center; }

/* desktop: menu children flow inside .inner as before; hamburger hidden */
.site-menu { display: contents; }
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; margin-left: auto;
  background: transparent; border: none; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 3px; width: 100%;
  background: var(--navy); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.lang-toggle {
  display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden;
  font-size: .8rem; font-weight: 700;
}
.lang-toggle a { padding: .25rem .6rem; text-decoration: none; color: var(--navy-soft); }
.lang-toggle a.active { background: var(--navy); color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 4rem; background: var(--navy); color: #dbe6f2;
  padding: 2.5rem 0 1.5rem;
  font-size: .92rem;
}
.site-footer a { color: #ffd97a; text-decoration: none; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-bottom: 1.6rem; }
.site-footer h4 { color: #fff; margin: 0 0 .5rem; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer .copy { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; color: #9db4cc; font-size: .8rem; }

/* ---------- Ad slot (public + parent เท่านั้น — ห้ามใช้ใน /learn) ---------- */
.ad-slot {
  border: 2px dashed var(--line); border-radius: var(--radius);
  background: var(--white);
  padding: 1.2rem; text-align: center; color: #a99f8b;
  font-size: .85rem; margin: 2rem 0;
}
.ad-slot .label { text-transform: uppercase; letter-spacing: .1em; font-size: .65rem; display: block; margin-bottom: .3rem; }

/* ---------- Hero (landing) ---------- */
.hero {
  background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
  padding: 3.5rem 0 3rem;
}
.hero .inner { display: flex; align-items: center; gap: 2.5rem; flex-wrap: wrap; }
.hero .copy { flex: 1 1 420px; }
.hero .art { flex: 0 1 340px; text-align: center; }
.hero .art img { max-height: 320px; filter: drop-shadow(0 12px 24px rgba(22,50,79,.18)); }
.hero h1 {
  font-family: var(--font-kid);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  margin: 0 0 1rem;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p.lead { font-size: 1.15rem; color: var(--navy-soft); margin-bottom: 1.6rem; }
.hero .actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero .trust { margin-top: 1.2rem; font-size: .85rem; color: var(--navy-soft); }

/* ---------- Section / cards (public) ---------- */
.section { padding: 3rem 0 1rem; }
.section > .container > h2 {
  font-family: var(--font-kid); font-size: 1.7rem; margin-bottom: .3rem;
}
.section .sub { color: var(--navy-soft); margin-bottom: 1.8rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow);
}
.card .icon { font-size: 2rem; }
.card h3 { margin: .6rem 0 .4rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--navy-soft); font-size: .95rem; }

.step-list { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1rem; }
.step-list li {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.3rem 1.1rem 4rem; position: relative; box-shadow: var(--shadow);
}
.step-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 1.1rem; top: 1rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--gold); color: var(--navy); font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Auth (login/signup) ---------- */
.auth-box {
  max-width: 420px; margin: 3rem auto; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2.2rem; text-align: center; box-shadow: var(--shadow-lg);
}
.auth-box img.mascot { height: 90px; margin-bottom: .8rem; }
.auth-box h1 { font-family: var(--font-kid); font-size: 1.5rem; margin: 0 0 .4rem; }
.auth-box p { color: var(--navy-soft); font-size: .95rem; }
.social-btns { display: grid; gap: .7rem; margin-top: 1.4rem; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .8rem 1rem; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; font-weight: 700; font-size: .98rem; text-decoration: none; color: var(--navy);
  cursor: pointer; font-family: inherit;
}
.social-btn:hover { border-color: var(--navy-soft); box-shadow: var(--shadow); }
.social-btn.line { background: #06c755; border-color: #06c755; color: #fff; }
.social-btn.line:hover { background: #05b34c; }
.auth-note { font-size: .8rem; color: #a99f8b; margin-top: 1.2rem; }

/* =========================================================
   โซนเด็ก (/learn) — kid shell
   ========================================================= */
.kid-body { background: var(--cream); }

.kid-topbar {
  display: flex; align-items: center; gap: .8rem;
  padding: .7rem 1rem;
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 50;
}
.kid-topbar .spacer { flex: 1; }

/* ปุ่มไอคอนใหญ่ กดง่าย (เป้าหมาย ≥ 56px) */
.kid-icon-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 64px; min-height: 56px; padding: .3rem .6rem;
  border-radius: 16px; text-decoration: none;
  background: var(--cream); border: 2px solid var(--line);
  transition: transform .12s ease;
}
.kid-icon-btn:hover { transform: scale(1.06); border-color: var(--gold); }
.kid-icon-btn .ico { font-size: 1.6rem; line-height: 1; }
.kid-icon-btn .lbl { font-size: .68rem; font-weight: 700; color: var(--navy-soft); margin-top: .15rem; }

.kid-home-link { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.kid-home-link img { height: 44px; }
.kid-home-link span { font-family: var(--font-kid); font-weight: 700; font-size: 1.2rem; color: var(--navy); }

.kid-main { max-width: 960px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

/* mascot พูด (นำทางเด็ก) */
.mascot-bubble { display: flex; align-items: flex-end; gap: .9rem; margin: 1rem 0 2rem; }
.mascot-bubble img { height: 96px; flex: 0 0 auto; }
.mascot-bubble .bubble {
  background: var(--white); border: 2.5px solid var(--navy);
  border-radius: 22px; border-bottom-left-radius: 4px;
  padding: .9rem 1.3rem; font-family: var(--font-kid);
  font-size: 1.15rem; font-weight: 600; box-shadow: var(--shadow);
}

/* การ์ดเลือกช่วงวัย (หน้า /learn) */
.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.4rem; }
.level-card {
  display: block; text-decoration: none; text-align: center;
  background: var(--white); border-radius: var(--radius-lg);
  border: 3px solid transparent; box-shadow: var(--shadow);
  padding: 2rem 1.4rem 1.6rem;
  transition: transform .15s ease, border-color .15s ease;
}
.level-card:hover { transform: translateY(-6px) scale(1.02); }
.level-card .big-ico { font-size: 4rem; line-height: 1; display: block; }
.level-card h2 { font-family: var(--font-kid); font-size: 1.6rem; margin: .8rem 0 .2rem; }
.level-card .age { color: var(--navy-soft); font-size: .95rem; }
.level-card .count { margin-top: .8rem; font-size: .85rem; font-weight: 700; }
.level-card.level-kg:hover  { border-color: var(--kg); }
.level-card.level-p13:hover { border-color: var(--p13); }
.level-card.level-p46:hover { border-color: var(--p46); }
.level-card.level-lv1:hover { border-color: var(--lv1); }
.level-card.level-lv2:hover { border-color: var(--lv2); }
.level-card.level-lv3:hover { border-color: var(--lv3); }
.level-card.level-kg .count  { color: var(--kg); }
.level-card.level-p13 .count { color: var(--p13); }
.level-card.level-p46 .count { color: var(--p46); }
.level-card.level-lv1 .count { color: var(--lv1); }
.level-card.level-lv2 .count { color: var(--lv2); }
.level-card.level-lv3 .count { color: var(--lv3); }

/* หัวข้อ unit + เส้นทางบทเรียน (หน้า /learn/{level}) */
.kid-page-title { font-family: var(--font-kid); font-size: 1.9rem; margin: .2rem 0 .3rem; }
.kid-page-sub { color: var(--navy-soft); margin-bottom: 1.6rem; }

.unit-block { margin-bottom: 2.4rem; }
.unit-head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.unit-head .ico {
  font-size: 1.8rem; width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-soft);
}
.unit-head h2 { font-family: var(--font-kid); font-size: 1.35rem; margin: 0; }
.unit-head .en { color: var(--navy-soft); font-size: .85rem; display: block; }

.lesson-path { display: grid; gap: .8rem; }
.lesson-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--white); border: 2px solid var(--line);
  border-radius: var(--radius); padding: .9rem 1.1rem;
  text-decoration: none; box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease;
}
.lesson-card:hover { transform: translateX(6px); border-color: var(--gold); }
.lesson-card .num {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  font-family: var(--font-kid); font-weight: 800; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 var(--gold-dark);
}
.lesson-card .info { flex: 1; min-width: 0; }
.lesson-card h3 { margin: 0; font-size: 1.08rem; font-family: var(--font-kid); }
.lesson-card .meta { font-size: .8rem; color: var(--navy-soft); }
.lesson-card .go { font-size: 1.4rem; }

/* ป้ายกำกับเล็ก ๆ */
.tag {
  display: inline-block; padding: .1rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; background: var(--sky); color: var(--navy-soft);
  margin-right: .3rem;
}
.tag.unplugged { background: #e8f8ee; color: #1e7a48; }

/* หน้าบทเรียน */
.lesson-hero {
  background: var(--white); border-radius: var(--radius-lg);
  border: 2px solid var(--line); box-shadow: var(--shadow);
  padding: 1.6rem 1.8rem; margin-bottom: 1.6rem;
}
.lesson-hero .crumbs { font-size: .82rem; color: var(--navy-soft); margin-bottom: .5rem; }
.lesson-hero .crumbs a { color: var(--navy-soft); }
.lesson-hero h1 { font-family: var(--font-kid); font-size: 1.7rem; margin: 0 0 .5rem; }
.lesson-hero .facts { display: flex; flex-wrap: wrap; gap: .4rem .5rem; }
.lesson-hero img.lesson-art { border-radius: var(--radius); margin-top: 1rem; }

.lesson-body {
  background: var(--white); border-radius: var(--radius-lg);
  border: 2px solid var(--line); box-shadow: var(--shadow);
  padding: 1.8rem 2rem; font-size: 1.06rem;
}
.lesson-body h2 {
  font-family: var(--font-kid); font-size: 1.25rem;
  margin-top: 1.8rem; padding-bottom: .3rem;
  border-bottom: 2px dashed var(--gold-soft);
}
.lesson-body h2:first-child { margin-top: 0; }
.lesson-body ol li, .lesson-body ul li { margin-bottom: .5rem; }
.lesson-body strong { color: var(--orange); }

.lesson-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.8rem; }
.lesson-nav .kid-big-btn { flex: 0 1 auto; }

/* ปุ่มใหญ่โซนเด็ก */
.kid-big-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .9rem 1.6rem; border-radius: 999px;
  background: var(--gold); color: var(--navy);
  font-family: var(--font-kid); font-weight: 800; font-size: 1.1rem;
  text-decoration: none; box-shadow: 0 4px 0 var(--gold-dark);
  border: none; cursor: pointer;
  transition: transform .12s ease;
}
.kid-big-btn:hover { transform: translateY(-2px); }
.kid-big-btn.ghost { background: var(--white); border: 2px solid var(--line); box-shadow: none; }
.kid-big-btn.done { background: var(--green); color: #fff; box-shadow: 0 4px 0 #2c8f5a; }

/* Badge room */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.2rem; }
.badge-card {
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem .8rem; text-align: center; box-shadow: var(--shadow);
}
.badge-card .medal { font-size: 3rem; }
.badge-card.locked { opacity: .45; filter: grayscale(1); }
.badge-card h3 { font-size: .92rem; font-family: var(--font-kid); margin: .5rem 0 .1rem; }
.badge-card p { font-size: .75rem; color: var(--navy-soft); margin: 0; }

/* Together (parent-child challenge) */
.together-card {
  display: flex; gap: 1rem; align-items: center;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: .9rem;
  text-decoration: none;
}
.together-card .ico { font-size: 2rem; }
.together-card h3 { margin: 0; font-size: 1.02rem; font-family: var(--font-kid); }
.together-card p { margin: 0; font-size: .85rem; color: var(--navy-soft); }

/* =========================================================
   โซนผู้ปกครอง (/parent)
   ========================================================= */
.parent-nav {
  display: flex; gap: .4rem; flex-wrap: wrap;
  margin: 1.5rem 0 2rem;
}
.parent-nav a {
  padding: .45rem 1rem; border-radius: 999px; text-decoration: none;
  font-size: .92rem; font-weight: 600; color: var(--navy-soft);
  border: 1.5px solid var(--line); background: var(--white);
}
.parent-nav a.active, .parent-nav a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.page-title { font-family: var(--font-kid); font-size: 1.8rem; margin: 1.8rem 0 .2rem; }
.page-sub { color: var(--navy-soft); margin-bottom: 1.5rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.stat-tile {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; box-shadow: var(--shadow);
}
.stat-tile .num { font-size: 1.9rem; font-weight: 800; color: var(--navy); }
.stat-tile .lbl { font-size: .85rem; color: var(--navy-soft); }

.child-row {
  display: flex; align-items: center; gap: 1rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.3rem; box-shadow: var(--shadow); margin-bottom: .9rem;
}
.child-row .avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.child-row .info { flex: 1; }
.child-row h3 { margin: 0; font-size: 1.05rem; }
.child-row .meta { font-size: .82rem; color: var(--navy-soft); }

.progress-bar { height: 10px; border-radius: 999px; background: var(--cream); overflow: hidden; border: 1px solid var(--line); }
.progress-bar > span { display: block; height: 100%; background: var(--green); border-radius: 999px; }

.table-plain { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table-plain th, .table-plain td { padding: .7rem 1rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; }
.table-plain th { background: var(--cream); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--navy-soft); }

.empty-state {
  text-align: center; padding: 3rem 1rem; color: var(--navy-soft);
  background: var(--white); border: 2px dashed var(--line); border-radius: var(--radius-lg);
}
.empty-state .big { font-size: 3rem; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-header .inner { gap: .5rem; }
  /* collapsible dropdown panel below the bar */
  .site-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: .4rem 1.25rem 1rem;
  }
  .site-menu.open { display: flex; }
  .main-nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; flex: none; }
  .main-nav a { padding: .85rem .2rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .header-cta { flex-direction: column; align-items: stretch; gap: .6rem; margin-top: .9rem; }
  .header-cta .btn { width: 100%; text-align: center; }
  .lang-toggle { align-self: flex-start; }
  .hero .inner { flex-direction: column-reverse; text-align: center; }
  .hero .actions { justify-content: center; }
  .mascot-bubble img { height: 72px; }
  .lesson-body { padding: 1.3rem 1.2rem; }
}

/* ---------- child picker (/learn) ---------- */
.child-picker { margin-bottom: 1.6rem; }
.picker-row { display: flex; gap: .9rem; flex-wrap: wrap; }
.picker-row form { display: inline; }
.picker-card {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  min-width: 92px; padding: .8rem 1rem;
  background: var(--white); border: 3px solid var(--line); border-radius: var(--radius);
  cursor: pointer; font-family: var(--font-kid);
  transition: transform .12s ease, border-color .12s ease;
  box-shadow: var(--shadow);
}
.picker-card:hover { transform: scale(1.06); }
.picker-card.active { border-color: var(--gold); background: var(--gold-soft); }
.picker-card .face { font-size: 2.2rem; line-height: 1; }
.picker-card .name { font-weight: 700; font-size: .95rem; color: var(--navy); }

.lesson-card.done { border-color: var(--green); background: #f4fbf7; }
.lesson-card.done .num { background: var(--green); box-shadow: 0 3px 0 #2c8f5a; color: #fff; }

.badge-celebrate {
  background: var(--gold-soft); border: 2.5px solid var(--gold);
  border-radius: var(--radius-lg); padding: 1rem 1.4rem; margin-bottom: 1.4rem;
  text-align: center; font-family: var(--font-kid); font-size: 1.2rem; font-weight: 700;
  animation: pop .4s ease;
}
@keyframes pop { 0% { transform: scale(.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- HanuKids games ---------- */
.kg-wrap {
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 1.4rem; margin-bottom: 1.4rem; position: relative;
}
.kg-intro {
  font-family: var(--font-kid); font-size: 1.15rem; font-weight: 600;
  background: var(--cream); border-radius: var(--radius); padding: .8rem 1.1rem; margin-bottom: 1rem;
}
.kg-q { font-family: var(--font-kid); font-size: 1.2rem; font-weight: 700; text-align: center; margin: .6rem 0 1rem; }
.kg-dots { display: flex; gap: .4rem; justify-content: center; margin-bottom: .8rem; }
.kg-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.kg-dot.on { background: var(--gold); }

.kg-pool, .kg-answer-row, .kg-bin-row, .kg-seq-row { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; margin: .8rem 0; }
.kg-card {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  min-width: 96px; min-height: 96px; padding: .7rem;
  background: var(--white); border: 3px solid var(--line); border-radius: var(--radius);
  cursor: pointer; font-family: var(--font-kid); box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.kg-card:hover:not(:disabled) { transform: scale(1.07); border-color: var(--gold); }
.kg-card.used { opacity: .25; }
.kg-card.kg-correct { border-color: var(--green); background: #f0faf4; }
.kg-card-e { font-size: 2.4rem; line-height: 1.1; }
.kg-card-t { font-size: .85rem; font-weight: 700; color: var(--navy); }

.kg-slot {
  width: 96px; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 3px dashed var(--line); border-radius: var(--radius); font-size: 1.6rem; background: var(--cream);
  font-family: var(--font-kid);
}
.kg-slot.filled { border-style: solid; border-color: var(--green); background: #f0faf4; font-size: 1rem; }
.kg-slot.filled .kg-card-e { font-size: 2rem; }

.kg-seq-item {
  width: 76px; height: 76px; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; background: var(--cream); border-radius: var(--radius); border: 2px solid var(--line);
}
.kg-seq-item.kg-blank { border-style: dashed; background: var(--gold-soft); }

.kg-current {
  display: flex; flex-direction: column; align-items: center; margin: .6rem auto 1rem;
  width: 130px; padding: 1rem; background: var(--gold-soft); border-radius: var(--radius-lg);
  border: 3px solid var(--gold);
}
.kg-current .kg-card-e { font-size: 3.2rem; }
.kg-bin {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  min-width: 110px; padding: .9rem; background: var(--white);
  border: 3px solid var(--line); border-radius: var(--radius); cursor: pointer;
  font-family: var(--font-kid); box-shadow: var(--shadow); transition: transform .12s ease;
}
.kg-bin:hover { transform: scale(1.06); border-color: var(--gold); }
.kg-bin-e { font-size: 2.2rem; }
.kg-bin-t { font-weight: 700; font-size: .9rem; }

.kg-grid { display: grid; gap: 6px; max-width: 420px; margin: 0 auto 1rem; }
.kg-cell {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: var(--cream); border-radius: 12px; border: 2px solid var(--line); font-size: 1.9rem;
}
.kg-queue { display: flex; gap: .35rem; justify-content: center; flex-wrap: wrap; margin-bottom: .3rem; }
.kg-cmd {
  width: 52px; height: 52px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--white); font-size: 1.4rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.kg-cmd.pal { background: var(--gold-soft); border-color: var(--gold); }
.kg-cmd.pal:hover { transform: scale(1.08); }
.kg-cmd.sel { border-color: var(--orange); border-width: 3px; background: #fff1ec; }
.kg-cmd.empty { border-style: dashed; color: #c9bfae; cursor: default; }
.kg-palette { display: flex; gap: .5rem; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.kg-run { padding: .6rem 1.4rem; font-size: 1rem; }
.kg-hint { text-align: center; font-size: .85rem; color: var(--navy-soft); margin: .4rem 0; }

.kg-shake { animation: kgshake .35s ease; }
@keyframes kgshake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-8px)} 75%{transform:translateX(8px)} }
.kg-pop { animation: kgpop .3s ease; }
@keyframes kgpop { 0%{transform:scale(.7)} 60%{transform:scale(1.15)} 100%{transform:scale(1)} }

.kg-win {
  position: absolute; inset: 0; background: rgba(255, 248, 236, .93);
  display: flex; align-items: center; justify-content: center; border-radius: var(--radius-lg); z-index: 200;
}
.kg-win-card { text-align: center; animation: kgpop .4s ease; }
.kg-win-emoji { font-size: 3.4rem; }
.kg-win-text { font-family: var(--font-kid); font-size: 1.5rem; font-weight: 800; margin-top: .4rem; }
.kg-win-actions { display: flex; gap: .8rem; justify-content: center; margin-top: 1.2rem; flex-wrap: wrap; }

.kg-toast {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: .6rem 1.2rem; border-radius: 999px;
  font-family: var(--font-kid); font-size: .95rem; z-index: 210; white-space: nowrap;
}

.parent-notes summary {
  cursor: pointer; font-weight: 700; color: var(--navy-soft); font-size: .95rem;
  font-family: var(--font-body);
}
.parent-notes { font-size: .95rem; }

/* ---------- save-state banner + active child chip ---------- */
.kg-save-banner {
  background: #fff6e5; border: 2px solid var(--gold); border-radius: var(--radius);
  padding: .8rem 1.1rem; margin-bottom: 1rem; font-size: .95rem;
}
.kg-save-banner.ok { background: #f0faf4; border-color: var(--green); }
.kid-active-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--gold-soft); border: 2px solid var(--gold); border-radius: 999px;
  padding: .3rem .8rem; font-family: var(--font-kid); font-weight: 700; font-size: .95rem;
  text-decoration: none; color: var(--navy); margin-right: .4rem;
}

/* quiz (ป.1-3+) */
.kg-quiz-opts { display: grid; gap: .7rem; max-width: 560px; margin: 0 auto; }
.kg-quiz-opt {
  padding: .9rem 1.2rem; text-align: left;
  background: var(--white); border: 2.5px solid var(--line); border-radius: var(--radius);
  cursor: pointer; font-family: var(--font-kid); font-size: 1.05rem; font-weight: 600;
  transition: transform .12s ease, border-color .12s ease;
}
.kg-quiz-opt:hover:not(:disabled) { transform: translateX(6px); border-color: var(--gold); }
.kg-quiz-opt.kg-correct { border-color: var(--green); background: #f0faf4; }
.kg-explain { text-align: center; color: var(--navy-soft); font-size: .95rem; margin-top: .8rem; }

/* ---------- code-runner (เขียน Python จริง) ---------- */
.kg-code { max-width: 720px; margin: 0 auto; text-align: left; }
.kg-code-brief {
  background: var(--gold-soft); border: 2px solid var(--gold);
  border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .8rem;
  font-weight: 700; color: var(--navy);
}
.kg-code-editor {
  width: 100%; min-height: 190px; resize: vertical;
  font-family: ui-monospace, "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: .98rem; line-height: 1.5; tab-size: 4;
  color: #e6edf3; background: #0f2233;
  border: 2px solid var(--navy); border-radius: var(--radius);
  padding: .9rem 1rem; box-sizing: border-box; white-space: pre;
}
.kg-code-editor:focus { outline: none; border-color: var(--gold); }
.kg-code-bar { display: flex; gap: .6rem; flex-wrap: wrap; margin: .7rem 0; }
.kg-code-run { padding: .55rem 1.6rem; font-size: 1rem; }
.kg-code-bar .kid-big-btn.ghost { padding: .55rem 1.1rem; font-size: .95rem; }
.kg-code-bar .kid-big-btn:disabled { opacity: .4; cursor: not-allowed; }
.kg-code-out {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: .95rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
  min-height: 2.4rem; padding: .8rem 1rem;
  background: var(--paper); border: 2px solid var(--line);
  border-radius: var(--radius); color: var(--navy);
}
.kg-code-out.err { background: #fff1ec; border-color: var(--orange); color: #9a3412; }
.kg-code-help {
  margin-top: .6rem; padding-top: .5rem; border-top: 1px dashed var(--line);
  font-family: var(--font-body, inherit); font-size: .9rem; color: var(--navy-soft);
}
.kg-code-hints { margin-top: .7rem; display: grid; gap: .5rem; }
.kg-code-hint {
  background: var(--sky); border-left: 4px solid var(--p13);
  border-radius: 10px; padding: .55rem .8rem; font-size: .92rem; color: var(--navy);
}

/* tutorial panel (สอนก่อนพิมพ์โค้ด สำหรับเด็กไม่มีพื้นฐาน) */
.kg-tut { border: 2px solid var(--p13); border-radius: var(--radius); background: var(--sky); margin-bottom: .9rem; overflow: hidden; }
.kg-tut-head { display: flex; align-items: center; gap: .5rem; background: var(--p13); color: #fff; font-weight: 800; padding: .6rem .9rem; font-family: var(--font-kid, inherit); }
.kg-tut-toggle { margin-left: auto; background: rgba(255,255,255,.25); color: #fff; border: none; border-radius: 8px; padding: .2rem .6rem; cursor: pointer; font-weight: 700; font-size: .85rem; }
.kg-tut-body { padding: .8rem .9rem; }
.kg-tut-text { margin: .4rem 0; color: var(--navy); line-height: 1.6; }
.kg-tut-text code, .kg-tut-exnote code { background: #dceafe; color: #1e3a8a; padding: .05rem .35rem; border-radius: 5px; font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
.kg-tut-ex { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .7rem; margin: .6rem 0; }
.kg-tut-code { margin: 0; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92rem; background: #0f2233; color: #e6edf3; padding: .6rem .7rem; border-radius: 8px; white-space: pre; overflow-x: auto; }
.kg-tut-arrow { font-size: .8rem; font-weight: 700; color: var(--p13); margin: .5rem 0 .2rem; }
.kg-tut-out { margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: .92rem; background: #f0faf4; border: 1px solid var(--green); color: var(--navy); padding: .5rem .7rem; border-radius: 8px; white-space: pre; overflow-x: auto; }
.kg-tut-exnote { font-size: .85rem; color: var(--navy-soft); margin-top: .4rem; }

/* web-playground (สร้างเว็บ HTML/CSS/JS) */
.kg-wp-tabs { display: flex; gap: .3rem; margin-bottom: -2px; }
.kg-wp-tab { font-family: inherit; font-weight: 700; font-size: .9rem; border: 2px solid var(--line); border-bottom: none; background: var(--paper); color: var(--navy-soft); border-radius: 10px 10px 0 0; padding: .4rem .9rem; cursor: pointer; }
.kg-wp-tab.on { background: #0f2233; color: #e6edf3; border-color: var(--navy); }
.kg-wp-editor { min-height: 150px; border-radius: 0 var(--radius) var(--radius) var(--radius); }
.kg-wp-preview { width: 100%; min-height: 220px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; margin-top: .7rem; }

/* data-explorer (แก้ข้อมูล เห็นกราฟ) */
.kg-dx-chart { display: grid; gap: .5rem; margin-bottom: 1rem; }
.kg-dx-bar-row { display: flex; align-items: center; gap: .6rem; }
.kg-dx-bar-label { flex: 0 0 90px; text-align: right; font-weight: 700; font-size: .9rem; color: var(--navy); }
.kg-dx-bar-track { flex: 1; background: var(--line); border-radius: 999px; height: 26px; overflow: hidden; }
.kg-dx-bar-fill { height: 100%; background: var(--p13); border-radius: 999px; display: flex; align-items: center; justify-content: flex-end; min-width: 24px; transition: width .25s ease; }
.kg-dx-bar-val { color: #fff; font-weight: 700; font-size: .82rem; padding-right: .5rem; }
.kg-dx-table { display: grid; gap: .5rem; max-width: 320px; margin: 0 auto 1rem; }
.kg-dx-input-row { display: flex; align-items: center; gap: .6rem; }
.kg-dx-in-label { flex: 1; font-weight: 700; color: var(--navy); }
.kg-dx-input { width: 90px; padding: .4rem .6rem; border: 2px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 1rem; }
.kg-dx-input:focus { outline: none; border-color: var(--p13); }

/* ai-sandbox (แชตบอตกฎ) */
.kg-ai-log { min-height: 200px; max-height: 320px; overflow-y: auto; background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: .8rem; display: flex; flex-direction: column; gap: .5rem; }
.kg-ai-msg { max-width: 80%; padding: .5rem .8rem; border-radius: 14px; font-size: .95rem; line-height: 1.5; }
.kg-ai-msg.me { align-self: flex-end; background: var(--gold-soft); color: var(--navy); border-bottom-right-radius: 4px; }
.kg-ai-msg.bot { align-self: flex-start; background: var(--sky); color: var(--navy); border-bottom-left-radius: 4px; }
.kg-ai-form { display: flex; gap: .5rem; margin-top: .7rem; }
.kg-ai-input { flex: 1; padding: .6rem .9rem; border: 2px solid var(--line); border-radius: 999px; font-family: inherit; font-size: 1rem; }
.kg-ai-input:focus { outline: none; border-color: var(--p46); }
.kg-ai-send { padding: .5rem 1.4rem; }

/* ml-trainer (เทรนโมเดลด้วยกล้อง) */
.kg-ml-status { background: var(--gold-soft); border-radius: var(--radius); padding: .6rem .9rem; margin-bottom: .7rem; font-weight: 700; color: var(--navy); }
.kg-ml-video { width: 100%; max-width: 380px; border-radius: var(--radius); background: #0f2233; display: block; margin: 0 auto .7rem; }
.kg-ml-classes { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin: .5rem 0; }
.kg-ml-add { padding: .5rem 1rem; }
.kg-ml-pred { text-align: center; font-family: var(--font-kid, inherit); font-size: 1.2rem; font-weight: 800; color: var(--p46); min-height: 1.6rem; margin: .6rem 0; }
.kg-ml-cam, .kg-ml-predict { display: block; margin: .3rem auto; }

/* ---------- HanuBlockly (บทลากบล็อก) ---------- */
.kb-top { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.kb-grid-wrap { flex: 0 1 340px; min-width: 260px; }
.kb-grid-wrap .kg-grid { max-width: 340px; }
.kb-side { flex: 1 1 420px; min-width: 300px; }
.kb-workspace { height: 380px; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kb-actions { display: flex; gap: .6rem; align-items: center; margin-top: .7rem; flex-wrap: wrap; }
.kb-count { font-family: var(--font-kid); font-weight: 700; color: var(--navy-soft); }
.kb-monkey { position: relative; display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.kb-monkey small { font-size: .55em; margin-top: -2px; }
.kb-crash { background: #fdecea !important; border-color: #e57373 !important; }
@media (max-width: 720px) { .kb-workspace { height: 300px; } }

/* ---------- Homepage hero slideshow ---------- */
.hero-slider { position: relative; width: 100%; max-width: 420px; margin: 0 auto; }
.hs-track { position: relative; aspect-ratio: 1 / 1; }
.hs-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .6s ease; display: flex; align-items: center; justify-content: center; }
.hs-slide.is-active { opacity: 1; }
.hs-slide img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(22,50,79,.18)); }
.hs-arrow { position: absolute; top: 50%; transform: translateY(-50%); border: none; background: rgba(255,255,255,.85); color: var(--navy); width: 38px; height: 38px; border-radius: 50%; font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow); z-index: 2; }
.hs-prev { left: -6px; } .hs-next { right: -6px; }
.hs-arrow:hover { background: var(--gold-soft); }
.hs-dots { display: flex; gap: .5rem; justify-content: center; margin-top: 1rem; }
.hs-dot { width: 11px; height: 11px; border-radius: 50%; border: none; background: var(--line); cursor: pointer; padding: 0; transition: transform .2s, background .2s; }
.hs-dot.is-active { background: var(--gold); transform: scale(1.25); }

/* ---------- Level cards with images ---------- */
.card .card-img { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; margin-bottom: .5rem; background: var(--sky); }
.card .card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Lesson preview band ---------- */
.peek-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.peek-item { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1 / 1; background: var(--paper); transition: transform .2s; }
.peek-item:hover { transform: translateY(-4px); }
.peek-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.peek-cta { text-align: center; margin-top: 1.8rem; }

/* ---------- Hero slideshow: mobile fix ----------
   บนจอเล็ก hero เป็นแนวตั้ง + align-items:center ทำให้คอลัมน์รูปหดตามเนื้อหา
   และเพราะสไลด์เป็น position:absolute ตัว track เลยไม่มีความกว้าง → รูปยุบเล็ก
   บังคับความกว้างคอลัมน์รูปให้เต็ม แล้วจำกัดขนาด slider เอง */
@media (max-width: 720px) {
  .hero .art { width: 100%; flex: none; }
  .hero-slider { width: min(100%, 360px); margin-inline: auto; }
}

/* ---------- Blockly parent guide (tutorial) ---------- */
.tut-block { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem 1.6rem; margin: 1.4rem 0; }
.tut-block h2 { margin: 0 0 .9rem; font-size: 1.25rem; color: var(--navy); }
.tut-block p { color: var(--navy-soft); }
.tut-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.tut-card { background: var(--sky); border-radius: var(--radius); padding: 1rem 1.1rem; }
.tut-card h3 { margin: .3rem 0 .4rem; font-size: 1.05rem; }
.tut-ico { font-size: 1.8rem; }
.block-ref { display: flex; flex-direction: column; gap: .6rem; }
.block-row { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: .8rem 1.1rem; align-items: start; padding: .7rem .2rem; border-bottom: 1px dashed var(--line); }
.block-row:last-child { border-bottom: none; }
.block-row .blk { font-family: var(--font-kid); font-weight: 700; color: var(--navy); background: var(--gold-soft); border-radius: 12px; padding: .45rem .7rem; align-self: start; }
.block-row p { margin: 0; }
.tut-note { background: var(--kg-soft); border-radius: var(--radius); padding: .8rem 1rem; margin-top: 1rem; color: var(--navy) !important; }
.tut-steps { margin: 0; padding-left: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: .7rem; }
.tut-steps li { position: relative; padding: .6rem .9rem .6rem 3rem; background: var(--cream); border-radius: var(--radius); color: var(--navy-soft); }
.tut-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 1.7rem; height: 1.7rem; background: var(--gold); color: var(--navy); font-family: var(--font-kid); font-weight: 700; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.tut-highlight { background: linear-gradient(180deg, var(--gold-soft), var(--paper)); border-color: var(--gold); }
.tut-tips { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .5rem; color: var(--navy-soft); }
.faq details { border: 2px solid var(--line); border-radius: var(--radius); padding: .3rem .9rem; margin-bottom: .6rem; background: var(--white); }
.faq summary { cursor: pointer; font-family: var(--font-kid); font-weight: 700; color: var(--navy); padding: .5rem 0; }
.faq details[open] summary { color: var(--orange); }
.faq details p { margin: .2rem 0 .7rem; color: var(--navy-soft); }
.tut-cta-row { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; margin: 2rem 0 1rem; }

/* CTA link inside a lesson's parent-notes → the guide */
.blockly-guide-cta { display: flex; align-items: center; gap: .9rem; text-decoration: none; background: linear-gradient(180deg, var(--gold-soft), var(--paper)); border: 2px solid var(--gold); border-radius: var(--radius); padding: .8rem 1rem; margin: .3rem 0 1rem; transition: transform .15s; }
.blockly-guide-cta:hover { transform: translateY(-2px); }
.blockly-guide-cta .bg-ico { font-size: 1.7rem; }
.blockly-guide-cta .bg-txt { flex: 1; color: var(--navy-soft); font-size: .95rem; }
.blockly-guide-cta .bg-txt strong { display: block; color: var(--navy); font-family: var(--font-kid); }
.blockly-guide-cta .bg-arrow { font-size: 1.4rem; color: var(--gold-dark); }
@media (max-width: 720px) { .block-row { grid-template-columns: 1fr; gap: .3rem; } }

/* ---------- Curriculum page: collapsible age groups + free-trial gating ---------- */
.level-acc { border: 2px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 1.1rem; background: var(--paper); overflow: hidden; box-shadow: var(--shadow); }
.level-acc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .9rem; padding: 1.05rem 1.3rem; font-family: var(--font-kid); }
.level-acc > summary::-webkit-details-marker { display: none; }
.level-acc > summary::after { content: "▾"; color: var(--navy-soft); font-size: 1.1rem; transition: transform .2s; }
.level-acc[open] > summary::after { transform: rotate(180deg); }
.level-acc[open] > summary { border-bottom: 1px solid var(--line); }
.level-acc .lv-emoji { font-size: 1.7rem; }
.level-acc .lv-name { flex: 1; font-size: 1.2rem; color: var(--navy); }
.level-acc .lv-name small { color: var(--navy-soft); font-size: .78rem; font-family: var(--font-body); }
.level-acc .lv-count { background: var(--gold-soft); color: var(--navy); border-radius: 999px; padding: .25rem .75rem; font-size: .82rem; font-family: var(--font-body); font-weight: 700; }
.lv-body { padding: 1rem 1.3rem 1.4rem; }

.curric-gate { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: linear-gradient(180deg, var(--sky), var(--paper)); border: 2px dashed var(--p13); border-radius: var(--radius); padding: 1rem 1.2rem; }
.curric-gate .cg-text { flex: 1 1 260px; color: var(--navy-soft); font-size: .93rem; }
.curric-gate .cg-text strong { display: block; color: var(--navy); font-family: var(--font-kid); font-size: 1.05rem; margin-bottom: .2rem; }
.curric-gate .cg-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.lesson-card.locked { opacity: .62; cursor: not-allowed; background: var(--cream); box-shadow: none; }
.lesson-card.locked:hover { transform: none; border-color: var(--line); }
.lesson-card.locked .num { background: var(--line); color: var(--navy-soft); box-shadow: none; }
.lesson-card.locked .go { filter: grayscale(1); opacity: .8; }
