.wheel-result {
  position: relative;
  isolation: isolate;
  overflow: visible;
  width: min(100%, 390px);
  padding: 18px 16px;
  border: 1px solid #dcebd3;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff 0%, #f4faee 100%);
  box-shadow: 0 8px 24px #2e65251a;
}

.wheel-result::before {
  position: absolute;
  z-index: -1;
  inset: -8px;
  border: 2px solid #8bce4b;
  border-radius: 27px;
  content: "";
  opacity: 0;
  pointer-events: none;
}

.wheel-result.celebrating {
  animation: win-card-burst .62s cubic-bezier(.18, .9, .28, 1.35);
  box-shadow: 0 0 0 6px #8bce4b30, 0 10px 36px #359c2540;
}

.wheel-result.celebrating::before {
  animation: win-ring .95s ease-out;
}

.wheel-result .win-heading {
  color: #286c20;
  font-size: 22px;
  line-height: 1.2;
}

.discount-win {
  display: block;
  margin: 2px 0;
  color: #359c25;
  font-size: clamp(44px, 12vw, 58px);
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
  text-shadow: 0 3px 0 #d9efca;
}

.win-message {
  max-width: 310px;
  margin: 2px 0 4px;
  color: #59655c;
  font-size: 14px;
  line-height: 1.45;
}

.wheel-result.celebrating > .win-heading {
  animation: win-pop .52s cubic-bezier(.18, .9, .28, 1.35);
}

.wheel-result.celebrating .discount-win {
  animation: win-number .72s cubic-bezier(.18, .9, .28, 1.35);
}

.wheel-result.celebrating .button {
  animation: cta-pulse .9s ease-in-out 2;
  box-shadow: 0 5px 0 #24751b, 0 0 0 5px #8bce4b38;
}

.win-sparkle {
  position: absolute;
  z-index: 4;
  top: 28px;
  left: 50%;
  color: #76b82e;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  animation: win-sparkle-burst 1.7s cubic-bezier(.14, .72, .24, 1) forwards;
  text-shadow: 0 1px 10px #b2e66d;
}

.win-sparkle:nth-of-type(3n) {
  color: #f0bf32;
  text-shadow: 0 1px 10px #ffe68e;
}

.win-sparkle:nth-of-type(3n + 1) {
  color: #359c25;
}

.win-sparkle:nth-of-type(4n) {
  font-size: 31px;
}

@keyframes win-sparkle-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.1) rotate(0); }
  14% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--spark-x)), calc(-50% + var(--spark-y))) scale(1.4) rotate(190deg); }
}

@keyframes win-card-burst {
  0% { transform: scale(.86); }
  55% { transform: scale(1.045); }
  100% { transform: scale(1); }
}

@keyframes win-ring {
  0% { opacity: .9; transform: scale(.94); }
  100% { opacity: 0; transform: scale(1.08); }
}

@keyframes win-pop {
  0% { transform: scale(.75); }
  65% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes win-number {
  0% { opacity: 0; transform: scale(.45) rotate(-8deg); }
  70% { opacity: 1; transform: scale(1.12) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes cta-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.055); }
}

@media (prefers-reduced-motion: reduce) {
  .win-sparkle,
  .wheel-result.celebrating,
  .wheel-result.celebrating::before,
  .wheel-result.celebrating > .win-heading,
  .wheel-result.celebrating .discount-win,
  .wheel-result.celebrating .button {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
