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

.independence-confetti-container.is-active {
  display: block;
}

.independence-confetti-piece {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 12px;
  opacity: 0.9;
  animation: independence-confetti-fall var(--duration, 4s) ease-out forwards;
  animation-delay: var(--delay, 0s);
  transform-origin: left top;
}

.independence-confetti-piece.is-rect {
  border-radius: 2px;
}

.independence-confetti-piece.is-circle {
  border-radius: 50%;
}

.independence-confetti-piece.is-strip {
  width: 6px;
  height: 16px;
}

.independence-confetti-piece.is-blast {
  top: auto;
  bottom: 0;
  width: 10px;
  height: 10px;
  animation: independence-confetti-blast var(--duration, 3s) ease-out forwards;
}

.independence-confetti-piece.is-blast-left {
  left: 0;
}

.independence-confetti-piece.is-blast-right {
  right: 0;
  left: auto;
}

.independence-confetti-piece.is-gold {
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.75);
}

.independence-confetti-piece.is-silver {
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.85);
}

@keyframes independence-confetti-fall {
  0% {
    transform: rotateZ(0deg) translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: rotateZ(720deg) translate(var(--drift, 0px), 110vh);
    opacity: 0.2;
  }
}

@keyframes independence-confetti-blast {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  45% {
    transform: translate(calc(var(--blast-x) * 0.55), var(--blast-y)) rotate(calc(var(--blast-rotate) * 0.45));
    opacity: 1;
  }
  100% {
    transform: translate(var(--blast-x), calc(var(--blast-y) + 25vh)) rotate(var(--blast-rotate));
    opacity: 0;
  }
}
