:root {
  --bg: #F0F6FF;
  --bg-card: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --navy: #1E3A8A;
  --blue: #2563EB;
  --sky: #0EA5E9;
  --teal: #0D9488;
  --green: #10B981;
  --gold: #F59E0B;
  --gold-dark: #D97706;
  --orange: #F97316;
  --pink: #EC4899;
  --red: #EF4444;
  --border: #CBD5E1;
  --shadow-sm: 0 2px 8px rgba(30, 58, 138, 0.06);
  --shadow-md: 0 6px 20px rgba(30, 58, 138, 0.10);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --font-heading: 'Baloo 2', system-ui, -apple-system, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  touch-action: manipulation;
  overflow-x: hidden;
}

#app {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ── Bilah Atas Responsif ── */
.topbar {
  flex-shrink: 0;
  height: 56px;
  background: #FFFFFF;
  border-bottom: 2px solid #DBEAFE;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--navy);
}

.brand-title {
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.star-counter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FEF3C7;
  color: #92400E;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  border: 1px solid #FDE68A;
}

.star-counter b {
  font-weight: 800;
  color: #78350F;
}

.star-counter small {
  color: #B45309;
  font-size: 0.8rem;
}

.top-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: #F1F5F9;
  border: 1px solid var(--border);
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s;
}

.top-btn:active {
  transform: scale(0.92);
  background: #E2E8F0;
}

.d-desktop {
  display: inline-flex;
}

@media (max-width: 640px) {
  .d-desktop { display: none !important; }
  .topbar { height: 52px; padding: 0 10px; }
  .top-brand { font-size: 1.15rem; }
  .star-counter { padding: 3px 8px; font-size: 0.9rem; }
}

/* ── Isolasi Layar ── */
.screen {
  display: none !important;
  flex: 1;
  padding: 16px 14px 72px;
  position: relative;
  width: 100%;
}

.screen.active {
  display: flex !important;
  flex-direction: column;
}

/* ── Komponen Tombol Taktil 3D ── */
.btn {
  font-family: var(--font-heading);
  font-weight: 800;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s, box-shadow 0.08s;
  min-height: 48px;
  text-decoration: none;
}

.btn:active {
  transform: translateY(3px);
}

.btn-gold {
  background: linear-gradient(180deg, #FBBF24 0%, #F59E0B 100%);
  color: #451A03;
  box-shadow: 0 4px 0 #D97706;
}
.btn-gold:active { box-shadow: 0 1px 0 #D97706; }

.btn-sky {
  background: linear-gradient(180deg, #38BDF8 0%, #0EA5E9 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 0 #0284C7;
}
.btn-sky:active { box-shadow: 0 1px 0 #0284C7; }

.btn-white {
  background: #FFFFFF;
  color: var(--navy);
  border: 2px solid #CBD5E1;
  box-shadow: 0 4px 0 #94A3B8;
}
.btn-white:active { box-shadow: 0 1px 0 #94A3B8; }

.btn-red {
  background: var(--red);
  color: #FFFFFF;
  box-shadow: 0 4px 0 #DC2626;
}
.btn-red:active { box-shadow: 0 1px 0 #DC2626; }

.btn-wide {
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  min-height: 38px;
}

/* ── 1. Beranda (Mobile-First) ── */
.home-container {
  max-width: 960px;
  width: 100%;
  margin: auto;
}

.home-hero {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
  border: 2px solid #DBEAFE;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: center;
}

.hero-art {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.15);
  position: relative;
  background: #F8FAFC;
}

.hero-art img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--green);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 6px;
}

.hero-title .highlight {
  color: var(--pink);
  display: block;
}

.hero-tag {
  display: inline-block;
  align-self: flex-start;
  background: #FEF3C7;
  color: #78350F;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  border: 2px dashed #F59E0B;
  margin-bottom: 12px;
}

.hero-motto {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

.values-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}

.v-pill {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.v-orange { color: var(--orange); background: #FFF7ED; }
.v-teal   { color: var(--teal);   background: #F0FDFA; }
.v-purple { color: #7C3AED;       background: #F5F3FF; }
.v-green  { color: var(--green);  background: #ECFDF5; }

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-main {
  width: 100%;
  font-size: 1.2rem;
  padding: 16px 24px;
  justify-content: space-between;
}

.sub-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 820px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 18px;
    max-width: 460px;
    margin: 0 auto;
  }
  .hero-art {
    max-width: 220px;
    margin: 0 auto;
  }
  .hero-title {
    font-size: 1.7rem;
    text-align: center;
  }
  .hero-tag {
    align-self: center;
    font-size: 1rem;
  }
  .hero-motto {
    text-align: center;
    font-size: 0.88rem;
  }
  .values-bar {
    justify-content: center;
    margin-bottom: 18px;
  }
  .btn-main {
    font-size: 1.1rem;
    padding: 14px 18px;
  }
}

/* ── 2. Peta Misi ── */
.map-wrap {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 18px;
}

.badge-mini {
  display: inline-block;
  background: #E0E7FF;
  color: #3730A3;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.mission-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.mission-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 14px;
  border: 2px solid #E2E8F0;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  position: relative;
  overflow: hidden;
}

.mission-card:hover, .mission-card:active {
  transform: translateY(-3px);
  border-color: var(--sky);
  box-shadow: var(--shadow-md);
}

.m-cover {
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #F1F5F9;
  margin-bottom: 10px;
}

.m-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.m-num {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.72rem;
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.m-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 3px;
  line-height: 1.25;
}

.m-subtitle {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 10px;
  flex: 1;
}

.m-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid #F1F5F9;
}

.m-star-row {
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.map-footer {
  text-align: center;
}

/* ── 3. Intro Misi ── */
.intro-container {
  max-width: 800px;
  margin: auto;
  width: 100%;
}

.intro-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow-md);
  border: 2px solid #DBEAFE;
}

.intro-visual {
  width: 100%;
  aspect-ratio: 1 / 1.35;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #F1F5F9;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.intro-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.intro-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--navy);
  margin: 4px 0;
}

.intro-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.reward-box {
  background: #FEF3C7;
  color: #78350F;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  margin-bottom: 20px;
  border: 1px solid #FDE68A;
}

.intro-btns {
  display: flex;
  gap: 10px;
}

@media (max-width: 720px) {
  .intro-card {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 16px;
    max-width: 440px;
    margin: 0 auto;
  }
  .intro-visual {
    max-width: 220px;
    margin: 0 auto;
  }
  .intro-btns {
    flex-direction: column;
  }
}

/* ── 4. Tantangan Kuis (Canva AI Style & Mobile Perfection) ── */
.quiz-container {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-tag {
  background: #FEF3C7;
  color: #78350F;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  border: 2px solid #F59E0B;
  box-shadow: 0 2px 0 #D97706;
}

.badge-phase {
  background: #EEF2FF;
  color: #3730A3;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #C7D2FE;
}

.status-dots {
  display: flex;
  gap: 6px;
}

.s-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #CBD5E1;
  transition: all 0.2s;
}
.s-dot.active { background: var(--blue); transform: scale(1.25); }
.s-dot.done { background: var(--green); }

/* Kartu Ilustrasi Adegan yang Menonjol */
.quiz-art-card {
  width: 100%;
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #FFFFFF;
  border: 2px solid #DBEAFE;
  box-shadow: var(--shadow-sm);
  position: relative;
}

@media (max-width: 600px) {
  .quiz-art-card {
    height: 190px;
  }
}

.quiz-art-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.art-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
}

.narrate-btn {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.narrate-btn:active {
  transform: scale(0.95);
}

/* Kotak Cerita & Pertanyaan */
.story-bubble {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.95rem;
  border-left: 5px solid var(--sky);
  box-shadow: var(--shadow-sm);
  line-height: 1.45;
}

.question-banner {
  background: #FEF9C3;
  border: 2px solid #FDE047;
  color: #713F12;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  line-height: 1.35;
  box-shadow: var(--shadow-sm);
}

/* Tombol Jawaban Touch-Friendly */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

@media (min-width: 720px) {
  .options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.opt-card {
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s, border-color 0.15s;
  box-shadow: 0 4px 0 #CBD5E1;
  text-align: left;
  min-height: 60px;
}

.opt-card:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #CBD5E1;
}

.opt-card.sel-correct {
  background: #ECFDF5 !important;
  border-color: var(--green) !important;
  box-shadow: 0 2px 0 var(--green) !important;
}

.opt-card.sel-wrong {
  background: #FEF2F2 !important;
  border-color: var(--red) !important;
  box-shadow: 0 2px 0 var(--red) !important;
}

.opt-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.opt-label {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.35;
}

/* ── 5. Galeri Ilustrasi Cerita (Banyak Gambar!) ── */
.gallery-wrap {
  max-width: 1040px;
  margin: 0 auto;
  width: 100%;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.gallery-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid #E2E8F0;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.gallery-card:hover, .gallery-card:active {
  transform: translateY(-3px);
  border-color: var(--sky);
  box-shadow: var(--shadow-md);
}

.g-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #F1F5F9;
}

.g-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.g-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.g-chap {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--sky);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.g-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.25;
}

.g-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Modal Galeri Detail */
.gallery-modal-box {
  max-width: 680px;
  width: 100%;
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0,0,0,0.3);
  position: relative;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  animation: popIn 0.25s ease;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  color: #FFFFFF;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.gallery-modal-img {
  width: 100%;
  max-height: 52dvh;
  background: #0F172A;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-modal-img img {
  max-width: 100%;
  max-height: 52dvh;
  object-fit: contain;
  display: block;
}

.gallery-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
}

.gallery-modal-body h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--navy);
  margin: 4px 0 6px;
}

.gallery-modal-body p {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

/* ── 6. Pembaca Buku Lengkap ── */
.reader-container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.reader-viewport {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.reader-viewport img {
  max-width: 100%;
  max-height: calc(100dvh - 140px);
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  background: #FFFFFF;
}

.side-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #CBD5E1;
  color: var(--navy);
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  z-index: 5;
}
.side-nav.prev { left: 8px; }
.side-nav.next { right: 8px; }

.side-nav:active {
  transform: translateY(-50%) scale(0.92);
}

.reader-controls {
  flex-shrink: 0;
  height: 50px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #E2E8F0;
}

.reader-page-info {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--navy);
  font-size: 0.92rem;
  white-space: nowrap;
}

.reader-track {
  flex: 1;
  height: 8px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

.reader-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sky), var(--blue));
  width: 0%;
  transition: width 0.2s ease;
}

/* ── 7. Layar Hasil Misi ── */
.result-container {
  max-width: 540px;
  width: 100%;
  margin: auto;
}

.result-box {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 2px solid #DBEAFE;
}

.check-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  font-size: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3);
  animation: popIn 0.3s ease;
}

.result-heading {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 2px;
}

.result-subheading {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.stars-display {
  font-size: 2.4rem;
  letter-spacing: 4px;
  margin-bottom: 14px;
  animation: pulse 1s infinite alternate;
}

.badge-earned {
  display: inline-block;
  background: #FEF3C7;
  color: #78350F;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 6px 16px;
  border-radius: 999px;
  border: 2px solid #F59E0B;
  margin-bottom: 18px;
}

.character-takeaway {
  background: #F0FDF4;
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: left;
  margin-bottom: 22px;
}

.takeaway-head {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.78rem;
  color: #065F46;
  margin-bottom: 2px;
}

.character-takeaway p {
  color: #047857;
  font-size: 0.92rem;
  line-height: 1.4;
}

.result-buttons {
  display: flex;
  gap: 10px;
}

@media (max-width: 500px) {
  .result-buttons {
    flex-direction: column;
  }
}

/* ── Modal / Overlay ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
  animation: fadeIn 0.15s ease;
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  max-width: 420px;
  width: 100%;
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 24px 18px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  animation: popIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 6px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-title.correct { color: var(--green); }
.modal-title.wrong   { color: var(--orange); }

.modal-msg {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.42;
  margin-bottom: 18px;
}

.modal-buttons {
  display: flex;
  gap: 10px;
}

/* ── Kanvas Konfeti ── */
#confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 70;
}

/* ── Animasi ── */
@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

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