/* ==========================================================================
   Ultech Kids – "Kepulauan Ceria" (Happy Archipelago)
   Toy-like 3D UI: chunky pressable tiles, floating islands, sky + sea.
   ========================================================================== */
:root {
  --sky: #8FD8FF;
  --sky-2: #C9EEFF;
  --sea: #0E7CC4;
  --sea-deep: #075A92;
  --raya: #FF3D5A;          /* bunga raya / hibiscus */
  --kunyit: #FFC531;        /* turmeric yellow */
  --pandan: #2BBF6A;        /* pandan leaf green */
  --ink: #18324A;           /* deep teal-navy text */
  --ink-soft: #4B6478;
  --paper: #FFFFFF;
  --sand: #FFE7B3;
  --edge: rgba(24, 50, 74, .22);   /* 3D bottom edge */
  --radius-tile: 28px;
  --radius-pill: 999px;
  --font: 'Baloo 2', 'Baloo Thambi 2', system-ui, sans-serif;
  --font-jawi: 'Noto Naskh Arabic', serif;
  --font-ta: 'Baloo Thambi 2', 'Noto Sans Tamil', sans-serif;
  --font-zh: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 55%, #E8F8FF 100%) fixed;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }
:focus-visible { outline: 4px solid var(--kunyit); outline-offset: 3px; border-radius: 12px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* Script helpers */
.jawi { font-family: var(--font-jawi); direction: rtl; }
.tamil { font-family: var(--font-ta); }
.zh { font-family: var(--font-zh); }

/* ---------- Clouds backdrop (static, decorative) ---------- */
.sky-deco { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.sky-deco .cloud {
  position: absolute; background: #fff; border-radius: 999px; opacity: .85;
  box-shadow: 40px -18px 0 6px #fff, 85px 0 0 -4px #fff;
}
.sky-deco .c1 { width: 120px; height: 46px; top: 14%; left: 6%; }
.sky-deco .c2 { width: 90px; height: 36px; top: 30%; right: 10%; opacity: .7; }
.sky-deco .c3 { width: 140px; height: 52px; top: 62%; left: 70%; opacity: .55; }
.foot .sea, .sky-deco .sea-x {
  position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background:
    radial-gradient(40px 14px at 40px 0, transparent 98%, var(--sea) 100%) 0 0 / 80px 28px repeat-x,
    linear-gradient(var(--sea), var(--sea-deep));
  background-position: 0 0, 0 14px;
  opacity: .9;
}

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 40; padding: 10px 0; }
.topbar .wrap {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); border-radius: var(--radius-pill);
  padding: 8px 10px 8px 16px;
  box-shadow: 0 6px 0 var(--edge), 0 14px 30px rgba(14, 124, 196, .18);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 1.25rem; line-height: 1; }
.brand svg { width: 44px; height: 44px; }
.brand small { display: block; font-size: .72rem; font-weight: 600; color: var(--ink-soft); }
.mainnav { display: flex; gap: 2px; margin-left: auto; flex-wrap: nowrap; white-space: nowrap; }
.mainnav a {
  text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: var(--radius-pill);
  display: flex; align-items: center; gap: 6px; font-size: .98rem;
}
.mainnav a:hover { background: var(--sky-2); }
.mainnav a.active { background: var(--ink); color: #fff; }
.tools { display: flex; align-items: center; gap: 8px; }
.lang-toggle { display: flex; background: var(--sky-2); border-radius: var(--radius-pill); padding: 3px; }
.lang-toggle a { text-decoration: none; font-weight: 800; font-size: .85rem; padding: 4px 10px; border-radius: var(--radius-pill); }
.lang-toggle a.on { background: var(--kunyit); }
.kid-chip {
  display: flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 800;
  background: var(--sand); padding: 4px 12px 4px 4px; border-radius: var(--radius-pill);
}
.kid-chip .av { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.3rem; }
.btn.menu-btn { display: none; }

@media (max-width: 1500px) { .brand small { display: none; } .mainnav a { padding: 8px 9px; font-size: .92rem; } }
.brand { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 1340px) {
  .mainnav { display: none; position: absolute; top: 72px; left: 16px; right: 16px; flex-direction: column;
    background: #fff; border-radius: 24px; padding: 12px; box-shadow: 0 6px 0 var(--edge); }
  .mainnav.open { display: flex; }
  .btn.menu-btn { display: inline-flex; margin-left: auto; }
  .brand small { display: none; }
}

/* ---------- Toy buttons (3D press) ---------- */
.btn {
  --c: var(--kunyit); --t: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; text-decoration: none;
  font-weight: 800; font-size: 1.05rem; line-height: 1;
  padding: 14px 24px; border-radius: var(--radius-pill);
  background: var(--c); color: var(--t);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 60%, #000 40%);
  transform: translateY(0); transition: transform .08s, box-shadow .08s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 60%, #000 40%); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 60%, #000 40%); }
.btn-raya { --c: var(--raya); --t: #fff; }
.btn-pandan { --c: var(--pandan); --t: #fff; }
.btn-sea { --c: var(--sea); --t: #fff; }
.btn-white { --c: #fff; --t: var(--ink); }
.btn-lg { font-size: 1.35rem; padding: 18px 34px; }
.btn-sm { font-size: .9rem; padding: 9px 14px; box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 60%, #000 40%); }
.icon-btn { width: 48px; height: 48px; padding: 0; font-size: 1.4rem; }

/* ---------- Hero (home) ---------- */
.hero { position: relative; padding: 28px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 12px; }
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: .98; margin: 0 0 14px; font-weight: 800;
  letter-spacing: -.01em; color: var(--ink);
  text-shadow: 0 4px 0 #fff, 0 8px 0 rgba(24,50,74,.12);
}
.hero p.lead { font-size: 1.2rem; max-width: 34ch; margin: 0 0 22px; color: var(--ink-soft); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stage { position: relative; aspect-ratio: 1 / .92; min-height: 320px; }
#hero3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-stage .fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9rem; }
.script-ribbon {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none;
}
.script-ribbon li {
  background: #fff; border-radius: 16px; padding: 4px 12px; font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 4px 0 var(--edge); transform: rotate(var(--r, 0deg));
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { order: -1; min-height: 260px; aspect-ratio: 1 / .75; }
}

/* ---------- Age picker ---------- */
.age-picker { margin-top: 34px; margin-bottom: 10px; text-align: center; }
.age-picker h2 { font-size: 1.6rem; margin: 0 0 14px; }
.ages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.age-card {
  --c: var(--kunyit);
  position: relative; text-decoration: none; color: var(--ink);
  background: #fff; border-radius: 36px 36px 36px 12px; padding: 22px 20px 20px;
  box-shadow: 0 10px 0 color-mix(in srgb, var(--c) 70%, #000 30%), inset 0 -6px 0 color-mix(in srgb, var(--c) 30%, #fff 70%);
  border: 4px solid var(--c);
  transition: transform .12s;
  text-align: left;
}
.age-card:hover { transform: translateY(-4px) rotate(-1deg); }
.age-card:active { transform: translateY(6px); box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 70%, #000 30%); }
.age-card .emo { font-size: 3rem; line-height: 1; }
.age-card .range { position: absolute; top: 16px; right: 18px; background: var(--c); color: #fff; font-weight: 800;
  border-radius: 14px; padding: 2px 12px; font-size: 1.15rem; }
.age-card h3 { margin: 8px 0 2px; font-size: 1.5rem; line-height: 1.1; }
.age-card p { margin: 0; font-size: .98rem; color: var(--ink-soft); }
.age-card.current { outline: 5px dashed var(--c); outline-offset: 6px; }
@media (max-width: 760px) { .ages { grid-template-columns: 1fr; } }

/* ---------- Islands (home + zone) ---------- */
.section { padding: 48px 0; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 6px; line-height: 1.1; }
.section-sub { margin: 0 0 24px; color: var(--ink-soft); font-weight: 600; }
.islands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; perspective: 1000px; }
.island {
  --c: var(--pandan);
  position: relative; display: block; text-decoration: none; color: var(--ink);
  padding: 26px 18px 70px; text-align: center;
  transform-style: preserve-3d; transition: transform .2s;
}
.island .land {
  position: relative; width: 100%; aspect-ratio: 1.25; margin: 0 auto;
  transform-style: preserve-3d;
}
.island .top {
  position: absolute; inset: 0 4% 26%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 60%, #fff 40%), var(--c));
  border-radius: 48% 52% 46% 54% / 55% 50% 50% 45%;
  box-shadow: 0 16px 0 #E9B96E, 0 26px 0 #C98F45, 0 40px 30px rgba(7, 90, 146, .35);
  display: grid; place-items: center; font-size: clamp(3rem, 7vw, 4.6rem);
}
.island .top span { filter: drop-shadow(0 6px 0 rgba(0,0,0,.15)); }
.island h3 { margin: 30px 0 4px; font-size: 1.35rem; line-height: 1.1; }
.island p { margin: 0; font-size: .95rem; color: var(--ink-soft); font-weight: 600; }
.island:hover .land { transform: rotateX(12deg) translateY(-8px); transition: transform .25s; }
@media (max-width: 960px) { .islands { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .islands { gap: 8px; } .island { padding-inline: 4px; } }

/* ---------- Together promo ---------- */
.together-band {
  background: var(--ink); color: #fff; border-radius: 40px; padding: 36px;
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  box-shadow: 0 10px 0 #0c1e2e;
}
.together-band .big { font-size: 5.5rem; line-height: 1; }
.together-band h2 { margin: 0 0 8px; font-size: 2rem; }
.together-band p { margin: 0 0 16px; color: #CFE6F5; max-width: 60ch; }
.feature-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.feature-list li { background: rgba(255,255,255,.12); border-radius: 14px; padding: 6px 12px; font-weight: 700; font-size: .95rem; }
@media (max-width: 700px) { .together-band { grid-template-columns: 1fr; padding: 26px; } .together-band .big { font-size: 4rem; } }

/* ---------- Page header for content islands ---------- */
.page-head { display: flex; align-items: center; gap: 18px; padding: 26px 0 10px; flex-wrap: wrap; }
.page-head .emo {
  width: 84px; height: 84px; border-radius: 28px; background: #fff; display: grid; place-items: center;
  font-size: 3rem; box-shadow: 0 6px 0 var(--edge);
}
.page-head h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.05; }
.page-head p { margin: 2px 0 0; color: var(--ink-soft); font-weight: 600; }
.age-pill {
  margin-left: auto; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: var(--radius-pill);
  padding: 6px 8px 6px 14px; font-weight: 800; box-shadow: 0 4px 0 var(--edge);
}
.age-pill select { font: inherit; border: 0; background: var(--sky-2); border-radius: var(--radius-pill); padding: 4px 10px; font-weight: 800; color: var(--ink); }

/* Subject chips */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 22px; }
.chip {
  --c: var(--ink);
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800;
  background: #fff; color: var(--ink); padding: 8px 16px 8px 8px; border-radius: var(--radius-pill);
  box-shadow: 0 4px 0 var(--edge); border: 3px solid transparent;
}
.chip .b { background: var(--c); color: #fff; border-radius: var(--radius-pill); min-width: 38px; height: 32px;
  display: grid; place-items: center; padding: 0 8px; font-size: .9rem; }
.chip.on { border-color: var(--c); box-shadow: 0 4px 0 var(--c); }

/* ---------- Tiles (content cards) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; perspective: 900px; }
.tile {
  --c: var(--sea);
  position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  background: #fff; border-radius: var(--radius-tile); overflow: hidden;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 55%, #000 45%);
  transform-style: preserve-3d; will-change: transform;
  transition: box-shadow .1s;
}
.tile:active { box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 55%, #000 45%); transform: translateY(6px) !important; }
.tile .art {
  position: relative; height: 150px; display: grid; place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.35) 0 18px, transparent 19px),
    radial-gradient(circle at 85% 75%, rgba(255,255,255,.25) 0 30px, transparent 31px),
    var(--c);
  font-size: 4.4rem;
}
.tile .art span { transform: translateZ(40px); filter: drop-shadow(0 8px 0 rgba(0,0,0,.18)); }
.tile .body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tile h3 { margin: 0; font-size: 1.25rem; line-height: 1.15; }
.tile p { margin: 0; font-size: .95rem; color: var(--ink-soft); }
.tile .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.tag { font-size: .8rem; font-weight: 800; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--sky-2); }
.tag.t1 { background: #FFF1C9; }
.tag.t2 { background: #FFD6DC; color: #A3122A; }
.tile .done { position: absolute; top: 10px; right: 10px; background: #fff; border-radius: 50%; width: 38px; height: 38px;
  display: grid; place-items: center; font-size: 1.2rem; box-shadow: 0 3px 0 var(--edge); }
.empty { background: #fff; border-radius: var(--radius-tile); padding: 30px; text-align: center; font-weight: 700; }

/* ---------- Play stage (lesson/game/story pages) ---------- */
.stage-head { display: flex; align-items: center; gap: 12px; padding: 18px 0 12px; }
.stage-head h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.1; flex: 1; }
.stage {
  position: relative; background: #fff; border-radius: 40px; padding: 24px;
  box-shadow: 0 10px 0 var(--edge), 0 30px 60px rgba(14, 124, 196, .18);
  min-height: 460px;
}
.progress-dots { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 4px 0 14px; }
.progress-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--sky-2); }
.progress-dots i.on { background: var(--kunyit); transform: scale(1.3); }
.progress-dots i.done { background: var(--pandan); }

/* Flash card with 3D flip */
.flash-wrap { perspective: 1200px; width: min(440px, 100%); margin: 0 auto; }
.flash {
  position: relative; width: 100%; aspect-ratio: 4 / 4.4; cursor: pointer;
  transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1);
}
.flash.flipped { transform: rotateY(180deg); }
.flash .face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 34px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; text-align: center; gap: 4px;
  background: var(--c, var(--kunyit));
  box-shadow: inset 0 -10px 0 rgba(0,0,0,.12), 0 10px 0 rgba(0,0,0,.12);
  color: #fff;
}
.flash .back { transform: rotateY(180deg); background: #fff; color: var(--ink); border: 6px solid var(--c, var(--kunyit)); }
.flash .emoji { font-size: clamp(3.4rem, 12vw, 6rem); line-height: 1.1; filter: drop-shadow(0 8px 0 rgba(0,0,0,.15)); word-break: break-all; }
.flash .glyph { font-size: clamp(3.6rem, 14vw, 7rem); font-weight: 800; line-height: 1.1;
  text-shadow: 0 6px 0 rgba(0,0,0,.18); }
.flash .glyph.small { font-size: clamp(2.2rem, 8vw, 3.6rem); }
.flash .roman { font-size: 1.5rem; font-weight: 800; background: rgba(255,255,255,.25); padding: 0 14px; border-radius: 14px; }
.flash .hint { position: absolute; bottom: 14px; font-size: .85rem; font-weight: 700; opacity: .85; }
.flash .mean { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; line-height: 1.1; }
.flash .mean small { display: block; font-size: 1.05rem; color: var(--ink-soft); font-weight: 700; }
.flash .fact { margin-top: 10px; background: var(--sand); border-radius: 16px; padding: 8px 12px; font-size: 1rem; font-weight: 600; }
.say-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.controls { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

/* Quiz options */
.quiz-q { text-align: center; font-size: 1.4rem; font-weight: 800; margin: 6px 0 18px; }
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 640px; margin: 0 auto; }
.opt {
  --c: var(--sky-2);
  border: 0; cursor: pointer; background: #fff; border-radius: 26px; padding: 16px 8px; min-height: 130px;
  display: grid; place-items: center; font-size: 3rem; line-height: 1.1; font-weight: 800; color: var(--ink);
  box-shadow: 0 7px 0 var(--edge), inset 0 0 0 4px var(--c);
  transition: transform .08s;
}
.opt:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--edge), inset 0 0 0 4px var(--c); }
.opt.right { --c: var(--pandan); background: #E3FBEA; }
.opt.wrong { --c: var(--raya); background: #FFE5E9; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@media (max-width: 520px) { .options { grid-template-columns: repeat(2, 1fr); } .opt { min-height: 110px; font-size: 2.4rem; } }

/* ---------- Story book ---------- */
.book { perspective: 1600px; max-width: 900px; margin: 0 auto; }
.page {
  position: relative; border-radius: 30px; overflow: hidden; min-height: 470px;
  display: grid; grid-template-rows: 1fr auto;
  transform-origin: left center; transition: transform .6s ease, opacity .6s;
  box-shadow: 0 10px 0 var(--edge);
}
.page.turn-out { transform: rotateY(-100deg); opacity: 0; }
.page.turn-in { animation: pageIn .6s ease; }
@keyframes pageIn { from { transform: rotateY(60deg); opacity: 0; } }
.scene { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 4%; padding: 30px 20px 26px; min-height: 270px; }
.scene .s {
  font-size: clamp(3.2rem, 10vw, 6rem); line-height: 1; filter: drop-shadow(0 10px 0 rgba(0,0,0,.15));
  animation: bob 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * -.7s);
}
@keyframes bob { 50% { transform: translateY(-12px) rotate(calc(var(--i) * 2deg - 3deg)); } }
.bg-sky { background: linear-gradient(#7FD3FF, #D9F4FF); }
.bg-sea { background: linear-gradient(#5ED3F3 0, #0E7CC4 100%); }
.bg-forest { background: linear-gradient(#B9F6CA, #2BBF6A); }
.bg-night { background: radial-gradient(circle at 80% 18%, #FFF6B0 0 30px, transparent 31px), linear-gradient(#1B2A5E, #3B4FA0 70%, #E6C78A 70%); }
.bg-kampung { background: linear-gradient(#FFE3A3 0, #FFC56E 60%, #9BD77E 60%); }
.bg-festival { background: radial-gradient(circle at 15% 25%, #FFD6E0 0 40px, transparent 41px), radial-gradient(circle at 85% 30%, #FFF0B3 0 50px, transparent 51px), linear-gradient(#FF8FAB, #FFB703); }
.bg-river { background: linear-gradient(#B9F6CA 0, #8FD8B0 50%, #3FA9E0 50%, #0E7CC4); }
.bg-field { background: linear-gradient(#9EE3FF 0, #D4F3FF 50%, #C9E77A 50%, #8CC63F); }
.story-text { background: #fff; padding: 20px 26px 24px; font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 600; line-height: 1.45; }
.story-text .alt { display: block; font-size: .8em; color: var(--ink-soft); margin-top: 6px; font-weight: 500; }
.story-text .word { border-radius: 6px; transition: background .15s; }
.story-text .word.hl { background: var(--kunyit); }
.end-card { text-align: center; padding: 30px 20px; }
.end-card .moral { background: var(--sand); border-radius: 24px; padding: 16px 20px; font-size: 1.25rem; font-weight: 700; max-width: 640px; margin: 14px auto; }
.questions { text-align: left; max-width: 640px; margin: 18px auto; padding: 18px 22px; border-radius: 24px; background: var(--sky-2); }
.questions h3 { margin: 0 0 8px; }
.questions li { margin: 6px 0; font-weight: 600; }

/* ---------- Parent tips drawer ---------- */
.tips {
  margin-top: 22px; background: #FFF6DA; border-radius: 24px; padding: 14px 20px;
  border: 3px dashed #F2C14E;
}
.tips summary { font-weight: 800; cursor: pointer; list-style: none; }
.tips summary::-webkit-details-marker { display: none; }
.tips ul { margin: 10px 0 0; padding-left: 20px; }
.tips li { margin: 4px 0; }

/* ---------- Together banner ---------- */
.together-bar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50;
  display: none; align-items: center; gap: 12px; background: var(--ink); color: #fff;
  padding: 8px 8px 8px 18px; border-radius: var(--radius-pill); box-shadow: 0 6px 0 #0c1e2e; font-weight: 800;
}
.together-bar.on { display: flex; }
.together-bar .clock { font-variant-numeric: tabular-nums; background: rgba(255,255,255,.15); border-radius: 12px; padding: 2px 10px; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 16px;
  background: rgba(24, 50, 74, .55); backdrop-filter: blur(4px); }
.modal.open { display: grid; }
.modal-box {
  background: #fff; border-radius: 36px; padding: 28px 24px; width: min(420px, 100%); text-align: center;
  box-shadow: 0 10px 0 var(--edge); animation: pop .3s cubic-bezier(.3, 1.6, .5, 1);
}
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.modal-box h2 { margin: 0 0 4px; font-size: 1.7rem; line-height: 1.15; }
.modal-box p { margin: 0 0 14px; color: var(--ink-soft); font-weight: 600; }
.modal-box .big { font-size: 4rem; line-height: 1; margin-bottom: 8px; }
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 12px 0; }
.pin-dots i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--ink); }
.pin-dots i.f { background: var(--ink); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 280px; margin: 0 auto 12px; }
.keypad button { font-size: 1.5rem; font-weight: 800; border: 0; border-radius: 20px; padding: 12px 0; background: var(--sky-2);
  box-shadow: 0 4px 0 var(--edge); cursor: pointer; color: var(--ink); }
.keypad button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.gate-q { font-size: 2rem; font-weight: 800; margin: 6px 0 10px; }
.gate-err { color: var(--raya); font-weight: 800; min-height: 1.5em; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.stars-won { font-size: 3.4rem; letter-spacing: 6px; margin: 6px 0 12px; }
.stars-won .off { filter: grayscale(1); opacity: .3; }

/* Confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* Toast */
.toast { position: fixed; top: 86px; left: 50%; transform: translateX(-50%); z-index: 130; background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 18px; font-weight: 700; box-shadow: 0 5px 0 #0c1e2e; max-width: calc(100% - 32px); }

/* ---------- Forms / parent area ---------- */
.panel { background: #fff; border-radius: 32px; padding: 28px; box-shadow: 0 8px 0 var(--edge); }
.auth { max-width: 460px; margin: 30px auto 60px; }
.auth h1 { margin: 0 0 14px; font-size: 2rem; line-height: 1.1; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field label { font-weight: 800; font-size: .95rem; }
.field input, .field select {
  font: inherit; font-size: 1.05rem; padding: 12px 16px; border-radius: 18px; border: 3px solid var(--sky-2); color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus { border-color: var(--sea); outline: none; }
.field small { color: var(--ink-soft); }
.alert { border-radius: 18px; padding: 10px 16px; font-weight: 700; margin-bottom: 14px; }
.alert-error { background: #FFE5E9; color: #A3122A; }
.alert-success { background: #E3FBEA; color: #146C3A; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-pick label { cursor: pointer; }
.avatar-pick input { position: absolute; opacity: 0; }
.avatar-pick span { width: 54px; height: 54px; display: grid; place-items: center; font-size: 1.8rem; border-radius: 18px; background: var(--sky-2); border: 3px solid transparent; }
.avatar-pick input:checked + span { border-color: var(--sea); background: #fff; box-shadow: 0 4px 0 var(--sea); }
.avatar-pick input:focus-visible + span { outline: 4px solid var(--kunyit); }

.dash-grid { display: grid; gap: 24px; }
.child-card { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.child-id { text-align: center; }
.child-id .av { width: 110px; height: 110px; border-radius: 36px; margin: 0 auto 8px; background: var(--sky-2); display: grid; place-items: center; font-size: 4rem; }
.child-id h2 { margin: 0; font-size: 1.6rem; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--sky-2); border-radius: 20px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 1.6rem; line-height: 1.1; }
.stat span { font-size: .82rem; font-weight: 700; color: var(--ink-soft); }
.meter { height: 16px; border-radius: 99px; background: var(--sky-2); overflow: hidden; margin: 4px 0 2px; }
.meter i { display: block; height: 100%; background: var(--pandan); border-radius: 99px; }
.meter i.over { background: var(--raya); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 130px; margin: 8px 0 4px; }
.bars .day { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bars .pair { display: flex; gap: 3px; align-items: flex-end; height: 100%; }
.bars .b1, .bars .b2 { width: 12px; border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bars .b1 { background: var(--sea); }
.bars .b2 { background: var(--kunyit); }
.bars small { font-size: .72rem; font-weight: 700; color: var(--ink-soft); }
.legend { display: flex; gap: 14px; font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 4px; vertical-align: -1px; }
.recent { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.recent li { display: flex; align-items: center; gap: 10px; background: #F5FBFF; border-radius: 14px; padding: 6px 12px; font-weight: 600; font-size: .95rem; }
.recent .when { margin-left: auto; color: var(--ink-soft); font-size: .8rem; }
@media (max-width: 820px) { .child-card { grid-template-columns: 1fr; } .stat-row { grid-template-columns: repeat(2, 1fr); } }

/* Who's playing */
.who { text-align: center; padding: 40px 0 80px; }
.who h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 26px; }
.who-grid { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; }
.who a { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; }
.who .av { width: 140px; height: 140px; border-radius: 44px; background: #fff; display: grid; place-items: center; font-size: 5rem;
  box-shadow: 0 10px 0 var(--edge); transition: transform .15s; }
.who a:hover .av { transform: translateY(-6px) rotate(-3deg); }
.who .stars { font-size: 1rem; background: var(--sand); padding: 0 12px; border-radius: 12px; }

/* Together page */
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.act {
  background: #fff; border-radius: 26px; padding: 18px; box-shadow: 0 6px 0 var(--edge);
  display: flex; flex-direction: column; gap: 6px;
}
.act .e { font-size: 2.6rem; line-height: 1; }
.act h3 { margin: 0; font-size: 1.15rem; line-height: 1.2; }
.act p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.act .btn { align-self: flex-start; margin-top: auto; }
.act.did { background: #E3FBEA; }

/* Footer */
.foot { position: relative; margin-top: 60px; padding: 70px 0 40px; text-align: center; color: #E6F6FF; font-weight: 700; }
.foot .wrap { position: relative; }
.foot a { color: #fff; }
.foot .sea { height: auto; top: 0; bottom: 0; opacity: 1; position: absolute; left: 0; right: 0; }
.page-play .foot, .page-read .foot { margin-top: 30px; }
.foot a { margin: 0 8px; }

/* ---------- Game common ---------- */
.game-hud { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 800; flex-wrap: wrap; }
.game-hud .pill { background: var(--sky-2); border-radius: var(--radius-pill); padding: 4px 14px; }
.game-prompt { text-align: center; font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 800; margin: 4px 0 16px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.start-screen { text-align: center; padding: 30px 10px; }
.start-screen .big { font-size: 7rem; line-height: 1; filter: drop-shadow(0 10px 0 rgba(0,0,0,.12)); }
.start-screen h2 { font-size: 2rem; margin: 10px 0 4px; }
.start-screen p { color: var(--ink-soft); font-weight: 600; margin: 0 0 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Premium, payments & admin
   ========================================================================== */
:root { --gold: #F5B400; --gold-deep: #B37F00; --cream-gold: #FFF4CC; }
.mainnav a.prem-link { color: var(--gold-deep); }
.mainnav a.prem-link.active { background: var(--gold); color: var(--ink); }
.tag.tp { background: var(--cream-gold); color: #7A5600; }
.tag.tf { background: #E3FBEA; color: #146C3A; }
.prem-flag { position: absolute; top: 10px; left: 10px; background: #fff; border-radius: 14px; padding: 2px 10px; font-size: 1.1rem; box-shadow: 0 3px 0 var(--edge); }
.tile.locked .art { filter: saturate(.55) brightness(.95); }
.tile.locked .art::after { content: '🔒'; position: absolute; right: 12px; bottom: 10px; font-size: 1.6rem; filter: drop-shadow(0 3px 0 rgba(0,0,0,.2)); }

.prem-hero { text-align: center; padding: 34px 0 10px; }
.prem-hero .crown { font-size: 5rem; line-height: 1; filter: drop-shadow(0 8px 0 rgba(179,127,0,.3)); }
.prem-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 6px 0 6px; line-height: 1.05; text-wrap: balance; }
.prem-hero p { max-width: 58ch; margin: 0 auto 14px; color: var(--ink-soft); font-weight: 600; }
.prem-status { display: inline-block; border-radius: 18px; padding: 10px 18px; font-weight: 800; margin-top: 6px; }
.prem-status.ok { background: #E3FBEA; color: #146C3A; }
.prem-status.wait { background: var(--cream-gold); color: #7A5600; }

.compare { display: grid; grid-template-columns: 1fr 1.15fr; gap: 22px; margin: 26px 0 40px; }
.compare .col { border-radius: 32px; padding: 24px 26px; }
.compare .free { background: #fff; box-shadow: 0 8px 0 var(--edge); }
.compare .prem { background: var(--ink); color: #fff; box-shadow: 0 8px 0 #0c1e2e; position: relative; }
.compare h2 { margin: 0 0 8px; font-size: 1.5rem; }
.compare .plus { margin: 0 0 6px; color: var(--gold); font-weight: 800; }
.compare ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.compare li { padding-left: 30px; position: relative; font-weight: 600; }
.compare li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; background: #E3FBEA; color: #146C3A; }
.compare .prem li::before { content: '★'; background: var(--gold); color: var(--ink); }
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-top: 14px; }
.plan { position: relative; background: #fff; border-radius: 30px; padding: 26px 22px 22px; text-align: center; box-shadow: 0 8px 0 var(--edge); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.plan.best { border: 4px solid var(--gold); box-shadow: 0 8px 0 var(--gold-deep); }
.plan h3 { margin: 6px 0 0; font-size: 1.35rem; }
.plan .price { font-size: 2.6rem; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.plan .per { color: var(--ink-soft); font-weight: 700; }
.plan .pm { font-size: .9rem; color: #146C3A; font-weight: 800; }
.plan .btn { margin-top: 12px; width: 100%; }
.plan .ribbon { position: absolute; top: -14px; background: var(--gold); color: var(--ink); font-weight: 800; font-size: .85rem; padding: 3px 14px; border-radius: 999px; box-shadow: 0 3px 0 var(--gold-deep); white-space: nowrap; }

.steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { background: #fff; border-radius: 24px; padding: 16px; font-weight: 700; box-shadow: 0 5px 0 var(--edge); counter-increment: s; position: relative; }
.steps li span { display: block; font-size: 2rem; }
.steps li::after { content: counter(s); position: absolute; top: 10px; right: 14px; font-weight: 800; color: var(--gold-deep); font-size: 1.3rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr 1fr; } }
.how { margin-top: 40px; }

.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; font-size: .82rem; color: var(--ink-soft); padding: 6px 10px; border-bottom: 2px solid var(--sky-2); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--sky-2); vertical-align: top; }
.tbl code, .ref code, .bank code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--sky-2); padding: 2px 8px; border-radius: 8px; }
.muted { color: var(--ink-soft); font-size: .88rem; }
.st { display: inline-block; font-weight: 800; font-size: .82rem; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st-pending { background: var(--cream-gold); color: #7A5600; }
.st-approved { background: #E3FBEA; color: #146C3A; }
.st-rejected { background: #FFE5E9; color: #A3122A; }

.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .pay-grid { grid-template-columns: 1fr; } }
.pay-sum { display: flex; justify-content: space-between; gap: 12px; background: var(--sky-2); border-radius: 20px; padding: 12px 18px; }
.pay-sum small, .ref small { display: block; color: var(--ink-soft); font-weight: 700; font-size: .82rem; }
.pay-sum b { font-size: 1.2rem; }
.pay-sum .amt { font-size: 1.8rem; color: var(--raya); font-variant-numeric: tabular-nums; }
.qr-box { text-align: center; margin: 18px 0 8px; }
.qr-box img { width: min(260px, 100%); height: auto; margin: 0 auto; border-radius: 20px; border: 6px solid #fff; box-shadow: 0 0 0 3px #E2007A, 0 8px 0 var(--edge); background: #fff; }
.qr-box p { font-weight: 700; color: var(--ink-soft); margin: 10px 0 0; }
.qr-missing { background: var(--cream-gold); border-radius: 20px; padding: 26px 16px; font-weight: 700; }
.ref { margin: 14px 0; }
.ref-row { display: flex; gap: 8px; align-items: center; }
.ref-row code { font-size: 1.3rem; font-weight: 800; letter-spacing: 1px; }
.bank { background: #F5FBFF; border-radius: 18px; padding: 10px 16px; }
.bank summary { font-weight: 800; cursor: pointer; }
.bank dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0 4px; }
.bank dt { color: var(--ink-soft); font-weight: 700; }
.bank dd { margin: 0; font-weight: 800; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 4px dashed var(--sky); border-radius: 26px; padding: 26px 16px; cursor: pointer; text-align: center; font-weight: 800; background: #F5FBFF; position: relative; }
.drop:hover { border-color: var(--sea); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-ico { font-size: 2.6rem; }
.drop img { max-height: 220px; border-radius: 14px; }

.locked-stage { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.lock-art { position: relative; width: 150px; height: 150px; border-radius: 44px; background: var(--c); display: grid; place-items: center; box-shadow: inset 0 -10px 0 rgba(0,0,0,.15); margin-bottom: 10px; }
.lock-art .item { font-size: 5rem; filter: saturate(.7); }
.lock-art .badge { position: absolute; right: -14px; top: -14px; font-size: 2.6rem; background: #fff; border-radius: 50%; width: 64px; height: 64px; display: grid; place-items: center; box-shadow: 0 5px 0 var(--edge); }
.locked-stage h2 { margin: 0; font-size: 2rem; }
.locked-stage p { margin: 4px 0; color: var(--ink-soft); font-weight: 600; max-width: 52ch; }
.locked-stage .ask { font-size: 1.3rem; color: var(--ink); font-weight: 800; }
.mini-perks { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; text-align: left; font-weight: 700; }

/* Report teaser (free accounts) */
.locked-report { position: relative; border-radius: 24px; overflow: hidden; }
.locked-report .blur { filter: blur(5px); pointer-events: none; user-select: none; opacity: .75; }
.locked-report .cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.85)); font-weight: 800; }
.locked-report .cover .c { font-size: 2.6rem; }
.plan-chip { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 14px; font-weight: 800; }
.plan-chip.free { background: var(--sky-2); }
.plan-chip.prem { background: var(--gold); }
.subj-bars { display: grid; gap: 8px; }
.subj-row { display: grid; grid-template-columns: 150px 1fr 70px; gap: 10px; align-items: center; font-weight: 700; font-size: .92rem; }
.subj-row .meter { margin: 0; }
.subj-row .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.insight { border-radius: 18px; padding: 10px 14px; font-weight: 700; }
.insight b { display: block; font-size: .8rem; color: var(--ink-soft); }
.insight.good { background: #E3FBEA; } .insight.work { background: #FFF1C9; } .insight.idea { background: var(--sky-2); }

/* Admin */
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.admin-nav a { text-decoration: none; font-weight: 800; padding: 8px 16px; border-radius: 999px; background: #fff; box-shadow: 0 4px 0 var(--edge); }
.admin-nav a.on { background: var(--ink); color: #fff; }
.admin-nav .count { background: var(--raya); color: #fff; border-radius: 999px; padding: 0 8px; margin-left: 4px; font-size: .8rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: 20px; padding: 12px 16px; box-shadow: 0 5px 0 var(--edge); }
.kpi b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi span { font-size: .82rem; font-weight: 700; color: var(--ink-soft); }
@media (max-width: 700px) { .kpis { grid-template-columns: 1fr 1fr; } }
.pay-item { display: grid; grid-template-columns: 160px 1fr; gap: 18px; background: #fff; border-radius: 24px; padding: 16px; box-shadow: 0 6px 0 var(--edge); margin-bottom: 16px; }
.pay-item .thumb { display: block; border-radius: 16px; overflow: hidden; background: var(--sky-2); aspect-ratio: 3/4; max-width: 100%; }
.pay-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pay-item .thumb .pdf { display: grid; place-items: center; height: 100%; font-size: 3rem; text-decoration: none; }
.pay-item h3 { margin: 0; }
.pay-item .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.pay-item .actions input { font: inherit; padding: 8px 12px; border-radius: 14px; border: 3px solid var(--sky-2); min-width: 0; flex: 1 1 180px; }
@media (max-width: 600px) { .pay-item { grid-template-columns: 1fr; } .pay-item .thumb { max-width: 220px; } }
.toggle-btn { border: 0; cursor: pointer; font: inherit; font-weight: 800; border-radius: 999px; padding: 4px 12px; }
.toggle-btn.on { background: var(--gold); }
.toggle-btn.off { background: #E3FBEA; color: #146C3A; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.plan-edit { display: grid; grid-template-columns: 1.2fr 1.2fr .6fr .8fr 1.4fr 1.4fr .5fr; gap: 6px; align-items: center; margin-bottom: 6px; }
.plan-edit input { font: inherit; font-size: .9rem; padding: 6px 8px; border-radius: 10px; border: 2px solid var(--sky-2); min-width: 0; width: 100%; }
@media (max-width: 900px) { .plan-edit { grid-template-columns: 1fr 1fr; } }

/* Spoken-word caption (shown when no proper voice is available) */
.say-caption { position: fixed; left: 50%; top: 92px; transform: translate(-50%, -16px); z-index: 140; max-width: min(560px, calc(100% - 32px));
  background: #fff; color: var(--ink); font-weight: 800; font-size: 1.15rem; padding: 10px 18px; border-radius: 22px; box-shadow: 0 6px 0 var(--edge);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; }
.say-caption.on { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Learning path (Tahap 1–3), AI images, game levels
   ========================================================================== */
.ai-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .art:has(.ai-img) { padding: 0; }
.tile .art .ai-img { position: absolute; inset: 0; }
.tile .art span:has(.ai-img) { position: absolute; inset: 0; transform: none; filter: none; }
.subject-row { margin-bottom: 34px; }
.subject-row .section-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.path { position: relative; max-width: 560px; margin: 10px auto 40px; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 10px 0 20px; }
.path::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 14px; margin-left: -7px; border-radius: 99px;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.9) 0 18px, transparent 18px 30px); z-index: 0; }
.path-level { position: relative; z-index: 1; background: var(--sc); color: #fff; font-weight: 800; padding: 6px 20px; border-radius: 999px; box-shadow: 0 5px 0 rgba(0,0,0,.2); font-size: 1.1rem; }
.path-node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translateX(var(--x)); }
.path-node .node { position: relative; display: block; text-decoration: none; }
.path-node .disc { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-size: 3rem;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, #fff 45%), var(--c));
  box-shadow: 0 9px 0 color-mix(in srgb, var(--c) 55%, #000 45%), inset 0 -6px 0 rgba(0,0,0,.12); border: 5px solid #fff; transition: transform .12s; }
.path-node .node:hover .disc { transform: translateY(-3px) scale(1.04); }
.path-node .node:active .disc { transform: translateY(6px); box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 55%, #000 45%); }
.path-node.is-done .disc { border-color: var(--kunyit); }
.path-node.is-locked .disc { filter: grayscale(.85) brightness(1.05); opacity: .75; }
.path-node .crown, .path-node .padlock { position: absolute; font-size: 1.5rem; background: #fff; border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; box-shadow: 0 3px 0 var(--edge); }
.path-node .crown { top: -6px; right: -10px; }
.path-node .padlock { bottom: -4px; left: -10px; }
.path-node .label { background: #fff; border-radius: 16px; padding: 4px 12px; text-align: center; box-shadow: 0 4px 0 var(--edge); max-width: 220px; }
.path-node .label b { display: block; font-size: .98rem; line-height: 1.2; }
.stars-row { letter-spacing: 2px; font-style: normal; }
.stars-row i { font-style: normal; color: #D7E3EC; font-size: 1.05rem; }
.stars-row i.on { color: var(--gold, #F5B400); }
.path-end { position: relative; z-index: 1; font-size: 3rem; }
@media (max-width: 480px) { .path-node { transform: translateX(calc(var(--x) * .55)); } .path-node .disc { width: 88px; height: 88px; } }

/* Game level map */
.level-map { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; max-width: 640px; margin: 10px auto 0; }
.lvl { border: 0; cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px 10px; border-radius: 26px;
  background: #fff; box-shadow: 0 7px 0 var(--edge), inset 0 0 0 4px var(--c, var(--sky-2)); color: var(--ink); }
.lvl b { font-size: 2rem; line-height: 1; }
.lvl small { font-weight: 700; color: var(--ink-soft); font-size: .78rem; }
.lvl:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--edge), inset 0 0 0 4px var(--c, var(--sky-2)); }
.lvl.locked { opacity: .5; cursor: not-allowed; }
.lvl.done { background: #FFF8DD; }
@media (max-width: 520px) { .level-map { grid-template-columns: repeat(3, 1fr); } }

/* Spelling tiles & true/false */
.spell-slots, .spell-tiles { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.spell-slots span { min-width: 54px; height: 62px; border-radius: 16px; border: 3px dashed var(--sky); display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; padding: 0 8px; }
.spell-slots span.f { border-style: solid; border-color: var(--pandan); background: #E3FBEA; }
.spell-tiles button { min-width: 58px; height: 62px; border: 0; border-radius: 16px; font: 800 1.8rem var(--font); background: var(--kunyit); color: var(--ink); box-shadow: 0 6px 0 #C99A00; cursor: pointer; padding: 0 10px; }
.spell-tiles button:active { transform: translateY(4px); box-shadow: 0 2px 0 #C99A00; }
.spell-tiles button[disabled] { opacity: .25; }
.tf-card { text-align: center; }
.tf-card .pic { font-size: 5rem; line-height: 1.1; }
.tf-card .pic .ai-img { width: 180px; height: 180px; border-radius: 28px; margin: 0 auto; }
.tf-card .word { font-size: 2rem; font-weight: 800; margin: 6px 0 14px; }
.tf-btns { display: flex; gap: 16px; justify-content: center; }
.tf-btns .opt { width: 130px; min-height: 100px; }
.flash .face .card-img { width: 74%; aspect-ratio: 1; border-radius: 26px; object-fit: cover; box-shadow: 0 8px 0 rgba(0,0,0,.12); }
.scene .scene-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene:has(.scene-img) { min-height: 340px; }
.opt .ai-img { width: 90px; height: 90px; border-radius: 18px; }

/* Honeypot field: invisible to people, bots fill it in */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.sel { user-select: all; font-weight: 700; }
.contact-info p { margin: 0 0 12px; }

/* Quiz game */
.quiz-opts { display: grid; gap: 12px; max-width: 620px; margin: 0 auto; }
.qopt { display: flex; align-items: center; gap: 14px; text-align: left; border: 0; cursor: pointer; font: 700 1.2rem var(--font); color: var(--ink);
  background: #fff; border-radius: 22px; padding: 12px 18px; box-shadow: 0 6px 0 var(--edge), inset 0 0 0 4px var(--sky-2); }
.qopt .qe { font-size: 2rem; width: 52px; height: 52px; border-radius: 16px; background: var(--sky-2); display: grid; place-items: center; flex-shrink: 0; }
.qopt:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--edge), inset 0 0 0 4px var(--sky-2); }
.qopt.right { background: #E3FBEA; box-shadow: 0 6px 0 var(--edge), inset 0 0 0 4px var(--pandan); }
.qopt.wrong { background: #FFE5E9; box-shadow: 0 6px 0 var(--edge), inset 0 0 0 4px var(--raya); animation: shake .35s; }
.quiz-fact { max-width: 620px; margin: 16px auto 0; background: var(--sand); border-radius: 22px; padding: 14px 18px; font-weight: 700; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }

/* Extra story backgrounds */
.bg-space { background: radial-gradient(circle at 20% 25%, #fff 0 2px, transparent 3px), radial-gradient(circle at 70% 15%, #fff 0 2px, transparent 3px), radial-gradient(circle at 85% 60%, #fff 0 1.5px, transparent 2.5px), radial-gradient(circle at 40% 70%, #fff 0 1.5px, transparent 2.5px), linear-gradient(#10002B, #3C096C); }
.bg-prehistoric { background: radial-gradient(circle at 85% 20%, #FFB703 0 34px, transparent 35px), linear-gradient(#FFD6A5 0, #FDAE6B 45%, #6A994E 45%, #386641); }
.bg-mountain { background: linear-gradient(160deg, transparent 55%, #6D597A 55%), linear-gradient(200deg, transparent 50%, #9F86C0 50%), linear-gradient(#E0E1FF, #C8B6FF); }

/* ==========================================================================
   Notifications bell, settings switches, install guide
   ========================================================================== */
.bell-wrap { position: relative; }
.bell { position: relative; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--sky-2); font-size: 1.3rem; cursor: pointer; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--raya); color: #fff;
  font: 800 .75rem/22px var(--font); text-align: center; box-shadow: 0 2px 0 rgba(0,0,0,.2); }
.bell-panel { position: absolute; right: 0; top: 54px; width: min(380px, calc(100vw - 32px)); background: #fff; border-radius: 24px; box-shadow: 0 8px 0 var(--edge), 0 20px 40px rgba(14,124,196,.25); z-index: 60; overflow: hidden; }
.bell-head, .bell-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; }
.bell-head { border-bottom: 2px solid var(--sky-2); }
.bell-foot { border-top: 2px solid var(--sky-2); font-weight: 800; font-size: .9rem; }
.bell-list { max-height: min(60vh, 420px); overflow-y: auto; }
.link-btn { border: 0; background: none; color: var(--sea); font: 700 .85rem var(--font); cursor: pointer; padding: 0; }
.bell-item { display: flex; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #EEF7FD; }
.bell-item:hover { background: #F5FBFF; }
.bell-item.unread { background: #FFF8DD; }
.bell-item.unread b::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--raya); margin-left: 6px; vertical-align: 2px; }
.bell-item .bi { font-size: 1.6rem; line-height: 1; flex-shrink: 0; width: 40px; height: 40px; border-radius: 14px; background: var(--sky-2); display: grid; place-items: center; }
.bell-item .bt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bell-item .bt span { font-size: .9rem; color: var(--ink-soft); }
.bell-item .bt small { font-size: .75rem; color: var(--ink-soft); }
.notif-list { background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 6px 0 var(--edge); }
.notif-list .bell-item { padding: 16px 20px; }

.switch-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--sky-2); cursor: pointer; }
.switch-row .sw-ico { font-size: 1.6rem; width: 48px; height: 48px; border-radius: 16px; background: var(--sky-2); display: grid; place-items: center; }
.switch-row .sw-text { display: flex; flex-direction: column; min-width: 0; }
.switch-row small { color: var(--ink-soft); font-size: .88rem; }
.switch { appearance: none; -webkit-appearance: none; width: 58px; height: 32px; border-radius: 999px; background: #CFE0EA; position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.15); transition: transform .2s; }
.switch:checked { background: var(--pandan); }
.switch:checked::after { transform: translateX(26px); }

.install-hero { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 30px 0 10px; }
.install-hero img { border-radius: 28px; box-shadow: 0 8px 0 var(--edge); }
.install-hero h1 { margin: 0 0 6px; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; text-wrap: balance; }
.install-hero p { margin: 0 0 14px; color: var(--ink-soft); font-weight: 600; max-width: 62ch; }
.installed-note { font-weight: 800; color: #146C3A; background: #E3FBEA; border-radius: 14px; padding: 8px 14px; }
@media (max-width: 600px) { .install-hero { grid-template-columns: 1fr; text-align: center; } .install-hero img { margin: 0 auto; } .install-hero .hero-actions { justify-content: center; } }
button.chip { font: inherit; cursor: pointer; }
.install-tab h2 { font-size: 1.5rem; margin: 6px 0 14px; }
.install-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; counter-reset: st; }
.install-steps li { counter-increment: st; background: #fff; border-radius: 26px; padding: 16px; box-shadow: 0 6px 0 var(--edge); display: flex; flex-direction: column; gap: 6px; font-size: .95rem; color: var(--ink-soft); position: relative; }
.install-steps li::before { content: counter(st); position: absolute; top: -10px; left: -6px; width: 34px; height: 34px; border-radius: 50%; background: var(--raya); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.install-steps li b { color: var(--ink); font-size: 1.05rem; }
.mock { display: block; background: #18324A; border-radius: 22px; padding: 10px; margin-bottom: 6px; min-height: 104px; }
.mock > span { display: flex; background: #F2F7FA; border-radius: 14px; padding: 8px 10px; gap: 8px; align-items: center; font-size: .82rem; color: var(--ink); font-weight: 700; min-height: 84px; }
.mock .bar { justify-content: space-between; align-items: flex-start; }
.mock .menu, .mock .home { flex-direction: column; align-items: stretch; gap: 4px; }
.mock .home { flex-direction: row; justify-content: space-around; font-size: 1.6rem; }
.mock .home img, .mock .dialog img { border-radius: 10px; }
.mock .tabbar { justify-content: space-around; align-items: flex-end; font-size: 1.3rem; }
.mock .dialog { justify-content: space-between; }
.mock .hl { outline: 3px solid var(--raya); outline-offset: 2px; border-radius: 8px; background: #FFE5E9; padding: 2px 6px; animation: pulse 1.4s ease-in-out infinite; }
.mock .btnlike { background: var(--sea); color: #fff; }
.mock img.hl { padding: 0; }
@keyframes pulse { 50% { outline-color: rgba(255,61,90,.25); } }
@media (min-width: 1341px) { .mainnav a.install-link { display: none; } }
@media (max-width: 480px) {
  .topbar .wrap { gap: 6px; padding: 6px 8px 6px 10px; }
  .brand > span { display: none; }
  .tools { gap: 6px; }
  .lang-toggle a { padding: 4px 8px; }
  .bell { width: 40px; height: 40px; font-size: 1.15rem; }
  .kid-chip { padding-right: 8px; }
  .bell-panel { position: fixed; left: 16px; right: 16px; top: 76px; width: auto; }
}
