
.big-win-sign {
  --plaque: url("../art/big-win/plaque-big.webp");
  --plaque-y: clamp(22px, 6.4vw, 34px);
  margin-block: calc(var(--plaque-y) * 0.72);
  isolation: isolate;
}

.big-win-sign::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(var(--plaque-y) * -0.72) calc(var(--plaque-y) * -0.5);
  border-style: solid;
  border-width: var(--plaque-y) calc(var(--plaque-y) * 1.21);
  border-image: var(--plaque) 86 104 fill / var(--plaque-y) calc(var(--plaque-y) * 1.21) stretch;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

.big-win.huge .big-win-sign { --plaque: url("../art/big-win/plaque-huge.webp"); }
.big-win:is(.mega, .super) .big-win-sign { --plaque: url("../art/big-win/plaque-mega.webp"); }
.big-win.super .big-win-sign::before { filter: hue-rotate(-75deg) saturate(1.35) brightness(1.1) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)); }
.big-win.jackpot.grand .big-win-sign { --plaque: url("../art/big-win/plaque-grand.webp"); }
.big-win.jackpot.major .big-win-sign { --plaque: url("../art/big-win/plaque-major.webp"); }

.big-win.jackpot.scene {
  background: none;
}

.big-win.jackpot.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--big-win-scene) center / cover no-repeat var(--bg-deep);
  opacity: 0.9;
  pointer-events: none;
}

.big-win[data-big-win-family="stampede"] .big-win-amount {
  --count-plate: radial-gradient(120% 140% at 50% 0%, rgba(108, 42, 10, 0.94), rgba(26, 8, 2, 0.96) 70%);
}

.big-win[data-big-win-family="link"] .big-win-amount {
  --count-plate: radial-gradient(120% 140% at 50% 0%, rgba(16, 46, 98, 0.94), rgba(4, 12, 34, 0.96) 70%);
}

.big-win[data-big-win-family="imperial"] .big-win-amount {
  --count-plate: radial-gradient(120% 140% at 50% 0%, rgba(104, 14, 34, 0.94), rgba(28, 3, 12, 0.96) 70%);
}

.big-win[data-big-win-family="mascot"] .big-win-amount {
  --count-plate: radial-gradient(120% 140% at 50% 0%, rgba(14, 76, 42, 0.94), rgba(4, 24, 14, 0.96) 70%);
}

.big-win-amount {
  --count-plate: radial-gradient(120% 140% at 50% 0%, rgba(58, 20, 96, 0.94), rgba(8, 3, 22, 0.96) 70%);
  background-image: var(--sheen, linear-gradient(transparent, transparent)), var(--fill), var(--count-plate);
  background-size: 300% 100%, 100% 100%, 100% 100%;
  background-position: 100% 0, 0 0, 0 0;
  -webkit-background-clip: text, text, padding-box;
  background-clip: text, text, padding-box;
  border: 2px solid var(--gold-dark);
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--gold-deep), inset 0 1px 0 rgba(255, 242, 175, 0.35), 0 0 22px 8px rgba(5, 1, 15, 0.65);
  filter: none;
  text-shadow: none;
}

/* Big coins tumbling round the title from HUGE WIN up and on a jackpot,
   over the rays and under the title and count. Each <i> is a coin's lane
   (the box's height less the coin's), so falling one lane height keeps
   its ::before coin whole inside the box. Data per coin in the markup:
   --x lane (0 to 100), --s size in px (at most 128, a third of the art's
   384px, so sharp at 3x), --t fall in s, --d start in s. Starts stay
   positive: with a negative delay WebKit draws coins see-through
   mid-fall. */
.big-win-shower {
  display: none;
  position: absolute;
  left: 50%;
  top: 3%;
  width: min(100%, 760px);
  height: 70%;
  translate: -50% 0;
  container-type: size;
  pointer-events: none;
}

.big-win:is(.huge, .mega, .super, .jackpot) .big-win-shower {
  display: block;
}

.big-win-shower i {
  --size: min(calc(var(--s) * 1px), calc(var(--s) * 0.25cqh));
  position: absolute;
  top: 0;
  left: calc((100% - var(--size)) * var(--x) / 100);
  width: var(--size);
  height: calc(100% - var(--size));
  opacity: 0;
  pointer-events: none;
  animation: big-win-coin-fall calc(var(--t) * 1s) linear calc(var(--d) * 1s) infinite;
}

.big-win-shower i::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--size);
  background: url("../art/ui/coin-gold.webp") center / contain no-repeat;
  animation: big-win-coin-flip calc(var(--t) * 0.45s) linear calc(var(--d) * 1s) infinite;
}

.big-win:not(.show, .leaving) .big-win-shower i,
.big-win:not(.show, .leaving) .big-win-shower i::before,
body.scene-motion-paused .big-win-shower i,
body.scene-motion-paused .big-win-shower i::before {
  animation-play-state: paused;
}

@keyframes big-win-coin-fall {
  0% { transform: translateY(0); opacity: 0; }
  12%, 86% { opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

@keyframes big-win-coin-flip {
  to { transform: rotateY(1turn); }
}

@media (prefers-reduced-motion: reduce) {
  .big-win:is(.huge, .mega, .super, .jackpot) .big-win-shower {
    display: none;
  }
}
