:root { --verified-blue: #0047FF; --verified-yellow: #F7EA25; --verified-pink: #FF2E93; --verified-purple: #8A2BE2; }
#shell { position: relative; isolation: isolate; }

/* Composited light layers: the existing stage artwork stays in place. */
#stage::after { content: ''; position: absolute; z-index: -1; inset: 35% -15% -10%; pointer-events: none; opacity: 0; background: linear-gradient(115deg, transparent 30%, #0047ff33 46%, #ff2e9322 52%, transparent 68%); }
#stage.motion-idle::after { animation: stage-light-sweep 12s ease-in-out infinite; }
#stage.motion-idle::before { animation: stage-ring-drift 12s ease-in-out infinite alternate; }
.game-buttons .start-family { position: relative; isolation: isolate; transition: transform .22s cubic-bezier(.22,1,.36,1); }
.game-buttons .start-family::after { content: ''; position: absolute; z-index: -1; inset: -6px; border: 2px solid var(--verified-yellow); border-radius: 12px; box-shadow: 0 0 22px #f7ea2560; opacity: 0; pointer-events: none; }
.game-buttons .start-family:first-child:not(:disabled)::after { animation: button-breathe 1s ease-in-out infinite; }
.game-buttons .start-family:focus-visible, .game-buttons .start-family:hover { transform: scale(1.04); }
.game-buttons .start-family:active { transform: scale(.98); }

.contestant { position: relative; }
.player-pop { animation: player-pop .45s cubic-bezier(.22,1,.36,1) both; }
.contestant::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle, #f7ea25b3 1.5px, transparent 2px) 0 0 / 9px 9px; }
.player-pop::after { animation: halftone-pop .45s ease-out both; }
.streak { display: flex; align-items: center; gap: 4px; overflow: visible; }
.streak .check-emblem { position: relative; width: clamp(22px,2.7cqw,46px); aspect-ratio: 1; }
.check-emblem .mark { width: 100%; height: 100%; position: relative; z-index: 1; }
.check-emblem::before { content: ''; position: absolute; inset: -35%; opacity: 0; background: repeating-conic-gradient(var(--verified-yellow) 0deg 9deg, transparent 9deg 24deg); border-radius: 50%; }
.check-ignition .check-emblem { animation: check-ignite .65s cubic-bezier(.22,1,.36,1) both; }
.check-ignition .check-emblem::before { animation: check-rays .65s ease-out both; }
.seat-tag .mark { width: 1.3em; height: 1.3em; margin-right: .25em; }
.became-leader .seat-tag { animation: leader-drop .45s cubic-bezier(.22,1,.36,1) both; }
.became-leader .seat-tag::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg,transparent 25%,#ffffffaa 50%,transparent 75%); animation: leader-shine .6s ease-out both; }
.stage-takeover { animation: takeover-in .45s cubic-bezier(.22,1,.36,1) both; }
.takeover-ghost { position: fixed; z-index: 4; pointer-events: none; animation: takeover-out .45s ease-in both; }
.takeover-banner { position: absolute; z-index: 3; left: 6%; right: 6%; bottom: 6%; padding: .45em .3em; text-align: center; color: #0a1030; background: var(--verified-yellow); border: 2px solid #0a1030; box-shadow: 3px 3px #0047ff; font: 400 clamp(12px,1.5cqw,25px)/1.05 var(--display); transform: rotate(-3deg); pointer-events: none; }
.tile-flight { position: fixed; z-index: 8; margin: 0; pointer-events: none; animation: tile-flip .25s ease-in both !important; transform-origin: center; backface-visibility: hidden; }

/* All four options have landed at 250ms: 70ms + three 60ms offsets. */
.question-open .question-glass { animation-duration: .18s; }
.question-open .question-glass::after { animation-duration: .25s; }
.question-open .answer-plate { animation-duration: .07s; animation-delay: var(--answer-delay); }
.plate-0 { --answer-delay: 0s; }
.plate-1 { --answer-delay: .06s; }
.plate-2 { --answer-delay: .12s; }
.plate-3 { --answer-delay: .18s; }
.answer-reveal .answer-plate:not(.correct), .choice.muted-choice { opacity: .4; }
.verified-stamp { position: absolute; z-index: 2; top: -.6em; right: .3em; display: inline-flex; align-items: center; gap: .2em; padding: .23em .45em; color: white; background: var(--verified-blue); border: 2px solid white; border-radius: 4px; box-shadow: 2px 3px #0a1030; font: 400 clamp(10px,1.1cqw,20px)/1 var(--display); letter-spacing: .02em; transform: rotate(-6deg); animation: verified-stamp .28s ease-out both; pointer-events: none; }
.verified-stamp .mark { width: 1.3em; height: 1.3em; }
.answer-plate.correct, .choice.correct { position: relative; }
.countdown.hurry, .timer.hurry { color: #0a1030; background: var(--verified-pink); border-color: var(--verified-yellow); animation: timer-heartbeat .5s ease-in-out infinite; }
.countdown.hurry .time-value, .timer.hurry .time-value { color: var(--verified-yellow); }

.holiday-entrance { position: absolute; z-index: 6; top: 17%; left: 12%; right: 12%; display: grid; justify-items: center; gap: 8px; padding: 1rem; color: white; background: #10183bf5; border: 2px solid var(--verified-yellow); border-radius: 16px; text-align: center; pointer-events: none; animation: holiday-title .4s cubic-bezier(.22,1,.36,1) both; }
.holiday-emblem { position: relative; width: clamp(64px,10vw,150px); aspect-ratio: 1; animation: verified-stamp .3s ease-out both; }
.holiday-emblem .mark { width: 100%; height: 100%; }
.holiday-emblem::before, .holiday-emblem::after { content: ''; position: absolute; inset: -20%; background: radial-gradient(circle, #f7ea25 2px, transparent 3px) 0 0 / 19px 19px; border-radius: 50%; opacity: 0; animation: sparkle-burst .8s ease-out both; }
.holiday-emblem::after { transform: rotate(23deg); animation-delay: .1s; }
.holiday-entrance strong { font: 400 clamp(20px,3vw,48px)/1.1 var(--display); overflow-wrap: anywhere; }
[data-holiday='christmas'] .family-tiles > strong { transform-origin: 50% 0; animation: gift-tag-swing .65s ease-out both; }
.victory-confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 9; pointer-events: none; }
.winner-board { animation: winner-card-in .4s cubic-bezier(.22,1,.36,1) .12s both; }
.champion-actions { display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; }
.champion-download { cursor: pointer; color: #0a1030; background: var(--verified-yellow); border: 2px solid var(--verified-blue); border-radius: 7px; padding: .55em .8em; font: 700 clamp(12px,1.2vw,18px)/1.2 Inter,sans-serif; }
.champion-status { font-size: .75rem; }
.champion-status:empty { display: none; }
@media (min-width:731px) and (max-height:650px) {
  .winner-board { gap: 5px; padding-block: 8px; }
  .winner-board h1 { font-size: clamp(26px,3.4cqw,56px); }
  .winner-board .winner-label .mark { width: 1.5em; }
  .winner-board .winner-credit { font-size: 12px; }
}
.motion-paused *, .motion-paused::before, .motion-paused::after { animation-play-state: paused !important; }

@media (min-width:731px) {
  .seat-wall { display: flex; }
  .seat-wall > .contestant { flex: 1 1 0; transition: flex .45s cubic-bezier(.22,1,.36,1); }
  .seat-wall > .contestant.leading { flex-grow: 1.5; }
}
@keyframes stage-light-sweep { 0%,100% { transform: translateX(-18%); opacity: .2; } 50% { transform: translateX(18%); opacity: .6; } }
@keyframes stage-ring-drift { to { transform: translate3d(2px,-3px,0); } }
@keyframes button-breathe { 0%,100% { opacity: .15; transform: scale(.98); } 50% { opacity: .8; transform: scale(1.02); } }
@keyframes player-pop { 0% { opacity: 0; transform: scale(.6) translateY(-14px); } 65% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes halftone-pop { 0% { opacity: .6; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.2); } }
@keyframes check-ignite { 0% { transform: perspective(300px) rotateY(-270deg) scale(.3); } 70% { transform: perspective(300px) rotateY(12deg) scale(1.15); } 100% { transform: rotateY(0) scale(1); } }
@keyframes check-rays { 0% { opacity: 0; transform: scale(.3) rotate(-30deg); } 35% { opacity: .95; } 100% { opacity: 0; transform: scale(1.3) rotate(25deg); } }
@keyframes leader-drop { from { opacity: 0; transform: translateY(-20px); } }
@keyframes leader-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); opacity: 0; } }
@keyframes takeover-in { from { opacity: .2; transform: translateX(105%); } }
@keyframes takeover-out { to { opacity: 0; transform: translateX(-105%); } }
@keyframes tile-flip { to { opacity: 0; transform: perspective(600px) rotateY(180deg) scale(1.2); } }
@keyframes verified-stamp { 0% { opacity: 0; transform: rotate(-14deg) scale(2); } 65% { opacity: 1; transform: rotate(-6deg) scale(.92); } 100% { transform: rotate(-6deg) scale(1); } }
@keyframes timer-heartbeat { 50% { transform: scale(1.06); background: #861449; } }
@keyframes holiday-title { from { opacity: 0; transform: scale(.8); } }
@keyframes sparkle-burst { 25% { opacity: 1; } to { opacity: 0; transform: scale(1.6) rotate(20deg); } }
@keyframes gift-tag-swing { 20% { transform: rotate(5deg); } 50% { transform: rotate(-4deg); } 75% { transform: rotate(2deg); } }
@keyframes winner-card-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .victory-confetti { display: none; }
}
