/* Keep the first paint and the long ceremonies on composited transform layers. */
.opening-dialog::backdrop{backdrop-filter:none;background:#020407ee}
.opening-dialog .theater-halo,.opening-dialog .prism-vortex{filter:none}
.opening-dialog #openingParticles{pointer-events:none}
.opening-dialog.phase-arrival .prism-vortex,.opening-dialog.phase-sealed .prism-vortex{animation:none}
.opening-dialog.phase-awakening .theater-pack{animation:pack-awaken var(--charge-duration,1.5s) ease-in-out both}
.opening-dialog.phase-awakening .theater-halo{animation:charge-halo var(--charge-duration,1.5s) ease-out both}
.opening-dialog.phase-awakening .theater-ring{animation:charge-ring 1.8s ease-out both}
.opening-dialog[data-pack-rarity=C] .theater-ring,.opening-dialog[data-pack-rarity=UC] .ring-two{display:none}
.opening-dialog[data-pack-rarity=R].phase-awakening .ring-two{border-radius:10%;animation:charge-diamond 1.2s ease-out both}
.opening-dialog[data-pack-rarity=SR].phase-awakening .ring-two{border-radius:0;animation:charge-diamond 1.8s ease-out both}
@keyframes pack-awaken{0%{transform:translate(-50%,-50%) rotate(-1deg)}70%{transform:translate(-50%,calc(-50% - 14px)) rotate(-1deg) scale(1.035)}100%{transform:translate(-50%,calc(-50% - 18px)) rotate(-1deg) scale(1.04)}}
@keyframes charge-halo{from{opacity:.1;transform:scale(.6)}to{opacity:.8;transform:scale(1.1)}}
@keyframes charge-ring{from{opacity:0;scale:.5}to{opacity:.65;scale:1}}
@keyframes charge-diamond{from{opacity:0;rotate:0deg;scale:.5}to{opacity:.65;rotate:135deg;scale:1}}
#rareSpotlight .ceremony-shards,#rareSpotlight .ceremony-frame{display:none}
#rareSpotlight .spotlight-flash{filter:none}
#rareSpotlight .rarity-scene{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:0;contain:strict}
#rareSpotlight .rarity-scene i{position:absolute;display:none;font-style:normal}
/* SSR: two architectural gates separate, opening a passage behind the card. */
#rareSpotlight[data-rarity=SSR] .scene-gate{display:block;top:12%;bottom:14%;width:min(22vw,190px);border:1px solid #e8cf8266;background:linear-gradient(90deg,#a7883b0b,#e8cf8220);box-shadow:inset 0 0 0 8px #080b1290;animation:gate-open 3.2s cubic-bezier(.2,.7,.2,1) both}
#rareSpotlight .scene-gate-left{right:50%;--gate-direction:-1}
#rareSpotlight .scene-gate-right{left:50%;--gate-direction:1}
@keyframes gate-open{0%{opacity:0;transform:translateX(0) scaleY(.7)}20%{opacity:1;transform:translateX(0) scaleY(1)}100%{opacity:.65;transform:translateX(calc(var(--gate-direction)*85%)) scaleY(1)}}
#rareSpotlight[data-rarity=SSR] .spotlight-orbit{animation:ssr-arrival 2s ease-out both;border-radius:8%;rotate:45deg;width:min(66vw,58svh,510px)}
/* UR: a dark sun crosses the corona, then rises to uncover the card. */
#rareSpotlight[data-rarity=UR] .scene-eclipse{display:block;left:50%;top:44%;width:min(55vw,45svh,390px);aspect-ratio:1;border-radius:50%;background:#080b13;border:2px solid #ffb7a5;box-shadow:0 0 42px #ff956044,0 0 0 18px #f28f6410;animation:eclipse-converge 4.4s ease-in-out both}
#rareSpotlight[data-rarity=UR] .spotlight-orbit{width:min(75vw,65svh,580px);animation:ur-seal 12s linear infinite}
#rareSpotlight[data-rarity=UR][data-stage=card] .scene-eclipse{animation:eclipse-rise 1.4s ease-out both}
@keyframes eclipse-converge{0%{opacity:0;transform:translate(-15%,-65%) scale(.65)}35%{opacity:1}75%,100%{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@keyframes eclipse-rise{from{opacity:1;transform:translate(-50%,-50%) scale(1)}to{opacity:0;transform:translate(-50%,-90%) scale(1.25)}}
/* LR: a starfield opens in depth; the horizon unfolds before the card arrives. */
#rareSpotlight[data-rarity=LR] .scene-stars{display:block;inset:8%;background-image:radial-gradient(circle,#fffbe8 0 1px,transparent 2px),radial-gradient(circle,#8ee8ed 0 1px,transparent 2px),radial-gradient(circle,#f2ce86 0 1px,transparent 2px);background-size:79px 113px,137px 83px,191px 157px;background-position:0 0,27px 43px,87px 13px;animation:galaxy-depth 5.8s ease-out both}
#rareSpotlight[data-rarity=LR] .scene-horizon{display:block;left:10%;right:10%;top:47%;height:2px;background:#e5fff5;box-shadow:0 0 30px 5px #a6efff55;animation:horizon-unfold 5.8s ease-in-out both}
#rareSpotlight[data-rarity=LR] .spotlight-orbit{width:min(80vw,72svh,650px);animation:lr-rings 16s linear infinite}
#rareSpotlight[data-rarity=LR][data-stage=card] .scene-horizon{animation:horizon-recede 1.8s ease-out both}
@keyframes galaxy-depth{0%{opacity:0;transform:scale(.35) rotate(-12deg)}35%{opacity:.5}100%{opacity:.85;transform:scale(1.15) rotate(0)}}
@keyframes horizon-unfold{0%,20%{opacity:0;transform:scaleX(.02)}45%{opacity:1;transform:scaleX(.25)}75%{opacity:1;transform:scaleX(1)}100%{opacity:.6;transform:scaleX(1) scaleY(2)}}
@keyframes horizon-recede{from{opacity:.8;transform:scaleX(1)}to{opacity:0;transform:scaleX(1.4) translateY(100px)}}
/* Card faces stay still while the ceremony moves behind them. */
#rareSpotlight #spotlightCard .card-face,#rareSpotlight #spotlightCard .card-face *{animation:none!important;backdrop-filter:none!important}
#rareSpotlight[data-stage=card] #spotlightCard{animation:cinema-card-arrive 1.1s cubic-bezier(.16,.8,.2,1) both}
@keyframes cinema-card-arrive{from{opacity:0;transform:translateY(32px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:600px){#rareSpotlight .spotlight-rays i:nth-child(even){display:none}#rareSpotlight[data-rarity=LR] .scene-stars{inset:15%;background-size:97px 137px,151px 113px,211px 173px}}
.opening-paused .rarity-scene i{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.opening-dialog .rarity-scene{display:none}.opening-dialog.phase-awakening *{animation:none!important}}
/* Rotate around the centered portal rather than rotating its translation. */
#rareSpotlight[data-rarity=SSR] .spotlight-orbit{rotate:none;animation:portal-frame 2s ease-out both}
#rareSpotlight[data-rarity=UR] .spotlight-orbit{rotate:none;animation:corona-centered 12s linear infinite}
#rareSpotlight[data-rarity=LR] .spotlight-orbit{rotate:none;animation:galaxy-centered 16s linear infinite}
@keyframes portal-frame{from{opacity:0;transform:translate(-50%,-50%) rotate(45deg) scale(.6)}to{opacity:.6;transform:translate(-50%,-50%) rotate(45deg) scale(1)}}
@keyframes corona-centered{from{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}
@keyframes galaxy-centered{from{transform:translate(-50%,-50%) rotateX(35deg) rotateZ(0)}to{transform:translate(-50%,-50%) rotateX(35deg) rotateZ(-360deg)}}

/* The seal has already torn during anticipation; do not restore its controls. */
.phase-awakening .tear-seal,.phase-awakening .tear-button,.phase-awakening .foil-top,.phase-awakening .torn-seal{opacity:0;pointer-events:none;transition:none}

/* Distinct silhouettes: UR spreads twelve solar feathers; LR assembles an octagonal vault.
   The previous full-screen rotating rays are replaced, rather than stacked. */
#rareSpotlight .scene-wings,#rareSpotlight .scene-vault,#rareSpotlight .scene-warp,#rareSpotlight .scene-sigil{display:none;position:absolute;pointer-events:none}
#rareSpotlight:is([data-rarity=UR],[data-rarity=LR]) .spotlight-rays,
#rareSpotlight:is([data-rarity=UR],[data-rarity=LR]) .spotlight-orbit{display:none}
#rareSpotlight:is([data-rarity=UR],[data-rarity=LR]) .spotlight-flash{animation:none;opacity:0}
#rareSpotlight:is([data-rarity=UR],[data-rarity=LR]) .spotlight-heading{z-index:3}
#rareSpotlight[data-rarity=UR]{background:radial-gradient(ellipse at 50% 46%,#32171b 0%,#100e17 45%,#070b14 80%)}
#rareSpotlight[data-rarity=UR] .scene-wings{display:block;inset:0;perspective:900px}
#rareSpotlight .scene-wings>span{position:absolute;left:50%;top:47%;width:min(37vw,44svh,420px);height:min(11vw,13svh,120px);transform-origin:0 50%;background:linear-gradient(175deg,#fff6d8 0%,#ffcc8777 9%,#ff967e44 35%,#b83b5022 70%,transparent);clip-path:polygon(0 46%,100% 0,83% 33%,97% 38%,63% 59%,74% 64%,0 55%);animation:solar-feather 4.4s cubic-bezier(.16,.8,.2,1) both;animation-delay:calc(var(--blade)*90ms)}
#rareSpotlight[data-rarity=UR] .scene-eclipse{width:min(40vw,34svh,290px);border:1px solid #ffe8bd;box-shadow:0 0 28px #ff98664d,0 0 0 12px #ffad7b12;animation:solar-eclipse 4.4s ease-in-out both}
#rareSpotlight[data-rarity=UR] .scene-sigil{display:grid;place-items:center;left:50%;top:46%;width:min(48vw,42svh,350px);aspect-ratio:1;border:1px solid #ffcba455;border-radius:50%;transform:translate(-50%,-50%);animation:solar-sigil 4.4s ease-out both}
#rareSpotlight .scene-sigil::before,#rareSpotlight .scene-sigil::after{content:'';position:absolute;inset:8%;border:1px solid #ffccaa66;transform:rotate(45deg)}
#rareSpotlight .scene-sigil::after{inset:19%;transform:rotate(0)}
#rareSpotlight .scene-sigil>span{color:#fff1c8;font-size:clamp(36px,8vw,80px)}
#rareSpotlight[data-rarity=UR][data-stage=card] .scene-wings>span{animation:solar-wing-hold 4.6s ease-out both}
#rareSpotlight[data-rarity=UR][data-stage=card] .scene-eclipse{animation:eclipse-split 1.2s ease-out both}
#rareSpotlight[data-rarity=UR][data-stage=card] .scene-sigil{animation:solar-crown 1.4s ease-out both}
@keyframes solar-feather{0%,8%{opacity:0;transform:scaleX(var(--side)) rotate(-80deg) scale(.08)}35%{opacity:.9}70%,100%{opacity:.75;transform:scaleX(var(--side)) rotate(calc(-62deg + var(--blade)*23deg)) scale(1)}}
@keyframes solar-wing-hold{from{opacity:.8;transform:scaleX(var(--side)) rotate(calc(-62deg + var(--blade)*23deg)) scale(1)}to{opacity:.5;transform:scaleX(var(--side)) rotate(calc(-68deg + var(--blade)*25deg)) scale(1.12)}}
@keyframes solar-eclipse{0%{opacity:0;transform:translate(-50%,-50%) scale(1.4)}25%,65%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:1;transform:translate(-50%,-50%) scale(.86)}}
@keyframes solar-sigil{0%,35%{opacity:0;transform:translate(-50%,-50%) rotate(-60deg) scale(.3)}80%,100%{opacity:1;transform:translate(-50%,-50%) rotate(0) scale(1)}}
@keyframes eclipse-split{from{opacity:1;transform:translate(-50%,-50%) scale(.86)}to{opacity:0;transform:translate(-50%,-50%) scale(1.7)}}
@keyframes solar-crown{from{opacity:1;transform:translate(-50%,-50%) scale(1)}to{opacity:.15;transform:translate(-50%,-50%) scale(1.65)}}

#rareSpotlight[data-rarity=LR]{background:radial-gradient(ellipse at 50% 45%,#172f43 0%,#0b1428 45%,#040811 85%)}
#rareSpotlight[data-rarity=LR] .scene-horizon{display:none}
#rareSpotlight[data-rarity=LR] .scene-vault{display:block;left:50%;top:46%;width:min(76vw,72svh,640px);aspect-ratio:1;transform:translate(-50%,-50%);perspective:900px}
#rareSpotlight .scene-vault>span{position:absolute;left:10%;top:10%;width:80%;height:80%;border:1px solid #b5f7efaa;border-right-color:#edc680;border-bottom-color:#91bfff55;border-radius:18%;background:linear-gradient(135deg,#b7f6f607,transparent 40%);animation:vault-assemble 5.8s cubic-bezier(.16,.7,.2,1) both;animation-delay:calc(var(--segment)*75ms)}
#rareSpotlight[data-rarity=LR] .scene-warp{display:block;inset:0;overflow:hidden}
#rareSpotlight .scene-warp>span{position:absolute;left:50%;top:46%;height:2px;width:min(40vw,45svh);transform-origin:0 50%;background:linear-gradient(90deg,transparent,#b4faffaa 70%,#fff5d7);animation:warp-cross 1.75s cubic-bezier(.2,.65,.3,1) 2 both;animation-delay:calc(var(--trail)*65ms)}
#rareSpotlight[data-rarity=LR] .scene-stars{animation:galaxy-depth 5.8s ease-out both;opacity:.7}
#rareSpotlight[data-rarity=LR][data-stage=card] .scene-vault>span{animation:vault-coronation 5.8s ease-out both;animation-delay:0s}
#rareSpotlight[data-rarity=LR][data-stage=card] .scene-warp{display:none}
#rareSpotlight[data-rarity=LR][data-stage=card] #spotlightCard{animation:sovereign-arrive 1.5s cubic-bezier(.12,.8,.2,1) both}
@keyframes vault-assemble{0%,10%{opacity:0;transform:rotate(calc(var(--segment)*45deg)) translateY(-55%) rotateX(70deg) scale(.2)}40%{opacity:.75}75%,100%{opacity:.55;transform:rotate(calc(var(--segment)*45deg)) translateY(0) rotateX(0) scale(calc(.58 + var(--segment)*.065))}}
@keyframes vault-coronation{from{opacity:.7;transform:rotate(calc(var(--segment)*45deg)) scale(calc(.58 + var(--segment)*.065))}to{opacity:.4;transform:rotate(calc(var(--segment)*45deg + 32deg)) scale(calc(.75 + var(--segment)*.065))}}
@keyframes warp-cross{0%{opacity:0;transform:rotate(calc(var(--trail)*22.5deg)) translateX(12px) scaleX(.02)}30%{opacity:.8}100%{opacity:0;transform:rotate(calc(var(--trail)*22.5deg)) translateX(50vw) scaleX(1.3)}}
@keyframes sovereign-arrive{0%{opacity:0;transform:perspective(900px) translateY(40px) rotateY(60deg) scale(.65)}60%{opacity:1}100%{opacity:1;transform:perspective(900px) translateY(0) rotateY(0) scale(1)}}
@media(max-width:600px){
 #rareSpotlight .scene-warp>span:nth-child(even){display:none}
 #rareSpotlight .scene-vault>span:nth-child(even){display:none}
 #rareSpotlight .scene-wings>span:nth-child(3n){display:none}
 #rareSpotlight .scene-wings>span{width:48vw;height:19vw}
}
.opening-paused .rarity-scene *{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){#rareSpotlight .rarity-scene{display:none!important}#rareSpotlight #spotlightCard{animation:none!important}}
/* Crisp geometry stays readable without animated blur or shadow. */
#rareSpotlight .scene-vault>span{border-width:2px;border-radius:8%;background:none}
#rareSpotlight[data-rarity=LR] .scene-sigil{display:grid;place-items:center;left:50%;top:46%;width:min(38vw,35svh,300px);aspect-ratio:1;transform:translate(-50%,-50%);animation:prism-lock 5.8s ease-out both}
#rareSpotlight[data-rarity=LR] .scene-sigil::before{border:2px solid #b6fff5aa;inset:0;transform:rotate(45deg)}
#rareSpotlight[data-rarity=LR] .scene-sigil::after{border:1px solid #ffe3a8aa;inset:12%;transform:rotate(45deg)}
#rareSpotlight[data-rarity=LR] .scene-sigil>span{color:#ddfff8}
#rareSpotlight[data-rarity=LR][data-stage=card] .scene-sigil{animation:prism-release 1.5s ease-out both}
@keyframes prism-lock{0%,40%{opacity:0;transform:translate(-50%,-50%) rotate(135deg) scale(.2)}85%,100%{opacity:.85;transform:translate(-50%,-50%) rotate(0) scale(1)}}
@keyframes prism-release{from{opacity:.85;transform:translate(-50%,-50%) scale(1)}to{opacity:0;transform:translate(-50%,-50%) scale(1.8)}}

/* Detached foil follows its own ballistic path through stage transitions. */
#openingDialog #theaterPack .torn-seal{display:none!important}
#openingDialog .seal-debris{position:fixed;z-index:20;pointer-events:none;transform-origin:60% 50%;will-change:transform,opacity;contain:paint;background:repeating-linear-gradient(90deg,#fff4 0 1px,transparent 1px 4px),repeating-linear-gradient(0deg,#d6d7d5 0,#faf9f2 1px,#cacccb 2px,#f9f8f2 3px);clip-path:polygon(0 0,100% 0,100% 76%,94% 94%,87% 75%,81% 93%,74% 76%,68% 95%,61% 75%,56% 93%,49% 76%,43% 94%,36% 75%,30% 93%,24% 76%,17% 94%,11% 75%,5% 93%,0 76%)}
@media(prefers-reduced-motion:reduce){#openingDialog .seal-debris{display:none}}

/* Topographic lines move outward from the opened field archive. */
#openingDialog.phase-burst :is(.light-spears,.burst-flash,.pack-beam){display:none}
#openingDialog.phase-burst .theater-stage::after{
 content:'';position:absolute;inset:4% 6%;pointer-events:none;border-radius:44% 56% 63% 37% / 52% 38% 62% 48%;
 background:repeating-radial-gradient(ellipse at 47% 55%,transparent 0 21px,#e2c48c66 22px 23px,transparent 24px 34px);
 mask-image:radial-gradient(ellipse,#000 20%,transparent 73%);
 animation:archive-contours .85s ease-out both;
}
#openingDialog.phase-burst .shockwave{animation:none;opacity:0}
@keyframes archive-contours{
 0%{opacity:0;transform:scale(.35) rotate(-12deg)}
 34%{opacity:.85}
 100%{opacity:0;transform:scale(1.28) rotate(8deg)}
}
@media(prefers-reduced-motion:reduce){#openingDialog.phase-burst .theater-stage::after{display:none}}
