/* Audience-only accents. Geometry, pattern artwork and game timing stay in
   their existing owners; the game supplies every transition hook used here. */
@media screen and (prefers-reduced-motion: no-preference) {
  /* Bingo: the new call leads while recent numbers remain steady to read. */
  body.display-mode .display-call strong.call-pop {
    animation: currentCallPop 420ms cubic-bezier(0.16, 1, 0.3, 1) 1;
  }

  body.display-mode .display-call.call-flash::before {
    background: radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, 0.24), transparent 64%);
    animation: callFlash 400ms ease-out 1 both;
  }

  /* History is rebuilt during synchronization, so it must not replay an entry
     effect for numbers that patrons have already seen. */
  body.display-mode .display-history .history-ball {
    animation: none;
  }

  body.display-mode .display-panel.is-round-intro .display-intro-kicker,
  body.display-mode .display-panel.is-round-intro .display-intro-copy h2 {
    animation: patronHeadingIn 280ms ease-out 1 both;
  }

  body.display-mode .display-panel.is-round-intro .display-intro-copy p {
    animation: patronCopyIn 240ms ease-out 1 both;
  }

  body.display-mode .display-panel.is-claim-checking .display-announcement-backdrop {
    background:
      radial-gradient(ellipse at 50% 42%, rgba(59, 130, 246, 0.13), transparent 64%),
      rgba(3, 7, 18, 0.91);
  }

  body.display-mode .display-panel.is-claim-checking .display-bingo-banner:not(.hidden) {
    animation: bingoSlam 620ms cubic-bezier(0.18, 1.1, 0.3, 1) 1;
  }

  body.display-mode .display-panel.is-claim-checking .display-bingo-status:not(.hidden) {
    animation: bingoStatusPop 280ms ease-out 1 both;
  }

  body.display-mode .display-panel.is-winner-confirmed .display-announcement-backdrop {
    background:
      radial-gradient(ellipse at 50% 45%, rgba(251, 191, 36, 0.15), transparent 66%),
      rgba(3, 7, 18, 0.94);
  }

  body.display-mode .display-winner-name:not(.hidden) {
    animation: winnerNameReveal 580ms cubic-bezier(0.16, 1, 0.3, 1) 1 both,
      patronWinnerLight 620ms ease-out 1 both;
  }

  body.display-mode .display-panel.is-cards-released .display-inter-round-message:not(.hidden) {
    animation: announcementIn 280ms ease-out 1 both;
  }

  body.display-mode .display-start-card:not(.hidden) #displayStartMessage {
    animation: patronHeadingIn 300ms ease-out 1 both;
  }

  body.display-mode .display-final-card:not(.hidden) #displayFinalMessage {
    animation: patronWinnerLight 620ms ease-out 1 both;
  }

  /* Wheel: a brief introduction and one light accent around the existing spin.
     Pointer ticks, the latch and canvas rotation retain their existing owners. */
  body.display-mode .wheel-header #wheelHeaderTitle {
    animation: patronHeadingIn 280ms ease-out 1 both;
  }

  body.display-mode .wheel-wrap.is-spinning::before {
    animation: none;
  }

  body.display-mode .wheel-wrap.is-spinning:not(.is-locking):not(.is-locked)::after {
    animation: patronSpinLight 600ms ease-out 1 both;
  }

  body.display-mode .wheel-wrap.is-spinning.is-locked::after {
    animation: none;
  }

  body.display-mode .wheel-wrap.is-spinning:not(.is-pointer-ticking):not(.is-locking):not(.is-locked) .wheel-pointer {
    animation: none;
  }

  body.display-mode .result-modal:not(.hidden) .result-modal-card {
    animation: patronPrizeFrame 620ms ease-out 1 both;
  }

  body.display-mode .result-modal:not(.hidden) .result-modal-card p {
    animation: patronCopyIn 240ms ease-out 1 both;
  }

  body.display-mode .result-modal:not(.hidden) .result-modal-card strong {
    animation: patronWinnerLight 620ms ease-out 1 both;
  }

  /* Trivia's observed cues already suppress duplicates, reconnects, hidden
     displays and low-power hints. Polling or timer ticks cannot start these. */
  body[data-mode="display"][data-presentation-cue="question"] #displayQuestionText,
  body[data-studio-mode="display"][data-presentation-cue="question"] #studioTvPrompt {
    animation: patronHeadingIn 280ms ease-out 1 both;
  }

  body[data-mode="display"][data-presentation-cue="question"] #displayChoiceList .choice-card,
  body[data-studio-mode="display"][data-presentation-cue="question"] #studioTvChoices .studio-choice {
    animation: patronChoiceLight 300ms ease-out 1 both;
  }

  body[data-mode="display"][data-presentation-cue="reveal"] #displayChoiceList .choice-card.is-correct {
    animation: patronAnswerLight 460ms ease-out 1 both;
  }

  body[data-mode="display"][data-presentation-cue="reveal"] #displayRevealMessage,
  body[data-studio-mode="display"][data-presentation-cue="reveal"] #studioTvReveal {
    animation: patronRevealLight 460ms ease-out 1 both;
  }

  body[data-mode="display"][data-presentation-cue="winner"] #displayWinnerLabel,
  body[data-studio-mode="display"][data-presentation-cue="winner"] #studioTvWinner {
    animation: patronWinnerLight 620ms ease-out 1 both;
  }
}

@keyframes currentCallPop {
  0% { transform: translateY(0.025em) scale(0.94); opacity: 0.7; }
  60% { transform: translateY(0) scale(1.02); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes winnerNameReveal {
  from { transform: translate(-50%, -50%) translateY(0.08em) scale(0.97); opacity: 0.75; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes patronHeadingIn {
  from { opacity: 0.72; transform: translateY(0.07em); }
  to { opacity: 1; transform: none; }
}

@keyframes patronCopyIn {
  from { opacity: 0.76; }
  to { opacity: 1; }
}

@keyframes patronChoiceLight {
  0% { box-shadow: inset 0 0 0 1px rgba(141, 189, 255, 0); }
  35% { box-shadow: inset 0 0 0 1px rgba(141, 189, 255, 0.44); }
  100% { box-shadow: inset 0 0 0 1px rgba(141, 189, 255, 0); }
}

@keyframes patronAnswerLight {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(95, 224, 177, 0.25); }
  45% { box-shadow: inset 0 0 0 3px rgba(138, 241, 201, 0.9), 0 0 22px rgba(95, 224, 177, 0.2); }
}

@keyframes patronRevealLight {
  0%, 100% { text-shadow: none; }
  45% { text-shadow: 0 0 18px rgba(138, 241, 201, 0.48); }
}

@keyframes patronWinnerLight {
  0%, 100% { text-shadow: 0 0.045em 0 rgba(251, 191, 36, 0.2); }
  45% { text-shadow: 0 0.045em 0 rgba(251, 191, 36, 0.2), 0 0 0.24em rgba(251, 191, 36, 0.46); }
}

@keyframes patronSpinLight {
  0%, 100% { opacity: 0.35; }
  45% { opacity: 0.92; }
}

@keyframes patronPrizeFrame {
  0%, 100% {
    box-shadow: 0 0 0 0.4rem rgba(255, 189, 69, 0.14), 0 2rem 7rem rgba(0, 0, 0, 0.65);
  }
  45% {
    box-shadow: 0 0 0 0.4rem rgba(255, 189, 69, 0.3), 0 0 2.5rem rgba(255, 189, 69, 0.14), 0 2rem 7rem rgba(0, 0, 0, 0.65);
  }
}

/* Every cue has a static presentation for motion-sensitive or slower displays. */
@media screen and (prefers-reduced-motion: reduce), screen and (update: slow) {
  body.display-mode .caller-shell *,
  body.display-mode .caller-shell *::before,
  body.display-mode .caller-shell *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
  }

  body.display-mode .wheel-page *,
  body.display-mode .wheel-page *::before,
  body.display-mode .wheel-page *::after,
  :is(body[data-mode="display"], body[data-studio-mode="display"]) *,
  :is(body[data-mode="display"], body[data-studio-mode="display"]) *::before,
  :is(body[data-mode="display"], body[data-studio-mode="display"]) *::after {
    animation: none !important;
    transition: none !important;
  }
}

body.display-mode.low-power-display *,
body.display-mode.low-power-display *::before,
body.display-mode.low-power-display *::after,
body[data-mode="display"].low-power-display *,
body[data-studio-mode="display"].low-power-display * {
  animation: none !important;
  transition: none !important;
}
