/* ========== DESIGN SYSTEM ========== */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-50: #eff6ff;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --pink: #ec4899;
  --pink-light: #fce7f3;
  --indigo: #6366f1;
  --indigo-light: #e0e7ff;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --nav-height: 60px;
  --header-height: 56px;
  --font-hi: 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans Devanagari', sans-serif;
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:active { opacity: .8; }
img { max-width: 100%; display: block; }
button { font: inherit; border: none; background: none; cursor: pointer; }
input[type="checkbox"] { cursor: pointer; }

/* ========== UTILITY ========== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.container { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.fade-in { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ========== APP SHELL ========== */
#app {
  padding-bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom, 0px));
  min-height: 100dvh;
}

/* ========== HEADER ========== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  padding: env(safe-area-inset-top, 0px) 12px 0;
  gap: 8px;
}
.header-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text);
  flex-shrink: 0;
}
.header-back:active { background: var(--border-light); }
.header-back svg { width: 20px; height: 20px; }
.header-title {
  flex: 1;
  min-width: 0;
  font-size: .92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-brand {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.5px;
}
.header-lang {
  font-size: .72rem;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.header-lang:active { background: var(--border-light); }

/* ========== BOTTOM NAV ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  height: var(--nav-height);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  font-size: .65rem;
  color: var(--text-tertiary);
  padding: 6px 0;
  transition: color .15s;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { stroke-width: 2.5; }

/* ========== HOME PAGE ========== */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
  color: #fff;
  padding: 32px 20px 28px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}
.hero h1 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
}
.hero .subtitle-hi {
  font-size: 1rem;
  opacity: .9;
  font-weight: 500;
  margin-bottom: 8px;
}
.hero p {
  font-size: .82rem;
  opacity: .75;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.5;
}

.stats-strip {
  display: flex;
  gap: 2px;
  margin: -16px 16px 12px;
  position: relative;
  z-index: 10;
}
.stat-card {
  flex: 1;
  background: var(--card);
  padding: 12px 8px;
  text-align: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .1s;
}
.stat-card:active { transform: scale(.96); opacity: 1; }
.stat-card:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.stat-card:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.stat-card .stat-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: .62rem;
  color: var(--text-secondary);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 500;
}

.section-title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 20px 16px 8px;
}

/* ========== COURSE CARD (HOME) ========== */
.course-card {
  background: var(--card);
  margin: 8px 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: block;
  transition: transform .15s, box-shadow .15s;
  border-left: 4px solid var(--primary);
}
.course-card.year-1 { border-left-color: #2563eb; }
.course-card.year-2 { border-left-color: #0891b2; }
.course-card:active {
  transform: scale(.98);
  box-shadow: var(--shadow-sm);
}
.course-card-top {
  padding: 18px 20px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.course-card-top-main {
  flex: 1;
  min-width: 0;
}
.course-card-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: .65rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.course-card-top h3 { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.course-card-top .course-title-hi {
  font-size: .82rem;
  opacity: .88;
  margin-top: 4px;
  line-height: 1.35;
}
.course-year-badge {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.35);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  text-align: center;
}
.course-year-badge.year-1 {
  background: rgba(255,255,255,.22);
  border-color: rgba(191,219,254,.55);
}
.course-year-badge.year-2 {
  background: rgba(255,255,255,.2);
  border-color: rgba(165,243,252,.55);
}
.course-year-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}
.course-year-text {
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 4px;
  line-height: 1.2;
  opacity: .95;
  max-width: 72px;
}
.lang-hi .course-year-text {
  font-size: .68rem;
  text-transform: none;
  letter-spacing: 0;
}
.course-card-bottom {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-width: 0;
  font-size: .75rem;
  color: var(--text-secondary);
}
.course-meta span { display: flex; align-items: center; gap: 4px; }
.course-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.course-arrow svg { width: 16px; height: 16px; }

/* ========== COURSE DETAIL PAGE ========== */
.course-hero {
  padding: 24px 20px;
  color: #fff;
  text-align: center;
}
.course-hero h2 { font-size: 1.15rem; font-weight: 700; }
.course-hero .course-hi { font-size: .88rem; opacity: .85; margin-top: 2px; }
.course-hero .course-desc { font-size: .78rem; opacity: .7; margin-top: 8px; max-width: 440px; margin-left: auto; margin-right: auto; }

.course-progress-bar {
  margin: -10px 16px 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 14px 16px;
  position: relative;
  z-index: 10;
}
.cpb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.cpb-label { font-size: .78rem; font-weight: 600; }
.cpb-pct { font-size: .78rem; font-weight: 700; color: var(--primary); }
.cpb-track {
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.cpb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  border-radius: var(--radius-full);
  transition: width .4s ease;
}

/* ========== STUDY GUIDE CARD ========== */
.study-guide-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 14px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.study-guide-card:active { transform: scale(.99); }
.sg-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
}
.sg-icon svg { width: 20px; height: 20px; }
.sg-info { flex: 1; min-width: 0; }
.sg-title { font-size: .9rem; font-weight: 700; }
.sg-sub { font-size: .72rem; color: var(--text-secondary); margin-top: 2px; }
.sg-arrow {
  flex-shrink: 0;
  color: var(--primary);
}
.sg-arrow svg { width: 20px; height: 20px; }

/* ========== SUBJECT LIST (COURSE PAGE) ========== */
.month-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 6px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.month-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.subject-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: 4px 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: transform .1s;
}
.subject-item:active { transform: scale(.98); }
.subj-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.subj-info { flex: 1; min-width: 0; }
.subj-info h4 { font-size: .85rem; font-weight: 600; line-height: 1.3; }
.subj-info .subj-hi { font-size: .72rem; color: var(--text-secondary); }
.subj-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}
.subj-progress-track {
  flex: 1;
  height: 4px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.subj-progress-fill {
  height: 100%;
  background: var(--success);
  border-radius: var(--radius-full);
  transition: width .3s;
}
.subj-progress-text {
  font-size: .65rem;
  color: var(--text-tertiary);
  font-weight: 600;
  white-space: nowrap;
}
.subj-chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.subj-chevron svg { width: 18px; height: 18px; }

/* ========== SUBJECT DETAIL PAGE ========== */
.subj-hero {
  padding: 20px;
  color: #fff;
}
.subj-hero h2 { font-size: 1.1rem; font-weight: 700; }
.subj-hero .subj-hero-hi { font-size: .85rem; opacity: .85; margin-top: 2px; }
.subj-hero .subj-hero-desc { font-size: .78rem; opacity: .7; margin-top: 6px; }

/* ========== CHAPTER ACCORDION ========== */
.chapter-card {
  background: var(--card);
  margin: 8px 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.chapter-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.chapter-header:active { background: var(--border-light); }
.ch-week-badge {
  font-size: .6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary-dark);
  white-space: nowrap;
  flex-shrink: 0;
}
.ch-info { flex: 1; min-width: 0; }
.ch-info h4 { font-size: .85rem; font-weight: 600; }
.ch-info .ch-hi { font-size: .72rem; color: var(--text-secondary); }
.ch-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}
.ch-progress-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  max-width: 120px;
}
.ch-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width .3s;
}
.ch-progress-text {
  font-size: .62rem;
  color: var(--text-tertiary);
  font-weight: 600;
  white-space: nowrap;
}
.ch-week-done {
  background: var(--success-light) !important;
  color: #065f46 !important;
}
.ch-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  transition: transform .2s ease;
  flex-shrink: 0;
}
.chapter-card.open .ch-chevron { transform: rotate(180deg); }
.chapter-body {
  display: none;
  padding: 0 16px 16px;
  animation: fadeIn .2s ease;
}
.chapter-card.open .chapter-body { display: block; }

/* ========== SECTION LABELS ========== */
.sec-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
  margin: 14px 0 6px;
}
.sec-label:first-child { margin-top: 0; }

/* ========== VIDEO CARDS ========== */
.vid-card {
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  transition: border-color .2s, background .2s;
}
.vid-card:last-child { margin-bottom: 0; }
.vid-card.vid-done {
  background: var(--success-light);
  border-color: #a7f3d0;
}
.vid-card-top { margin-bottom: 10px; }
.vid-link {
  font-size: .84rem;
  color: var(--primary);
  text-decoration: none;
  line-height: 1.4;
  word-break: break-word;
  font-weight: 500;
}
.vid-link:active { color: var(--primary-dark); }
.vid-done .vid-link { color: #065f46; }
.vid-note {
  display: block;
  font-size: .72rem;
  color: var(--text-tertiary);
  margin-top: 3px;
}
.vid-done .vid-note { color: #047857; }
.vid-card-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vid-watch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
  white-space: nowrap;
}
.vid-watch-btn:active { background: var(--primary-dark); opacity: 1; }
.vid-done .vid-watch-btn { background: #047857; }
.vid-done-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  padding: 8px 16px;
  background: var(--card);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.vid-done-btn:active { background: var(--border-light); }
.vid-done-btn.is-done {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.vid-done-btn.is-done:active { background: #059669; }

/* ========== ARTICLE SECTION ========== */
.article-section {
  background: var(--primary-50);
  border: 1px solid var(--primary-light);
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0 6px;
}
.article-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.article-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  flex-shrink: 0;
}
.atog-btn {
  font-size: .68rem;
  font-weight: 600;
  padding: 4px 12px;
  background: var(--card);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.atog-btn:first-child { border-right: 1px solid var(--border); }
.atog-btn.atog-active {
  background: var(--primary);
  color: #fff;
}
.atog-btn:active { opacity: .8; }
.article-text {
  font-size: .84rem;
  line-height: 1.7;
  color: var(--text);
  padding: 2px 0 8px;
}
.article-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--primary-light);
}
.article-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: .8rem;
  transition: background .1s;
}
.article-link:active { background: var(--border-light); opacity: 1; }
.al-badge {
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  letter-spacing: .3px;
}
.al-hi { background: #fef3c7; color: #92400e; }
.al-en { background: var(--primary-light); color: var(--primary-dark); }
.al-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.al-arrow {
  color: var(--text-tertiary);
  font-size: .75rem;
  flex-shrink: 0;
}

/* ========== TOPIC PILLS ========== */
.topics-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.topic-pill {
  font-size: .72rem;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  line-height: 1.35;
  font-weight: 500;
}

/* ========== RESOURCE LINKS ========== */
.res-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--border-light);
  border-radius: 8px;
  margin-top: 6px;
  font-size: .8rem;
  color: var(--text);
  border: 1px solid var(--border);
}
.res-link:active { background: var(--border); }
.res-link .res-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ========== TIP BOX ========== */
.tip-box {
  background: var(--accent-light);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: .78rem;
  margin-top: 10px;
  line-height: 1.5;
  border-left: 3px solid var(--accent);
}
.tip-box strong { color: #92400e; }

/* ========== SCHEDULE PAGE ========== */
.sched-card {
  background: var(--card);
  margin: 10px 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}
.sched-card h3 {
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sched-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .82rem;
}
.sched-row:last-child { border-bottom: none; }
.sched-time {
  font-weight: 700;
  color: var(--primary);
  min-width: 48px;
  font-size: .75rem;
}
.sched-act { flex: 1; }
.sched-dur {
  font-size: .68rem;
  color: var(--text-tertiary);
  background: var(--border-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
}

/* ========== TABLE ========== */
.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
}
table { width: 100%; border-collapse: collapse; font-size: .76rem; min-width: 420px; }
th {
  background: var(--primary);
  color: #fff;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
tr:nth-child(even) td { background: #fafbfc; }

/* ========== EXAM & BOOKS PAGE ========== */
.info-card {
  background: var(--card);
  margin: 10px 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}
.info-card h3 {
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.exam-note {
  font-size: .78rem;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--accent-light);
  border-radius: 8px;
  line-height: 1.6;
}
.tab-context {
  margin: 12px 12px 0;
  padding: 12px 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
}
.tab-context-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.tab-context-sub {
  font-size: .8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.exam-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 12px 0;
}
.exam-summary-item {
  font-size: .75rem;
  font-weight: 600;
  padding: 6px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
}

.book-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .82rem;
}
.book-item:last-child { border-bottom: none; }
.book-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.book-title { font-weight: 600; font-size: .82rem; }
.book-author { font-size: .72rem; color: var(--text-secondary); }
.book-subject {
  font-size: .68rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 2px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 6px;
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background .1s;
}
.channel-item:last-child { margin-bottom: 0; }
.channel-item:active { background: var(--border); opacity: 1; }
.channel-icon {
  width: 36px;
  height: 36px;
  background: #ff0000;
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}
.channel-info { flex: 1; min-width: 0; }
.channel-name { font-weight: 600; font-size: .85rem; }
.channel-desc { font-size: .72rem; color: var(--text-secondary); }
.channel-arrow { color: var(--text-tertiary); font-size: .85rem; flex-shrink: 0; }

/* ========== TIPS LIST ========== */
.tip-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: .82rem;
  line-height: 1.55;
}
.tip-item:last-child { border-bottom: none; }
.tip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: .68rem;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ========== GAMIFICATION PREP ========== */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 700;
}

/* ========== COMING SOON OVERLAY ========== */
.coming-soon {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-tertiary);
}
.coming-soon-icon { font-size: 3rem; margin-bottom: 12px; }
.coming-soon h3 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 4px; }
.coming-soon p { font-size: .82rem; }

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-state-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.empty-state p { font-size: .85rem; color: var(--text-secondary); }

/* ========== LANG TOGGLE ========== */
.lang-hi .show-en { display: none !important; }
.lang-en .show-hi { display: none !important; }

/* ========== RESPONSIVE ========== */
@media (min-width: 640px) {
  .container { max-width: 600px; }
  .hero h1 { font-size: 1.8rem; }
  .stats-strip { max-width: 600px; margin-left: auto; margin-right: auto; }
  .course-card, .subject-item, .chapter-card, .sched-card, .info-card,
  .tab-context, .exam-summary, .study-guide-card, .course-progress-bar {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  .month-label, .section-title {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 1024px) {
  .container { max-width: 720px; }
}

/* ========== PRODUCT TOUR ========== */
.tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(0,0,0,.55);
  opacity: 0;
  animation: tourFadeIn .3s ease forwards;
}
@keyframes tourFadeIn { to { opacity: 1; } }

.tour-highlighted {
  position: relative;
  z-index: 9991 !important;
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(255,255,255,.5), 0 0 24px 4px rgba(37,99,235,.35) !important;
  transition: box-shadow .3s ease;
}

.tour-tip {
  position: fixed;
  z-index: 9995;
  background: var(--card);
  border-radius: 16px;
  padding: 22px 20px 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2), 0 0 0 1px rgba(0,0,0,.06);
  opacity: 0;
  transform: translateY(10px) scale(.97);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  max-width: 340px;
  width: calc(100vw - 32px);
}
.tour-tip.tour-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.tour-tip.tour-centered {
  top: 50% !important;
  left: 50% !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: calc(100vw - 48px);
  max-width: 360px;
  text-align: center;
}
.tour-tip.tour-centered.tour-visible {
  transform: translate(-50%, -50%) !important;
}

.tour-emoji {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 8px;
}
.tour-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.tour-step-text {
  font-size: .84rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}
.tour-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}
.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all .2s ease;
}
.tour-dot.active {
  background: var(--primary);
  width: 20px;
  border-radius: 4px;
}
.tour-dot.done {
  background: var(--success);
}
.tour-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.tour-btn-skip {
  font-size: .8rem;
  color: var(--text-tertiary);
  background: none;
  border: none;
  padding: 8px 4px;
  cursor: pointer;
  font-weight: 500;
}
.tour-btn-skip:active { color: var(--text-secondary); }
.tour-btn-next {
  flex: 1;
  max-width: 180px;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background .15s;
  margin-left: auto;
}
.tour-btn-next:active { background: var(--primary-dark); }

.tour-tip::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--card);
  transform: rotate(45deg);
  top: -6px;
  left: calc(50% - 7px);
  box-shadow: -1px -1px 2px rgba(0,0,0,.04);
}
.tour-tip.tour-centered::before { display: none; }

/* ========== CELEBRATIONS ========== */
.celeb-container {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  overflow: hidden;
}
.celeb-popup {
  position: fixed;
  z-index: 10001;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%) scale(.6);
  background: var(--card);
  border-radius: 20px;
  padding: 24px 28px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.04);
  opacity: 0;
  transition: opacity .25s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
  max-width: 300px;
  width: calc(100vw - 48px);
}
.celeb-popup.celeb-in {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.celeb-popup.celeb-out {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.8);
  transition: opacity .2s ease, transform .2s ease;
}
.celeb-emoji {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 8px;
}
.celeb-tier-2 .celeb-emoji { font-size: 3rem; }
.celeb-tier-3 .celeb-emoji { font-size: 3.5rem; }
.celeb-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.celeb-tier-2 .celeb-title { font-size: 1.2rem; }
.celeb-tier-3 .celeb-title { font-size: 1.35rem; }
.celeb-subtitle {
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.celeb-tier-2 { border: 2px solid var(--accent); }
.celeb-tier-3 {
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, #fffbeb, #fff);
}
