.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -16px;
  width: 10px;
  height: 16px;
  background: hsl(var(--hue, 30), 95%, 55%);
  border-radius: 2px;
  transform: translate3d(0, 0, 0) rotate(0);
  animation: confetti-fall var(--duration, 2.4s) cubic-bezier(0.32, 0.72, 0.42, 1) var(--delay, 0s) forwards;
  will-change: transform, opacity;
}

.confetti-piece:nth-child(3n) {
  width: 6px;
  height: 12px;
  border-radius: 50%;
}

.confetti-piece:nth-child(5n) {
  width: 8px;
  height: 4px;
  border-radius: 1px;
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--drift, 0), 115vh, 0) rotate(var(--rotate, 720deg));
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .confetti-piece { animation: none; opacity: 0; }
}