/* ═══════════════════════════════════════════════════════
   TEACHING KIDS 2 CARE — Design System
   CASEL-aligned SEL Platform · K-5 · ABCMouse/Starfall inspired
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Nunito+Sans:ital,wght@0,400;0,600;0,700;0,800;1,400&family=Caveat:wght@500;700&display=swap');

:root {
  /* Sky & Scene */
  --sky-top: #4FACFE;
  --sky-mid: #87CEEB;
  --sky-bottom: #C9E9F6;
  --grass-top: #6DBF5B;
  --grass-bottom: #4A9E3F;
  --ground: #8B6914;

  /* Brand */
  --brand: #E8443A;
  --brand-dark: #C73630;
  --brand-light: #FF6F61;
  --heart: #E8443A;

  /* CASEL 5 Competency Colors */
  --self-awareness: #F59E0B;
  --self-awareness-light: #FEF3C7;
  --self-awareness-bg: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);

  --self-management: #3B82F6;
  --self-management-light: #DBEAFE;
  --self-management-bg: linear-gradient(135deg, #DBEAFE 0%, #93C5FD 100%);

  --social-awareness: #10B981;
  --social-awareness-light: #D1FAE5;
  --social-awareness-bg: linear-gradient(135deg, #D1FAE5 0%, #6EE7B7 100%);

  --relationship: #F472B6;
  --relationship-light: #FCE7F3;
  --relationship-bg: linear-gradient(135deg, #FCE7F3 0%, #F9A8D4 100%);

  --decision: #8B5CF6;
  --decision-light: #EDE9FE;
  --decision-bg: linear-gradient(135deg, #EDE9FE 0%, #C4B5FD 100%);

  /* Neutrals */
  --text-dark: #1E293B;
  --text-mid: #475569;
  --text-light: #94A3B8;
  --white: #FFFFFF;
  --off-white: #F8FAFC;
  --cream: #FFFBF0;
  --card-bg: #FFFFFF;
  --page-bg: #F0F7FF;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-glow: 0 0 20px rgba(232,68,58,0.15);

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 50px;
  --r-circle: 50%;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: inherit; }
a { text-decoration: none; color: inherit; }

body {
  min-height: 100vh;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 600;
  color: var(--text-dark);
  background: var(--page-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ─── ANIMATIONS ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.4); }
  70% { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes starBurst {
  0% { transform: scale(0) rotate(0); opacity: 0; }
  50% { transform: scale(1.3) rotate(180deg); opacity: 1; }
  100% { transform: scale(1) rotate(360deg); opacity: 1; }
}
@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── SCENE BACKGROUND — Illustrated image ─── */
.scene-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url('images/Background.png') center bottom / cover no-repeat;
  background-color: #8EEFD4;
}
.scene-bg::before { display: none; }
.scene-bg::after { display: none; }

/* ─── NAVBAR ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 68px;
  background: linear-gradient(135deg, #1E3A5F 0%, #2D5F8A 100%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}
.nav-logo {
  width: 44px;
  height: 44px;
  background: var(--brand);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(232,68,58,0.3);
}
.nav-logo svg { width: 28px; height: 28px; }
.nav-brand-text h1 {
  font-size: 20px;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.3px;
}
.nav-brand-text h1 .accent { color: var(--brand-light); }
.nav-brand-text small {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--r-full);
  font-family: 'Baloo 2', cursive;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  background: transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.nav-link:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}
.nav-link.active {
  background: rgba(255,255,255,0.18);
  color: var(--white);
}
.nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.nav-pills {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.2s;
}
.pill:hover { transform: scale(1.05); }
.pill-stars {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  color: #92400E;
  box-shadow: 0 2px 8px rgba(245,158,11,0.2);
}
.pill-stars svg { width: 16px; height: 16px; fill: #F59E0B; }
.pill-lessons {
  background: linear-gradient(135deg, #DBEAFE, #93C5FD);
  color: #1E40AF;
  box-shadow: 0 2px 8px rgba(59,130,246,0.2);
}
.pill-grade {
  background: linear-gradient(135deg, #D1FAE5, #6EE7B7);
  color: #065F46;
  box-shadow: 0 2px 8px rgba(16,185,129,0.2);
  cursor: pointer;
  display: none;
}

/* ─── MAIN CONTENT ─── */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
}

/* ─── HERO SECTION ─── */
.hero {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 32px 36px 0;
  margin-bottom: 40px;
  background: linear-gradient(135deg, rgba(255,255,255,0.92) 0%, rgba(254,243,199,0.7) 50%, rgba(219,234,254,0.6) 100%);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(232,68,58,0.08);
  position: relative;
  overflow: hidden;
  min-height: 260px;
  animation: fadeInUp 0.6s ease both;
}
.hero-text {
  flex: 1;
  padding-bottom: 32px;
}
.hero-text h2 {
  font-size: 36px;
  margin-bottom: 10px;
  color: var(--text-dark);
}
.hero-sub {
  font-size: 18px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 480px;
}
.hero-goals {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hero-goal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 700;
}
.hero-goal-done {
  background: var(--social-awareness);
  color: var(--white);
}
.hero-goal-pending {
  background: rgba(0,0,0,0.05);
  color: var(--text-light);
}
.hero-img {
  width: 420px;
  max-width: 45%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  object-position: bottom;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

/* ─── COMPETENCY CARDS — free-standing images, no circles ─── */
.comp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 48px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.comp-card {
  border-radius: var(--r-lg);
  padding: 24px 18px 22px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  min-width: 0;
}
.comp-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.comp-card-img {
  width: 140px;
  max-width: 100%;
  height: 130px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}
.comp-card:hover .comp-card-img {
  transform: scale(1.06);
}
.comp-card h3 {
  font-size: 18px;
  margin-bottom: 5px;
}
.comp-card p {
  font-size: 13px;
  color: var(--text-mid);
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}
.comp-card .progress-bar {
  height: 7px;
  background: rgba(0,0,0,0.06);
  border-radius: 7px;
  overflow: hidden;
}
.comp-card .progress-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 1s ease;
}
.comp-card .card-meta {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 700;
  margin-top: 5px;
}

/* Card color variants */
.comp-self-awareness { background: var(--self-awareness-bg); }
.comp-self-awareness:hover { border-color: var(--self-awareness); }
.comp-self-awareness .progress-fill { background: var(--self-awareness); }

.comp-self-management { background: var(--self-management-bg); }
.comp-self-management:hover { border-color: var(--self-management); }
.comp-self-management .progress-fill { background: var(--self-management); }

.comp-social-awareness { background: var(--social-awareness-bg); }
.comp-social-awareness:hover { border-color: var(--social-awareness); }
.comp-social-awareness .progress-fill { background: var(--social-awareness); }

.comp-relationship { background: var(--relationship-bg); }
.comp-relationship:hover { border-color: var(--relationship); }
.comp-relationship .progress-fill { background: var(--relationship); }

.comp-decision { background: var(--decision-bg); }
.comp-decision:hover { border-color: var(--decision); }
.comp-decision .progress-fill { background: var(--decision); }

/* ─── ACTIVITY TILES — free-standing images, 3 per row ─── */
.act-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 48px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.act-tile {
  border-radius: var(--r-lg);
  padding: 20px 14px 20px;
  text-align: center;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
}
.act-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.act-tile-img {
  width: 110px;
  max-width: 100%;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.1));
  transition: transform 0.3s ease;
}
.act-tile:hover .act-tile-img {
  transform: scale(1.08);
}
.act-tile h4 {
  font-size: 16px;
  color: var(--text-dark);
  line-height: 1.3;
}

/* ─── TIP BANNER — free-standing image ─── */
.tip-banner {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 20px 28px 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(254,243,199,0.8));
  border-radius: var(--r-lg);
  border: 2px solid rgba(245,158,11,0.15);
  box-shadow: var(--shadow-md);
  margin-bottom: 28px;
  overflow: hidden;
}
.tip-img {
  width: 90px;
  max-width: 90px;
  height: auto;
  max-height: 110px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.08));
  object-fit: contain;
}
.tip-content {
  flex: 1;
  padding-bottom: 20px;
}
.tip-content h4 {
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.tip-content p {
  font-size: 16px;
  color: var(--text-mid);
  line-height: 1.5;
}
.section-title {
  font-family: 'Baloo 2', cursive;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title svg { width: 28px; height: 28px; flex-shrink: 0; }
.section-title::after {
  content: '';
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-light), var(--self-awareness), var(--social-awareness), var(--self-management), var(--relationship), var(--decision));
  opacity: 0.4;
}

/* ─── LESSON HEADER ─── */
.lesson-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  margin-bottom: 24px;
  border-radius: var(--r-xl);
  border: 3px solid transparent;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.lesson-header-image {
  width: 100px;
  height: 100px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.6);
  box-shadow: var(--shadow-sm);
}
.lesson-header-image img { width: 100%; height: 100%; object-fit: contain; }
.lesson-header-text { flex: 1; }
.lesson-header-text h2 { font-size: 28px; color: var(--text-dark); }
.lesson-header-text p { font-size: 16px; color: var(--text-mid); margin-top: 2px; }
.back-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  padding: 8px 18px;
  border-radius: var(--r-full);
  background: var(--white);
  color: var(--text-mid);
  font-family: 'Baloo 2', cursive;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid rgba(0,0,0,0.08);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s;
}
.back-btn:hover {
  background: var(--off-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ─── LESSON AREA ─── */
.lesson-area {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  min-height: 400px;
}

/* ─── FEEDBACK BAR ─── */
.feedback-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--white);
  border-radius: var(--r-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid rgba(0,0,0,0.04);
}
.score-display {
  font-family: 'Baloo 2', cursive;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.score-display svg { width: 20px; height: 20px; }
.progress-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: var(--r-circle);
  background: rgba(0,0,0,0.06);
  transition: all 0.3s;
}
.dot.hit { background: var(--social-awareness); box-shadow: 0 0 8px rgba(16,185,129,0.3); }
.dot.miss { background: var(--brand); box-shadow: 0 0 8px rgba(232,68,58,0.3); }

/* ─── ENCOURAGEMENT BAR ─── */
.encourage-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(209,250,229,0.6));
  border-radius: var(--r-md);
  border: 2px solid rgba(16,185,129,0.15);
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
}
.encourage-image {
  width: 56px;
  height: 56px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.encourage-image img { width: 100%; height: 100%; object-fit: contain; }
.encourage-bar p {
  font-size: 16px;
  color: var(--text-mid);
  font-weight: 700;
}

/* ─── LESSON CONTENT STYLES ─── */
.lesson-prompt {
  font-family: 'Baloo 2', cursive;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 8px;
}
.lesson-sub {
  font-size: 16px;
  color: var(--text-mid);
  text-align: center;
  margin-bottom: 24px;
  font-weight: 700;
}
.lesson-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}
.lesson-pick {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--off-white);
  border-radius: var(--r-md);
  border: 2px solid rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.3s ease;
}
.lesson-pick:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--self-awareness);
}
.lesson-recommended {
  border-color: var(--self-awareness);
  background: var(--self-awareness-light);
}
.lp-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.lp-icon img { width: 100%; height: 100%; object-fit: contain; }
.lp-info { flex: 1; }
.lp-title {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-dark);
}
.lp-meta {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 700;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lp-arrow {
  font-size: 18px;
  color: var(--text-light);
  transition: transform 0.3s;
}
.lesson-pick:hover .lp-arrow { transform: translateX(4px); color: var(--brand); }
.rec-badge {
  font-size: 11px;
  background: linear-gradient(135deg, var(--self-awareness), #F59E0B);
  color: var(--white);
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 800;
}
.grade-tag {
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 8px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─── QUIZ / OPTION BUTTONS ─── */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
}
.option-btn {
  font-family: 'Baloo 2', cursive;
  font-size: 20px;
  font-weight: 700;
  padding: 20px;
  border-radius: var(--r-md);
  border: 3px solid rgba(0,0,0,0.06);
  background: var(--white);
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}
.option-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--self-management);
}
.option-btn.correct {
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  border-color: var(--social-awareness);
  animation: popIn 0.3s;
}
.option-btn.wrong {
  background: linear-gradient(135deg, #FEE2E2, #FECACA);
  border-color: var(--brand);
  animation: shake 0.4s;
}
.option-btn.disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* ─── INSTRUCTIONAL CONTENT ─── */
.instruction-block {
  max-width: 640px;
  margin: 0 auto 28px;
  text-align: center;
}
.instruction-block .inst-image {
  width: 160px;
  height: 160px;
  margin: 0 auto 20px;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.instruction-block .inst-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.instruction-block h3 {
  font-size: 24px;
  margin-bottom: 12px;
}
.instruction-block p {
  font-size: 17px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 10px;
}
.instruction-steps {
  text-align: left;
  max-width: 500px;
  margin: 16px auto;
}
.inst-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.inst-step:last-child { border-bottom: none; }
.step-num {
  width: 32px;
  height: 32px;
  border-radius: var(--r-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 15px;
  color: var(--white);
  flex-shrink: 0;
}
.inst-step p {
  font-size: 16px;
  margin: 0;
  line-height: 1.5;
}
.next-section-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: var(--r-full);
  font-family: 'Baloo 2', cursive;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 4px 16px rgba(232,68,58,0.3);
  transition: all 0.25s;
  margin-top: 20px;
}
.next-section-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232,68,58,0.4);
}

/* ─── SCENARIO DISPLAY ─── */
.scenario-box {
  background: linear-gradient(135deg, #FEF3C7, #FFFBEB);
  border: 2px solid rgba(245,158,11,0.2);
  border-radius: var(--r-lg);
  padding: 24px;
  max-width: 560px;
  margin: 0 auto 24px;
  text-align: center;
}
.scenario-box p {
  font-size: 18px;
  color: var(--text-dark);
  line-height: 1.6;
  font-weight: 700;
}

/* ─── JOURNAL / REFLECTION ─── */
.journal-area {
  max-width: 560px;
  margin: 0 auto;
}
.journal-textarea {
  width: 100%;
  min-height: 140px;
  padding: 16px 20px;
  border-radius: var(--r-md);
  border: 2px solid rgba(0,0,0,0.08);
  background: var(--cream);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  resize: vertical;
  outline: none;
  transition: border-color 0.25s;
}
.journal-textarea:focus {
  border-color: var(--self-management);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* ─── CELEBRATION OVERLAY ─── */
.celebration {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.celeb-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 40px 50px;
  text-align: center;
  border: 3px solid var(--self-awareness);
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.5s ease;
  max-width: 480px;
  width: 90%;
}
.celeb-image {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.celeb-image img { width: 100%; height: 100%; object-fit: contain; }
.celeb-stars {
  font-size: 44px;
  margin-bottom: 12px;
  animation: starBurst 0.8s;
}
.celeb-card h2 {
  font-size: 30px;
  margin-bottom: 8px;
}
.celeb-card p {
  font-size: 18px;
  color: var(--text-mid);
  margin-bottom: 16px;
  line-height: 1.5;
}
.celeb-score {
  font-family: 'Baloo 2', cursive;
  font-size: 20px;
  color: var(--text-dark);
  margin-bottom: 20px;
}
.celeb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: var(--r-full);
  font-family: 'Baloo 2', cursive;
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 4px 16px rgba(232,68,58,0.3);
  transition: all 0.25s;
}
.celeb-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232,68,58,0.4);
}

/* ─── GRADE PICKER OVERLAY ─── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.overlay-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 40px;
  text-align: center;
  border: 3px solid var(--self-awareness);
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.4s ease;
  max-width: 550px;
  width: 90%;
}
.overlay-card h2 {
  font-size: 28px;
  margin: 16px 0 8px;
}
.overlay-card p {
  font-size: 17px;
  color: var(--text-mid);
  margin-bottom: 24px;
}
.overlay-image {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.overlay-image img { width: 100%; height: 100%; object-fit: contain; }
.grade-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.grade-btn {
  border-radius: var(--r-md);
  padding: 18px 12px;
  text-align: center;
  border: 3px solid rgba(0,0,0,0.06);
  background: var(--white);
  cursor: pointer;
  transition: all 0.3s;
}
.grade-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.grade-btn.grade-active {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}
.gb-icon { font-size: 28px; margin-bottom: 4px; display: block; }
.gb-label {
  font-family: 'Baloo 2', cursive;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  display: block;
}
.gb-sub {
  font-size: 12px;
  color: var(--text-mid);
  font-weight: 700;
  display: block;
}

/* ─── NAME INPUT ─── */
.name-input {
  font-family: 'Baloo 2', cursive;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  width: 100%;
  max-width: 320px;
  padding: 14px 20px;
  border: 3px solid var(--self-awareness);
  border-radius: var(--r-md);
  color: var(--text-dark);
  background: var(--cream);
  outline: none;
  transition: border-color 0.25s;
}
.name-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(232,68,58,0.1);
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Baloo 2', cursive;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: var(--r-full);
  color: var(--white);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 4px 16px rgba(232,68,58,0.3);
  transition: all 0.25s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232,68,58,0.4);
}
.btn-secondary {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--r-full);
  border: 2px solid var(--text-light);
  color: var(--text-mid);
  background: transparent;
  transition: all 0.25s;
}
.btn-secondary:hover {
  background: var(--off-white);
  border-color: var(--text-mid);
}

/* ─── DASHBOARD ─── */
.dash-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 34px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(219,234,254,0.6));
  border-radius: var(--r-xl);
  border: 3px solid rgba(59,130,246,0.12);
  box-shadow: var(--shadow-lg);
}
.dash-header-image {
  width: 100px;
  height: 100px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}
.dash-header-image img { width: 100%; height: 100%; object-fit: contain; }
.dash-header-text { flex: 1; }
.dash-header-text h2 { font-size: 28px; }
.dash-header-text p { font-size: 16px; color: var(--text-mid); margin-top: 2px; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  border-radius: var(--r-md);
  padding: 20px 16px;
  text-align: center;
  border: 2px solid transparent;
  transition: transform 0.3s;
}
.stat-card:hover { transform: translateY(-4px); }
.stat-icon { margin-bottom: 6px; }
.stat-icon svg { width: 28px; height: 28px; }
.stat-value {
  font-family: 'Baloo 2', cursive;
  font-size: 32px;
  font-weight: 800;
  color: var(--text-dark);
}
.stat-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.panel {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.panel-title {
  font-family: 'Baloo 2', cursive;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-dark);
}

/* ─── BADGES ─── */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.badge {
  text-align: center;
  padding: 12px 6px;
  border-radius: var(--r-sm);
  transition: transform 0.3s;
}
.badge:hover { transform: scale(1.08); }
.badge-earned {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 2px solid var(--self-awareness);
}
.badge-locked {
  background: #F1F5F9;
  border: 2px solid #E2E8F0;
  opacity: 0.4;
}
.badge-icon { font-size: 28px; margin-bottom: 2px; }
.badge-name { font-size: 12px; font-weight: 800; color: var(--text-dark); line-height: 1.2; }

/* ─── ACTIVITY LOG ─── */
.activity-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--off-white);
  border-radius: var(--r-sm);
  transition: all 0.2s;
}
.log-item:hover { background: var(--cream); transform: translateX(3px); }
.log-icon { width: 36px; height: 36px; border-radius: var(--r-sm); overflow: hidden; flex-shrink: 0; }
.log-icon img { width: 100%; height: 100%; object-fit: contain; }
.log-info { flex: 1; }
.log-name { font-weight: 800; font-size: 14px; color: var(--text-dark); }
.log-time { font-size: 12px; color: var(--text-light); }
.log-score {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 14px;
  color: var(--social-awareness);
  background: #D1FAE5;
  padding: 4px 10px;
  border-radius: 10px;
}

/* ─── RING PROGRESS ─── */
.ring { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ring-label { position: absolute; font-family: 'Baloo 2', cursive; font-weight: 700; color: var(--text-dark); }

/* ─── LOADING ─── */
.loading {
  text-align: center;
  padding: 40px;
  font-family: 'Baloo 2', cursive;
  font-size: 18px;
  color: var(--text-mid);
}
.loading::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid var(--self-awareness);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

/* ─── FOOTER NOTE ─── */
.footer-note {
  text-align: center;
  padding: 14px 20px;
  background: rgba(255,255,255,0.6);
  border-radius: var(--r-sm);
  border: 1px solid rgba(0,0,0,0.04);
  margin-top: 12px;
}
.footer-note p {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 700;
}

/* ─── PREMIUM LOCK ─── */
.premium-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: var(--white);
  font-family: 'Baloo 2', cursive;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; height: 60px; flex-wrap: wrap; }
  .nav-links { display: none; }
  .nav-pills { gap: 6px; }
  .hero { flex-direction: column; text-align: center; padding: 24px 20px 0; gap: 12px; min-height: auto; }
  .hero-text { padding-bottom: 16px; }
  .hero-text h2 { font-size: 24px; }
  .hero-sub { margin: 0 auto 12px; }
  .hero-goals { justify-content: center; }
  .hero-img { width: 260px; max-width: 260px; max-height: 220px; }
  .comp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .act-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .dash-panels { grid-template-columns: 1fr; }
  .dash-header { flex-direction: column; text-align: center; }
  .lesson-header { flex-direction: column; text-align: center; }
  .options-grid { grid-template-columns: 1fr; }
  .grade-btns { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 20px; }
  .main-content { padding: 16px 12px; }
  .tip-banner { flex-direction: column; align-items: center; text-align: center; padding: 20px 20px 0; }
  .tip-img { width: 70px; }
  .tip-content { padding-bottom: 16px; }
}

/* ─── PAGE VISIBILITY ─── */
.page { display: none; }
.page.active { display: block; }
