/* ==========================================================================
   Parentia v108 — Peningkatan Ekosistem Belajar Aktif (Kiddopia Upgrade)
   Token selaras style.css: --navy, --purple, --purple-btn, --yellow, --cream
   ========================================================================== */

/* Angka dinamis stabil (make-interfaces-feel-better) */
.tabular, .dstars-n, .dh-streak, .pio-bal, .fj-score b, .gate-dots span, .cd-step-no {
  font-variant-numeric: tabular-nums;
}

/* ---------- Tombol Demo Khusus Staging ---------- */
.staging-box {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1.5px dashed var(--line);
  text-align: center;
}
.staging-btn {
  width: 100%;
  min-height: 46px;
  background: linear-gradient(135deg, #FFF5CC, #FFE07D);
  color: var(--navy);
  border: 1.5px solid #F3C23C;
  border-radius: 12px;
  padding: 11px 16px;
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition-property: transform, box-shadow, background-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.staging-btn:hover { box-shadow: 0 6px 16px rgba(245, 158, 11, 0.25); }
.staging-btn:active { transform: scale(0.98); }
.staging-note {
  font-size: 11.5px;
  color: var(--slate);
  margin-top: 6px;
}

/* ---------- Baris Profil Anak + Saklar Mode Si Kecil di Beranda ---------- */
.kid-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 10px 14px;
  margin-bottom: 18px;
  box-shadow: 0 10px 24px -18px rgba(26, 16, 51, 0.25);
}
.kid-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.kid-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 13px;
  border-radius: 14px;
  border: 1.8px solid var(--line);
  background: #FAF8FF;
  color: var(--navy);
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition-property: transform, border-color, background-color, box-shadow;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.kid-chip.on {
  background: #F1ECFF;
  border-color: var(--purple);
  color: var(--purple-btn);
  box-shadow: 0 6px 14px -10px rgba(106, 70, 229, 0.45);
}
.kid-chip:active { transform: scale(0.97); }
.kid-chip .kc-em { font-size: 18px; line-height: 1; }
.kid-chip .kc-age {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(124, 92, 252, 0.14);
  color: var(--purple-btn);
}
.kid-add-btn, .kid-quiz-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 13px;
  border: 1.5px dashed #C7B8FF;
  background: #fff;
  color: var(--purple-btn);
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition-property: transform, background-color, border-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.kid-quiz-btn {
  border-style: solid;
  border-color: #FDE68A;
  background: #FFFBEB;
  color: #B45309;
}
.kid-add-btn:hover { background: #F6F3FF; }
.kid-quiz-btn:hover { background: #FEF3C7; }
.kid-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 5px 0 #047857;
  transition-property: transform, box-shadow, background-color;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}
.kid-mode-toggle:active { transform: translateY(2px); box-shadow: 0 3px 0 #047857; }
.kid-mode-toggle.locked {
  background: linear-gradient(135deg, #475569, #334155);
  box-shadow: 0 5px 0 #1E293B;
}

/* Cegah judul kartu Lanjutkan Belajar menabrak maskot Pio di mobile & desktop */
.dash-cont .dc-h {
  max-width: calc(100% - 165px);
  line-height: 1.18;
  text-wrap: balance;
}
.dash-cont .dc-eb {
  max-width: calc(100% - 165px);
}
@media (max-width: 900px) {
  .dash-cont .dc-h,
  .dash-cont .dc-eb,
  .dash-cont .dc-sub {
    max-width: calc(100% - 92px);
  }
  .dash-cont .dc-h { font-size: 22px; }
  .dash-cont .dc-star { display: none; }
}
@media (max-width: 520px) {
  .kid-mode-toggle {
    width: 100%;
    justify-content: center;
  }
}

/* Saat Mode Si Kecil aktif: sembunyikan area dewasa & rapikan layar */
body.kid-mode .dash-sections,
body.kid-mode #logoutBtn2,
body.kid-mode #startBtn,
body.kid-mode .kid-add-btn,
body.kid-mode .kid-quiz-btn,
body.kid-mode .dstats {
  display: none !important;
}
body.kid-mode .dash {
  background: linear-gradient(180deg, #EEF6FF 0%, #F5F0FF 100%);
}
.kid-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(120deg, #0EA5E9, #2563EB);
  color: #fff;
  border-radius: 18px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 14px 28px -18px rgba(37, 99, 235, 0.55);
}
.kid-banner b { font-family: 'Baloo 2', cursive; font-size: 17px; display: block; line-height: 1.15; }
.kid-banner span { font-size: 12.5px; opacity: 0.92; }
.kid-spk-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 13px;
  border: none;
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  flex: none;
}

/* ---------- Kartu Dunia Spesial Baru ---------- */
.dw.coral { background: linear-gradient(150deg, #FF8A65, #F4511E); --wc: #F4511E; }
.dw.amber { background: linear-gradient(150deg, #FBBF24, #D97706); --wc: #D97706; }
.dw.teal  { background: linear-gradient(150deg, #2DD4BF, #0D9488); --wc: #0D9488; }
.dw.indigo{ background: linear-gradient(150deg, #818CF8, #4F46E5); --wc: #4F46E5; }

.dstars-btn {
  margin-top: 12px;
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 16px;
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 0 5px 0 #B45309;
  transition-property: transform, box-shadow;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}
.dstars-btn:active { transform: translateY(2px); box-shadow: 0 3px 0 #B45309; }

/* Maskot Pio dengan aksesori */
.pio-avatar-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
}
.pio-hat-badge {
  position: absolute;
  top: -12px;
  right: -6px;
  font-size: 28px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

/* ---------- Modal Umum: Kunci Orang Tua & Profil Anak ---------- */
.ku-ov {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(26, 16, 51, 0.62);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ku-modal {
  background: #fff;
  border-radius: 26px;
  padding: 24px 22px;
  width: 100%;
  max-width: 410px;
  box-shadow: 0 28px 60px rgba(26, 16, 51, 0.35);
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
}
.ku-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: #F3F0FB;
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}
.ku-modal h2 {
  font-family: 'Baloo 2', cursive;
  font-size: 23px;
  color: var(--navy);
  line-height: 1.2;
  padding-right: 36px;
}
.ku-sub {
  font-size: 13.5px;
  color: var(--slate);
  margin: 4px 0 16px;
}

/* Papan ketik tahun lahir 4 digit (Grown-Up Gate) */
.gate-dots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.gate-dots span {
  height: 54px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #FAF8FF;
  display: grid;
  place-items: center;
  font-family: 'Baloo 2', cursive;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
}
.gate-dots span.filled {
  border-color: var(--purple);
  background: #F1ECFF;
}
.gate-err {
  min-height: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #DC2626;
  text-align: center;
  margin-bottom: 10px;
}
.gate-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.gate-key {
  min-height: 52px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-family: 'Baloo 2', cursive;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 #E5DFF2;
  transition-property: transform, background-color;
  transition-duration: 120ms;
  transition-timing-function: ease-out;
}
.gate-key:active {
  transform: translateY(2px);
  background: #F3F0FB;
}
.gate-key.act {
  font-size: 15px;
  background: #F8F6FC;
  color: var(--slate);
}

/* Form Tambah/Ubah Profil Anak */
.av-pick {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.av-opt {
  min-height: 46px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #FAF9F5;
  font-size: 22px;
  cursor: pointer;
}
.av-opt.on {
  border-color: var(--purple);
  background: #EDE9FE;
}
.age-pick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.age-opt {
  min-height: 48px;
  border-radius: 13px;
  border: 2px solid var(--line);
  background: #fff;
  padding: 8px 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
}
.age-opt.on {
  border-color: var(--purple);
  background: #F1ECFF;
  color: var(--purple-btn);
}
.age-opt small { display: block; font-size: 11px; color: var(--slate); font-weight: 600; }

/* ---------- Kuis Diagnosa 60 Detik (#/kuis-bunda) ---------- */
.diag-wrap {
  max-width: 660px;
  margin: 22px auto 48px;
  padding: 0 16px;
}
.diag-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 24px;
  padding: 24px 22px;
  box-shadow: var(--shadow);
}
.diag-prog {
  height: 10px;
  border-radius: 99px;
  background: #EFEAF7;
  overflow: hidden;
  margin-bottom: 18px;
}
.diag-prog i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #7C5CFC, #F59E0B);
  transition-property: width;
  transition-duration: 240ms;
  transition-timing-function: ease-out;
}
.diag-q {
  font-family: 'Baloo 2', cursive;
  font-size: 23px;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 6px;
}
.diag-hint {
  font-size: 13.5px;
  color: var(--slate);
  margin-bottom: 16px;
}
.diag-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.diag-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #FCFBF8;
  color: var(--navy);
  font-family: inherit;
  font-weight: 700;
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
  transition-property: transform, border-color, background-color;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}
.diag-opt:hover { border-color: #C4B5FD; background: #F8F5FF; }
.diag-opt:active { transform: scale(0.99); }
.diag-opt .do-ic { font-size: 22px; flex: none; }
.diag-res-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.diag-stat {
  background: #FAF8FF;
  border: 1.5px solid #E9E2FA;
  border-radius: 16px;
  padding: 14px;
}
.diag-stat small { display: block; font-size: 11.5px; font-weight: 700; color: var(--slate); }
.diag-stat b { font-family: 'Baloo 2', cursive; font-size: 19px; color: var(--purple-btn); display: block; margin-top: 2px; }
@media (max-width: 520px) {
  .diag-res-grid { grid-template-columns: 1fr; }
}

/* ---------- Rumah Pio (#/rumah-pio) ---------- */
.pio-wrap {
  max-width: 920px;
  margin: 20px auto 52px;
  padding: 0 16px;
}
.pio-stage {
  position: relative;
  border-radius: 28px;
  padding: 26px 20px 22px;
  text-align: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 22px 46px -24px rgba(26, 16, 51, 0.35);
  margin-bottom: 20px;
}
.pio-stage.bg-taman   { background: linear-gradient(180deg, #BAE6FD 0%, #FEF9C3 62%, #BBF7D0 100%); }
.pio-stage.bg-angkasa { background: linear-gradient(180deg, #1E1B4B 0%, #312E81 65%, #4C1D95 100%); color: #fff; }
.pio-stage.bg-laut    { background: linear-gradient(180deg, #67E8F9 0%, #0284C7 70%, #0369A1 100%); color: #fff; }
.pio-stage.bg-kamar   { background: linear-gradient(180deg, #FDE68A 0%, #FFEDD5 65%, #FED7AA 100%); }

.pio-top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pio-bal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FFFBEB;
  color: #92400E;
  border: 2px solid #FCD34D;
  border-radius: 99px;
  padding: 7px 15px;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 18px;
}
.pio-meters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pio-meter {
  background: rgba(255, 255, 255, 0.88);
  color: var(--navy);
  border-radius: 12px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pio-bubble {
  display: inline-block;
  background: #fff;
  color: var(--navy);
  border-radius: 18px;
  padding: 10px 18px;
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 10px 22px -12px rgba(26, 16, 51, 0.35);
  margin-bottom: 14px;
  max-width: 92%;
}
.pio-char-box {
  position: relative;
  width: 176px;
  height: 196px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition-property: transform;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.34, 1.5, 0.6, 1);
}
.pio-char-box.bounce { transform: translateY(-14px) scale(1.06); }
.pio-char-box img {
  width: 154px;
  height: 174px;
  object-fit: contain;
  outline: none;
  filter: drop-shadow(0 14px 18px rgba(26, 16, 51, 0.28));
}
.pio-acc-hat {
  position: absolute;
  z-index: 3;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 46px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
  pointer-events: none;
}
.pio-acc-item {
  position: absolute;
  z-index: 3;
  bottom: 6px;
  right: -4px;
  font-size: 38px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.22));
  pointer-events: none;
}
.pio-shop-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pio-tab {
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}
.pio-tab.on {
  background: var(--purple-btn);
  border-color: var(--purple-btn);
  color: #fff;
}
.pio-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 12px;
}
.pio-item {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.pio-item.owned { border-color: #A7F3D0; background: #F0FDF4; }
.pio-item .pi-em { font-size: 38px; line-height: 1.1; }
.pio-item b { font-family: 'Baloo 2', cursive; font-size: 16px; color: var(--navy); }
.pio-item small { font-size: 12px; color: var(--slate); }
.pio-buy {
  margin-top: auto;
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--purple-btn);
  color: #fff;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 14.5px;
  cursor: pointer;
}
.pio-buy.used { background: #16A34A; }
.pio-buy:disabled { opacity: 0.5; cursor: default; }

/* Sertifikat Cetak */
.cert-card {
  margin-top: 22px;
  background: linear-gradient(135deg, #FFFDF5, #FEF3C7);
  border: 3px double #D97706;
  border-radius: 24px;
  padding: 24px 20px;
  text-align: center;
}
.cert-card h3 { font-family: 'Baloo 2', cursive; font-size: 24px; color: #92400E; }
.cert-name {
  font-family: 'Baloo 2', cursive;
  font-size: 30px;
  color: var(--navy);
  margin: 6px 0;
  text-decoration: underline;
  text-decoration-color: #F59E0B;
}

/* ---------- Dunia Kebiasaan Hebat (#/kebiasaan) ---------- */
.hb-stage {
  max-width: 680px;
  margin: 20px auto 48px;
  padding: 0 16px;
}
.hb-arena {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 26px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow);
}
.hb-pio-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}
.hb-pio-row img { width: 84px; height: 96px; object-fit: contain; outline: none; }
.hb-speech {
  background: #F3F0FB;
  border-radius: 16px;
  padding: 11px 15px;
  text-align: left;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--navy);
  max-width: 380px;
}
.hb-targets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.hb-cell {
  min-height: 92px;
  border-radius: 20px;
  border: 2.5px solid #E5E0F5;
  background: #FAF8FF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  color: var(--navy);
  transition-property: transform, background-color, border-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.hb-cell .hc-em { font-size: 34px; line-height: 1.1; }
.hb-cell.done {
  background: #DCFCE7;
  border-color: #22C55E;
  color: #15803D;
}
.hb-cell:active { transform: scale(0.95); }
@media (max-width: 420px) {
  .hb-targets { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Main Bareng Bunda (#/main-bareng) ---------- */
.fj-wrap {
  max-width: 780px;
  margin: 20px auto 48px;
  padding: 0 16px;
}
.fj-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.fj-score {
  background: #fff;
  border: 2.5px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fj-score.turn {
  border-color: var(--purple);
  background: #F5F2FF;
  box-shadow: 0 10px 22px -16px rgba(106, 70, 229, 0.55);
}
.fj-score span { font-weight: 800; font-size: 14px; color: var(--navy); }
.fj-score b { font-family: 'Baloo 2', cursive; font-size: 28px; color: var(--purple-btn); line-height: 1; }
.fj-mem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.fj-card {
  aspect-ratio: 1 / 1;
  min-height: 72px;
  border-radius: 18px;
  border: 2.5px solid #DDD6FE;
  background: linear-gradient(145deg, #7C5CFC, #5B3FD6);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 8px;
  transition-property: transform, background-color, border-color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}
.fj-card.open, .fj-card.matched {
  background: #fff;
  border-color: #F59E0B;
}
.fj-card.matched { border-color: #22C55E; background: #F0FDF4; }
.fj-card img { width: 82%; height: 82%; object-fit: contain; outline: none; }
@media (max-width: 420px) {
  .fj-mem-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Silang-Bulat 3x3 */
.ttt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 340px;
  margin: 16px auto;
}
.ttt-cell {
  aspect-ratio: 1 / 1;
  min-height: 86px;
  border-radius: 20px;
  border: 2.5px solid var(--line);
  background: #fff;
  font-size: 40px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 0 #EAE4F6;
}
.ttt-cell.win { background: #FEF3C7; border-color: #F59E0B; }

/* Adu Cepat 2 Pemain */
.duel-box {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 24px;
  padding: 20px 16px;
  text-align: center;
}
.duel-q {
  background: #FAF8FF;
  border: 2px dashed #C4B5FD;
  border-radius: 18px;
  padding: 16px;
  margin: 14px 0;
  font-family: 'Baloo 2', cursive;
  font-size: 26px;
  color: var(--navy);
}
.duel-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.duel-side {
  border-radius: 18px;
  padding: 14px 12px;
  background: #F8FAFC;
  border: 2px solid var(--line);
}
.duel-side.p1 { background: #FFF7ED; border-color: #FDBA74; }
.duel-side.p2 { background: #EEF2FF; border-color: #A5B4FC; }
.duel-side h4 { font-family: 'Baloo 2', cursive; font-size: 17px; margin-bottom: 8px; }
.duel-opts { display: flex; flex-direction: column; gap: 8px; }
.duel-btn {
  min-height: 48px;
  border-radius: 13px;
  border: 2px solid rgba(26, 16, 51, 0.1);
  background: #fff;
  font-family: 'Baloo 2', cursive;
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  cursor: pointer;
}
@media (max-width: 520px) {
  .duel-sides { grid-template-columns: 1fr; }
}

/* ---------- Langkah Arah Pio / Koding Anak (#/langkah-pio) ---------- */
.cd-wrap {
  max-width: 720px;
  margin: 20px auto 48px;
  padding: 0 16px;
}
.cd-card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 26px;
  padding: 20px 16px;
  box-shadow: var(--shadow);
}
.cd-board {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: 8px;
  max-width: 340px;
  margin: 14px auto;
  background: #EEF2FF;
  padding: 10px;
  border-radius: 22px;
}
.cd-tile {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: #fff;
  border: 2px solid #E0E7FF;
  display: grid;
  place-items: center;
  font-size: 28px;
  position: relative;
}
.cd-tile.rock { background: #CBD5E1; border-color: #94A3B8; }
.cd-tile.goal { background: #FEF3C7; border-color: #F59E0B; }
.cd-tile img { width: 78%; height: 78%; object-fit: contain; outline: none; }
.cd-queue {
  min-height: 56px;
  background: #FAF8FF;
  border: 2px dashed #C4B5FD;
  border-radius: 16px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.cd-qchip {
  min-width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #EDE9FE;
  border: 1.5px solid #A78BFA;
  display: grid;
  place-items: center;
  font-size: 20px;
  cursor: pointer;
}
.cd-qchip.active { background: #FDE68A; border-color: #F59E0B; transform: scale(1.1); }
.cd-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.cd-arrow {
  min-height: 54px;
  border-radius: 15px;
  border: none;
  background: #EEF2FF;
  color: #3730A3;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 #C7D2FE;
}
.cd-arrow:active { transform: translateY(2px); }
.cd-actions {
  display: flex;
  gap: 10px;
}
.cd-run {
  flex: 2;
  min-height: 50px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: #fff;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 0 #15803D;
}
.cd-clr {
  flex: 1;
  min-height: 50px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--slate);
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}

/* Tombol dengar ulang suara ElevenLabs Pio */
.vo-spk {
  min-width: 44px;
  min-height: 44px;
  border-radius: 13px;
  border: 2px solid #DDD6FE;
  background: #F5F3FF;
  color: #5B21B6;
  font-size: 18px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
  cursor: pointer;
  flex: none;
  transition-property: transform, background-color;
  transition-duration: 140ms;
}
.vo-spk:active { transform: scale(0.95); background: #EDE9FE; }

@media print {
  .topbar, .pio-stage, .pio-shop-tabs, .pio-items, .no-print { display: none !important; }
  .cert-card { border: 4px double #92400E; box-shadow: none; margin: 0; }
}
