
/* The real booster layout and timing are kept; only the hidden-card presentation changes. */
body[data-rarity-opening-effects] #mode,body[data-rarity-opening-effects] #availability,body[data-rarity-opening-effects] #booster-cadence{display:none!important}
body[data-rarity-opening-effects] .rarity-stack-card{box-shadow:none!important;transform-style:flat;overflow:visible}
body[data-rarity-opening-effects] .rarity-stack-card .reveal-stage{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
body[data-rarity-opening-effects] .rarity-stack-card .mystery-card{display:block;position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;pointer-events:none}
body[data-rarity-opening-effects] .rarity-stack-card .hidden-face{background:var(--chosen-cardback,url('assets/hud/card-back-teal-v3-footprint.png') center/100% 100% no-repeat)}
body[data-rarity-opening-effects] .rarity-stack-card .shown-face .card{height:100%!important;width:100%!important}
body[data-rarity-opening-effects] .booster-theatre[data-phase=revealing]{overflow:visible}
body[data-rarity-opening-effects].in-hyperspace main{position:relative;z-index:21}
body[data-rarity-opening-effects].in-hyperspace .booster-theatre{isolation:auto}

/* Keep one unchanged card surface from extraction through each promotion. */
body[data-rarity-opening-effects] #theatre[data-phase=revealing] .stack-card.front:not(.depart){transition:transform .55s cubic-bezier(.2,.8,.2,1),opacity .45s}
body[data-rarity-opening-effects] .stack-card:not(.front) :is(.rarity-aura,.rarity-rays,.reveal-particles){visibility:hidden}
body[data-rarity-opening-effects] .stack-card:not(.front) .reveal-jolt{animation:none}
/* Broad light spills beyond the full-size card instead of hiding behind it. */
body[data-rarity-opening-effects] .rarity-aura{width:160%!important;height:145%!important;opacity:.85;filter:blur(22px);animation:booster-aura-breathe 3s ease-in-out infinite alternate}
body[data-rarity-opening-effects] .rarity-rays{width:195%;height:auto;aspect-ratio:1;opacity:.28}
body[data-rarity-opening-effects] [data-rarity=SR] .rarity-aura{opacity:1}
body[data-rarity-opening-effects] [data-rarity=SR] .rarity-rays{opacity:.4}
body[data-rarity-opening-effects] [data-rarity=SSR] .rarity-aura{opacity:1;filter:blur(18px)}
body[data-rarity-opening-effects] [data-rarity=SSR] .rarity-rays{opacity:.55}
body[data-rarity-opening-effects] [data-rarity=UR] .rarity-aura{animation:ur-aura 5s linear infinite}
body[data-rarity-opening-effects] .revealed .rarity-aura{opacity:.4;animation-play-state:paused}
body[data-rarity-opening-effects] .revealed .rarity-rays{opacity:.2}
@keyframes booster-aura-breathe{to{transform:scale(1.06)}}

/* Never let a pre-rendered front bleed through the back of another card. */
body[data-rarity-opening-effects] .reveal-stage:not(.face-visible) .shown-face{visibility:hidden}
body[data-rarity-opening-effects] .reveal-stage.face-visible .hidden-face{visibility:hidden}
body[data-rarity-opening-effects] .shown-face .card{overflow:hidden!important}
body[data-rarity-opening-effects] #theatre[data-phase=revealing] .stack-card:not(.depart){transition:transform .7s cubic-bezier(.25,.65,.25,1),opacity .45s}


/* The SVG rarity stroke now reaches the native card edge. */

/* Front and back share the same silhouette; the parked back must not rim the face. */
body[data-rarity-opening-effects] .rarity-stack-card :is(.hidden-face,.shown-face,.mystery-card){border-radius:3.5% / 2.5%}
/* Match the frame stroke's centerline (4.5px, radius 34px at 1064×1478).
   The artwork extends under half the stroke, never outside its outer edge. */
body[data-rarity-opening-effects] .shown-face .card .art{clip-path:inset(.3044655% .4229323% round 3.1954887% / 2.3004059%)}

/* Clip the complete printed surface, not just the illustration: all finish layers
   and the background must share the frame's exact rounded silhouette. */
body[data-rarity-opening-effects] .shown-face{border-radius:0;overflow:visible;mask:url('assets/hud/card-face-clip.svg') center/100% 100% no-repeat}
body[data-rarity-opening-effects] .shown-face .card{border-radius:0;background:transparent}
body[data-rarity-opening-effects] .stack-card:not(.front):not(.depart) .reveal-motion{transform:none!important}
