/* =========================================================
   NAKAYA — Narasi Digital Kaya Makna ("Setiap Cerita Punya Makna")
   Tema: Dunia Pop-Up Buku Cerita · hangat, ceria, tactile & jahit buku
   ========================================================= */
:root {
  --krem: #FFFBF2;
  --krem2: #F7EFE1;
  --krem3: #EBDDC6;
  --tinta: #4A3323;
  --tinta2: #866F5B;
  --oranye: #FF842B;
  --oranye-d: #D46012;
  --biru: #2E96E8;
  --biru-d: #1F6FB5;
  --kuning: #FFC933;
  --kuning-d: #D19712;
  --hijau: #52BD54;
  --hijau-d: #379239;
  --merah: #E84A7F;
  --merah-d: #BE2E5F;
  --ungu: #8F56D9;
  --ungu-d: #6B38B0;
  --teal: #1FB2A6;
  --teal-d: #15877E;
  --putih: #FFFDF9;
  --P: var(--oranye);
  --E: var(--biru);
  --N: var(--hijau);
  --A: var(--ungu);
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 13px;
  --font-h: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-b: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 6px 0 #E8DAC3, 0 14px 28px -20px rgba(74, 51, 35, .28);
  --maxw: 1180px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-b);
  color: var(--tinta);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
  background-color: var(--krem);
  background-image:
    radial-gradient(rgba(134,111,91,.09) 1px, transparent 1.3px),
    radial-gradient(circle at 12% 10%, rgba(255, 224, 174, .34), transparent 36%),
    radial-gradient(circle at 88% 18%, rgba(190, 232, 255, .32), transparent 38%),
    linear-gradient(155deg, #FFF5E2 0%, #FFFBF2 50%, #EFF8FF 100%);
  background-size: 18px 18px, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
  min-height: 100dvh;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-h); line-height: 1.15; margin: 0 0 .4em; }
p { margin: 0 0 .8em; }
a { color: var(--biru-d); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ungu); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 120;
  background: var(--tinta); color: #fff; font-family: var(--font-h); font-weight: 800;
  padding: .5rem 1rem; border-radius: 12px; text-decoration: none;
  transform: translateY(-140%); transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Tombol ---------- */
.btn {
  --c: var(--oranye); --cd: var(--oranye-d);
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--font-h); font-weight: 800; font-size: 1.04rem;
  color: #fff; background: var(--c);
  padding: .62em 1.28em; border-radius: 17px;
  box-shadow: 0 5px 0 var(--cd), 0 10px 20px -14px rgba(74, 51, 35, .35);
  transition: transform .14s ease, box-shadow .14s ease, filter .15s ease;
  position: relative;
  user-select: none;
  touch-action: manipulation;
}
.btn::after {
  content: ""; position: absolute; inset: 4px; border-radius: 13px;
  border: 1.5px dashed rgba(255,255,255,.58); pointer-events: none;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-2px); box-shadow: 0 7px 0 var(--cd), 0 14px 22px -14px rgba(74, 51, 35, .35); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--cd); }
.btn:disabled { filter: grayscale(.7) opacity(.55); cursor: not-allowed; transform: none; }
.btn-big { font-size: 1.18rem; padding: .7em 1.5em; border-radius: 19px; }
.btn-big::after { border-radius: 15px; }
.btn-sm { font-size: .92rem; padding: .42em .95em; border-radius: 13px; }
.btn-sm::after { border-radius: 9px; }
.btn-oranye { --c: linear-gradient(145deg, #FFA23B, var(--oranye)); --cd: var(--oranye-d); }
.btn-biru { --c: linear-gradient(145deg, #4EB1FF, var(--biru)); --cd: var(--biru-d); }
.btn-hijau { --c: linear-gradient(145deg, #6BD46D, var(--hijau)); --cd: var(--hijau-d); }
.btn-merah { --c: linear-gradient(145deg, #F56495, var(--merah)); --cd: var(--merah-d); }
.btn-ungu { --c: linear-gradient(145deg, #A46FE8, var(--ungu)); --cd: var(--ungu-d); }
.btn-kuning { --c: linear-gradient(145deg, #FFD859, var(--kuning)); --cd: var(--kuning-d); color: var(--tinta); }
.btn-teal { --c: linear-gradient(145deg, #35C9BD, var(--teal)); --cd: var(--teal-d); }
.btn-putih { --c: var(--putih); --cd: #DDD0BC; color: var(--tinta); border: 1px solid #EAE0D0; }
.btn-putih::after { border-color: rgba(74,51,35,.18); }

.ibtn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--putih); border: 1px solid #EDE1D0; cursor: pointer; text-decoration: none;
  font-size: 1.18rem; box-shadow: 0 4px 0 #E5D7C2;
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease;
  position: relative;
}
.ibtn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #E5D7C2; }
.ibtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #E5D7C2; }
.ibtn[aria-pressed="false"] { opacity: .58; background: var(--krem2); }
.ibtn-help { background: linear-gradient(145deg, #FFD95E, var(--kuning)); border-color: #E8B123; box-shadow: 0 4px 0 var(--kuning-d); }
.ibtn-help:hover { box-shadow: 0 6px 0 var(--kuning-d); }
.ibtn-bgm.is-on {
  background: #EAF8F5; border-color: #9EDFD7; box-shadow: 0 4px 0 #82CFC6;
}
.ibtn-bgm.is-on::after {
  content: ""; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--hijau); border: 1.5px solid #fff;
}

/* ---------- Kartu jahit ---------- */
.card {
  background: var(--putih);
  border: 1px solid #EDE0CC;
  border-radius: var(--r-lg);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow);
  position: relative;
}
.card::before {
  content: ""; position: absolute; inset: 7px; border-radius: calc(var(--r-lg) - 6px);
  border: 1.5px dashed rgba(112, 74, 42, .16); pointer-events: none;
}
.card.c-oranye { background: #FFF0DF; border-color: #F4CEAA; }
.card.c-biru { background: #E7F3FE; border-color: #BBD9F8; }
.card.c-hijau { background: #E9F8E6; border-color: #BFE6B8; }
.card.c-ungu { background: #F2EAFC; border-color: #D7C2F4; }
.card.c-kuning { background: #FFF6D6; border-color: #F3DC96; }
.card.c-teal { background: #E4F7F5; border-color: #B2E4DF; }
.card.c-merah { background: #FEEAF0; border-color: #F6C2D2; }

.pill {
  display: inline-flex; align-items: center; gap: .38em;
  font-family: var(--font-h); font-weight: 700; font-size: .86rem;
  padding: .18em .82em; border-radius: 999px; background: var(--krem2); color: var(--tinta);
}
.pill-live { background: #FFFDF9; border: 1px solid #E9DAC4; box-shadow: 0 3px 0 #EAE0CF; }
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--hijau);
  box-shadow: 0 0 0 3px rgba(82, 189, 84, .22); display: inline-block; flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: livePulse 2s ease-in-out infinite; }
}
@keyframes livePulse { 50% { box-shadow: 0 0 0 6px rgba(82, 189, 84, .1); transform: scale(1.1); } }

.muted { color: var(--tinta2); }
.center { text-align: center; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 1.1rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); }

/* ---------- KARTU SELAMAT DATANG & SAMPUL ---------- */
.cover {
  position: fixed; inset: 0; z-index: 50;
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(.75rem, 2.5vw, 1.8rem);
  background: linear-gradient(145deg, #FFF1D2 0%, #FFFBF2 48%, #E7F6FF 100%);
  transition: opacity .45s ease, transform .45s ease;
}
.cover.out { opacity: 0; transform: scale(1.04); pointer-events: none; }

/* Hiasan langit kertas cerita khas NAKAYA */
.cover-sky { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.sky-glow { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .65; }
.sky-glow.g1 { width: 340px; height: 340px; top: -80px; left: -60px; background: #FFDFA8; }
.sky-glow.g2 { width: 320px; height: 320px; bottom: -90px; right: -50px; background: #BFEAFF; }
.sky-glow.g3 { width: 240px; height: 240px; top: 38%; right: 12%; background: #E9D4FF; opacity: .45; }
.sky-prop { position: absolute; opacity: .88; }
.prop-plane { top: 9%; left: 6%; transform: rotate(-10deg); }
.prop-plane-2 { bottom: 11%; right: 7%; transform: rotate(12deg); opacity: .72; }
.prop-cloud {
  background: rgba(255, 253, 249, .86); border: 2px dashed rgba(134, 111, 91, .22);
  border-radius: 999px; box-shadow: 0 8px 18px -14px rgba(74, 51, 35, .2);
}
.prop-cloud.c1 { width: 130px; height: 46px; top: 13%; right: 14%; }
.prop-cloud.c2 { width: 104px; height: 38px; bottom: 16%; left: 9%; }
.prop-bubble {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.9), rgba(186,232,255,.35));
  border: 1.5px solid rgba(255,255,255,.78);
}
.prop-bubble.b1 { width: 42px; height: 42px; top: 26%; left: 4%; }
.prop-bubble.b2 { width: 28px; height: 28px; bottom: 26%; right: 4%; }
.prop-note {
  width: 44px; height: 52px; bottom: 28%; left: 5%;
  background: #FFFDF8; border: 2px solid rgba(74, 51, 35, .18); border-radius: 10px;
  transform: rotate(-12deg);
  background-image: repeating-linear-gradient(transparent 0 9px, rgba(46, 150, 232, .22) 9px 11px);
}
.cover-sky .c-star { position: absolute; color: var(--kuning); font-size: 1.6rem; }
.c-star.s1 { top: 16%; left: 16%; }
.c-star.s2 { top: 22%; right: 10%; color: var(--oranye); }
.c-star.s3 { bottom: 19%; left: 15%; color: var(--biru); }
.c-star.s4 { bottom: 14%; right: 16%; color: var(--ungu); }
.c-star.s5 { top: 52%; left: 3%; color: var(--hijau); }

@media (prefers-reduced-motion: no-preference) {
  .prop-plane { animation: floatDrift 7s ease-in-out infinite alternate; }
  .prop-plane-2 { animation: floatDrift 8.5s 1s ease-in-out infinite alternate-reverse; }
  .prop-cloud.c1 { animation: floatSoft 9s ease-in-out infinite alternate; }
  .prop-cloud.c2 { animation: floatSoft 11s 1.2s ease-in-out infinite alternate-reverse; }
  .prop-bubble { animation: floatSoft 6s ease-in-out infinite alternate; }
  .cover-sky .c-star { animation: twinkle 2.8s ease-in-out infinite; }
  .c-star.s2 { animation-delay: .6s; }
  .c-star.s3 { animation-delay: 1.1s; }
  .c-star.s4 { animation-delay: 1.6s; }
}
@keyframes floatDrift { to { transform: translate(14px, -12px) rotate(-4deg); } }
@keyframes floatSoft { to { transform: translateY(-10px); } }
@keyframes twinkle { 50% { transform: scale(.65) rotate(18deg); opacity: .48; } }

.cover-tools {
  position: fixed; top: 14px; right: 16px; z-index: 6;
  display: flex; gap: .5rem;
}

.welcome-wrap {
  position: relative; z-index: 2; width: 100%; max-width: 930px; margin: auto;
}
.welcome-card {
  position: relative;
  background: rgba(255, 253, 249, .96);
  border: 2px solid #EBD9BC;
  border-radius: 30px;
  padding: clamp(1.1rem, 2.6vw, 2rem) clamp(1.1rem, 3vw, 2.2rem);
  box-shadow: 0 9px 0 #E4D0B1, 0 28px 56px -24px rgba(74, 51, 35, .32);
  overflow: hidden;
}
.welcome-card::before {
  content: ""; position: absolute; inset: 9px; border-radius: 22px;
  border: 2px dashed rgba(134, 111, 91, .22); pointer-events: none;
}
.welcome-ribbon {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px; padding: 6px 16px 8px;
  background: var(--krem2); border: 1.5px solid #EBD9BC; border-top: 0;
  border-radius: 0 0 16px 16px;
}
.wr-dot { width: 10px; height: 10px; border-radius: 50%; display: block; }
.wr-dot.d1 { background: var(--P); }
.wr-dot.d2 { background: var(--E); }
.wr-dot.d3 { background: var(--N); }
.wr-dot.d4 { background: var(--A); }

.welcome-grid {
  display: grid; grid-template-columns: minmax(250px, .92fr) 1.15fr;
  gap: clamp(1rem, 2.8vw, 2rem); align-items: center; padding-top: .55rem;
}

.welcome-brand {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: linear-gradient(160deg, #FFF6E0 0%, #FFFBF2 60%, #ECF7FF 100%);
  border: 1.5px dashed #E4CEAA; border-radius: 22px;
  padding: clamp(.9rem, 2vw, 1.35rem) 1rem;
  position: relative;
}
.cover-kicker {
  display: inline-block; font-family: var(--font-h); font-weight: 800; letter-spacing: .09em;
  font-size: .72rem; background: var(--tinta); color: var(--krem);
  padding: .28em .95em; border-radius: 999px; margin: 0 0 .55rem;
}
.logo-stage {
  position: relative; background: none; border: 0; padding: .35rem; cursor: pointer;
  display: grid; place-items: center; border-radius: 24px;
  transition: transform .18s ease;
}
.logo-stage:hover { transform: scale(1.03); }
.logo-stage.wiggle { animation: mascotHop .55s cubic-bezier(.3,1.6,.5,1); }
.welcome-logo {
  width: clamp(165px, 24vw, 236px); height: auto; position: relative; z-index: 2;
  filter: drop-shadow(0 8px 14px rgba(74, 51, 35, .14));
}
@media (prefers-reduced-motion: no-preference) {
  .welcome-logo { animation: gentleFloat 4.6s ease-in-out infinite; }
}
@keyframes gentleFloat { 50% { transform: translateY(-6px); } }
.logo-orbit {
  position: absolute; border-radius: 50%; pointer-events: none;
  border: 2px dashed rgba(255, 132, 43, .28);
}
.logo-orbit.o1 { inset: 8px; transform: rotate(-10deg); }
.logo-orbit.o2 { inset: 18px; border-color: rgba(46, 150, 232, .25); transform: rotate(14deg); }
.logo-tap-hint {
  margin-top: .25rem; font-family: var(--font-h); font-size: .78rem; font-weight: 700;
  color: var(--tinta2); background: rgba(255,253,249,.9); border: 1px solid #EAE0D0;
  padding: .12em .7em; border-radius: 999px;
}

.slogan-chip {
  margin-top: .65rem; display: inline-flex; align-items: center; gap: .42rem;
  background: linear-gradient(145deg, #FFF7DC, #FFEAB0);
  border: 2px dashed #E0AA2A; color: var(--tinta);
  font-family: var(--font-h); font-weight: 800; font-size: 1rem;
  padding: .34em .95em; border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 0 #E5BE56;
  transition: transform .14s ease, box-shadow .14s ease;
}
.slogan-chip:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #E5BE56; }
.slogan-chip:active { transform: translateY(2px); box-shadow: 0 2px 0 #E5BE56; }
.slogan-chip .sc-audio {
  width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center;
  background: #FFFDF9; font-size: .78rem; box-shadow: 0 2px 0 rgba(74,51,35,.12);
}
.slogan-chip.singing { animation: sloganPulse .55s ease-in-out infinite alternate; background: linear-gradient(145deg, #FFE8A3, #FFD15C); }
@keyframes sloganPulse { to { transform: scale(1.05); } }
.slogan-chip-sm { margin-top: 0; font-size: .92rem; padding: .28em .82em; }
.welcome-full-name { margin: .5rem 0 0; font-size: .82rem; font-weight: 800; color: var(--tinta2); }

.welcome-content { display: flex; flex-direction: column; gap: .72rem; text-align: left; }
.welcome-hello {
  display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start;
  background: #EAF8E8; border: 1.5px solid #BFE7BA; color: #2D6E2E;
  font-weight: 800; font-size: .9rem; padding: .26em .85em; border-radius: 999px;
}
.welcome-title {
  font-size: clamp(1.55rem, 3.2vw, 2.25rem); font-weight: 800; margin: 0; color: var(--tinta);
  letter-spacing: -.01em;
}
.welcome-note {
  background: #FFF8EA; border: 1.5px dashed #E6CDA6; border-radius: 18px;
  padding: .8rem 1rem;
}
.welcome-note p { margin: 0 0 .65rem; font-size: .97rem; line-height: 1.52; color: var(--tinta); font-weight: 600; }
.pena-mini-strip { display: flex; flex-wrap: wrap; gap: .4rem; }
.pms {
  display: inline-flex; align-items: center; gap: .3rem; color: #fff;
  font-family: var(--font-h); font-weight: 700; font-size: .8rem;
  padding: .16em .65em; border-radius: 999px;
  box-shadow: 0 2px 0 rgba(74, 51, 35, .18);
}
.pms b { font-weight: 800; }

.welcome-name-box { display: flex; flex-direction: column; gap: .3rem; }
.welcome-name-box label { font-weight: 800; font-size: .88rem; color: var(--tinta2); }
.welcome-name-box input {
  width: 100%; border: 2px dashed #D8C19F; background: #FFFDF9;
  border-radius: 14px; padding: .56rem .9rem; font-weight: 700; font-size: .98rem;
  transition: border-color .15s ease, background-color .15s ease;
}
.welcome-name-box input:focus { outline: none; border-style: solid; border-color: var(--biru); background: #fff; }

.welcome-actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; margin-top: .15rem; }
.welcome-greet-btn { font-size: .98rem; padding: .7em 1.18em; }
.welcome-meta { margin: .1rem 0 0; font-size: .8rem; font-weight: 700; color: var(--tinta2); }

/* Percikan bintang P-E-N-A saat menyentuh logo / maskot */
.spark-pop {
  position: fixed; z-index: 120; pointer-events: none;
  font-family: var(--font-h); font-weight: 900; font-size: 1.15rem;
  text-shadow: 0 2px 0 #fff;
  animation: sparkFly .78s cubic-bezier(.2,.85,.35,1) forwards;
}
@keyframes sparkFly {
  from { transform: translate(-50%, -50%) scale(.4); opacity: 1; }
  to { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.25) rotate(18deg); opacity: 0; }
}
@keyframes mascotHop {
  0% { transform: scale(1) rotate(0); }
  30% { transform: translateY(-12px) scale(1.08) rotate(-5deg); }
  65% { transform: translateY(-4px) scale(.97) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes fadeUp { from { transform: translateY(14px); opacity: 0; } }

/* Ikon PENA (cadangan) */
.pena-icon { display: inline-flex; align-items: center; filter: drop-shadow(0 4px 0 rgba(74,51,35,.18)); }
.pena-icon .seg {
  font-family: var(--font-h); font-weight: 800; color: #fff;
  width: 2.1em; height: 2.1em; display: grid; place-items: center; font-size: 1.05rem;
  border-top: 3px solid var(--tinta); border-bottom: 3px solid var(--tinta);
}
.pena-icon .seg:nth-child(1) { background: var(--P); border-left: 3px solid var(--tinta); border-radius: 12px 0 0 12px; }
.pena-icon .seg:nth-child(2) { background: var(--E); }
.pena-icon .seg:nth-child(3) { background: var(--N); }
.pena-icon .seg:nth-child(4) { background: var(--A); }
.pena-icon .nib { width: 0; height: 0; border-top: 1.05em solid transparent; border-bottom: 1.05em solid transparent; border-left: 1.6em solid var(--tinta); margin-left: -1px; position: relative; font-size: 1.05rem; }
.pena-icon .nib::after { content: ""; position: absolute; left: -1.45em; top: -.75em; border-top: .75em solid transparent; border-bottom: .75em solid transparent; border-left: 1.1em solid #F6E3BF; }

/* ---------- Kerangka aplikasi ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .52rem clamp(.8rem, 3vw, 1.6rem);
  background: rgba(255, 253, 249, .92);
  backdrop-filter: blur(14px);
  border-bottom: 2px dashed rgba(134, 111, 91, .2);
  box-shadow: 0 6px 20px -16px rgba(74, 51, 35, .22);
}
.brand {
  display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--tinta);
  transition: transform .15s ease;
}
.brand:hover { transform: translateY(-1px); }
.brand-icon { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(74,51,35,.14)); flex: none; }
.brand-lockup { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1; }
.brand-wordmark { height: 28px; width: auto; object-fit: contain; }
.brand-lockup small { font-size: .74rem; font-weight: 800; color: var(--tinta2); letter-spacing: .01em; padding-left: 2px; }
.top-actions { display: flex; gap: .45rem; align-items: center; }

.view { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 1.2rem clamp(.8rem, 3vw, 1.6rem) 3rem; outline: none; }
.view > * { animation: fadeUp .32s both; }

.foot {
  background: #F7EFE0; border-top: 2px dashed rgba(134, 111, 91, .24);
  padding: 1.15rem clamp(.8rem, 3vw, 1.6rem); font-size: .86rem; color: var(--tinta2);
}
.foot-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.foot-brand { display: flex; align-items: center; gap: .65rem; }
.foot-brand strong { display: block; font-family: var(--font-h); font-size: 1rem; color: var(--tinta); line-height: 1.2; }
.foot-brand small { display: block; font-size: .8rem; font-weight: 700; color: var(--tinta2); }
.foot-links { display: flex; gap: .45rem; flex-wrap: wrap; }
.foot-pill {
  display: inline-flex; align-items: center; gap: .32rem; text-decoration: none;
  background: var(--putih); color: var(--tinta); border: 1.5px dashed #DEC9AA;
  border-radius: 999px; padding: .3em .82em; font-weight: 800; font-size: .8rem;
  cursor: pointer; transition: transform .12s ease, border-color .15s ease;
}
.foot-pill:hover { transform: translateY(-2px); border-color: var(--oranye); color: var(--oranye-d); }

/* ---------- Beranda & Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.12fr 1fr; gap: 1.4rem; align-items: center;
  background:
    radial-gradient(circle at 92% 15%, rgba(255, 224, 150, .55), transparent 45%),
    linear-gradient(135deg, #FFE4BD 0%, #FFF3DA 55%, #EAF6FF 100%);
  border: 1.5px solid #EDD5B2;
  border-radius: 30px; padding: clamp(1.2rem, 3vw, 2.1rem); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.hero::before { content: ""; position: absolute; inset: 9px; border-radius: 22px; border: 1.5px dashed rgba(112, 74, 42, .18); pointer-events: none; }
.hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.95rem); margin-bottom: .28em; }
.hero h1 em { font-style: normal; color: var(--oranye-d); }
.hero-slogan-row { margin-bottom: .65rem; }
.hero .stage { box-shadow: 0 6px 0 rgba(74, 51, 35, .18); }
.hero-visual { display: flex; flex-direction: column; gap: .75rem; }

/* Maskot Interaktif Si PENA di Hero */
.mascot-dock {
  display: flex; align-items: center; gap: .75rem;
  background: rgba(255, 253, 249, .92); border: 1.5px dashed #E2CCA9;
  border-radius: 20px; padding: .5rem .85rem .5rem .6rem;
  box-shadow: 0 4px 0 #E7D7BE;
}
.mascot-btn {
  flex: none; width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(145deg, #FFF5D6, #FFE6A8);
  border: 2px dashed #E3B552; cursor: pointer; padding: 6px;
  display: grid; place-items: center;
  box-shadow: 0 4px 0 #DFB759;
  transition: transform .15s ease;
}
.mascot-btn img { width: 100%; height: 100%; object-fit: contain; }
.mascot-btn:hover { transform: scale(1.06) rotate(-4deg); }
.mascot-btn.hop { animation: mascotHop .55s cubic-bezier(.3,1.6,.5,1); }
@media (prefers-reduced-motion: no-preference) {
  .mascot-btn img { animation: gentleFloat 4.2s ease-in-out infinite; }
}
.mascot-speech { flex: 1; min-width: 0; }
.mascot-speech p { margin: 0; font-weight: 800; font-size: .92rem; line-height: 1.38; color: var(--tinta); }
.mascot-speech small { display: inline-block; margin-top: .18rem; font-size: .75rem; font-weight: 800; color: var(--oranye-d); }

.menu-card .mi-logo { padding: 5px; }
.menu-card .mi-logo img { width: 100%; height: 100%; object-fit: contain; }

/* Halaman Identitas Modul */
.id-showcase {
  display: grid; grid-template-columns: minmax(190px, 260px) 1fr; gap: 1.5rem; align-items: center;
  background: linear-gradient(140deg, #FFF7E2 0%, #FFFDF9 55%, #ECF7FF 100%);
}
.id-logo-col { display: grid; place-items: center; padding: .5rem; }
.id-logo-img { width: min(230px, 100%); height: auto; filter: drop-shadow(0 8px 14px rgba(74,51,35,.15)); }
.id-info-col h2 { font-size: clamp(1.45rem, 3.2vw, 2rem); margin: .45rem 0 .25rem; }
.id-slogan {
  font-family: var(--font-h); font-size: 1.32rem; font-weight: 800;
  color: var(--oranye-d); margin: 0 0 .5rem;
}
.id-meaning h3 { margin: .45rem 0 .25rem; font-size: 1.15rem; }
.hello { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.hello input { border: 2px dashed var(--tinta2); background: var(--putih); border-radius: 999px; padding: .35em .9em; width: 210px; font-weight: 700; }

.sec-title { display: flex; align-items: center; gap: .6rem; margin: 2.2rem 0 1rem; }
.sec-title h2 { font-size: 1.7rem; margin: 0; }
.sec-title .tag { font-family: var(--font-h); font-weight: 800; font-size: .8rem; letter-spacing: .1em; color: #fff; background: var(--tinta); padding: .2em .8em; border-radius: 999px; }

.menu-card {
  display: flex; gap: .85rem; align-items: flex-start; text-decoration: none; color: var(--tinta);
  transition: transform .18s; cursor: pointer;
}
.menu-card > div { min-width: 0; flex: 1; }
.menu-card:hover { transform: translateY(-4px) rotate(-.4deg); }
.menu-card .mi { font-size: 2rem; line-height: 1; width: 3rem; height: 3rem; display: grid; place-items: center; background: var(--putih); border-radius: 16px; flex: none; box-shadow: 0 3px 0 rgba(74,55,40,.12); }
.menu-card h3 { font-size: 1.12rem; margin-bottom: .18em; overflow-wrap: break-word; }
.menu-card p { margin: 0; font-size: .9rem; color: var(--tinta2); }

.unit-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--tinta); transition: transform .18s; }
.unit-card:hover { transform: translateY(-5px); }
.unit-card::before { z-index: 2; }
.unit-card .thumb { aspect-ratio: 16/9; background: var(--krem2); position: relative; }
.unit-card .thumb .stage { border-radius: 0; box-shadow: none; }
.unit-card .num {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  font-family: var(--font-h); font-weight: 800; background: var(--tinta); color: #fff; border-radius: 999px; padding: .1em .75em; font-size: .9rem;
}
.unit-card .done-badge { position: absolute; top: 12px; right: 12px; z-index: 3; background: var(--hijau); color: #fff; border-radius: 999px; padding: .1em .7em; font-weight: 800; font-size: .85rem; }
.unit-card .body { padding: .9rem 1.2rem 1.2rem; flex: 1; display: flex; flex-direction: column; gap: .35rem; }
.unit-card h3 { font-size: 1.3rem; margin: 0; }
.unit-card .meta { font-size: .85rem; color: var(--tinta2); font-weight: 700; }
.progress { height: 12px; background: var(--krem2); border-radius: 999px; overflow: hidden; margin-top: auto; }
.progress > i { display: block; height: 100%; background: repeating-linear-gradient(45deg, var(--hijau) 0 10px, #79CB6C 10px 20px); border-radius: inherit; transition: width .6s; }
.unit-card.soon { cursor: default; filter: saturate(.55); }
.unit-card.soon:hover { transform: none; }
.soon-thumb { display: grid; place-items: center; height: 100%; font-size: 3rem; background: repeating-linear-gradient(45deg, #FFE8C4 0 16px, #FFF0D6 16px 32px); }

/* ---------- Halaman umum ---------- */
.page-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0; }
.page-head .ph-icon { font-size: 2.4rem; }
.back { text-decoration: none; }
.lead { font-size: 1.08rem; max-width: 70ch; }

.howto { display: flex; gap: 1rem; align-items: flex-start; }
.howto .hi { font-size: 1.8rem; width: 3.2rem; height: 3.2rem; flex: none; display: grid; place-items: center; background: var(--krem2); border-radius: 14px; }
.howto h3 { font-size: 1.15rem; margin-bottom: .2em; }
.howto p { margin: 0; font-size: .96rem; }

.tp-list { list-style: none; padding: 0; margin: 0; counter-reset: tp; display: grid; gap: .8rem; }
.tp-list li { counter-increment: tp; display: flex; gap: .9rem; align-items: center; background: var(--putih); border-radius: var(--r-md); padding: .8rem 1rem; box-shadow: 0 4px 0 rgba(74,55,40,.1); }
.tp-list li::before { content: counter(tp); flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--oranye); color: #fff; font-family: var(--font-h); font-weight: 800; }
.tp-list li .pena-tag { margin-left: auto; flex: none; white-space: nowrap; }

/* Kartu PENA (bisa dibalik) */
.flip { perspective: 1000px; min-height: 300px; cursor: pointer; border: 0; padding: 0; background: none; text-align: left; width: 100%; }
.flip-in { position: relative; width: 100%; height: 100%; min-height: inherit; transition: transform .6s cubic-bezier(.4,1.4,.5,1); transform-style: preserve-3d; }
.flip.on .flip-in { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--r-lg); padding: 1.3rem; display: flex; flex-direction: column; box-shadow: var(--shadow); overflow: auto; }
.flip-face::before { content: ""; position: absolute; inset: 7px; border-radius: 20px; border: 2px dashed rgba(255,255,255,.6); pointer-events: none; }
.flip-front { color: #fff; align-items: center; justify-content: center; text-align: center; }
.flip-front .big { font-family: var(--font-h); font-size: 4.2rem; font-weight: 800; line-height: 1; text-shadow: 0 5px 0 rgba(0,0,0,.15); }
.flip-front h3 { font-size: 1.6rem; margin: .2em 0; }
.flip-front .hint { font-size: .85rem; opacity: .9; margin-top: .6rem; }
.flip-back { transform: rotateY(180deg); background: var(--putih); }
.flip-back h4 { font-size: 1.15rem; }
.flip-back ul { padding-left: 1.2rem; margin: .3rem 0 0; font-size: .95rem; }
.flip-back li { margin-bottom: .35rem; }

.pena-tag { font-family: var(--font-h); font-weight: 800; color: #fff; border-radius: 8px; padding: 0 .5em; font-size: .85rem; }
.bg-P { background: var(--P); } .bg-E { background: var(--E); } .bg-N { background: var(--N); } .bg-A { background: var(--A); }

/* ---------- UNIT ---------- */
.unit-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.unit-head h1 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); margin: 0; }
.unit-head .sub { font-weight: 700; color: var(--tinta2); font-size: .95rem; }
.stepper { display: flex; gap: .45rem; overflow-x: auto; padding: .3rem .2rem .8rem; scrollbar-width: thin; margin-bottom: .6rem; }
.step {
  flex: none; display: flex; align-items: center; gap: .4rem; text-decoration: none; color: var(--tinta);
  background: var(--putih); border-radius: 999px; padding: .4rem .9rem .4rem .45rem; font-weight: 800; font-size: .9rem;
  box-shadow: 0 3px 0 rgba(74,55,40,.13); border: 2px solid transparent; white-space: nowrap;
}
.step .si { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--krem2); font-size: 1rem; }
.step.cur { border-color: var(--tinta); background: #FFF8E6; }
.step.done .si { background: var(--hijau); color: #fff; }
.step .sk { font-family: var(--font-h); color: #fff; border-radius: 6px; padding: 0 .35em; font-size: .78rem; }
.step-panel { animation: fadeUp .35s both; }
.step-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; flex-wrap: wrap; }
.step-intro { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.step-intro .badge { flex: none; width: 3.4rem; height: 3.4rem; border-radius: 16px; display: grid; place-items: center; color: #fff; font-family: var(--font-h); font-weight: 800; font-size: 1.7rem; box-shadow: 0 4px 0 rgba(0,0,0,.15); }
.step-intro h2 { margin: 0; font-size: 1.6rem; }
.step-intro p { margin: 0; color: var(--tinta2); font-weight: 600; }

/* Panggung adegan 2.5D Hidup */
.stage {
  --px: 0px; --py: 0px;
  position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--r-lg);
  overflow: hidden; contain: layout paint; background: #BFE6FF; box-shadow: var(--shadow); isolation: isolate;
  content-visibility: auto; contain-intrinsic-size: auto none auto 340px;
}
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 38px rgba(74, 51, 35, .17), inset 0 1px 0 rgba(255,255,255,.45);
}
.stage > svg, .stage > img.sc-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; object-fit: cover; }
.stage > canvas.sc-fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.stage .sc-plx-sky { transform: translate3d(calc(var(--px) * -0.25), calc(var(--py) * -0.2), 0); transition: transform .35s ease-out; }
.stage .sc-plx-mid { transform: translate3d(calc(var(--px) * -0.55), calc(var(--py) * -0.4), 0); transition: transform .35s ease-out; }
.stage .sc-plx-front { transform: translate3d(calc(var(--px) * -0.95), calc(var(--py) * -0.65), 0); transition: transform .35s ease-out; }
.stage .sc-blink { transform-box: fill-box; transform-origin: center; animation: scBlink 4.6s ease-in-out infinite; }
@keyframes scBlink { 0%, 92%, 100% { transform: scaleY(1); } 95%, 97% { transform: scaleY(.1); } }
.stage .sc-beams { transform-origin: top left; animation: beamSway 9s ease-in-out infinite alternate; }
@keyframes beamSway { from { opacity: .52; transform: skewX(-2deg); } to { opacity: .82; transform: skewX(3deg); } }
.stage > img.sc-art.art-zoom { animation: artZoom 18s ease-in-out infinite alternate; }
.stage > img.sc-art.art-geser { animation: artPan 16s ease-in-out infinite alternate; }
.stage > img.sc-art.art-goyang { animation: camshake 5s linear infinite; }
@keyframes artZoom { from { transform: scale(1.02); } to { transform: scale(1.1); } }
@keyframes artPan { from { transform: scale(1.08) translateX(-2%); } to { transform: scale(1.08) translateX(2%); } }
.stage .sc-layer { transition: opacity .7s; }
.stage .sc-layer.leaving { opacity: 0; }
.stage-caption {
  position: absolute; left: 10px; top: 10px; z-index: 4; max-width: calc(100% - 140px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(74,55,40,.82); color: #fff; font-weight: 800; font-size: .8rem; border-radius: 999px; padding: .24em .82em;
  backdrop-filter: blur(4px);
}
.stage-hs-pill {
  position: absolute; right: 10px; top: 10px; z-index: 4;
  background: rgba(255, 248, 224, .94); color: var(--tinta); border: 1.5px solid #F3CD68;
  font-family: var(--font-h); font-weight: 800; font-size: .78rem;
  border-radius: 999px; padding: .2em .72em; box-shadow: 0 3px 8px rgba(74,51,35,.18);
}
.stage-hs {
  position: absolute; z-index: 5; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0;
  background: transparent; cursor: pointer; display: grid; place-items: center;
  touch-action: manipulation;
}
.stage-hs .hs-ring {
  position: absolute; inset: 3px; border-radius: 50%;
  border: 2.5px solid #FFD84D; background: rgba(255, 224, 102, .25);
  animation: hsPulse 2.1s ease-out infinite;
}
.stage-hs .hs-core {
  position: relative; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1rem;
  background: radial-gradient(circle at 35% 30%, #FFFDF4, #FFE37D);
  border: 2px solid #FFFDF9; box-shadow: 0 3px 10px rgba(74,51,35,.32);
  transition: transform .16s ease, background .2s ease;
}
.stage-hs:hover .hs-core { transform: scale(1.16); }
.stage-hs.found .hs-ring { animation: none; border-color: rgba(82,189,84,.65); background: rgba(82,189,84,.16); }
.stage-hs.found .hs-core { background: radial-gradient(circle at 35% 30%, #F2FFF0, #B7EBB4); }
@keyframes hsPulse { 0% { transform: scale(.86); opacity: .95; } 100% { transform: scale(1.52); opacity: 0; } }
.stage-pop {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 6;
  display: flex; align-items: flex-start; gap: .65rem;
  background: rgba(255, 253, 249, .96); color: var(--tinta);
  border: 2px solid #F3CC69; border-radius: 16px; padding: .62rem .8rem;
  box-shadow: 0 6px 20px rgba(74,51,35,.28);
  animation: popIn .28s both cubic-bezier(.3,1.5,.5,1);
}
.stage-pop.is-top { top: 44px; bottom: auto; }
.stage-pop .sp-ic { font-size: 1.5rem; flex: none; line-height: 1.1; }
.stage-pop .sp-txt { flex: 1; min-width: 0; }
.stage-pop .sp-txt strong { display: block; font-family: var(--font-h); font-size: 1rem; color: var(--oranye-d); }
.stage-pop .sp-txt p { margin: .1rem 0 0; font-size: .88rem; line-height: 1.4; }
.stage-pop .sp-x {
  flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: var(--krem2); cursor: pointer; font-weight: 800; font-size: .82rem;
}

.cover-unit { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.4rem; align-items: center; }
.kk-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.kk {
  font-family: var(--font-h); font-weight: 700; font-size: 1.1rem; padding: .35em 1em; border-radius: 14px;
  background: var(--putih); box-shadow: 0 4px 0 rgba(74,55,40,.13); border: 2px dashed var(--c, var(--oranye));
  animation: popIn .5s both cubic-bezier(.3,1.7,.5,1); cursor: pointer;
}
@keyframes popIn { from { transform: scale(.3); opacity: 0; } }

/* ---------- Pembaca Buku Cerita Terbuka 2 Halaman (Open Storybook Mode) ---------- */
.book-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap;
  margin-bottom: .85rem;
}
.book-mode-group { display: inline-flex; gap: .35rem; align-items: center; flex-wrap: wrap; }

.storybook {
  position: relative;
  margin: .3rem 0 1.25rem;
  transition: max-width .25s ease;
}
.storybook.is-focus {
  position: fixed; inset: 0; z-index: 60; margin: 0; padding: clamp(.75rem, 2.2vw, 1.6rem);
  background: radial-gradient(circle at 50% 35%, #FFF6E4 0%, #EFE2CA 100%);
  overflow-y: auto; display: flex; flex-direction: column; justify-content: center;
}
.storybook.is-focus .book-shell { max-width: 1180px; width: 100%; margin: 0 auto; }

/* Sampul hardcover + tumpukan lembar kertas */
.book-shell {
  position: relative;
  background: linear-gradient(155deg, var(--bk-a, #C96B33), var(--bk-b, #8F431A));
  border-radius: 26px;
  padding: 13px 16px 17px;
  box-shadow:
    0 12px 0 rgba(74, 42, 22, .34),
    0 24px 48px -18px rgba(74, 42, 22, .42),
    inset 0 2px 0 rgba(255, 232, 198, .35);
}
.book-shell.theme-u2 { --bk-a: #2E8F7B; --bk-b: #1D6456; }
.book-shell.theme-u3 { --bk-a: #9850B8; --bk-b: #682D85; }
.book-shell.theme-u4 { --bk-a: #2E78C9; --bk-b: #1B4E8C; }
.book-shell::before {
  content: ""; position: absolute; inset: 6px; border-radius: 21px;
  border: 1.5px dashed rgba(255, 240, 210, .34); pointer-events: none;
}

/* Pita pembatas buku di tengah atas */
.book-ribbon {
  position: absolute; top: -4px; left: 50%; transform: translateX(-50%); z-index: 8;
  background: linear-gradient(180deg, #F05288, #C92F64);
  color: #fff; font-family: var(--font-h); font-weight: 800; font-size: .78rem;
  padding: .28rem .75rem .58rem;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  box-shadow: 0 4px 10px rgba(74, 30, 45, .28);
  letter-spacing: .02em;
  pointer-events: none;
}

/* Bentangan 2 halaman terbuka */
.book-spread {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  background: #FFFDF5;
  border-radius: 16px;
  box-shadow:
    -6px 0 0 -1px #EFE4CE,
    -11px 0 0 -2px #E3D3B6,
    6px 0 0 -1px #EFE4CE,
    11px 0 0 -2px #E3D3B6,
    0 8px 20px -10px rgba(74, 51, 35, .3);
  perspective: 2200px;
  overflow: hidden;
  min-height: 495px;
  touch-action: pan-y;
}

/* Lipatan punggung buku tengah */
.book-spine {
  position: absolute; top: 0; bottom: 0; left: 51.4%; transform: translateX(-50%);
  width: 44px; z-index: 5; pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(74, 51, 35, 0) 0%,
    rgba(74, 51, 35, .07) 32%,
    rgba(74, 51, 35, .2) 49%,
    rgba(255, 253, 245, .55) 51%,
    rgba(74, 51, 35, .13) 64%,
    rgba(74, 51, 35, 0) 100%
  );
}
.book-spine::after {
  content: ""; position: absolute; top: 28px; bottom: 28px; left: 50%;
  border-left: 1.5px dashed rgba(112, 74, 42, .22);
}

.book-page {
  position: relative;
  padding: 1.25rem 1.45rem 1.15rem;
  display: flex; flex-direction: column;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 244, 214, .42), transparent 55%),
    linear-gradient(180deg, #FFFDF7 0%, #FAF3E3 100%);
}
.book-page.page-left {
  padding-right: 1.75rem;
  border-right: 1px solid rgba(134, 111, 91, .16);
}
.book-page.page-right {
  padding-left: 1.85rem;
  padding-bottom: 3.1rem;
  background:
    repeating-linear-gradient(
      transparent 0,
      transparent 2.12em,
      rgba(134, 111, 91, .06) 2.12em,
      rgba(134, 111, 91, .06) calc(2.12em + 1px)
    ),
    linear-gradient(180deg, #FFFDF7 0%, #FBF5E8 100%);
}

.page-running-head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  font-family: var(--font-h); font-size: .78rem; font-weight: 700;
  color: var(--tinta2); letter-spacing: .04em; text-transform: uppercase;
  padding-bottom: .45rem; margin-bottom: .7rem;
  border-bottom: 1.5px solid rgba(134, 111, 91, .18);
}

/* Bingkai ilustrasi di halaman kiri buku */
.book-plate {
  padding: 6px;
  border-radius: 20px;
  background: #FFF9EB;
  border: 2px solid #EBD7B4;
  box-shadow: 0 5px 16px -10px rgba(74, 51, 35, .28);
}
.book-plate .stage { border-radius: 14px; box-shadow: none; }

.book-audio-dock {
  margin-top: .8rem;
  padding-top: .65rem;
  border-top: 1.5px dashed rgba(134, 111, 91, .2);
}

/* Ornamen bab di halaman kanan buku */
.book-chapter-orn {
  display: flex; align-items: center; gap: .55rem;
  color: #C9893B; font-size: .78rem; margin: .15rem 0 .75rem;
}
.book-chapter-orn::before, .book-chapter-orn::after {
  content: ""; flex: 1; height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(201, 137, 59, .42), transparent);
}

.book-page .seg-text { flex: 1; }
.book-page .seg-text p { margin-bottom: 1.05em; }

/* Nomor halaman & kontrol balik halaman di kaki buku */
.book-folio {
  margin-top: auto; padding-top: .75rem;
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  border-top: 1px solid rgba(134, 111, 91, .15);
  font-family: var(--font-h); font-size: .86rem; font-weight: 700; color: var(--tinta2);
}
.book-folio-num {
  display: inline-flex; align-items: center; gap: .3rem;
  background: rgba(235, 221, 198, .5); padding: .12rem .62rem; border-radius: 999px;
}

/* Pojok kertas terlipat interaktif di kanan bawah */
.page-corner-btn {
  position: absolute; right: 0; bottom: 0; z-index: 6;
  border: 0; cursor: pointer; background: none; padding: 0;
  width: 78px; height: 66px; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: flex-end;
}
.page-corner-fold {
  width: 54px; height: 54px;
  background: linear-gradient(135deg, #FFFDF7 0%, #EFE2C6 48%, #DCC7A0 50%, #C99D62 100%);
  border-top-left-radius: 14px;
  box-shadow: -4px -4px 12px rgba(74, 51, 35, .18);
  display: grid; place-items: center;
  font-family: var(--font-h); font-weight: 800; font-size: 1.05rem; color: var(--tinta);
  transform-origin: bottom right;
  transition: transform .2s ease, box-shadow .2s ease;
}
.page-corner-btn:hover .page-corner-fold,
.page-corner-btn:focus-visible .page-corner-fold {
  transform: scale(1.16);
  box-shadow: -6px -6px 16px rgba(74, 51, 35, .26);
}

/* Lembar animasi balik halaman 3D (compositor-only transform & opacity) */
.book-flip-leaf {
  position: absolute; top: 0; bottom: 0; width: 50%; z-index: 7; pointer-events: none;
  opacity: 0;
  backface-visibility: hidden;
  background: linear-gradient(90deg, #F5E9D0 0%, #FFFDF5 16%, #FBF3E2 88%, #E5D4B3 100%);
  box-shadow: 0 0 28px rgba(74, 51, 35, .28);
}
.book-flip-leaf.flip-next {
  right: 0; transform-origin: left center;
}
.book-flip-leaf.flip-prev {
  left: 0; transform-origin: right center;
}
@media (prefers-reduced-motion: no-preference) {
  .book-flip-leaf.flip-next.go { animation: bookFlipNext .52s cubic-bezier(.42, .04, .22, 1) forwards; }
  .book-flip-leaf.flip-prev.go { animation: bookFlipPrev .52s cubic-bezier(.42, .04, .22, 1) forwards; }
  .book-page.page-enter { animation: pageFadeIn .36s ease-out both; }
}
@keyframes bookFlipNext {
  0%   { opacity: .94; transform: rotateY(0deg); }
  55%  { opacity: .96; transform: rotateY(-102deg); }
  100% { opacity: 0;   transform: rotateY(-178deg); }
}
@keyframes bookFlipPrev {
  0%   { opacity: .94; transform: rotateY(0deg); }
  55%  { opacity: .96; transform: rotateY(102deg); }
  100% { opacity: 0;   transform: rotateY(178deg); }
}
@keyframes pageFadeIn {
  from { opacity: .35; transform: translateY(4px); }
  to   { opacity: 1;   transform: none; }
}

/* Mode Kartu (alternatif ringkas) */
.storybook.mode-card .book-shell { background: none; padding: 0; box-shadow: none; }
.storybook.mode-card .book-shell::before,
.storybook.mode-card .book-ribbon,
.storybook.mode-card .book-spine,
.storybook.mode-card .page-corner-btn,
.storybook.mode-card .book-flip-leaf { display: none; }
.storybook.mode-card .book-spread {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.2rem;
  background: transparent; box-shadow: none; min-height: 0; overflow: visible;
}
.storybook.mode-card .book-page {
  background: var(--putih); border: 1px solid #EDE0CC; border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 1.2rem 1.3rem;
}
.storybook.mode-card .book-plate { padding: 0; border: 0; background: none; box-shadow: none; }

@media (max-width: 900px) {
  .book-shell { padding: 9px 10px 12px; border-radius: 20px; }
  .book-spread, .storybook.mode-card .book-spread {
    grid-template-columns: 1fr;
    min-height: 0;
    box-shadow: 0 6px 0 -1px #EFE4CE, 0 11px 0 -2px #E3D3B6;
  }
  .book-spine { display: none; }
  .book-page.page-left { padding: 1rem 1rem .95rem; border-right: 0; border-bottom: 2px dashed rgba(134, 111, 91, .22); }
  .book-page.page-right { padding: 1rem 1rem 3rem; }
  .book-ribbon { top: -2px; font-size: .72rem; padding: .2rem .6rem .45rem; }
}

/* Pembaca narasi */
.reader { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.reader-left { position: sticky; top: 80px; }
.controls { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .8rem; }
.speed { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .9rem; background: var(--putih); border-radius: 999px; padding: .2rem .7rem; box-shadow: 0 3px 0 rgba(74,55,40,.1); }
.speed select { border: 0; background: transparent; font-weight: 800; }
.seg-dots { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.seg-dots button { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; background: var(--krem2); font-weight: 800; font-size: .85rem; }
.seg-dots button.cur { background: var(--biru); color: #fff; transform: scale(1.12); }
.seg-dots button.ok { background: var(--hijau); color: #fff; }
.text-card { font-size: 1.15rem; line-height: 1.9; }
.text-card p { margin-bottom: 1em; }
.text-card .kal { border-radius: 8px; padding: .08em .18em; box-decoration-break: clone; -webkit-box-decoration-break: clone; transition: background .2s ease; }
.text-card .kal.now { background: #FFF4C8; }
.text-card .w {
  border-radius: 5px;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.text-card .w:hover { background: rgba(255, 213, 79, .42); }
.text-card .w.now {
  background: #FFD54F;
  color: #2C1A0B;
  text-decoration: underline;
  text-decoration-color: #D95B00;
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}
.text-card .w.tap-flash {
  background: #FFE082;
  color: #2C1A0B;
}
::highlight(nakaya-word) {
  background-color: #FFD54F;
  color: #2C1A0B;
  text-decoration: underline;
  text-decoration-color: #D95B00;
  text-decoration-thickness: 3px;
}
.narasi-bar {
  display: flex; align-items: center; gap: .6rem; margin-top: .55rem;
  background: var(--putih); border-radius: 999px; padding: .35rem .75rem;
  box-shadow: 0 3px 0 rgba(74,55,40,.1); border: 1.5px solid #EFE0C6;
}
.narasi-badge {
  flex: none; font-size: .76rem; font-weight: 800; color: #2E6B26;
  background: #E6F6E1; border-radius: 999px; padding: .15rem .55rem;
  white-space: nowrap;
}
.narasi-prog {
  flex: 1; height: 10px; border: 0; border-radius: 999px; cursor: pointer;
  appearance: none; -webkit-appearance: none; background: #EFE4CF; overflow: hidden;
  accent-color: var(--oranye);
}
.narasi-prog::-webkit-progress-bar { background: #EFE4CF; border-radius: 999px; }
.narasi-prog::-webkit-progress-value { background: linear-gradient(90deg, var(--oranye), #FFB300); border-radius: 999px; transition: width .08s linear; }
.narasi-prog::-moz-progress-bar { background: linear-gradient(90deg, var(--oranye), #FFB300); border-radius: 999px; }
.narasi-time {
  flex: none; font-size: .78rem; font-weight: 800; color: var(--tinta2);
  font-variant-numeric: tabular-nums; min-width: 72px; text-align: right;
}
.text-card.closed .seg-text { filter: blur(9px); user-select: none; pointer-events: none; }
.closed-msg { display: none; text-align: center; font-weight: 800; color: var(--biru-d); margin: -.2rem 0 .8rem; }
.text-card.closed .closed-msg { display: block; }
.glos {
  font: inherit; color: var(--biru-d); background: none; border: 0; padding: 0; cursor: help;
  border-bottom: 3px dotted var(--biru); font-weight: 800; border-radius: 0;
}
.glos:hover, .glos:focus-visible { background: #DCEBFA; }
.glos.seen { color: var(--teal-d); border-bottom-color: var(--teal); }
.tip { font-size: .9rem; color: var(--tinta2); font-weight: 700; display: block; line-height: 1.5; }

/* Pertanyaan pemantauan & pilihan */
.q-card { border-left: 8px solid var(--E); }
.q-card h3 { font-size: 1.15rem; display: flex; gap: .5rem; align-items: center; }
.opts { display: grid; gap: .55rem; margin: .6rem 0; }
.opt {
  text-align: left; border: 2px solid #EADBC2; background: var(--putih); border-radius: var(--r-sm);
  padding: .65rem .9rem; cursor: pointer; font-weight: 700; display: flex; gap: .7rem; align-items: center;
  transition: transform .12s, border-color .2s, background .2s;
}
.opt:hover:not(:disabled) { border-color: var(--biru); transform: translateX(3px); }
.opt .ol { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--krem2); font-family: var(--font-h); font-weight: 800; }
.opt.right { border-color: var(--hijau); background: #E6F6E1; }
.opt.right .ol { background: var(--hijau); color: #fff; }
.opt.wrong { border-color: var(--merah); background: #FDE6EA; animation: shake .4s; }
.opt.wrong .ol { background: var(--merah); color: #fff; }
.opt:disabled { cursor: default; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.fb { border-radius: var(--r-sm); padding: .6rem .9rem; font-weight: 700; margin-top: .5rem; animation: fadeUp .3s both; }
.fb.ok { background: #E6F6E1; color: #2E6B26; }
.fb.no { background: #FFF0C9; color: #7A5600; }
.fb.info { background: #DCEBFA; color: #1F4F80; }
textarea.ta, input.inp {
  width: 100%; border: 2px dashed #CDB794; background: #FFFCF4; border-radius: var(--r-sm);
  padding: .7rem .9rem; font-size: 1.02rem; resize: vertical; min-height: 3.2em;
}
textarea.ta:focus, input.inp:focus { outline: none; border-style: solid; border-color: var(--biru); background: #fff; }
.charcount { font-size: .8rem; color: var(--tinta2); text-align: right; }

/* Perekam */
.rec { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; background: #FDE0E5; border-radius: var(--r-md); padding: .8rem 1rem; }
.rec .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--merah); }
.rec.on .dot { animation: blink 1s infinite; }
.rec .time { font-family: var(--font-h); font-weight: 800; font-size: 1.15rem; min-width: 3.2em; }
.rec audio { height: 40px; max-width: 100%; }
@keyframes blink { 50% { opacity: .2; } }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.thumbs .stage { border-radius: 12px; box-shadow: 0 3px 0 rgba(74,55,40,.15); }
.thumbs figure { margin: 0; }
.thumbs figcaption { font-size: .78rem; font-weight: 800; text-align: center; color: var(--tinta2); }

/* Seret & lepas */
.dd-bank { display: flex; flex-wrap: wrap; gap: .55rem; min-height: 64px; padding: .8rem; border-radius: var(--r-md); background: var(--krem2); border: 3px dashed #E2C99F; }
.dd-bank:empty::after { content: "Semua kartu sudah ditempatkan 👍"; color: var(--tinta2); font-weight: 700; margin: auto; }
.dd-zones { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); margin-top: 1rem; }
.dd-zone {
  border-radius: var(--r-md); background: var(--putih); padding: .6rem; min-height: 130px;
  border: 3px dashed var(--zc, #D9C3A2); transition: background .15s, transform .15s; display: flex; flex-direction: column; gap: .45rem;
}
.dd-zone > h4 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: .4rem; color: var(--zc, var(--tinta)); }
.dd-zone > small { color: var(--tinta2); font-size: .8rem; margin-top: -.4rem; }
.dd-zone .dd-slot { display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.dd-zone.hover { background: #FFF7D6; transform: scale(1.02); }
.dd-zone.can-drop { box-shadow: 0 0 0 3px rgba(61,143,219,.35); }
.dd-seq { grid-template-columns: 1fr; }
.dd-seq .dd-zone { flex-direction: row; align-items: center; min-height: 64px; }
.dd-seq .dd-zone > h4 { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--tinta); color: #fff; justify-content: center; }
.dd-card {
  background: #fff; border: 2px solid #E2CFAF; border-radius: 12px; padding: .5rem .8rem; font-weight: 700; font-size: .95rem;
  cursor: grab; touch-action: none; user-select: none; box-shadow: 0 3px 0 rgba(74,55,40,.12); text-align: left; line-height: 1.35;
}
.dd-card:active { cursor: grabbing; }
.dd-card.sel { border-color: var(--biru); box-shadow: 0 0 0 3px rgba(61,143,219,.4); }
.dd-card.dragging { opacity: .3; }
.dd-card.ok { border-color: var(--hijau); background: #E6F6E1; }
.dd-card.no { border-color: var(--merah); background: #FDE6EA; }
.dd-ghost { position: fixed; z-index: 100; pointer-events: none; transform: rotate(-3deg) scale(1.05); box-shadow: 0 12px 24px rgba(74,55,40,.3); margin: 0; }

/* Materi */
.materi-flip { min-height: 260px; }
.mflip-front { background: var(--c, var(--teal)); }
.ex { background: #FFF6D8; border-left: 5px solid var(--kuning); border-radius: 10px; padding: .5rem .8rem; font-size: .93rem; margin-top: .6rem; font-style: italic; }

/* QAR */
.qar-legend { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.qar-type { border-radius: var(--r-md); padding: .8rem 1rem; color: var(--tinta); background: var(--putih); border-top: 7px solid var(--qc); box-shadow: 0 4px 0 rgba(74,55,40,.1); }
.qar-type b { font-family: var(--font-h); font-size: 1.1rem; color: var(--qc); }
.qar-type p { margin: .2rem 0 0; font-size: .9rem; }
.qar-q { margin-top: 1rem; }
.qar-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0; }
.chip { border: 2px solid var(--qc, #D9C3A2); background: #fff; border-radius: 999px; padding: .3em .85em; font-weight: 800; font-size: .88rem; cursor: pointer; color: var(--tinta); }
.chip.on { background: var(--qc); color: #fff; }
.chip.right { background: var(--hijau); border-color: var(--hijau); color: #fff; }
.chip.wrong { background: #FDE6EA; border-color: var(--merah); animation: shake .4s; }

/* Kuis */
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.quiz-q { font-family: var(--font-h); font-size: 1.4rem; font-weight: 700; line-height: 1.3; }
.score-big { font-family: var(--font-h); font-size: 4rem; font-weight: 800; color: var(--oranye); line-height: 1; }
.stars { font-size: 2.4rem; letter-spacing: .2em; }
.stars span { display: inline-block; animation: popIn .5s both cubic-bezier(.3,1.7,.5,1); }

/* Refleksi */
.emojis { display: flex; gap: .6rem; flex-wrap: wrap; }
.emo { font-size: 2.2rem; background: var(--putih); border: 3px solid transparent; border-radius: 18px; padding: .3rem .6rem; cursor: pointer; box-shadow: 0 3px 0 rgba(74,55,40,.12); display: flex; flex-direction: column; align-items: center; }
.emo small { font-size: .75rem; font-weight: 800; color: var(--tinta2); }
.emo.on { border-color: var(--oranye); background: #FFE2C7; transform: scale(1.06); }
.pena-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: .6rem; }
.pena-pick button { border: 3px solid transparent; border-radius: var(--r-md); padding: .7rem; color: #fff; font-weight: 800; cursor: pointer; text-align: center; box-shadow: 0 4px 0 rgba(0,0,0,.15); }
.pena-pick button b { display: block; font-family: var(--font-h); font-size: 1.8rem; line-height: 1; }
.pena-pick button.on { border-color: var(--tinta); transform: translateY(-3px); }
.checklist { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .45rem; }
.checklist label { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; font-weight: 600; background: var(--putih); border-radius: 12px; padding: .5rem .7rem; }
.checklist input { width: 1.3rem; height: 1.3rem; accent-color: var(--hijau); flex: none; margin-top: .2rem; }

/* Glosarium */
.alpha { display: flex; flex-wrap: wrap; gap: .3rem; margin: .8rem 0; }
.alpha button { width: 2.2rem; height: 2.2rem; border-radius: 10px; border: 0; background: var(--putih); font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 rgba(74,55,40,.1); }
.alpha button.on { background: var(--oranye); color: #fff; }
.alpha button:disabled { opacity: .3; cursor: default; }
.g-word { display: flex; flex-direction: column; gap: .3rem; }
.g-word h3 { font-size: 1.4rem; margin: 0; display: flex; align-items: center; gap: .5rem; }
.g-word .kls { font-family: var(--font-b); font-size: .8rem; font-style: italic; color: var(--tinta2); font-weight: 700; }
.search { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.search input { flex: 1; min-width: 200px; }

.glos-pop {
  margin: 0; inset: auto; position: fixed; width: min(340px, calc(100vw - 24px));
  border: 0; border-radius: var(--r-md); padding: 1rem 1.1rem; background: var(--putih); color: var(--tinta);
  box-shadow: 0 6px 0 rgba(74,55,40,.18), 0 18px 40px rgba(74,55,40,.25);
  outline: 3px solid var(--biru); outline-offset: -3px;
}
.glos-pop:popover-open { animation: popIn .25s both cubic-bezier(.3,1.6,.5,1); }
.glos-pop h4 { font-size: 1.35rem; margin: 0 0 .2rem; display: flex; align-items: center; gap: .5rem; justify-content: space-between; }
.glos-pop .kls { font-size: .8rem; font-style: italic; color: var(--tinta2); }
.glos-pop p { margin: .3rem 0; font-size: .98rem; }

/* Dialog */
.dlg {
  border: 2px solid #EBDAC0; border-radius: var(--r-lg); padding: 0;
  max-width: min(620px, calc(100vw - 24px)); width: 100%;
  background: var(--putih); color: var(--tinta);
  box-shadow: 0 8px 0 #E4D2B7, 0 24px 60px rgba(74, 51, 35, .32);
  overflow: hidden;
}
.dlg:modal { overscroll-behavior: contain; }
.dlg::backdrop {
  background: rgba(74, 51, 35, .48); backdrop-filter: blur(4px);
  overflow: hidden; overscroll-behavior: contain;
}
.dlg[open] { animation: popIn .28s both cubic-bezier(.3,1.5,.5,1); }
.dlg-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1rem .55rem 1.3rem;
  background: #FFF7E6; border-bottom: 1.5px dashed #E7D4B6;
}
.dlg-badge { font-family: var(--font-h); font-weight: 800; font-size: .85rem; color: var(--tinta2); }
.dlg-x {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #E5D4BA;
  background: var(--putih); color: var(--tinta); cursor: pointer;
  display: grid; place-items: center; font-weight: 900; font-size: .95rem;
  box-shadow: 0 3px 0 #E3D2B7; transition: transform .12s ease, background-color .15s ease;
}
.dlg-x:hover { background: #FEEAF0; color: var(--merah-d); transform: scale(1.06); }
.dlg-x:active { transform: translateY(2px); box-shadow: 0 1px 0 #E3D2B7; }
.dlg-body { padding: 1.15rem 1.35rem 1.35rem; max-height: min(74dvh, 560px); overflow-y: auto; overscroll-behavior: contain; }
.dlg-body h2 { font-size: 1.5rem; margin-bottom: .35rem; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(calc(100% + 48px)); z-index: 90;
  background: var(--tinta); color: #fff; font-weight: 800; padding: .7rem 1.2rem; border-radius: 999px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .35s cubic-bezier(.3,1.5,.5,1), opacity .25s, visibility .25s; max-width: calc(100vw - 24px); text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }

.confetti { position: fixed; top: -20px; width: 12px; height: 16px; z-index: 95; pointer-events: none; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* Tabel */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-md); box-shadow: 0 4px 0 rgba(74,55,40,.1); }
table.tbl { width: 100%; border-collapse: collapse; background: var(--putih); font-size: .95rem; }
.tbl th, .tbl td { padding: .65rem .8rem; text-align: left; vertical-align: top; border-bottom: 2px dashed #EADBC2; }
.tbl th { background: var(--tinta); color: #fff; font-family: var(--font-h); font-weight: 700; position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:nth-child(even) td { background: #FFF8EA; }

.prose h2 { font-size: 1.5rem; margin-top: 1.4rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.script { background: #FFF6D8; border-radius: var(--r-md); padding: .9rem 1.1rem; border-left: 6px solid var(--kuning); }
.script p { margin-bottom: .45rem; }
details.acc { background: var(--putih); border-radius: var(--r-md); padding: .2rem 1.1rem; box-shadow: 0 4px 0 rgba(74,55,40,.1); margin-bottom: .8rem; }
details.acc > summary { cursor: pointer; font-family: var(--font-h); font-weight: 700; font-size: 1.2rem; padding: .7rem 0; list-style: none; display: flex; align-items: center; gap: .5rem; }
details.acc > summary::before { content: "▸"; transition: transform .2s; color: var(--oranye); }
details.acc[open] > summary::before { transform: rotate(90deg); }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > div { padding-bottom: 1rem; }

/* ---------- Adegan SVG ---------- */
.sc .st { stroke: #4A3728; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.sc .jh { fill: none; stroke: #fff; stroke-opacity: .55; stroke-width: 2; stroke-dasharray: 6 5; }
.sc .fb-box { transform-box: fill-box; }
.sc-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4.5s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(2.2deg); } }
.sc-drift { animation: drift var(--d, 60s) linear infinite; }
@keyframes drift { from { transform: translateX(-260px); } to { transform: translateX(1060px); } }
.sc-pulse { transform-box: fill-box; transform-origin: center; animation: scpulse 3s ease-in-out infinite; }
@keyframes scpulse { 50% { transform: scale(1.15); opacity: .15; } }
.sc-bob { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.sc-wave { animation: wave 3s linear infinite; }
@keyframes wave { to { transform: translateX(-80px); } }
.sc-shimmer { animation: shimmer 2.6s ease-in-out infinite; }
@keyframes shimmer { 50% { opacity: .25; } }
.sc-twinkle { transform-box: fill-box; transform-origin: center; animation: sctw 2s ease-in-out infinite; }
@keyframes sctw { 50% { opacity: .2; transform: scale(.5); } }
.sc-bird { animation: bird var(--d, 14s) linear infinite; }
@keyframes bird { from { transform: translate(-80px, 0); } 50% { transform: translate(420px, -30px); } to { transform: translate(900px, 10px); } }
.sc-flap { transform-box: fill-box; transform-origin: center; animation: flap .4s ease-in-out infinite alternate; }
@keyframes flap { to { transform: scaleY(.3); } }
.sc-rain { animation: rain var(--d, .7s) linear infinite; }
@keyframes rain { from { transform: translate(0, -40px); } to { transform: translate(-40px, 500px); } }
.sc-flash { opacity: 0; animation: flash 5s linear infinite; }
@keyframes flash { 0%, 100% { opacity: 0; } 2% { opacity: .85; } 4% { opacity: 0; } 6% { opacity: .6; } 8% { opacity: 0; } }
.sc-bolt { opacity: 0; animation: flash 5s linear infinite; }
.sc-flood { animation: flood var(--d, 6s) var(--delay, 1s) cubic-bezier(.4,0,.3,1) forwards; }
@keyframes flood { from { transform: translateY(0); } to { transform: translateY(var(--lvl)); } }
.sc-leaf { animation: leaf var(--d, 8s) linear infinite; }
@keyframes leaf { from { transform: translate(0, -40px) rotate(0); } 50% { transform: translate(40px, 230px) rotate(180deg); } to { transform: translate(-10px, 500px) rotate(360deg); } }
.sc-ff { animation: ff var(--d, 5s) ease-in-out infinite alternate; }
@keyframes ff { 33% { transform: translate(20px, -15px); opacity: .3; } 66% { transform: translate(-15px, -30px); opacity: 1; } to { transform: translate(10px, 10px); opacity: .4; } }
.sc-sparkle { transform-box: fill-box; transform-origin: center; animation: sparkle 1.6s ease-in-out infinite; }
@keyframes sparkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } }
.sc-glow { transform-box: fill-box; transform-origin: center; animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 50% { transform: scale(1.25); opacity: .35; } }
.sc-jump { animation: jump 2.4s ease-in-out infinite; }
@keyframes jump { 0%, 30%, 100% { transform: translate(0, 0) rotate(0); } 45% { transform: translate(-25px, -70px) rotate(-30deg); } 60% { transform: translate(-50px, 0) rotate(-60deg); } }
.sc-swim { animation: swim 3s ease-in-out infinite alternate; }
@keyframes swim { to { transform: translate(40px, -8px); } }
.sc-fadein { animation: fadeinS 1.5s var(--delay, .5s) both; }
@keyframes fadeinS { from { opacity: 0; } }
.sc-rainbow { animation: rainbow 3s 1s both; }
@keyframes rainbow { from { opacity: 0; transform: translateY(30px); } }
.sc-darken { animation: fadeinS 2s both; }
.sc-butterfly { animation: bfly var(--d, 9s) ease-in-out infinite alternate; }
@keyframes bfly { 25% { transform: translate(80px, -40px); } 50% { transform: translate(160px, 10px); } 75% { transform: translate(240px, -30px); } to { transform: translate(300px, 0); } }
.sc-steam { animation: steam 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes steam { from { transform: translateY(0) scale(.6); opacity: .9; } to { transform: translateY(-30px) scale(1.3); opacity: 0; } }

/* Kamera */
.cam { transform-origin: 400px 225px; }
.cam-zoom { animation: camzoom 16s ease-in-out infinite alternate; }
@keyframes camzoom { to { transform: scale(1.09); } }
.cam-geser { animation: camgeser 14s ease-in-out infinite alternate; }
@keyframes camgeser { from { transform: scale(1.08) translateX(18px); } to { transform: scale(1.08) translateX(-18px); } }
.cam-goyang { animation: camshake 5s linear infinite; }
@keyframes camshake { 0%, 9%, 100% { transform: translate(0, 0); } 2% { transform: translate(-6px, 3px); } 4% { transform: translate(5px, -3px); } 6% { transform: translate(-3px, 2px); } }

/* Tokoh */
.mv { animation: mv var(--dur, 4s) var(--delay, 0s) ease-in-out forwards; }
@keyframes mv { from { transform: translate(0, 0); } to { transform: translate(var(--dx, 0px), var(--dy, 0px)); } }
.pose-diam { animation: bob 2.4s ease-in-out infinite; }
.pose-jalan, .pose-lari { animation: walkbob .5s ease-in-out var(--n, 8) var(--delay, 0s); }
.pose-lari { animation-duration: .32s; }
@keyframes walkbob { 50% { transform: translateY(-4px); } }
.pose-jalan .leg-a, .pose-lari .leg-a { transform-box: fill-box; transform-origin: 50% 0; animation: legA .5s ease-in-out var(--n, 8) var(--delay, 0s) alternate; }
.pose-jalan .leg-b, .pose-lari .leg-b { transform-box: fill-box; transform-origin: 50% 0; animation: legB .5s ease-in-out var(--n, 8) var(--delay, 0s) alternate; }
.pose-lari .leg-a, .pose-lari .leg-b { animation-duration: .32s; }
@keyframes legA { from { transform: rotate(22deg); } to { transform: rotate(-22deg); } }
@keyframes legB { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
.pose-jalan .arm-a, .pose-lari .arm-a { transform-box: fill-box; transform-origin: 50% 5%; animation: legB .5s ease-in-out var(--n, 8) var(--delay, 0s) alternate; }
.pose-lompat { animation: hop .8s ease-in-out infinite; }
@keyframes hop { 50% { transform: translateY(-26px); } }
.pose-gemetar { animation: tremble .15s linear infinite; }
@keyframes tremble { 50% { transform: translateX(2px); } }
.pose-marah { animation: angry .6s ease-in-out infinite; }
@keyframes angry { 25% { transform: translateX(-3px) rotate(-2deg); } 75% { transform: translateX(3px) rotate(2deg); } }
.pose-muncul { transform-box: fill-box; transform-origin: 50% 100%; animation: appear 1.6s var(--delay, .6s) both cubic-bezier(.3,1.5,.5,1); }
@keyframes appear { from { transform: scale(.1); opacity: 0; filter: brightness(3); } 60% { filter: brightness(1.6); } }
.pose-hilang { animation: vanish 2s var(--delay, 2s) forwards; }
@keyframes vanish { to { opacity: 0; transform: translateY(-20px); } }
.pose-lambai .arm-b, .pose-sorak .arm-b, .pose-sorak .arm-a { transform-box: fill-box; transform-origin: 50% 5%; animation: wave-arm .6s ease-in-out infinite alternate; }
.pose-sorak .arm-a { animation-direction: alternate-reverse; }
.pose-sorak { animation: hop 1s ease-in-out infinite; }
@keyframes wave-arm { from { transform: rotate(-150deg); } to { transform: rotate(-110deg); } }
.pose-menyapu .arm-b, .pose-mencangkul .arm-b { transform-box: fill-box; transform-origin: 50% 5%; animation: sweep .7s ease-in-out infinite alternate; }
@keyframes sweep { from { transform: rotate(-20deg); } to { transform: rotate(25deg); } }
.pose-mencangkul .arm-b { animation-duration: .9s; }
.pose-mancing .rod { transform-box: fill-box; transform-origin: 0 100%; animation: rod 2.4s ease-in-out infinite; }
@keyframes rod { 50% { transform: rotate(-4deg); } }
.tear { animation: tear 1s ease-in infinite; }
@keyframes tear { from { transform: translateY(0); opacity: 1; } to { transform: translateY(24px); opacity: 0; } }
.bubble { animation: popInS .5s var(--delay, 1s) both cubic-bezier(.3,1.7,.5,1); transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes popInS { from { transform: scale(0); opacity: 0; } }
.boat-bob { animation: boat 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes boat { 50% { transform: translateY(-5px) rotate(-2deg); } }

/* ---------- Responsif ---------- */
@media (max-width: 860px) {
  .hero, .cover-unit, .reader, .id-showcase { grid-template-columns: 1fr; }
  .reader-left { position: static; }
  .hide-sm { display: none; }
  .brand-lockup small { display: none; }
  body { font-size: 16px; }
  .text-card { font-size: 1.08rem; }
}
@media (max-width: 740px) {
  .welcome-grid { grid-template-columns: 1fr; gap: .95rem; }
  .welcome-content { text-align: center; align-items: center; }
  .welcome-hello { align-self: center; }
  .welcome-note { text-align: left; width: 100%; }
  .welcome-name-box { width: 100%; text-align: left; }
  .welcome-actions { justify-content: center; width: 100%; }
  .welcome-logo { width: clamp(136px, 38vw, 185px); }
  .welcome-card { padding: 1rem 1rem 1.2rem; border-radius: 24px; }
  .prop-plane, .prop-plane-2, .prop-note { display: none; }
}
@media (max-height: 650px) and (min-width: 741px) {
  .cover { padding: .6rem 1.2rem; }
  .welcome-card { padding: .95rem 1.5rem 1.1rem; }
  .welcome-grid { gap: 1.2rem; padding-top: .35rem; }
  .welcome-logo { width: clamp(138px, 24vh, 180px); }
  .welcome-brand { padding: .75rem .85rem; }
  .welcome-content { gap: .5rem; }
  .welcome-title { font-size: 1.65rem; }
  .welcome-note { padding: .6rem .85rem; }
  .welcome-note p { font-size: .9rem; margin-bottom: .45rem; }
  .welcome-name-box input { padding: .42rem .75rem; font-size: .92rem; }
  .btn-big { font-size: 1.05rem; padding: .58em 1.25em; }
  .welcome-greet-btn { font-size: .92rem; padding: .58em 1rem; }
}
@media (max-width: 440px) {
  .ibtn { width: 38px; height: 38px; font-size: 1rem; }
  .brand-icon { width: 36px; height: 36px; }
  .brand-wordmark { height: 22px; }
  .top-actions { gap: .3rem; }
  .welcome-actions .btn { width: 100%; }
}

/* ---------- Bintang Topbar, Font Stepper, Voice Coach, Permainan, & Lencana (V2.0) ---------- */
.star-pill {
  display: inline-flex; align-items: center; gap: .32rem; text-decoration: none;
  background: linear-gradient(145deg, #FFF5C2, #FFE07D); color: var(--tinta);
  border: 1.5px solid #EAB938; border-radius: 999px; padding: .35rem .8rem;
  font-family: var(--font-h); font-weight: 800; font-size: .95rem;
  box-shadow: 0 4px 0 #D8A322; transition: transform .15s ease;
}
.star-pill:hover { transform: translateY(-2px); }
.star-pill.pop { animation: starPop .45s cubic-bezier(.3,1.8,.5,1); }
@keyframes starPop { 45% { transform: scale(1.22); } }
.ibtn-game { background: linear-gradient(145deg, #F5EBFF, #E6D4FF); border-color: #C8A8F5; box-shadow: 0 4px 0 #B38AE8; }

.text-head-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: .35rem; }
.font-stepper { display: inline-flex; align-items: center; gap: .25rem; background: var(--krem2); border-radius: 999px; padding: .16rem .3rem; border: 1px solid #E7D6BC; }
.font-stepper button {
  min-width: 34px; min-height: 32px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--putih); font-family: var(--font-h); font-weight: 800; font-size: .86rem;
  box-shadow: 0 2px 0 #DDD0BC; transition: transform .1s ease;
}
.font-stepper button:active { transform: translateY(1px); }
.font-stepper span { font-size: .78rem; font-weight: 800; color: var(--tinta2); padding: 0 .3rem; }

.text-card .w.spoken {
  background: #D6F5D2; color: #1E5A1B;
  text-decoration: underline; text-decoration-color: #379239; text-decoration-thickness: 2.5px; text-underline-offset: 3px;
}
.coach-bar {
  margin-top: .55rem; padding: .55rem .85rem; border-radius: 16px;
  background: #EBF9E8; border: 2px solid #96DC8E; display: flex; flex-direction: column; gap: .35rem;
}
.coach-bar-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-weight: 800; font-size: .88rem; color: #21611D; }
.coach-bar .narasi-prog { width: 100%; accent-color: var(--hijau); }
.coach-bar .narasi-prog::-webkit-progress-value { background: linear-gradient(90deg, var(--hijau), #2FA9A0); }

/* Papan Lencana & Bintang */
.badge-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: .75rem;
}
.lencana-card {
  background: var(--putih); border: 1.5px solid #EAE0D0; border-radius: 18px;
  padding: .85rem .9rem; display: flex; align-items: center; gap: .65rem;
  box-shadow: 0 4px 0 #E5D7C2; transition: transform .16s ease;
}
.lencana-card.unlocked { background: linear-gradient(145deg, #FFFDF4, #FFF4CF); border-color: #F0C95A; box-shadow: 0 4px 0 #DFB442; }
.lencana-card.locked { opacity: .66; filter: grayscale(.55); }
.lencana-ic {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.55rem; background: var(--krem2); flex: none;
}
.lencana-card.unlocked .lencana-ic { background: #FFE37F; box-shadow: inset 0 -2px 0 rgba(0,0,0,.1); }
.lencana-card strong { display: block; font-family: var(--font-h); font-size: .96rem; line-height: 1.15; }
.lencana-card small { display: block; font-size: .78rem; color: var(--tinta2); line-height: 1.3; margin-top: .15rem; }

/* Permainan Tebak Kata dari Suara */
.game-head-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .7rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.streak-pill {
  display: inline-flex; align-items: center; gap: .3rem; font-family: var(--font-h); font-weight: 800;
  background: #FFF0DF; color: var(--oranye-d); border: 2px solid #F7B57E; border-radius: 999px;
  padding: .22rem .85rem; font-size: .95rem;
}
.game-prompt-box {
  background: linear-gradient(145deg, #FFFBF0, #EBF5FF); border: 2px solid #C8DFF6;
  border-radius: 22px; padding: 1.25rem; text-align: center;
}
.game-prompt-box .g-clue { font-size: 1.2rem; font-weight: 800; color: var(--tinta); margin: .45rem 0; }
.game-prompt-box .g-ex { font-style: italic; color: var(--tinta2); font-size: 1rem; margin: 0 0 .85rem; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .85rem; margin-top: 1rem; }
.game-tile {
  border: 2.5px solid #E5D4BA; background: var(--putih); border-radius: 20px;
  padding: 1rem 1.1rem; cursor: pointer; text-align: left; font-family: var(--font-h);
  font-weight: 800; font-size: 1.12rem; color: var(--tinta);
  box-shadow: 0 5px 0 #DFCEB4; transition: transform .14s ease, border-color .18s ease, background .18s ease;
  display: flex; align-items: center; gap: .65rem; min-height: 62px;
}
.game-tile:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--biru); background: #F2F9FF; }
.game-tile:active:not(:disabled) { transform: translateY(2px); }
.game-tile .gt-let {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--krem2); color: var(--tinta); font-size: .95rem;
}
.game-tile.ok { border-color: var(--hijau); background: #E6F8E3; box-shadow: 0 5px 0 #9CD696; }
.game-tile.ok .gt-let { background: var(--hijau); color: #fff; }
.game-tile.no { border-color: var(--merah); background: #FEEAF0; box-shadow: 0 5px 0 #EB9AB5; animation: shake .4s; }
.game-tile.no .gt-let { background: var(--merah); color: #fff; }
.game-tile:disabled { cursor: default; }

/* ---------- V3.0: 3 Tema Kertas Baca, Rak Buku 3D, Maskot Hidup, & Susun Suku Kata ---------- */
.paper-switcher {
  display: inline-flex; align-items: center; gap: .22rem;
  background: var(--putih); border: 1.5px solid #E7D6BC; border-radius: 999px;
  padding: .18rem .28rem; box-shadow: 0 3px 0 rgba(74, 51, 35, .1);
}
.paper-switcher button {
  border: 0; background: transparent; cursor: pointer; border-radius: 999px;
  padding: .24rem .62rem; font-family: var(--font-h); font-weight: 800; font-size: .8rem;
  color: var(--tinta); transition: background .15s ease, transform .12s ease;
}
.paper-switcher button.on { background: #FFE69C; box-shadow: inset 0 -2px 0 rgba(74,51,35,.15); }
.paper-switcher button:active { scale: .95; }

/* Tema Kertas Hijau Lembut (Mint — WCAG AAA > 11:1) */
.storybook.paper-mint .book-spread { background: #EFF9F0; }
.storybook.paper-mint .book-page {
  color: #1D3B2A;
  background: linear-gradient(180deg, #F3FBF4 0%, #E5F3E7 100%);
}
.storybook.paper-mint .book-page.page-right {
  background:
    repeating-linear-gradient(transparent 0, transparent 2.12em, rgba(29, 59, 42, .07) 2.12em, rgba(29, 59, 42, .07) calc(2.12em + 1px)),
    linear-gradient(180deg, #F3FBF4 0%, #E7F4E9 100%);
}
.storybook.paper-mint .book-plate { background: #E4F4E6; border-color: #B4DAB9; }
.storybook.paper-mint .text-card .kal.now { background: #D7F2C8; }

/* Tema Kertas Senja / Malam Hangat (WCAG AAA > 11:1) */
.storybook.paper-night .book-spread { background: #26201A; }
.storybook.paper-night .book-page {
  color: #F7ECDA;
  background: linear-gradient(180deg, #2B241E 0%, #201A15 100%);
}
.storybook.paper-night .book-page.page-right {
  background:
    repeating-linear-gradient(transparent 0, transparent 2.12em, rgba(247, 236, 218, .07) 2.12em, rgba(247, 236, 218, .07) calc(2.12em + 1px)),
    linear-gradient(180deg, #2B241E 0%, #211B16 100%);
}
.storybook.paper-night .page-running-head,
.storybook.paper-night .book-folio,
.storybook.paper-night .tip { color: #D4C4AE; border-color: rgba(247, 236, 218, .18); }
.storybook.paper-night .book-folio-num { background: rgba(247, 236, 218, .14); color: #F7ECDA; }
.storybook.paper-night .book-plate { background: #362D25; border-color: #564739; }
.storybook.paper-night #seg-title { color: #FFB76B !important; }
.storybook.paper-night .glos { color: #84D1FF; border-bottom-color: #5BB7F5; }
.storybook.paper-night .glos:hover, .storybook.paper-night .glos:focus-visible { background: rgba(132, 209, 255, .2); }
.storybook.paper-night .glos.seen { color: #7EE4DA; border-bottom-color: #46C9BC; }
.storybook.paper-night .text-card .kal.now { background: rgba(255, 213, 79, .2); }
.storybook.paper-night .font-stepper { background: #3A3027; border-color: #564739; }
.storybook.paper-night .font-stepper button { background: #4B3E33; color: #F7ECDA; box-shadow: 0 2px 0 #1B1510; }
.storybook.paper-night .font-stepper span { color: #E2D2BC; }
.storybook.paper-night .narasi-bar { background: #362D25; border-color: #564739; }
.storybook.paper-night .narasi-time { color: #E2D2BC; }
.storybook.paper-night .speed { background: #3A3027; color: #F7ECDA; }
.storybook.paper-night .page-corner-fold {
  background: linear-gradient(135deg, #2B241E 0%, #4A3E33 48%, #6B5847 50%, #9E7C53 100%);
  color: #FFFDF7;
}

.page-corner-btn.peeling .page-corner-fold {
  transform: scale(1.28) rotate(-4deg);
  box-shadow: -8px -8px 20px rgba(74, 51, 35, .32);
}

/* Rak Buku Cerita 3D di Beranda */
.bookshelf-grid { perspective: 1400px; }
.unit-card.is-book {
  position: relative; padding-left: 16px;
  transition: transform 220ms ease-out, box-shadow 220ms ease-out;
  transition: transform 320ms linear(0, .5 18%, 1.06 55%, 1), box-shadow 220ms ease-out;
}
.unit-card.is-book:hover {
  transform: translateY(-7px) rotateY(-4deg);
  box-shadow: 0 12px 0 #DFCEB4, 0 24px 36px -18px rgba(74, 51, 35, .36);
}
.book-card-spine {
  position: absolute; top: 0; bottom: 0; left: 0; width: 16px; z-index: 4;
  background: linear-gradient(90deg, var(--sp-d, #8F431A) 0%, var(--sp-l, #C96B33) 55%, rgba(0,0,0,.16) 100%);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.book-card-spine.u2 { --sp-l: #2E8F7B; --sp-d: #1D6456; }
.book-card-spine.u3 { --sp-l: #9850B8; --sp-d: #682D85; }
.book-card-spine.u4 { --sp-l: #2E78C9; --sp-d: #1B4E8C; }
.unit-voice-tag {
  font-size: .76rem; font-weight: 800; color: var(--ungu-d);
  background: #F3EBFD; border-radius: 999px; padding: .12rem .55rem;
}

/* Maskot Si PENA Hidup dengan Mata Mengikuti Kursor */
.sipena-eyes {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 11px; pointer-events: none;
}
.sipena-eye {
  width: 11px; height: 11px; border-radius: 50%; background: #FFFDF9;
  border: 1.5px solid var(--tinta); display: grid; place-items: center; overflow: hidden;
}
.sipena-pupil {
  width: 5px; height: 5px; border-radius: 50%; background: var(--tinta);
  transform: translate(var(--ex, 0px), var(--ey, 0px));
  transition: transform 80ms linear;
}
.mascot-btn { position: relative; }

/* Mini-Game 3: Susun Suku Kata (Word Builder) */
.wb-slots {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem;
  min-height: 62px; padding: .85rem; margin: .85rem 0;
  border-radius: 18px; background: #FFF8E6; border: 2px dashed #E5C88B;
}
.wb-slot {
  min-width: 58px; min-height: 48px; padding: .45rem .95rem;
  border-radius: 14px; border: 2px solid #2E96E8; background: #E9F4FF;
  font-family: var(--font-h); font-weight: 800; font-size: 1.2rem; color: var(--biru-d);
  cursor: pointer; box-shadow: 0 4px 0 #B5D7F7;
  transition: transform .12s ease;
}
.wb-slot:hover { transform: translateY(-2px); }
.wb-slot.ok { border-color: var(--hijau); background: #E6F8E3; color: #21611D; box-shadow: 0 4px 0 #9CD696; }
.wb-slot.no { border-color: var(--merah); background: #FEEAF0; color: var(--merah-d); animation: shake .4s; }
.wb-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .75rem; }
.wb-tile {
  min-width: 64px; min-height: 50px; padding: .5rem 1.05rem;
  border-radius: 16px; border: 2px solid #E5D4BA; background: var(--putih);
  font-family: var(--font-h); font-weight: 800; font-size: 1.18rem; color: var(--tinta);
  cursor: pointer; box-shadow: 0 5px 0 #DFCEB4;
  transition: transform .12s ease, opacity .15s ease;
}
.wb-tile:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--oranye); background: #FFF5E8; }
.wb-tile:disabled { opacity: .35; cursor: default; transform: none; box-shadow: none; }

@media (forced-colors: active) {
  .book-shell, .book-page, .card, .game-tile, .wb-tile { border: 2px solid CanvasText !important; }
}

/* View Transitions (Modern Web Guidance) */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .24s; }

/* Kurangi gerak (hanya nonaktifkan animasi gerak dekoratif, jaga state akhir tetap tampil) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .view > *, .step-panel, .fb, .kk, .dlg[open], .glos-pop:popover-open,
  .logo-stage.wiggle, .mascot-btn.hop, .slogan-chip.singing, .confetti, .spark-pop,
  .stage-hs .hs-ring, .stage-pop, .stage .sc-blink, .stage .sc-beams, .star-pill.pop {
    animation: none !important;
  }
  .btn, .ibtn, .menu-card, .unit-card, .cover, .text-card .kal, .text-card .w,
  .stage .sc-plx-sky, .stage .sc-plx-mid, .stage .sc-plx-front {
    transition-duration: .01ms !important;
  }
}

/* Cetak (Jurnal) */
@media print {
  .topbar, .foot, .no-print, .stepper, .step-nav, .cover { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .card, .tbl-wrap { box-shadow: none; border-color: #ccc; }
  .card::before { display: none; }
  .view { padding: 0; max-width: none; }
}
