/* rip/pack-foil.css — THE FOIL PACK (15 Nov 2026). Every universe page, both engines, one look.
 *
 * Aaron, 15 Nov 2026: "I want the entire experience to be the most premium possible." The pack was a flat card back
 * with a glint; a real booster is a crimped foil wrapper that catches the light as you move it, and you tear it open.
 *
 *   1. crimped seals   top and bottom bands with crimp ridges, a seam and a serrated cut edge (.rs-gloss::before)
 *   2. holo foil       an iridescent layer + specular spot that follows the finger, the mouse or the phone's tilt,
 *                      and drifts slowly on its own otherwise (.fp-pack::before, moved by --pf-x / --pf-y / --pf-i)
 *   3. tear-open       its own ~1.55 s beat before the charge: anticipation, the cut, the flap peeling away, the light
 *                      pouring out (.pf-tearing, .pf-fx inside the pack, .pf-flap / .pf-spill / .pf-spark fixed)
 *   4. rare holo       a holographic sweep over the revealed card on a chase or mini-chase pull (.pf-holo)
 *
 * ⚠ NOTHING HERE SETS `animation` ON .fp-pack. fun-pack.css's beat/charge/suck/awaiting own that property and a
 *   second shorthand on the same element deadlocked the whole pull once (fun-pack.css, "THE PACK BREATHES"). Every
 *   moving part here is a pseudo-element or a child, moved by transform/opacity only.
 * ⚠ NO MASK OR CLIP ON .fp-pack. Either would cut off its drop shadow and the charge's 140px glow; the cut edge is
 *   painted (the page round the pack is as dark as the "gaps"), and the torn top is a dark mouth, not a hole.
 * ⚠ SIZES ARE PERCENTAGES OF THE PACK, so the 260x462 phone pack, the 300x530 one and the 340x600 PC one all get
 *   the same proportions. 4.6% of the height = 8.15% of the width (the three packs share one aspect ratio).
 * Driven by rip/pack-foil.js; the engines' hooks are in rip/fun-pack.js (foilTear / foilMend / foilHolo). */

.fp-pack {
  --pf-c:   var(--tc-border, var(--fp-accent, var(--rip-act, #2dd4bf)));
  --pf-ch:  4.6%;                 /* the seal's height, of the pack's height */
  --pf-gap: rgba(3, 5, 9, .94);   /* the serration's "cut", painted: the page round the pack is this dark */
  /* the seal: base tint, crimp ridges, the seam toward the face. Positioned per band below. */
  --pf-seal-base: linear-gradient(180deg,
      color-mix(in srgb, var(--pf-c) 42%, #3a4352) 0%,
      color-mix(in srgb, var(--pf-c) 26%, #161c27) 55%,
      color-mix(in srgb, var(--pf-c) 18%, #0b0f17) 100%);
  --pf-seal-ridge: repeating-linear-gradient(90deg,
      rgba(255,255,255,.26) 0 1px, rgba(255,255,255,.05) 1px 2.5px, rgba(0,0,0,.30) 2.5px 3.5px, rgba(0,0,0,0) 3.5px 4.5px);
  /* the top seal: teeth (two half-squares make a row of downward points), ridges, seam, base */
  --pf-top:
      linear-gradient(135deg, var(--pf-gap) 25%, transparent 25.5%) 0 0 / 7px 7px repeat-x,
      linear-gradient(225deg, var(--pf-gap) 25%, transparent 25.5%) 0 0 / 7px 7px repeat-x,
      linear-gradient(180deg, transparent calc(100% - 3px), rgba(255,255,255,.34) calc(100% - 3px) calc(100% - 2px), rgba(0,0,0,.6) calc(100% - 2px)) 0 0 / 100% var(--pf-ch) no-repeat,
      var(--pf-seal-ridge) 0 0 / 100% var(--pf-ch) no-repeat,
      var(--pf-seal-base) 0 0 / 100% var(--pf-ch) no-repeat;
  --pf-bot:
      linear-gradient(45deg,  var(--pf-gap) 25%, transparent 25.5%) 0 100% / 7px 7px repeat-x,
      linear-gradient(315deg, var(--pf-gap) 25%, transparent 25.5%) 0 100% / 7px 7px repeat-x,
      linear-gradient(0deg, transparent calc(100% - 3px), rgba(255,255,255,.22) calc(100% - 3px) calc(100% - 2px), rgba(0,0,0,.6) calc(100% - 2px)) 0 100% / 100% var(--pf-ch) no-repeat,
      var(--pf-seal-ridge) 0 100% / 100% var(--pf-ch) no-repeat,
      linear-gradient(0deg,
        color-mix(in srgb, var(--pf-c) 34%, #2c3442) 0%,
        color-mix(in srgb, var(--pf-c) 20%, #121823) 60%,
        color-mix(in srgb, var(--pf-c) 14%, #090c13) 100%) 0 100% / 100% var(--pf-ch) no-repeat;
  /* the top and bottom of the accent ring belong to the seals now: the cut edge is the outline */
  border-top-color: transparent; border-bottom-color: transparent;
}

/* 1. THE SEALS. Inside .rs-gloss and BEFORE its glint children, so the glint still sweeps over them (they are foil too). */
.fp-pack > .rs-gloss::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: var(--pf-top), var(--pf-bot);
}
/* the face's own hairline frame and foot line clear the seals */
.fp-pack .cb-frame { top: calc(var(--pf-ch) + 5px); bottom: calc(var(--pf-ch) + 5px); }
.fp-pack .cb-foot  { padding-bottom: calc(8.15% + 7px); }

/* 2. THE HOLO FOIL. A direct child of the pack's own stacking context, so it blends with the FACE under it (inside
   .rs-gloss it would only blend with the gloss). Over-sized so a translate never shows its edge. It drifts on its own
   (pfDrift) and is moved further by the three variables rip/pack-foil.js writes on .fp-pack from the pointer or the
   tilt (x, y in -1..1; i = how strongly the light is caught, 0..1). ⚠ `animation` here is the PSEUDO-ELEMENT's, not
   .fp-pack's — the pack's own animation property stays fun-pack.css's alone. */
.fp-pack::before {
  content: ''; position: absolute; inset: -45%; z-index: 2; pointer-events: none;
  background:
    radial-gradient(18% 13% at 50% 50%, rgba(255,255,255,.55) 0%, rgba(255,255,255,.14) 45%, transparent 75%),
    repeating-linear-gradient(118deg,
      hsla(320, 95%, 70%, 0) 0%,
      hsla(320, 95%, 70%, .55) 4%,
      hsla(45, 100%, 68%, .5) 8%,
      hsla(140, 90%, 62%, .45) 12%,
      hsla(195, 100%, 66%, .55) 16%,
      hsla(265, 95%, 72%, .5) 20%,
      hsla(320, 95%, 70%, 0) 26%);
  /* overlay, not color-dodge: dodge lifted the whole dark face into a purple haze; overlay tints the light parts and
     leaves the darks dark, which is what printed holo foil does (measured side by side, 15 Nov) */
  mix-blend-mode: overlay;
  opacity: calc(.12 + var(--pf-i, .3) * .28);
  transform: translate3d(calc(var(--pf-x, 0) * -13%), calc(var(--pf-y, 0) * -9%), 0);
  /* the drift at rest: `translate` composes with the input's `transform`, so neither ever cancels the other */
  animation: pfDrift 9s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes pfDrift {
  0%, 100% { translate: -6% 2.5%; }
  25%      { translate: 0 -3%; }
  50%      { translate: 6% 2%; }
  75%      { translate: 0 3.5%; }
}
/* while the pack is being opened the light is the charge's, not the foil's — and the blended layer is taken out
   altogether, so the charge's animated filter composites a pack with nothing blended inside it */
body.sim-pulling .fp-pack::before { display: none; }

/* 3. THE TEAR-OPEN BEAT (rip/pack-foil.js open(), ~1.55 s before the charge — timeline there). Aaron, 15 Nov 2026,
   on the first cut: "I don't like it. Doesn't look premium, looks cheap and too fast." Every part below starts on
   ONE class (.pf-tearing) with its own delay, so the beat is a single style change and the browser runs it.
   ⚠ transform / opacity only on anything that moves; clip-path and blend modes are set once and never animated. */
.pf-fx { position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit; overflow: hidden; }
.pf-fx > i { position: absolute; left: 0; width: 100%; display: block; opacity: 0; }
/* the open mouth (an SVG painted at the tear: everything above the tear line, dark, lit from the lip) */
.pf-fx .pf-mouth { top: 0; height: 7.75%; background: 0 0 / 100% 100% no-repeat; }
/* the inside glowing */
.pf-fx .pf-glowin { top: 0; height: 16%;
  background: radial-gradient(60% 75% at 50% 38%, color-mix(in srgb, var(--pf-c) 70%, #fff) 0%, color-mix(in srgb, var(--pf-c) 45%, transparent) 38%, transparent 72%); }
/* the light flickering along the seam before the cut */
.pf-fx .pf-seam { top: 4.2%; height: 4%;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--pf-c) 45%, transparent) 30%, rgba(255,255,255,.75) 50%,
              color-mix(in srgb, var(--pf-c) 45%, transparent) 70%, transparent 100%); }
/* the reveal window: slides in from the left while its content slides back, so the hot line appears in place */
.pf-fx .pf-win, .pf-fx .pf-ptw { top: 2.2%; height: 8%; opacity: 1; transform: translateX(-100%); }
.pf-fx .pf-win { overflow: hidden; }
.pf-fx .pf-win > .pf-in { position: absolute; inset: 0; background: 0 0 / 100% 100% no-repeat; transform: translateX(100%); }
/* the bright point leading the cut: rides the window's right edge, on a twin that is not clipped */
.pf-fx .pf-ptw > .pf-pt { position: absolute; right: -11px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #fff 0 18%, color-mix(in srgb, var(--pf-c) 55%, #fff) 30%, color-mix(in srgb, var(--pf-c) 50%, transparent) 52%, transparent 72%); }

.fp-pack.pf-tearing .pf-fx .pf-seam  { animation: pfSeam 950ms linear both; }
.fp-pack.pf-tearing .pf-fx .pf-win,
.fp-pack.pf-tearing .pf-fx .pf-ptw   { animation: pfWin 700ms cubic-bezier(.45, 0, .55, 1) 250ms both; }
.fp-pack.pf-tearing .pf-fx .pf-in    { animation: pfWinIn 700ms cubic-bezier(.45, 0, .55, 1) 250ms both, pfLip 900ms ease-out 1050ms forwards; }
.fp-pack.pf-tearing .pf-fx .pf-pt    { animation: pfPoint 700ms linear 250ms both; }
.fp-pack.pf-tearing .pf-fx .pf-mouth { animation: pfOn 140ms ease-out 850ms forwards; }
.fp-pack.pf-tearing .pf-fx .pf-glowin { animation: pfGlowIn 1100ms ease-out 1000ms forwards; }
@keyframes pfSeam   { 0% { opacity: 0; } 5% { opacity: .55; } 10% { opacity: .15; } 17% { opacity: .75; } 22% { opacity: .3; }
                      27% { opacity: .8; } 60% { opacity: .45; } 100% { opacity: 0; } }
@keyframes pfWin    { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes pfWinIn  { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes pfLip    { from { opacity: 1; } to { opacity: .55; } }
@keyframes pfPoint  { 0% { opacity: 0; } 8% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pfOn     { from { opacity: 0; } to { opacity: 1; } }
@keyframes pfGlowIn { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: .6; } }

/* the flap that comes away: the crimped seal over a sliver of the face, its torn lip glowing (an SVG along the same
   points as the pack's), cut to that edge by a clip-path set once. Hinged on its right corner: peels up, then falls. */
.pf-flap {
  position: fixed; z-index: 9995; display: block; pointer-events: none; box-sizing: border-box; opacity: 0;
  border: 2px solid var(--pf-c, #2dd4bf); border-top-color: transparent; border-bottom: 0; border-radius: 14px 14px 0 0;
  background:
    var(--pf-lip) 0 0 / 100% 100% no-repeat,
    linear-gradient(135deg, rgba(3,5,9,.94) 25%, transparent 25.5%) 0 0 / 7px 7px repeat-x,
    linear-gradient(225deg, rgba(3,5,9,.94) 25%, transparent 25.5%) 0 0 / 7px 7px repeat-x,
    linear-gradient(180deg, transparent calc(var(--pf-seal) - 3px), rgba(255,255,255,.34) calc(var(--pf-seal) - 3px) calc(var(--pf-seal) - 2px), rgba(0,0,0,.6) calc(var(--pf-seal) - 2px) var(--pf-seal), transparent var(--pf-seal)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.26) 0 1px, rgba(255,255,255,.05) 1px 2.5px, rgba(0,0,0,.30) 2.5px 3.5px, rgba(0,0,0,0) 3.5px 4.5px) 0 0 / 100% var(--pf-seal) no-repeat,
    linear-gradient(180deg, color-mix(in srgb, var(--pf-c) 42%, #3a4352) 0%, color-mix(in srgb, var(--pf-c) 18%, #0b0f17) var(--pf-seal),
                    color-mix(in srgb, var(--pf-c) 26%, #05060b) var(--pf-seal), color-mix(in srgb, var(--pf-c) 20%, #05060b) 100%);
  transform-origin: 100% 40%;
  animation: pfFlap 650ms linear forwards;   /* the delay is set per pull: it starts at the separation (forwards: unseen until then) */
  will-change: transform;
}
@keyframes pfFlap {
  0%   { opacity: 1; transform: perspective(700px) translate(0, 0) rotateZ(0) rotateX(0); animation-timing-function: cubic-bezier(.25, .1, .35, 1); }
  20%  { transform: perspective(700px) translate(0, -6px) rotateZ(6deg) rotateX(16deg); animation-timing-function: cubic-bezier(.3, 0, .5, 1); }
  46%  { transform: perspective(700px) translate(30px, -38px) rotateZ(16deg) rotateX(36deg); animation-timing-function: cubic-bezier(.2, .6, .35, 1); }
  70%  { opacity: 1; }
  /* ⚠ FLICKED UP AND AWAY, NEVER ACROSS THE PACK (15 Nov 2026): falling "off to the right and down" it swept over the
     pack's face on a phone, where the right edge is close. Up and out past the top-right corner, fading as it goes. */
  100% { opacity: 0; transform: perspective(700px) translate(min(46vw, 380px), max(-34vh, -300px)) rotateZ(44deg) rotateX(52deg); }
}

/* the light pouring out of the opening: a soft cone and rays, gradients only, added to the page (screen) */
/* ⚠ BEHIND THE PACK (Aaron, 16 Nov 2026: "the glow (sun style) animation should go behind the pack"): the stage is lifted
   to z 2 while a pull runs (still under the charge vignette's 48) and the rays sit at 1, so the pack's torn lip covers
   their base — no light painted over the pack, no dark strip under it. */
body.sim-pulling .fp-stage { z-index: 2; }
/* ⚠ A BEAMING GLOW, NOT RAYS (Aaron, 16 Nov 2026: "improve the animation of the light coming out of the top … It doesn't
   really fit in with the rest. Just make it a beaming glow, rather than rays of light using lines"). Three soft layers,
   no line anywhere: a hot white-to-accent bloom standing on the torn lip, a soft column of light rising out of the
   opening (the "beam", about the opening's width), and a wide faint halo in the accent — the same soft light as the
   charge glow round the pack, so it reads as one light. Gradients only (no blur filter: the phone that glitched). */
.pf-spill {
  position: fixed; z-index: 1; display: block; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  /* ⚠ CENTRED ON THE LIP, NOT ON THE ELEMENT'S BOTTOM EDGE: the box runs on below the opening, behind the pack (z 1),
     so the light fades out softly there too — standing the glow on the box's edge cut it off in a hard straight line
     left and right of the pack (seen on the first recording). --sw/--sh are the light's size, --lip where the opening is. */
  background:
    radial-gradient(calc(var(--sw) * .30) calc(var(--sh) * .32) at 50% var(--lip), rgba(255,255,255,.95) 0%,
                    color-mix(in srgb, var(--pf-c) 55%, #fff) 32%, color-mix(in srgb, var(--pf-c) 40%, transparent) 64%, transparent 100%),
    radial-gradient(calc(var(--sw) * .21) calc(var(--sh) * .94) at 50% var(--lip), color-mix(in srgb, var(--pf-c) 60%, #fff) 0%,
                    color-mix(in srgb, var(--pf-c) 38%, transparent) 42%, color-mix(in srgb, var(--pf-c) 12%, transparent) 72%, transparent 100%),
    radial-gradient(calc(var(--sw) * .58) calc(var(--sh) * .68) at 50% var(--lip), color-mix(in srgb, var(--pf-c) 34%, transparent) 0%,
                    color-mix(in srgb, var(--pf-c) 12%, transparent) 55%, transparent 100%);
  transform-origin: 50% var(--lip);
  animation: pfSpill 880ms linear both;   /* the rip's light only; its delay and length come from T.glowAt / T.glow (the vacuum sound) */
}
/* rises out of the opening with the vacuum sound and peaks on its peak (51% of T.glow — see T.glowAt in pack-foil.js),
   breathes once, then fades with it */
@keyframes pfSpill {
  0%   { opacity: 0; transform: scale(.6, .25); animation-timing-function: cubic-bezier(.45, 0, .6, 1); }
  51%  { opacity: 1; transform: scale(1, 1); animation-timing-function: cubic-bezier(.3, 0, .6, 1); }
  70%  { opacity: .9; transform: scale(1.03, 1.06); }
  100% { opacity: 0; transform: scale(1.08, 1.16); }
}
/* sparks (round, hot) and foil flecks (small silver shards, spinning) off the cutting point, arcing under gravity */
.pf-spark {
  position: fixed; z-index: 9996; display: block; pointer-events: none; opacity: 0; border-radius: 50%; margin: -2px 0 0 -2px;
  background: radial-gradient(circle, #fff 0 35%, color-mix(in srgb, var(--pf-c) 60%, #fff) 60%, transparent 72%);
  animation: pfSpark 620ms linear both;
}
.pf-spark.pf-fleck { width: 3px; height: 6px; border-radius: 1px; background: linear-gradient(160deg, #f8fbff, #9fb0c8 60%, color-mix(in srgb, var(--pf-c) 50%, #cbd5e1)); }
@keyframes pfSpark {
  0%   { opacity: 0; transform: translate(0, 0) rotate(0) scale(1); animation-timing-function: cubic-bezier(.2, .8, .4, 1); }
  6%   { opacity: 1; }
  38%  { transform: translate(calc(var(--sx) * .55), var(--sy)) rotate(calc(var(--sr) * .4)) scale(.9); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  100% { opacity: 0; transform: translate(var(--sx), calc(var(--sy) + var(--fy))) rotate(var(--sr)) scale(.5); }
}

/* 3b. THE EXPLOSION COMES FROM THE PACK (rip/pack-foil.js build() / shatter()). Aaron, 15 Nov 2026: "Now, instead of the
   pack just fading out and then the moon explosion showing. Can you make it look like the explosion is coming from the
   pack itself?" No suck any more: from the charge to the clip's explosion frame the pack lights up from inside while the
   orb forms in it, then breaks into shards of itself on the explosion frame. Opacity/transform only on moving parts. */
.pf-fx .pf-inlight { top: 0; height: 100%;
  background: radial-gradient(closest-side at 50% 52%, rgba(255,255,255,.95) 0%, color-mix(in srgb, var(--pf-c) 55%, #fff) 26%,
              color-mix(in srgb, var(--pf-c) 40%, transparent) 55%, transparent 82%); }
.pf-fx .pf-edgelight { top: 0; height: 100%; border-radius: inherit;
  box-shadow: inset 0 0 12px 3px color-mix(in srgb, var(--pf-c) 60%, #fff), inset 0 0 44px 8px color-mix(in srgb, var(--pf-c) 55%, transparent); }
.fp-pack.pf-building .pf-fx .pf-inlight  { animation: pfInLight var(--pf-build, 1500ms) cubic-bezier(.55, 0, .9, .45) forwards; }
.fp-pack.pf-building .pf-fx .pf-edgelight { animation: pfEdge var(--pf-build, 1500ms) cubic-bezier(.4, 0, .8, .5) forwards; }
@keyframes pfInLight { from { opacity: 0; transform: scale(.3); } 60% { opacity: .55; } to { opacity: .95; transform: scale(1.2); } }
@keyframes pfEdge    { from { opacity: 0; } to { opacity: 1; } }
/* the clip is screened over the page while the pack builds, so the orb's black plate disappears and the orb sits IN the pack */
body.pf-orb .fp-burst { mix-blend-mode: screen; }
/* light leaking out of the torn top as the orb grows */
.pf-leak {
  position: fixed; z-index: 9994; display: block; pointer-events: none; opacity: 0; mix-blend-mode: screen; transform-origin: 50% 100%;
  background: radial-gradient(30% 70% at 50% 100%, rgba(255,255,255,.9) 0%, color-mix(in srgb, var(--pf-c) 65%, #fff) 18%,
              color-mix(in srgb, var(--pf-c) 45%, transparent) 42%, transparent 74%);
  -webkit-mask: radial-gradient(52% 100% at 50% 100%, #000 35%, transparent 92%); mask: radial-gradient(52% 100% at 50% 100%, #000 35%, transparent 92%);
  animation: pfLeak var(--pf-build, 1500ms) cubic-bezier(.55, 0, .9, .45) forwards;
}
.pf-leak::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-conic-gradient(from -3deg at 50% 100%, rgba(255,255,255,.22) 0deg 2deg, transparent 2deg 6.5deg,
              color-mix(in srgb, var(--pf-c) 35%, transparent) 6.5deg 8deg, transparent 8deg 12deg);
  -webkit-mask: linear-gradient(0deg, #000 0%, transparent 88%); mask: linear-gradient(0deg, #000 0%, transparent 88%);
}
@keyframes pfLeak { from { opacity: 0; transform: scale(.7, .25); } to { opacity: 1; transform: scale(1.1, 1.2); } }
/* ⚠⚠ THE CHARGE'S GLOW, ALL FOUR SIDES, FROM ONE BOX THAT STARTS AT THE TORN EDGE (pack-foil.js build(); Aaron, 15 Nov 2026:
   "Apply the same glow you have round the left, right and bottom to the top"). The charge's glow was the pack's own
   box-shadow (fpCharge → 0 0 140px accent), and the pack is clipped at the tear, so its glow stopped dead along the tear
   line: a dark slot over the pack and a hard edge either side. Once torn, the pack wears no box-shadow and this box —
   from the lip to the pack's foot, never clipped — wears it instead, so the top glows exactly like the sides. */
.fp-pack.pf-torn.is-charge { box-shadow: none !important; }
/* ⚠ BEHIND the pack (z -1 in the stage, which a pull lifts to its own stacking context): on top, its glow painted over the
   pack's outer few pixels and drew an inner rectangle on the face (16 Nov 2026) */
.pf-topglow {
  position: absolute; z-index: -1; display: block; pointer-events: none; border-radius: 0 0 12px 12px;
  animation: pfTopGlow var(--pf-dur, 1800ms) linear forwards;
}
/* as bright as the pack's own was: that glow sat under the charge's brightness filter (×1.2 → ×2.1), so the colour is
   lifted toward white and the close band is denser; full by ~75% of the charge, as the old one popped in at half way */
@keyframes pfTopGlow {
  0%   { box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent; }
  40%  { box-shadow: 0 0 34px 8px color-mix(in srgb, var(--pf-acc, #2ee6d6) 55%, transparent),
                     0 0 110px 20px color-mix(in srgb, var(--pf-acc, #2ee6d6) 35%, transparent); }
  75%, 100% { box-shadow: 0 0 46px 14px color-mix(in srgb, var(--pf-acc, #2ee6d6) 75%, #fff 10%),
                          0 0 150px 40px color-mix(in srgb, var(--pf-acc, #2ee6d6) 70%, transparent); }
}
/* the shards: each a copy of the pack, cut by a static clip-path, in a box the size of the shard; flies out of the
   explosion with spin and depth and fades. Above the clip (same z, later in the page), under the card (9999). */
/* ⚠ UNDER the burst clip (9997 < .fp-burst's 9998, which is screened while the pack builds): the pieces are lit by the
   explosion exactly as the pack was, so the frame where the pack becomes its pieces looks the same (16 Nov 2026: above
   the clip, that frame lost the bloom and read as a flat, dull pack for an instant). */
.pf-shard {
  position: fixed; z-index: 9997; display: block; pointer-events: none;
  font-style: normal;   /* the holder is an <i>: without this the pack's words came out italic on every shard */
  /* ⚠ overflow hidden + the copy NOT its own layer: each shard's layer is then only its own box. With the copy's
     will-change (from .fp-pack) and visible overflow every shard rasterised the whole pack — 10 packs at the explosion
     frame, measured as a 267 ms frame at 4x CPU. */
  overflow: hidden;
  /* ⚠ BUILT ~400 ms EARLY AND WAITING INVISIBLE, ITS FLIGHT ALREADY SCHEDULED (Web Animations with a delay, set by
     shatter()): at the explosion frame nothing is committed, the compositor just starts them — measured, a break done by
     a DOM change at that instant reached the screen 100-180 ms behind the clip's burst. Opacity .01, not 0: a layer at 0
     is not painted until it shows, and that paint was the rest of the delay. Over the pack's own face, it cannot be seen. */
  opacity: .01; will-change: transform, opacity;
}
.pf-shard > .fp-pack { position: absolute; left: 0; top: 0; margin: 0; transform-origin: 0 0; translate: none; scale: none; rotate: none;
  transition: none; animation: none; will-change: auto;
  /* the pack breaks at the charge's brightness (fpCharge ends on brightness 2.1): a STATIC filter on a copy that is not
     its own layer, painted once while the shard waits under the pack — never per frame */
  filter: brightness(1.55); }
/* ⚠ THE COPY IS PAINTED CHEAPLY, BECAUSE THE BREAK WAITS FOR ITS PAINT. Measured in the recordings: with the pack's own
   blurs (the 16/40 px and 44/100 px box-shadows), the text's drop-shadow filters, the art's mask and a brightness filter,
   the shards reached the screen ~200 ms after the explosion frame (the frame holds until their tiles are painted). On a
   spinning shard inside an explosion none of those can be seen. (The brightness filter stays: it is painted while the
   shard waits under the pack, see below.) */
.pf-shardpack, .pf-shardpack .cb-veil, .pf-shardpack .pf-fx .pf-edgelight { box-shadow: none; }
.pf-shardpack .cb-label, .pf-shardpack .cb-big { filter: none; }
/* ⚠ THE ART KEEPS THE PACK'S COLOUR: the face's art is mix-blend-mode:luminosity over the band colour; drawn `normal` on the
   shards it showed the raw (orange) Charizard and the pieces flashed salmon on a purple pack (15 Nov 2026). A static
   grayscale at the same strength reads as the same purple, with no blend group per shard. */
.pf-shardpack .cb-art { -webkit-mask: none; mask: none; mix-blend-mode: normal; filter: grayscale(1) brightness(.9); opacity: .38; }
/* inside a shard the pack is frozen at its brightest: the light layers at their peak, nothing animating */
.pf-shardpack, .pf-shardpack * { animation: none !important; transition: none !important; }
.pf-shardpack .pf-fx .pf-inlight  { opacity: .95; transform: scale(1.2); }
.pf-shardpack .pf-fx .pf-edgelight { opacity: 1; }
.pf-shardpack .pf-fx .pf-in { opacity: .55; transform: none; }
.pf-shardpack .pf-fx .pf-win { transform: none; }
.pf-shardpack .pf-fx .pf-ptw, .pf-shardpack .pf-fx .pf-seam { opacity: 0; }
.pf-shardpack::after { opacity: 1; background: rgba(255,255,255,.08); box-shadow: none; z-index: 5; }

/* 4. THE RARE HOLO, over the revealed card (or slab) of a chase / mini-chase pull. In .fp-cardwrap, whose explosion
   transform isolates it, so the blend lights the art and nothing round it. The sweep runs on the inner
   layer's ::before; the inner layer itself follows the finger / tilt. */
.pf-holo {
  position: absolute; inset: 0; z-index: 3; border-radius: 11px; overflow: hidden; pointer-events: none;
  /* overlay (measured against dodge, soft-light, hard-light and screen on a real chase slab, 15 Nov): the rainbow runs
     across the art itself and the art stays readable; dodge only coloured the slab's frame */
  mix-blend-mode: overlay; opacity: 0; transition: opacity .6s ease .15s;
}
.pf-holo.is-on        { opacity: .5; }
.pf-holo--chase.is-on { opacity: .72; }
.pf-holo > i {
  position: absolute; inset: -55%;
  background: repeating-linear-gradient(125deg,
      hsla(330, 100%, 70%, .0) 0%, hsla(330, 100%, 70%, .7) 3%, hsla(48, 100%, 66%, .65) 6%,
      hsla(130, 95%, 60%, .6) 9%, hsla(190, 100%, 64%, .7) 12%, hsla(260, 100%, 72%, .65) 15%, hsla(330, 100%, 70%, 0) 19%);
  transform: translate3d(calc(var(--pf-x, 0) * -10%), calc(var(--pf-y, 0) * -7%), 0);
  will-change: transform;
}
.pf-holo > i::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.75) 50%, transparent 58%);
  transform: translateX(-30%);
  animation: pfHoloSweep 2.8s cubic-bezier(.45, 0, .55, 1) infinite;
}
.pf-holo--chase > i::before { animation-duration: 2.1s; }
@keyframes pfHoloSweep {
  0%   { transform: translateX(-30%); }
  60%, 100% { transform: translateX(30%); }
}

@media (prefers-reduced-motion: reduce) {
  .fp-pack::before { transform: none; animation: none; }
  .pf-holo > i { transform: none; }
  .pf-holo > i::before { animation: none; opacity: 0; }
  .pf-fx, .pf-flap, .pf-spill, .pf-spark, .pf-leak, .pf-topglow, .pf-shard { display: none; }   /* and open(), build(), shatter() run nothing */
  body.pf-orb .fp-burst { mix-blend-mode: normal; }
}
