/* ─────────────────────────────────────────────────────────────
   PRETENCE GAMES — DESKTOP-FIRST white-label app
   3 theme presets: Pretence (purple), Telenet (yellow), SCK CEN (aubergine)
   Inside a simulated browser window (SuccessFactors LMS context)
───────────────────────────────────────────────────────────── */

:root {
  /* defaults = SCK CEN preset (overridden via JS) */
  --dark:     #3F2073;
  --bright:   #C745CC;
  --bright-2: #A734AE;
  --soft:     #EBE0F4;
  --cream:    #F4EEF8;
  --pager:    #C7B0DA;
  --reward:   #C9A227;
  --reward-soft: #FBF6E2;
  --positive: #1F7A4C;
  --negative: #B3322B;
  --paper:    #FFFFFF;
  --ink-muted:#5E5566;

  --serif: 'Fraunces', 'Source Serif 4', Georgia, serif;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  --r-pill: 999px;
  --r-card: 16px;
}

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

html, body {
  height: 100%;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  color: var(--dark);
  background: #EAE7F0;
}

body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 24px 48px;
  min-height: 100vh;
}

button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

/* ─── STAGE ─────────────────────────────────────────────────── */
.stage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(20px, 3vw, 48px);
  width: 100%;
  flex-wrap: wrap;
}

.stage-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 280px;
  flex-shrink: 0;
  padding-top: 32px;
}
.stage-side .eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.stage-side h1 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--dark);
}
.stage-side p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}
.theme-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 6px;
}
.theme-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(0,0,0,0.1);
  background: white;
  font-size: 12.5px;
  font-weight: 600;
  color: #333;
  transition: border-color 0.15s, background 0.15s;
}
.theme-chip .swatches {
  display: inline-flex;
  gap: 0;
}
.theme-chip .swatches span {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid white;
  margin-left: -5px;
}
.theme-chip .swatches span:first-child { margin-left: 0; }
.theme-chip.active { border-color: var(--dark); background: #fafafa; }

.stage-side .micro {
  font-size: 11px;
  color: var(--ink-muted);
  font-family: ui-monospace, monospace;
  line-height: 1.5;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* ─── DESKTOP APP (inside browser window) ──────────────────── */
.desktop-app {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--dark);
  font-family: var(--sans);
  position: relative;
  overflow: hidden;
}
.desktop-app.reward-bg { background: var(--dark); color: white; }
.desktop-app.modal-bg  { background: var(--soft); }

/* ─── TOP BAR ──────────────────────────────────────────────── */
.top-bar {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 480px) 1fr;
  align-items: center;
  gap: 32px;
  padding: 16px 32px;
  background: var(--paper);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
  z-index: 5;
}
.desktop-app.reward-bg .top-bar {
  background: var(--dark);
  border-bottom-color: rgba(255,255,255,0.08);
  color: white;
}

.brand-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-app  {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}
.desktop-app.reward-bg .brand-sub { color: rgba(255,255,255,0.55); }

/* flag progress in top bar */
.flag-bar {
  position: relative;
  height: 16px;
  background: var(--cream);
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
}
.flag-bar .fill {
  position: absolute;
  left: 3px;
  top: 3px; bottom: 3px;
  background: var(--bright);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(.34,1.2,.5,1);
  min-width: 8px;
  overflow: hidden;
}
/* progress bar shimmer */
.flag-bar .fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.45) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: shimmer 2.6s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}
.flag-bar .flag-end {
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--cream);
  border: 1px solid rgba(0,0,0,0.05);
  display: flex; align-items: center; justify-content: center;
  color: var(--bright);
}
.desktop-app.reward-bg .flag-bar {
  background: rgba(255,255,255,0.16);
  border-color: transparent;
}
.flag-bar .pulse {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bright);
  pointer-events: none;
  opacity: 0;
  animation: barPulse 1.6s ease-out infinite;
}
@keyframes barPulse {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

.right-cell {
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
}
.score-pill {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--dark);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.005em;
  min-width: 64px;
  justify-content: center;
}
.score-pill .up { color: var(--bright); display: inline-flex; }
.desktop-app.reward-bg .score-pill {
  background: rgba(255,255,255,0.12);
  color: white;
}

.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--cream);
  font-size: 13px;
  color: var(--dark);
}
.desktop-app.reward-bg .user-chip { background: rgba(255,255,255,0.1); color: white; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bright); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}

/* ─── CONTENT AREA ─────────────────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.canvas {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 56px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* footer CTA strip */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 56px 32px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}
.foot-left { color: var(--ink-muted); font-size: 13px; }
.foot-pager {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--pager);
}

/* ─── BUTTONS ──────────────────────────────────────────────── */
.btn-pill {
  height: 52px;
  padding: 0 28px;
  border-radius: var(--r-pill);
  background: var(--bright);
  color: white;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s, transform 0.06s, opacity 0.15s;
  min-width: 200px;
}
.btn-pill:hover { background: var(--bright-2); }
.btn-pill:active { transform: translateY(1px); }
.btn-pill.disabled,
.btn-pill[disabled] {
  background: var(--soft);
  color: color-mix(in srgb, var(--bright) 60%, transparent);
  cursor: not-allowed;
}
.btn-pill.dark { background: var(--dark); color: white; }
.btn-pill.dark:hover { background: color-mix(in srgb, var(--dark) 88%, black); }
.btn-ghost {
  height: 52px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--dark);
  font-weight: 500;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost:hover { background: rgba(0,0,0,0.04); }
.desktop-app.reward-bg .btn-ghost { color: rgba(255,255,255,0.75); }
.desktop-app.reward-bg .btn-ghost:hover { background: rgba(255,255,255,0.06); color: white; }

/* ─── WELKOM ────────────────────────────────────────────────── */
.welkom {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 24px;
}
.welkom .logo-wrap { margin-top: 16px; margin-bottom: 32px; }
.welkom h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--dark);
  text-wrap: balance;
  margin-bottom: 24px;
  max-width: 18ch;
}
.welkom p {
  font-size: 18px;
  line-height: 1.5;
  color: var(--dark);
  max-width: 56ch;
  text-wrap: pretty;
}
.welkom p b { font-weight: 700; }
.welkom .pager {
  margin-top: 36px;
  font-size: 16px;
  font-weight: 600;
  color: var(--pager);
  white-space: nowrap;
}

/* ─── TIPS (onboarding) ────────────────────────────────────── */
.tips-screen { flex: 1; display: flex; flex-direction: column; }
.speech-mascot { flex-shrink: 0; }
.speech-bubble {
  background: var(--dark);
  color: white;
  border-radius: 18px;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  position: relative;
  margin-left: -12px;
  margin-top: 18px;
  flex: 1;
  text-wrap: balance;
}
.speech-bubble::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 20px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 9px 14px 9px 0;
  border-color: transparent var(--dark) transparent transparent;
}
.tip-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}
.tip-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 22px 24px;
  background: var(--paper);
  border: 1.5px solid rgba(0,0,0,0.06);
  border-radius: var(--r-card);
}
.tip-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tip-body {}
.tip-title {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.18;
  color: var(--dark);
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}
.tip-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--dark);
  opacity: 0.7;
}

/* ─── OVERVIEW ─────────────────────────────────────────────── */
.overview { flex: 1; display: flex; flex-direction: column; }
.overview-head { margin-bottom: 24px; max-width: 880px; width: 100%; margin-left: auto; margin-right: auto; }
.overview-head .eyebrow {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bright);
  margin-bottom: 8px;
}
.overview-head h2 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--dark);
  margin-bottom: 18px;
  text-wrap: balance;
}
.overview-progress { display: flex; align-items: center; gap: 14px; max-width: 440px; }
.overview-progress .pn {
  font-weight: 700; font-size: 14px; color: var(--dark);
  font-variant-numeric: tabular-nums;
}
.overview-progress .bar {
  flex: 1; height: 6px; border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}
.overview-progress .bar > div {
  height: 100%; background: var(--bright);
  transition: width 0.5s ease;
}
.mod-list {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 880px; width: 100%;
  margin: 0 auto;
}
.mod-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  background: var(--paper);
  border: 1.5px solid rgba(0,0,0,0.06);
  border-radius: var(--r-card);
  transition: border-color 0.18s, background 0.18s, transform 0.18s, box-shadow 0.18s;
  cursor: pointer;
}
.mod-row.active { border-color: var(--bright); background: var(--soft); }
.mod-row.done { opacity: 0.6; }
.mod-row:hover {
  border-color: var(--bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--dark) 35%, transparent);
}
.mod-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--bright);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-weight: 600; font-size: 22px;
}
.mod-row.active .mod-num { background: var(--bright); color: white; }
.mod-row.done .mod-num { background: var(--positive); color: white; }
.mod-title {
  font-family: var(--serif);
  font-size: 20px; font-weight: 500;
  line-height: 1.18;
  color: var(--dark);
  letter-spacing: -0.005em;
  margin-bottom: 2px;
}
.mod-meta { font-size: 13px; color: var(--ink-muted); }

/* ─── VIDEO ─────────────────────────────────────────────────── */
.video-screen { flex: 1; display: flex; flex-direction: column; align-items: center; }
.video-frame {
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16/9;
  background: linear-gradient(140deg, #b0c5d6 0%, #607a8a 100%);
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card);
  box-shadow: 0 10px 32px rgba(0,0,0,0.08);
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-card);
}
.video-play-btn .circle {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: white;
  display: flex; align-items: center; justify-content: center;
  color: var(--dark);
  box-shadow: 0 10px 32px rgba(0,0,0,0.18);
  transition: transform 0.12s;
}
.video-play-btn:hover .circle { transform: scale(1.05); }
.video-info { text-align: center; max-width: 600px; margin: 32px auto 0; }
.video-info h2 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.08;
  color: var(--dark);
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.info-icon { display: inline-flex; color: var(--bright); opacity: 0.5; vertical-align: 2px; }
.info-icon:hover { opacity: 1; }
.video-info p {
  font-size: 17px;
  color: var(--dark);
  line-height: 1.5;
  text-wrap: pretty;
}

/* ─── QUIZ ──────────────────────────────────────────────────── */
.quiz-screen { flex: 1; display: flex; flex-direction: column; align-items: center; }
.quiz-q {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.12;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin: 16px auto 36px;
  text-wrap: balance;
  max-width: 22ch;
  text-align: center;
}
.quiz-q .info-icon { font-size: 0; margin-left: 6px; vertical-align: 1px; }
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}
.quiz-opt {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px 22px;
  background: var(--paper);
  border: 1.5px solid rgba(0,0,0,0.08);
  border-radius: var(--r-card);
  text-align: left;
  font-size: 15.5px;
  color: var(--dark);
  transition: border-color 0.15s, background 0.15s;
  min-height: 76px;
}
.quiz-opt:not(:disabled):hover { border-color: var(--bright); background: var(--soft); }
.opt-letter {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--bright);
  font-family: var(--serif);
  font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.quiz-opt.is-correct { border-color: var(--positive); background: color-mix(in srgb, var(--positive) 8%, white); }
.quiz-opt.is-correct .opt-letter { background: var(--positive); color: white; }
.quiz-opt.is-wrong { border-color: var(--negative); background: color-mix(in srgb, var(--negative) 8%, white); }
.quiz-opt.is-wrong .opt-letter { background: var(--negative); color: white; }
.quiz-opt.is-dim { opacity: 0.5; }
.quiz-feedback {
  margin: 20px auto 0;
  max-width: 720px; width: 100%;
  background: var(--soft);
  border-radius: var(--r-card);
  padding: 18px 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--dark);
}
.quiz-feedback.correct { background: color-mix(in srgb, var(--positive) 10%, white); }
.quiz-feedback.wrong { background: color-mix(in srgb, var(--negative) 8%, white); }
.quiz-feedback b {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* ─── REWARD ───────────────────────────────────────────────── */
.reward-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 24px;
  gap: 16px;
}
.reward-check {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--bright);
  color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 0 0 16px color-mix(in srgb, var(--bright) 14%, transparent),
    0 0 60px 20px color-mix(in srgb, var(--bright) 30%, transparent);
  animation: checkPop 0.6s cubic-bezier(.34,1.56,.64,1) both, checkBob 3s ease-in-out 0.6s infinite;
  margin-bottom: 16px;
}
.reward-check svg { width: 54px; height: 54px; }
@keyframes checkPop {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.25) rotate(8deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes checkBob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-10px); }
}
.reward-h {
  font-family: var(--serif);
  font-size: 92px;
  font-weight: 500;
  color: white;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-top: 12px;
  text-shadow: 0 4px 28px color-mix(in srgb, var(--bright) 70%, transparent);
  animation: rewardHIn 0.7s 0.2s cubic-bezier(.34,1.4,.5,1) both;
}
@keyframes rewardHIn {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.reward-sub {
  font-size: 19px;
  color: rgba(255,255,255,0.78);
  max-width: 52ch;
  line-height: 1.5;
  text-wrap: pretty;
  animation: rewardSubIn 0.6s 0.45s ease both;
}
@keyframes rewardSubIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reward-spark-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 32px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--reward) 32%, transparent),
    color-mix(in srgb, var(--reward) 14%, transparent));
  border: 1.5px solid color-mix(in srgb, var(--reward) 60%, transparent);
  color: var(--reward);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.005em;
  margin-top: 20px;
  box-shadow:
    0 0 0 8px color-mix(in srgb, var(--reward) 8%, transparent),
    0 8px 30px -8px color-mix(in srgb, var(--reward) 50%, transparent);
  animation: pillIn 0.55s 0.7s cubic-bezier(.34,1.56,.64,1) both, pillGlow 3s 1.3s ease-in-out infinite;
}
.reward-spark-pill .pill-spark-icon {
  font-size: 28px;
  display: inline-block;
  animation: sparkSpin 1.4s ease-in-out infinite;
}
@keyframes pillIn {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pillGlow {
  0%,100% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--reward) 8%, transparent), 0 8px 30px -8px color-mix(in srgb, var(--reward) 50%, transparent); }
  50%     { box-shadow: 0 0 0 16px color-mix(in srgb, var(--reward) 4%, transparent), 0 16px 44px -8px color-mix(in srgb, var(--reward) 75%, transparent); }
}
@keyframes sparkSpin {
  0%,100% { transform: rotate(-10deg) scale(1); }
  50%     { transform: rotate(12deg) scale(1.2); }
}
.reward-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.72);
  max-width: 44ch;
  line-height: 1.5;
  text-wrap: pretty;
}
.reward-spark-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,162,39,0.4);
  color: var(--reward);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  margin-top: 12px;
}
.spark-burst {
  position: absolute;
  pointer-events: none;
  width: 7px; height: 7px;
  border-radius: 1px;
  background: var(--reward);
  animation: sparkFly 1.8s ease-out infinite;
  opacity: 0;
}
@keyframes sparkFly {
  0% { transform: translate(0,0) rotate(0) scale(0.6); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(var(--dx, 80px), var(--dy, -90px)) rotate(540deg) scale(0); opacity: 0; }
}

/* ─── MODAL ─────────────────────────────────────────────────── */
.modal-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}
.modal-icon { color: var(--dark); margin-bottom: 20px; }
.modal-h {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.08;
  color: var(--dark);
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 16ch;
  margin-bottom: 18px;
}
.modal-screen p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--dark);
  max-width: 52ch;
  text-wrap: pretty;
  margin-bottom: 32px;
}
.btn-pill.has-close { position: relative; padding-left: 56px; }
.btn-pill .close-x {
  position: absolute;
  left: 22px;
  display: inline-flex;
  color: var(--bright);
}

/* ─── MASCOT (filled by --bright) ──────────────────────────── */
.mascot rect { fill: var(--bright); transition: transform 0.3s; }

/* mascot idle wobble (toggleable via data attr) */
:root[data-mascot-anim="on"] .mascot {
  animation: mascotWobble 5s ease-in-out infinite;
  transform-origin: center center;
}
@keyframes mascotWobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(2.5deg) translateY(-2px); }
  50% { transform: rotate(0deg) translateY(0); }
  75% { transform: rotate(-2.5deg) translateY(-2px); }
}

/* mascot blink: the center white rect shrinks briefly */
:root[data-mascot-anim="on"] .mascot rect:last-child {
  animation: mascotBlink 4.2s infinite;
  transform-origin: center;
}
@keyframes mascotBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  94%, 96%      { transform: scaleY(0.05); }
}


/* ─── EXERCISE FRAME (shared header for all exercise types) ─── */
.ex-frame {
  max-width: 760px; width: 100%;
  margin: 0 auto;
}
.ex-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.diff-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.diff-badge.easy   { background: color-mix(in srgb, var(--positive) 12%, white); color: var(--positive); }
.diff-badge.medium { background: var(--soft);                                       color: var(--bright); }
.diff-badge.hard   { background: color-mix(in srgb, var(--reward) 18%, white);  color: #6a5310; }
.ex-type-label {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.ex-q {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  text-wrap: balance;
}
.ex-submit {
  display: flex; justify-content: flex-end;
  margin-top: 20px;
}
.ex-submit .btn-pill { min-width: 180px; }

/* ─── BLANK (fill in) ─────────────────────────────────── */
.blank-sentence {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--dark);
  letter-spacing: -0.005em;
  margin-bottom: 8px;
  text-wrap: balance;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: center;
  text-align: center;
}
.blank-input {
  font: inherit;
  border: none;
  background: var(--soft);
  color: var(--bright);
  border-radius: var(--r-pill);
  padding: 6px 22px;
  min-width: 200px;
  text-align: center;
  outline: none;
  border-bottom: 2px solid var(--bright);
  transition: background 0.15s;
  font-weight: 600;
}
.blank-input:focus { background: color-mix(in srgb, var(--bright) 8%, white); }
.blank-input.is-correct { background: color-mix(in srgb, var(--positive) 12%, white); color: var(--positive); border-bottom-color: var(--positive); }
.blank-input.is-wrong { background: color-mix(in srgb, var(--negative) 10%, white); color: var(--negative); border-bottom-color: var(--negative); }

/* ─── DRAG-DROP (click to place) ───────────────────────── */
.dd-stage {
  display: flex; flex-direction: column; gap: 18px;
}
.dd-hint {
  font-size: 13px; color: var(--ink-muted);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 4px;
}
.dd-items {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  padding: 14px;
  background: var(--cream);
  border: 1.5px dashed rgba(0,0,0,0.12);
  border-radius: var(--r-card);
  min-height: 76px;
}
.dd-item {
  padding: 10px 16px;
  background: var(--paper);
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  cursor: grab;
  transition: border-color 0.15s, transform 0.06s;
}
.dd-item:hover { border-color: var(--bright); }
.dd-item:active { transform: scale(0.96); }
.dd-item.selected { border-color: var(--bright); background: var(--soft); color: var(--bright); }
.dd-bins {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.dd-bin {
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--r-card);
  padding: 14px;
  min-height: 140px;
  background: var(--paper);
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.dd-bin.target-ready { border-color: var(--bright); background: var(--soft); }
.dd-bin-label {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.dd-bin-items {
  display: flex; flex-direction: column; gap: 6px;
}
.dd-bin-items .dd-item { width: 100%; text-align: left; border-radius: 8px; }
.dd-item.correct-place { border-color: var(--positive); background: color-mix(in srgb, var(--positive) 8%, white); color: var(--positive); }
.dd-item.wrong-place { border-color: var(--negative); background: color-mix(in srgb, var(--negative) 8%, white); color: var(--negative); }

/* image-variant of dd-item: stacked image + label, larger card */
.dd-item.dd-item-img {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  width: 140px;
  height: 140px;
  text-align: center;
  font-size: 13px;
  line-height: 1.25;
}
.dd-item.dd-item-img .dd-img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  display: block;
  background: var(--soft);
  flex-shrink: 0;
}
.dd-item.dd-item-img .dd-item-label {
  padding: 8px 10px;
  font-weight: 500;
  color: var(--dark);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-wrap: balance;
}
.dd-bin .dd-item.dd-item-img {
  width: 100%;
  height: auto;
  flex-direction: row;
  text-align: left;
}
.dd-bin .dd-item.dd-item-img .dd-img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.dd-bin .dd-item.dd-item-img .dd-item-label {
  padding: 6px 12px;
  justify-content: flex-start;
  font-size: 13px;
}

/* ─── MATCH PAIRS ───────────────────────────────────── */
.match-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.match-col { display: flex; flex-direction: column; gap: 10px; }
.match-row {
  padding: 14px 18px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--r-card);
  background: var(--paper);
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.15s, background 0.15s;
  min-height: 56px;
}
.match-row:hover { border-color: var(--bright); }
.match-row.selected { border-color: var(--bright); background: var(--soft); }
.match-row.paired { border-color: var(--bright); }
.match-row .pair-dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0;
}
.match-row.correct { border-color: var(--positive); background: color-mix(in srgb, var(--positive) 8%, white); }
.match-row.wrong { border-color: var(--negative); background: color-mix(in srgb, var(--negative) 8%, white); }

/* ─── ORDER (reorder list) ────────────────────────────── */
.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  background: var(--paper);
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--r-card);
  font-size: 14px;
  color: var(--dark);
}
.order-row.correct { border-color: var(--positive); background: color-mix(in srgb, var(--positive) 8%, white); }
.order-row.wrong { border-color: var(--negative); background: color-mix(in srgb, var(--negative) 8%, white); }
.order-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--bright);
  font-family: var(--serif);
  font-weight: 600; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.order-arrows { display: flex; flex-direction: column; gap: 2px; }
.order-arrow {
  width: 28px; height: 22px;
  border-radius: 6px;
  background: var(--cream);
  color: var(--ink-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.order-arrow:hover:not(:disabled) { background: var(--soft); color: var(--bright); }
.order-arrow:disabled { opacity: 0.3; cursor: not-allowed; }

/* ─── EXERCISE FEEDBACK (shared) ───────────────────── */
.ex-feedback {
  margin-top: 18px;
  background: var(--soft);
  border-radius: var(--r-card);
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--dark);
}
.ex-feedback.correct { background: color-mix(in srgb, var(--positive) 10%, white); }
.ex-feedback.wrong { background: color-mix(in srgb, var(--negative) 8%, white); }
.ex-feedback b {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* ─── POLL (module 2 — anonymous survey) ──────────────────── */
.poll-screen { flex: 1; display: flex; flex-direction: column; align-items: center; }
.poll-intro {
  max-width: 720px; width: 100%; margin: 0 auto 32px;
  text-align: center;
}
.poll-intro h2 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--dark);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  text-wrap: balance;
}
.poll-intro p { font-size: 16px; color: var(--ink-muted); max-width: 56ch; margin: 0 auto; line-height: 1.5; }
.poll-intro .badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--bright);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.poll-q {
  max-width: 720px; width: 100%;
  margin: 0 auto 28px;
}
.poll-q .q-num {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.poll-q .q-text {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 14px;
  text-wrap: balance;
}
.poll-options {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.poll-opt {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(0,0,0,0.1);
  background: var(--paper);
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  transition: border-color 0.15s, background 0.15s;
}
.poll-opt:hover { border-color: var(--bright); }
.poll-opt.picked { border-color: var(--bright); background: var(--soft); color: var(--bright); }

/* ─── COMPLETION ─────────────────────────────────────────── */
.completion {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 16px;
}
.trophy {
  width: 96px; height: 96px;
  border-radius: 24px;
  background: var(--bright);
  color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 12px color-mix(in srgb, var(--bright) 14%, transparent);
}
.completion h1 {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 500;
  color: white;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 8px;
}
.completion .sub {
  font-size: 17px; color: rgba(255,255,255,0.72);
  max-width: 50ch; line-height: 1.5;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-card);
  padding: 22px 32px;
  min-width: 520px;
}
.score-cell { text-align: center; }
.score-cell .num {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.score-cell.spark .num { color: var(--reward); }
.score-cell.correct .num { color: var(--bright); }
.score-cell.pct .num { color: white; }
.score-cell .lbl {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
}

/* ─── TIPS (onboarding) ────────────────────────────────────── */
.tips-screen { flex: 1; display: flex; flex-direction: column; }
.speech-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin: 0 auto 40px;
  max-width: 660px;
  width: 100%;
}

/* ─── SCROLLBAR ─────────────────────────────────────────────── */
.content::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 4px; }


/* ════════════════════════════════════════════════════════════════
   DYNAMIC LAYER — bloom, dots, confetti, floating shapes, halos
   Controlled by :root data attributes:
     data-energy   = "calm" | "standard" | "playful"   (master switch)
     data-bg       = "none" | "dots" | "bloom"
     data-mascot-anim = "on" | "off"
     data-confetti = "on"  | "off"
     data-reward-anim = "on" | "off"
   ════════════════════════════════════════════════════════════════ */

/* desktop-app gets a relative + overflow guard so decorative bg layers can absolute */
.desktop-app { position: relative; overflow: clip; }
.bg-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.desktop-app > .top-bar,
.desktop-app > .content { position: relative; z-index: 1; }

/* ── DOTTED GRID PATTERN ───────────────────────────────────────── */
:root[data-bg="dots"] .bg-deco {
  background-image: radial-gradient(
    circle,
    color-mix(in srgb, var(--bright) 24%, transparent) 1.2px,
    transparent 1.2px
  );
  background-size: 28px 28px;
  background-position: 14px 14px;
  opacity: 0.32;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 80%);
}
:root[data-bg="dots"] .desktop-app.reward-bg .bg-deco {
  background-image: radial-gradient(
    circle,
    rgba(255,255,255,0.18) 1.2px,
    transparent 1.2px
  );
  opacity: 0.5;
  mask-image: none; -webkit-mask-image: none;
}

/* ── BLOOM (gradient orbs floating) ─────────────────────────────── */
:root[data-bg="bloom"] .bg-deco {
  background:
    radial-gradient(600px circle at 12% 18%, color-mix(in srgb, var(--bright) 22%, transparent), transparent 60%),
    radial-gradient(500px circle at 92% 78%, color-mix(in srgb, var(--dark) 18%, transparent), transparent 60%),
    radial-gradient(400px circle at 78% 12%, color-mix(in srgb, var(--bright) 14%, transparent), transparent 65%);
  animation: bloomDrift 22s ease-in-out infinite;
}
:root[data-bg="bloom"] .desktop-app.reward-bg .bg-deco {
  background:
    radial-gradient(700px circle at 16% 26%, rgba(199,69,204,0.35), transparent 60%),
    radial-gradient(600px circle at 86% 76%, rgba(201,162,39,0.18), transparent 60%),
    radial-gradient(420px circle at 70% 16%, rgba(255,255,255,0.06), transparent 65%);
  animation: bloomDrift 22s ease-in-out infinite;
}
@keyframes bloomDrift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(-12px, 16px) scale(1.04); }
  66%     { transform: translate(14px, -10px) scale(0.98); }
}

/* energy=calm disables all decorative animation */
:root[data-energy="calm"] .bg-deco { animation: none !important; }
:root[data-energy="calm"] .mascot { animation: none !important; }
:root[data-energy="calm"] .mascot rect:last-child { animation: none !important; }
:root[data-energy="calm"] .flag-bar .fill::after { animation: none !important; opacity: 0; }
:root[data-energy="calm"] .reward-check { box-shadow: 0 0 0 0 transparent; }
:root[data-energy="calm"] .reward-halo,
:root[data-energy="calm"] .float-shape,
:root[data-energy="calm"] .spark-burst,
:root[data-energy="calm"] .confetti-piece { display: none !important; }

/* energy=playful makes everything snappier */
:root[data-energy="playful"] .mod-row:hover {
  transform: translateY(-4px) scale(1.005);
}
:root[data-energy="playful"] .btn-pill:hover {
  transform: translateY(-2px) scale(1.015);
}
:root[data-energy="playful"] .flag-bar .fill::after { animation-duration: 1.8s; }
:root[data-energy="playful"] .mascot { animation-duration: 3.5s; }

/* ── BUTTON: subtle gradient sheen on hover ───────────────────── */
.btn-pill {
  position: relative;
  overflow: hidden;
  transition: background 0.15s, transform 0.18s, box-shadow 0.18s, opacity 0.15s;
}
.btn-pill:not(.disabled):not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--bright) 70%, transparent);
}
.btn-pill::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -40%; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.btn-pill:not(.disabled):not(:disabled):hover::before {
  left: 140%;
}

/* ── SCORE PILL counter pop on update ──────────────────────────── */
.score-pill { transition: transform 0.18s, background 0.2s; }
.score-pill.pop { transform: scale(1.16); background: var(--bright); }
.score-pill.pop .up { animation: scoreUp 0.6s ease both; }
@keyframes scoreUp {
  0% { transform: translateY(6px); opacity: 0; }
  50% { transform: translateY(-2px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ── REWARD HALO (pulse ring behind check) ─────────────────────── */
.reward-halo {
  position: absolute;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--bright) 80%, transparent);
  opacity: 0;
  animation: haloPulse 2.6s ease-out infinite;
  pointer-events: none;
}
.reward-halo.delay-1 { animation-delay: 0.7s; }
.reward-halo.delay-2 { animation-delay: 1.4s; }
@keyframes haloPulse {
  0%   { width: 80px; height: 80px; opacity: 0.85; transform: translate(-50%, -50%) scale(0.6); }
  100% { width: 80px; height: 80px; opacity: 0;    transform: translate(-50%, -50%) scale(3.2); }
}

/* ── FLOATING DECORATIVE SHAPES (welkom/reward/completion) ────── */
.float-shape {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: floatDrift 14s ease-in-out infinite;
}
.float-shape.ring {
  background: transparent;
  border: 1.5px solid color-mix(in srgb, var(--bright) 35%, transparent);
}
.float-shape.dot {
  background: color-mix(in srgb, var(--bright) 18%, transparent);
}
.float-shape.square {
  border-radius: 6px;
  background: color-mix(in srgb, var(--reward) 28%, transparent);
  transform: rotate(15deg);
}
.desktop-app.reward-bg .float-shape.ring  { border-color: rgba(255,255,255,0.22); }
.desktop-app.reward-bg .float-shape.dot   { background: rgba(255,255,255,0.10); }
.desktop-app.reward-bg .float-shape.square{ background: color-mix(in srgb, var(--reward) 38%, transparent); }
@keyframes floatDrift {
  0%,100% { transform: translate(0,0) rotate(0); }
  33%     { transform: translate(20px, -28px) rotate(40deg); }
  66%     { transform: translate(-18px, -14px) rotate(-20deg); }
}

/* ── PAGE FADE IN ─────────────────────────────────────────────── */
.content { animation: pageFade 0.45s ease both; }
@keyframes pageFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CONFETTI ─────────────────────────────────────────────────── */
.confetti-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  width: 9px; height: 14px;
  border-radius: 2px;
  animation: confettiFall 4s linear forwards;
  opacity: 0.95;
}
@keyframes confettiFall {
  0%   { transform: translateY(-30px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(120vh) rotate(720deg); opacity: 0; }
}

/* ── TIPS/QUIZ/TIP-CARD hover lift ──────────────────────────── */
.tip-card {
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.tip-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--bright) 40%, var(--border-strong));
  box-shadow: 0 10px 28px -14px color-mix(in srgb, var(--dark) 30%, transparent);
}
.quiz-opt {
  transition: border-color 0.18s, background 0.18s, transform 0.14s, box-shadow 0.18s;
}
.quiz-opt:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -10px color-mix(in srgb, var(--bright) 60%, transparent);
}

/* ── SPEECH BUBBLE: slight tail wobble ──────────────────────── */
.speech-bubble {
  animation: speechIn 0.5s cubic-bezier(.34,1.4,.5,1) both;
}
@keyframes speechIn {
  from { opacity: 0; transform: scale(0.9) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── TROPHY pulse on completion ─────────────────────────────── */
.trophy { animation: trophyPop 0.7s cubic-bezier(.34,1.56,.64,1) both, trophyBob 3s ease-in-out 0.7s infinite; }
@keyframes trophyPop {
  0%   { transform: scale(0) rotate(-25deg); opacity: 0; }
  60%  { transform: scale(1.18) rotate(8deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes trophyBob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

/* ── TWEAKS PANEL OVERRIDES (sit above bg-deco) ─────────────── */
.twk-panel { z-index: 2147483646 !important; }


/* ─── TIMER BADGE ──────────────────────────────────────────── */
.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px 14px 20px;
  border-radius: 999px;
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--positive) 14%, white);
  color: var(--positive);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 6px 24px -8px color-mix(in srgb, var(--positive) 50%, transparent);
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.3s;
  animation: timerBreathe 2.4s ease-in-out infinite;
}
.timer-badge.warn {
  background: color-mix(in srgb, var(--reward) 28%, white);
  color: #6a5310;
  box-shadow: 0 6px 28px -6px color-mix(in srgb, var(--reward) 80%, transparent);
  animation: timerPulseSoft 1.4s ease-in-out infinite;
}
.timer-badge.critical {
  background: color-mix(in srgb, var(--negative) 20%, white);
  color: var(--negative);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--negative) 12%, transparent),
    0 8px 32px -4px color-mix(in srgb, var(--negative) 70%, transparent);
  animation: timerPulse 0.7s ease-in-out infinite;
}
.timer-badge.expired {
  background: var(--negative);
  color: white;
  box-shadow: 0 8px 32px -4px color-mix(in srgb, var(--negative) 80%, transparent);
  animation: none;
}
@keyframes timerBreathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}
@keyframes timerPulseSoft {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.14); }
}
/* ex-head should let timer push right */
.ex-head { display: flex; align-items: center; gap: 12px; }


/* ════════════════════════════════════════════════════════════════
   SCK CEN DOTTED SYMBOLS — decorative dotted icons in background
   Mimics the dot-grid icon style from sckcen.be
   ════════════════════════════════════════════════════════════════ */

.sck-dots {
  position: absolute;
  pointer-events: none;
  user-select: none;
  opacity: 0.28;
  z-index: 0;
}
.sck-dots.dim   { opacity: 0.16; }
.sck-dots.faint { opacity: 0.10; }
.sck-dots.bright-fill { color: var(--bright); }
.sck-dots.dark-fill   { color: var(--dark); }
.sck-dots.reward-fill { color: white; opacity: 0.16; }

/* welcome screen: 2 large dotted symbols flanking content */
.welkom { position: relative; }
.welkom .sck-dots { z-index: 0; }
.welkom .logo-wrap,
.welkom h1,
.welkom p,
.welkom .pager { position: relative; z-index: 1; }

/* overview decoration */
.overview { position: relative; }
.overview .sck-dots { z-index: 0; }
.overview-head, .mod-list { position: relative; z-index: 1; }

/* completion decoration */
.completion { position: relative; }
.completion .sck-dots { z-index: 0; }

/* dot icons size variants */
.sck-dots.lg { width: 220px; height: 220px; }
.sck-dots.md { width: 140px; height: 140px; }
.sck-dots.sm { width: 96px;  height: 96px;  }

/* SCK CEN-style dotted icon — atom (innovative nuclear systems)
   Built as inline SVG: a grid of circles with some highlighted for the symbol shape. */
.dot-atom svg, .dot-hourglass svg, .dot-heart svg,
.dot-shield svg, .dot-radiation svg, .dot-knowledge svg {
  width: 100%; height: 100%; display: block;
}
.dot-atom circle, .dot-hourglass circle, .dot-heart circle,
.dot-shield circle, .dot-radiation circle, .dot-knowledge circle {
  fill: currentColor;
}

/* ─── HOTSPOT exercise (klik fouten aan op AI-foto) ─────────── */
.hs-stage {
  position: relative;
  display: inline-block;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--soft);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.18);
  margin: 0 auto;
  max-width: 100%;
}
.hs-stage img {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: crosshair;
  user-select: none;
  -webkit-user-drag: none;
}
.hs-stage.submitted img { cursor: default; }
.hs-marker {
  position: absolute;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 3px solid var(--bright);
  background: color-mix(in srgb, var(--bright) 12%, transparent);
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600;
  color: var(--bright);
  font-size: 14px;
  animation: hsPop 0.4s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes hsPop {
  0% { transform: translate(-50%, -50%) scale(0); }
  60% { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
.hs-marker.correct { border-color: var(--positive); background: color-mix(in srgb, var(--positive) 18%, transparent); color: var(--positive); }
.hs-marker.missed  { border-color: var(--negative); background: color-mix(in srgb, var(--negative) 14%, transparent); color: var(--negative); border-style: dashed; }
.hs-marker.click-miss { border-color: var(--negative); background: color-mix(in srgb, var(--negative) 14%, transparent); color: var(--negative); }
.hs-marker .hs-label {
  position: absolute;
  bottom: -36px; left: 50%; transform: translateX(-50%);
  background: var(--dark);
  color: white;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.hs-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--bright);
  font-weight: 600;
  font-size: 14px;
  margin: 16px 0 8px;
  font-variant-numeric: tabular-nums;
}
.hs-counter b { font-family: var(--serif); font-size: 16px; }
.hs-frame { text-align: center; }


/* ─── REWARD: ALL-CORRECT extra-festive variant ─────────────── */
.reward-screen.all-correct .reward-h {
  font-size: 120px;
  background: linear-gradient(135deg, #fff 0%, var(--reward) 60%, #fff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 4px 24px color-mix(in srgb, var(--reward) 60%, transparent));
  animation: rewardHIn 0.7s 0.2s cubic-bezier(.34,1.4,.5,1) both,
             headingShine 4s 1s ease-in-out infinite;
  background-size: 200% 100%;
}
@keyframes headingShine {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.reward-screen.all-correct .reward-check {
  background: linear-gradient(135deg, var(--reward) 0%, var(--bright) 100%);
  box-shadow:
    0 0 0 18px color-mix(in srgb, var(--reward) 20%, transparent),
    0 0 80px 30px color-mix(in srgb, var(--reward) 40%, transparent);
  width: 140px; height: 140px;
}
.reward-screen.all-correct .reward-check svg { width: 64px; height: 64px; }
.reward-screen.all-correct .reward-spark-pill {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--reward) 50%, transparent),
    color-mix(in srgb, var(--reward) 25%, transparent));
  border-color: var(--reward);
  font-size: 26px;
  padding: 18px 36px;
}
.reward-screen.all-correct::before {
  content: "PERFECT";
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--reward);
  background: color-mix(in srgb, var(--reward) 15%, transparent);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--reward) 50%, transparent);
  animation: perfectIn 0.6s 0.9s cubic-bezier(.34,1.56,.64,1) both;
  z-index: 2;
}
@keyframes perfectIn {
  from { opacity: 0; transform: translate(-50%, -10px) scale(0.7); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* responsive guard for very wide headings */
@media (max-width: 900px) {
  .reward-h { font-size: 64px; }
  .reward-screen.all-correct .reward-h { font-size: 80px; }
}
