/* Finishes belong to the previewed artwork, never the enclosing product card. */
body[data-arcade-shell] [data-finish-level] { --finish-duration: 12s; }
body[data-arcade-shell] [data-finish-level="3"] { --finish-duration: 10s; }
body[data-arcade-shell] [data-finish-level="4"] { --finish-duration: 9s; }
body[data-arcade-shell] [data-finish-level="5"],
body[data-arcade-shell] [data-finish-level="6"] { --finish-duration: 8s; }
.cosmetic-lustre {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 6;
  /* A quiet edge finish leaves numbers, portraits and artwork readable. */
  mask-image: linear-gradient(#000,#000),linear-gradient(#000,#000);
  mask-clip: border-box,content-box;
  mask-composite: exclude;
  padding: 3px;
}
.cosmetic-lustre::after {
  content: '';
  position: absolute;
  inset: -60%;
  background: linear-gradient(110deg,transparent 40%,var(--finish-color) 49%,#fff5dc 50%,transparent 56%);
  opacity: .7;
  transform: translateX(-70%);
  animation: cosmetic-polish var(--finish-duration,12s) cubic-bezier(.4,0,.2,1) infinite;
}
.cosmetic-aura {
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
  background: conic-gradient(from 0deg,transparent 0deg,var(--finish-color) 35deg,transparent 70deg 180deg,#fff4dc 210deg,transparent 245deg);
  mask-image: radial-gradient(circle,transparent 61%,#000 62% 64%,transparent 66%);
  opacity: .55;
  animation: cosmetic-orbit 18s linear infinite;
}
body[data-arcade-shell] .border-phantom-crown > .cosmetic-aura {
  /* The gothic frame supplies its own silhouette; no detached circular halo. */
  display: none;
}
body[data-arcade-shell] .phantom-victory[data-finish-level] {
  animation: none;
  box-shadow: inset 0 0 28px #160a26aa,0 3px 12px #0004;
  border-color: #cda6e5;
}
body[data-arcade-shell] .phantom-victory[data-finish-level] .phantom-banner-copy {
  position: relative;
  z-index: 3;
  animation: none;
  filter: none;
  text-align: center;
}
body[data-arcade-shell] .phantom-victory[data-finish-level] .phantom-bingo {
  animation: cosmetic-victory 8s cubic-bezier(.22,.61,.36,1) infinite;
  filter: none;
  transform-origin: center;
  text-shadow: 0 2px 1px #38163f,0 0 14px #eab77955;
}
body[data-arcade-shell] .phantom-victory[data-finish-level] .phantom-name {
  animation: none;
  filter: none;
  text-shadow: 0 2px 5px #16051f;
}
body[data-arcade-shell] [data-finish-level] .haunted-fog {
  animation: cosmetic-mist 18s ease-in-out infinite alternate;
  opacity: .32;
}
body[data-arcade-shell] [data-finish-level] .haunted-spirit {
  animation-duration: 9s;
  opacity: .65;
}
body[data-arcade-shell] [data-finish-level] .haunted-spirit.spirit-right {
  animation-delay: -4.5s;
}
body[data-arcade-shell] [data-finish-level] .haunted-flying-bat {
  animation-duration: 14s;
}
body[data-arcade-shell] .haunted-audio-preview[data-finish-level] i {
  transform-origin: center;
  animation: cosmetic-audio 2.4s ease-in-out infinite;
}
body[data-arcade-shell] .haunted-audio-preview[data-finish-level] i:nth-of-type(2) { animation-delay: -.48s; }
body[data-arcade-shell] .haunted-audio-preview[data-finish-level] i:nth-of-type(3) { animation-delay: -.96s; }
body[data-arcade-shell] .haunted-audio-preview[data-finish-level] i:nth-of-type(4) { animation-delay: -1.44s; }
body[data-arcade-shell] .haunted-audio-preview[data-finish-level] i:nth-of-type(5) { animation-delay: -1.92s; }
body[data-arcade-shell] .haunted-pack-preview[data-finish-level] .haunted-marker-svg {
  animation-duration: 7s;
}
body[data-arcade-shell] .haunted-pack-preview[data-finish-level] .haunted-marker-grid > :nth-child(3n+2) .haunted-marker-svg { animation-delay: -2.3s; }
body[data-arcade-shell] .haunted-pack-preview[data-finish-level] .haunted-marker-grid > :nth-child(3n) .haunted-marker-svg { animation-delay: -4.6s; }
body[data-arcade-shell] [data-finish-visible="false"],
body[data-arcade-shell] [data-finish-visible="false"] *,
body[data-arcade-shell] [data-finish-visible="false"] *::before,
body[data-arcade-shell] [data-finish-visible="false"] *::after {
  animation-play-state: paused !important;
}
@keyframes cosmetic-polish {
  0%,65% { transform: translateX(-70%); opacity: 0; }
  72% { opacity: .65; }
  92%,100% { transform: translateX(70%); opacity: 0; }
}
@keyframes cosmetic-orbit { to { transform: rotate(360deg); } }
@keyframes cosmetic-mist { from { transform: translateX(-3%); } to { transform: translateX(3%); } }
@keyframes cosmetic-victory {
  0%,8% { opacity: .8; transform: translateY(3px) scale(.97); }
  16%,85% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: .8; transform: translateY(3px) scale(.97); }
}
@keyframes cosmetic-audio { 0%,100% { transform: scaleY(.5); opacity: .55; } 50% { transform: scaleY(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  body[data-arcade-shell] [data-finish-level],
  body[data-arcade-shell] [data-finish-level] *,
  body[data-arcade-shell] [data-finish-level] *::after { animation: none !important; }
}
body[data-animation="OFF"] [data-finish-level] *,
html[data-vf-motion="off"] [data-finish-level] * { animation: none !important; }
body[data-arcade-shell] [data-finish-level="6"] > .cosmetic-lustre::after {
  background: linear-gradient(110deg,transparent 35%,#c697f388 44%,#fff1cd 49%,#91e5dcaa 53%,transparent 62%);
}
body[data-arcade-shell] [data-finish-level="5"] > .cosmetic-lustre { padding: 4px; }
body[data-arcade-shell] [data-finish-level="6"] > .cosmetic-aura {
  background: conic-gradient(transparent,#b89aff,transparent 25%,#9be7dd,transparent 50%,#ffe3b2,transparent 75%,#dda4f3,transparent);
  animation-duration: 24s;
}
body[data-cosmetic-paused="true"] [data-finish-level],
body[data-cosmetic-paused="true"] [data-finish-level] *,
body[data-cosmetic-paused="true"] [data-finish-level] *::after { animation-play-state: paused !important; }
body[data-arcade-shell] .phantom-victory[data-finish-level] .spectral-confetti { opacity: .22; }
body[data-arcade-shell] .phantom-victory[data-finish-level] .phantom-fireworks { opacity: .35; }
body[data-arcade-shell] .phantom-victory[data-finish-level] .phantom-flames { opacity: .3; }
body[data-arcade-shell] #modal .collectors-limited-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid #bfa5cd66;
  border-radius: 7px;
  background: #30263b;
  color: #e4d9ee;
  box-shadow: none;
  font: 600 11px/1.4 system-ui;
  letter-spacing: .02em;
  animation: none;
}
body[data-arcade-shell] #modal .collectors-limited-badge::before,
body[data-arcade-shell] #modal .collectors-limited-badge::after { display: none; }
body[data-arcade-shell] #modal .collector-crest { width: 14px; height: 16px; filter: none; }
/* Small catalogue previews use lighter effects than the full-size inspector. */
body[data-arcade-shell] .thumbnail-native .haunted-spirit,
body[data-arcade-shell] .thumbnail-native .haunted-marker-svg { filter: none; }
body[data-arcade-shell] .thumbnail-native .phantom-fireworks,
body[data-arcade-shell] .thumbnail-native .spectral-confetti { display: none; }
body[data-arcade-shell] [data-finish-visible="true"] > .cosmetic-aura { will-change: transform; }
body[data-animation="OFF"] [data-finish-level] *::after,
html[data-vf-motion="off"] [data-finish-level] *::after { animation: none !important; }
body[data-arcade-shell] #cosmeticStage[data-motion="reduced"] [data-finish-level] *,
body[data-arcade-shell] #cosmeticStage[data-motion="reduced"] [data-finish-level] *::after { animation: none !important; }
