/* UR keeps the shared opening timeline; only the foil, light and particles change. */
.play-screen[data-rarity-tier="ur"] .sr-reveal-light {
  background: conic-gradient(from 20deg, #ff83c500, #ff83c580, #ffe99690, #83f4dc90, #8bbdff90, #ed94ff80, #ff83c500);
  -webkit-mask-image: radial-gradient(ellipse, #000 8%, transparent 68%);
  mask-image: radial-gradient(ellipse, #000 8%, transparent 68%);
}

.play-screen[data-rarity-tier="ur"] .sr-reveal-seam {
  background: linear-gradient(90deg, transparent, #ff8ece, #ffe8a0, #b2ffe1, #a6ceff, #efabff, transparent);
  box-shadow: 0 0 18px 5px #c5eaff88;
}

.play-screen[data-rarity-tier="ur"].is-sr-reveal .capsule-sr-glow,
.play-screen[data-rarity-tier="ur"].is-opening .capsule-open,
.result-panel[data-rarity-tier="ur"] .result-open-capsule {
  filter: hue-rotate(120deg) drop-shadow(0 0 16px #c1eaff99);
}

.play-screen[data-rarity-tier="ur"] .sr-reveal-particles i {
  background: #a8edff;
  box-shadow: 0 0 9px 2px #a8edff99;
}
.play-screen[data-rarity-tier="ur"] .sr-reveal-particles i:nth-child(3n) { background: #ff9bda; }
.play-screen[data-rarity-tier="ur"] .sr-reveal-particles i:nth-child(3n + 1) { background: #fff2a8; }

.result-panel[data-rarity-tier="ur"] {
  --rarity-main: #ff86c4;
  --rarity-deep: #8058aa;
  --rarity-accent: #adfff1;
  --rarity-hot: #ffffff;
  --result-glow: #e7ceff99;
  --result-ray-opacity: 0.4;
  --result-spark-opacity: 0.9;
  background: linear-gradient(135deg, #542958e8, #236a87dc 40%, #5c527fdf 65%, #963e6de0);
}

.result-panel[data-rarity-tier="ur"]::after {
  background: repeating-conic-gradient(from 0deg, transparent 0deg 9deg, #ffa4df 10deg 12deg,
    transparent 13deg 29deg, #c4fff4 30deg 32deg, transparent 33deg 49deg, #fff0a9 50deg 52deg, transparent 53deg 60deg);
  animation-duration: 18s;
}

.result-panel[data-rarity-tier="ur"] .prize-rarity {
  animation: result-rarity-slam 0.55s 0.48s cubic-bezier(0.18, 0.88, 0.23, 1.25) both,
    ur-badge-luster 4s 1.8s ease-in-out infinite;
}

/* Match the contained sticker's alpha, so the moving sheen never becomes a rectangle. */
.prize-sticker[data-rarity-tier="ur"]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  -webkit-mask: var(--prize-mask) center / contain no-repeat;
  mask: var(--prize-mask) center / contain no-repeat;
  background: linear-gradient(112deg, transparent 30%, #a5faff44 40%, #fff9dbaa 47%, #ffffffcc 50%, #ffb1ed66 54%, transparent 64%);
  background-size: 300% 100%;
  mix-blend-mode: screen;
  opacity: 0;
  animation: ur-foil-sweep 4.8s 2.1s ease-in-out infinite;
}

@keyframes ur-foil-sweep {
  0% { background-position: 100% 0; opacity: 0; }
  18% { opacity: 0.55; }
  56% { background-position: 0% 0; opacity: 0.55; }
  72%, 100% { background-position: 0% 0; opacity: 0; }
}
@keyframes ur-badge-luster {
  0%, 100% { filter: drop-shadow(0 0 12px #ffa1df88) brightness(1); }
  50% { filter: drop-shadow(0 0 18px #a5fff1aa) brightness(1.13); }
}

@media (prefers-reduced-motion: reduce) {
  .prize-sticker[data-rarity-tier="ur"]::after { animation: none; opacity: 0; }
  .result-panel[data-rarity-tier="ur"] .prize-rarity { animation: none; transform: translateX(-50%); }
  .result-panel[data-rarity-tier="ur"]::before,
  .result-panel[data-rarity-tier="ur"]::after,
  .result-panel[data-rarity-tier="ur"] .result-fx * { animation: none; }
}
