/* ==========================================================================
   BintangCilik — Candy & Magical Island UI (Khusus Anak SD Kelas 1–6)
   Arsitektur Komponen • Tombol 3D Jelly • Mobile-First & Touch Friendly
   ========================================================================== */

:root {
  --bg-sky-top: #C7E8FF;
  --bg-sky-mid: #F0F9FF;
  --bg-sky-bottom: #FFFBEB;
  --bg-surface: #FFFFFF;
  --text-dark: #1E293B;
  --text-muted: #64748B;

  /* Palet Warna Permen & Pelangi Anak */
  --primary: #3B82F6;
  --primary-dark: #1D4ED8;
  --yellow: #FBBF24;
  --yellow-dark: #D97706;
  --green: #10B981;
  --green-dark: #047857;
  --coral: #FF6B6B;
  --coral-dark: #DC2626;
  --pink: #EC4899;
  --pink-dark: #BE185D;
  --purple: #8B5CF6;
  --purple-dark: #6D28D9;
  --orange: #FF9F43;
  --orange-dark: #D97706;

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --font-display: 'Fredoka', 'Comic Sans MS', -apple-system, sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Safe Area Inset untuk Smartphone Berponi */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[v-cloak] {
  display: none !important;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12% 18%, rgba(254, 240, 138, 0.55) 0%, transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(196, 181, 253, 0.45) 0%, transparent 28%),
    radial-gradient(circle at 80% 80%, rgba(167, 243, 208, 0.45) 0%, transparent 32%),
    linear-gradient(180deg, var(--bg-sky-top) 0%, var(--bg-sky-mid) 48%, var(--bg-sky-bottom) 100%);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  padding-bottom: calc(96px + var(--safe-bottom));
}

/* Dekorasi Awan, Pelangi & Balon Udara */
.sky-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-cloud,
.floating-star {
  position: absolute;
  opacity: 0.55;
  filter: drop-shadow(0 6px 12px rgba(59, 130, 246, 0.15));
  animation: floatSlow 7s ease-in-out infinite;
}

.cloud-1 { top: 8%; left: 3%; font-size: 3.6rem; }
.cloud-2 { top: 12%; right: 4%; font-size: 4rem; animation-delay: 1.8s; }
.star-1 { top: 38%; left: 2%; font-size: 2.2rem; animation-delay: 0.8s; }
.star-2 { top: 58%; right: 3%; font-size: 2.6rem; animation-delay: 2.5s; }
.star-3 { bottom: 16%; left: 4%; font-size: 2.5rem; animation-delay: 1.2s; }

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

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ==========================================================================
   HEADER GAMIFIKASI ANAK (CANDY BAR)
   ========================================================================== */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 4px solid #BFDBFE;
  padding: calc(10px + var(--safe-top)) 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.06);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease;
}

.brand-logo:hover {
  transform: scale(1.03);
}

.logo-badge {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #FDE047, #F59E0B);
  border: 3px solid #FFF;
  display: grid;
  place-items: center;
  font-size: 2rem;
  box-shadow: 0 5px 0 #B45309;
  flex-shrink: 0;
  animation: wiggleGentle 4s infinite ease-in-out;
}

@keyframes wiggleGentle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: #1E3A8A;
  line-height: 1.05;
}

.brand-title span {
  color: #F59E0B;
  text-shadow: 0 2px 0 #FEF3C7;
}

.brand-subtitle {
  font-size: 0.82rem;
  font-weight: 800;
  color: #3B82F6;
}

.stats-pill-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: #F8FAFC;
  border: 2.5px solid #E2E8F0;
  box-shadow: 0 3px 0 rgba(148, 163, 184, 0.35);
  font-size: 0.82rem;
  min-height: 42px;
  transition: transform 0.12s ease;
}

.stat-pill:hover {
  transform: translateY(-2px);
}

.stat-pill small {
  display: block;
  font-size: 0.66rem;
  color: var(--text-muted);
  font-weight: 800;
  line-height: 1;
}

.stat-pill strong {
  font-family: var(--font-display);
  font-size: 0.96rem;
  color: var(--text-dark);
}

.pill-icon {
  font-size: 1.3rem;
}

.streak-pill { background: #FFF7ED; border-color: #FDBA74; }
.coins-pill { background: #FEFCE8; border-color: #FACC15; }
.stars-pill { background: #FFFBEB; border-color: #FCD34D; }
.xp-pill { background: #EEF2FF; border-color: #A5B4FC; }

.sound-toggle-btn {
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 800;
  background: #ECFEFF;
  border-color: #67E8F9;
  color: #0E7490;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 2.5px solid #F59E0B;
  box-shadow: 0 4px 0 #D97706;
  border-radius: var(--radius-pill);
  padding: 5px 14px 5px 6px;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.12s ease;
}

.profile-chip:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #D97706;
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-text {
  text-align: left;
}

.profile-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: #78350F;
  line-height: 1.1;
}

.profile-text small {
  font-size: 0.72rem;
  color: #B45309;
  font-weight: 800;
}

/* ==========================================================================
   NAVIGASI DESKTOP (WARNA-WARNI CERIA)
   ========================================================================== */
.main-tabs {
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 0 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.nav-tab {
  flex: 1;
  min-width: 190px;
  padding: 13px 16px;
  border-radius: var(--radius-lg);
  border: 3px solid #CBD5E1;
  background: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 0 #CBD5E1;
  transition: all 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-tab .tab-emoji {
  font-size: 1.45rem;
}

.nav-tab:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: #60A5FA;
  color: #1E3A8A;
}

.nav-tab.active.tab-island {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #FFFFFF;
  border-color: #1D4ED8;
  box-shadow: 0 6px 0 #1E40AF;
}

.nav-tab.active.tab-pet {
  background: linear-gradient(135deg, #EC4899, #DB2777);
  color: #FFFFFF;
  border-color: #BE185D;
  box-shadow: 0 6px 0 #9D174D;
}

.nav-tab.active.tab-trophy {
  background: linear-gradient(135deg, #F59E0B, #EA580C);
  color: #FFFFFF;
  border-color: #C2410C;
  box-shadow: 0 6px 0 #9A3412;
}

.nav-tab.active.tab-diary {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
  color: #FFFFFF;
  border-color: #5B21B6;
  box-shadow: 0 6px 0 #4C1D95;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR (JANGKAUAN IBU JARI ANAK)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 3px solid #BFDBFE;
  padding: 6px 10px calc(8px + var(--safe-bottom));
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-btn {
  flex: 1;
  max-width: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: var(--radius-md);
  color: #64748B;
  transition: all 0.16s ease;
  min-height: 54px;
}

.mobile-nav-btn .m-icon {
  font-size: 1.65rem;
  line-height: 1;
  margin-bottom: 3px;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-btn .m-label {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
}

.mobile-nav-btn.active {
  color: #2563EB;
  background: #EFF6FF;
}

.mobile-nav-btn.active .m-icon {
  transform: translateY(-3px) scale(1.18);
}

/* ==========================================================================
   KONTENER & HERO WELCOME BANNER ANAK
   ========================================================================== */
.app-container {
  max-width: 1200px;
  margin: 18px auto;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}

.tab-panel {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-welcome-card {
  border-radius: var(--radius-xl);
  border: 4px solid rgba(255, 255, 255, 0.55);
  padding: 24px 26px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  box-shadow: 0 10px 0 #1E3A8A, 0 16px 32px rgba(37, 99, 235, 0.25);
  margin-bottom: 26px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.hero-mascot-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mascot-bubble {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 5px solid #FDE047;
  display: grid;
  place-items: center;
  font-size: 3.6rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: bounceGentle 2.8s infinite ease-in-out;
}

.mascot-sparkle {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 1.5rem;
}

@keyframes bounceGentle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.04); }
}

.mascot-level-tag {
  background: #FDE047;
  color: #78350F;
  font-family: var(--font-display);
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  box-shadow: 0 3px 0 #CA8A04;
}

.hero-content-side {
  flex: 1;
  min-width: 260px;
}

.grade-pill-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.hero-content-side h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.hero-content-side p {
  font-size: 0.98rem;
  opacity: 0.96;
  margin-bottom: 14px;
  max-width: 640px;
  line-height: 1.45;
}

.daily-mission-bar {
  background: rgba(15, 23, 42, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.25);
  padding: 12px 16px;
  border-radius: var(--radius-md);
}

.mission-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  margin-bottom: 7px;
  gap: 8px;
  flex-wrap: wrap;
}

.mission-badge-count {
  background: #FBBF24;
  color: #78350F;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-weight: 900;
  font-size: 0.78rem;
}

.mission-progress-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.mission-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FDE047, #34D399);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.hero-quick-action {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 190px;
}

.chest-popup-toast {
  background: #FFFBEB;
  color: #92400E;
  border: 3px solid #F59E0B;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  animation: popIn 0.25s ease;
}

/* ==========================================================================
   TOMBOL 3D JELLY ANAK (TOUCH TARGET >= 48px)
   ========================================================================== */
.btn-3d {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.12s ease, filter 0.15s ease;
  user-select: none;
}

.btn-3d:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-2px);
}

.btn-3d:active:not(:disabled) {
  transform: translateY(3px);
}

.btn-3d:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-yellow {
  background: linear-gradient(180deg, #FDE047 0%, #FBBF24 100%);
  color: #78350F;
  box-shadow: 0 5px 0 #D97706;
}
.btn-yellow:active:not(:disabled) { box-shadow: 0 2px 0 #D97706; }

.btn-pink {
  background: linear-gradient(180deg, #F472B6 0%, #EC4899 100%);
  color: #FFFFFF;
  box-shadow: 0 5px 0 #BE185D;
}
.btn-pink:active:not(:disabled) { box-shadow: 0 2px 0 #BE185D; }

.btn-primary {
  background: linear-gradient(180deg, #60A5FA 0%, #2563EB 100%);
  color: #FFFFFF;
  box-shadow: 0 5px 0 #1E40AF;
}
.btn-primary:active:not(:disabled) { box-shadow: 0 2px 0 #1E40AF; }

.btn-green {
  background: linear-gradient(180deg, #34D399 0%, #059669 100%);
  color: #FFFFFF;
  box-shadow: 0 5px 0 #065F46;
}
.btn-green:active:not(:disabled) { box-shadow: 0 2px 0 #065F46; }

.btn-secondary {
  background: #F1F5F9;
  color: #334155;
  border: 2px solid #CBD5E1;
  box-shadow: 0 5px 0 #94A3B8;
}
.btn-secondary:active:not(:disabled) { box-shadow: 0 2px 0 #94A3B8; }

.pulse-button {
  animation: pulseSoft 2.2s infinite ease-in-out;
}

@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.full-width-btn {
  width: 100%;
  margin-top: 16px;
  min-height: 54px;
  font-size: 1.08rem;
}

/* ==========================================================================
   PULAU KELAS 1 - 6 SD (3D ISLAND CARDS)
   ========================================================================== */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
  gap: 6px;
}

.section-header h3 {
  font-family: var(--font-display);
  font-size: 1.32rem;
  color: #1E3A8A;
}

.section-hint {
  font-size: 0.86rem;
  color: #3B82F6;
  font-weight: 800;
}

.grade-selector-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}

.grade-card {
  background: #FFFFFF;
  border: 3.5px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 0 #CBD5E1;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: var(--font-body);
  color: var(--text-dark);
}

.grade-card:hover {
  transform: translateY(-5px) scale(1.02);
}

.grade-card.active {
  color: #FFFFFF;
  transform: translateY(-5px) scale(1.03);
}

.island-floating-icon {
  font-size: 2.35rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}

.grade-card .grade-number {
  font-family: var(--font-display);
  font-size: 1.18rem;
  display: block;
}

.grade-card .grade-theme-name {
  font-size: 0.76rem;
  font-weight: 800;
  opacity: 0.92;
  display: block;
  margin-top: 2px;
}

.grade-card .grade-stars-mini {
  margin-top: 8px;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #FEF9C3;
  color: #854D0E;
}

.grade-card.active .grade-stars-mini {
  background: rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
}

/* ==========================================================================
   FILTER PELAJARAN & GRID KARTU PETUALANGAN
   ========================================================================== */
.subject-filter-bar {
  margin-bottom: 20px;
}

.filter-headline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.filter-headline-row h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #1E3A8A;
}

.search-input-wrapper {
  position: relative;
  min-width: 280px;
  display: flex;
  align-items: center;
}

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

.topic-search-input {
  width: 100%;
  padding: 11px 38px 11px 40px;
  border-radius: var(--radius-pill);
  border: 3px solid #93C5FD;
  background: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 800;
  outline: none;
  box-shadow: 0 4px 0 #DBEAFE;
  transition: all 0.15s ease;
}

.topic-search-input:focus {
  border-color: #2563EB;
  box-shadow: 0 4px 0 #93C5FD;
}

.btn-clear-search {
  position: absolute;
  right: 12px;
  background: #FEE2E2;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
  color: #DC2626;
  font-weight: 900;
  cursor: pointer;
}

.subject-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.subject-chip {
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 3px solid #CBD5E1;
  background: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.94rem;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  box-shadow: 0 4px 0 #CBD5E1;
  transition: all 0.14s ease;
}

.subject-chip:hover {
  border-color: #3B82F6;
  color: #1D4ED8;
  transform: translateY(-2px);
}

.subject-chip.active {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  border-color: #1E3A8A;
  color: #FFFFFF;
  box-shadow: 0 4px 0 #1E3A8A;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.topic-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  border: 3.5px solid #E2E8F0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 0 #CBD5E1, 0 12px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.topic-card:hover {
  transform: translateY(-5px);
}

.topic-card-ribbon {
  background: linear-gradient(90deg, #F59E0B, #FBBF24);
  color: #78350F;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  align-self: flex-start;
  margin-bottom: 10px;
}

.topic-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.topic-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.topic-badges-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.subject-tag {
  font-size: 0.75rem;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.topic-stars-display {
  font-size: 1.2rem;
  letter-spacing: 3px;
}

.star-slot {
  opacity: 0.35;
}

.star-slot.filled {
  opacity: 1;
}

.topic-title {
  font-family: var(--font-display);
  font-size: 1.28rem;
  color: #0F172A;
  margin-bottom: 6px;
}

.topic-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.48;
  margin-bottom: 16px;
  font-weight: 700;
}

.topic-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 800;
  color: #475569;
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.topic-status-badge.scored {
  color: #047857;
  background: #DCFCE7;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.topic-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ==========================================================================
   TAB 2: TAMAN PELIHARAAN VIRTUAL & TOKO STIKER AJAIB
   ========================================================================== */
.playground-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 22px;
  align-items: start;
}

.pet-stage-card,
.sticker-shop-card {
  background: #FFFFFF;
  border: 4px solid #FBCFE8;
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: 0 8px 0 #F472B6, 0 14px 28px rgba(236, 72, 153, 0.12);
}

.sticker-shop-card {
  border-color: #FDE68A;
  box-shadow: 0 8px 0 #F59E0B, 0 14px 28px rgba(245, 158, 11, 0.12);
}

.pet-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pet-badge-pill {
  display: inline-block;
  background: #FCE7F3;
  color: #9D174D;
  font-family: var(--font-display);
  font-size: 0.84rem;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
}

.coin-balance-tag {
  background: #FEF9C3;
  border: 2px solid #FACC15;
  color: #854D0E;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 800;
}

.pet-arena {
  background: linear-gradient(180deg, #E0F2FE 0%, #DCFCE7 100%);
  border: 3px dashed #60A5FA;
  border-radius: var(--radius-xl);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 16px;
  position: relative;
}

.speech-cloud {
  background: #FFFFFF;
  border: 2.5px solid #93C5FD;
  border-radius: 18px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 0.92rem;
  color: #1E3A8A;
  max-width: 340px;
  margin: 0 auto 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.pet-big-character {
  font-size: 5.2rem;
  line-height: 1.1;
  display: inline-block;
  transition: transform 0.25s ease;
  animation: bounceGentle 2.5s infinite ease-in-out;
}

.pet-big-character.pet-jump {
  animation: superJump 0.65s ease;
}

@keyframes superJump {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-28px) scale(1.22) rotate(8deg); }
  70% { transform: translateY(-10px) scale(1.1) rotate(-6deg); }
  100% { transform: translateY(0) scale(1); }
}

.pet-shadow {
  width: 76px;
  height: 14px;
  background: rgba(15, 23, 42, 0.14);
  border-radius: 50%;
  margin: 4px auto 12px;
}

.pet-name-plate h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: #1E3A8A;
}

.pet-lv-pill {
  display: inline-block;
  margin-top: 4px;
  background: #FFFFFF;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  color: #BE185D;
}

.pet-bars-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.pet-stat-row span {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: #334155;
}

.pet-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.pet-selector-strip {
  border-top: 2px dashed #FBCFE8;
  padding-top: 12px;
}

.pet-selector-strip small {
  display: block;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pet-choices-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pet-choice-btn {
  background: #F8FAFC;
  border: 2.5px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 8px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.14s ease;
}

.pet-choice-btn span {
  font-size: 1.7rem;
}

.pet-choice-btn small {
  font-size: 0.7rem;
  margin: 0;
  color: #334155;
}

.pet-choice-btn.selected {
  background: #FCE7F3;
  border-color: #EC4899;
  transform: translateY(-2px);
}

/* Grid Toko Stiker */
.sticker-shop-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #78350F;
  margin: 6px 0 4px;
}

.sticker-shop-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 16px;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px;
}

.sticker-item-card {
  background: #F8FAFC;
  border: 3px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s ease;
}

.sticker-item-card.owned {
  background: linear-gradient(180deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 3px solid #F59E0B;
  box-shadow: 0 5px 0 #D97706;
}

.sticker-visual {
  font-size: 2.7rem;
  margin-bottom: 2px;
}

.sticker-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #1E293B;
}

.sticker-cat {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748B;
  margin-bottom: 6px;
}

.sticker-owned-tag {
  background: #DCFCE7;
  color: #166534;
  font-weight: 900;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.btn-buy-sticker {
  background: #FBBF24;
  color: #78350F;
  box-shadow: 0 4px 0 #D97706;
  font-size: 0.82rem;
  min-height: 38px;
  padding: 6px 12px;
  width: 100%;
}

/* ==========================================================================
   TAB 3 & TAB 4: ISTANA PIALA & PASPOR PETUALANG CILIK
   ========================================================================== */
.trophy-header-banner {
  background: linear-gradient(135deg, #F59E0B, #EA580C);
  color: #FFFFFF;
  padding: 24px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  box-shadow: 0 8px 0 #9A3412;
  flex-wrap: wrap;
}

.trophy-icon-big {
  font-size: 3.5rem;
}

.trophy-summary-box {
  background: rgba(255, 255, 255, 0.24);
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.trophy-summary-box span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  display: block;
}

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

.badge-card {
  background: #FFFFFF;
  border: 3.5px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
  box-shadow: 0 6px 0 #CBD5E1;
  transition: transform 0.15s ease;
}

.badge-card.locked {
  opacity: 0.65;
  filter: grayscale(0.8);
}

.badge-card.unlocked {
  border-color: #FBBF24;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBEB 100%);
  box-shadow: 0 6px 0 #D97706;
}

.badge-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  display: block;
}

.badge-title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin-bottom: 4px;
}

.badge-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
}

.badge-status-pill {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

/* Paspor Petualang Cilik */
.passport-hero-card {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 60%, #EC4899 100%);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 8px 0 #4C1D95;
}

.passport-id-badge {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.passport-avatar-huge {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 4px solid #FDE047;
  display: grid;
  place-items: center;
  font-size: 3.2rem;
}

.passport-stamp {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.passport-id-badge h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
}

.passport-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.kpi-card {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.kpi-icon {
  font-size: 2.1rem;
}

.kpi-card small {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-muted);
}

.kpi-card strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  display: block;
  color: #1E3A8A;
}

.parent-section-card {
  background: #FFFFFF;
  border: 3.5px solid #E2E8F0;
  border-radius: var(--radius-xl);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 6px 0 #CBD5E1;
}

.parent-section-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #1E3A8A;
  margin-bottom: 8px;
}

.grade-mastery-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.mastery-item {
  background: #F8FAFC;
  border: 2.5px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px;
  transition: transform 0.14s ease;
}

.clickable-mastery {
  cursor: pointer;
}

.clickable-mastery:hover {
  transform: translateY(-3px);
  border-color: #60A5FA;
  background: #EFF6FF;
}

.mastery-top {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.empty-journal-box {
  text-align: center;
  padding: 28px 16px;
}

.empty-journal-box span {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
}

.empty-journal-box p {
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 14px;
}

.kids-journal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.journal-entry-card {
  background: #F8FAFC;
  border: 2.5px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.journal-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.journal-grade-pill {
  display: inline-block;
  align-self: flex-start;
  background: #DBEAFE;
  color: #1E40AF;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.journal-left strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.journal-left small {
  color: var(--text-muted);
  font-weight: 700;
}

.journal-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.journal-score-badge {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-weight: 900;
  font-size: 0.84rem;
}

/* ==========================================================================
   MODAL CERITA BERGAMBAR & ARENA KUIS GAME SHOW ANAK
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-window {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  border: 4px solid #93C5FD;
  width: 100%;
  max-width: 780px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 12px 0 #1E3A8A, 0 22px 44px rgba(0, 0, 0, 0.3);
  animation: popIn 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-topbar,
.quiz-topbar {
  padding: 16px 20px;
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  border-bottom: 3px solid #BFDBFE;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-topic-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-grade-tag,
.quiz-grade-chip {
  background: #2563EB;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.btn-close-modal {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid #FCA5A5;
  background: #FEF2F2;
  color: #DC2626;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}

.learning-card-stage {
  padding: 22px;
}

.step-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #CBD5E1;
  transition: all 0.2s ease;
}

.step-dot.active {
  width: 34px;
  border-radius: 999px;
  background: #3B82F6;
}

.flashcard-box {
  background: linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 100%);
  border: 3px solid #BFDBFE;
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: center;
}

.flashcard-illustration {
  font-size: 3.3rem;
  background: #FFFFFF;
  border: 3px dashed #60A5FA;
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 16px;
  display: inline-block;
}

.flashcard-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.flashcard-header-row h4 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #1E3A8A;
}

.btn-tts {
  background: #FEF3C7;
  border: 2.5px solid #F59E0B;
  color: #92400E;
  font-family: var(--font-display);
  font-size: 0.86rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  min-height: 40px;
  box-shadow: 0 3px 0 #D97706;
}

.flashcard-body {
  font-size: 1.08rem;
  line-height: 1.62;
  color: #1E293B;
  max-width: 600px;
  margin: 0 auto 16px;
  font-weight: 800;
}

.fun-fact-box {
  background: #ECFDF5;
  border: 2.5px solid #34D399;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #065F46;
}

.fact-icon {
  font-size: 1.8rem;
}

.modal-footer-bar {
  padding: 14px 20px;
  border-top: 2px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.card-step-counter {
  font-family: var(--font-display);
  color: var(--text-muted);
}

/* Arena Kuis */
.quiz-progress-wrapper {
  flex: 1;
  max-width: 320px;
}

.quiz-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.84rem;
  margin-bottom: 4px;
  color: #1E3A8A;
}

.combo-fire-tag {
  background: #FEF3C7;
  border: 2px solid #F59E0B;
  color: #B45309;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  animation: pulseSoft 1s infinite;
}

.quiz-progress-track {
  height: 11px;
  background: #FFFFFF;
  border-radius: var(--radius-pill);
  border: 2px solid #93C5FD;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10B981, #3B82F6);
  transition: width 0.3s ease;
}

.quiz-stage {
  padding: 20px;
}

.question-card {
  background: #F8FAFC;
  border: 3px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  text-align: center;
}

.question-visual-stage {
  font-size: 2.5rem;
  background: #FFFFFF;
  border: 2.5px dashed #93C5FD;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  margin-bottom: 12px;
  display: inline-block;
}

.question-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.question-text {
  font-family: var(--font-display);
  font-size: 1.28rem;
  color: #0F172A;
  line-height: 1.38;
}

.hint-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.btn-hint {
  background: #FFFBEB;
  border: 2px solid #FCD34D;
  color: #B45309;
  font-weight: 800;
  font-size: 0.84rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.hint-bubble {
  background: #FEF3C7;
  border: 2px solid #F59E0B;
  color: #92400E;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.option-btn {
  background: #FFFFFF;
  border: 3px solid #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 800;
  color: #1E293B;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  box-shadow: 0 5px 0 #CBD5E1;
  transition: all 0.12s ease;
  min-height: 58px;
}

.option-btn:hover:not(:disabled) {
  border-color: #3B82F6;
  background: #EFF6FF;
  transform: translateY(-2px);
}

.option-letter {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #DBEAFE;
  color: #1E40AF;
  font-family: var(--font-display);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.opt-color-0 .option-letter { background: #FEE2E2; color: #B91C1C; }
.opt-color-1 .option-letter { background: #FEF3C7; color: #B45309; }
.opt-color-2 .option-letter { background: #DCFCE7; color: #047857; }
.opt-color-3 .option-letter { background: #E0E7FF; color: #3730A3; }

.option-btn.correct {
  background: #ECFDF5;
  border-color: #10B981;
  color: #065F46;
  box-shadow: 0 5px 0 #059669;
}

.option-btn.correct .option-letter {
  background: #10B981;
  color: #FFFFFF;
}

.option-btn.wrong {
  background: #FEF2F2;
  border-color: #F87171;
  color: #991B1B;
  box-shadow: 0 5px 0 #DC2626;
}

.option-btn.wrong .option-letter {
  background: #EF4444;
  color: #FFFFFF;
}

.feedback-banner {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.feedback-banner.is-correct {
  background: #ECFDF5;
  border: 3px solid #34D399;
}

.feedback-banner.is-wrong {
  background: #FFF7ED;
  border: 3px solid #FDBA74;
}

.feedback-mascot {
  font-size: 2.5rem;
}

.feedback-text-content {
  flex: 1;
  min-width: 200px;
}

.feedback-text-content h4 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin-bottom: 3px;
}

.feedback-text-content p {
  font-size: 0.94rem;
  font-weight: 700;
  color: #334155;
}

/* Hasil Kuis */
.quiz-result-stage {
  padding: 28px 20px;
  text-align: center;
}

.result-stars-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.star-big {
  font-size: 3.4rem;
  filter: grayscale(1) opacity(0.3);
}

.star-big.earned {
  filter: none;
  animation: starPop 0.45s ease forwards;
}

@keyframes starPop {
  0% { transform: scale(0.3) rotate(-20deg); }
  70% { transform: scale(1.22) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}

.result-score-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 480px;
  margin: 20px auto;
}

.res-box {
  background: #F8FAFC;
  border: 3px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 12px;
}

.res-box small {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-muted);
}

.res-box strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #1E3A8A;
}

.new-badge-alert {
  background: #FEF3C7;
  border: 2.5px solid #F59E0B;
  color: #92400E;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-bottom: 18px;
  font-weight: 800;
}

.result-action-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Modal Profil */
.profile-window {
  max-width: 500px;
}

.profile-form-body {
  padding: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.98rem;
  margin: 12px 0 6px;
  color: #1E3A8A;
}

.kid-input,
.kid-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 3px solid #93C5FD;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  min-height: 48px;
}

.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.avatar-option {
  font-size: 1.9rem;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 3px solid #E2E8F0;
  background: #F8FAFC;
  cursor: pointer;
  text-align: center;
  min-height: 52px;
  transition: transform 0.12s ease;
}

.avatar-option.selected {
  border-color: #F59E0B;
  background: #FEF3C7;
  transform: scale(1.08);
}

/* Pencarian Kosong */
.empty-search-box {
  background: #FFFFFF;
  border: 3.5px dashed #93C5FD;
  border-radius: var(--radius-xl);
  padding: 40px 20px;
  text-align: center;
  margin: 20px 0;
}

.empty-icon {
  font-size: 3.6rem;
  margin-bottom: 10px;
}

.empty-search-box h4 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: #1E3A8A;
  margin-bottom: 6px;
}

.empty-search-box p {
  color: var(--text-muted);
  font-size: 0.96rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ==========================================================================
   MEDIA QUERIES MOBILE & TABLET
   ========================================================================== */
@media (max-width: 920px) {
  .grade-selector-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .playground-hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .desktop-only-nav {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: flex !important;
  }

  .top-navbar {
    padding: calc(8px + var(--safe-top)) 14px 8px;
  }

  .brand-title {
    font-size: 1.4rem;
  }

  .logo-badge {
    width: 42px;
    height: 42px;
    font-size: 1.6rem;
  }

  .stat-pill {
    padding: 5px 10px;
    font-size: 0.78rem;
    min-height: 36px;
  }

  .hero-welcome-card {
    padding: 18px;
  }

  .hero-content-side h2 {
    font-size: 1.35rem;
  }

  .hero-quick-action {
    width: 100%;
    flex-direction: row;
  }

  .hero-quick-action .btn-3d {
    flex: 1;
  }

  .grade-selector-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .filter-headline-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input-wrapper {
    min-width: 100%;
  }

  .topics-grid {
    grid-template-columns: 1fr;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .result-score-cards {
    grid-template-columns: 1fr;
  }

  .modal-window {
    max-height: 94vh;
    border-radius: 24px 24px 0 0;
    margin-top: auto;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .hide-on-mobile-xs {
    display: none !important;
  }
}

/* ==========================================================================
   BUKU PINTAR MENDALAM (6 BAB) & KUIS EVALUASI PASCA-BELAJAR (3 SOAL)
   ========================================================================== */
.chapter-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.chapter-pill-btn {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 2.5px solid #CBD5E1;
  background: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: #475569;
  cursor: pointer;
  box-shadow: 0 3px 0 #CBD5E1;
  transition: all 0.14s ease;
}

.chapter-pill-btn.read {
  background: #ECFDF5;
  border-color: #6EE7B7;
  color: #047857;
}

.chapter-pill-btn.active {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  border-color: #1D4ED8;
  color: #FFFFFF;
  box-shadow: 0 3px 0 #1E40AF;
  transform: translateY(-2px);
}

.chapter-pill-btn.mini-quiz-pill {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border-color: #F59E0B;
  color: #92400E;
  box-shadow: 0 3px 0 #D97706;
  font-weight: 700;
}

.chapter-badge {
  background: #DBEAFE;
  color: #1E40AF;
  font-family: var(--font-display);
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.deep-study-box {
  text-align: left;
}

.deep-study-box .flashcard-illustration {
  display: block;
  text-align: center;
  max-width: 440px;
  margin: 0 auto 16px;
}

.deep-study-box .flashcard-body {
  text-align: center;
  margin-bottom: 18px;
}

.keypoints-card {
  background: #FFFFFF;
  border: 2.5px solid #93C5FD;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 0 #DBEAFE;
}

.keypoints-card h5 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: #1E3A8A;
  margin-bottom: 8px;
}

.keypoints-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.keypoints-list li {
  font-size: 0.94rem;
  font-weight: 800;
  color: #334155;
  line-height: 1.45;
}

.example-study-card {
  background: #FFFBEB;
  border: 2.5px solid #FCD34D;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 14px;
}

.example-header {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: #92400E;
  margin-bottom: 6px;
}

.example-body {
  font-size: 0.94rem;
  font-weight: 800;
  color: #78350F;
  line-height: 1.5;
  white-space: pre-line;
}

.mini-quiz-banner {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 3px solid #F59E0B;
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mini-quiz-badge {
  display: inline-block;
  background: #D97706;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 4px;
}

.mini-quiz-banner h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #78350F;
}

.mini-quiz-counter {
  background: #FFFFFF;
  color: #92400E;
  font-family: var(--font-display);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 2px solid #F59E0B;
}

/* ==========================================================================
   MENU KHUSUS RUANG BELAJAR PINTAR & KAMUS BAHASA KUTAI (STUDY ROOM)
   ========================================================================== */
.nav-tab.active.tab-study {
  background: linear-gradient(135deg, #059669, #10B981);
  color: #FFFFFF;
  border-color: #047857;
  box-shadow: 0 6px 0 #065F46;
}

.study-room-hero {
  background: linear-gradient(135deg, #059669 0%, #0EA5E9 55%, #4F46E5 100%);
  border-radius: var(--radius-xl);
  border: 4px solid rgba(255, 255, 255, 0.55);
  padding: 24px 26px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 10px 0 #065F46, 0 16px 32px rgba(5, 150, 105, 0.22);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.study-hero-left {
  flex: 1;
  min-width: 260px;
}

.study-hero-left h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin-bottom: 6px;
}

.study-hero-left p {
  font-size: 0.96rem;
  line-height: 1.48;
  opacity: 0.96;
  max-width: 660px;
}

.study-hero-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 210px;
}

.study-grade-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.study-grade-pill {
  padding: 12px 10px;
  border-radius: var(--radius-lg);
  border: 3px solid #CBD5E1;
  background: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.96rem;
  color: #334155;
  cursor: pointer;
  box-shadow: 0 5px 0 #CBD5E1;
  transition: all 0.14s ease;
}

.study-grade-pill:hover {
  transform: translateY(-2px);
}

.study-grade-pill.active {
  transform: translateY(-3px);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.25);
}

.study-room-workspace {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 20px;
  align-items: start;
}

.study-sidebar {
  background: #FFFFFF;
  border: 3.5px solid #E2E8F0;
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: 0 7px 0 #CBD5E1;
}

.sidebar-heading {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: #1E3A8A;
  margin-bottom: 12px;
}

.study-topic-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.study-topic-item {
  width: 100%;
  background: #F8FAFC;
  border: 2.5px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.study-topic-item:hover {
  border-color: #60A5FA;
  background: #EFF6FF;
}

.study-topic-item.active {
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  border-color: #2563EB;
  box-shadow: 0 4px 0 #93C5FD;
  transform: translateY(-2px);
}

.st-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  flex-shrink: 0;
}

.st-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.st-info small {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.st-info strong {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: #0F172A;
  line-height: 1.25;
}

.st-meta {
  font-size: 0.74rem;
  font-weight: 800;
  color: #64748B;
}

.study-reader-panel {
  background: #FFFFFF;
  border: 3.5px solid #BFDBFE;
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: 0 8px 0 #93C5FD;
}

.reader-book-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 3px dashed #E2E8F0;
}

.reader-book-header h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: #0F172A;
  margin: 6px 0 4px;
}

.reader-book-header p {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
}

.reader-bottom-nav {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px dashed #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Kamus Bahasa Kutai */
.kamus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}

.kamus-card {
  background: #FFFBEB;
  border: 2.5px solid #FCD34D;
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 4px 0 #FDE68A;
}

.kamus-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.kamus-word-kutai {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: #92400E;
}

.kamus-cat-badge {
  background: #FEF3C7;
  border: 1.5px solid #F59E0B;
  color: #B45309;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.kamus-word-indo {
  font-size: 0.92rem;
  color: #1E293B;
  margin-bottom: 6px;
}

.kamus-example {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  background: #FFFFFF;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1.5px dashed #FCD34D;
}

@media (max-width: 920px) {
  .study-grade-bar {
    grid-template-columns: repeat(3, 1fr);
  }
  .study-room-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .study-grade-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .study-hero-right {
    width: 100%;
    flex-direction: row;
  }
  .study-hero-right .btn-3d {
    flex: 1;
  }
}
