/* Result animation floats directly above the blurred, preserved question. */
.answer-splash {
  --outcome: #147652;
  --result-ink: #162a21;
  --result-muted: #405b4c;
  --result-line: #163d2929;
  --button-bg: #174e35;
  --button-ink: #ffffff;
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(calc(100% - 40px), 352px);
  height: auto;
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  border: 0;
  border-radius: 0;
  padding: 16px 8px;
  box-shadow: none;
  background: transparent;
  color: var(--result-ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.answer-splash[open] { display: flex; flex-direction: column; gap: 24px; }
.answer-splash::backdrop {
  background: rgb(255 255 255 / 78%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: backdrop-reveal .2s ease-out both;
}
.splash-incorrect, .splash-timeout {
  --outcome: #ffffff;
  --result-ink: #ffffff;
  --result-muted: #e0e3e8;
  --result-line: #ffffff40;
  --button-bg: #ffffff;
  --button-ink: #151a20;
}
.splash-incorrect::backdrop, .splash-timeout::backdrop { background: rgb(0 0 0 / 74%); }
.splash-main { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; text-align: center; }
.splash-symbol { width: 160px; height: 160px; display: grid; place-items: center; margin: 0 0 8px; color: var(--outcome); }
.splash-correct .splash-symbol { animation: bounceIn .6s both; }
.splash-incorrect .splash-symbol, .splash-timeout .splash-symbol { animation: headShake .65s .08s ease-in-out both; }
.splash-symbol > svg { width: 100%; height: 100%; fill: none; stroke: currentColor; }
.splash-circle { stroke-width: 12; stroke-dasharray: 1; stroke-dashoffset: 1; transform: rotate(-90deg); transform-origin: center; animation: circle-draw .4s .08s ease-out forwards; }
.splash-cross { stroke-width: 13; stroke-linecap: round; }
.splash-timeout .splash-symbol > .icon { width: 116px; height: 116px; stroke-width: 1.8; }
.answer-splash h2 { font-size: 52px; font-weight: 900; letter-spacing: -.045em; line-height: 1.15; margin: 0; animation: fadeInUp .3s .1s ease-out both; }
.splash-points { margin-top: 12px; display: flex; align-items: baseline; gap: 8px; color: var(--outcome); animation: fadeInUp .3s .18s ease-out both; }
.splash-points b { font: 700 40px/1 var(--mono); letter-spacing: -.06em; }
.splash-points > span { font: 11px var(--mono); letter-spacing: .1em; }
.splash-answer { margin-top: 24px; width: 100%; border-top: 1px solid var(--result-line); padding-top: 16px; animation: fadeInUp .3s .22s ease-out both; }
.splash-answer > span { font-size: 14px; color: var(--result-muted); }
.splash-answer > strong { display: block; font-size: 22px; font-weight: 800; margin-top: 5px; line-height: 1.45; overflow-wrap: anywhere; }
.splash-answer > small { display: block; font-size: 13px; color: var(--result-muted); margin-top: 8px; }
.splash-button { display: flex; justify-content: center; align-items: center; gap: 14px; flex: 0 0 auto; align-self: center; border: 0; width: 100%; max-width: 280px; min-height: 54px; padding: 12px; border-radius: 14px; background: var(--button-bg); color: var(--button-ink); font-weight: 750; font-size: 16px; transition: transform .1s; touch-action: manipulation; animation: fadeInUp .3s .26s ease-out backwards; }
.splash-button:active { transform: scale(.96); }
.choice:active:not(:disabled) { transform: scale(.965); border-color: var(--blue); background: #e2eaff; box-shadow: none; }
.choice { transition: transform .1s, background .1s, border-color .1s; }
.question-heading .outcome-heading { font-size: 34px; display: flex; align-items: baseline; gap: 14px; }
.outcome-heading > span { font: 700 22px var(--mono); }
.is-feedback .explanation-panel { order: 0; }
.is-feedback .answer-rail { order: 1; }
.is-feedback .balance-card { order: 2; }
.is-feedback .answer-verdict { display: none; }
@keyframes backdrop-reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes circle-draw { to { stroke-dashoffset: 0; } }
@media (max-height: 650px) {
  .answer-splash { padding: 12px 8px; }
  .answer-splash[open] { gap: 18px; }
  .splash-symbol { width: 112px; height: 112px; margin-bottom: 6px; }
  .splash-timeout .splash-symbol > .icon { width: 84px; height: 84px; }
  .answer-splash h2 { font-size: 44px; }
  .splash-points { margin-top: 8px; }.splash-points b { font-size: 34px; }
  .splash-answer { margin-top: 16px; padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .answer-splash, .answer-splash::backdrop, .answer-splash *, .choice, .countdown-track > div { animation: none !important; transition: none !important; }
  .splash-circle { stroke-dashoffset: 0; }
}
@media print { .answer-splash, .question-timer { display: none !important; } }
