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

:root {
  --font-body: 'DM Sans', sans-serif;
  --cream: #F5F0E8;
  --cream-dark: #EDE6D8;
  --ink: #1A1410;
  --ink-mid: #4A3F35;
  --ink-light: #9A8F85;
  --pulse: #E8410A;
  --pulse-light: #FFE8E0;
  --pulse-mid: #F26B45;
  --green: #1A7A4A;
  --green-light: #D6F0E2;
  --amber: #D4820A;
  --amber-light: #FFF0D0;
  --blue: #1B5FA8;
  --blue-light: #DCE8F8;
  --card: #FFFFFF;
  --shadow: 0 2px 16px rgba(26,20,16,0.08);
  --shadow-hover: 0 8px 32px rgba(26,20,16,0.14);
  --r: 20px;
  /* Motion system */
  --dur-fast: 140ms;
  --dur-med: 240ms;
  --dur-screen: 360ms;
  --ease-standard: cubic-bezier(.2,.75,.25,1);
  --ease-pop: cubic-bezier(.34,1.56,.64,1);
  --ease-spring: cubic-bezier(.34,1.4,.64,1);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  /* iOS: geen rubber-band scroll buiten de app */
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  /* iOS safe area (notch / Dynamic Island / home bar) */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Organic background shapes */
.bg-shape {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.bg-shape-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(232,65,10,0.06) 0%, transparent 70%);
  top: -200px; right: -150px;
}
.bg-shape-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(26,122,74,0.05) 0%, transparent 70%);
  bottom: -100px; left: -100px;
}

.screen { display: none; position: relative; z-index: 1; }
.screen.active { display: block; animation: slideInRight var(--dur-screen) var(--ease-spring) both; }
.screen.active[data-enter="back"] { animation: slideInLeft var(--dur-screen) var(--ease-spring) both; }
.screen.active[data-enter="fade"] { animation: screenFade var(--dur-med) var(--ease-standard) both; }
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes screenFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── HOME ── */
#home {
  min-height: 100vh;
  padding: 0 1.25rem calc(3rem + 72px);
  max-width: 480px;
  margin: 0 auto;
}

.home-top {
  padding-top: 3.5rem;
  margin-bottom: 2.5rem;
}

.logo-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pulse);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.6rem;
}
.logo-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--pulse);
  border-radius: 1px;
}

h1.logo {
  font-family: 'Fraunces', serif;
  font-size: 64px;
  font-weight: 900;
  line-height: 0.95;
  color: var(--ink);
  letter-spacing: -2px;
}
h1.logo em {
  font-style: italic;
  color: var(--pulse);
}

.tagline {
  margin-top: 1rem;
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.55;
  max-width: 280px;
}

/* Stats strip */
.stats-strip {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding: 1rem 1.25rem;
  background: var(--ink);
  border-radius: 16px;
  color: white;
}
.stat-item { flex: 1; }
.stat-num {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 700;
  color: white;
  display: block;
  line-height: 1;
}
.stat-lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
  display: block;
}

/* Section label */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.75rem;
}

/* Mode cards */
.mode-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.mode-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
  position: relative;
  overflow: hidden;
}
.mode-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  transition: width 0.2s;
}
.mode-card.blitz::after { background: var(--pulse); }
.mode-card.classic::after { background: var(--blue); }
.mode-card.survival::after { background: var(--green); }
.mode-card.dossier::after { background: var(--amber); }
.mode-card.dossier .mode-icon-wrap { background: var(--amber-light); }

.mode-card:active {
  transform: scale(0.955);
  box-shadow: 0 1px 6px rgba(26,20,16,0.06);
}
.mode-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.mode-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.mode-card.blitz .mode-icon-wrap { background: var(--pulse-light); }
.mode-card.classic .mode-icon-wrap { background: var(--blue-light); }
.mode-card.survival .mode-icon-wrap { background: var(--green-light); }

.mode-info { flex: 1; }
.mode-name {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  display: block;
  line-height: 1.2;
}
.mode-sub {
  font-size: 13px;
  color: var(--ink-light);
  margin-top: 2px;
  display: block;
}

.mode-arrow {
  font-size: 18px;
  color: var(--ink-light);
  transition: transform 0.15s;
}
.mode-card:hover .mode-arrow { transform: translateX(3px); }

/* ── Domain filter ── */
.cat-wrap {
  margin-bottom: 2rem;
}
/* Base pill (used in favourites, learn etc.) */
.cat-pill {
  display: inline-flex;
  align-items: center;
  background: var(--card);
  border: 1.5px solid rgba(26,20,16,0.1);
  border-radius: 100px;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-mid);
  transition: all var(--dur-fast) var(--ease-standard);
}
.cat-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
/* "Alle domeinen" full-width pill */
.cat-pill.cat-all {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--card);
  border: 1.5px solid rgba(26,20,16,0.1);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-mid);
  transition: all var(--dur-fast) var(--ease-standard);
  margin-bottom: 0.55rem;
}
.cat-pill.cat-all.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
/* Domain grid */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}
.cat-pill.domain-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.65rem 0.25rem 0.55rem;
  background: var(--dtc, var(--card));
  border: 1.5px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.13s, box-shadow 0.13s, background 0.13s;
}
.cat-pill.domain-tile:active { transform: scale(0.95); }
.cat-pill.domain-tile:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(26,20,16,0.08); }
.cat-pill.domain-tile.active {
  background: var(--ink);
  box-shadow: 0 2px 8px rgba(26,20,16,0.18);
}
.dt-icon { font-size: 1.35rem; line-height: 1; }
.dt-name {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ink-mid);
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.2;
}
.cat-pill.domain-tile.active .dt-name { color: rgba(255,255,255,0.9); }
.dt-count {
  font-family: var(--font-body);
  font-size: 0.55rem;
  color: var(--ink-light);
  font-weight: 500;
}
.cat-pill.domain-tile.active .dt-count { color: rgba(255,255,255,0.5); }

/* ── GAME ── */
#game {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}
#game.active {
  display: flex;
  flex-direction: column;
}

.game-nav {
  padding: 1.25rem 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.quit-btn {
  background: none;
  border: 1.5px solid var(--cream-dark);
  color: var(--ink-mid);
  border-radius: 10px;
  padding: 0.35rem 0.8rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-standard);
}
.quit-btn:hover { border-color: var(--pulse); color: var(--pulse); }

.sound-btn {
  background: none;
  border: 1.5px solid var(--cream-dark);
  border-radius: 10px;
  padding: 0.35rem 0.6rem;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  line-height: 1;
}
.sound-btn:hover { transform: scale(1.15); border-color: var(--ink-mid); }
.sound-btn:active { transform: scale(0.92); }

/* HUD */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  color: white;
}
.hud-item { text-align: center; }
.hud-val {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 700;
  color: white;
  display: block;
  line-height: 1;
}
.hud-lbl {
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
  display: block;
}

/* Timer arc */
.timer-wrap {
  position: relative;
  width: 56px; height: 56px;
}
.timer-wrap svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
#timerArc { transition: stroke-dashoffset 0.9s linear, stroke 0.4s ease; }
.timer-center {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  color: white;
}

/* Progress dots */
.progress-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cream-dark);
  transition: all 0.3s;
}
.dot.done { background: var(--green); }
.dot.wrong-dot { background: var(--pulse); }
.dot.current { background: var(--ink); transform: scale(1.3); }

/* Question card */
.q-card {
  background: var(--card);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.q-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.q-difficulty {
  display: flex;
  gap: 1px;
  font-size: 14px;
  line-height: 1;
}
.diff-star { font-size: 11px; line-height: 1; }
.diff-star.off { color: rgba(26,20,16,0.14); }
.diff-wrap.d-easy   .diff-star.on { color: var(--green); }
.diff-wrap.d-mid    .diff-star.on { color: var(--amber); }
.diff-wrap.d-hard   .diff-star.on { color: #F07030; }
.diff-wrap.d-expert .diff-star.on { color: var(--pulse); }

.q-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 0;
}
.q-type-tag.diagnose { background: var(--pulse-light); color: var(--pulse); }
.q-type-tag.truefalse { background: var(--amber-light); color: var(--amber); }
.q-type-tag.pharma { background: var(--blue-light); color: var(--blue); }
.q-type-tag.lab { background: var(--green-light); color: var(--green); }
.q-type-tag.diff { background: rgba(107,33,168,0.1); color: #6B21A8; }
.q-type-tag.test { background: rgba(15,118,110,0.1); color: #0F766E; }

.q-domain {
  font-size: 12px;
  color: var(--ink-light);
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.q-text {
  font-family: 'Fraunces', serif;
  font-size: clamp(18px, 4.8vw, 21px);
  font-weight: 300;
  line-height: 1.42;
  color: var(--ink);
}

/* Formatted question parts (lab/data questions) */
.fq-intro {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: var(--cream-dark);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 0.7rem;
}
.fq-table {
  margin-bottom: 0.85rem;
  border: 1.5px solid rgba(26,20,16,0.1);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}
.fq-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(26,20,16,0.06);
  font-size: 13.5px;
}
.fq-row:last-child { border-bottom: none; }
.fq-row.fq-high { background: rgba(220,38,38,0.07); }
.fq-row.fq-low  { background: rgba(37,99,235,0.07); }
.fq-name {
  flex: 1;
  color: var(--ink-mid);
  font-size: 13px;
}
.fq-val {
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}
.fq-unit {
  font-weight: 400;
  color: var(--ink-light);
  font-size: 11.5px;
}
.fq-ind {
  font-size: 13px;
  font-weight: 700;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.fq-row.fq-high .fq-ind { color: #DC2626; }
.fq-row.fq-low  .fq-ind { color: #2563EB; }
.fq-row.fq-ok   .fq-ind { color: #16A34A; }
.fq-desc {
  color: var(--ink-mid);
  font-size: 13px;
  flex: 1;
}
.fq-q {
  display: block;
}

/* Clinical scenario findings — stacked bullets */
.fq-bullets {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0.55rem 0 0.75rem;
  font-family: 'DM Sans', sans-serif;
}
.fq-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.fq-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-light);
  flex-shrink: 0;
  margin-top: 8px;
}
.fq-bullet-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-mid);
}
/* True/false — highlighted prose */
.fq-tf-prose {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
mark.fq-mark {
  background: rgba(232,65,10,0.11);
  color: #b83200;
  border-radius: 3px;
  padding: 1px 4px;
  font-weight: 600;
  font-style: normal;
}
/* Legacy inline findings (kept for fallback) */
.fq-findings {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  color: var(--ink-mid);
  line-height: 1.65;
  margin: 0.5rem 0 0.7rem;
}
.fq-sep   { color: var(--ink-light); }
.fq-bullet-ind { font-size: 12px; margin-left: 1px; }

/* Answer buttons */
.answers-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.ans-btn {
  background: var(--card);
  border: 2px solid var(--cream-dark);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.15s var(--ease-standard), border-color 0.12s, background 0.12s;
  box-shadow: var(--shadow);
}
.ans-btn:not(:disabled):active {
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(26,20,16,0.06);
}
.ans-btn:hover:not(:disabled) {
  border-color: var(--ink);
  transform: translateX(4px);
}
.ans-key {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-mid);
  flex-shrink: 0;
  transition: all 0.18s var(--ease-spring);
}
.ans-btn:hover:not(:disabled) .ans-key {
  background: var(--ink);
  color: white;
}
.ans-btn.correct {
  background: var(--green-light);
  border-color: var(--green);
  animation: ansCorrect 0.5s var(--ease-spring);
}
.ans-btn.correct .ans-key { background: var(--green); color: white; }
.ans-btn.wrong {
  background: var(--pulse-light);
  border-color: var(--pulse);
  animation: shake 0.4s ease;
}
.ans-btn.wrong .ans-key { background: var(--pulse); color: white; }
.ans-btn:disabled { cursor: default; }

/* True/false */
.tf-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.tf-btn {
  border-radius: 20px;
  padding: 1.75rem 1rem;
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: 2px solid;
  transition: all 0.15s;
  box-shadow: var(--shadow);
}
.tf-btn.true-btn {
  background: var(--green-light);
  border-color: transparent;
  color: var(--green);
}
.tf-btn.false-btn {
  background: var(--pulse-light);
  border-color: transparent;
  color: var(--pulse);
}
.tf-btn:hover:not(:disabled) { transform: scale(1.03); box-shadow: var(--shadow-hover); }
.tf-btn.correct { border-color: var(--green); animation: bounce 0.35s; }
.tf-btn.wrong { border-color: var(--pulse); animation: shake 0.35s; }
.tf-btn:disabled { cursor: default; }

/* Feedback toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 4rem));
  opacity: 0;
  background: var(--ink);
  color: white;
  border-radius: 16px;
  padding: 1rem 1.5rem;
  max-width: 380px;
  width: calc(100% - 2.5rem);
  z-index: 999;
  cursor: pointer;
  transition: transform var(--dur-med) var(--ease-pop), opacity var(--dur-med) var(--ease-standard);
  box-shadow: 0 8px 32px rgba(26,20,16,0.25);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 380px) {
  .domain-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
.toast-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.38);
  margin-top: 0.4rem;
  letter-spacing: 0.04em;
}
.toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.toast-ring { flex-shrink: 0; }
@keyframes toast-drain {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: 56.5; }
}
.toast.show .toast-ring-arc {
  animation: toast-drain 5s linear forwards;
}
.toast-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.toast.correct-toast .toast-dot { background: var(--green); }
.toast.wrong-toast .toast-dot { background: var(--pulse); }
.toast-body { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.5; }

/* Combo burst */
.combo-burst {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  z-index: 500;
  text-align: center;
}
.combo-burst.show {
  animation: burstAnim 1s cubic-bezier(0.34,1.2,0.64,1) forwards;
}
.combo-num {
  font-family: 'Fraunces', serif;
  font-size: 72px;
  font-weight: 900;
  color: var(--pulse);
  line-height: 1;
  -webkit-text-stroke: 2px var(--ink);
}
.combo-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Lives */
.lives-wrap {
  display: flex;
  gap: 4px;
  align-items: center;
}
.life-heart {
  width: 18px; height: 18px;
  display: inline-block;
  transition: transform 0.2s;
}
.life-heart.lost { opacity: 0.2; }

/* ── RESULTS ── */
#results {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.results-top {
  padding-top: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.results-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.score-big {
  font-family: 'Fraunces', serif;
  font-size: 96px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -3px;
}
.score-big span { color: var(--pulse); }

.grade-tag {
  display: inline-block;
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-top: 0.75rem;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 1rem 0.75rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-big {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 700;
  display: block;
  line-height: 1;
}
.stat-big.green { color: var(--green); }
.stat-big.red { color: var(--pulse); }
.stat-small {
  font-size: 11px;
  color: var(--ink-light);
  font-weight: 500;
  margin-top: 3px;
  display: block;
}

/* Domain breakdown */
.breakdown-card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.breakdown-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 1rem;
}
.breakdown-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.breakdown-row:last-child { margin-bottom: 0; }
.breakdown-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mid);
  width: 130px;
  flex-shrink: 0;
}
.breakdown-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--cream-dark);
  border-radius: 3px;
  overflow: hidden;
}
.breakdown-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green);
  transition: width 0.6s cubic-bezier(0.34,1.2,0.64,1);
}
.breakdown-pct {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  width: 36px;
  text-align: right;
}

/* Leaderboard */
.lb-card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.lb-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 1rem;
}
.lb-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  margin-bottom: 0.4rem;
  transition: background 0.2s;
}
.lb-row.you-row { background: var(--pulse-light); }
.lb-rank-num {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  width: 24px;
  text-align: center;
  color: var(--ink-light);
}
.lb-rank-num.r1 { color: #C49A00; }
.lb-rank-num.r2 { color: #8A8A8A; }
.lb-rank-num.r3 { color: #A0693A; }
.lb-name-col { flex: 1; font-size: 14px; font-weight: 500; }
.lb-pts-col {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--pulse);
}

/* Action buttons */
/* XP progress bar on results screen */
.xp-progress-card {
  background: white;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 8px rgba(26,20,16,0.07);
}
.xp-prog-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
}
.xp-prog-rank { font-weight: 600; color: var(--ink); }
.xp-prog-next { color: var(--ink-light); }
.xp-prog-next strong { color: var(--ink); }
.xp-prog-bar-bg {
  height: 7px;
  background: rgba(26,20,16,0.08);
  border-radius: 99px;
  overflow: hidden;
}
.xp-prog-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
}

/* Replay card on results screen */
.results-replay-card {
  display: flex;
  align-items: center;
  background: var(--ink);
  color: white;
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 0.75rem;
  cursor: pointer;
  gap: 12px;
  transition: transform 0.24s var(--ease-spring), box-shadow 0.18s var(--ease-standard);
  box-shadow: 0 4px 16px rgba(26,20,16,0.25);
}
.results-replay-card:active { transform: scale(0.95); box-shadow: 0 2px 8px rgba(26,20,16,0.18); }
.rrc-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  opacity: 0.65;
  flex: none;
}
.rrc-mode {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  flex: 1;
}
.rrc-arrow {
  font-size: 22px;
  opacity: 0.8;
}

.action-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.btn-primary {
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 1.1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.18s var(--ease-standard);
  box-shadow: 0 4px 16px rgba(26,20,16,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,20,16,0.3); }
.btn-primary:active { transform: scale(0.95); box-shadow: 0 2px 8px rgba(26,20,16,0.18); }
.btn-secondary {
  background: transparent;
  color: var(--ink-mid);
  border: 2px solid var(--cream-dark);
  border-radius: 16px;
  padding: 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }

/* Animations */
@keyframes ansCorrect {
  0%   { transform: scale(1); }
  18%  { transform: scale(1.055); box-shadow: 0 0 0 5px rgba(26,122,74,0.22), 0 6px 20px rgba(26,122,74,0.18); }
  55%  { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(26,122,74,0.07); }
  100% { transform: scale(1); box-shadow: var(--shadow); }
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  15% { transform: translateX(-8px); }
  30% { transform: translateX(7px); }
  45% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}
@keyframes bounce {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.07); }
  65%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}
@keyframes qEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.99); }
  to   { opacity: 1; transform: none; }
}
.q-card.q-enter { animation: qEnter 0.32s var(--ease-spring) both; }
@keyframes burstAnim {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  50% { transform: translate(-50%, -60%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -80%) scale(0.8); opacity: 0; }
}
@keyframes sdPopUp {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  60%  { opacity: 1; transform: translateY(-28px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-52px) scale(0.85); }
}
.sd-score-pop {
  position: fixed;
  top: 48px;
  right: 20px;
  font-family: 'Fraunces', serif;
  font-size: 1.7rem;
  font-weight: 900;
  pointer-events: none;
  z-index: 600;
  animation: sdPopUp 0.85s cubic-bezier(0.2,0,0.3,1) forwards;
  -webkit-text-stroke: 1px rgba(0,0,0,0.12);
}
.sd-score-pop.pos { color: var(--green); }
.sd-score-pop.neg { color: var(--pulse); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.fade-in   { animation: fadeUp 0.52s var(--ease-spring) both; }
.fade-in-1 { animation: fadeUp 0.52s 0.06s var(--ease-spring) both; }
.fade-in-2 { animation: fadeUp 0.52s 0.12s var(--ease-spring) both; }
.fade-in-3 { animation: fadeUp 0.52s 0.18s var(--ease-spring) both; }
.fade-in-4 { animation: fadeUp 0.52s 0.24s var(--ease-spring) both; }
.fade-in-5 { animation: fadeUp 0.52s 0.30s var(--ease-spring) both; }
.fade-in-6 { animation: fadeUp 0.52s 0.36s var(--ease-spring) both; }

/* ── FACT SHEET (bottom sheet) ── */
.fact-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.fact-modal.open {
  pointer-events: all;
  opacity: 1;
}
.fact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26,20,16,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.fact-sheet {
  position: relative;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  padding: 0.75rem 1.5rem 3.5rem;
  width: 100%;
  max-width: 480px;
  transform: translateY(100%);
  transition: transform 0.42s var(--ease-spring);
  box-shadow: 0 -4px 40px rgba(26,20,16,0.18);
  max-height: 85vh;
  overflow-y: auto;
}
.fact-modal.open .fact-sheet {
  transform: translateY(0);
}
.fact-handle {
  width: 36px; height: 4px;
  background: var(--cream-dark);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}
.fact-sheet-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.fact-domain {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.2rem;
}
.fact-heading {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.fact-star-btn {
  background: var(--cream);
  border: none;
  border-radius: 14px;
  width: 48px; height: 48px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), background 0.2s;
  flex-shrink: 0;
}
.fact-star-btn:active { transform: scale(0.85); }
.fact-star-btn.starred { background: var(--amber-light); }
@keyframes starPop {
  0%,100% { transform: scale(1); }
  45% { transform: scale(1.45); }
}
.fact-star-btn.pop { animation: starPop 0.3s ease; }
.fact-question {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--ink-mid);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1.5px solid var(--cream-dark);
}
.fact-explanation {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.75;
  margin-bottom: 2rem;
}
/* ── Wiki Tabs ── */
.wiki-tab-nav {
  flex-shrink: 0;
  padding: 12px 0 0;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 2;
}
.wiki-tab-labels {
  display: flex;
}
.wiki-tab-label {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-light);
  cursor: pointer;
  padding-bottom: 10px;
  transition: color 0.2s;
  user-select: none;
  font-family: 'DM Sans', sans-serif;
}
.wiki-tab-label.active {
  color: var(--ink);
  font-weight: 600;
}
.wiki-tab-underline-track {
  height: 2px;
  background: var(--cream-dark);
  border-radius: 1px;
  position: relative;
  margin: 0 0 2px;
}
.wiki-tab-underline-pill {
  position: absolute;
  height: 2px;
  background: var(--pulse);
  border-radius: 1px;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  top: 0;
}
.wiki-panels-viewport {
  overflow: hidden;
  height: 58vh;
}
.wiki-panels-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.wiki-panel {
  min-width: 100%;
  overflow-y: auto;
  padding: 14px 0 60px;
  scrollbar-width: none;
}
.wiki-panel::-webkit-scrollbar { display: none; }

/* Kern */
.wiki-kern-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-top: 2px;
}
.wiki-kern-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--pulse);
  background: var(--pulse-light);
  border-radius: 20px;
  padding: 4px 11px;
}
.wiki-kern-divider {
  flex: 1;
  height: 1px;
  background: var(--cream-dark);
}
.wiki-kern-lede {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.7;
  padding: 14px 14px 14px 18px;
  border-left: 3px solid var(--pulse);
  border-radius: 0 14px 14px 0;
  background: linear-gradient(to right, rgba(232,65,10,0.05) 0%, transparent 55%);
  margin-bottom: 16px;
}
.wiki-bigfact {
  background: var(--ink);
  border-radius: 20px;
  padding: 18px 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.wiki-bigfact-num {
  font-family: 'Fraunces', serif;
  font-size: 46px;
  font-weight: 900;
  color: var(--pulse);
  line-height: 1;
  flex-shrink: 0;
}
.wiki-bigfact-label {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.wiki-bigfact-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.52);
  line-height: 1.45;
}
.wiki-redflag {
  background: rgba(232,65,10,0.06);
  border-radius: 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid rgba(232,65,10,0.18);
  overflow: hidden;
}
.wiki-redflag-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--pulse);
  background: rgba(232,65,10,0.09);
  padding: 6px 14px 5px;
  border-bottom: 1px solid rgba(232,65,10,0.14);
}
.wiki-redflag-text {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.6;
  padding: 10px 14px 12px;
}

/* Mechanisme */
.wiki-mech-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.wiki-mech-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.wiki-mech-num {
  width: 26px;
  height: 26px;
  background: var(--ink);
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wiki-mech-line {
  width: 1.5px;
  flex: 1;
  background: var(--cream-dark);
  margin: 4px 0;
  min-height: 16px;
}
.wiki-mech-body {
  padding: 2px 0 18px;
  flex: 1;
}
.wiki-mech-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.wiki-mech-desc {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.5;
}
.wiki-mnemonic {
  background: rgba(79, 70, 229, 0.07);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 4px;
}
.wiki-mnemonic-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6D5FB5;
  margin-bottom: 10px;
}
.wiki-mnemonic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.wiki-mnemonic-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.wiki-mnemonic-letter {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 900;
  color: #4F46E5;
  line-height: 1;
  min-width: 14px;
  flex-shrink: 0;
}
.wiki-mnemonic-word {
  font-size: 12.5px;
  color: #312E81;
  line-height: 1.4;
  padding-top: 3px;
}

/* Onderscheid */
.wiki-diff-item {
  padding: 11px 0;
  border-bottom: 1px solid var(--cream-dark);
  display: grid;
  grid-template-columns: 3px 1fr;
  gap: 12px;
  align-items: stretch;
}
.wiki-diff-item:last-child { border-bottom: none; }
.wiki-diff-stripe { border-radius: 2px; }
.wiki-diff-stripe.ok     { background: var(--green); }
.wiki-diff-stripe.warn   { background: var(--amber); }
.wiki-diff-stripe.danger { background: #E84A4A; }
.wiki-diff-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.wiki-diff-name.ok     { color: #1A5C38; }
.wiki-diff-name.danger { color: #B83030; }
.wiki-diff-desc {
  font-size: 12.5px;
  color: var(--ink-mid);
  line-height: 1.5;
}

/* Behandeling */
.wiki-treat-urgent {
  background: var(--ink);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.wiki-treat-urgent-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 5px;
}
.wiki-treat-urgent-text {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  color: white;
  line-height: 1.45;
}
.wiki-treat-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.wiki-treat-row:last-child { border-bottom: none; }
.wiki-treat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pulse);
  flex-shrink: 0;
  margin-top: 6px;
}
.wiki-treat-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.wiki-treat-detail {
  font-size: 12.5px;
  color: var(--ink-mid);
  line-height: 1.4;
}
.fact-close-btn {
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 1rem 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 16px rgba(26,20,16,0.2);
  transition: transform 0.15s;
}
.fact-close-btn:active { transform: scale(0.98); }

/* ── FAVORIETEN ── */
#favourites {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}
.fav-screen {}
.fav-nav {
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.fav-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
}
.fav-badge {
  background: var(--ink);
  color: white;
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  min-width: 28px;
  text-align: center;
}
.fav-filter { margin-bottom: 1.5rem; }
.fav-pill-count {
  background: rgba(0,0,0,0.08);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  margin-left: 3px;
}
.cat-pill.active .fav-pill-count { background: rgba(255,255,255,0.2); }
.fav-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.fav-card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.fav-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.fav-domain-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-light);
  padding: 3px 9px;
  border-radius: 7px;
}
.fav-unstar {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--amber);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: transform 0.15s, background 0.15s;
  line-height: 1;
}
.fav-unstar:hover { background: var(--amber-light); }
.fav-unstar:active { transform: scale(0.8); }
.fav-question {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1.5px solid var(--cream-dark);
}
.fav-explanation {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.65;
}
.fav-empty {
  text-align: center;
  padding: 4rem 1rem 2rem;
}
.fav-empty-icon {
  font-size: 52px;
  opacity: 0.2;
  margin-bottom: 1rem;
  line-height: 1;
}
.fav-empty-title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.fav-empty-sub {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.55;
  max-width: 240px;
  margin: 0 auto;
}

/* Favourites entry on home */
.fav-home-card {
  background: var(--amber-light);
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}
.fav-home-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.fav-home-card:active { transform: scale(0.98); }

.adm-home-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  border: 1.5px solid rgba(26,20,16,0.08);
  transition: transform 0.18s, box-shadow 0.18s;
  box-shadow: var(--shadow);
  margin-top: 0.75rem;
}
.adm-home-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.adm-home-card:active { transform: scale(0.98); }
.fav-home-icon {
  width: 44px; height: 44px;
  background: white;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.fav-home-info { flex: 1; }
.fav-home-name {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  display: block;
}
.fav-home-sub {
  font-size: 12px;
  color: var(--amber);
  font-weight: 600;
  display: block;
  margin-top: 1px;
}

/* Wrong answers review */
.wrong-review-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cream-dark);
}
.wrong-review-item:last-child { border-bottom: none; }
.wrong-review-domain {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pulse);
  margin-bottom: 3px;
}
.wrong-review-q {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.4;
}
.wrong-review-correct {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 4px;
}
.wrong-review-ex {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.5;
}

/* ── Daily Challenge ── */
.daily-home-card {
  background: linear-gradient(135deg, #1A1410 0%, #2A1F18 100%);
  border-radius: var(--r);
  padding: 1.25rem 1.25rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}
.daily-home-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.daily-home-card:active { transform: scale(0.98); }
.daily-home-card.played {
  background: linear-gradient(135deg, #1A3A28 0%, #0F2518 100%);
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}
.daily-home-meta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pulse-mid);
}
.daily-home-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: white;
  line-height: 1.1;
}
.daily-home-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}
.daily-home-arrow {
  font-size: 24px;
  color: var(--pulse);
  font-weight: 700;
}
.daily-home-grid-small {
  font-size: 18px;
  letter-spacing: 2px;
  line-height: 1;
}
.daily-home-score {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

/* Next-best action on home */
.learning-plan-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--card);
  border: 1.5px solid var(--cream-dark);
  border-left: 4px solid var(--blue);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 2px 8px rgba(74,63,53,0.07);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.learning-plan-card:active { transform: scale(0.98); }
.lp-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--blue-light);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.lp-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lp-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}
.lp-sub {
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--ink-mid);
}
.lp-badge {
  flex-shrink: 0;
  min-width: 32px;
  max-width: 86px;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Daily game badge */
.daily-badge {
  font-family: 'Fraunces', serif;
  font-size: 13px;
  color: var(--pulse);
  font-weight: 700;
}

/* Daily results */
.daily-result-grid {
  font-size: 28px;
  letter-spacing: 3px;
  margin: 1.25rem 0 1rem;
  line-height: 1.3;
  word-break: break-all;
}

.daily-countdown-card {
  background: var(--ink);
  border-radius: 16px;
  padding: 1.25rem;
  margin: 1rem 0;
  text-align: center;
}
.daily-countdown-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.5rem;
}
.daily-countdown {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 700;
  color: white;
  letter-spacing: 2px;
}

/* Share button */
.btn-share {
  width: 100%;
  background: var(--pulse);
  border: none;
  border-radius: 14px;
  padding: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.75rem;
}
.btn-share:hover { background: #D43808; }
.btn-share:active { transform: scale(0.98); }

/* ── Leer-modus ── */
.mode-card.learn { background: linear-gradient(135deg, #1B3A5F 0%, #12294A 100%); }
.mode-card.learn .mode-name { color: #A8C8F0; }
.mode-card.learn .mode-sub  { color: rgba(168,200,240,0.6); }
.mode-card.learn .mode-arrow { color: #A8C8F0; }
.mode-card.learn .mode-icon-wrap { background: rgba(168,200,240,0.12); }

.lm-mode-tag {
  font-family: 'Fraunces', serif;
  font-size: 13px;
  color: var(--blue);
  font-weight: 700;
}
.lm-progress-wrap {
  height: 4px;
  background: var(--cream-dark);
  border-radius: 2px;
  margin: 1rem 0 0.4rem;
  overflow: hidden;
}
.lm-progress-bar {
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.lm-counter {
  font-size: 12px;
  color: var(--ink-light);
  font-weight: 600;
  text-align: right;
  margin-bottom: 1rem;
}
.lm-q-card { margin-bottom: 1rem; }
.lm-q-text { font-size: 17px; }
.lm-tier-chip {
  background: var(--cream);
  color: var(--ink-mid);
  border: 1px solid var(--cream-dark);
  border-radius: 999px;
  padding: 3px 8px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.lm-explanation-box {
  background: var(--card);
  border-radius: 16px;
  padding: 1.25rem;
  margin: 0.75rem 0;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--blue);
}
.lm-expl-result {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.lm-expl-result.ok   { color: var(--green); }
.lm-expl-result.fail { color: var(--pulse); }
.lm-expl-text {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.65;
}
.lm-next-btn {
  width: 100%;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 0.25rem;
}
.lm-next-btn:hover  { background: #174F8F; }
.lm-next-btn:active { transform: scale(0.98); }

.lm-repeat-card {
  background: var(--card);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  margin-top: 1rem;
}
.lm-repeat-icon  { font-size: 48px; margin-bottom: 0.75rem; }
.lm-repeat-title {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.lm-repeat-sub {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.5;
}

/* Domain setup grid */
.lm-domain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.lm-domain-btn {
  background: var(--card);
  border: 2px solid var(--cream-dark);
  border-radius: 14px;
  padding: 1rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.lm-domain-btn:hover  { border-color: var(--blue); background: var(--blue-light); }
.lm-domain-btn.active { border-color: var(--blue); background: var(--blue-light); color: var(--blue); }
.lm-domain-icon { font-size: 20px; }

.lm-tier-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}
.lm-tier-btn {
  width: 100%;
  min-height: 58px;
  background: var(--card);
  border: 2px solid var(--cream-dark);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.lm-tier-btn:hover,
.lm-tier-btn.active {
  border-color: var(--blue);
  background: var(--blue-light);
}
.lm-tier-num {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--cream);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--blue);
  flex-shrink: 0;
}
.lm-tier-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.lm-tier-copy strong {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink);
}
.lm-tier-copy small {
  font-family: var(--font-body);
  font-size: 0.76rem;
  line-height: 1.3;
  color: var(--ink-mid);
}
#lm-start-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Domain stats op home */
#domainStatsWrap { margin-top: 0.5rem; }
.domain-stat-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
}
.domain-stat-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.domain-stat-info { flex: 1; }
.domain-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.domain-stat-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.domain-stat-pct   { font-size: 13px; font-weight: 700; font-family: 'Fraunces', serif; }
.domain-stat-bar-bg {
  height: 6px;
  background: var(--cream-dark);
  border-radius: 3px;
  overflow: hidden;
}
.domain-stat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* XP & Rang */
#xpWrap { margin-bottom: 0.75rem; }
.xp-card {
  background: var(--card);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 8px rgba(74,63,53,0.07);
}
.xp-rank-row { display: flex; align-items: center; gap: 0.85rem; }
.xp-icon { font-size: 28px; flex-shrink: 0; }
.xp-rank-info { flex: 1; }
.xp-rank-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.xp-rank-label { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 700; }
.xp-total { font-size: 12px; font-weight: 600; color: var(--ink-mid); }
.xp-bar-bg {
  height: 8px;
  background: var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}
.xp-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}
.xp-next-label { font-size: 11px; color: var(--ink-light); font-weight: 500; }

/* Zwakke vragen kaart op home */
.weak-home-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--card);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  margin-top: 0.75rem;
  box-shadow: 0 2px 8px rgba(74,63,53,0.07);
  cursor: pointer;
  border: 2px solid var(--pulse);
  transition: transform 0.15s, box-shadow 0.15s;
}
.weak-home-card:active { transform: scale(0.98); }
.weak-home-icon { font-size: 22px; }

/* Bespreek sessie knop op resultatenscherm */
.btn-review-session {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--card);
  border: 1.5px solid var(--cream-dark, #e0d8cc);
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(74,63,53,0.07);
}
.btn-review-session:active { transform: scale(0.98); }

/* Nabespreek scherm */
.rv-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.5rem;
}
.rv-header-info { display: flex; flex-direction: column; gap: 1px; }
.rv-title  { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.rv-subtitle { font-family: var(--font-body); font-size: 0.8rem; color: var(--ink-light, #6b5e50); }
.rv-list { padding: 0.5rem 1rem 2rem; display: flex; flex-direction: column; gap: 0.65rem; }
.rv-card {
  background: var(--card);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  border-left: 4px solid transparent;
  box-shadow: 0 2px 8px rgba(74,63,53,0.06);
  transition: transform 0.12s;
}
.rv-card:active { transform: scale(0.98); }
.rv-ok   { border-left-color: var(--green); }
.rv-wrong { border-left-color: var(--pulse); }
.rv-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.rv-domain { font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; color: var(--ink-light, #6b5e50); text-transform: uppercase; letter-spacing: 0.04em; }
.rv-badge { font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.rv-badge-ok   { background: #e6f5ed; color: var(--green); }
.rv-badge-wrong { background: #fef0eb; color: var(--pulse); }
.rv-q { font-family: var(--font-body); font-size: 0.9rem; color: var(--ink); line-height: 1.4; }
.rv-answer { margin-top: 0.4rem; font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; color: var(--green); }
.rv-tap-hint { margin-top: 0.4rem; font-family: var(--font-body); font-size: 0.75rem; color: var(--ink-light, #6b5e50); opacity: 0.7; }

/* Zwaktes CTA op resultatenscherm */
.weak-results-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #fff5f2;
  border: 2px solid var(--pulse);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  margin-top: 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.weak-results-banner:active { transform: scale(0.98); }
.wrb-icon { font-size: 22px; flex-shrink: 0; }
.wrb-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.wrb-title { font-family: var(--font-body); font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.wrb-sub   { font-family: var(--font-body); font-size: 0.8rem; color: var(--pulse); font-weight: 600; }
.wrb-arrow { font-size: 18px; color: var(--pulse); opacity: 0.8; }

.smart-cta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: #f0f5ff;
  border: 2px solid var(--blue);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  margin-top: 1rem;
  cursor: pointer;
  transition: transform 0.15s;
}
.smart-cta:active { transform: scale(0.98); }
.smart-cta-icon { font-size: 22px; flex-shrink: 0; }
.smart-cta-text { display: flex; flex-direction: column; gap: 2px; }
.smart-cta-title { font-family: var(--font-body); font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.smart-cta-sub   { font-family: var(--font-body); font-size: 0.82rem; color: var(--blue); font-weight: 600; }

/* Train zwaktes scherm */
.wk-progress-bar-bg {
  height: 5px;
  background: var(--cream-dark);
  border-radius: 3px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.wk-progress-bar-fill {
  height: 100%;
  background: var(--pulse);
  border-radius: 3px;
  transition: width 0.3s ease;
}
/* Onboarding */
.ob-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
/* Override .screen.active { display: block } for onboarding flex layout */
.screen.active.ob-screen { display: flex; }
.ob-inner {
  max-width: 360px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.ob-icon {
  font-size: 64px;
  margin-bottom: 1.5rem;
  animation: ob-pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes ob-pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.ob-title {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.ob-body {
  font-size: 16px;
  color: var(--ink-mid);
  line-height: 1.65;
  margin-bottom: 2rem;
}
.ob-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 2rem;
}
.ob-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cream-dark);
  transition: background 0.2s, transform 0.2s;
}
.ob-dot.active {
  background: var(--pulse);
  transform: scale(1.3);
}
.ob-cta {
  width: 100%;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 0.75rem;
  transition: opacity 0.2s;
}
.ob-cta:disabled { opacity: 0.35; cursor: default; }
.ob-cta:not(:disabled):active { opacity: 0.8; }
.ob-skip {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--ink-light);
  cursor: pointer;
  padding: 0.5rem;
  font-family: 'DM Sans', sans-serif;
}
.ob-name-input {
  width: 100%;
  background: var(--card);
  border: 2px solid var(--cream-dark);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.2s;
  text-align: center;
}
.ob-name-input:focus { border-color: var(--pulse); }

/* ── Language picker ── */
.lang-options {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  margin-top: 1.2rem;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: white;
  border: 2px solid rgba(26,20,16,0.12);
  border-radius: 16px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.12s;
  text-align: left;
}
.lang-btn:hover {
  border-color: var(--pulse);
  box-shadow: 0 4px 16px rgba(232,65,10,0.13);
}
.lang-btn:active { transform: scale(0.97); }
.lang-flag { font-size: 1.9rem; }
.lang-label { flex: 1; }

.wk-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  background: var(--pulse);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 0.75rem;
}

/* ── SR badge (blauw, naast wk-badge) ── */
.sr-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-light);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 0.75rem;
}

/* ── SR rating knoppen ── */
.sr-rating {
  margin-top: 1rem;
  text-align: center;
}
.sr-rating-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.sr-rating-btns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.6rem;
}
.sr-btn {
  border: none;
  border-radius: 14px;
  padding: 0.9rem 0.5rem 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
  line-height: 1.2;
}
.sr-btn span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.sr-btn:active { transform: scale(0.94); }
.sr-btn-miss  { background: var(--pulse-light); color: var(--pulse); }
.sr-btn-doubt { background: var(--amber-light); color: var(--amber); }
.sr-btn-got   { background: var(--green-light); color: var(--green); }
.sr-btn:hover { transform: scale(1.04); box-shadow: var(--shadow-hover); }

/* ── SR home-kaart (Vandaag sectie) ── */
.sr-home-card {
  background: var(--blue-light);
  border: 1.5px solid rgba(27,95,168,0.2);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  margin-bottom: 0.75rem;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
}
.sr-home-card:active { transform: scale(0.98); }
.sr-home-icon { font-size: 24px; flex-shrink: 0; }
.sr-home-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sr-home-name { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 700; color: var(--blue); }
.sr-home-sub  { font-size: 12px; color: rgba(27,95,168,0.7); }
.sr-home-badge {
  background: var(--blue);
  color: white;
  border-radius: 50px;
  min-width: 26px;
  height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  padding: 0 7px;
}

/* ── Theorie-modal ── */
.theory-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  visibility: hidden;
  pointer-events: none;
}
.theory-overlay.open {
  visibility: visible;
  pointer-events: all;
}
.theory-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s;
}
.theory-overlay.open .theory-backdrop {
  background: rgba(0,0,0,0.45);
}
.theory-sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 93vh;
  background: var(--cream);
  border-radius: 28px 28px 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.theory-overlay.open .theory-sheet {
  transform: translateY(0);
}
.theory-handle {
  width: 40px; height: 4px;
  background: #ccc;
  border-radius: 2px;
  margin: 14px auto 0;
}
.theory-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px 12px;
  position: sticky;
  top: 0;
  background: var(--cream);
  z-index: 1;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.theory-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.theory-icon-wrap {
  font-size: 30px;
  line-height: 1;
  flex-shrink: 0;
}
.theory-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pulse);
  margin-bottom: 2px;
}
.theory-title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}
.theory-subtitle {
  font-size: 12px;
  color: var(--ink-light);
  margin-top: 3px;
}
.theory-search-row {
  position: sticky;
  top: 70px;
  z-index: 1;
  background: var(--cream);
  padding: 0 20px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.theory-inline-search {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 12px;
  background: var(--card);
  padding: 0 13px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.theory-inline-search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,95,168,0.10);
}
.theory-search-empty {
  background: var(--card);
  border: 1.5px dashed var(--cream-dark);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-light);
}
.theory-close-btn {
  background: #e5e0d8;
  border: none;
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 16px;
  cursor: pointer;
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.theory-body {
  padding: 24px 20px 60px;
}

/* Theorie-body content blocks */
.th-intro {
  margin-bottom: 22px;

}
.th-intro p {
  font-family: 'Fraunces', serif;
  font-size: 15.5px;
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.72;
  margin: 0;
}
.th-section-title {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 34px 0 14px;
  padding-top: 24px;
  border-top: 1px solid rgba(26,20,16,0.08);
  letter-spacing: -0.01em;
}
.th-section-title::before {
  content: none;
}
.th-text p {
  font-size: 14px;
  line-height: 1.68;
  color: var(--ink);
  margin-bottom: 12px;
}
.th-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.th-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 300px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
}
.th-table th {
  background: var(--ink);
  color: var(--cream);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.th-table th:first-child { border-radius: 16px 0 0 0; }
.th-table th:last-child  { border-radius: 0 16px 0 0; }
.th-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  vertical-align: top;
  line-height: 1.5;
  color: var(--ink-mid);
}
.th-table tr:last-child td { border-bottom: none; }
.th-table tr:nth-child(even) td { background: rgba(0,0,0,0.018); }
.th-table td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.up { color: var(--green); font-weight: 700; }
.dn { color: var(--pulse); font-weight: 700; }

/* ── Theory: eigenschap-eerst vergelijkingsblokken ── */
.th-compare-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
@media (min-width: 600px) {
  .th-compare-group { grid-template-columns: 1fr 1fr; }
}
.th-compare-prop {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--pulse);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 5px;
}
.th-compare-rows {
  background: white;
  border-radius: 14px;
  overflow: hidden;
}
.th-compare-row {
  display: flex;
  align-items: flex-start;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(26,20,16,0.05);
  gap: 0;
}
.th-compare-row:last-child { border-bottom: none; }
.th-cw {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  min-width: 88px;
  max-width: 88px;
  flex-shrink: 0;
  padding-right: 10px;
  padding-top: 1px;
}
.th-cv {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.5;
  flex: 1;
}
.th-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
}
.th-steps::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: rgba(26,20,16,0.09);
  border-radius: 1px;
}
.th-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  background: none;
  border-radius: 0;
  padding: 9px 0;
}
.th-step strong { color: var(--ink); font-weight: 700; }
.th-step-num {
  background: var(--ink);
  color: white;
  font-weight: 700;
  font-size: 11px;
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  position: relative;
  z-index: 1;
}
.th-pearl {
  border-left: 3px solid var(--amber);
  background: rgba(212,130,10,0.07);
  border-radius: 0 12px 12px 0;
  padding: 12px 15px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 12px;
}
.th-pearl strong { color: var(--ink); font-weight: 700; }
.th-pearl::before { content: '💡 '; }
.th-figure {
  background: white;
  border-radius: 18px;
  padding: 18px 12px 12px;
  margin: 8px 0 16px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.th-figure-caption {
  font-size: 11px;
  color: var(--ink-light);
  margin-top: 10px;
  font-style: italic;
}

/* Theory button inside fact modal */
.fact-theory-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(232,65,10,0.07);
  color: var(--pulse);
  border: 1.5px solid rgba(232,65,10,0.2);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 18px;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
}
.fact-theory-btn:active { background: rgba(232,65,10,0.15); }

/* Theorieboek home grid */
.th-home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0.5rem;
}
.th-home-pill {
  background: white;
  border-radius: 16px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.th-home-pill:active { background: var(--cream-dark); }
.th-home-emoji { font-size: 22px; }
.th-home-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.th-home-sub {
  font-size: 10px;
  color: var(--ink-light);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Theory search ── */
.th-search-wrap {
  margin-bottom: 1rem;
}
.th-search {
  width: 100%;
  background: white;
  border: 1.5px solid var(--cream-dark);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow);
  -webkit-appearance: none;
}
.th-search:focus {
  border-color: var(--ink-mid);
  box-shadow: 0 0 0 3px rgba(26,20,16,0.06);
}
.th-search::placeholder { color: var(--ink-light); }
.th-search::-webkit-search-cancel-button { cursor: pointer; }

/* ── Theory: Key Numbers callout row ── */
.th-keynums {
  display: flex;
  align-items: stretch;
  background: white;
  border-radius: 18px;
  margin: 0 0 22px;
  overflow: hidden;
}
.th-keynum {
  flex: 1;
  background: none;
  border-radius: 0;
  padding: 16px 10px;
  text-align: center;
  border-right: 1px solid rgba(26,20,16,0.07);
}
.th-keynum:last-child { border-right: none; }
.th-keynum-val {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--pulse);
  line-height: 1.1;
  display: block;
}
.th-keynum-lbl {
  font-size: 10px;
  color: var(--ink-light);
  margin-top: 5px;
  display: block;
  line-height: 1.3;
}
/* ── Theory: Red flag box ── */
.th-redflag {
  border-left: 3px solid var(--pulse);
  background: rgba(232,65,10,0.07);
  border-radius: 0 12px 12px 0;
  padding: 12px 15px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 12px;
}
.th-redflag::before { content: '🚩 '; }
.th-redflag strong { color: var(--ink); }
/* ── Theory: Pitfall / trap box ── */
.th-trap {
  border-left: 3px solid var(--amber);
  background: rgba(212,130,10,0.07);
  border-radius: 0 12px 12px 0;
  padding: 12px 15px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 12px;
}
.th-trap::before { content: '⚠️ '; }
.th-trap strong { color: var(--ink); }
/* ── Theory: Mnemonic box ── */
.th-mnemonic {
  border-left: 3px solid var(--blue);
  background: rgba(27,95,168,0.07);
  border-radius: 0 12px 12px 0;
  padding: 14px 16px 12px;
  margin-bottom: 12px;
}
.th-mnemonic-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.th-mnemonic-row {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 4px;
}
.th-mnemonic-row b {
  color: var(--blue);
  font-size: 15px;
  display: inline-block;
  min-width: 22px;
  font-weight: 800;
}
/* Eerste section-title na keynums of intro: geen top-border */
.th-keynums + .th-section-title,
.th-intro + .th-section-title {
  border-top: none;
  padding-top: 0;
  margin-top: 18px;
}
/* ── Theory: Safe/green callout ── */
.th-safe {
  border-left: 3px solid var(--green);
  background: rgba(26,122,74,0.07);
  border-radius: 0 12px 12px 0;
  padding: 12px 15px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 12px;
}
.th-safe::before { content: '✅ '; }
.th-safe strong { color: var(--ink); }

/* ── Rank-up viering ── */
.rankup-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,8,6,0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
  gap: 6px;
}
.rankup-overlay.show {
  opacity: 1;
  pointer-events: all;
}
.rankup-icon {
  font-size: 84px;
  line-height: 1;
  animation: rankup-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.rankup-sub {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 12px;
}
.rankup-label {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  margin-top: 4px;
}
@keyframes rankup-pop {
  0%   { transform: scale(0.3) rotate(-15deg); opacity: 0; }
  100% { transform: scale(1)   rotate(0deg);   opacity: 1; }
}

/* ── Achievement unlock banner ── */
.ach-banner {
  position: fixed;
  top: -90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  background: linear-gradient(135deg, #B8770A 0%, #D4A020 100%);
  color: white;
  border-radius: 16px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 340px;
  width: calc(100% - 2rem);
  box-shadow: 0 8px 32px rgba(180,120,0,0.35);
  transition: top 0.45s cubic-bezier(0.34,1.4,0.64,1);
  pointer-events: none;
}
.ach-banner.show { top: 1.2rem; }
.ach-banner-trophy { font-size: 24px; flex-shrink: 0; }
.ach-banner-top {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 2px;
}
.ach-banner-row {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Achievement badge grid (profiel) ── */
.ach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.ach-badge {
  background: var(--card);
  border-radius: 16px;
  padding: 1rem 0.85rem 0.9rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.ach-badge.unlocked { border: 1.5px solid rgba(212,130,10,0.3); }
.ach-badge.locked   { opacity: 0.45; filter: grayscale(1); }
.ach-badge.unlocked:active { transform: scale(0.96); }
.ach-icon   { font-size: 28px; margin-bottom: 6px; line-height: 1; }
.ach-label  { font-family: 'Fraunces', serif; font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.ach-desc   { font-size: 11px; color: var(--ink-light); line-height: 1.4; }

/* ── Stats summary card (profiel) ── */
.stats-summary-card {
  background: var(--ink);
  border-radius: 20px;
  padding: 1rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.ss-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
}
.ss-val {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 900;
  color: white;
  line-height: 1;
}
.ss-lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.ss-div {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.12);
}

/* ── Deelknop ── */
.btn-share {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 2px solid var(--ink);
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.btn-share:active { background: var(--cream-dark); }
.btn-share-secondary {
  background: var(--card);
  border-color: var(--blue);
  color: var(--blue);
}
.btn-share-secondary:active { background: var(--blue-light); }

/* ── Home hero ── */
.home-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 2rem;
  margin-bottom: 1.25rem;
}
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.hero-streak-badge {
  background: rgba(232,65,10,0.1);
  border: 1.5px solid rgba(232,65,10,0.22);
  border-radius: 50px;
  padding: 8px 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--pulse);
  line-height: 1;
  align-self: center;
  min-width: 56px;
  text-align: center;
  font-family: 'Fraunces', serif;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-streak-badge.on-fire {
  animation: streakPulse 1.4s ease-in-out infinite;
  background: rgba(232,65,10,0.18);
  border-color: rgba(232,65,10,0.5);
}
@keyframes streakPulse {
  0%,100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(232,65,10,0.4); }
  50%     { transform: scale(1.1);  box-shadow: 0 0 0 8px rgba(232,65,10,0);   }
}

/* ── Mode hero card (Blitz) ── */
.mode-hero-card {
  background: linear-gradient(135deg, var(--pulse) 0%, #B83208 100%);
  border-radius: 22px;
  padding: 1.5rem 1.5rem 1.25rem;
  color: white;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  box-shadow: 0 8px 28px rgba(232,65,10,0.35);
  transition: transform 0.24s var(--ease-spring), box-shadow 0.18s var(--ease-standard);
  position: relative;
  overflow: hidden;
}
.mode-hero-card::before {
  content: '⚡';
  position: absolute;
  right: -8px;
  top: -8px;
  font-size: 80px;
  opacity: 0.1;
  line-height: 1;
  pointer-events: none;
}
.mode-hero-card:active { transform: scale(0.95); box-shadow: 0 4px 14px rgba(232,65,10,0.25); }
.mode-hero-card:hover  { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(232,65,10,0.45); }
.mhc-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.72;
}
.mhc-name {
  font-family: 'Fraunces', serif;
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1px;
  margin-top: 0.1rem;
}
.mhc-sub {
  font-size: 13px;
  opacity: 0.68;
  margin-bottom: 0.35rem;
}
.mhc-cta {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.22);
  border-radius: 50px;
  padding: 7px 18px;
  font-size: 14px;
  font-weight: 600;
  align-self: flex-start;
  transition: background 0.15s;
}
.mode-hero-card:hover .mhc-cta { background: rgba(255,255,255,0.32); }

/* ── Mode 2×2 grid ── */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 2rem;
}
.mode-grid .mode-card {
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem;
  gap: 0.5rem;
  min-height: 108px;
}
.mode-grid .mode-icon-wrap {
  width: 38px;
  height: 38px;
  font-size: 18px;
  border-radius: 11px;
}
.mode-grid .mode-name { font-size: 15px; }
.mode-grid .mode-sub  { font-size: 11px; }
.mode-grid .mode-arrow { display: none; }

/* ── Bottom Navigation Bar ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(245,240,232,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(26,20,16,0.08);
  display: flex;
  padding: 6px 0 max(10px, env(safe-area-inset-bottom));
  z-index: 150;
  box-shadow: 0 -4px 24px rgba(26,20,16,0.07);
}
.bn-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-light);
  transition: color 0.15s;
  font-family: 'DM Sans', sans-serif;
  position: relative;
}
.bn-tab::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 24px;
  height: 2px;
  background: var(--pulse);
  border-radius: 0 0 2px 2px;
  transition: transform 0.2s;
}
.bn-tab.active { color: var(--pulse); }
.bn-tab.active::after { transform: translateX(-50%) scaleX(1); }
.bn-tab:active { opacity: 0.7; }
.bn-icon {
  font-size: 18px;
  line-height: 1;
  display: block;
  transition: transform 0.28s var(--ease-spring);
}
.bn-tab.active .bn-icon { transform: scale(1.18); }
.bn-tab:active .bn-icon { transform: scale(0.84); }
.bn-label {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* ── Home tab content wrapper ── */
.home-tab-wrap { min-height: 60vh; }

/* ── Theorie & Profiel tab headers ── */
.htab-header {
  padding-top: 3rem;
  margin-bottom: 1.75rem;
}
.htab-title {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -1px;
  line-height: 1;
}
.htab-sub {
  font-size: 14px;
  color: var(--ink-light);
  margin-top: 0.35rem;
}

/* ── Admin Vragenbank ── */
.adm-stats-card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}
.adm-stat-hero {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.adm-stat-n {
  font-family: 'Fraunces', serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
}
.adm-stat-lbl {
  font-size: 13px;
  color: var(--ink-mid);
}
.adm-dom-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.adm-dom-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(26,20,16,0.04);
  border-radius: 10px;
  padding: 0.4rem 0.2rem;
}
.adm-dom-icon { font-size: 16px; }
.adm-dom-n    { font-size: 15px; font-weight: 700; color: var(--ink); font-family: 'Fraunces', serif; }
.adm-dom-lbl  { font-size: 9px; color: var(--ink-light); text-align: center; line-height: 1.2; }

.adm-sub-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.adm-sub-chip {
  font-size: 11px;
  font-weight: 600;
  background: rgba(26,20,16,0.06);
  border-radius: 50px;
  padding: 3px 10px;
  color: var(--ink-mid);
}
.adm-sub-chip.diff { background: rgba(232,65,10,0.08); color: var(--pulse); }
.adm-sub-chip.test { background: rgba(59,130,246,0.1); color: var(--blue); }

.adm-diff-bar {
  display: flex;
  height: 6px;
  border-radius: 4px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 0.35rem;
}
.adm-diff-seg { border-radius: 3px; }
.adm-diff-seg.d-easy   { background: var(--green); }
.adm-diff-seg.d-mid    { background: var(--amber); }
.adm-diff-seg.d-hard   { background: #F07030; }
.adm-diff-seg.d-expert { background: var(--pulse); }

.adm-diff-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.adm-diff-lbl {
  font-size: 11px;
  font-weight: 600;
}
.adm-diff-lbl.d-easy   { color: var(--green); }
.adm-diff-lbl.d-mid    { color: var(--amber); }
.adm-diff-lbl.d-hard   { color: #F07030; }
.adm-diff-lbl.d-expert { color: var(--pulse); }

/* Filters */
.adm-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  background: var(--card);
  border-radius: 16px;
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow);
}
.adm-fgroup  { display: flex; flex-wrap: wrap; gap: 5px; }
.adm-f {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  background: rgba(26,20,16,0.06);
  border: none;
  border-radius: 8px;
  padding: 5px 11px;
  color: var(--ink-mid);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.adm-f.active { background: var(--ink); color: white; }
.adm-f.diff.active { background: var(--pulse); }
.adm-f.test.active { background: var(--blue); }

/* Question list */
.adm-group { margin-bottom: 1.25rem; }
.adm-group-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding: 0 0 0.4rem;
  border-bottom: 1px solid rgba(26,20,16,0.08);
  margin-bottom: 0.4rem;
}
.adm-group-cnt {
  background: rgba(26,20,16,0.07);
  border-radius: 50px;
  padding: 1px 7px;
  font-size: 11px;
}
.adm-row {
  background: var(--card);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.adm-row:hover, .adm-row.open { background: rgba(255,255,255,0.9); }
.adm-row-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
}
.adm-stars { font-size: 11px; flex-shrink: 0; }
.adm-stars.d-easy   { color: var(--green); }
.adm-stars.d-mid    { color: var(--amber); }
.adm-stars.d-hard   { color: #F07030; }
.adm-stars.d-expert { color: var(--pulse); }
.adm-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-light);
  background: rgba(26,20,16,0.06);
  border-radius: 5px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.adm-badge {
  font-size: 10px;
  font-weight: 700;
  border-radius: 5px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.adm-badge.diff { background: rgba(232,65,10,0.1); color: var(--pulse); }
.adm-badge.test { background: rgba(59,130,246,0.1); color: var(--blue); }

.adm-preview {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

/* Expanded detail */
.adm-detail { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(26,20,16,0.07); }
.adm-q-full {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 0.65rem;
}
.adm-ans-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 0.65rem; }
.adm-ans {
  font-size: 13px;
  color: var(--ink-mid);
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1.4;
}
.adm-ans.correct {
  background: rgba(34,197,94,0.1);
  color: var(--green);
  font-weight: 600;
}
.adm-expl {
  font-size: 12px;
  color: var(--ink-mid);
  line-height: 1.55;
  background: rgba(26,20,16,0.04);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.4rem;
}
.adm-meta {
  font-size: 10px;
  color: var(--ink-light);
  letter-spacing: 0.04em;
  text-align: right;
  margin-top: 0.35rem;
}

/* ── Vraag-figuur (ECG, spirometrie, etc.) ── */
.q-figure {
  margin: 0.5rem 0 0.25rem;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  padding: 0.4rem 0.5rem 0.2rem;
}
.q-figure svg { width: 100%; height: auto; display: block; }
.q-figure img { width:100%; max-height:200px; object-fit:contain; display:block; border-radius:8px; }
.fig-credit { font-size:9px; color:var(--ink-light); text-align:right; padding:0.2rem 0.1rem 0; opacity:0.75; }
.fig-placeholder { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--ink-light); background:rgba(26,20,16,0.05); border:1.5px dashed rgba(26,20,16,0.15); border-radius:10px; padding:8px 14px; }
.q-fig-img { width:100%; max-height:220px; object-fit:contain; display:block; border-radius:10px; }

/* ── Theorie — ECG verbeteringen ── */
.th-body-text { font-size:14px; color:var(--ink); line-height:1.7; margin:0 0 1rem; }
.th-conduction { border-left:3px solid var(--pulse); background:rgba(232,65,10,0.07); border-radius:0 12px 12px 0; padding:12px 15px; font-size:13.5px; color:var(--ink); margin-bottom:0.75rem; line-height:1.68; font-family:'DM Sans',sans-serif; }
.th-strip-card { display:grid; grid-template-columns:145px 1fr; gap:0.65rem; background:rgba(255,255,255,0.65); border-radius:12px; padding:0.65rem; margin-bottom:0.5rem; border:1px solid rgba(0,0,0,0.06); align-items:center; }
@media (max-width:380px){ .th-strip-card { grid-template-columns:1fr; } }
.th-strip-mini svg { width:100%; height:auto; display:block; }
.th-strip-info strong { display:block; font-size:13px; margin-bottom:0.2rem; font-family:'DM Sans',sans-serif; }
.th-strip-info p { font-size:12px; color:var(--ink-mid); line-height:1.45; margin:0; }
.th-strip-action { display:inline-block; margin-top:0.3rem; font-size:11px; background:rgba(232,65,10,0.1); color:var(--pulse); border-radius:4px; padding:0.12rem 0.4rem; font-weight:600; }
.th-strip-safe { display:inline-block; margin-top:0.3rem; font-size:11px; background:rgba(30,180,100,0.1); color:#1b7a50; border-radius:4px; padding:0.12rem 0.4rem; font-weight:600; }

/* Sessiehistorie grafiek */
.sh-card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.1rem 1rem 1rem;
  box-shadow: 0 2px 8px rgba(74,63,53,0.07);
  margin-top: 1rem;
}
.sh-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  height: 72px;
  margin: 0.75rem 0 0.25rem;
}
.sh-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
  justify-content: flex-end;
}
.sh-bar-wrap {
  width: 100%;
  max-width: 28px;
  height: 56px;
  background: var(--cream-dark, #e0d8cc);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.sh-bar-fill {
  width: 100%;
  border-radius: 6px;
  transition: height 0.6s cubic-bezier(0.34,1.2,0.64,1);
}
.sh-bar-pct  { font-size: 0.62rem; font-weight: 700; color: var(--ink); font-family: var(--font-body); }
.sh-bar-mode { font-size: 0.65rem; }
.sh-trend-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--cream-dark, #e0d8cc);
}
.sh-trend-row:last-child { border-bottom: none; }
.sh-trend-icon  { font-size: 16px; flex-shrink: 0; }
.sh-trend-label { flex: 1; font-family: var(--font-body); font-size: 0.85rem; color: var(--ink); }
.sh-trend-pct   { font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; }
.sh-trend       { font-size: 0.85rem; font-weight: 800; min-width: 1rem; text-align: right; }
.sh-trend.up    { color: var(--green); }
.sh-trend.down  { color: var(--pulse); }
.sh-trend.eq    { color: var(--ink-light, #6b5e50); }

/* ── Open patiënt kaart ── */
.open-patient-card {
  background: #fffbf4;
  border: 2px solid var(--amber);
  border-radius: 20px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(212,130,10,0.13);
}
.open-patient-card:active { transform: scale(0.98); }
.opc-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.opc-icon { font-size: 22px; flex-shrink: 0; }
.opc-meta { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.opc-label { font-family: var(--font-body); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--amber); }
.opc-urgency { font-family: var(--font-body); font-size: 0.8rem; color: var(--ink-mid, #6b5e50); line-height: 1.3; }
.opc-days { font-family: var(--font-body); font-size: 0.72rem; font-weight: 800; color: var(--amber); background: var(--amber-light); padding: 0.18rem 0.5rem; border-radius: 8px; white-space: nowrap; }
.opc-days.urgent { color: var(--pulse); background: #fff0ec; }
.opc-q { font-family: var(--font-body); font-size: 0.88rem; color: var(--ink); line-height: 1.45; margin-bottom: 0.35rem; }
.opc-wrong { font-family: var(--font-body); font-size: 0.78rem; color: var(--pulse); margin-bottom: 0.4rem; }
.opc-cta { font-family: var(--font-body); font-size: 0.82rem; font-weight: 700; color: var(--amber); }

/* ── Patient replay scherm ── */
.pr-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.5rem;
}
.pr-title { font-family: var(--font-body); font-weight: 700; font-size: 1rem; color: var(--ink); }
.pr-context { padding: 0 1rem 0.75rem; }
.pr-wrong-badge {
  display: inline-block;
  background: #fff5f2;
  border: 1px solid var(--pulse);
  border-radius: 10px;
  padding: 0.35rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--pulse);
}
.pr-saved {
  background: var(--green-light);
  border-radius: 16px;
  padding: 1.1rem 1rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--green);
  font-size: 1.05rem;
  text-align: center;
  margin-top: 1rem;
}
.pr-fail {
  background: #fff5f2;
  border-radius: 16px;
  padding: 1rem;
  margin-top: 1rem;
}
.pr-fail-head { font-family: var(--font-body); font-size: 0.92rem; color: var(--ink); margin-bottom: 0.4rem; }
.pr-fail-ex   { font-family: var(--font-body); font-size: 0.82rem; color: var(--ink-mid, #6b5e50); line-height: 1.5; }

/* ── Spoedkamer modus ── */
.sk-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sk-nav-badge {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--pulse);
  letter-spacing: 0.03em;
}
.sk-lives {
  display: flex;
  gap: 2px;
}
.sk-life {
  font-size: 18px;
  transition: opacity 0.2s;
}
.sk-life.lost {
  opacity: 0.2;
  filter: grayscale(1);
}
.sk-hud {
  background: #1a0503;
}
.sk-timer-num {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 700;
  color: white;
  transition: color 0.3s;
}
.sk-q-card {
  background: #161210;
  border: 1px solid rgba(232,65,10,0.18);
  box-shadow: 0 6px 40px rgba(232,65,10,0.2), 0 2px 10px rgba(0,0,0,0.5);
  transition: box-shadow 0.2s, border-color 0.2s;
}
@keyframes sk-pulse-border {
  0%, 100% { box-shadow: 0 6px 40px rgba(232,65,10,0.2), 0 2px 10px rgba(0,0,0,0.5); border-color: rgba(232,65,10,0.18); }
  50%       { box-shadow: 0 6px 55px rgba(255,0,0,0.45), 0 2px 16px rgba(255,0,0,0.3); border-color: rgba(255,0,0,0.55); }
}
.sk-q-card.sk-danger {
  animation: sk-pulse-border 0.75s ease-in-out infinite;
}

/* Mode card — Spoedkamer */
.mode-card.spoedkamer {
  grid-column: span 2;
}
.mode-card.spoedkamer::after { background: var(--pulse); }
.mode-card.spoedkamer .mode-icon-wrap { background: #fff0ec; }

#spoedkamer {
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  background: #0e0a09;
}
#spoedkamer.active {
  display: flex;
  flex-direction: column;
}

/* ── Spoedkamer: full-page dark background ── */
body.sk-active {
  background: #0e0a09;
}
#spoedkamer::before {
  content: '';
  position: fixed;
  inset: 0;
  background: #0e0a09;
  z-index: -1;
}

/* ── Spoedkamer: dark urgent theme ── */
#spoedkamer .quit-btn {
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.75);
}
#spoedkamer .quit-btn:hover {
  border-color: rgba(232,65,10,0.6);
  color: #ff6840;
}
#spoedkamer .sk-nav-badge {
  color: #ff6840;
}
#spoedkamer .q-type-tag {
  background: rgba(232,65,10,0.18);
  color: #ff6840;
  border: 1px solid rgba(232,65,10,0.35);
}
#spoedkamer .diff-star.off { color: rgba(255,255,255,0.12); }
#spoedkamer .q-domain { color: rgba(255,255,255,0.6) !important; }
#spoedkamer .q-text   { color: #ffffff !important; }

/* Answer buttons */
#spoedkamer .ans-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #ffffff;
  box-shadow: none;
}
#spoedkamer .ans-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.32);
  transform: translateX(3px);
}
#spoedkamer .ans-key {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  border-radius: 50%;
}
#spoedkamer .ans-btn:hover:not(:disabled) .ans-key {
  background: rgba(255,255,255,0.25);
  color: #ffffff;
}
#spoedkamer .ans-btn.correct {
  background: rgba(26,122,74,0.4);
  border-color: rgba(26,122,74,0.8);
  color: #ffffff;
}
#spoedkamer .ans-btn.correct .ans-key { background: var(--green); color: white; }
#spoedkamer .ans-btn.wrong {
  background: rgba(232,65,10,0.35);
  border-color: rgba(232,65,10,0.8);
  color: #ffffff;
}
#spoedkamer .ans-btn.wrong .ans-key { background: var(--pulse); color: white; }

/* True/false buttons */
#spoedkamer .tf-btn.true-btn {
  background: rgba(26,122,74,0.18);
  border-color: rgba(26,122,74,0.35);
  color: #5cd18a;
}
#spoedkamer .tf-btn.false-btn {
  background: rgba(220,38,38,0.14);
  border-color: rgba(220,38,38,0.3);
  color: #ff7a7a;
}

/* Next button on dark */
#spoedkamer .btn-next-q {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
}

/* Volgende vraag knop (na sluiten fact modal) */
.btn-next-q {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-align: center;
}
.btn-next-q:active { transform: scale(0.98); }
.btn-next-q:hover  { background: #2d1f1a; }

/* ═══════════════════════════════════════════════════════════════
   SPEURDOKTER MODUS
   ══════════════════════════════════════════════════════════════ */

.sd-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

/* ── Nav ── */
.sd-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0 0.75rem;
}
.sd-nav-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}
.sd-hud {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sd-hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.sd-hud-val {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}
.sd-hud-lbl {
  font-family: var(--font-body);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-light);
}
.sd-hud-sep {
  color: var(--ink-light);
  font-size: 1.1rem;
  margin-top: -4px;
}

/* ── Intro card ── */
.sd-intro-card {
  background: var(--ink);
  border-radius: 24px;
  padding: 1.6rem 1.4rem 1.4rem;
  color: white;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
.sd-intro-top-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.sd-urgency-badge {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 3px 9px;
}
.sd-urgency-badge.high { background: rgba(232,65,10,0.25); color: #ff8060; }
.sd-urgency-badge.medium { background: rgba(255,190,50,0.2); color: #ffc84a; }
.sd-intro-domain {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 3px 9px;
}
.sd-intro-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: rgba(232,65,10,0.15);
  border-radius: 50%;
}
.sd-intro-stamp {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pulse);
  background: rgba(232,65,10,0.15);
  display: inline-block;
  border-radius: 6px;
  padding: 3px 9px;
  margin-bottom: 0.8rem;
}
.sd-patient-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.sd-patient-icon { font-size: 18px; }
.sd-patient-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}
.sd-case-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}
.sd-difficulty {
  font-size: 0.9rem;
  color: var(--amber);
  margin-bottom: 0.85rem;
  letter-spacing: 1px;
}
.sd-intro-text {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.82);
  margin: 0 0 1.2rem;
}
.sd-start-btn {
  width: 100%;
  background: var(--pulse) !important;
}
.sd-rules {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.sd-rule {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-mid);
  background: var(--card);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
}

/* ── Evidence chips ── */
.sd-clues-section {
  margin-bottom: 0.75rem;
}
.sd-section-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.4rem;
}
.sd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.sd-chip {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(26,20,16,0.07);
  color: var(--ink-mid);
  border-radius: 20px;
  padding: 3px 10px;
}
.sd-chip.key {
  background: rgba(212,130,10,0.12);
  color: var(--amber);
}
.sd-chip.eureka {
  background: rgba(26,122,74,0.12);
  color: var(--green);
  font-weight: 700;
}
.sd-chip.not {
  background: rgba(26,20,16,0.04);
  color: var(--ink-light);
  text-decoration: line-through;
  opacity: 0.75;
}
.sd-chips-empty {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-light);
  font-style: italic;
}

/* ── Board header ── */
/* ── Category cards (level 1) ── */
/* ── Phase cards (level 1) ── */
.sd-phase-cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.sd-phase-card {
  background: var(--card);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.12s, border-color 0.12s;
  box-shadow: 0 1px 4px rgba(74,63,53,0.07);
  -webkit-tap-highlight-color: transparent;
}
.sd-phase-card:not(.done):active { transform: scale(0.98); border-color: rgba(232,65,10,0.3); }
.sd-phase-card.done  { opacity: 0.42; cursor: default; }
.sd-phase-card.risky { border-color: rgba(212,130,10,0.35); }
.sd-phase-num {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--ink);
  opacity: 0.18;
  width: 1.7rem;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}
.sd-phase-card:not(.done) .sd-phase-num { opacity: 0.22; }
.sd-phase-card.risky .sd-phase-num { color: var(--amber); opacity: 0.7; }
.sd-phase-info { flex: 1; min-width: 0; }
.sd-phase-name {
  font-family: var(--font-body);
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.sd-phase-desc {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--ink-light);
  margin-top: 0.1rem;
}
.sd-phase-card.risky .sd-phase-desc { color: var(--amber); }
.sd-phase-badge {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-mid);
  background: rgba(26,20,16,0.06);
  border-radius: 10px;
  padding: 3px 10px;
  flex-shrink: 0;
}
.sd-phase-badge.done { color: var(--green); background: rgba(26,122,74,0.1); font-size: 1rem; padding: 2px 8px; }
.sd-phase-badge.warn { color: var(--amber); background: rgba(212,130,10,0.1); }

/* ── Out-of-order warning ── */
.sd-oo-banner {
  background: rgba(212,130,10,0.12);
  border: 1px solid rgba(212,130,10,0.3);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 0.75rem;
}
.sd-oo-warning {
  background: rgba(212,130,10,0.1);
  border-left: 3px solid var(--amber);
  border-radius: 0 10px 10px 0;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 0.6rem;
}

/* ── Back button (level 2) ── */
.sd-back-cat {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-mid);
  cursor: pointer;
  padding: 0.25rem 0;
  margin-bottom: 0.75rem;
  display: block;
}

/* ── Investigation rows (level 2) ── */
.sd-inv-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.sd-inv-row {
  background: var(--card);
  border-radius: 16px;
  padding: 1rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.12s, border-color 0.12s;
  box-shadow: 0 1px 4px rgba(74,63,53,0.07);
  -webkit-tap-highlight-color: transparent;
}
.sd-inv-row:active { transform: scale(0.98); border-color: rgba(232,65,10,0.3); }
.sd-inv-row-icon   { font-size: 1.35rem; flex-shrink: 0; line-height: 1; }
.sd-inv-row-label  {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  flex: 1;
}
.sd-inv-row-arrow  { color: var(--ink-light); font-size: 0.85rem; flex-shrink: 0; }

/* ── Diagnose button wrap ── */
.sd-diag-wrap {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}
.sd-diag-btn {
  width: 100%;
}
.sd-diag-btn:disabled {
  opacity: 0.38;
  cursor: default;
}
.sd-diag-hint {
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.74rem;
  color: var(--ink-light);
  margin-top: 0.4rem;
}
.sd-action-row {
  display: flex;
  gap: 0.6rem;
}
.sd-action-row .btn-secondary,
.sd-action-row .btn-primary {
  flex: 1;
}

/* ── Result card ── */
.sd-result-card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(74,63,53,0.08);
}
.sd-result-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(26,20,16,0.07);
}
.sd-result-icon { font-size: 1.2rem; }
.sd-result-label {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.sd-result-text {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-mid);
  line-height: 1.6;
  margin: 0 0 0.75rem;
}
.sd-result-quote {
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink);
  border-left: 3px solid var(--pulse);
  margin: 0 0 0.75rem;
  padding: 0.4rem 0 0.4rem 0.9rem;
  line-height: 1.55;
}
.sd-result-eureka {
  background: linear-gradient(135deg, rgba(26,122,74,0.08), rgba(26,122,74,0.04));
  border: 1.5px solid rgba(26,122,74,0.2);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.sd-result-note {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ink-light);
  line-height: 1.5;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(26,20,16,0.06);
}

/* Educational panel */
.sd-edu-panel {
  margin-top: 1rem;
  border-top: 1px solid rgba(26,20,16,0.08);
  padding-top: 0.75rem;
}
.sd-edu-panel summary {
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--pulse);
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}
.sd-edu-panel summary::-webkit-details-marker { display: none; }
.sd-edu-panel summary::after {
  content: '▼';
  font-size: 0.65rem;
  margin-left: auto;
  transition: transform 0.2s;
}
.sd-edu-panel[open] summary::after { transform: rotate(180deg); }
.sd-edu-what {
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: #444;
  margin: 0.7rem 0 0.5rem;
  line-height: 1.55;
}
.sd-edu-item {
  margin-top: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: rgba(232,65,10,0.06);
  border-radius: 10px;
  border-left: 3px solid var(--pulse);
}
.sd-edu-item-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: #2a1a10;
  margin-bottom: 0.2rem;
}
.sd-edu-item-desc {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: #555;
  line-height: 1.5;
}

/* Result badges */
.sd-badge-eureka,
.sd-badge-key,
.sd-badge-useful,
.sd-badge-not {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 4px 10px;
  margin-top: 0.1rem;
}
.sd-badge-eureka {
  background: rgba(26,122,74,0.1);
  color: var(--green);
}
.sd-badge-key {
  background: rgba(212,130,10,0.1);
  color: var(--amber);
}
.sd-badge-useful {
  background: rgba(27,95,168,0.1);
  color: var(--blue);
}
.sd-badge-not {
  background: rgba(26,20,16,0.06);
  color: var(--ink-light);
}

/* ── Lab table ── */
.sd-lab-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
}
.sd-lab-table th {
  text-align: left;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-light);
  padding: 0.2rem 0.35rem;
  border-bottom: 1px solid rgba(26,20,16,0.1);
}
.sd-lab-table td {
  padding: 0.35rem 0.35rem;
  border-bottom: 1px solid rgba(26,20,16,0.05);
  vertical-align: middle;
  color: var(--ink);
}
.sd-lab-table tr:last-child td { border-bottom: none; }
.sd-lab-name { font-weight: 600; color: var(--ink-mid); }
.sd-lab-val  { font-weight: 700; white-space: nowrap; }
.sd-lab-ref  { color: var(--ink-light); font-size: 0.73rem; }
.sd-arrow {
  font-size: 0.85rem;
  font-weight: 800;
  margin-left: 2px;
}
.sd-arrow.high { color: #DC2626; }
.sd-arrow.low  { color: #2563EB; }

/* ── Imaging ── */
.sd-img-wrap {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.65rem;
  background: #f0f0f0;
}
.sd-result-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}
.sd-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  height: 120px;
  background: rgba(26,20,16,0.04);
  border-radius: 12px;
  color: var(--ink-light);
  font-size: 2rem;
  margin-bottom: 0.65rem;
}
.sd-img-placeholder small {
  font-family: var(--font-body);
  font-size: 0.73rem;
  color: var(--ink-light);
}

/* ── Diagnosis options ── */
.sd-diag-card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.2rem 1rem;
  margin-bottom: 1rem;
}
.sd-diag-prompt {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  line-height: 1.3;
}
.sd-diag-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}
.sd-diag-option {
  background: rgba(26,20,16,0.04);
  border: 1.5px solid rgba(26,20,16,0.1);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: background 0.13s, border-color 0.13s, transform 0.1s;
}
.sd-diag-option:hover   { background: rgba(26,20,16,0.07); border-color: rgba(26,20,16,0.2); }
.sd-diag-option:active  { transform: scale(0.98); }
.sd-diag-option.correct { background: rgba(26,122,74,0.1); border-color: var(--green); color: var(--green); }
.sd-diag-option.wrong   { background: rgba(232,65,10,0.1); border-color: var(--pulse); color: var(--pulse); }
.sd-back-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-light);
  cursor: pointer;
  padding: 0.4rem;
  text-align: center;
}
.sd-back-btn:hover { color: var(--ink); }

/* ── Reveal hero banner ── */
.sd-reveal-hero {
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  margin-bottom: 0;
}
.sd-reveal-hero.correct { background: var(--ink); }
.sd-reveal-hero.wrong   { background: #3d1008; }
.sd-reveal-stamp {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.sd-reveal-hero.correct .sd-reveal-stamp { color: rgba(255,255,255,0.45); }
.sd-reveal-hero.wrong   .sd-reveal-stamp { color: rgba(255,255,255,0.35); }
.sd-reveal-name {
  font-family: 'Fraunces', serif;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 0.5rem;
}
.sd-reveal-chosen {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.4rem;
}

/* ── Score box ── */
.sd-reveal-scorebox {
  background: var(--card);
  border-radius: 20px;
  padding: 1.1rem 1.25rem 1rem;
  margin-bottom: 1rem;
}
.sd-reveal-score-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.sd-reveal-score-num {
  font-family: 'Fraunces', serif;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
}
.sd-reveal-score-num span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-light);
  font-family: var(--font-body);
  margin-left: 3px;
}
.sd-reveal-score-badge {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
}
.sd-reveal-barwrap {
  height: 7px;
  background: rgba(26,20,16,0.08);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.sd-reveal-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 1.1s cubic-bezier(0.34,1.2,0.64,1);
}
.sd-reveal-meta {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ink-light);
}

/* ── Score breakdown ── */
.sd-score-breakdown {
  margin-top: 0.75rem;
  border-top: 1px solid rgba(26,20,16,0.08);
  padding-top: 0.6rem;
}
.sd-score-breakdown summary {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-light);
  cursor: pointer;
  list-style: none;
  padding: 0.15rem 0;
}
.sd-score-breakdown summary::-webkit-details-marker { display: none; }
.sd-score-breakdown summary::before { content: '+ '; }
details[open].sd-score-breakdown summary::before { content: '− '; }
.sd-score-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.22rem 0;
  font-family: var(--font-body);
  font-size: 0.81rem;
  color: var(--ink-mid);
}
.sd-score-line.pos span:last-child { color: var(--green); font-weight: 700; }
.sd-score-line.neg span:last-child { color: var(--pulse); font-weight: 700; }
.sd-score-line.divider {
  border-top: 1px solid rgba(26,20,16,0.08);
  padding: 0; margin: 0.2rem 0;
}
.sd-score-line.total {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.87rem;
  border-top: 1.5px solid rgba(26,20,16,0.15);
  padding-top: 0.4rem;
  margin-top: 0.1rem;
}

/* ── Memory / pearls card ── */
.sd-memory-card {
  background: #2d1e05;
  border-radius: 20px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.sd-memory-head {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e8a93a;
  margin-bottom: 0.75rem;
}
.sd-memory-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.sd-memory-item {
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.55;
  padding-left: 1.2rem;
  position: relative;
}
.sd-memory-item::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #e8a93a;
  font-weight: 700;
}

/* ── Vitals bar ── */
.sd-vitals-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(26,20,16,0.05);
  border-radius: 12px;
  padding: 0.45rem 0.85rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.sd-vitals-warn     { background: rgba(212,130,10,0.08); }
.sd-vitals-critical { background: rgba(232,65,10,0.08);  }

/* ── Pulse ring ─────────────────────────────────────────────── */
.sd-pulse-ring {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.sd-pulse-core {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
}
.sd-pulse-wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}
.sd-pulse-ring.stable .sd-pulse-core { background: var(--green); }
.sd-pulse-ring.stable .sd-pulse-wave { border-color: var(--green); animation: sd-pulse-beat 2s ease-out infinite; }
.sd-pulse-ring.warn   .sd-pulse-core { background: var(--amber); }
.sd-pulse-ring.warn   .sd-pulse-wave { border-color: var(--amber); animation: sd-pulse-beat 1.1s ease-out infinite; }
.sd-pulse-ring.critical .sd-pulse-core { background: var(--pulse); }
.sd-pulse-ring.critical .sd-pulse-wave { border-color: var(--pulse); animation: sd-pulse-beat 0.55s ease-out infinite; }
@keyframes sd-pulse-beat {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0;   }
}
.sd-vital {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-mid);
}
.sd-vital.warn {
  color: var(--pulse);
  font-weight: 800;
}
.sd-vital small {
  font-weight: 400;
  font-size: 0.68rem;
  margin-left: 1px;
}
.sd-vital-time {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 0.73rem;
  color: var(--ink-light);
}

/* ── Alert banner ── */
.sd-alert-banner {
  background: rgba(212,130,10,0.14);
  border: 1.5px solid rgba(212,130,10,0.45);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: #9a5c00;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  animation: alertSlideIn 0.35s cubic-bezier(0.34,1.4,0.64,1);
}
@keyframes alertSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* ── Outcome reveal hero variants ── */
.sd-reveal-hero.warning  { background: #5a3800; }
.sd-reveal-hero.critical { background: #3d0808; }
.sd-reveal-hero.late     { background: #2a2000; }
.sd-reveal-hero.saved    { background: var(--ink); }

/* ── Outcome story card ── */
.sd-outcome-story {
  background: var(--card);
  border-radius: 20px;
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
}
.sd-outcome-text {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-mid);
  line-height: 1.65;
  margin: 0 0 0.75rem;
}
.sd-outcome-lesson {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink);
  font-weight: 600;
  border-top: 1px solid rgba(26,20,16,0.07);
  padding-top: 0.65rem;
  line-height: 1.5;
}

/* ── Multi-finding chips ── */
.sd-findings {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(26,20,16,0.07);
}
.sd-findings-label {
  font-family: var(--font-body);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
}
.sd-finding-chip {
  display: inline-block;
  background: rgba(26,20,16,0.05);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ink-mid);
  padding: 0.25rem 0.7rem;
  margin: 0 0.3rem 0.3rem 0;
}

/* ── Management verdict ── */
.sd-mgmt-verdict {
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
}
.sd-mgmt-verdict.correct {
  background: rgba(26,122,74,0.12);
  color: var(--green);
}
.sd-mgmt-verdict.wrong {
  background: rgba(232,65,10,0.1);
  color: var(--pulse);
}
.sd-mgmt-correct-reveal {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-mid);
}
.sd-mgmt-correct-reveal strong {
  color: var(--ink);
  font-weight: 700;
}

/* ── Explanation card ── */
.sd-explain-card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
}
.sd-explain-head {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.6rem;
}
.sd-explain-text {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-mid);
  line-height: 1.65;
  margin: 0 0 0.75rem;
}
.sd-treatment-explain { border-left: 3px solid var(--pulse); }
.sd-treatment-chosen {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.4rem;
  line-height: 1.5;
}
.sd-treatment-chosen.correct { background: rgba(34,197,94,0.12); color: var(--green, #22c55e); }
.sd-treatment-chosen.wrong   { background: rgba(232,65,10,0.1);  color: var(--pulse); }
.sd-treatment-chosen-label   { font-weight: 700; margin-right: 0.4rem; }
.sd-treatment-correct-reveal {
  font-family: var(--font-body);
  font-size: 0.82rem;
  background: rgba(34,197,94,0.1);
  color: var(--green, #22c55e);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  line-height: 1.5;
}
.sd-wiki {
  border-top: 1px solid rgba(26,20,16,0.07);
  padding-top: 0.65rem;
}
.sd-wiki summary {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pulse);
  cursor: pointer;
  padding: 0.2rem 0;
  list-style: none;
}
.sd-wiki summary::-webkit-details-marker { display: none; }
.sd-wiki summary::before { content: '+ '; }
details[open].sd-wiki summary::before { content: '− '; }
.sd-wiki p {
  font-family: var(--font-body);
  font-size: 0.83rem;
  color: var(--ink-mid);
  line-height: 1.65;
  margin: 0.6rem 0 0;
}

/* ── Countdown ── */
.sd-countdown-card {
  text-align: center;
  padding: 0.9rem;
  background: var(--card);
  border-radius: 16px;
  margin-bottom: 1rem;
}
.sd-countdown-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-light);
  margin-bottom: 0.25rem;
}
.sd-countdown {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
}

/* ── Home tab ── */
.sd-home-card {
  background: var(--ink);
  border-radius: 22px;
  padding: 1.3rem 1.25rem;
  margin-bottom: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s;
}
.sd-home-card::before {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 100px; height: 100px;
  background: rgba(232,65,10,0.18);
  border-radius: 50%;
}
.sd-home-card:active { transform: scale(0.98); }
.sd-home-card.played {
  background: var(--card);
  border: 2px solid rgba(26,20,16,0.08);
}
.sd-home-eyebrow {
  font-family: var(--font-body);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pulse);
  margin-bottom: 0.4rem;
}
.sd-home-solved {
  font-family: var(--font-body);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.4rem;
}
.sd-home-title {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.3rem;
  line-height: 1.25;
}
.sd-home-card.played .sd-home-title { color: var(--ink); }
.sd-home-meta {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.8rem;
}
.sd-home-card.played .sd-home-meta { color: var(--ink-mid); }
.sd-home-cta {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}
.sd-home-card.played .sd-home-cta { color: var(--pulse); }
.sd-tab-empty {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink-light);
  text-align: center;
  padding: 2rem 0;
}

/* ── How it works card ── */
.sd-how-card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.1rem 1rem;
  margin-bottom: 1rem;
}
.sd-how-title {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.75rem;
}
.sd-how-step {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-mid);
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(26,20,16,0.05);
  line-height: 1.4;
}
.sd-how-step:last-child { border-bottom: none; }
.sd-how-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

/* ── Klinisch Kader (eindscherm) ────────────────────────────── */
.sd-framework-card {
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  padding: 1.25rem;
  margin: 1rem 0;
}
.sd-framework-title {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}
.sd-framework-pres {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1rem;
  font-style: italic;
  line-height: 1.4;
}
.sd-cf-section {
  margin-bottom: 1rem;
}
.sd-cf-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}
.sd-cf-badge--red   { background: rgba(232,65,10,0.28);  color: #ff9070; }
.sd-cf-badge--green { background: rgba(40,167,69,0.25);  color: #6dda88; }
.sd-cf-badge--amber { background: rgba(240,160,48,0.25); color: #f5c86a; }
.sd-cf-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.sd-cf-flag {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.9);
  padding: 0.3rem 0.6rem 0.3rem 0.75rem;
  line-height: 1.45;
  border-left: 2px solid rgba(232,65,10,0.65);
  background: rgba(232,65,10,0.07);
  border-radius: 0 6px 6px 0;
}
.sd-cf-fastest {
  background: rgba(40,167,69,0.1);
  border-radius: 12px;
  padding: 0.75rem;
  border-left: 3px solid rgba(40,167,69,0.75);
}
.sd-cf-fastest-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}
.sd-cf-fastest-why {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}
.sd-cf-excl-row {
  padding: 0.35rem 0.6rem 0.35rem 0.75rem;
  border-left: 2px solid rgba(240,160,48,0.6);
  background: rgba(240,160,48,0.07);
  border-radius: 0 6px 6px 0;
  margin-bottom: 0.3rem;
}
.sd-cf-excl-row:last-child { margin-bottom: 0; }
.sd-cf-excl-diag {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0.15rem;
}
.sd-cf-excl-how {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.45;
}
.sd-cf-golden {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: rgba(255,200,60,0.1);
  border: 1px solid rgba(255,200,60,0.28);
  border-radius: 12px;
  padding: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
  margin-top: 0.5rem;
}
.sd-cf-golden-star { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.sd-reference-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--card);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin: 0.5rem 0;
  border: 1px solid rgba(0,0,0,0.07);
}
.sd-reference-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.sd-reference-body { flex: 1; }
.sd-reference-label {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-mid);
  margin-bottom: 0.25rem;
}
.sd-reference-text {
  font-size: 0.75rem;
  color: var(--ink);
  line-height: 1.55;
  font-style: italic;
}
.sd-reference-note {
  font-size: 0.67rem;
  color: var(--ink-mid);
  margin-top: 0.3rem;
  line-height: 1.45;
}

/* ── Actieslimiet banner ─────────────────────────────────────── */
/* ── Locked casus kaart ─────────────────────────────────────── */
.sd-home-locked {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
  border-style: dashed;
}
.sd-home-lock-icon {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}
.sd-home-locked-title {
  color: var(--ink-mid);
}
.sd-home-locked-hint {
  font-size: 0.75rem;
  color: var(--ink-light);
  margin-top: 0.4rem;
}

/* ── Actieslimiet banner ─────────────────────────────────────── */
.sd-limit-banner {
  background: rgba(232,65,10,0.1);
  border: 1px solid rgba(232,65,10,0.3);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--pulse);
  text-align: center;
  margin-bottom: 0.75rem;
}
.sd-nudge-banner {
  background: rgba(245,180,0,0.12);
  border: 1px solid rgba(245,180,0,0.35);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--amber);
  text-align: center;
  margin-bottom: 0.75rem;
}

/* ── Language picker ─────────────────────────────────────────── */
.lang-card {
  background: white;
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  box-shadow: var(--shadow);
}
.lang-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}
.lang-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.lang-btn {
  background: var(--cream);
  border: 1.5px solid transparent;
  border-radius: 20px;
  padding: 0.4rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-mid);
  transition: all 0.15s;
}
.lang-btn.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.lang-btn:not(.active):hover {
  border-color: var(--ink-mid);
  color: var(--ink);
}

/* ── Emergency simulatie scherm ─────────────────────────────── */
.sd-emergency-screen {
  background: #1a0505;
  min-height: 100vh;
}
.sd-emergency-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  position: relative;
}
.sd-emergency-alert-pulse {
  position: fixed;
  inset: 0;
  pointer-events: none;
  border: 4px solid #E8410A;
  animation: emergencyPulse 0.8s ease-in-out infinite;
  z-index: 0;
}
@keyframes emergencyPulse {
  0%, 100% { opacity: 0.9; }
  50%       { opacity: 0.2; }
}
.sd-emergency-header {
  text-align: center;
  padding: 1.5rem 0 1rem;
}
.sd-emergency-icon {
  font-size: 3rem;
  animation: emergencyPulse 0.8s ease-in-out infinite;
  display: block;
  margin-bottom: 0.5rem;
}
.sd-emergency-title {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ff4d1a;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
}
.sd-emergency-desc {
  background: rgba(232,65,10,0.12);
  border: 1px solid rgba(232,65,10,0.35);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  color: #ffd5c8;
  font-size: 0.97rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.sd-emergency-prompt {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
  text-align: center;
}
.sd-emergency-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.sd-emergency-option {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: #f0ebe4;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1.4;
}
.sd-emergency-option:hover:not(:disabled) {
  background: rgba(255,255,255,0.12);
  border-color: rgba(232,65,10,0.7);
}
.sd-emergency-option.correct {
  background: rgba(34,197,94,0.2);
  border-color: #22c55e;
  color: #bbf7d0;
}
.sd-emergency-option.wrong {
  background: rgba(239,68,68,0.2);
  border-color: #ef4444;
  color: #fecaca;
}
.sd-emergency-result {
  margin-top: 1.25rem;
  border-radius: 16px;
  padding: 1.1rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
}
.sd-emergency-result.correct {
  border-color: rgba(34,197,94,0.4);
}
.sd-emergency-result.wrong {
  border-color: rgba(239,68,68,0.4);
}
.sd-emergency-result-verdict {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sd-emergency-pts {
  font-size: 0.9rem;
  background: rgba(34,197,94,0.25);
  color: #86efac;
  border-radius: 8px;
  padding: 0.1rem 0.5rem;
}
.sd-emergency-pts.neg {
  background: rgba(239,68,68,0.25);
  color: #fca5a5;
}
.sd-emergency-result-text {
  color: #d1fae5;
  font-size: 0.93rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.sd-emergency-result.wrong .sd-emergency-result-text {
  color: #fecaca;
}
.sd-emergency-explanation {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  margin-bottom: 0.6rem;
}
.sd-emergency-continue {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
  margin-top: 0.5rem;
}

/* ── Supervisor hint ─────────────────────────────────────────── */
.sd-supervisor-hint {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-top: 1rem;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border: 1px solid #b8d9f5;
  border-radius: 14px;
  padding: 0.85rem 1rem;
}
.sd-supervisor-avatar {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}
.sd-supervisor-body { flex: 1; }
.sd-supervisor-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}
.sd-supervisor-text {
  font-size: 0.9rem;
  color: #1e3a5f;
  line-height: 1.5;
  font-style: italic;
}
