/* ==========================================================================
   LATIHAN SOAL KELAS 1 SD - CERIA, FRESH & TACTILE KIDS DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Palet Utama Ramah Anak (Langit, Matahari, Mint, Stroberi, Lavender) */
  --primary: #0ea5e9;
  --primary-hover: #0284c7;
  --primary-shadow: #0369a1;
  --primary-light: #e0f2fe;
  --primary-glow: rgba(14, 165, 233, 0.28);

  --sun: #fbbf24;
  --sun-dark: #d97706;
  --sun-light: #fef9c3;
  --sun-ink: #78350f;

  /* Warna Semantik */
  --sukses: #22c55e;
  --sukses-hover: #16a34a;
  --sukses-shadow: #15803d;
  --sukses-light: #dcfce7;
  --sukses-teks: #166534;

  --bahaya: #f43f5e;
  --bahaya-hover: #e11d48;
  --bahaya-shadow: #be123c;
  --bahaya-light: #ffe4e6;
  --bahaya-teks: #9f1239;

  --peringatan: #f59e0b;
  --peringatan-light: #fef3c7;
  --peringatan-teks: #92400e;

  --lavender: #a855f7;
  --lavender-light: #f3e8ff;

  /* Permukaan & Tipografi */
  --latar-atas: #dbeafe;
  --latar-tengah: #f0f9ff;
  --latar-bawah: #fefce8;
  --kartu: #ffffff;
  --teks: #1e293b;
  --teks-pudar: #52637a;
  --garis: #dbe6f3;
  --garis-tebal: #cbd8e8;
  --garis-fokus: #7dd3fc;

  /* Radius & Tactile 3D Elevations */
  --radius-sm: 0.75rem;
  --radius-md: 1.15rem;
  --radius-lg: 1.6rem;
  --radius-pill: 9999px;

  --bevel-sm: 3px;
  --bevel-md: 4px;
  --bevel-lg: 5px;

  --bayangan-kartu: 0 5px 0 #dbe6f3, 0 10px 24px rgba(14, 116, 144, 0.08);
  --bayangan-lembut: 0 8px 22px rgba(14, 116, 144, 0.09);

  /* Tema Default (bisa di-override oleh .tema-*) */
  --tema-bg: #f0f9ff;
  --tema-bg-2: #e0f2fe;
  --tema-border: #7dd3fc;
  --tema-shadow: #38bdf8;
  --tema-accent: #0ea5e9;
  --tema-accent-dark: #0284c7;
  --tema-tag-bg: #e0f2fe;
  --tema-tag-text: #0369a1;

  /* Font Ramah Anak Kelas 1 SD */
  --font-judul: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-badan: 'Nunito', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   SISTEM TEMA WARNA 9 MATA PELAJARAN (.tema-*)
   ========================================================================== */
.tema-hijau {
  --tema-bg: #f0fdf4;
  --tema-bg-2: #dcfce7;
  --tema-border: #6ee7b7;
  --tema-shadow: #10b981;
  --tema-accent: #10b981;
  --tema-accent-dark: #059669;
  --tema-tag-bg: #d1fae5;
  --tema-tag-text: #065f46;
}

.tema-biru {
  --tema-bg: #f0f9ff;
  --tema-bg-2: #e0f2fe;
  --tema-border: #7dd3fc;
  --tema-shadow: #0ea5e9;
  --tema-accent: #0ea5e9;
  --tema-accent-dark: #0284c7;
  --tema-tag-bg: #e0f2fe;
  --tema-tag-text: #075985;
}

.tema-oranye {
  --tema-bg: #fff7ed;
  --tema-bg-2: #ffedd5;
  --tema-border: #fdba74;
  --tema-shadow: #f97316;
  --tema-accent: #f97316;
  --tema-accent-dark: #ea580c;
  --tema-tag-bg: #ffedd5;
  --tema-tag-text: #9a3412;
}

.tema-ungu {
  --tema-bg: #faf5ff;
  --tema-bg-2: #f3e8ff;
  --tema-border: #d8b4fe;
  --tema-shadow: #a855f7;
  --tema-accent: #a855f7;
  --tema-accent-dark: #7e22ce;
  --tema-tag-bg: #f3e8ff;
  --tema-tag-text: #6b21a8;
}

.tema-indigo {
  --tema-bg: #eef2ff;
  --tema-bg-2: #e0e7ff;
  --tema-border: #a5b4fc;
  --tema-shadow: #6366f1;
  --tema-accent: #6366f1;
  --tema-accent-dark: #4338ca;
  --tema-tag-bg: #e0e7ff;
  --tema-tag-text: #3730a3;
}

.tema-merah {
  --tema-bg: #fff1f2;
  --tema-bg-2: #ffe4e6;
  --tema-border: #fda4af;
  --tema-shadow: #f43f5e;
  --tema-accent: #f43f5e;
  --tema-accent-dark: #e11d48;
  --tema-tag-bg: #ffe4e6;
  --tema-tag-text: #9f1239;
}

.tema-cokelat {
  --tema-bg: #fffbeb;
  --tema-bg-2: #fef3c7;
  --tema-border: #fcd34d;
  --tema-shadow: #f59e0b;
  --tema-accent: #f59e0b;
  --tema-accent-dark: #d97706;
  --tema-tag-bg: #fef3c7;
  --tema-tag-text: #92400e;
}

.tema-teal {
  --tema-bg: #f0fdfa;
  --tema-bg-2: #ccfbf1;
  --tema-border: #5eead4;
  --tema-shadow: #14b8a6;
  --tema-accent: #14b8a6;
  --tema-accent-dark: #0d9488;
  --tema-tag-bg: #ccfbf1;
  --tema-tag-text: #115e59;
}

.tema-biru-tua {
  --tema-bg: #ecfeff;
  --tema-bg-2: #cffafe;
  --tema-border: #67e8f9;
  --tema-shadow: #06b6d4;
  --tema-accent: #0891b2;
  --tema-accent-dark: #0e7490;
  --tema-tag-bg: #cffafe;
  --tema-tag-text: #155e75;
}

/* ==========================================================================
   BASE RESET & PLAYFUL SKY BACKGROUND
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-badan);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--teks);
  background: linear-gradient(180deg, var(--latar-atas) 0%, var(--latar-tengah) 38%, var(--latar-bawah) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: 4rem;
  position: relative;
  overflow-x: clip;
  max-width: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(14, 165, 233, 0.11) 1.5px, transparent 1.5px),
    radial-gradient(rgba(251, 191, 36, 0.12) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
}

/* Lapisan Awan & Bintang Dekoratif */
.sky-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sky-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  filter: drop-shadow(0 6px 12px rgba(14, 165, 233, 0.08));
}

.sky-cloud::before,
.sky-cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud-1 {
  width: 140px;
  height: 44px;
  top: 4%;
  left: 4%;
  animation: cloud-drift 18s ease-in-out infinite alternate;
}
.cloud-1::before { width: 58px; height: 58px; top: -24px; left: 20px; }
.cloud-1::after { width: 44px; height: 44px; top: -16px; right: 22px; }

.cloud-2 {
  width: 165px;
  height: 50px;
  top: 10%;
  right: 3%;
  animation: cloud-drift 22s ease-in-out infinite alternate-reverse;
}
.cloud-2::before { width: 66px; height: 66px; top: -28px; left: 26px; }
.cloud-2::after { width: 52px; height: 52px; top: -20px; right: 24px; }

.cloud-3 {
  width: 120px;
  height: 36px;
  bottom: 12%;
  left: 6%;
  opacity: 0.55;
  animation: cloud-drift 24s ease-in-out infinite alternate;
}
.cloud-3::before { width: 48px; height: 48px; top: -20px; left: 16px; }
.cloud-3::after { width: 38px; height: 38px; top: -14px; right: 18px; }

@keyframes cloud-drift {
  from { transform: translateX(0); }
  to { transform: translateX(22px); }
}

.sky-sparkle {
  position: absolute;
  color: #fbbf24;
  opacity: 0.65;
  animation: twinkle 3.2s ease-in-out infinite;
}
.sparkle-1 { top: 15%; left: 14%; font-size: 1.2rem; }
.sparkle-2 { top: 22%; right: 12%; font-size: 1rem; animation-delay: 1s; color: #38bdf8; }
.sparkle-3 { top: 65%; right: 7%; font-size: 1.3rem; animation-delay: 1.8s; color: #fb7185; }

@keyframes twinkle {
  0%, 100% { transform: scale(0.9) rotate(0deg); opacity: 0.45; }
  50% { transform: scale(1.2) rotate(12deg); opacity: 0.9; }
}

/* Site Container Layout */
.site-container {
  position: relative;
  z-index: 1;
  max-width: 54rem;
  margin: 0 auto;
  padding: 0 0.75rem;
}

@media (min-width: 30rem) {
  .site-container { padding: 0 1.1rem; }
}

/* ==========================================================================
   GLOBAL TOP NAVIGATION (CHUNKY KID BAR)
   ========================================================================== */
.app-nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.65rem;
  padding: 0.55rem 0.75rem;
  margin: 0.75rem 0 1.15rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2.5px solid #bae6fd;
  border-radius: 1.5rem;
  box-shadow: 0 4px 0 #bae6fd, 0 8px 18px rgba(14, 165, 233, 0.1);
  max-width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.brand-badge {
  font-family: var(--font-judul);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.68rem;
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  color: #ffffff;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 0 #0284c7;
  white-space: nowrap;
}

.brand-title {
  font-family: var(--font-judul);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--teks);
  display: none;
}

@media (min-width: 38rem) {
  .app-nav-bar {
    padding: 0.65rem 0.95rem;
    border-radius: var(--radius-pill);
  }
  .brand-title { display: inline-block; }
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.tool-btn {
  font-family: var(--font-judul);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  background: #f8fafc;
  color: var(--teks);
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 #cbd5e1;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  white-space: nowrap;
}

.tool-btn:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  box-shadow: 0 3px 0 #38bdf8;
}

.tool-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #38bdf8;
}

.font-resizer {
  display: flex;
  gap: 0.3rem;
}

.btn-font-dec, .btn-font-inc {
  min-width: 2.35rem;
  font-weight: 700;
}

.btn-toggle-fullscreen {
  gap: 0.35rem;
  min-width: 2.35rem;
  background: #e0f2fe;
  border-color: #7dd3fc;
  box-shadow: 0 3px 0 #38bdf8;
  color: #0369a1;
}

.btn-toggle-fullscreen:hover {
  background: #bae6fd;
  border-color: #38bdf8;
  box-shadow: 0 3px 0 #0ea5e9;
}

.btn-toggle-fullscreen.aktif {
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  border-color: #0284c7;
  box-shadow: 0 3px 0 #0369a1;
  color: #ffffff;
}

.fs-label {
  display: none;
}

@media (min-width: 34rem) {
  .fs-label { display: inline; }
}

/* ==========================================================================
   HERO MASKOT & DAY TABS SECTION
   ========================================================================== */
.hero-section {
  background: linear-gradient(155deg, #ffffff 0%, #f0f9ff 58%, #fefce8 100%);
  border: 3px solid #7dd3fc;
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  margin-bottom: 1.65rem;
  box-shadow: 0 6px 0 #7dd3fc, 0 14px 28px rgba(14, 165, 233, 0.14);
  max-width: 100%;
  min-width: 0;
}

@media (min-width: 30rem) {
  .hero-section { padding: 1.45rem; }
}

.hero-top-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 34rem) {
  .hero-top-grid {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1.35rem;
  }
}

.hero-maskot-kolom {
  flex-shrink: 0;
}

.hero-maskot-badge {
  width: 6.75rem;
  height: 6.75rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e0f2fe 70%, #bae6fd 100%);
  border: 3px solid #38bdf8;
  box-shadow: 0 5px 0 #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.maskot-svg {
  display: block;
  animation: maskot-float 3s ease-in-out infinite;
}

@keyframes maskot-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(1.5deg); }
}

.hero-teks-kolom {
  flex: 1;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-judul);
  font-size: 0.88rem;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  border: 2px solid #7dd3fc;
  padding: 0.28rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.5rem;
}

.hero-section h1,
.hero-section h2 {
  font-family: var(--font-judul);
  font-size: 1.7rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.hero-speech-bubble {
  position: relative;
  background: #ffffff;
  border: 2px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  box-shadow: 0 3px 0 #e0f2fe;
}

.hero-desc {
  color: var(--teks);
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0;
}

.hero-stats-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  justify-content: center;
}

@media (min-width: 34rem) {
  .hero-stats-banner { justify-content: flex-start; }
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.95rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-judul);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
}

.stat-pill-bintang {
  background: #fef9c3;
  border-color: #fbbf24;
  color: #92400e;
  box-shadow: 0 3px 0 #f59e0b;
}

.stat-pill-mapel {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #075985;
  box-shadow: 0 3px 0 #0ea5e9;
}

.stat-pill-selesai {
  background: #dcfce7;
  border-color: #4ade80;
  color: #166534;
  box-shadow: 0 3px 0 #22c55e;
}

.stat-pill-ikon { font-size: 1.15rem; }

/* Search Input */
.search-filter-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.search-icon {
  position: absolute;
  left: 1.05rem;
  pointer-events: none;
  font-size: 1.15rem;
}

.search-filter-box input {
  width: 100%;
  padding: 0.82rem 1.1rem 0.82rem 2.95rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: 2.5px solid #bae6fd;
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--teks);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(14, 165, 233, 0.06);
}

.search-filter-box input::placeholder {
  color: #94a3b8;
  font-weight: 600;
}

.search-filter-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Day Filter Tabs */
.tab-hari-container {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.55rem;
  scrollbar-width: thin;
  max-width: 100%;
}

@media (min-width: 44rem) {
  .tab-hari-container {
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0.25rem;
  }
}

.tab-hari-btn {
  font-family: var(--font-judul);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: #ffffff;
  color: var(--teks-pudar);
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.tab-hari-btn:hover {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #7dd3fc;
  box-shadow: 0 3px 0 #38bdf8;
}

.tab-hari-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #38bdf8;
}

.tab-hari-btn.aktif {
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 3px 0 #0369a1;
}

/* Empty State */
.empty-state-card {
  background: #ffffff;
  border: 3px dashed #7dd3fc;
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--bayangan-lembut);
}

.empty-maskot {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.empty-state-card h3 {
  font-family: var(--font-judul);
  font-size: 1.4rem;
  color: var(--teks);
  margin-bottom: 0.35rem;
}

.empty-state-card p {
  color: var(--teks-pudar);
  font-weight: 600;
}

/* ==========================================================================
   SCHEDULE DAY GROUPS (WARNA-WARNI CERIA)
   ========================================================================== */
.wadah-semua-grup {
  display: grid;
  gap: 1.65rem;
  min-width: 0;
}

.grup-jadwal-hari {
  --hari-accent: #0ea5e9;
  --hari-accent-dark: #0284c7;
  --hari-soft: #f0f9ff;
  --hari-border: #bae6fd;

  background: rgba(255, 255, 255, 0.94);
  border: 2.5px solid var(--hari-border);
  border-radius: var(--radius-lg);
  padding: 1.05rem;
  box-shadow: 0 5px 0 var(--hari-border), 0 10px 22px rgba(15, 23, 42, 0.06);
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 30rem) {
  .grup-jadwal-hari { padding: 1.3rem; }
}

.grup-jadwal-hari[data-hari-index="1"] {
  --hari-accent: #10b981;
  --hari-accent-dark: #059669;
  --hari-soft: #ecfdf5;
  --hari-border: #a7f3d0;
}

.grup-jadwal-hari[data-hari-index="2"] {
  --hari-accent: #0ea5e9;
  --hari-accent-dark: #0284c7;
  --hari-soft: #f0f9ff;
  --hari-border: #bae6fd;
}

.grup-jadwal-hari[data-hari-index="3"] {
  --hari-accent: #f97316;
  --hari-accent-dark: #ea580c;
  --hari-soft: #fff7ed;
  --hari-border: #fed7aa;
}

.grup-jadwal-hari[data-hari-index="4"] {
  --hari-accent: #f43f5e;
  --hari-accent-dark: #e11d48;
  --hari-soft: #fff1f2;
  --hari-border: #fecdd3;
}

.grup-jadwal-hari[data-hari-index="5"] {
  --hari-accent: #a855f7;
  --hari-accent-dark: #7e22ce;
  --hari-soft: #faf5ff;
  --hari-border: #e9d5ff;
}

.grup-jadwal-hari[data-hari-index="6"] {
  --hari-accent: #06b6d4;
  --hari-accent-dark: #0891b2;
  --hari-soft: #ecfeff;
  --hari-border: #a5f3fc;
}

.grup-header-bar {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
  padding: 0.65rem 0.9rem;
  background: var(--hari-soft);
  border: 2px solid var(--hari-border);
  border-radius: var(--radius-md);
}

@media (min-width: 32rem) {
  .grup-header-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.grup-header-kiri {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.badge-hari-nomor {
  font-family: var(--font-judul);
  font-size: 0.88rem;
  font-weight: 700;
  background: var(--hari-accent);
  color: #ffffff;
  padding: 0.28rem 0.85rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 var(--hari-accent-dark);
  letter-spacing: 0.02em;
}

.grup-tanggal-judul {
  font-family: var(--font-judul);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teks);
}

.grup-jumlah-mapel {
  font-family: var(--font-judul);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--hari-accent-dark);
  background: #ffffff;
  border: 1.5px solid var(--hari-border);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  align-self: flex-start;
}

/* ==========================================================================
   SUBJECT CARDS GRID (TACTILE 3D & COLOR-THEMED)
   ========================================================================== */
.daftar-mapel {
  display: grid;
  gap: 1.15rem;
  min-width: 0;
}

@media (min-width: 38rem) {
  .daftar-mapel {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kartu-mapel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.15rem;
  background: linear-gradient(160deg, #ffffff 0%, var(--tema-bg) 100%);
  color: var(--teks);
  border: 2.5px solid var(--tema-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 5px 0 var(--tema-shadow), 0 10px 18px rgba(15, 23, 42, 0.06);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s ease;
  text-decoration: none;
  font-family: inherit;
  min-width: 0;
  max-width: 100%;
}

.kartu-mapel:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 0 var(--tema-shadow), 0 16px 26px rgba(15, 23, 42, 0.1);
}

.kartu-mapel:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--tema-shadow);
}

.kartu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.kartu-ikon-wrap {
  width: 3.75rem;
  height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.kartu-mapel:hover .kartu-ikon-wrap {
  transform: scale(1.12) rotate(-4deg);
}

.kartu-tag {
  font-family: var(--font-judul);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.28rem 0.72rem;
  border-radius: var(--radius-pill);
  background: var(--tema-tag-bg);
  color: var(--tema-tag-text);
  border: 1.5px solid var(--tema-border);
}

.kartu-konten strong {
  display: block;
  font-family: var(--font-judul);
  font-size: 1.4rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.kartu-meta-info {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 1.05rem;
}

.kartu-info-item {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--teks-pudar);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.info-icon { font-size: 0.98rem; }

.kartu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.85rem;
  border-top: 2px dashed var(--tema-border);
  font-size: 0.9rem;
}

.badge-riwayat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  background: #ffffff;
  border: 1.5px solid #fbbf24;
  color: #92400e;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.84rem;
}

.riwayat-skor-teks strong {
  display: inline;
  font-family: var(--font-judul);
  font-size: 0.92rem;
  margin: 0;
  color: #b45309;
}

.badge-siap {
  font-family: var(--font-judul);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tema-tag-text);
  background: rgba(255, 255, 255, 0.82);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1.5px dashed var(--tema-border);
}

.kartu-aksi {
  font-family: var(--font-judul);
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
  background: var(--tema-accent);
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 var(--tema-accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: transform 0.15s ease;
}

.kartu-mapel:hover .kartu-aksi {
  transform: translateX(3px);
}

/* ==========================================================================
   SISTEM BINTANG (1–3 ⭐)
   ========================================================================== */
.bintang-row {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  vertical-align: middle;
}

.bintang-lg {
  gap: 0.45rem;
}

.bintang-svg {
  display: block;
}

.bintang-lg .bintang-terisi {
  filter: drop-shadow(0 4px 6px rgba(245, 158, 11, 0.35));
  animation: star-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: calc(var(--star-idx, 0) * 140ms);
}

@keyframes star-pop {
  0% { transform: scale(0) rotate(-35deg); opacity: 0; }
  75% { transform: scale(1.22) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ==========================================================================
   QUIZ VIEW TOP HEADER (THEMED PER MAPEL)
   ========================================================================== */
.quiz-top-header {
  background: linear-gradient(135deg, #ffffff 0%, var(--tema-bg) 100%);
  border: 3px solid var(--tema-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: 0 5px 0 var(--tema-shadow);
}

@media (min-width: 34rem) {
  .quiz-top-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.btn-back-header {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.05rem;
  background: #ffffff;
  color: var(--teks);
  border: 2px solid var(--tema-border);
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 var(--tema-border);
  font-family: var(--font-judul);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-back-header:hover {
  background: var(--tema-bg-2);
}

.btn-back-header:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--tema-border);
}

.header-mapel-info {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.header-ikon-wrap {
  width: 3.75rem;
  height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.header-mapel-tag {
  display: inline-block;
  font-family: var(--font-judul);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--tema-tag-bg);
  color: var(--tema-tag-text);
  margin-bottom: 0.2rem;
}

.header-teks h2 {
  font-family: var(--font-judul);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
  line-height: 1.2;
}

.header-teks .jadwal {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--teks-pudar);
  margin: 0.2rem 0 0;
}

/* ==========================================================================
   STICKY ROCKET PROGRESS TOOLBAR & MODE SWITCHER
   ========================================================================== */
.sticky-progress-bar {
  position: sticky;
  top: 0.65rem;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2.5px solid var(--tema-border);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.05rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 5px 0 var(--tema-border), 0 12px 24px rgba(15, 23, 42, 0.08);
}

.progress-info-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.7rem;
}

.progress-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.progres-teks-status {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teks);
}

.progres-persen {
  font-family: var(--font-judul);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--tema-tag-text);
  background: var(--tema-tag-bg);
  border: 1.5px solid var(--tema-border);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
}

.toolbar-actions-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-mode-toggle,
.btn-toggle-drawer {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-judul);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.42rem 0.85rem;
  background: #f8fafc;
  color: var(--teks);
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 #cbd5e1;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.btn-mode-toggle:hover,
.btn-toggle-drawer:hover {
  background: var(--tema-bg);
  border-color: var(--tema-border);
  box-shadow: 0 3px 0 var(--tema-shadow);
}

.btn-mode-toggle:active,
.btn-toggle-drawer:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--tema-shadow);
}

.btn-mode-toggle.mode-scroll-aktif,
.btn-toggle-drawer.aktif {
  background: var(--tema-accent);
  color: #ffffff;
  border-color: var(--tema-accent-dark);
  box-shadow: 0 3px 0 var(--tema-accent-dark);
}

/* Rocket Progress Track */
.progress-track-wrap {
  position: relative;
  padding: 0.25rem 0;
}

.progress-track {
  height: 1.15rem;
  background: #e2e8f0;
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 2px solid #cbd5e1;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.08);
}

.progress-fill {
  height: 100%;
  background-color: var(--sukses);
  background-image: repeating-linear-gradient(
    -45deg,
    #4ade80,
    #4ade80 12px,
    #22c55e 12px,
    #22c55e 24px
  );
  background-size: 34px 34px;
  border-radius: var(--radius-pill);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  animation: candy-scroll 1.6s linear infinite;
}

@keyframes candy-scroll {
  from { background-position: 0 0; }
  to { background-position: 34px 0; }
}

.progress-rocket {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -52%);
  font-size: 1.45rem;
  line-height: 1;
  transition: left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 3px 4px rgba(15, 23, 42, 0.18));
  pointer-events: none;
  animation: rocket-bob 1.5s ease-in-out infinite alternate;
}

@keyframes rocket-bob {
  from { transform: translate(-50%, -56%) rotate(-6deg); }
  to { transform: translate(-50%, -46%) rotate(4deg); }
}

.progress-semangat {
  margin-top: 0.45rem;
  font-family: var(--font-judul);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tema-tag-text);
  text-align: center;
}

/* Palette Drawer inside sticky bar */
.drawer-palette {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), margin-top 0.25s ease;
}

.drawer-palette.buka {
  max-height: 28rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 2px dashed var(--tema-border);
}

.palette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.palette-judul {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-judul);
  font-size: 0.98rem;
  font-weight: 700;
}

.palette-progres-teks {
  font-size: 0.85rem;
  color: #0369a1;
  background: #e0f2fe;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  margin-left: 0.25rem;
}

.btn-palette-toggle { display: none; }

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.55rem, 1fr));
  gap: 0.5rem;
}

.palette-btn {
  height: 2.5rem;
  font-family: var(--font-judul);
  font-size: 0.95rem;
  font-weight: 700;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--teks);
  box-shadow: 0 3px 0 #cbd5e1;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.palette-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.palette-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #cbd5e1;
}

.palette-btn.pal-aktif {
  border-color: #f59e0b;
  box-shadow: 0 3px 0 #d97706, 0 0 0 3px rgba(251, 191, 36, 0.35);
  background: #fef9c3;
  color: #92400e;
}

.palette-btn.pal-terjawab {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary-hover);
  box-shadow: 0 3px 0 var(--primary-shadow);
}

.palette-btn.pal-benar {
  background: var(--sukses);
  color: #ffffff;
  border-color: var(--sukses-hover);
  box-shadow: 0 3px 0 var(--sukses-shadow);
}

.palette-btn.pal-salah {
  background: var(--bahaya);
  color: #ffffff;
  border-color: var(--bahaya-hover);
  box-shadow: 0 3px 0 var(--bahaya-shadow);
}

.palette-btn.pal-guru {
  background: var(--peringatan);
  color: #ffffff;
  border-color: #d97706;
  box-shadow: 0 3px 0 #b45309;
}

/* ==========================================================================
   QUESTION CARDS (.soal) & STEP-BY-STEP MODE
   ========================================================================== */
.form-kuis-aktif.mode-step .soal {
  display: none;
}

.form-kuis-aktif.mode-step .soal.soal-aktif {
  display: block;
  animation: slide-soal-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slide-soal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.soal {
  margin: 0 0 1.5rem;
  padding: 1.45rem 1.45rem 1.7rem;
  background: #ffffff;
  border: 3px solid var(--tema-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 0 var(--tema-border), 0 12px 24px rgba(15, 23, 42, 0.06);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.soal.highlight-soal {
  border-color: #fbbf24;
  box-shadow: 0 6px 0 #f59e0b, 0 0 0 5px rgba(251, 191, 36, 0.32);
}

.soal legend {
  padding: 0 0.5rem;
  margin-bottom: 0.45rem;
}

.legend-content {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.soal-nomor-chip {
  font-family: var(--font-judul);
  font-size: 1rem;
  font-weight: 700;
  background: var(--tema-accent);
  color: #ffffff;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 var(--tema-accent-dark);
}

.badge-bentuk {
  font-family: var(--font-judul);
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--tema-tag-bg);
  color: var(--tema-tag-text);
  padding: 0.24rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--tema-border);
}

.soal-materi-teks {
  font-size: 0.9rem;
  color: var(--teks-pudar);
  font-weight: 700;
}

.pertanyaan-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 0.85rem 0 1.35rem;
  padding: 1rem 1.15rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
}

@media (min-width: 34rem) {
  .pertanyaan-row {
    flex-direction: row;
    align-items: center;
  }
}

.pertanyaan {
  font-size: 1.28rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.55;
  flex: 1;
}

/* Tombol TTS "Dengar Soal" Besar & Mencolok untuk Anak */
.btn-tts {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.15rem;
  min-height: 3rem;
  background: linear-gradient(180deg, #fef08a 0%, #fbbf24 100%);
  border: 2.5px solid #f59e0b;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 0 #d97706;
  font-family: var(--font-judul);
  font-size: 0.98rem;
  font-weight: 700;
  color: #78350f;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
}

.tts-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.btn-tts:hover {
  filter: brightness(1.04);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #d97706;
}

.btn-tts:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #d97706;
}

.btn-tts.sedang-baca {
  background: linear-gradient(180deg, #fb7185 0%, #f43f5e 100%);
  border-color: #e11d48;
  box-shadow: 0 4px 0 #be123c, 0 0 0 5px rgba(244, 63, 94, 0.25);
  color: #ffffff;
  animation: pulse-tts 1.1s ease-in-out infinite;
}

@keyframes pulse-tts {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.petunjuk-tipe {
  font-size: 0.98rem;
  font-weight: 700;
  color: #075985;
  margin-bottom: 0.85rem;
  background: #e0f2fe;
  padding: 0.6rem 0.95rem;
  border-radius: var(--radius-md);
  border: 2px solid #7dd3fc;
}

/* ==========================================================================
   INTERACTIVE 3D COLORFUL OPTION CARDS (PG & PG KOMPLEKS)
   ========================================================================== */
.pilihan {
  display: grid;
  gap: 0.85rem;
}

.opsi {
  --opsi-accent: #0ea5e9;
  --opsi-dark: #0284c7;
  --opsi-soft: #e0f2fe;
  --opsi-ink: #075985;

  position: relative;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.95rem 1.2rem;
  border: 2.5px solid #dbe6f3;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: 0 4px 0 #cbd8e8;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.15s ease, background 0.15s ease;
  min-height: 4rem;
}

/* 4 Warna Ceria untuk Pilihan A, B, C, D */
.opsi-warna-0 {
  --opsi-accent: #f43f5e;
  --opsi-dark: #e11d48;
  --opsi-soft: #ffe4e6;
  --opsi-ink: #9f1239;
}

.opsi-warna-1 {
  --opsi-accent: #0ea5e9;
  --opsi-dark: #0284c7;
  --opsi-soft: #e0f2fe;
  --opsi-ink: #075985;
}

.opsi-warna-2 {
  --opsi-accent: #f59e0b;
  --opsi-dark: #d97706;
  --opsi-soft: #fef3c7;
  --opsi-ink: #92400e;
}

.opsi-warna-3 {
  --opsi-accent: #22c55e;
  --opsi-dark: #16a34a;
  --opsi-soft: #dcfce7;
  --opsi-ink: #166534;
}

.opsi:hover {
  border-color: var(--opsi-accent);
  background: var(--opsi-soft);
  box-shadow: 0 5px 0 var(--opsi-accent);
  transform: translateY(-2px);
}

.opsi:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--opsi-dark);
}

.opsi input[type="radio"],
.opsi input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.badge-huruf {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  border: 2.5px solid var(--opsi-accent);
  background: var(--opsi-soft);
  color: var(--opsi-ink);
  font-family: var(--font-judul);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.opsi-checkbox .badge-huruf {
  border-radius: 0.7rem;
}

.opsi-teks {
  font-size: 1.16rem;
  font-weight: 700;
  color: #0f172a;
  flex: 1;
}

.opsi-cek {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--opsi-accent);
  color: #ffffff;
  font-family: var(--font-judul);
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

/* Selected / Checked State */
.opsi:has(input:checked) {
  border-color: var(--opsi-accent);
  background: var(--opsi-soft);
  box-shadow: 0 5px 0 var(--opsi-dark);
}

.opsi:has(input:checked) .badge-huruf {
  background: var(--opsi-accent);
  border-color: var(--opsi-dark);
  color: #ffffff;
  transform: scale(1.1);
}

.opsi:has(input:checked) .opsi-cek {
  opacity: 1;
  transform: scale(1);
}

.opsi-pop {
  animation: opsi-bounce 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes opsi-bounce {
  0% { transform: scale(1); }
  45% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* Percikan bintang mengambang saat memilih jawaban */
.sparkle-float {
  position: fixed;
  z-index: 9999;
  font-size: 1.5rem;
  pointer-events: none;
  animation: sparkle-rise 0.65s ease-out forwards;
}

@keyframes sparkle-rise {
  0% { opacity: 1; transform: translateY(0) scale(0.7) rotate(0deg); }
  50% { opacity: 1; transform: translateY(-20px) scale(1.25) rotate(18deg); }
  100% { opacity: 0; transform: translateY(-42px) scale(0.9) rotate(36deg); }
}

/* ==========================================================================
   BENAR - SALAH ROWS (CHUNKY 3D PILLS)
   ========================================================================== */
.pernyataan {
  display: grid;
  gap: 0.75rem;
}

.baris-pernyataan {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border: 2px solid #dbe6f3;
  border-radius: var(--radius-md);
}

@media (min-width: 34rem) {
  .baris-pernyataan {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.teks-pernyataan {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teks);
  flex: 1;
}

.opsi-bs-container {
  display: flex;
  gap: 0.6rem;
  width: 100%;
}

@media (min-width: 34rem) {
  .opsi-bs-container { width: auto; }
}

.opsi-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.9rem;
  min-height: 3rem;
  flex: 1;
  min-width: 0;
  border: 2.5px solid #cbd5e1;
  border-radius: var(--radius-pill);
  background: #ffffff;
  box-shadow: 0 4px 0 #cbd5e1;
  font-family: var(--font-judul);
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

@media (min-width: 34rem) {
  .opsi-inline {
    flex: 0 0 auto;
    min-width: 6.8rem;
    padding: 0.6rem 1.1rem;
  }
}

.opsi-inline input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.opsi-inline:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #cbd5e1;
}

.opsi-benar:hover {
  border-color: var(--sukses);
  background: var(--sukses-light);
  box-shadow: 0 4px 0 var(--sukses);
}
.opsi-benar:has(input:checked) {
  background: var(--sukses);
  border-color: var(--sukses-hover);
  box-shadow: 0 4px 0 var(--sukses-shadow);
  color: #ffffff;
}

.opsi-salah:hover {
  border-color: var(--bahaya);
  background: var(--bahaya-light);
  box-shadow: 0 4px 0 var(--bahaya);
}
.opsi-salah:has(input:checked) {
  background: var(--bahaya);
  border-color: var(--bahaya-hover);
  box-shadow: 0 4px 0 var(--bahaya-shadow);
  color: #ffffff;
}

/* ==========================================================================
   MENJODOHKAN / SELECT (PUZZLE STYLE)
   ========================================================================== */
.jodohkan {
  display: grid;
  gap: 0.8rem;
}

.baris-jodohkan {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.95rem 1.1rem;
  background: #f8fafc;
  border: 2px solid #dbe6f3;
  border-radius: var(--radius-md);
}

@media (min-width: 34rem) {
  .baris-jodohkan {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.jodoh-kiri {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--teks);
  flex: 1;
}

.jodoh-nomor {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--tema-accent);
  color: #ffffff;
  font-family: var(--font-judul);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.jodoh-panah {
  color: var(--tema-accent);
  font-size: 1.2rem;
  font-weight: 800;
  display: none;
}

@media (min-width: 34rem) {
  .jodoh-panah { display: inline-block; margin: 0 0.45rem; }
}

.select-jodoh {
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  padding: 0.72rem 1rem;
  min-height: 3.1rem;
  border: 2.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--teks);
  box-shadow: 0 3px 0 #cbd5e1;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  min-width: 0;
}

@media (min-width: 34rem) {
  .select-jodoh {
    width: auto;
    min-width: 14.5rem;
  }
}

.select-jodoh:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ==========================================================================
   ISIAN & TEXT INPUTS
   ========================================================================== */
.isian {
  display: grid;
  gap: 0.6rem;
}

.label-isian-teks {
  font-family: var(--font-judul);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teks-pudar);
}

.input-isian {
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.95rem 1.25rem;
  min-height: 3.6rem;
  border: 2.5px solid #7dd3fc;
  border-radius: var(--radius-md);
  background: #f8fafc;
  color: #0f172a;
  box-shadow: inset 0 2px 5px rgba(14, 165, 233, 0.08);
  transition: all 0.2s ease;
  width: 100%;
  min-width: 0;
}

.input-isian:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* ==========================================================================
   BADGE GURU / MANUAL
   ========================================================================== */
.badge-guru {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.5rem 0 0;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  background: var(--peringatan-light);
  color: var(--peringatan-teks);
  border: 2px solid #fcd34d;
  font-family: var(--font-judul);
  font-size: 0.98rem;
  font-weight: 600;
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR (TACTILE 3D SEBELUMNYA / SELANJUTNYA)
   ========================================================================== */
.kuis-nav-bawah {
  background: #ffffff;
  border: 2.5px solid var(--tema-border);
  border-radius: var(--radius-lg);
  padding: 0.95rem 1.05rem;
  margin-top: 1rem;
  box-shadow: 0 5px 0 var(--tema-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  align-items: center;
}

.nav-indikator-tengah {
  grid-column: 1 / -1;
  order: -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 0.45rem;
  border-bottom: 2px dashed #e2e8f0;
}

.btn-nav-soal {
  font-family: var(--font-judul);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 2.5px solid #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
  min-height: 3.25rem;
  width: 100%;
  min-width: 0;
}

@media (min-width: 36rem) {
  .kuis-nav-bawah {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
  }

  .nav-indikator-tengah {
    order: 0;
    padding-bottom: 0;
    border-bottom: none;
  }

  .btn-nav-soal {
    width: auto;
    font-size: 1.1rem;
    padding: 0.8rem 1.45rem;
    min-height: 3.45rem;
  }
}

.btn-nav-prev {
  background: #ffffff;
  color: var(--teks);
  border-color: #cbd5e1;
  box-shadow: 0 4px 0 #cbd5e1;
}

.btn-nav-prev:hover:not(:disabled) {
  background: #f0f9ff;
  border-color: #7dd3fc;
  box-shadow: 0 4px 0 #38bdf8;
}

.btn-nav-prev:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #38bdf8;
}

.btn-nav-prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn-nav-next {
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 0 #0369a1;
}

.btn-nav-next:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #0369a1;
}

.btn-nav-next:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #0369a1;
}

.btn-nav-submit {
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  border-color: #16a34a;
  color: #ffffff;
  box-shadow: 0 4px 0 #15803d;
}

.btn-nav-submit:hover {
  filter: brightness(1.04);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #15803d;
}

.btn-nav-submit:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #15803d;
}

.nav-soal-posisi {
  font-family: var(--font-judul);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teks);
}

.nav-soal-posisi strong {
  font-size: 1.2rem;
  color: var(--tema-accent-dark);
}

.nav-hint-keyboard {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teks-pudar);
  display: none;
}

@media (min-width: 36rem) {
  .nav-hint-keyboard { display: block; }
}

/* Submit Card for Scroll Mode */
.form-kuis-aktif.mode-step .submit-card-scroll {
  display: none;
}

.submit-action-card {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(145deg, #ffffff 0%, #fefce8 100%);
  border: 3px solid #fcd34d;
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 0 #f59e0b;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.submit-info-box {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.submit-info-icon {
  font-size: 1.85rem;
  background: #fef3c7;
  border: 2px solid #fcd34d;
  border-radius: var(--radius-md);
  padding: 0.3rem 0.55rem;
}

.submit-info-box strong {
  display: block;
  font-family: var(--font-judul);
  font-size: 1.2rem;
  color: var(--teks);
}

.submit-info-box p {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--teks-pudar);
  margin-top: 0.15rem;
}

.utama {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 1.1rem 1.5rem;
  font-family: var(--font-judul);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  border: 2.5px solid #16a34a;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 5px 0 #15803d;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
}

.utama:hover {
  filter: brightness(1.04);
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #15803d;
}

.utama:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #15803d;
}

/* ==========================================================================
   HASIL & SCORE CELEBRATION SECTION
   ========================================================================== */
.hasil {
  margin-top: 1.5rem;
  padding: 2rem 1.5rem;
  background: #ffffff;
  border: 3px solid #7dd3fc;
  border-radius: var(--radius-lg);
  box-shadow: 0 7px 0 #7dd3fc, 0 18px 36px rgba(15, 23, 42, 0.1);
  text-align: center;
}

.hasil.skor-sempurna {
  background: linear-gradient(160deg, #ffffff 0%, #fef9c3 65%, #fde68a 100%);
  border-color: #fbbf24;
  box-shadow: 0 7px 0 #f59e0b, 0 18px 36px rgba(245, 158, 11, 0.18);
}

.hasil.skor-sangat-baik {
  background: linear-gradient(160deg, #ffffff 0%, #dcfce7 65%, #e0f2fe 100%);
  border-color: #4ade80;
  box-shadow: 0 7px 0 #22c55e, 0 18px 36px rgba(34, 197, 94, 0.16);
}

.hasil.skor-baik {
  background: linear-gradient(160deg, #ffffff 0%, #e0f2fe 65%, #f3e8ff 100%);
  border-color: #38bdf8;
  box-shadow: 0 7px 0 #0ea5e9, 0 18px 36px rgba(14, 165, 233, 0.15);
}

.hasil.skor-perlu-latihan {
  background: linear-gradient(160deg, #ffffff 0%, #fff7ed 65%, #ffe4e6 100%);
  border-color: #fdba74;
  box-shadow: 0 7px 0 #fb923c, 0 18px 36px rgba(249, 115, 22, 0.14);
}

.hasil-hero {
  margin-bottom: 1.75rem;
}

.hasil-maskot-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7.25rem;
  height: 7.25rem;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #fbbf24;
  box-shadow: 0 5px 0 #f59e0b;
  margin-bottom: 0.9rem;
}

.hasil-bintang-wrap {
  margin-bottom: 0.65rem;
}

.hasil-ucapan {
  font-family: var(--font-judul);
  font-size: 2.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0.25rem 0 0.35rem;
}

.hasil-subucapan {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--teks-pudar);
  max-width: 30rem;
  margin: 0 auto 1.4rem;
}

.lingkaran-skor {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 50%;
  background: #ffffff;
  border: 5px solid var(--primary);
  box-shadow: 0 6px 0 var(--primary-hover), 0 0 0 7px rgba(14, 165, 233, 0.16);
  margin-bottom: 0.5rem;
}

.skor-sempurna .lingkaran-skor {
  border-color: #f59e0b;
  box-shadow: 0 6px 0 #d97706, 0 0 0 7px rgba(251, 191, 36, 0.25);
}
.skor-sempurna .skor { color: #d97706; }

.skor-sangat-baik .lingkaran-skor {
  border-color: #22c55e;
  box-shadow: 0 6px 0 #16a34a, 0 0 0 7px rgba(34, 197, 94, 0.22);
}
.skor-sangat-baik .skor { color: #16a34a; }

.skor-perlu-latihan .lingkaran-skor {
  border-color: #f97316;
  box-shadow: 0 6px 0 #ea580c, 0 0 0 7px rgba(249, 115, 22, 0.2);
}
.skor-perlu-latihan .skor { color: #ea580c; }

.skor {
  font-family: var(--font-judul);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--primary-hover);
  line-height: 1;
}

.skor-label {
  font-family: var(--font-judul);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--teks-pudar);
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Stats Grid */
.hasil-grid-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}

@media (min-width: 34rem) {
  .hasil-grid-stats {
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  }
}

.stat-kotak {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.75rem;
  border-radius: var(--radius-md);
  border: 2.5px solid var(--garis);
  background: #ffffff;
}

.stat-kotak.stat-benar {
  background: #dcfce7;
  border-color: #4ade80;
  box-shadow: 0 4px 0 #22c55e;
  color: #166534;
}
.stat-kotak.stat-salah {
  background: #ffe4e6;
  border-color: #fda4af;
  box-shadow: 0 4px 0 #fb7185;
  color: #9f1239;
}
.stat-kotak.stat-total {
  background: #e0f2fe;
  border-color: #7dd3fc;
  box-shadow: 0 4px 0 #38bdf8;
  color: #075985;
}
.stat-kotak.stat-guru {
  background: #fef3c7;
  border-color: #fcd34d;
  box-shadow: 0 4px 0 #f59e0b;
  color: #92400e;
}

.stat-ikon { font-size: 1.45rem; margin-bottom: 0.2rem; }
.stat-nilai { font-family: var(--font-judul); font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.stat-nama { font-family: var(--font-judul); font-size: 0.84rem; font-weight: 600; }

.catatan-kelulusan {
  margin-bottom: 1.65rem;
  color: var(--teks);
  font-size: 1.05rem;
  font-weight: 700;
}

/* Action Buttons (Tactile 3D) */
.hasil-aksi-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 32rem) {
  .hasil-aksi-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

.btn-aksi {
  padding: 0.9rem 1.25rem;
  min-height: 3.35rem;
  font-family: var(--font-judul);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: 2.5px solid #cbd5e1;
  background: #ffffff;
  color: var(--teks);
  box-shadow: 0 4px 0 #cbd5e1;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-aksi:hover {
  background: #f0f9ff;
  border-color: #7dd3fc;
  box-shadow: 0 4px 0 #38bdf8;
  transform: translateY(-2px);
}

.btn-aksi:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #38bdf8;
}

.btn-coba-lagi {
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  border-color: #0284c7;
  box-shadow: 0 4px 0 #0369a1;
  color: #ffffff;
}

.btn-coba-lagi:hover {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  border-color: #0369a1;
  box-shadow: 0 5px 0 #075985;
}

/* Filter Pembahasan Bar */
.filter-pembahasan-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 2px dashed rgba(15, 23, 42, 0.12);
}

.filter-label {
  font-family: var(--font-judul);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--teks);
}

.filter-tombol-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.btn-filter {
  padding: 0.5rem 1rem;
  font-family: var(--font-judul);
  font-size: 0.92rem;
  font-weight: 600;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--teks-pudar);
  box-shadow: 0 3px 0 #cbd5e1;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-filter.aktif {
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%);
  border-color: #0284c7;
  box-shadow: 0 3px 0 #0369a1;
  color: #ffffff;
}

.btn-filter:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0369a1;
}

/* ==========================================================================
   REVIEW / PEMBAHASAN MODE STYLING
   ========================================================================== */
.review-wrapper {
  margin-top: 2rem;
}

.review-nav-bar {
  background: #ffffff;
  border: 2.5px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 5px 0 #bae6fd;
}

.soal-review {
  margin-bottom: 1.5rem;
}

.review-benar {
  border-color: #4ade80;
  background: #f0fdf4;
  box-shadow: 0 5px 0 #4ade80;
}

.review-salah {
  border-color: #fda4af;
  background: #fff1f2;
  box-shadow: 0 5px 0 #fda4af;
}

.review-guru {
  border-color: #fcd34d;
  background: #fffbeb;
  box-shadow: 0 5px 0 #fcd34d;
}

.review-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px dashed rgba(15, 23, 42, 0.1);
}

.status-chip {
  font-family: var(--font-judul);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
}

.chip-benar { background: #dcfce7; color: #166534; border: 1.5px solid #4ade80; }
.chip-salah { background: #ffe4e6; color: #9f1239; border: 1.5px solid #fda4af; }
.chip-guru { background: #fef3c7; color: #92400e; border: 1.5px solid #fcd34d; }

.review-opsi {
  pointer-events: none;
  box-shadow: none;
}

.opsi-kunci-benar {
  border-color: var(--sukses);
  background: #dcfce7;
}

.opsi-kunci-benar .badge-huruf {
  background: var(--sukses);
  border-color: var(--sukses-hover);
  color: #ffffff;
}

.opsi-dipilih-salah {
  border-color: var(--bahaya);
  background: #ffe4e6;
}

.opsi-dipilih-salah .badge-huruf {
  background: var(--bahaya);
  border-color: var(--bahaya-hover);
  color: #ffffff;
}

.opsi-flag {
  font-family: var(--font-judul);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.24rem 0.65rem;
  border-radius: var(--radius-pill);
  margin-left: auto;
}

.kunci-flag { background: var(--sukses); color: #ffffff; }
.salah-flag { background: var(--bahaya); color: #ffffff; }

.keterangan-bs,
.jodoh-komparasi {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  font-size: 0.95rem;
}

.bs-cocok, .jodoh-cocok {
  background: #dcfce7;
  border-color: #4ade80;
}

.bs-salah, .jodoh-salah {
  background: #ffe4e6;
  border-color: #fda4af;
}

/* Review Isian */
.review-isian-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--garis);
  display: grid;
  gap: 0.5rem;
}

.isian-cocok { background: #dcfce7; border-color: #4ade80; }
.isian-salah { background: #ffe4e6; border-color: #fda4af; }

.isian-baris {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

@media (min-width: 30rem) {
  .isian-baris {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
}

.isian-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teks-pudar);
}

/* ==========================================================================
   CONFIRMATION MODAL (PLAYFUL & FRIENDLY)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 9999;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.85rem 1.65rem;
  max-width: 26rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 7px 0 #7dd3fc, 0 22px 42px rgba(15, 23, 42, 0.24);
  border: 3px solid #7dd3fc;
  animation: scale-up 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scale-up {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-ikon {
  font-size: 3rem;
  margin-bottom: 0.65rem;
}

.modal-judul {
  font-family: var(--font-judul);
  font-size: 1.55rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.45rem;
}

.modal-subjudul {
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--teks-pudar);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
}

.modal-btn {
  flex: 1;
  padding: 0.85rem 1rem;
  font-family: var(--font-judul);
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-batal {
  background: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: 0 4px 0 #cbd5e1;
  color: var(--teks);
}

.btn-batal:hover {
  background: #e2e8f0;
}

.btn-batal:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #cbd5e1;
}

.btn-bahaya {
  background: linear-gradient(180deg, #fb7185 0%, #f43f5e 100%);
  border-color: #e11d48;
  box-shadow: 0 4px 0 #be123c;
  color: #ffffff;
}

.btn-bahaya:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #be123c;
}

/* ==========================================================================
   TAB PINDAH MATERI BELAJAR ↔ LATIHAN SOAL
   ========================================================================== */
.mapel-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  max-width: 100%;
}

.mapel-tab-btn {
  font-family: var(--font-judul);
  font-size: 0.98rem;
  font-weight: 700;
  padding: 0.78rem 0.9rem;
  min-height: 3.3rem;
  border-radius: var(--radius-pill);
  border: 2.5px solid #cbd5e1;
  background: #ffffff;
  color: var(--teks-pudar);
  box-shadow: 0 4px 0 #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, color 0.15s ease;
  min-width: 0;
}

.mapel-tab-btn:hover {
  background: var(--tema-bg);
  border-color: var(--tema-border);
  box-shadow: 0 4px 0 var(--tema-shadow);
  color: var(--tema-tag-text);
}

.mapel-tab-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--tema-shadow);
}

.mapel-tab-btn.aktif {
  background: var(--tema-accent);
  border-color: var(--tema-accent-dark);
  box-shadow: 0 4px 0 var(--tema-accent-dark);
  color: #ffffff;
}

.tab-ikon { font-size: 1.15rem; }

/* ==========================================================================
   HALAMAN MATERI BELAJAR INTERAKTIF
   ========================================================================== */
.materi-container {
  display: grid;
  gap: 1.35rem;
  min-width: 0;
}

.materi-intro-card {
  background: linear-gradient(145deg, #ffffff 0%, var(--tema-bg) 75%, #fefce8 100%);
  border: 3px solid var(--tema-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 6px 0 var(--tema-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

@media (min-width: 38rem) {
  .materi-intro-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.35rem 1.5rem;
  }
}

.materi-intro-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.materi-maskot-mini {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--tema-border);
  box-shadow: 0 4px 0 var(--tema-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.materi-maskot-mini .maskot-svg {
  width: 4.4rem;
  height: 4.4rem;
}

.materi-intro-teks {
  flex: 1;
  min-width: 0;
}

.materi-progres-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-judul);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.25rem 0.78rem;
  border-radius: var(--radius-pill);
  background: #dcfce7;
  color: #166534;
  border: 2px solid #4ade80;
  margin-bottom: 0.45rem;
}

.materi-sapaan {
  font-size: 1.04rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.45;
}

.btn-mulai-kuis-atas {
  font-family: var(--font-judul);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.8rem 1.25rem;
  min-height: 3.25rem;
  border-radius: var(--radius-pill);
  border: 2.5px solid #16a34a;
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  color: #ffffff;
  box-shadow: 0 4px 0 #15803d;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
  flex-shrink: 0;
}

.btn-mulai-kuis-atas:hover {
  filter: brightness(1.04);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #15803d;
}

.btn-mulai-kuis-atas:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #15803d;
}

/* Kartu Bab Materi */
.materi-bab-list {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.materi-bab-card {
  background: #ffffff;
  border: 3px solid var(--tema-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: 0 5px 0 var(--tema-border), 0 10px 22px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-width: 0;
}

.materi-bab-card.bab-paham {
  background: linear-gradient(165deg, #ffffff 0%, #f0fdf4 100%);
  border-color: #4ade80;
  box-shadow: 0 5px 0 #22c55e, 0 10px 22px rgba(34, 197, 94, 0.1);
}

.materi-bab-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px dashed var(--tema-border);
}

@media (min-width: 36rem) {
  .materi-bab-header {
    flex-direction: row;
    align-items: center;
  }
}

.materi-bab-judul-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.materi-bab-ikon {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: var(--radius-md);
  background: var(--tema-bg-2);
  border: 2px solid var(--tema-border);
  box-shadow: 0 3px 0 var(--tema-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.materi-bab-chip {
  display: inline-block;
  font-family: var(--font-judul);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.16rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--tema-accent);
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.materi-bab-judul {
  font-family: var(--font-judul);
  font-size: 1.32rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.materi-ringkasan {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--teks);
  background: var(--tema-bg);
  border: 2px solid var(--tema-bg-2);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.materi-poin-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.materi-poin-item {
  position: relative;
  padding-left: 1.65rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.55;
}

.materi-poin-item::before {
  content: "⭐";
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-size: 0.95rem;
}

/* Contoh & Hafalan Cepat Grid */
.materi-contoh-wrap {
  margin-bottom: 1.1rem;
}

.materi-contoh-label {
  font-family: var(--font-judul);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--tema-tag-text);
  margin-bottom: 0.55rem;
}

.materi-contoh-grid {
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 38rem) {
  .materi-contoh-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.materi-contoh-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  background: #f8fafc;
  border: 2px solid #dbe6f3;
  border-radius: var(--radius-md);
  font-size: 0.96rem;
  font-weight: 700;
}

.contoh-kiri {
  color: var(--tema-tag-text);
  background: var(--tema-tag-bg);
  padding: 0.18rem 0.58rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.contoh-panah {
  color: var(--tema-accent);
  font-weight: 800;
}

.contoh-kanan {
  color: #0f172a;
  font-weight: 700;
  flex: 1;
}

/* Kotak Tips Bibo */
.materi-tips-box {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: #fef9c3;
  border: 2px solid #fbbf24;
  border-radius: var(--radius-md);
  color: #78350f;
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.tips-ikon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Footer Bab & Tombol Sudah Paham */
.materi-bab-footer {
  display: flex;
  justify-content: flex-end;
}

.btn-paham {
  font-family: var(--font-judul);
  font-size: 0.96rem;
  font-weight: 700;
  padding: 0.58rem 1.15rem;
  min-height: 2.85rem;
  border-radius: var(--radius-pill);
  border: 2.5px solid #cbd5e1;
  background: #f8fafc;
  color: var(--teks);
  box-shadow: 0 3px 0 #cbd5e1;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.btn-paham:hover {
  background: #dcfce7;
  border-color: #4ade80;
  box-shadow: 0 3px 0 #22c55e;
  color: #166534;
}

.btn-paham:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #22c55e;
}

.btn-paham.aktif {
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  border-color: #16a34a;
  box-shadow: 0 3px 0 #15803d;
  color: #ffffff;
}

/* Kartu Ajakan Mulai Latihan di Bawah Materi */
.materi-cta-card {
  padding: 1.5rem;
  background: linear-gradient(145deg, #ffffff 0%, #fefce8 60%, #dcfce7 100%);
  border: 3px solid #4ade80;
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 0 #22c55e;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.materi-cta-info {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.materi-cta-ikon {
  font-size: 2.2rem;
  background: #fef9c3;
  border: 2px solid #fbbf24;
  border-radius: var(--radius-md);
  padding: 0.35rem 0.6rem;
  flex-shrink: 0;
}

.materi-cta-info h3 {
  font-family: var(--font-judul);
  font-size: 1.35rem;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.materi-cta-info p {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--teks-pudar);
}

/* ==========================================================================
   REDUCED MOTION ACCESSIBILITY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    padding: 0 !important;
    font-size: 12pt !important;
  }
  body::before,
  .sky-backdrop,
  .app-nav-bar,
  .sticky-progress-bar,
  .kuis-nav-bawah,
  .btn-tts,
  .btn-aksi,
  .filter-pembahasan-bar,
  .tab-hari-container,
  .hero-maskot-kolom,
  .hasil-maskot-wrap,
  .mapel-mode-tabs,
  .btn-paham,
  .btn-mulai-kuis,
  .materi-cta-card {
    display: none !important;
  }
  .hasil, .soal, .materi-bab-card {
    box-shadow: none !important;
    border: 1px solid #000000 !important;
    background: #ffffff !important;
    break-inside: avoid;
  }
}
