/*
 * profile-fx.css — [ÖZEL ROZET] the profile-wide effect of a custom badge
 * (docs/design-system.md § 7.85). One layer over the profile card, in the
 * badge's colour, that lets every click through: lightning across the card,
 * light running round its frame, a neon tube, an aurora over the banner,
 * embers, petals, frost, stardust. It rides on top of everything else on the
 * profile (role, tier, rewards, podium / Lab aura) and replaces none of it.
 *
 * Eighteen effects (2026-10-29: rain, snow, fireflies, synthwave, butterflies,
 * a black hole, hearts, confetti, waves and mist joined the first eight).
 *
 * Performance (docs/performance.md): loops animate only transform / opacity,
 * every loop is longer than 1.2 s so the animation governor rests it idle,
 * offscreen and in the background, never while the profile scrolls (the
 * user, 2026-10-30; the layer carries data-wf-scroll-live). The entrance sits
 * on the root, the loops on its children (the governor never sees a one-shot
 * beside a loop). No
 * filter, blur or blend on anything that moves; waiting layers rest at
 * .001 (never 0: a layer at 0 is not drawn until it shows). Reduced motion
 * and low-spec: the base styles are the still frame.
 *
 * COPY: server/admin/profile-fx.css is this file verbatim (the panel's
 * preview). Change both. The DOM is ProfileFxLayer.tsx, mirrored by
 * server/admin/js/profileFx.js.
 */

/* ── Palette: the badge colour, lifted so a dark one still glows ── */
.pfx,
.pfx-out {
  --fx: #ffc56d;
  --fx-lit: color-mix(in srgb, var(--fx) 78%, #ffffff);
  --fx-a: var(--fx-lit);
  --fx-b: var(--fx-lit);
  --fx-hot: color-mix(in srgb, var(--fx-lit) 45%, #ffffff);
}
@supports (color: oklch(from red l c h)) {
  .pfx,
  .pfx-out {
    --fx-lit: oklch(from var(--fx) clamp(0.74, l, 0.9) c h);
    --fx-a: oklch(from var(--fx) clamp(0.72, l, 0.88) c calc(h + 48));
    --fx-b: oklch(from var(--fx) clamp(0.72, l, 0.88) c calc(h - 48));
  }
}

/* ── Inner layer: the card's own box, under its edge hairline ── */
.pfx {
  position: absolute;
  inset: 0;
  z-index: var(--pfx-z, 14);
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  container-type: size;
  animation: pfx-in 520ms 120ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes pfx-in { from { opacity: 0; } }

/* ── Outer layer: light spilling past the window's edge (frame effects) ── */
.pfx-out {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: pfx-in 700ms 160ms cubic-bezier(0.23, 1, 0.32, 1) both;
}
.pfx-out > i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--fx-lit) 50%, transparent),
    0 0 26px 2px color-mix(in srgb, var(--fx-lit) 40%, transparent),
    0 0 80px 10px color-mix(in srgb, var(--fx) 26%, transparent);
  will-change: opacity;
}
.pfx-out--comet > i { animation: pfx-breathe 4.8s ease-in-out infinite; }
.pfx-out--neon > i { animation: pfx-neon 6.2s linear infinite; }
/* In the profile window: behind it, on its grid cell (like .pvx-halo) */
.pvx-overlay > .pfx-out {
  grid-area: 1 / 1 / 2 / 2;
  inset: auto;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  z-index: 0;
  width: var(--pvx-w);
  height: var(--pvx-h);
  border-radius: 20px;
}

/* ── Shared parts ── */
/* A ring on the card's edge (rounded with it); what's inside it shows only there */
.pfx-rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: var(--rim, 2px);
  overflow: hidden;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
/* A light turning round the card's centre, big enough to cover its corners */
.pfx-spin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 142cqmax;
  aspect-ratio: 1;
  translate: -50% -50%;
  will-change: transform;
  animation: pfx-turn var(--spin, 7s) linear infinite;
}
@keyframes pfx-turn { to { rotate: 1turn; } }
@keyframes pfx-breathe { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
/* A tube with one stutter per cycle (never more: no strobing) */
@keyframes pfx-neon {
  0%, 100% { opacity: 0.78; }
  40%, 62% { opacity: 1; }
  62.8% { opacity: 0.38; }
  64% { opacity: 1; }
  82% { opacity: 0.9; }
}
.pfx-bloom {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.pfx-sky {
  position: absolute;
  inset: 0;
}
/* A star glint: a point and a cross of light that opens, turns, closes */
.pfx-glint {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  background:
    radial-gradient(circle, #ffffff 0 6%, color-mix(in srgb, var(--fx-hot) 70%, transparent) 14%, transparent 34%),
    linear-gradient(90deg, transparent 46%, rgba(255, 255, 255, 0.9) 50%, transparent 54%),
    linear-gradient(0deg, transparent 46%, rgba(255, 255, 255, 0.9) 50%, transparent 54%);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 70%);
  mask: radial-gradient(circle, #000 18%, transparent 70%);
  opacity: 0.001;
  animation: pfx-twinkle var(--d) ease-in-out var(--dl) infinite;
}
@keyframes pfx-twinkle {
  0%, 100% { transform: scale(0.2) rotate(0deg); opacity: 0.001; }
  14% { transform: scale(1) rotate(45deg); opacity: 1; }
  30% { transform: scale(0.3) rotate(90deg); opacity: 0.001; }
}

/* ============================================================
   STORM — lightning across the whole card. A charged sky, sparks
   crawling round the frame, three bolts striking at co-prime
   periods (they read as random); each strike lights the card from
   where it lands. One light pulse per strike, the bolt flickers
   twice inside it (thin lines: under the flash threshold).
   ============================================================ */
.pfx--storm .pfx-sky {
  background:
    radial-gradient(70% 36% at 50% -6%, color-mix(in srgb, var(--fx-lit) 14%, transparent), transparent 70%),
    radial-gradient(36% 28% at 0% 0%, color-mix(in srgb, var(--fx) 16%, transparent), transparent 72%),
    radial-gradient(36% 28% at 100% 0%, color-mix(in srgb, var(--fx) 16%, transparent), transparent 72%);
}
.pfx--storm .pfx-rim {
  --rim: 1.5px;
  background: color-mix(in srgb, var(--fx-lit) 16%, transparent);
}
.pfx--storm .pfx-spin {
  --spin: 9s;
  background: conic-gradient(from 0turn,
    transparent 0turn, transparent 0.08turn,
    color-mix(in srgb, var(--fx-lit) 70%, transparent) 0.1turn, transparent 0.12turn,
    transparent 0.33turn,
    color-mix(in srgb, var(--fx-hot) 85%, transparent) 0.355turn, transparent 0.37turn,
    transparent 0.6turn,
    color-mix(in srgb, var(--fx-lit) 60%, transparent) 0.62turn, transparent 0.645turn,
    transparent 0.82turn,
    color-mix(in srgb, var(--fx-lit) 70%, transparent) 0.84turn, transparent 0.86turn);
}
.pfx-strike {
  position: absolute;
  inset: 0;
}
.pfx-bolt-flash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(34% 64% at var(--x) 0%, color-mix(in srgb, var(--fx-hot) 30%, transparent) 0%, color-mix(in srgb, var(--fx-lit) 12%, transparent) 45%, transparent 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--fx-lit) 9%, transparent), transparent 60%);
  opacity: 0.001;
  will-change: opacity;
  animation: pfx-flash var(--d) linear var(--dl) infinite;
}
.pfx-bolt-line {
  position: absolute;
  top: -1%;
  left: var(--x);
  width: clamp(56px, 15cqw, 170px);
  height: var(--h);
  translate: -50% 0;
  rotate: var(--r);
  transform-origin: 50% 0;
  overflow: visible;
  opacity: 0.001;
  will-change: opacity;
  animation: pfx-strike var(--d) linear var(--dl) infinite;
}
.pfx-bolt-line path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.pfx-bolt-w path { stroke: var(--fx-lit); stroke-opacity: 0.2; stroke-width: 10px; }
.pfx-bolt-m path { stroke: var(--fx-lit); stroke-opacity: 0.9; stroke-width: 3.2px; }
.pfx-bolt-c path { stroke: #ffffff; stroke-width: 1.3px; }
.pfx-bolt-w .is-branch { stroke-width: 6px; }
.pfx-bolt-m .is-branch { stroke-width: 1.8px; }
.pfx-bolt-c .is-branch { stroke-width: 0.8px; }
@keyframes pfx-strike {
  0%, 85% { opacity: 0.001; }
  85.6% { opacity: 1; }
  86.6% { opacity: 0.25; }
  87.6% { opacity: 0.95; }
  90.5% { opacity: 0.35; }
  93%, 100% { opacity: 0.001; }
}
@keyframes pfx-flash {
  0%, 85% { opacity: 0.001; }
  85.8% { opacity: 1; }
  92% { opacity: 0.2; }
  96%, 100% { opacity: 0.001; }
}
/* A strike never freezes lit: when the governor rests the loops (idle,
   background, a game; never scrolling) the bolts go back to waiting */
html.wf-idle .pfx-bolt-line,
html.wf-idle .pfx-bolt-flash,
html.wf-power-save .pfx-bolt-line,
html.wf-power-save .pfx-bolt-flash,
body.window-unfocused .pfx-bolt-line,
body.window-unfocused .pfx-bolt-flash,
body.game-active .pfx-bolt-line,
body.game-active .pfx-bolt-flash { animation: none; }

/* ============================================================
   COMET — light round the frame: a faint ring, two comets racing
   it (a crisp line and its bloom turn together), the card's edge
   breathing in their colour; in the window, light spills outside.
   ============================================================ */
.pfx--comet .pfx-bloom {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--fx-lit) 18%, transparent),
    inset 0 0 40px -6px color-mix(in srgb, var(--fx-lit) 40%, transparent);
  animation: pfx-breathe 4.8s ease-in-out infinite;
}
.pfx--comet .pfx-rim {
  --rim: 2px;
  background: color-mix(in srgb, var(--fx-lit) 20%, transparent);
}
/* The bloom: the same light, fading in from the edge (no ring) */
.pfx--comet .pfx-rim.is-soft {
  padding: 0;
  background: none;
  opacity: 0.42;
  -webkit-mask:
    linear-gradient(90deg, #000, transparent 18px),
    linear-gradient(270deg, #000, transparent 18px),
    linear-gradient(180deg, #000, transparent 18px),
    linear-gradient(0deg, #000, transparent 18px);
  -webkit-mask-composite: source-over;
  mask-composite: add;
}
.pfx--comet .pfx-spin {
  --spin: 6.5s;
  background: conic-gradient(from 0turn,
    transparent 0turn, transparent 0.24turn,
    color-mix(in srgb, var(--fx-lit) 22%, transparent) 0.38turn,
    var(--fx-lit) 0.47turn, var(--fx-hot) 0.495turn, #ffffff 0.5turn, transparent 0.5turn,
    transparent 0.74turn,
    color-mix(in srgb, var(--fx-lit) 22%, transparent) 0.88turn,
    var(--fx-lit) 0.97turn, var(--fx-hot) 0.995turn, #ffffff 1turn);
}

/* ============================================================
   NEON — a lit tube round the card: the tube, its white core, its
   light inside the card; one stutter per cycle, the light outside
   the window stutters with it.
   ============================================================ */
.pfx-neon {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  will-change: opacity;
  animation: pfx-neon 6.2s linear infinite;
}
.pfx--neon .pfx-bloom {
  box-shadow:
    inset 0 0 22px 0 color-mix(in srgb, var(--fx-lit) 42%, transparent),
    inset 0 0 64px -10px color-mix(in srgb, var(--fx) 40%, transparent);
}
.pfx-tube {
  --rim: 2.5px;
  background: var(--fx-lit);
}
.pfx-tube-core {
  inset: 0.75px;
  --rim: 0.9px;
  background: rgba(255, 255, 255, 0.78);
}

/* ============================================================
   AURORA — a curtain of light over the banner: two veils drifting
   against each other through a still, uneven pleat.
   ============================================================ */
.pfx--aurora .pfx-sky {
  background: radial-gradient(80% 40% at 50% -10%, color-mix(in srgb, var(--fx-lit) 12%, transparent), transparent 70%);
}
.pfx-veil {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 64%;
  overflow: hidden;
  -webkit-mask:
    linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.85) 40%, transparent 100%),
    repeating-linear-gradient(90deg, #000 0 23px, rgba(0, 0, 0, 0.8) 41px, #000 63px, rgba(0, 0, 0, 0.86) 79px, #000 107px);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.pfx-veil > i {
  position: absolute;
  inset: -8% -50%;
  will-change: transform;
}
.pfx-veil > i:nth-child(1) {
  background: linear-gradient(100deg,
    transparent 14%,
    color-mix(in srgb, var(--fx-a) 26%, transparent) 26%,
    color-mix(in srgb, var(--fx-lit) 32%, transparent) 34%,
    transparent 46%,
    color-mix(in srgb, var(--fx-b) 24%, transparent) 60%,
    transparent 72%);
  animation: pfx-sway 17s ease-in-out infinite alternate;
}
.pfx-veil > i:nth-child(2) {
  background: linear-gradient(78deg,
    transparent 8%,
    color-mix(in srgb, var(--fx-b) 22%, transparent) 22%,
    transparent 36%,
    color-mix(in srgb, var(--fx-lit) 26%, transparent) 52%,
    color-mix(in srgb, var(--fx-a) 20%, transparent) 62%,
    transparent 78%);
  animation: pfx-sway 23s ease-in-out -6s infinite alternate-reverse;
}
@keyframes pfx-sway {
  from { transform: translateX(-16%) skewX(-8deg); }
  to { transform: translateX(16%) skewX(6deg); }
}

/* ============================================================
   EMBERS — heat at the foot of the card, sparks rising out of it.
   ============================================================ */
.pfx-heat {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(0deg,
    color-mix(in srgb, var(--fx) 34%, transparent) 0%,
    color-mix(in srgb, var(--fx-lit) 12%, transparent) 40%,
    transparent 100%);
  animation: pfx-breathe 5.6s ease-in-out infinite;
}
.pfx-ember {
  position: absolute;
  bottom: -6px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 22%, var(--fx-hot) 40%, var(--fx-lit) 70%);
  box-shadow:
    0 0 8px 2px color-mix(in srgb, var(--fx-lit) 85%, transparent),
    0 0 20px 5px color-mix(in srgb, var(--fx) 50%, transparent);
  opacity: 0.001;
  animation: pfx-rise var(--d) linear var(--dl) infinite;
}
@keyframes pfx-rise {
  0% { transform: translate(0, 0) scale(1); opacity: 0.001; }
  10% { opacity: 1; }
  55% { transform: translate(calc(var(--dx) * 0.55), -48cqh) scale(0.82); opacity: 0.85; }
  100% { transform: translate(var(--dx), -86cqh) scale(0.3); opacity: 0.001; }
}

/* ============================================================
   PETALS — leaves of the badge's colour drifting down the card.
   ============================================================ */
.pfx--petals .pfx-sky {
  background: radial-gradient(70% 34% at 50% -8%, color-mix(in srgb, var(--fx-lit) 10%, transparent), transparent 70%);
}
.pfx-petal {
  position: absolute;
  top: -22px;
  left: var(--x);
  width: var(--s);
  height: calc(var(--s) * 0.68);
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, var(--fx-hot) 0%, var(--fx-lit) 55%, color-mix(in srgb, var(--fx) 82%, #000000) 100%);
  box-shadow: 0 0 10px -2px color-mix(in srgb, var(--fx-lit) 60%, transparent);
  opacity: 0.001;
  animation: pfx-fall var(--d) ease-in-out var(--dl) infinite;
}
@keyframes pfx-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.001; }
  8% { opacity: 0.9; }
  50% { transform: translate(var(--dx), 55cqh) rotate(calc(var(--rot) * 0.5)); }
  88% { opacity: 0.75; }
  100% { transform: translate(calc(var(--dx) * -0.5), calc(100cqh + 44px)) rotate(var(--rot)); opacity: 0.001; }
}

/* ============================================================
   FROST — rime in the corners, crystals growing from two of them,
   a cold edge breathing, glints catching along it.
   ============================================================ */
.pfx-rime {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(42% 34% at 0% 0%, color-mix(in srgb, var(--fx-hot) 30%, transparent), transparent 70%),
    radial-gradient(38% 30% at 100% 0%, color-mix(in srgb, var(--fx-lit) 18%, transparent), transparent 70%),
    radial-gradient(40% 32% at 0% 100%, color-mix(in srgb, var(--fx-lit) 16%, transparent), transparent 70%),
    radial-gradient(46% 36% at 100% 100%, color-mix(in srgb, var(--fx-hot) 28%, transparent), transparent 72%);
}
.pfx-crystal {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(110px, 20cqw, 200px);
  aspect-ratio: 1;
  overflow: visible;
}
.pfx-crystal.is-far {
  left: auto;
  top: auto;
  right: 0;
  bottom: 0;
  rotate: 180deg;
}
.pfx-crystal path {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
/* A cold light round each branch, then the branch itself */
.pfx-crystal path { stroke: color-mix(in srgb, var(--fx-hot) 85%, transparent); stroke-width: 1px; }
.pfx-crystal path.is-wide { stroke: color-mix(in srgb, var(--fx-lit) 22%, transparent); stroke-width: 4px; }
.pfx-ice {
  --rim: 1.5px;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--fx-hot) 70%, transparent),
    color-mix(in srgb, var(--fx-lit) 25%, transparent) 40%,
    color-mix(in srgb, var(--fx-lit) 15%, transparent) 60%,
    color-mix(in srgb, var(--fx-hot) 60%, transparent));
  animation: pfx-breathe 6s ease-in-out infinite;
}

/* ============================================================
   STARDUST — two sheets of stars rising at different speeds (each
   moves exactly one tile: seamless at any height), a faint nebula,
   a few stars catching the light.
   ============================================================ */
.pfx-nebula {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 34% at 18% 12%, color-mix(in srgb, var(--fx-a) 20%, transparent), transparent 70%),
    radial-gradient(46% 30% at 84% 22%, color-mix(in srgb, var(--fx-b) 18%, transparent), transparent 70%),
    radial-gradient(60% 30% at 50% 100%, color-mix(in srgb, var(--fx) 14%, transparent), transparent 70%);
}
.pfx-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask: linear-gradient(180deg, #000 0%, #000 50%, rgba(0, 0, 0, 0.4) 100%);
  mask: linear-gradient(180deg, #000 0%, #000 50%, rgba(0, 0, 0, 0.4) 100%);
}
.pfx-stars > i {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  will-change: transform;
}
.pfx-stars > i:nth-child(1) {
  height: calc(100% + 300px);
  background-image:
    radial-gradient(circle 2.25px at 22px 38px, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(circle 1.5px at 140px 90px, var(--fx-hot), transparent),
    radial-gradient(circle 1.8px at 260px 24px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(circle 1.5px at 80px 160px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(circle 2.55px at 210px 190px, var(--fx-lit), transparent),
    radial-gradient(circle 1.5px at 40px 250px, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(circle 1.8px at 170px 270px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(circle 1.5px at 280px 140px, var(--fx-hot), transparent),
    radial-gradient(circle 1.35px at 110px 220px, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(circle 1.5px at 240px 250px, rgba(255, 255, 255, 0.8), transparent);
  background-size: 300px 300px;
  animation: pfx-drift-a 46s linear infinite;
}
.pfx-stars > i:nth-child(2) {
  height: calc(100% + 220px);
  background-image:
    radial-gradient(circle 1.95px at 30px 60px, var(--fx-lit), transparent),
    radial-gradient(circle 1.5px at 150px 30px, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(circle 2.25px at 90px 130px, var(--fx-hot), transparent),
    radial-gradient(circle 1.5px at 200px 170px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(circle 1.5px at 60px 200px, var(--fx-lit), transparent),
    radial-gradient(circle 1.35px at 180px 100px, rgba(255, 255, 255, 0.75), transparent);
  background-size: 220px 220px;
  animation: pfx-drift-b 31s linear infinite;
}
@keyframes pfx-drift-a { to { transform: translateY(-300px); } }
@keyframes pfx-drift-b { to { transform: translateY(-220px); } }

/* ============================================================
   RAIN — neon rain slanting across the card: two sheets of light
   streaks at different depths (each falls a whole number of tiles:
   seamless), splashes opening on the floor of the card.
   ============================================================ */
.pfx--rain .pfx-sky {
  background:
    radial-gradient(90% 40% at 50% -10%, color-mix(in srgb, var(--fx-lit) 13%, transparent), transparent 70%),
    linear-gradient(0deg, color-mix(in srgb, var(--fx) 14%, transparent), transparent 24%);
}
.pfx-rain {
  position: absolute;
  inset: -20% -25%;
  overflow: hidden;
  rotate: 12deg;
}
.pfx-rain > i {
  --fall: 780px;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--fall) * -1);
  height: calc(100% + var(--fall));
  background: linear-gradient(180deg, var(--fx-hot), var(--fx-lit));
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='260'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23fff' stop-opacity='0'/><stop offset='1' stop-color='%23fff'/></linearGradient></defs><g fill='url(%23g)'><rect x='10' y='6' width='1.4' height='52' rx='.7'/><rect x='38' y='128' width='1.4' height='44' rx='.7'/><rect x='66' y='40' width='1.4' height='60' rx='.7'/><rect x='94' y='182' width='1.4' height='48' rx='.7'/><rect x='122' y='92' width='1.4' height='56' rx='.7'/><rect x='24' y='206' width='1.4' height='40' rx='.7'/></g></svg>") 0 0 / 140px 260px repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='260'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23fff' stop-opacity='0'/><stop offset='1' stop-color='%23fff'/></linearGradient></defs><g fill='url(%23g)'><rect x='10' y='6' width='1.4' height='52' rx='.7'/><rect x='38' y='128' width='1.4' height='44' rx='.7'/><rect x='66' y='40' width='1.4' height='60' rx='.7'/><rect x='94' y='182' width='1.4' height='48' rx='.7'/><rect x='122' y='92' width='1.4' height='56' rx='.7'/><rect x='24' y='206' width='1.4' height='40' rx='.7'/></g></svg>") 0 0 / 140px 260px repeat;
  opacity: 0.6;
  will-change: transform;
  animation: pfx-fall-by 1.3s linear infinite;
}
.pfx-rain > i:nth-child(2) {
  --fall: 720px;
  -webkit-mask-size: 96px 180px;
  mask-size: 96px 180px;
  opacity: 0.3;
  animation-duration: 2.4s;
}
@keyframes pfx-fall-by { to { transform: translateY(var(--fall)); } }
.pfx-splash {
  position: absolute;
  left: var(--x);
  bottom: var(--y);
  width: var(--s);
  aspect-ratio: 3 / 1;
  margin-left: calc(var(--s) / -2);
  border-radius: 50%;
  background: radial-gradient(closest-side, transparent 56%, color-mix(in srgb, var(--fx-hot) 85%, transparent) 66%, transparent 80%);
  opacity: 0.001;
  animation: pfx-splash var(--d) ease-out var(--dl) infinite;
}
@keyframes pfx-splash {
  0%, 60% { transform: scale(0.15); opacity: 0.001; }
  63% { opacity: 0.9; }
  100% { transform: scale(1); opacity: 0.001; }
}

/* ============================================================
   SNOW — soft snow at two depths drifting side to side as it falls,
   a few large flakes close to the glass, a cold haze above.
   ============================================================ */
.pfx--snow .pfx-sky {
  background:
    radial-gradient(90% 40% at 50% -10%, color-mix(in srgb, var(--fx-hot) 15%, transparent), transparent 70%),
    linear-gradient(0deg, color-mix(in srgb, var(--fx-lit) 10%, transparent), transparent 30%);
}
.pfx-snow {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.pfx-snow > i {
  position: absolute;
  inset: 0 -40px;
  animation: pfx-drift-x 6s ease-in-out infinite alternate;
}
.pfx-snow > i:nth-child(2) { animation-duration: 8.5s; animation-direction: alternate-reverse; }
@keyframes pfx-drift-x {
  from { transform: translateX(-18px); }
  to { transform: translateX(18px); }
}
.pfx-snow > i > b {
  --fall: 600px;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--fall) * -1);
  height: calc(100% + var(--fall));
  background: color-mix(in srgb, var(--fx-hot) 55%, #ffffff);
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='200'><defs><radialGradient id='d'><stop offset='0' stop-color='%23fff'/><stop offset='.5' stop-color='%23fff' stop-opacity='.75'/><stop offset='1' stop-color='%23fff' stop-opacity='0'/></radialGradient></defs><g fill='url(%23d)'><circle cx='20' cy='30' r='2.6'/><circle cx='90' cy='70' r='2'/><circle cx='140' cy='20' r='2.4'/><circle cx='50' cy='130' r='3'/><circle cx='120' cy='160' r='1.8'/><circle cx='72' cy='186' r='2.2'/><circle cx='10' cy='100' r='1.7'/><circle cx='150' cy='110' r='2.8'/></g></svg>") 0 0 / 160px 200px repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='200'><defs><radialGradient id='d'><stop offset='0' stop-color='%23fff'/><stop offset='.5' stop-color='%23fff' stop-opacity='.75'/><stop offset='1' stop-color='%23fff' stop-opacity='0'/></radialGradient></defs><g fill='url(%23d)'><circle cx='20' cy='30' r='2.6'/><circle cx='90' cy='70' r='2'/><circle cx='140' cy='20' r='2.4'/><circle cx='50' cy='130' r='3'/><circle cx='120' cy='160' r='1.8'/><circle cx='72' cy='186' r='2.2'/><circle cx='10' cy='100' r='1.7'/><circle cx='150' cy='110' r='2.8'/></g></svg>") 0 0 / 160px 200px repeat;
  opacity: 0.85;
  will-change: transform;
  animation: pfx-fall-by 9s linear infinite;
}
.pfx-snow > i:nth-child(2) > b {
  --fall: 560px;
  -webkit-mask-size: 110px 140px;
  mask-size: 110px 140px;
  opacity: 0.45;
  animation-duration: 14s;
}
.pfx-flake {
  position: absolute;
  top: -30px;
  left: var(--x);
  width: var(--s);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 16%, color-mix(in srgb, var(--fx-hot) 55%, transparent) 36%, transparent 70%);
  opacity: 0.001;
  animation: pfx-flake var(--d) ease-in-out var(--dl) infinite;
}
@keyframes pfx-flake {
  0% { transform: translate(0, 0); opacity: 0.001; }
  8% { opacity: 0.85; }
  25% { transform: translate(var(--dx), 26cqh); }
  50% { transform: translate(calc(var(--dx) * -0.6), 52cqh); }
  75% { transform: translate(var(--dx), 78cqh); }
  92% { opacity: 0.7; }
  100% { transform: translate(0, calc(100cqh + 40px)); opacity: 0.001; }
}

/* ============================================================
   FIREFLIES — warm dusk at the foot of the card, small lights
   wandering their own slow paths, each blinking on its own beat.
   ============================================================ */
.pfx-dusk {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 60% at 50% 112%, color-mix(in srgb, var(--fx) 20%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 40%);
}
.pfx-fly {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  animation: var(--path) var(--d) ease-in-out var(--dl) infinite;
}
.pfx-fly > i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0 24%, var(--fx-hot) 46%, transparent 74%);
  box-shadow:
    0 0 10px 3px color-mix(in srgb, var(--fx-lit) 70%, transparent),
    0 0 26px 8px color-mix(in srgb, var(--fx) 32%, transparent);
  opacity: 0.14;
  animation: pfx-blink var(--b) ease-in-out var(--bl) infinite;
}
@keyframes pfx-blink {
  0%, 100% { opacity: 0.12; }
  35% { opacity: 1; }
  55% { opacity: 0.85; }
  75% { opacity: 0.18; }
}
@keyframes pfx-wander-a {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(6cqmin, -5cqmin); }
  50% { transform: translate(11cqmin, 2cqmin); }
  75% { transform: translate(4cqmin, 6cqmin); }
}
@keyframes pfx-wander-b {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(-7cqmin, -4cqmin); }
  60% { transform: translate(-2cqmin, -10cqmin); }
  80% { transform: translate(5cqmin, -3cqmin); }
}
@keyframes pfx-wander-c {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(4cqmin, 4cqmin); }
  55% { transform: translate(-6cqmin, 7cqmin); }
  80% { transform: translate(-8cqmin, -2cqmin); }
}

/* ============================================================
   SYNTHWAVE — a retro horizon low on the card: a striped sun
   sinking into it, a neon grid floor running toward you.
   ============================================================ */
.pfx-retro-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, color-mix(in srgb, var(--fx-a) 18%, transparent) 0%, color-mix(in srgb, var(--fx) 8%, transparent) 28%, transparent 48%);
}
.pfx-sun-clip {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 72%;
  overflow: hidden;
}
.pfx-sun-glow {
  position: absolute;
  left: 50%;
  bottom: -26cqmin;
  width: 70cqmin;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--fx-lit) 30%, transparent) 0%, color-mix(in srgb, var(--fx-a) 12%, transparent) 40%, transparent 68%);
  animation: pfx-breathe 5.4s ease-in-out infinite;
}
.pfx-sun {
  position: absolute;
  left: 50%;
  bottom: -11cqmin;
  width: 32cqmin;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--fx-hot) 0%, var(--fx-lit) 42%, var(--fx-a) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% 46% no-repeat,
    repeating-linear-gradient(180deg, #000 0 6px, transparent 6px 10px) bottom / 100% 54% no-repeat;
  mask:
    linear-gradient(#000 0 0) top / 100% 46% no-repeat,
    repeating-linear-gradient(180deg, #000 0 6px, transparent 6px 10px) bottom / 100% 54% no-repeat;
  opacity: 0.62;
}
.pfx-horizon {
  position: absolute;
  left: 0;
  right: 0;
  top: 72%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fx-hot) 18%, var(--fx-hot) 82%, transparent);
  box-shadow: 0 0 14px 2px color-mix(in srgb, var(--fx-lit) 70%, transparent);
}
.pfx-floor {
  position: absolute;
  left: 0;
  right: 0;
  top: 72%;
  bottom: 0;
  overflow: hidden;
  perspective: 300px;
  perspective-origin: 50% 0;
  -webkit-mask: linear-gradient(180deg, transparent 0%, #000 34%);
  mask: linear-gradient(180deg, transparent 0%, #000 34%);
}
.pfx-floor > i {
  position: absolute;
  left: -60%;
  right: -60%;
  top: 0;
  height: 70cqh;
  transform-origin: 50% 0;
  transform: rotateX(68deg);
}
.pfx-floor > i > b {
  position: absolute;
  left: 0;
  right: 0;
  top: -44px;
  height: calc(100% + 44px);
  background:
    linear-gradient(color-mix(in srgb, var(--fx-lit) 56%, transparent) 0 2px, transparent 2px) 0 0 / 100% 44px,
    linear-gradient(90deg, color-mix(in srgb, var(--fx-lit) 42%, transparent) 0 2px, transparent 2px) 50% 0 / 52px 100%;
  will-change: transform;
  animation: pfx-floor 1.6s linear infinite;
}
@keyframes pfx-floor { to { transform: translateY(44px); } }

/* ============================================================
   BUTTERFLIES — butterflies of light gliding over the card, their
   wings beating three times a loop (one beat at a time is under the
   governor's 1.2 s line, so the beats ride a longer cycle).
   ============================================================ */
.pfx-bfly {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: calc(var(--s) * 0.8);
  animation: var(--path) var(--d) ease-in-out var(--dl) infinite;
}
.pfx-bfly > i {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  animation: pfx-flap var(--f) ease-in-out infinite;
}
.pfx-bfly > i:first-of-type { left: 0; transform-origin: 100% 50%; }
.pfx-bfly > i:last-of-type { right: 0; transform-origin: 0 50%; }
.pfx-bfly > i::before,
.pfx-bfly > i::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 60% 40%, #ffffff 0 6%, var(--fx-hot) 20%, var(--fx-lit) 48%, var(--fx-a) 86%);
  box-shadow: 0 0 12px -2px color-mix(in srgb, var(--fx-lit) 70%, transparent);
}
.pfx-bfly > i::before { top: 0; width: 100%; height: 62%; }
.pfx-bfly > i::after { bottom: 4%; width: 74%; height: 46%; opacity: 0.9; }
.pfx-bfly > i:first-of-type::before { right: 0; rotate: -18deg; transform-origin: 100% 80%; }
.pfx-bfly > i:first-of-type::after { right: 6%; rotate: 22deg; }
.pfx-bfly > i:last-of-type::before { left: 0; rotate: 18deg; transform-origin: 0 80%; }
.pfx-bfly > i:last-of-type::after { left: 6%; rotate: -22deg; }
.pfx-bfly > b {
  position: absolute;
  left: 50%;
  top: 16%;
  width: 8%;
  height: 66%;
  translate: -50% 0;
  border-radius: 99px;
  background: color-mix(in srgb, var(--fx) 40%, #140b12);
}
@keyframes pfx-flap {
  0%, 33%, 66%, 100% { transform: scaleX(1); }
  16% { transform: scaleX(0.18); }
  50% { transform: scaleX(0.24); }
  83% { transform: scaleX(0.2); }
}
@keyframes pfx-glide-a {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); }
  25% { transform: translate(14cqw, -6cqh) rotate(8deg); }
  50% { transform: translate(24cqw, 4cqh) rotate(-4deg); }
  75% { transform: translate(10cqw, 10cqh) rotate(6deg); }
}
@keyframes pfx-glide-b {
  0%, 100% { transform: translate(0, 0) rotate(6deg); }
  30% { transform: translate(-16cqw, 5cqh) rotate(-8deg); }
  60% { transform: translate(-6cqw, -8cqh) rotate(5deg); }
  85% { transform: translate(8cqw, -3cqh) rotate(-4deg); }
}
@keyframes pfx-glide-c {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  20% { transform: translate(10cqw, 8cqh) rotate(7deg); }
  50% { transform: translate(-12cqw, 12cqh) rotate(-6deg); }
  80% { transform: translate(-14cqw, -4cqh) rotate(5deg); }
}

/* ============================================================
   BLACKHOLE — an event horizon over the banner's corner: a black
   core with its photon ring, a tilted accretion disk turning round
   it (its far half behind the core, near half in front), the far
   side of the disk lensed over the top.
   ============================================================ */
.pfx-hole {
  position: absolute;
  right: 8cqw;
  top: 9cqh;
  width: 30cqmin;
  aspect-ratio: 1;
}
.pfx-hole-light {
  position: absolute;
  inset: -35%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--fx-lit) 28%, transparent) 0%, color-mix(in srgb, var(--fx) 12%, transparent) 36%, transparent 66%);
  animation: pfx-breathe 6s ease-in-out infinite;
}
.pfx-disk {
  position: absolute;
  inset: 0;
  transform: rotate(-18deg) scaleY(0.3);
}
.pfx-disk.is-back { clip-path: inset(0 0 50% 0); }
.pfx-disk.is-front { clip-path: inset(50% 0 0 0); }
.pfx-disk > i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0turn,
    var(--fx-hot), var(--fx-lit) 0.12turn, color-mix(in srgb, var(--fx-a) 70%, transparent) 0.3turn,
    transparent 0.45turn, color-mix(in srgb, var(--fx-lit) 60%, transparent) 0.6turn,
    var(--fx-hot) 0.78turn, color-mix(in srgb, var(--fx-b) 70%, transparent) 0.9turn, var(--fx-hot) 1turn);
  -webkit-mask: radial-gradient(circle, transparent 0 33%, #000 37%, #000 56%, rgba(0, 0, 0, 0.4) 72%, transparent 100%);
  mask: radial-gradient(circle, transparent 0 33%, #000 37%, #000 56%, rgba(0, 0, 0, 0.4) 72%, transparent 100%);
  will-change: transform;
  animation: pfx-turn 9s linear infinite;
}
.pfx-lens {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  aspect-ratio: 1;
  translate: -50% -50%;
  rotate: -18deg;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0 56%, color-mix(in srgb, var(--fx-hot) 80%, transparent) 61%, color-mix(in srgb, var(--fx-lit) 30%, transparent) 67%, transparent 73%);
  clip-path: inset(0 0 54% 0);
  animation: pfx-breathe 5s ease-in-out infinite;
}
.pfx-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: #000000;
  box-shadow:
    0 0 0 1.5px color-mix(in srgb, var(--fx-hot) 90%, #ffffff),
    0 0 16px 3px color-mix(in srgb, var(--fx-lit) 70%, transparent),
    0 0 40px 10px color-mix(in srgb, var(--fx) 35%, transparent);
}

/* ============================================================
   HEARTS — hearts rising from the foot of the card, swaying and
   turning as they go; two large soft ones behind the rest.
   ============================================================ */
.pfx--hearts .pfx-sky {
  background: linear-gradient(0deg, color-mix(in srgb, var(--fx) 14%, transparent), transparent 34%);
}
.pfx-heart {
  position: absolute;
  bottom: -34px;
  left: var(--x);
  width: var(--s);
  aspect-ratio: 1;
  background: radial-gradient(circle at 34% 30%, #ffffff 0 7%, var(--fx-hot) 22%, var(--fx-lit) 54%, color-mix(in srgb, var(--fx) 80%, #000000) 100%);
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23fff' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23fff' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/></svg>") center / contain no-repeat;
  opacity: 0.001;
  animation: pfx-heart var(--d) ease-in-out var(--dl) infinite;
}
.pfx-heart.is-soft { --peak: 0.3; }
@keyframes pfx-heart {
  0% { transform: translate(0, 0) scale(0.6) rotate(0deg); opacity: 0.001; }
  10% { opacity: var(--peak, 0.95); }
  50% { transform: translate(var(--dx), -48cqh) scale(1) rotate(var(--r)); }
  84% { opacity: calc(var(--peak, 0.95) * 0.65); }
  100% { transform: translate(calc(var(--dx) * -0.4), -96cqh) scale(0.85) rotate(calc(var(--r) * -1)); opacity: 0.001; }
}

/* ============================================================
   CONFETTI — a celebration: strips, squares and dots in the badge's
   colours falling and tumbling (they flip as they turn).
   ============================================================ */
.pfx--confetti .pfx-sky {
  background: radial-gradient(90% 36% at 50% -8%, color-mix(in srgb, var(--fx-lit) 14%, transparent), transparent 70%);
}
.pfx-conf {
  position: absolute;
  top: -24px;
  left: var(--x);
  width: var(--w);
  height: var(--h);
  border-radius: var(--br);
  background: var(--fx-lit);
  opacity: 0.001;
  animation: pfx-conf var(--d) linear var(--dl) infinite;
}
.pfx-conf.is-t1 { background: var(--fx-a); }
.pfx-conf.is-t2 { background: var(--fx-b); }
.pfx-conf.is-t3 { background: #ffffff; }
@keyframes pfx-conf {
  0% { transform: translate(0, 0) rotateZ(0deg) rotateY(0deg); opacity: 0.001; }
  6% { opacity: 1; }
  50% { transform: translate(var(--dx), 52cqh) rotateZ(calc(var(--rz) * 0.5)) rotateY(calc(var(--ry) * 0.5)); }
  90% { opacity: 0.9; }
  100% { transform: translate(calc(var(--dx) * 0.4), calc(100cqh + 48px)) rotateZ(var(--rz)) rotateY(var(--ry)); opacity: 0.001; }
}

/* ============================================================
   WAVES — the sea at the foot of the card: three swells moving at
   their own speeds (each slides exactly one tile: seamless), a few
   bubbles rising through them.
   ============================================================ */
.pfx-sea {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  overflow: hidden;
}
.pfx-sea > i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: var(--h);
  -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'><path fill='%23fff' d='M0 58 Q62.5 34 125 58 T250 58 T375 58 T500 58 T625 58 T750 58 T875 58 T1000 58 V100 H0Z'/></svg>") 0 0 / 50% 100% repeat-x;
  mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'><path fill='%23fff' d='M0 58 Q62.5 34 125 58 T250 58 T375 58 T500 58 T625 58 T750 58 T875 58 T1000 58 V100 H0Z'/></svg>") 0 0 / 50% 100% repeat-x;
  will-change: transform;
  animation: pfx-sea var(--d) linear infinite;
}
.pfx-sea > i:nth-child(1) {
  --h: 100%;
  --d: 22s;
  background: linear-gradient(180deg, color-mix(in srgb, var(--fx-b) 22%, transparent), color-mix(in srgb, var(--fx) 10%, transparent));
  -webkit-mask-position: 30% 0;
  mask-position: 30% 0;
}
.pfx-sea > i:nth-child(2) {
  --h: 76%;
  --d: 14s;
  background: linear-gradient(180deg, color-mix(in srgb, var(--fx-lit) 30%, transparent), color-mix(in srgb, var(--fx) 14%, transparent));
  animation-direction: reverse;
}
.pfx-sea > i:nth-child(3) {
  --h: 52%;
  --d: 9s;
  background: linear-gradient(180deg, color-mix(in srgb, var(--fx-hot) 58%, transparent), color-mix(in srgb, var(--fx-lit) 20%, transparent) 55%);
  -webkit-mask-position: 70% 0;
  mask-position: 70% 0;
}
@keyframes pfx-sea { to { transform: translateX(-50%); } }
.pfx-bubble {
  position: absolute;
  bottom: -10px;
  left: var(--x);
  width: var(--s);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.9) 0 14%, transparent 30%), radial-gradient(circle, transparent 54%, color-mix(in srgb, var(--fx-hot) 70%, transparent) 64%, transparent 74%);
  opacity: 0.001;
  animation: pfx-bubble var(--d) ease-in var(--dl) infinite;
}
@keyframes pfx-bubble {
  0% { transform: translate(0, 0); opacity: 0.001; }
  12% { opacity: 0.85; }
  50% { transform: translate(6px, -13cqh); }
  100% { transform: translate(-4px, -27cqh); opacity: 0.001; }
}

/* ============================================================
   MIST — fog banks drifting across the card against each other,
   heavier toward its foot, the corners sinking into shade.
   ============================================================ */
.pfx-mist {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.7) 40%, #000 70%);
  mask: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.7) 40%, #000 70%);
}
.pfx-mist > i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 200%;
  background:
    radial-gradient(24% 11% at 26% 80%, color-mix(in srgb, var(--fx-hot) 30%, transparent), transparent 72%),
    radial-gradient(27% 9% at 70% 66%, color-mix(in srgb, var(--fx-lit) 22%, transparent), transparent 72%),
    radial-gradient(21% 8% at 46% 47%, color-mix(in srgb, var(--fx-hot) 16%, transparent), transparent 72%),
    radial-gradient(25% 10% at 34% 95%, color-mix(in srgb, var(--fx-lit) 26%, transparent), transparent 72%),
    radial-gradient(22% 9% at 74% 90%, color-mix(in srgb, var(--fx-hot) 24%, transparent), transparent 72%);
  background-size: 50% 100%;
  background-repeat: repeat-x;
  will-change: transform;
  animation: pfx-sea 48s linear infinite;
}
.pfx-mist > i:nth-child(2) {
  background:
    radial-gradient(25% 10% at 66% 86%, color-mix(in srgb, var(--fx-a) 22%, transparent), transparent 72%),
    radial-gradient(22% 9% at 28% 60%, color-mix(in srgb, var(--fx-hot) 18%, transparent), transparent 72%),
    radial-gradient(24% 8% at 72% 40%, color-mix(in srgb, var(--fx-b) 14%, transparent), transparent 72%),
    radial-gradient(20% 9% at 30% 84%, color-mix(in srgb, var(--fx-lit) 20%, transparent), transparent 72%);
  background-size: 50% 100%;
  background-repeat: repeat-x;
  animation-duration: 66s;
  animation-direction: reverse;
}
.pfx-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.28) 100%);
}

/* ── Reduced motion / low-spec: the still frame (the base styles) ── */
@media (prefers-reduced-motion: reduce) {
  .pfx,
  .pfx-out,
  .pfx-out > i,
  .pfx-spin,
  .pfx-bloom,
  .pfx-neon,
  .pfx-ice,
  .pfx-heat,
  .pfx-veil > i,
  .pfx-stars > i,
  .pfx-bolt-line,
  .pfx-bolt-flash,
  .pfx-ember,
  .pfx-petal,
  .pfx-rain > i,
  .pfx-splash,
  .pfx-snow > i,
  .pfx-snow > i > b,
  .pfx-flake,
  .pfx-fly,
  .pfx-fly > i,
  .pfx-sun-glow,
  .pfx-floor > i > b,
  .pfx-bfly,
  .pfx-bfly > i,
  .pfx-hole-light,
  .pfx-disk > i,
  .pfx-lens,
  .pfx-heart,
  .pfx-conf,
  .pfx-sea > i,
  .pfx-bubble,
  .pfx-mist > i,
  .pfx-glint { animation: none; }
}
.perf-mode-low-spec .pfx-out > i,
.perf-mode-low-spec .pfx-spin,
.perf-mode-low-spec .pfx-bloom,
.perf-mode-low-spec .pfx-neon,
.perf-mode-low-spec .pfx-ice,
.perf-mode-low-spec .pfx-heat,
.perf-mode-low-spec .pfx-veil > i,
.perf-mode-low-spec .pfx-stars > i,
.perf-mode-low-spec .pfx-bolt-line,
.perf-mode-low-spec .pfx-bolt-flash,
.perf-mode-low-spec .pfx-ember,
.perf-mode-low-spec .pfx-petal,
.perf-mode-low-spec .pfx-rain > i,
.perf-mode-low-spec .pfx-splash,
.perf-mode-low-spec .pfx-snow > i,
.perf-mode-low-spec .pfx-snow > i > b,
.perf-mode-low-spec .pfx-flake,
.perf-mode-low-spec .pfx-fly,
.perf-mode-low-spec .pfx-fly > i,
.perf-mode-low-spec .pfx-sun-glow,
.perf-mode-low-spec .pfx-floor > i > b,
.perf-mode-low-spec .pfx-bfly,
.perf-mode-low-spec .pfx-bfly > i,
.perf-mode-low-spec .pfx-hole-light,
.perf-mode-low-spec .pfx-disk > i,
.perf-mode-low-spec .pfx-lens,
.perf-mode-low-spec .pfx-heart,
.perf-mode-low-spec .pfx-conf,
.perf-mode-low-spec .pfx-sea > i,
.perf-mode-low-spec .pfx-bubble,
.perf-mode-low-spec .pfx-mist > i,
.perf-mode-low-spec .pfx-glint { animation: none; }
