@keyframes assemble {
  from { opacity: 0; transform: translate(var(--from-x), var(--from-y)) rotate(var(--from-tilt)); }
  20% { opacity: .85; }
  to { opacity: 1; transform: translate(0, 0) rotate(0); }
}
.piece { transform-origin: center; transform-box: fill-box; animation: assemble 1.4s cubic-bezier(.2,.73,.23,1) both; }
.piece-left { --from-x: -42px; --from-y: -20px; --from-tilt: -11deg; }
.piece-right { --from-x: 44px; --from-y: -19px; --from-tilt: 10deg; animation-delay: .1s; }
.piece-bottom { --from-x: 3px; --from-y: 34px; --from-tilt: -7deg; animation-delay: .19s; }
@keyframes appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.cover-action { animation: appear .45s 1.63s both; }
@keyframes cover-out { to { opacity: 0; transform: scale(1.015); } }
.cover.is-leaving { pointer-events: none; animation: cover-out .66s ease-in-out both; }
@keyframes interior-in { from { opacity: 0; } to { opacity: 1; } }
#interior.is-entering { animation: interior-in .8s ease-out both; }
.reveal.is-pending { opacity: 0; transform: translateY(15px); }
.reveal { transition: opacity .6s ease, transform .65s cubic-bezier(.23,.67,.25,1); }
@keyframes twinkle {
  from { opacity: calc(var(--opacity) * .5); transform: translateY(2px); }
  to { opacity: var(--opacity); transform: translateY(-4px); }
}
.sparkle { animation: twinkle var(--period, 6s) var(--delay, 0s) ease-in-out infinite alternate; }
.viewer[open] .viewer-content { animation: appear .26s ease-out both; }
.viewer.is-closing .viewer-content { animation: appear .2s ease-in reverse both; }
@keyframes final-glow {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  40% { text-shadow: 0 0 22px #f5c9e3b3; }
}
@keyframes final-sparks {
  0%, 100% { opacity: 1; }
  42% { opacity: .68; transform: translateY(-7px) scale(1.025); filter: brightness(1.8); }
}
.finale.is-complete h2 { animation: final-glow 2s ease-out; }
.finale.is-complete .final-sky { animation: final-sparks 2s ease-out; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important; animation-delay: 0ms !important;
    animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important;
  }
  .reveal.is-pending { opacity: 1; transform: none; }
}