#ambient-snow {
  position: fixed;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

#ambient-snow span {
  position: absolute;
  top: 0;
  width: var(--flake-size);
  height: var(--flake-size);
  border: 1px solid #fdfdf5;
  border-radius: 50%;
  background: #90a38a;
  opacity: .45;
  animation: santa-snow var(--fall-duration) var(--fall-delay) linear infinite;
}

#ambient-snow span:nth-child(3n) { opacity: .63; }

@keyframes santa-snow {
  from { transform: translate3d(0, -10px, 0); }
  to { transform: translate3d(var(--fall-drift), calc(100dvh + 10px), 0); }
}

@media (prefers-reduced-motion: no-preference) {
  .garland > span { animation: santa-twinkle 5.2s ease-in-out infinite; }
  .garland > span:nth-child(2n) { animation: santa-twinkle 7.1s -3.9s ease-in-out infinite; }
  .garland > span:nth-child(3n) { animation: santa-twinkle 6.3s -1.7s ease-in-out infinite; }
  .garland > span:nth-child(3n + 1) { animation: santa-twinkle 5.7s -.2s ease-in-out infinite; }

  @keyframes santa-twinkle {
    0%, 36%, 100% { opacity: .52; }
    48%, 68% { opacity: 1; }
  }

  .table-scene[data-drawing] .table-seats {
    animation: santa-orbit var(--draw-duration, 1800ms) cubic-bezier(.35, .04, .2, 1) both;
  }

  .table-scene[data-drawing] .seat {
    transform-origin: 50% 21px;
    animation: santa-counter-orbit var(--draw-duration, 1800ms) cubic-bezier(.35, .04, .2, 1) both;
  }

  .table-scene[data-drawing] .seat .avatar { animation: none; }

  @keyframes santa-orbit {
    from { transform: rotate(0); }
    to { transform: rotate(360deg); }
  }

  @keyframes santa-counter-orbit {
    from { transform: translate(-50%, -21px) rotate(0); }
    to { transform: translate(-50%, -21px) rotate(-360deg); }
  }
}

@media (prefers-reduced-motion: reduce) {
  #ambient-snow { display: none; }
  #ambient-snow span { animation: none; }
}
