/* DataQuest Live — shared design tokens + components */
/* Template: copied verbatim from stats-quest with H-J gradients appended */

:root {
  /* Re-mapped to the WordNerd "night arena" palette (see wordnerd-ds.css) so legacy
     screens cohere with the new design until each is bespoke-migrated. */
  --bg:     #0B0918;   /* ink-900 */
  --card:   #17123A;   /* ink-800 */
  --border: #322a6b;   /* ink-600 */
  --text:   #F6F4FF;   /* fg-1 */
  --muted:  #BAB4E6;   /* fg-2 */
  --teal:   #B8FF3D;   /* primary accent → brain lime */
  --gold:   #FFAD1F;   /* → flag amber */
  --blue:   #2ED9F2;   /* → ai cyan */
  --green:  #B8FF3D;   /* → brain lime */
  --red:    #FF466E;   /* → wrong */
  --purple: #7C5CFF;   /* → brand violet */

  /* Kahoot-style answer tile colors */
  --ans-a:  #ef4444;  /* Red */
  --ans-b:  #3b82f6;  /* Blue */
  --ans-c:  #f59e0b;  /* Yellow/Gold */
  --ans-d:  #22c55e;  /* Green */

  /* Section badge gradients A–G */
  --grad-a: linear-gradient(135deg, #3b82f6, #1d4ed8);
  --grad-b: linear-gradient(135deg, #22c55e, #15803d);
  --grad-c: linear-gradient(135deg, #f59e0b, #d97706);
  --grad-d: linear-gradient(135deg, #ef4444, #b91c1c);
  --grad-e: linear-gradient(135deg, #a855f7, #7e22ce);
  --grad-f: linear-gradient(135deg, #14b8a6, #0f766e);
  --grad-g: linear-gradient(135deg, #f97316, #c2410c);
  --grad-l: linear-gradient(135deg, #a855f7, #ec4899);

  /* Preemptive H–J gradients for chapters with >7 sections */
  --grad-h: linear-gradient(135deg, #06b6d4, #0e7490);
  --grad-i: linear-gradient(135deg, #ec4899, #be185d);
  --grad-j: linear-gradient(135deg, #84cc16, #4d7c0f);

  /* ── WordNerd brand layer (night-arena semantics) ── */
  --brain:        #B8FF3D;                                   /* 🧠 own-brain → lime */
  --brain-grad:   linear-gradient(135deg, #B8FF3D, #D4FF7A); /* brain-window banner */
  --brain-soft:   rgba(184,255,61,.12);
  --research:     #2ED9F2;                                   /* 🔎 AI-research → cyan */
  --research-grad:linear-gradient(135deg, #2ED9F2, #7AEBFF);
  --research-soft:rgba(46,217,242,.12);

  /* Surfaces & depth */
  --bg-2:     #110D26;                                       /* ink-850 inset panels */
  --card-2:   #211B4F;                                       /* ink-700 secondary card */
  --border-2: #211B4F;                                       /* quieter hairline */
  --elev-1: 0 1px 2px rgba(0,0,0,.3);
  --elev-2: 0 6px 20px rgba(0,0,0,.35);
  --elev-3: 0 16px 48px rgba(0,0,0,.45);
  --glow-teal:  0 0 0 1px rgba(20,184,166,.5), 0 8px 28px rgba(20,184,166,.28);
  --glow-brain: 0 0 0 1px rgba(34,211,238,.5), 0 8px 28px rgba(34,211,238,.30);
  --radius:    12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(124,92,255,.14), transparent 60%),
    radial-gradient(900px 560px at 12% 108%, rgba(46,217,242,.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-ui, 'Inter', sans-serif);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Typography ────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(to right, var(--brain, #B8FF3D), var(--research, #2ED9F2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Cards ─────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--elev-2);
}

.card-deep {
  background: #162032;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  background: var(--teal);
  color: #0B0918;
  border: none;
  padding: 13px 26px;
  border-radius: var(--r-lg, 22px);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font-display, 'Inter', sans-serif);
  transition: transform 90ms var(--ease-out, ease), box-shadow 90ms, filter .2s, opacity .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  box-shadow: 0 5px 0 0 var(--brain-deep, #3E5A00);
}
.btn:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 0 var(--brain-deep, #3E5A00); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

/* Primary call-to-action glow — opt-in via .btn-glow on the hero button */
.btn-glow { box-shadow: var(--glow-teal); }
.btn-glow:hover:not(:disabled) { box-shadow: var(--glow-teal); filter: brightness(1.08); }

.btn-large {
  font-size: 1.2rem;
  padding: 16px 36px;
  border-radius: 12px;
}

.btn-gold { background: var(--gold); }
.btn-purple { background: var(--purple); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) { background: var(--card); opacity: 1; }

/* ── Section Badges ────────────────────────────────── */
.section-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  flex-shrink: 0;
}
.section-badge.large {
  width: 72px;
  height: 72px;
  font-size: 2rem;
  border-radius: 16px;
}

.badge-A { background: var(--grad-a); }
.badge-B { background: var(--grad-b); }
.badge-C { background: var(--grad-c); }
.badge-D { background: var(--grad-d); }
.badge-E { background: var(--grad-e); color: #fff; }
.badge-F { background: var(--grad-f); }
.badge-G { background: var(--grad-g); }
.badge-H { background: var(--grad-h); }
.badge-I { background: var(--grad-i); color: #fff; }
.badge-J { background: var(--grad-j); }
.badge-L { background: var(--grad-l); color: #fff; }

/* ── Info boxes ─────────────────────────────────────── */
.gold-box {
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.4);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: .95rem;
  line-height: 1.6;
  color: #fcd34d;
}

.teal-box {
  background: rgba(20,184,166,.1);
  border: 1px solid rgba(20,184,166,.4);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: .95rem;
  line-height: 1.6;
}

.success-box {
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.4);
  border-radius: 10px;
  padding: 14px 18px;
}

.error-box {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.4);
  border-radius: 10px;
  padding: 14px 18px;
  color: #fca5a5;
}

/* ── Animations ─────────────────────────────────────── */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .6; }
}
@keyframes firework {
  0%   { transform: scale(0) translate(-50%, -50%); opacity: 1; }
  100% { transform: scale(3) translate(-50%, -50%); opacity: 0; }
}
@keyframes rankSlide {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes streakPop {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes achievementPop {
  0%   { transform: translateX(-50%) scale(0.5); opacity: 0; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}
@keyframes achievementFade {
  to { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

.animate-in  { animation: slideIn .35s ease both; }
.animate-pop { animation: pop .4s ease; }
.animate-fade{ animation: fadeIn .4s ease both; }

/* ── Chip (player name tag) ────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20,184,166,.15);
  border: 1px solid rgba(20,184,166,.4);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--teal);
  animation: pop .35s ease;
}

/* (Kahoot-style answer tiles removed — WordNerd is free-text / typed answers.) */

/* ── Timer Strip (student) ─────────────────────────── */
.timer-strip-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}
.timer-strip {
  height: 100%;
  background: var(--teal);
  border-radius: 3px;
  width: 100%;
  transition: width linear, background .5s;
}
.timer-strip.urgent { background: var(--red); }

/* ── Student Countdown Number (2.3) ─────────────────── */
.student-countdown {
  position: fixed;
  top: 12px;
  right: 16px;
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal);
  z-index: 100;
  pointer-events: none;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
.student-countdown.urgent {
  color: var(--red);
  opacity: 1;
  animation: pulse 1s infinite;
}
.student-countdown.hidden-cd {
  display: none;
}

/* ── SVG Countdown Arc (teacher) ───────────────────── */
.countdown-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.countdown-wrap svg {
  transform: rotate(-90deg);
}
.countdown-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--teal);
}
.countdown-num.urgent { color: var(--red); }

/* ── Leaderboard ────────────────────────────────────── */
.rank-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  animation: rankSlide .3s ease both;
}
.rank-card.rank-1 { border-color: var(--gold);   background: rgba(245,158,11,.08); }
.rank-card.rank-2 { border-color: #94a3b8;       background: rgba(148,163,184,.06); }
.rank-card.rank-3 { border-color: #cd7f32;       background: rgba(205,127,50,.06); }

.rank-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  background: var(--border);
  color: var(--muted);
}
.rank-1 .rank-num { background: var(--gold);    color: #0f172a; }
.rank-2 .rank-num { background: #94a3b8;        color: #0f172a; }
.rank-3 .rank-num { background: #cd7f32;        color: #fff; }

.rank-name  { font-weight: 700; font-size: 1rem; flex: 1; }
.rank-score { font-weight: 700; color: var(--teal); font-size: 1.1rem; }
.rank-delta { font-size: .8rem; color: var(--green); font-weight: 600; }

/* ── Podium ─────────────────────────────────────────── */
.podium-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding: 40px 0 0;
}
.podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.podium-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}
.podium-name  { font-weight: 700; font-size: .9rem; text-align: center; max-width: 100px; }
.podium-score { font-size: .8rem; color: var(--muted); }
.podium-block {
  border-radius: 8px 8px 0 0;
  width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
}
.podium-1 .podium-avatar { background: var(--gold); }
.podium-1 .podium-block  { background: var(--gold); height: 120px; }
.podium-2 .podium-avatar { background: #94a3b8; }
.podium-2 .podium-block  { background: #94a3b8; height: 90px; }
.podium-3 .podium-avatar { background: #cd7f32; color: #fff; }
.podium-3 .podium-block  { background: #cd7f32; height: 70px; color: #fff; }

/* ── Fireworks ───────────────────────────────────────── */
.firework-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  animation: firework 1s ease-out forwards;
}

/* ── Streak badge ────────────────────────────────────── */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20,184,166,.15);
  border: 2px solid var(--teal);
  border-radius: 20px;
  padding: 6px 14px;
  font-weight: 800;
  color: var(--teal);
  font-size: 1rem;
  animation: streakPop .4s ease both;
}

/* ── Explanation Panel (2.1) ────────────────────────── */
.explanation-panel {
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  max-width: 400px;
  width: 100%;
  animation: slideIn .3s ease both;
}
.explanation-answer {
  font-weight: 700;
  color: var(--green);
  font-size: .95rem;
  margin-bottom: 8px;
}
.explanation-text {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.5;
}
.streak-bonus-text {
  font-size: .9rem;
  color: var(--teal);
  font-weight: 700;
}

/* ── Review Screen (2.2) ────────────────────────────── */
.review-section-header {
  font-weight: 700;
  font-size: .95rem;
  color: var(--teal);
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.review-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.review-item.review-correct { border-left: 3px solid var(--green); }
.review-item.review-wrong   { border-left: 3px solid var(--red); }
.review-item.review-skipped { border-left: 3px solid var(--muted); }
.review-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .9rem;
  flex-shrink: 0;
}
.review-correct .review-icon { background: rgba(34,197,94,.15); color: var(--green); }
.review-wrong .review-icon   { background: rgba(239,68,68,.15); color: var(--red); }
.review-skipped .review-icon { background: rgba(148,163,184,.15); color: var(--muted); }
.review-content { flex: 1; min-width: 0; }
.review-question { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.review-answer { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.review-exp-toggle {
  font-size: .8rem;
  color: var(--teal);
  cursor: pointer;
  font-weight: 600;
}
.review-exp-toggle:hover { text-decoration: underline; }
.review-exp {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 6px;
  padding: 8px;
  background: rgba(20,184,166,.05);
  border-radius: 6px;
}

/* ── Achievement Toast (3.2) ────────────────────────── */
.achievement-toast {
  position: fixed;
  top: auto;
  bottom: 110px;            /* clear of the top HUD/shop and the bottom answer row */
  left: 50%;
  max-width: 88vw;
  text-align: center;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), #f97316);
  color: #0f172a;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 12px 24px;
  border-radius: 12px;
  z-index: 1000;
  animation: achievementPop .3s ease, achievementFade .5s ease 2s forwards;
  box-shadow: 0 8px 24px rgba(245,158,11,.3);
}

/* ── Teacher Skip/Jump Controls (3.3) ─────────────── */
.teacher-extra-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-skip {
  background: var(--border);
  color: var(--text);
  padding: 8px 16px;
  font-size: .85rem;
}
.section-select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}
.section-select:focus { border-color: var(--teal); outline: none; }

/* ── PIN display ─────────────────────────────────────── */
.pin-display {
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 800;
  color: var(--teal);
  letter-spacing: 0.3em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ── Utility ─────────────────────────────────────────── */
.hidden     { display: none !important; }
.text-muted { color: var(--muted); }
.text-teal  { color: var(--teal); }
.text-gold  { color: var(--gold); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-center{ text-align: center; }
.fw-700     { font-weight: 700; }
.fw-800     { font-weight: 800; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex   { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* ── Question image (inline SVG) ─────────────────────── */
.q-image {
  max-height: 180px;
  margin: 10px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.q-image svg {
  max-height: 180px;
  max-width: 100%;
  height: auto;
}

/* ── Question hint (formula/rule reminder) ───────────── */
.q-hint {
  background: rgba(20,184,166,.08);
  border: 1px solid rgba(20,184,166,.35);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--teal);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.q-hint::before { content: '\1F4A1'; font-size: .9rem; }

/* ════════════════════════════════════════════════════════════════════════
   WordNerd components — the Brain/Research duality, shared teacher + student
   ════════════════════════════════════════════════════════════════════════ */

/* ── Phase banner: 🧠 Brain Window  →  🔎 Research Window ───────────────── */
.phase-banner {
  position: relative;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-weight: 800;
  text-align: center;
  overflow: hidden;
  transition: background .4s, color .4s, box-shadow .4s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.phase-banner .phase-count { font-variant-numeric: tabular-nums; opacity: .85; font-weight: 700; }
.phase-banner .phase-mult  { font-size: 1.05em; }
.phase-banner.brain {
  background: var(--brain-grad); color: #06283d;
  box-shadow: var(--glow-brain);
  animation: brainPulse 1.6s var(--ease) infinite;
}
.phase-banner.brain .phase-icon { animation: brainBob 1.2s var(--ease) infinite; display: inline-block; }
.phase-banner.research {
  background: var(--research-soft); color: var(--research);
  border: 1px solid rgba(245,158,11,.4); box-shadow: none; animation: none;
}
.phase-banner.curveball {
  background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff;
  box-shadow: 0 0 0 1px rgba(239,68,68,.5), 0 8px 28px rgba(239,68,68,.35);
  animation: pulse 1.2s ease-in-out infinite;
}
/* thin progress sliver across the bottom of the brain banner */
.phase-banner .phase-bar {
  position: absolute; left: 0; bottom: 0; height: 4px; width: 100%;
  background: rgba(6,40,61,.45); transform-origin: left; transition: transform 1s linear;
}

@keyframes brainPulse {
  0%,100% { box-shadow: 0 0 0 1px rgba(34,211,238,.5), 0 8px 28px rgba(34,211,238,.28); }
  50%     { box-shadow: 0 0 0 1px rgba(34,211,238,.7), 0 10px 36px rgba(34,211,238,.45); }
}
@keyframes brainBob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-2px) rotate(4deg); } }
@keyframes lockPop  { 0% { transform: scale(.6); opacity: 0; } 55% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes dotLight { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.animate-lock { animation: lockPop .4s var(--ease) both; }

/* ── "How it works" strip (lobby teaching aid) ─────────────────────────── */
.howto-strip { display: flex; gap: 12px; flex-wrap: wrap; }
.howto-step {
  flex: 1; min-width: 150px;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--elev-1);
}
.howto-step .howto-num {
  font-size: .72rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.howto-step .howto-head { font-size: 1.02rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.howto-step .howto-sub  { font-size: .85rem; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.howto-step.brain  .howto-head { color: var(--brain); }
.howto-step.brain  { border-color: rgba(34,211,238,.35); }
.howto-step.research .howto-head { color: var(--research); }
.howto-step.research { border-color: rgba(245,158,11,.35); }

/* ── Teacher live player wall (lights up as students lock in) ───────────── */
.player-wall { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.player-dot {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--border-2);
  color: var(--muted); font-weight: 700; font-size: .9rem;
  transition: background .25s, color .25s, border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.player-dot .dot-mark { font-size: .95em; opacity: 0; width: 0; transition: opacity .2s, width .2s; overflow: hidden; }
.player-dot.solved {
  color: #06283d; border-color: transparent;
  background: var(--brain-grad); box-shadow: var(--glow-brain);
  animation: dotLight .4s var(--ease) both;
}
.player-dot.solved.research {
  background: var(--research-grad); box-shadow: 0 0 0 1px rgba(245,158,11,.5), 0 8px 24px rgba(245,158,11,.3);
}
.player-dot.solved.flagged {
  background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff;
  box-shadow: 0 0 0 1px rgba(239,68,68,.5), 0 8px 24px rgba(239,68,68,.3);
}
/* ⚡ Flash — an own-brain answer in the first 6s. Stays in the "knew it" (lime) family, ringed gold. */
.player-dot.solved.flash {
  box-shadow: 0 0 0 2px var(--flag, #FFAD1F), 0 0 18px rgba(255,173,31,.55);
}
.player-dot.solved .dot-mark { opacity: 1; width: auto; }

/* live "knew it vs researched vs flagged" split readout */
.split-readout { display: flex; gap: 18px; align-items: center; font-weight: 800; flex-wrap: wrap; }
.split-readout .split-brain    { color: var(--brain); }
.split-readout .split-research { color: var(--research); }
.split-readout .split-flagged  { color: var(--red); }
.split-readout .split-num { font-size: 1.5rem; font-variant-numeric: tabular-nums; }

/* ── Student mini-HUD (persistent score + streak during teacher-led play) ─ */
.hud { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 800; }
.hud-score { color: var(--gold); font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hud-score .hud-unit { font-size: .65rem; color: var(--muted); font-weight: 600; }
.hud-streak {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .8rem; font-weight: 800; color: var(--brain);
  background: var(--brain-soft); border: 1px solid rgba(34,211,238,.35);
  border-radius: 999px; padding: 3px 10px;
}
.hud-streak.hidden { display: none; }

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
