.surprise-host {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  background: none;
  border: 0;
}

.surprise-burst,
.surprise-ribbons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.surprise-message {
  position: absolute;
  top: 14px;
  left: 3.4rem;
  right: 3.4rem;
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #f6d9a6;
  font-family: inherit;
  font-size: clamp(12px, 2.8vw, 16px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .08em;
  text-align: center;
  text-shadow: 0 1px 3px #39281ac9, 0 0 12px #2f241855;
  pointer-events: none;
  animation: surprise-message-float 4500ms ease-out both;
}

.surprise-piece {
  position: absolute;
  top: 5%;
  left: var(--surprise-left);
  width: 5px;
  height: 14px;
  border: 0;
  border-radius: 1px;
  background: var(--surprise-color);
  opacity: 0;
  pointer-events: none;
  animation: surprise-ribbon-fall var(--surprise-duration) cubic-bezier(.2, .5, .45, 1) var(--surprise-delay) both;
}

.surprise-piece:nth-child(3n) { width: 3px; height: 18px; }
.surprise-piece:nth-child(3n + 1) { width: 7px; height: 8px; }

@keyframes surprise-ribbon-fall {
  0% { opacity: 0; transform: translate3d(0, -18px, 0) rotate(0deg); }
  12% { opacity: .85; }
  45% { transform: translate3d(var(--surprise-sway), calc(var(--surprise-fall) * .36), 0) rotate(calc(var(--surprise-spin) * .42)); }
  76% { opacity: .7; }
  100% { opacity: 0; transform: translate3d(var(--surprise-drift), var(--surprise-fall), 0) rotate(var(--surprise-spin)); }
}

@keyframes surprise-message-float {
  0% { opacity: 0; transform: translateY(5px); }
  9%, 75% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes surprise-message-quiet {
  0%, 100% { opacity: 0; }
  8%, 88% { opacity: 1; }
}

.surprise-burst[data-reduced="true"] .surprise-message {
  animation: surprise-message-quiet 2600ms ease-out both;
}

@media (max-width: 420px) {
  .surprise-message { top: 16px; left: 3.2rem; right: 3.2rem; letter-spacing: .03em; }
  .surprise-piece { width: 4px; height: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .surprise-ribbons { display: none; }
  .surprise-message { animation: surprise-message-quiet 2600ms ease-out both; transform: none; }
}
