/* Opt-in classroom theme; layout, camera dimensions and the classic theme stay in style.css. */
html[data-theme="vivid"]{
  scrollbar-gutter:auto;
  --quiz-stage-gap:0px;
  --ink:#163a79;--muted:#3a557d;--gold:#ffdb28;--purple:#7828d8;
  --vivid-answer-a:#00f58a;--vivid-answer-b:#ff6600;--vivid-answer-c:#faff00;--vivid-answer-d:#00d8ef;
  --vivid-cream:#fff3cc;--vivid-shadow:inset 0 3px 3px #ffffffb3,inset 0 -6px 7px #00275b55;
}
html[data-theme="vivid"] body{background:#57ccff url('../images/art/stage-vivid.webp?v=1.0.0') center center/cover fixed no-repeat}
html[data-theme="vivid"] .quiz{--quiz-gutter:0px;max-width:none;padding:0}
html[data-theme="vivid"] .answer-stage{position:relative}
html[data-theme="vivid"] .topbar,
html[data-theme="vivid"] .quiz-meta{background:rgba(244,252,255,.95);border-color:#168af0}
html[data-theme="vivid"] .wordmark strong,
html[data-theme="vivid"] .welcome-copy h1,
html[data-theme="vivid"] .selection h1{color:#1853bf}
html[data-theme="vivid"] .theme-select{border-color:#1384ec;background:#eaf6ff;color:#14418d}
html[data-theme="vivid"] .quiet{color:#244b91}
html[data-theme="vivid"] .primary{background:#ffdb28;border-color:#d38c0b;color:#533600;box-shadow:inset 0 2px 2px #fff9,0 4px 0 #bf7c07}
html[data-theme="vivid"] .primary:not(:disabled):hover{background:#ffe762}
html[data-theme="vivid"] .setup,
html[data-theme="vivid"] dialog{background:#fff9e9;border-color:#1482ed;box-shadow:inset 0 2px 2px #fff,0 6px 18px #12478333}
html[data-theme="vivid"] .setup h2,
html[data-theme="vivid"] dialog h2{color:#194ca7}
html[data-theme="vivid"] dialog::backdrop{background:#092f6999}
html[data-theme="vivid"] .initial{background:#ffdc33;color:#1649a7;border-color:#fff;box-shadow:0 4px 0 #1265ca}
html[data-theme="vivid"] .selected-player h2{color:#1649a7}
html[data-theme="vivid"] .pose-tile,
html[data-theme="vivid"] .pose-picker-grid label:has(input:checked){border-color:#1682ee;background:#e4f2ff;box-shadow:inset 0 2px 2px #fff}
html[data-theme="vivid"] .pose-gallery img{background:#e4f2ff;border-color:#77b9f9}
html[data-theme="vivid"] .history-drawer{border-left-color:#1682ee}

html[data-theme="vivid"] .quiz-question{
  padding:12px 18px;border:0;border-radius:0;
  background:none;box-shadow:none;
}
html[data-theme="vivid"] #questionText{
  font-family:'Baloo 2',Quicksand,Classroom,sans-serif;font-size:clamp(54px,5.796vw,79.2px);
  font-weight:800;line-height:1.2;color:#1c3f91;
  text-shadow:-2px -2px 0 #fff,2px -2px 0 #fff,-2px 2px 0 #fff,2px 2px 0 #fff,0 2px 6px #fff,0 0 10px #fff;
}
html[data-theme="vivid"] .question-illustration{background:#fffdf3;border:2px solid #f3ce6c;border-radius:0}
html[data-theme="vivid"] .question-image{border-radius:0}
html[data-theme="vivid"] .camera-preview-frame{
  align-self:stretch;height:auto;min-height:0;aspect-ratio:auto;
  border:0;border-radius:0;background:#133471;box-shadow:none;
}
html[data-theme="vivid"] .answer{
  --answer-fill:var(--vivid-answer-a);--answer-border:var(--vivid-answer-a);--answer-ink:#102c54;
  border:0;border-radius:0;background:var(--answer-fill);color:var(--answer-ink);
  box-shadow:none;transform:none;
}
html[data-theme="vivid"] .answer:nth-child(2){--answer-fill:var(--vivid-answer-b);--answer-border:var(--vivid-answer-b)}
html[data-theme="vivid"] .answer:nth-child(3){--answer-fill:var(--vivid-answer-c);--answer-border:var(--vivid-answer-c)}
html[data-theme="vivid"] .answer:nth-child(4){--answer-fill:var(--vivid-answer-d);--answer-border:var(--vivid-answer-d)}
html[data-theme="vivid"] .answer-pose img{filter:none}
html[data-theme="vivid"] .answer-letter{background:#fff;color:#153b87;border-color:#fff;box-shadow:none}
html[data-theme="vivid"] .answer-content{
  font-family:'Baloo 2',Quicksand,Classroom,sans-serif;font-size:clamp(36px,3.864vw,52.8px);
  min-height:0;font-weight:800;line-height:1.15;color:var(--answer-ink);
  text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff,0 1px 4px #fff;
}
html[data-theme="vivid"] .answer.candidate,
html[data-theme="vivid"] .answer.chosen{outline:3px solid #102c54;outline-offset:-4px}
/* Glass follows real recognition progress; CSS never decides when an answer commits. */
html[data-theme="vivid"] .answer{isolation:isolate}
html[data-theme="vivid"] .answer-pose,
html[data-theme="vivid"] .answer-content{position:relative;z-index:2}
html[data-theme="vivid"] .answer-letter{z-index:3}
html[data-theme="vivid"] .answer::before{
  content:'';position:absolute;inset:0;z-index:1;pointer-events:none;opacity:0;
  background:linear-gradient(110deg,#ffffff05 0%,#ffffff33 35%,#ffffff88 50%,#ffffff33 65%,#ffffff05 100%);
  background-repeat:no-repeat;transform:scaleX(var(--hold-progress,0));transform-origin:left;
  transition:transform .08s linear;
}
html[data-theme="vivid"] .answer.candidate::before{opacity:1}
html[data-theme="vivid"] .answer.chosen::before{
  transform:scaleX(1);background-size:200% 100%;animation:vividGlassConfirm .65s ease-out 1 both;
}
@keyframes vividGlassConfirm{
  0%{background-position:100% 0;opacity:0}
  20%{opacity:1}
  100%{background-position:0% 0;opacity:0}
}
html[data-theme="vivid"] .answer.correct,
html[data-theme="vivid"] .answer.wrong{animation:none;outline:none;box-shadow:none}
html[data-theme="vivid"] .answer.correct{border-color:#a4ff56}
html[data-theme="vivid"] .answer.wrong{border-color:#ffd2d2}
html[data-theme="vivid"] .answer.correct::after,
html[data-theme="vivid"] .answer.wrong::after{
  content:'✓';position:absolute;right:9px;top:9px;width:26px;height:26px;display:grid;place-items:center;
  z-index:4;border-radius:50%;background:#fff;color:#087f23;font-family:Classroom,sans-serif;font-size:20px;font-weight:700;line-height:1;
}
html[data-theme="vivid"] .answer.wrong::after{content:'✕';color:#b5002f}
html[data-theme="vivid"] #holdProgress{position:absolute;left:0;bottom:0;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;margin:0;border:0;pointer-events:none}
html[data-theme="vivid"] #holdProgress::-webkit-progress-value{background:#ffcf18}
html[data-theme="vivid"] #holdProgress::-moz-progress-bar{background:#ffcf18}
html[data-theme="vivid"] .answer:focus-visible{outline:3px solid #102c54;outline-offset:-4px}

@media (max-width:900px){
  html[data-theme="vivid"] .answer-content{font-size:36px}
}
@media (max-width:640px){
  html[data-theme="vivid"] .camera-preview-frame{align-self:center;aspect-ratio:1 / 1}
  html[data-theme="vivid"] .quiz-question{padding:12px;border:0;border-radius:0}
  html[data-theme="vivid"] #questionText{font-size:54px}
  html[data-theme="vivid"] .answer-content{font-size:33.6px}
}
@media (prefers-reduced-motion:reduce){
  html[data-theme="vivid"] .answer::before{transition:none}
  html[data-theme="vivid"] .answer.chosen::before{animation:none;opacity:.18;background-size:100% 100%}
}
