.celebration { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; padding: 0; overflow: hidden; background: none; color: var(--text); }
.celebration::backdrop { background: radial-gradient(circle at 50% 45%, rgb(34 24 74 / .9), rgb(8 12 30 / .97)); }
.celebration > * { position: absolute; inset: 0; }
.celebration canvas { width: 100%; height: 100%; }
.rays { background: repeating-conic-gradient(rgb(242 189 78 / .13) 0 9deg, transparent 0 18deg); -webkit-mask: radial-gradient(circle, #000, transparent 68%); mask: radial-gradient(circle, #000, transparent 68%); scale: 1.6; animation: celebration-turn 46s linear infinite; }
.sky { perspective: 1100px; transform-style: preserve-3d; pointer-events: none; }
.flyer { position: absolute; left: 0; top: 0; aspect-ratio: 5 / 7; transform-style: preserve-3d; will-change: transform; }
.flyer .card { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 3px 10px rgb(0 0 0 / .45); }
.flyer .card.back { transform: rotateY(180deg); }
.celebration .prize { inset: auto; left: 50%; top: 50%; translate: -50% -50%; display: grid; justify-items: center; gap: .3rem; width: max-content; max-width: 94vw; padding: 1.4rem 2rem; text-align: center; border-radius: 1rem; background: rgb(12 16 40 / .72); box-shadow: 0 0 60px 20px rgb(12 16 40 / .72); }
.celebration h2 { display: flex; margin: 0; font: 700 clamp(3rem, 9vw, 6.2rem)/1 var(--heading); letter-spacing: -.03em; white-space: pre; }
.celebration h2 span { color: #ffd874; text-shadow: 0 .03em 0 #a1621a, 0 .06em 0 #7a4511, 0 .12em .3em rgb(0 0 0 / .6); }
.celebration p { margin: 0; }
.celebration .record { font: 700 1.5rem/1.3 var(--heading); color: var(--target); }
.celebration .record:empty { display: none; }
.celebration .tally { font: 700 2rem/1.2 var(--heading); font-variant-numeric: tabular-nums; }
.celebration .detail { color: var(--muted); }
.celebration .choices { justify-content: center; flex-wrap: wrap; }
.celebration .again { background: var(--action); border-color: var(--action); color: var(--on-action); }
.celebration.lit h2 span { animation: celebration-letter .8s cubic-bezier(.2, 1.9, .4, 1) calc(var(--at) * 70ms + 250ms) backwards, celebration-bob 2.4s ease-in-out calc(var(--at) * 110ms + 1.4s) infinite; }
.celebration.lit .record { animation: celebration-letter .7s cubic-bezier(.2, 1.9, .4, 1) 1.5s backwards; }
.celebration.lit .prize { animation: celebration-rise .5s ease-out backwards; }
.celebration.lit .rays::after { content: ""; position: absolute; inset: 0; background: #fff3c9; animation: celebration-flash .7s ease-out forwards; }
@keyframes celebration-turn { to { rotate: 360deg; } }
@keyframes celebration-letter { from { opacity: 0; transform: translateY(1.1em) scale(.2) rotate(-25deg); } }
@keyframes celebration-bob { 50% { transform: translateY(-.1em); } }
@keyframes celebration-rise { from { opacity: 0; scale: .7; } }
@keyframes celebration-flash { from { opacity: .5; } to { opacity: 0; } }
@media (max-width: 45rem) {
  .celebration .prize { top: auto; bottom: 4vh; translate: -50% 0; padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .celebration *, .celebration *::after { animation: none !important; }
  .celebration.lit .rays::after { display: none; }
}

/* A theme's own show happens in the scene, so nothing hides it. */
.celebration.scenic::backdrop { background: none; }
.celebration.scenic :is(.rays, .sky) { display: none; }
.celebration.scenic .prize { top: max(4rem, 11vh); translate: -50% 0; padding: 1rem 1.8rem; background: rgb(14 22 40 / .8); box-shadow: 0 6px 40px rgb(6 10 24 / .55); }
.celebration.scenic h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.celebration.scenic .tally { font-size: 1.4rem; }
@media (min-width: 60rem) {
  .celebration.scenic .prize { left: 20vw; }
}
@media (max-width: 45rem) {
  .celebration.scenic .prize { top: 7rem; bottom: auto; padding: .7rem 1rem; gap: .1rem; }
  .celebration.scenic h2 { font-size: 1.9rem; }
  .celebration.scenic .record { font-size: 1.1rem; }
  .celebration.scenic .tally { font-size: 1.1rem; }
  .celebration.scenic .choices { margin-top: .5rem; flex-wrap: nowrap; }
  .celebration.scenic .choices button { padding-inline: .6rem; font-size: .9rem; white-space: nowrap; }
}
@media (max-height: 30rem) {
  .celebration.scenic .prize { top: 3rem; padding: .5rem 1.2rem; gap: 0; }
  .celebration.scenic h2 { font-size: 1.8rem; }
}
