/* ===== LEARN PAGE — Interactive Lesson Engine ===== */

:root {
  --primary:  #6366f1;
  --secondary:#8b5cf6;
  --accent:   #ec4899;
  --green:    #10b981;
  --red:      #ef4444;
  --amber:    #f59e0b;
  --dark:     #1a1a2e;
  --muted:    #64748b;
  --card-bg:  rgba(255,255,255,0.82);
  --card-border: rgba(255,255,255,0.55);
  --radius:   24px;
  --spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth:   cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background: #ffffff;
  min-height: 100vh;
  font-family: 'Nunito', sans-serif;
  margin: 0; padding: 0;
  color: #1e293b;
}

/* ===== TOP BAR ===== */
.learn-topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}
.learn-back {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.9rem;
  color: var(--primary); cursor: pointer;
  padding: 6px 10px; border-radius: 12px;
  transition: background 0.2s;
  white-space: nowrap;
}
.learn-back:hover { background: rgba(99,102,241,0.08); }
.learn-back svg { width: 18px; height: 18px; }
.learn-title {
  flex: 1; font-size: 1rem; font-weight: 800; color: var(--dark);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.learn-context {
  flex-shrink: 0;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  color: #312e81;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(99,102,241,0.12);
}
.topbar-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.hearts-display {
  display: flex; gap: 2px; align-items: center; font-size: 1.1rem;
}
.chapter-pick-btn {
  background: rgba(99,102,241,0.08); border: none; border-radius: 8px;
  padding: 5px 8px; font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.chapter-pick-btn:hover { background: rgba(99,102,241,0.16); }
.hearts-display.heart-shake {
  animation: heartShake 0.4s ease;
}
@keyframes heartShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  40%      { transform: translateX(5px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.learn-phase-badge {
  font-size: 0.72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; text-transform: uppercase; letter-spacing: 0.5px;
}

/* ===== PROGRESS BAR ===== */
.learn-progress-wrap {
  height: 5px; background: #e2e8f0;
}
.learn-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  border-radius: 4px;
  transition: width 0.5s var(--smooth);
}

/* ===== CONTAINER ===== */
.learn-container {
  max-width: 640px; margin: 0 auto;
  padding: 20px 16px 100px;
  position: relative; z-index: 1;
}

/* ===== STEP COUNTER ===== */
.step-counter {
  text-align: center; font-size: 0.8rem; font-weight: 700;
  color: var(--muted); margin-bottom: 12px; letter-spacing: 0.5px;
}

/* ===== BASE STEP CARD ===== */
.step-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  padding: 32px 24px 28px;
  transition: opacity 0.35s var(--smooth), transform 0.35s var(--smooth);
}
.step-card.step-entering {
  opacity: 0;
  transform: translateY(22px);
}

/* ===== INTRODUCE CARD ===== */
.introduce-card {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.intro-emoji {
  font-size: 3.5rem; line-height: 1;
  animation: emojiBounce 0.5s var(--spring);
}
@keyframes emojiBounce {
  0%  { transform: scale(0); }
  60% { transform: scale(1.15); }
  100%{ transform: scale(1); }
}
.intro-word {
  font-size: 2rem; font-weight: 900; color: var(--dark);
  margin-top: 4px; line-height: 1.4;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}
.intro-trans {
  font-size: 1.15rem; font-weight: 700; color: var(--muted);
}
.intro-hint {
  font-size: 0.9rem; font-weight: 600; color: #94a3b8;
  background: rgba(99,102,241,0.06);
  padding: 6px 14px; border-radius: 12px;
}
.listen-btn {
  margin-top: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px;
  background: rgba(99,102,241,0.1);
  border: 1.5px solid rgba(99,102,241,0.25);
  border-radius: 14px;
  font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 700;
  color: var(--primary); cursor: pointer;
  transition: all 0.2s var(--spring);
}
.listen-btn:hover { background: rgba(99,102,241,0.16); transform: translateY(-1px); }
.gotit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; border: none; border-radius: 16px;
  font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(99,102,241,0.32);
  transition: all 0.25s var(--spring);
}
.gotit-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(99,102,241,0.4); }
.gotit-btn:active { transform: scale(0.97); }

/* ===== TEXTBOOK PAGE TUTOR ===== */
.textbook-page-card {
  padding: 22px 18px 24px;
}
.textbook-page-card {
  max-width: 1360px;
  width: min(1360px, calc(100vw - 24px));
  margin-left: 50%;
  transform: translateX(-50%);
}
.textbook-page-card.step-entering {
  transform: translateX(-50%) translateY(22px);
}
.page-tutor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.page-tutor-grid {
  display: grid;
  grid-template-columns: minmax(720px, 1.45fr) minmax(360px, .85fr);
  gap: 16px;
  align-items: start;
}
.textbook-page-shell {
  background: #fffdf7;
  border: 1px solid #eadfca;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(120, 92, 45, 0.10);
  padding: 16px 14px;
}
.textbook-page-label {
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
  font-size: .82rem;
  font-weight: 900;
  color: #8a5a12;
  margin-bottom: 10px;
  text-align: center;
}
.textbook-page-image-wrap {
  position: relative;
  background: #ffffff;
  border: 1px solid #e7dcc8;
  border-radius: 6px;
  overflow: auto;
  max-height: 78vh;
}
.textbook-page-image {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}
.textbook-page-image-missing {
  display: none;
  padding: 18px 12px;
  color: #92400e;
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: 6px;
  font-weight: 800;
  text-align: center;
  line-height: 1.45;
}
.textbook-page-image-wrap.image-missing .textbook-page-image {
  display: none;
}
.textbook-page-image-wrap.image-missing .textbook-page-image-missing {
  display: block;
}
.textbook-page-line-label {
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
  font-size: .82rem;
  color: #64748b;
  font-weight: 900;
  margin: 8px 0;
  text-align: center;
}
.textbook-page-text {
  display: grid;
  gap: 7px;
  max-height: 30vh;
  overflow: auto;
  padding-right: 3px;
}
.page-line-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 7px;
  color: #1f2937;
  cursor: pointer;
  text-align: left;
}
.page-line-btn:hover,
.page-line-btn.active {
  background: #fff7ed;
  border-color: #fed7aa;
}
.page-line-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ede9fe;
  color: #6d28d9;
  font-size: .75rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.page-line-text {
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.45;
}
.page-tutor-panel {
  margin-top: 0;
  position: sticky;
  top: 76px;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 96px);
  overflow: auto;
}
.page-line-picker {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}
.page-panel-detail {
  min-height: 180px;
}
.page-panel-empty,
.page-panel-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
}
.page-panel-empty {
  color: #64748b;
  font-weight: 800;
  text-align: center;
}
.page-panel-label {
  margin-top: 12px;
  margin-bottom: 5px;
  font-size: .76rem;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
}
.page-panel-label:first-child {
  margin-top: 0;
}
.page-panel-sanskrit {
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
  font-size: 1.14rem;
  font-weight: 900;
  line-height: 1.7;
  color: #111827;
}
.page-panel-hindi,
.page-panel-text,
.page-grammar-list,
.page-mini-practice {
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
  color: #374151;
  font-size: .98rem;
  font-weight: 700;
  line-height: 1.6;
}
.page-panel-hindi {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px;
  color: #14532d;
}
.page-word-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.page-word-grid span {
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
  background: #faf5ff;
  border: 1px solid #ddd6fe;
  color: #4c1d95;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: .86rem;
  font-weight: 800;
}
.page-grammar-list {
  display: grid;
  gap: 5px;
}
.page-mini-practice {
  margin-top: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: 8px;
  padding: 10px;
}

@media (max-width: 860px) {
  .textbook-page-card {
    width: auto;
    margin-left: 0;
    transform: none;
  }
  .textbook-page-card.step-entering {
    transform: translateY(22px);
  }
  .page-tutor-grid {
    grid-template-columns: 1fr;
  }
  .textbook-page-image-wrap {
    max-height: 76vh;
  }
  .textbook-page-image {
    min-width: 680px;
  }
  .page-tutor-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .textbook-page-text {
    max-height: 34vh;
  }
}

/* ===== CHOICE / FILL CARD ===== */
.choice-emoji {
  font-size: 5rem; line-height: 1; margin-bottom: 8px;
}
.choice-instr {
  font-size: 0.78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--secondary); margin-bottom: 10px;
}
.choice-question {
  font-size: 1.3rem; font-weight: 800; color: var(--dark);
  line-height: 1.4; margin-bottom: 24px;
}
.choice-question .hl {
  color: var(--primary);
  background: rgba(99,102,241,0.1);
  padding: 1px 6px; border-radius: 6px;
}
.choice-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.choice-option {
  padding: 14px 12px;
  background: rgba(255,255,255,0.92);
  border: 2px solid #e2e8f0; border-radius: 16px;
  font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 700;
  color: #334155; cursor: pointer;
  transition: all 0.2s var(--spring);
  text-align: center; line-height: 1.3;
}
.choice-option:hover:not(.disabled) {
  border-color: var(--primary);
  background: rgba(99,102,241,0.07);
  transform: translateY(-2px);
}
.choice-option:active:not(.disabled) { transform: scale(0.97); }
.choice-option.correct {
  border-color: var(--green) !important;
  background: rgba(16,185,129,0.12) !important;
  color: #065f46 !important;
  animation: correctPulse 0.5s ease;
}
.choice-option.wrong {
  border-color: var(--red) !important;
  background: rgba(239,68,68,0.08) !important;
  color: var(--red) !important;
  animation: wrongShake 0.4s ease;
}
.choice-option.show-correct {
  border-color: var(--green) !important;
  background: rgba(16,185,129,0.12) !important;
  color: #065f46 !important;
}
.choice-option.disabled { pointer-events: none; opacity: 0.65; }

@keyframes correctPulse {
  0%  { box-shadow: 0 0 0 0 rgba(16,185,129,0.45); }
  50% { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
  100%{ box-shadow: none; }
}
@keyframes wrongShake {
  0%,100%{ transform: translateX(0); }
  20%    { transform: translateX(-7px); }
  40%    { transform: translateX(7px); }
  60%    { transform: translateX(-5px); }
  80%    { transform: translateX(5px); }
}

.choice-feedback {
  min-height: 28px; margin-top: 16px;
  font-size: 1.05rem; font-weight: 800; text-align: center;
}
.choice-feedback.correct { color: var(--green); }
.choice-feedback.wrong   { color: var(--red); }

/* ===== FILL BLANK CARD ===== */
.fill-sentence {
  font-size: 1.45rem; font-weight: 800; color: var(--dark);
  text-align: center; margin-bottom: 6px; line-height: 1.5;
}
.blank-slot {
  display: inline-block;
  border-bottom: 3px solid var(--primary);
  color: transparent; min-width: 60px;
  margin: 0 4px;
}
.fill-hint {
  font-size: 0.92rem; font-weight: 600; color: #94a3b8;
  text-align: center; margin-bottom: 22px;
  font-style: italic;
}

/* ===== MATCH FOLLOWING CARD ===== */
.match-card {
  max-width: 760px;
}
.match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.match-col {
  display: grid;
  gap: 8px;
  align-content: start;
}
.match-col-title {
  font-size: .78rem;
  font-weight: 900;
  color: var(--secondary);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 2px;
}
.match-item {
  min-height: 48px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.94);
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
  font-size: .98rem;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  transition: all .18s var(--spring);
}
.match-item:hover:not(.matched) {
  border-color: var(--primary);
  background: rgba(99,102,241,.07);
}
.match-item.selected {
  border-color: var(--primary);
  background: rgba(99,102,241,.13);
  color: var(--primary);
}
.match-item.matched {
  border-color: var(--green);
  background: rgba(16,185,129,.12);
  color: #065f46;
  cursor: default;
}
.match-item.wrong {
  border-color: var(--red);
  background: rgba(239,68,68,.09);
  color: var(--red);
}

/* ===== ARRANGE CARD ===== */
.arrange-hint {
  font-size: 0.92rem; font-weight: 600; color: #94a3b8;
  text-align: center; margin-bottom: 14px; font-style: italic;
}
.arrange-answer {
  min-height: 52px;
  border: 2px dashed rgba(99,102,241,0.35);
  border-radius: 16px; padding: 12px 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-bottom: 14px;
  background: rgba(99,102,241,0.03);
}
.arrange-placeholder {
  color: #94a3b8; font-size: 0.9rem; font-weight: 600; font-style: italic;
}
.placed-word {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  border: 1.5px solid rgba(99,102,241,0.3);
  border-radius: 12px;
  font-size: 0.95rem; font-weight: 700; color: var(--primary);
  cursor: pointer;
  transition: all 0.2s var(--spring);
}
.placed-word:hover { background: rgba(239,68,68,0.1); border-color: var(--red); color: var(--red); }
.placed-word:hover::after { content: ' ✕'; font-size: 0.75rem; opacity: 0.7; }
.arrange-pool {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-bottom: 16px;
}
.word-tile {
  padding: 8px 16px;
  background: rgba(255,255,255,0.92);
  border: 2px solid #e2e8f0; border-radius: 14px;
  font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 700;
  color: #334155; cursor: pointer;
  transition: all 0.2s var(--spring);
}
.word-tile:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.word-tile:disabled { opacity: 0.35; cursor: default; }
.arrange-actions {
  display: flex; gap: 10px; justify-content: center;
}
.arrange-clear {
  padding: 9px 20px;
  background: rgba(239,68,68,0.08); border: 1.5px solid rgba(239,68,68,0.2);
  border-radius: 12px;
  font-family: 'Nunito', sans-serif; font-size: 0.9rem; font-weight: 700;
  color: var(--red); cursor: pointer;
  transition: all 0.2s;
}
.arrange-clear:hover { background: rgba(239,68,68,0.14); }
.arrange-check {
  padding: 9px 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none; border-radius: 12px;
  font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 800;
  color: #fff; cursor: pointer;
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
  transition: all 0.2s var(--spring);
}
.arrange-check:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(99,102,241,0.4); }
.arrange-check:disabled { opacity: 0.45; cursor: default; box-shadow: none; }

/* ===== LOADING STATE ===== */
.learn-loading { text-align: center; padding: 60px 20px; }
.learn-loading-icon { font-size: 3rem; animation: spin 1.2s linear infinite; margin-bottom: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.learn-loading-text { font-size: 1.05rem; font-weight: 700; color: var(--muted); }

/* ===== ERROR STATE ===== */
.learn-error { display: none; text-align: center; padding: 60px 20px; }
.learn-error-icon { font-size: 3rem; margin-bottom: 12px; }
.learn-error-msg { font-size: 1.05rem; font-weight: 700; color: var(--muted); margin-bottom: 16px; }

/* ===== COMING SOON STATE ===== */
.learn-coming-soon { text-align: center; padding: 60px 20px; }
.coming-soon-icon  { font-size: 3.5rem; margin-bottom: 12px; }
.coming-soon-title { font-size: 1.4rem; font-weight: 900; color: var(--dark); margin-bottom: 8px; }
.coming-soon-text  { font-size: 1rem; font-weight: 600; color: var(--muted); }

/* ===== SCORE SCREEN ===== */
.score-screen { display: none; text-align: center; }
.score-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  padding: 40px 24px;
}
.score-emoji { font-size: 4rem; margin-bottom: 10px; animation: scoreBounce 0.6s var(--spring); }
@keyframes scoreBounce { 0%{transform:scale(0)} 60%{transform:scale(1.3)} 100%{transform:scale(1)} }
.score-grade {
  font-size: 2.5rem; font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 8px;
}
.score-text { font-size: 1.1rem; font-weight: 700; color: #475569; margin-bottom: 6px; }
.score-xp   { font-size: 1rem;   font-weight: 800; color: var(--secondary); margin-bottom: 24px; }
.score-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.score-btn {
  padding: 12px 28px; border: none; border-radius: 16px;
  font-family: 'Nunito', sans-serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.25s var(--spring);
}
.score-btn:hover { transform: translateY(-2px); }
.score-btn.primary  { background: linear-gradient(135deg, var(--primary), var(--secondary)); color:#fff; box-shadow: 0 4px 16px rgba(99,102,241,0.3); }
.score-btn.secondary{ background: rgba(99,102,241,0.08); color: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .learn-topbar  { padding: 8px 10px; gap: 6px; }
  .learn-title   { font-size: 0.88rem; }
  .learn-context { font-size: 0.82rem; padding: 5px 8px; max-width: 58vw; overflow: hidden; text-overflow: ellipsis; }
  .learn-phase-badge { font-size: 0.66rem; padding: 3px 8px; }
  .hearts-display { font-size: 0.95rem; }
  .learn-container { padding: 14px 10px 80px; }
  .step-card     { padding: 24px 16px 22px; }
  .intro-word    { font-size: 1.7rem; }
  .choice-question { font-size: 1.1rem; }
  .choice-options { grid-template-columns: 1fr; }
  .match-grid { grid-template-columns: 1fr; }
  .fill-sentence { font-size: 1.2rem; }
  .score-actions { flex-direction: column; }
  .score-btn     { width: 100%; }
}

/* ===== EXPLAIN CARD ===== */
.explain-card {
  background: linear-gradient(145deg, #fff7ed, #fef3c7, #fffbeb);
  border: 1.5px solid rgba(245,158,11,0.22);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.explain-emoji {
  font-size: 2.8rem;
  text-align: center;
  animation: emojiBounce 0.5s var(--spring);
}

.explain-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: #92400e;
  text-align: center;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
  line-height: 1.3;
}

.explain-kicker {
  align-self: center;
  width: fit-content;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(49,46,129,0.09);
  border: 1px solid rgba(49,46,129,0.16);
  color: #312e81;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.teacher-script {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(120,113,108,0.14);
  border-left: 4px solid #312e81;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15,23,42,0.05);
}

.teacher-script p {
  margin: 0;
  color: #292524;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.65;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.grammar-core-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(49,46,129,0.12), rgba(14,165,233,0.1));
  border: 1px solid rgba(49,46,129,0.18);
}

.grammar-core-label {
  padding: 4px 9px;
  border-radius: 8px;
  background: #312e81;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.grammar-core-text {
  color: #1e1b4b;
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.explain-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.explain-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.97rem;
  font-weight: 600;
  color: #44403c;
  line-height: 1.55;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.explain-point::before {
  content: '→';
  color: var(--amber);
  font-weight: 900;
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.explain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.explain-chip {
  padding: 10px 18px;
  background: rgba(245,158,11,0.13);
  border: 1.5px solid rgba(245,158,11,0.35);
  border-radius: 20px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #92400e;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.chip-hint {
  font-size: 0.78rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 6px;
  opacity: 0.8;
}
.explain-chip-tap {
  cursor: pointer;
  border: 2px dashed rgba(245,158,11,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s, background 0.15s;
}
.explain-chip-tap:hover { transform: translateY(-2px); background: rgba(245,158,11,0.22); }
.explain-chip-tap.chip-active {
  background: rgba(99,102,241,0.15);
  border: 2px solid rgba(99,102,241,0.5);
  color: #4338ca;
}
.chip-meaning {
  font-size: 1rem;
  font-weight: 800;
  color: #4338ca;
  min-height: 1.2em;
}
@keyframes chipPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}
.chip-pulse {
  animation: chipPulse 1.2s ease-in-out 3;
}

.explain-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(245,158,11,0.2);
}

.explain-section-title {
  color: #312e81;
  font-size: 0.92rem;
  font-weight: 900;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
  text-align: center;
  margin-bottom: -6px;
}

.explain-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 340px;
}

.explain-table thead th {
  background: rgba(245,158,11,0.16);
  color: #92400e;
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  text-align: left;
}

.explain-table tbody td {
  padding: 10px 10px;
  border-top: 1px solid rgba(245,158,11,0.12);
  font-size: 0.88rem;
  font-weight: 600;
  color: #44403c;
  vertical-align: middle;
}

.td-label {
  font-weight: 800;
  color: #92400e;
  font-size: 0.85rem;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.td-note {
  font-size: 0.72rem;
  color: #a8a29e;
  font-weight: 600;
  margin-top: 1px;
}

.td-word {
  font-size: 1.1rem !important;
  font-weight: 900 !important;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.td-sentence {
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
  font-weight: 700;
  color: #334155;
}

.td-meaning {
  font-size: 0.83rem !important;
  color: #64748b !important;
}

.explain-table .explain-row-0 { background: rgba(245,158,11,0.05); }
.explain-table .explain-row-1 { background: rgba(99,102,241,0.04); }
.explain-table .explain-row-2 { background: rgba(16,185,129,0.04); }

.explain-table .explain-row-0 .td-word { color: #d97706; }
.explain-table .explain-row-1 .td-word { color: #7c3aed; }
.explain-table .explain-row-2 .td-word { color: #059669; }

.explain-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 4px;
}

.explain-gotit {
  align-self: center;
  margin-top: 0;
}

/* ===== GRAMMAR TABLE CARD ===== */
.grammar-card {
  background: linear-gradient(145deg, #eef2ff, #f8fafc);
  border: 1.5px solid rgba(49,46,129,0.18);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gram-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gram-kicker {
  color: #4338ca;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gram-title {
  color: #1e1b4b;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.25;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.gram-subtitle {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 800;
  margin-top: 2px;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.gram-intro {
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.82);
  border-left: 4px solid #312e81;
  color: #292524;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.6;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.gram-verbal {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(79,70,229,0.14);
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.gram-verbal-point {
  position: relative;
  padding-left: 18px;
  color: #312e81;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.55;
}

.gram-verbal-point::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6366f1;
}

.gram-method {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.gram-method-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px;
  border-radius: 12px;
  background: rgba(49,46,129,0.08);
  border: 1px solid rgba(49,46,129,0.14);
  color: #1e1b4b;
  font-size: 0.88rem;
  font-weight: 900;
  text-align: center;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.gram-method-step span {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #312e81;
  color: #fff;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.gram-hint {
  color: #475569;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.gram-grid {
  display: grid;
  grid-template-columns: 1.05fr repeat(3, minmax(112px, 1fr));
  gap: 1px;
  overflow-x: auto;
  border: 1px solid rgba(49,46,129,0.16);
  border-radius: 14px;
  background: rgba(49,46,129,0.16);
}

.gram-cell {
  min-width: 112px;
  min-height: 76px;
  padding: 10px;
  background: #fff;
  border: 0;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.gram-corner,
.gram-head {
  min-height: 44px;
  background: #312e81;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gram-person {
  background: #eef2ff;
  color: #1e1b4b;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.gram-person strong {
  font-size: 0.9rem;
  font-weight: 900;
}

.gram-person span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
}

.gram-form {
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 3px;
  position: relative;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.gram-form:hover,
.gram-form.gram-active {
  background: #fff7ed;
  box-shadow: inset 0 0 0 2px rgba(245,158,11,0.38);
}

.gram-form:hover { transform: translateY(-1px); }

.gf-form {
  color: #1e1b4b;
  font-size: 1.18rem;
  font-weight: 900;
}

.gf-pronoun {
  color: #4338ca;
  font-size: 0.82rem;
  font-weight: 900;
}

.gf-meaning {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 750;
}

.gf-listen {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.9rem;
}

.gram-focus {
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(49,46,129,0.14);
  min-height: 72px;
}

.gram-focus-empty {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.gram-focus-form {
  color: #1e1b4b;
  font-size: 1.35rem;
  font-weight: 900;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.gram-focus-sentence {
  color: #111827;
  font-size: 1.05rem;
  font-weight: 850;
  margin-top: 4px;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.gram-focus-meaning,
.gram-focus-explain {
  color: #475569;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.5;
  margin-top: 4px;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.gram-focus-explain {
  color: #065f46;
  background: rgba(16,185,129,0.09);
  border-radius: 10px;
  padding: 8px 10px;
}

.gram-practice {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(49,46,129,0.14);
}

.gram-practice-label {
  color: #312e81;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.gram-practice-question {
  color: #111827;
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 12px;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

@media (max-width: 560px) {
  .gram-header { flex-direction: column; align-items: stretch; }
  .gram-method { grid-template-columns: 1fr; }
  .gram-grid { grid-template-columns: 96px repeat(3, 126px); }
  .gram-cell { min-width: 96px; padding: 8px; }
  .gf-form { font-size: 1.05rem; }
}

/* ===== GUIDED EXAMPLE CARD ===== */
.guided-card {
  background: linear-gradient(145deg, #eef2ff, #f8fafc);
  border: 1.5px solid rgba(49,46,129,0.18);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guided-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #312e81;
  text-align: center;
  font-family: 'Nunito', 'Noto Sans Devanagari', sans-serif;
}

.guided-question {
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(49,46,129,0.12);
  color: #111827;
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.guided-steps {
  display: grid;
  gap: 10px;
}

.guided-step {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(148,163,184,0.18);
  color: #334155;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.55;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.guided-step-num {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #312e81;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
}

.guided-answer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 12px;
  background: rgba(16,185,129,0.11);
  border: 1px solid rgba(16,185,129,0.22);
  color: #065f46;
  font-size: 1.1rem;
  font-weight: 900;
  font-family: 'Noto Sans Devanagari', 'Nunito', sans-serif;
}

.guided-answer-label {
  padding: 4px 8px;
  border-radius: 8px;
  background: #059669;
  color: #fff;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===== याद है? CARD ===== */
.yaad-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.yaad-instr {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.yaad-hindi {
  font-size: 1.8rem;
  font-weight: 900;
  color: #1a1a2e;
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(251,191,36,0.07));
  border: 2px solid rgba(245,158,11,0.3);
  border-radius: 16px;
  padding: 18px 28px;
  width: 100%;
}
.yaad-emoji { font-size: 3.5rem; line-height: 1; }
.yaad-sanskrit {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  animation: fadeInUp 0.3s ease;
}
.yaad-sanskrit.revealed { display: flex; }
.yaad-answer {
  font-size: 1.6rem;
  font-weight: 900;
  color: #4338ca;
  background: rgba(99,102,241,0.08);
  border: 2px solid rgba(99,102,241,0.25);
  border-radius: 14px;
  padding: 14px 24px;
  width: 100%;
}
.yaad-btns {
  display: none;
  gap: 10px;
  width: 100%;
}
.yaad-btns.visible { display: flex; }
.yaad-yes {
  flex: 1; padding: 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff; border: none; border-radius: 14px;
  font-family: inherit; font-size: 1rem; font-weight: 800;
  cursor: pointer;
}
.yaad-no {
  flex: 1; padding: 14px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff; border: none; border-radius: 14px;
  font-family: inherit; font-size: 1rem; font-weight: 800;
  cursor: pointer;
}

/* ===== SENTENCE TRANSLATE CARD ===== */
.sentence-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.sentence-source-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}
.ncert-label {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.practice-label {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.sentence-instr {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sentence-sanskrit {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.6;
  background: linear-gradient(135deg, rgba(99,102,241,0.07), rgba(139,92,246,0.05));
  border: 1.5px solid rgba(99,102,241,0.2);
  border-radius: 14px;
  padding: 16px 20px;
  width: 100%;
}
.reveal-btn {
  width: 100%;
  padding: 12px;
  background: rgba(245,158,11,0.1);
  border: 2px dashed rgba(245,158,11,0.5);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  color: #92400e;
  cursor: pointer;
  transition: all 0.2s;
}
.reveal-btn:hover { background: rgba(245,158,11,0.18); }
.sentence-hindi {
  display: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: #059669;
  background: rgba(16,185,129,0.08);
  border: 1.5px solid rgba(16,185,129,0.25);
  border-radius: 12px;
  padding: 16px 18px;
  width: 100%;
  animation: fadeInUp 0.3s ease;
  text-align: left;
  display: none;
  flex-direction: column;
  gap: 10px;
}
.sentence-hindi.revealed { display: flex; }
.ans-label {
  font-size: 0.78rem;
  font-weight: 900;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(245,158,11,0.15);
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
}
.ans-sanskrit {
  font-size: 1.2rem;
  font-weight: 800;
  color: #4338ca;
  line-height: 1.6;
  display: block;
}
.ans-hindi {
  font-size: 0.95rem;
  font-weight: 600;
  color: #374151;
  display: block;
  border-top: 1px dashed rgba(16,185,129,0.3);
  padding-top: 8px;
  margin-top: 2px;
}
.sentence-gotit {
  display: none;
  align-self: center;
}
.sentence-gotit.visible { display: inline-flex; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== CLASS 7 STEP TYPES ===== */

/* Anvaya Order */
.anvaya-label {
  font-size: 0.78rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px;
}
.anvaya-shloka {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.15rem; font-weight: 700; color: #3730a3;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border: 2px solid #c4b5fd;
  border-radius: 14px; padding: 14px 18px;
  line-height: 1.7; text-align: center; margin-bottom: 12px;
}
.anvaya-question {
  font-size: 0.9rem; font-weight: 700; color: var(--dark);
  margin: 10px 0 4px; text-align: center;
}

/* Context sentence (meaning_from_context + karaka_role) */
.ctx-sentence {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 1.1rem; font-weight: 600; color: var(--dark);
  background: #f8fafc; border: 2px solid #e2e8f0;
  border-radius: 14px; padding: 14px 16px;
  line-height: 1.8; text-align: center; margin-bottom: 10px;
}
mark.ctx-word {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e; border-radius: 6px;
  padding: 2px 6px; font-weight: 800;
  border-bottom: 2px solid #f59e0b;
  text-decoration: none;
}
.ctx-question {
  font-size: 0.95rem; font-weight: 700; color: var(--dark);
  margin: 10px 0 4px; text-align: center;
}

/* Translation Check */
.trancheck-sanskrit {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 1.2rem; font-weight: 700; color: #1e40af;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 2px solid #93c5fd;
  border-radius: 14px; padding: 16px 18px;
  line-height: 1.7; text-align: center; margin-bottom: 8px;
}
.trancheck-hint {
  font-size: 0.8rem; color: var(--muted); text-align: center;
  margin-bottom: 10px; font-style: italic;
}

/* Error Correction */
.error-sentence {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 1.1rem; font-weight: 700; color: #991b1b;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 2px solid #fca5a5;
  border-radius: 14px; padding: 14px 18px;
  line-height: 1.7; text-align: center; margin-bottom: 10px;
  position: relative;
}
.error-sentence::before {
  content: '❌'; position: absolute; top: -10px; right: 12px;
  font-size: 1.1rem;
}
.error-question {
  font-size: 0.95rem; font-weight: 700; color: var(--dark);
  margin: 8px 0 4px; text-align: center;
}

/* Karaka Explain box (shared by karaka_role + error_correction) */
.karaka-explain {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1.5px solid #86efac; border-radius: 12px;
  padding: 10px 14px; font-size: 0.85rem; font-weight: 600;
  color: #166534; margin: 10px 0;
  display: none;
  animation: fadeInUp 0.3s ease;
}

/* Passage MCQ */
.passage-box {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 0.95rem; font-weight: 600; color: var(--dark);
  background: linear-gradient(135deg, #fafafa, #f1f5f9);
  border: 2px solid #cbd5e1; border-left: 4px solid var(--primary);
  border-radius: 14px; padding: 14px 16px;
  line-height: 2; margin-bottom: 10px;
  max-height: 160px; overflow-y: auto;
}
.passage-question {
  font-size: 0.97rem; font-weight: 800; color: var(--dark);
  margin: 10px 0 4px; padding: 10px 12px;
  background: #f8fafc; border-radius: 10px;
  border-left: 3px solid var(--secondary);
}

/* Shloka Audio Recall */
.shloka-listen-box {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border-radius: 18px; padding: 20px 18px;
  text-align: center; margin-bottom: 12px;
}
.shloka-text {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.1rem; font-weight: 700; color: #e0e7ff;
  line-height: 1.8; margin-bottom: 14px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.shloka-play-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; border: none; border-radius: 50px;
  padding: 12px 28px; font-size: 1rem; font-weight: 800;
  font-family: 'Nunito', sans-serif; cursor: pointer;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.shloka-play-btn:hover { transform: scale(1.04); box-shadow: 0 6px 20px rgba(99,102,241,0.5); }
.shloka-play-btn:active { transform: scale(0.97); }

/* shloka reveal animation — scoped to shloka card only */
.shloka-reveal-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
  opacity: 0; transform: translateY(6px);
  pointer-events: none;
}
.shloka-reveal-item.visible {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}

/* Long options (anvaya, translation_check, error_correction) */
.choice-option-long {
  text-align: left !important; font-size: 0.88rem !important;
  padding: 12px 14px !important; white-space: normal !important;
  height: auto !important; min-height: 48px;
  line-height: 1.5 !important;
}

/* ===== GRAMMAR TABLE CARD ===== */
.grammar-card {
  padding: 0 0 8px;
  overflow: hidden;
}

.gram-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 18px 18px 12px;
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
  border-radius: 20px 20px 0 0;
}
.gram-kicker {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: #c4b5fd; margin-bottom: 2px;
}
.gram-title {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.3rem; font-weight: 900; color: #fff; line-height: 1.2;
}
.gram-subtitle {
  font-size: 0.85rem; font-weight: 700; color: #a5b4fc; margin-top: 2px;
}
.gram-listen {
  flex-shrink: 0; background: rgba(255,255,255,0.15); border: none;
  border-radius: 50px; padding: 8px 14px; font-size: 0.78rem;
  font-weight: 800; color: #e0e7ff; cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: background 0.15s;
}
.gram-listen:hover { background: rgba(255,255,255,0.25); }

.gram-intro {
  font-size: 0.88rem; color: var(--muted); line-height: 1.6;
  padding: 10px 18px 0; font-weight: 600;
}

.gram-verbal {
  padding: 10px 18px 0; display: flex; flex-direction: column; gap: 4px;
}
.gram-verbal-point {
  font-size: 0.97rem; color: #3730a3; font-weight: 700;
  padding: 4px 10px; background: #ede9fe; border-radius: 8px;
}

.gram-method {
  padding: 10px 18px 0; display: flex; flex-direction: column; gap: 6px;
}
.gram-method-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 1rem; font-weight: 700; color: var(--dark);
}
.gram-method-step > span {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 900; flex-shrink: 0;
}

.gram-hint {
  font-size: 0.88rem; font-weight: 700; color: #7c3aed;
  background: #f5f3ff; border-radius: 8px;
  padding: 6px 14px; margin: 12px 18px 8px;
  text-align: center;
}

/* Grid layout — columns driven by JS via --gram-cols custom property */
.gram-grid {
  display: grid;
  grid-template-columns: repeat(var(--gram-cols, 4), 1fr);
  gap: 4px; padding: 0 18px 4px;
}
.gram-cell {
  border-radius: 10px; padding: 8px 6px;
  text-align: center; font-family: 'Noto Sans Devanagari', serif;
}
.gram-corner {
  background: #312e81; color: #c4b5fd;
  font-size: 0.82rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
}
.gram-head {
  background: #4c1d95; color: #e0e7ff;
  font-size: 0.88rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.gram-person {
  background: #ede9fe; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
}
.gram-person strong {
  font-size: 0.9rem; color: #3730a3; font-weight: 900;
}
.gram-person span {
  font-size: 0.78rem; color: var(--muted); font-weight: 700;
}
.gram-form {
  background: #f5f3ff; border: 2px solid transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  gap: 1px; transition: background 0.15s, border-color 0.15s, transform 0.1s;
  min-height: 62px; justify-content: center;
}
.gram-form:hover { background: #ede9fe; transform: scale(1.03); }
.gram-form.gram-active {
  background: #6366f1; border-color: #4338ca;
}
.gram-form.gram-active .gf-form,
.gram-form.gram-active .gf-pronoun,
.gram-form.gram-active .gf-meaning { color: #fff; }
.gram-form.gram-active .gf-listen { opacity: 1; }
.gf-form {
  font-size: 1.1rem; font-weight: 900; color: #312e81; line-height: 1.1;
}
.gf-pronoun {
  font-size: 0.75rem; color: var(--muted); font-weight: 700;
  font-family: 'Nunito', sans-serif;
}
.gf-meaning {
  font-size: 0.82rem; color: #6366f1; font-weight: 800;
  font-family: 'Nunito', sans-serif;
}
.gf-listen {
  font-size: 0.65rem; opacity: 0.4; margin-top: 2px;
  transition: opacity 0.15s;
}
.gram-form:hover .gf-listen { opacity: 0.8; }

/* Focus panel — shows when a cell is tapped */
.gram-focus {
  margin: 10px 18px 4px;
  background: #f8fafc; border-radius: 14px; border-left: 4px solid var(--primary);
  padding: 14px 16px; min-height: 72px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
}
.gram-focus-empty {
  font-size: 0.82rem; color: var(--muted); font-weight: 700;
  text-align: center;
}
.gram-focus-form {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.2rem; font-weight: 900; color: #312e81;
}
.gram-focus-sentence {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 0.9rem; font-weight: 700; color: var(--dark);
}
.gram-focus-meaning {
  font-size: 0.82rem; font-weight: 700; color: #6366f1;
  font-family: 'Nunito', sans-serif;
}
.gram-focus-explain {
  font-size: 0.8rem; font-weight: 700; color: var(--muted);
  font-family: 'Nunito', sans-serif; line-height: 1.5;
}

/* Mini practice at bottom of grammar_table */
.gram-practice {
  margin: 10px 18px 4px; background: #f0fdf4; border-radius: 14px;
  border-left: 4px solid var(--green); padding: 14px 16px;
}
.gram-practice-label {
  font-size: 0.72rem; font-weight: 900; color: var(--green);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 6px;
}
.gram-practice-question {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 0.95rem; font-weight: 800; color: var(--dark);
  margin-bottom: 10px; line-height: 1.6;
}
.gram-practice-options { gap: 6px !important; }

.gram-gotit {
  display: block; width: calc(100% - 36px);
  margin: 12px 18px 4px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; border: none; border-radius: 50px;
  padding: 14px; font-size: 1rem; font-weight: 900;
  font-family: 'Nunito', sans-serif; cursor: pointer;
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.gram-gotit:hover { transform: scale(1.02); box-shadow: 0 6px 22px rgba(99,102,241,0.5); }
.gram-gotit:active { transform: scale(0.97); }

/* ===== PAGE OVERVIEW ===== */
.page-overview-card {
  padding: 24px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.98)),
    radial-gradient(circle at top left, rgba(245,158,11,0.14), transparent 38%);
  border: 1px solid rgba(15,23,42,0.08);
}
.po-kicker { font-size: 0.7rem; font-weight: 900; color: #475569; text-transform: uppercase; letter-spacing: 0.08em; }
.po-page-badge {
  display: inline-block; align-self: flex-start;
  background: linear-gradient(135deg, #312e81, #0f766e);
  color: #fff; font-size: 1.5rem; font-weight: 900;
  font-family: 'Noto Sans Devanagari', serif;
  padding: 8px 24px; border-radius: 8px;
  box-shadow: 0 10px 24px rgba(49,46,129,0.18);
}
.po-title { font-size: 1.22rem; font-weight: 900; color: #111827; font-family: 'Noto Sans Devanagari', serif; line-height: 1.42; }
.po-instruction {
  background: #fff7ed; border-left: 4px solid #f59e0b;
  border-radius: 12px; padding: 12px 14px;
  font-size: 0.92rem; font-weight: 700; color: #78350f;
  font-family: 'Nunito', sans-serif; line-height: 1.6;
}
.po-preview { font-size: 0.88rem; color: var(--muted); font-family: 'Nunito', sans-serif; line-height: 1.6; }
.po-linecount { font-size: 0.8rem; font-weight: 700; color: var(--muted); font-family: 'Nunito', sans-serif; }

/* ===== LINE TEACH ===== */
.line-teach-card {
  padding: 20px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.08);
}
.lt-kicker { font-size: 0.78rem; font-weight: 900; color: #0f766e; text-transform: uppercase; letter-spacing: 0.08em; }
.lt-sanskrit {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.15rem; font-weight: 850; color: #111827;
  background: #f8fafc; border-left: 4px solid #312e81;
  border-radius: 10px; padding: 14px 16px; line-height: 1.9;
}
.lt-hindi {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.08rem; font-weight: 750; color: #064e3b;
  background: #ecfdf5; border: 1px solid #bbf7d0;
  border-radius: 10px; padding: 12px 16px; line-height: 1.8;
}
.lt-simple {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem; color: #374151; line-height: 1.7;
  border-left: 3px solid #10b981; padding-left: 14px;
}
.lt-section { margin-top: 6px; }
.lt-sec-title {
  font-size: 0.78rem; font-weight: 900; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px;
}
.lt-words { display: flex; flex-wrap: wrap; gap: 8px; }
.lt-word-chip {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 10px; padding: 8px 14px;
  font-size: 1rem; font-family: 'Noto Sans Devanagari', serif; line-height: 1.6;
}
.lt-word-chip b { color: var(--dark); font-size: 1rem; }
.lt-word-eq { color: #374151; font-size: 0.95rem; }
.lt-grammar { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 12px 14px; }
.lt-gram-point { font-size: 1rem; color: #1e3a8a; font-family: 'Nunito', sans-serif; line-height: 1.8; }

/* ===== PAGE LOCK ===== */
.page-lock-card { padding: 0; overflow: hidden; border: 1px solid rgba(15,23,42,0.08); }
.pl-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px 9px; border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}
.pl-page-label { font-size: 0.72rem; font-weight: 900; color: #334155; text-transform: uppercase; letter-spacing: 0.06em; flex: 1; }
.pl-progress { flex: 2; height: 6px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.pl-progress-fill { height: 100%; background: linear-gradient(90deg, #312e81, #0f766e); border-radius: 99px; transition: width 0.4s; }
.pl-counter { font-size: 0.72rem; font-weight: 900; color: var(--muted); white-space: nowrap; }

.pl-q-instr {
  font-size: 0.75rem; font-weight: 900; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 14px 18px 0;
}
.pl-question {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.15rem; font-weight: 800; color: var(--dark);
  padding: 10px 18px; line-height: 1.8;
}
.pl-blank { display: inline-block; min-width: 70px; border-bottom: 2.5px solid #6366f1; }
.pl-hint {
  font-size: 0.95rem; color: #374151; padding: 0 18px 6px;
  font-family: 'Noto Sans Devanagari', serif; line-height: 1.6;
}
.pl-prompt {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.3rem; font-weight: 900; color: #312e81;
  background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 12px;
  margin: 0 18px 10px; padding: 13px 16px; text-align: center;
}
.pl-options { display: flex; flex-direction: column; gap: 10px; padding: 0 18px; }
.pl-opt {
  background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 14px;
  padding: 15px 18px; font-size: 1.1rem; font-weight: 700;
  font-family: 'Noto Sans Devanagari', serif; color: var(--dark);
  cursor: pointer; text-align: left; transition: border-color 0.15s; line-height: 1.5;
}
.pl-opt:hover { border-color: #312e81; background: #eef2ff; }
.pl-opt-correct { border-color: #10b981 !important; background: #d1fae5 !important; color: #065f46 !important; }
.pl-opt-wrong { border-color: #ef4444 !important; background: #fee2e2 !important; color: #991b1b !important; }
.pl-feedback { min-height: 28px; font-size: 1rem; font-weight: 700; padding: 10px 18px; font-family: 'Nunito', sans-serif; }
.pl-fb-correct { color: #065f46; }
.pl-fb-wrong { color: #991b1b; }

/* page lock result screen */
.pl-result { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 24px; text-align: center; }
.pl-result-pass { background: linear-gradient(160deg, #d1fae5 0%, #ecfdf5 100%); }
.pl-result-fail { background: linear-gradient(160deg, #fff7ed 0%, #fffbeb 100%); }
.pl-result-icon { font-size: 3rem; }
.pl-result-score { font-size: 2.5rem; font-weight: 900; color: var(--dark); font-family: 'Nunito', sans-serif; }
.pl-result-pct { font-size: 1.1rem; font-weight: 900; color: var(--muted); }
.pl-result-msg { font-size: 0.92rem; font-weight: 700; color: var(--dark); font-family: 'Nunito', sans-serif; line-height: 1.6; max-width: 280px; }
.pl-next-btn, .pl-retry-btn { margin-top: 8px; width: 100%; }

/* yaad hai inside page lock */
.yaad-reveal-wrap { padding: 0 16px; }
.yaad-reveal-btn {
  width: 100%; background: #f5f3ff; border: 2px dashed #6366f1;
  border-radius: 12px; padding: 14px; font-size: 0.92rem; font-weight: 800;
  color: #6366f1; cursor: pointer; font-family: 'Nunito', sans-serif;
}
.yaad-answer-card {
  background: #f8fafc;
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
}
.yaad-answer-label {
  color: #312e81;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: 8px;
}
.yaad-sanskrit {
  display: block;
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 2.15rem; font-weight: 900; color: #111827;
  background: #ffffff; border: 2px solid #e0e7ff; border-radius: 12px; padding: 16px;
  text-align: center; margin-bottom: 10px;
  line-height: 1.6;
}
.yaad-answer-prefix {
  display: block;
  color: #64748b;
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 4px;
}
.yaad-listen-btn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #eef2ff;
  color: #312e81;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
}
.yaad-actions { display: flex; gap: 10px; }
.yaad-btn { flex: 1; padding: 12px; border-radius: 50px; border: none; font-size: 0.9rem; font-weight: 900; cursor: pointer; }
.yaad-yes { background: #d1fae5; color: #065f46; }
.yaad-no { background: #fee2e2; color: #991b1b; }

/* arrange_words inside page_lock */
.arrange-target {
  min-height: 52px; border: 2px dashed rgba(99,102,241,0.4);
  border-radius: 14px; padding: 10px 14px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 8px 16px; background: rgba(99,102,241,0.03);
}
.arrange-source {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 8px 16px 0; justify-content: center;
}
.arrange-word {
  padding: 10px 18px;
  background: #fff; border: 2px solid #e2e8f0; border-radius: 14px;
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1rem; font-weight: 800; color: #1a1a2e;
  cursor: pointer; transition: all 0.18s;
}
.arrange-word:hover { border-color: #6366f1; color: #6366f1; transform: translateY(-2px); }
.arrange-word.used { opacity: 0.3; cursor: default; transform: none; }
.arrange-placed {
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
  border: 2px solid rgba(99,102,241,0.35); border-radius: 14px;
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1rem; font-weight: 800; color: #6366f1;
  cursor: pointer; transition: all 0.18s;
  display: inline-flex; align-items: center; gap: 6px;
}
.arrange-placed:hover { background: rgba(239,68,68,0.1); border-color: #ef4444; color: #ef4444; }
.arrange-remove { font-size: 0.7rem; opacity: 0.5; font-family: sans-serif; }
.arrange-placed:hover .arrange-remove { opacity: 1; }
.arrange-remove-hint {
  font-size: 0.78rem; color: var(--muted); font-family: 'Nunito', sans-serif;
  padding: 4px 18px 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.arrange-clear-btn {
  background: none; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 3px 10px; font-size: 0.75rem; font-weight: 700;
  color: #ef4444; cursor: pointer; font-family: 'Nunito', sans-serif;
}
.arrange-clear-btn:hover { background: #fee2e2; border-color: #ef4444; }
.arrange-correction-box {
  margin: 4px 0;
  padding: 14px;
  background: #fff7ed;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  text-align: center;
}
.arrange-correction-label {
  font-size: 0.82rem;
  font-weight: 900;
  color: #92400e;
  margin-bottom: 8px;
}
.arrange-correction-answer {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.45rem;
  font-weight: 900;
  color: #111827;
  line-height: 1.8;
}
.arrange-meaning-label {
  margin-top: 12px;
  color: #065f46;
}
.arrange-correction-meaning {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.05rem;
  font-weight: 850;
  color: #064e3b;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 9px 10px;
  line-height: 1.7;
}
.arrange-correction-note {
  margin-top: 8px;
  font-size: 0.86rem;
  font-weight: 800;
  color: #78350f;
}
.pl-arrange-continue {
  width: calc(100% - 32px);
  justify-content: center;
  margin: 12px 16px 16px;
}

/* written practice */
.written-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.08);
}
.written-kicker {
  font-size: 0.76rem;
  font-weight: 900;
  color: #0f766e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.written-title {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: #111827;
}
.written-progress {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #312e81;
  font-weight: 900;
  font-size: 0.82rem;
}
.written-question-type {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 0.95rem;
  font-weight: 900;
  color: #92400e;
}
.written-question {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.2rem;
  font-weight: 850;
  color: #111827;
  line-height: 1.8;
  background: #f8fafc;
  border-left: 4px solid #0f766e;
  border-radius: 10px;
  padding: 12px 14px;
}
.written-question-list {
  display: grid;
  gap: 10px;
}
.written-question-item {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  background: #ffffff;
}
.written-steps {
  display: grid;
  gap: 6px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 10px 12px;
  color: #78350f;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.5;
}
.written-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 2px dashed #93c5fd;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
}
.written-upload input { display: none; }
.written-reveal-btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 14px;
  background: linear-gradient(135deg, #312e81, #0f766e);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  cursor: pointer;
}
.written-reveal-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}
/* ===== ANSWER KEY PASSWORD MODAL ===== */
.ak-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15,23,42,0.65);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.ak-modal {
  background: #fff; border-radius: 20px;
  padding: 28px 24px 20px;
  width: 100%; max-width: 360px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; gap: 12px;
}
.ak-modal-title {
  font-size: 1.1rem; font-weight: 900; color: #1e1b4b;
  font-family: 'Nunito', sans-serif; text-align: center;
}
.ak-modal-sub {
  font-size: 0.85rem; color: #64748b; text-align: center;
  font-family: 'Noto Sans Devanagari', sans-serif; line-height: 1.4;
}
.ak-pass-input {
  border: 2px solid #c4b5fd; border-radius: 12px;
  padding: 12px 14px; font-size: 1rem;
  font-family: 'Nunito', sans-serif;
  outline: none; width: 100%; box-sizing: border-box;
}
.ak-pass-input:focus { border-color: #6366f1; }
.ak-err {
  font-size: 0.85rem; color: #dc2626; font-weight: 700;
  text-align: center; font-family: 'Noto Sans Devanagari', sans-serif;
}
.ak-modal-btns {
  display: flex; gap: 10px;
}
.ak-btn-cancel {
  flex: 1; border: 2px solid #e2e8f0; border-radius: 12px;
  padding: 11px; background: #fff; color: #64748b;
  font-weight: 800; font-family: 'Nunito', sans-serif;
  font-size: 0.9rem; cursor: pointer;
}
.ak-btn-verify {
  flex: 2; border: 0; border-radius: 12px;
  padding: 11px; background: linear-gradient(135deg, #312e81, #0f766e);
  color: #fff; font-weight: 900; font-family: 'Nunito', sans-serif;
  font-size: 0.9rem; cursor: pointer;
}
.ak-btn-verify:disabled { background: #94a3b8; cursor: not-allowed; }
.ak-disclaimer {
  font-size: 0.72rem; color: #94a3b8; text-align: center;
  font-family: 'Noto Sans Devanagari', sans-serif; line-height: 1.4;
}

.written-skip-btn {
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
  color: #475569;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  cursor: pointer;
}
.written-skip-note,
.written-required-note {
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 10px;
}
.written-skip-note {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.written-required-note {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.written-answer {
  border: 2px solid #bbf7d0;
  border-radius: 12px;
  background: #ecfdf5;
  padding: 12px;
}
.written-answer-label {
  color: #065f46;
  font-weight: 900;
  margin-bottom: 8px;
}
.written-answer-text {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 1.1rem;
  font-weight: 850;
  color: #064e3b;
  line-height: 1.8;
}
.written-answer-block {
  border-top: 1px solid #bbf7d0;
  padding-top: 10px;
  margin-top: 10px;
}
.written-answer-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.written-answer-q {
  font-family: 'Noto Sans Devanagari', serif;
  font-size: 0.92rem;
  font-weight: 900;
  color: #047857;
  margin-bottom: 4px;
}
.written-answer-note {
  margin-top: 8px;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 800;
}
.written-self-check {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* auto-resume toast */
.resume-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1e293b; color: #fff;
  padding: 10px 18px; border-radius: 50px;
  font-size: 0.88rem; font-weight: 700; font-family: 'Nunito', sans-serif;
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transition: opacity 0.3s, transform 0.3s;
  z-index: 9999; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.resume-toast.resume-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.resume-restart-btn {
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px; padding: 4px 12px;
  color: #fff; font-size: 0.8rem; font-weight: 700; cursor: pointer;
  font-family: 'Nunito', sans-serif;
}
.resume-restart-btn:hover { background: rgba(255,255,255,0.25); }
