/*
 * Sword & Shield era finishes (sets swsh1 to swsh12pt5, Champion's Path,
 * Shining Fates, Celebrations, Pokémon GO), each drawn from photos of the
 * physical cards (/mnt/project-files/sword-shield/texture-refs, one folder
 * per finish) and TCG Live's foil and etch maps. The research is in the
 * card-textures skill, .claude/skills/card-textures/reference/swsh.md.
 *
 * Layer ideas follow pokemon-cards-css by Simon Goellner (@simeydotme),
 * GPL-3.0, which was built for exactly these rarities; see NOTICE.md. The
 * streak tile is our own (make_swsh_streaks.py).
 *
 * Every finish rides on a second class next to the older pattern class
 * (swshPattern() in js/foil-maps.js): `foil-holo swsh-holo`, `foil-ex
 * swsh-v`, `foil-ultra swsh-vmax`... so the Classic engine is untouched.
 * `era-swsh` marks every Sword & Shield print. The full-art family keeps
 * sv-fullart.css's Ultra Rare and gold recipes (SUN_PILLAR / ETCHED and the
 * gold glitter are the same stock in both eras) and only tunes them here;
 * the rest is new.
 *
 * Specificity: the `era-swsh` class is repeated so each rule carries ten
 * classes, one more than sv-fullart.css and shiny-vault.css, and the sheet
 * loads last. Rules for a resting card carry twelve.
 *
 * Rest state (PR 5): a resting card paints `.foil` alone; the pseudo layers
 * and `.glare` only exist while a card is held or settling.
 */

body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh {
  --swsh-streaks: url("/assets/foil/swsh-streaks-v2.webp");
  --swsh-glitter: url("/assets/foil/glitter.png");
  --swsh-flecks: url("/assets/foil/glitter-flecks.webp");
  --swsh-ice: url("/assets/foil/celebration/cracked-ice.webp");
  --swsh-cosmos: url("/assets/foil/cosmos.png");
  --swsh-spectrum: hsl(2, 100%, 73%), hsl(53, 100%, 69%), hsl(93, 100%, 69%),
    hsl(176, 100%, 76%), hsl(228, 100%, 74%), hsl(283, 100%, 73%), hsl(2, 100%, 73%);
  --seed-pos: calc(var(--seed-x, 0.5) * 100%) calc(var(--seed-y, 0.5) * 100%);
}

/* ---- Shared shape for the finishes drawn here ------------------------------
   (The full-art family, swsh-vfa / swsh-vmax / swsh-vstar / swsh-tfa /
   swsh-gold, keeps sv-fullart.css's layers and is not reset.) */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-holo, .swsh-v, .swsh-tg, .swsh-rainbow, .swsh-amazing, .swsh-radiant, .swsh-shiny, .swsh-classic) .foil {
  background-repeat: repeat;
  opacity: calc((0.18 + var(--card-opacity) * 0.82) * var(--foil-strength, 1));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-holo, .swsh-v, .swsh-tg, .swsh-rainbow, .swsh-amazing, .swsh-radiant, .swsh-shiny, .swsh-classic):not(.lit):not(.settling) .foil {
  opacity: calc(0.18 * var(--foil-strength, 1));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-holo, .swsh-v, .swsh-tg, .swsh-rainbow, .swsh-amazing, .swsh-radiant, .swsh-shiny, .swsh-classic) .foil::before,
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-holo, .swsh-v, .swsh-tg, .swsh-rainbow, .swsh-amazing, .swsh-radiant, .swsh-shiny, .swsh-classic) .foil::after {
  /* Clear what the older recipes put here; each finish sets its own. */
  background-image: none;
  background-size: auto;
  background-position: center;
  background-repeat: repeat;
  background-blend-mode: normal;
  mix-blend-mode: normal;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
  clip-path: none;
  border-radius: 0;
  opacity: 1;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-holo, .swsh-v, .swsh-tg, .swsh-rainbow, .swsh-amazing, .swsh-radiant, .swsh-shiny, .swsh-classic) .glare::after {
  background: none;
  -webkit-mask-image: none;
  mask-image: none;
  mix-blend-mode: normal;
  filter: none;
  opacity: 1;
}

/* ---- Rare Holo: the brushed window holo ---------------------------------------
   Photos (Rapidash SIT 22, Infernape BRS, Charizard VIV 25): the art
   background is a foil of fine vertical brushed lines; tall bands of light
   slide sideways across it as the card tilts, silver going to pale blue,
   magenta and gold; the Pokémon, frame and text box are print (the map, or
   the layout's window on the Classic Collection). Upstream's regular holo,
   which was drawn from these cards: a 110deg rainbow sliding fast over 1px
   scanlines, two counter-tracked bar families, a luminosity hot spot. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-holo .foil {
  --scan: 2px;
  background-image:
    repeating-linear-gradient(110deg,
      var(--violet), var(--blue), var(--green), var(--yellow), var(--red),
      var(--violet), var(--blue), var(--green), var(--yellow), var(--red),
      var(--violet), var(--blue), var(--green), var(--yellow), var(--red)),
    repeating-linear-gradient(90deg,
      #222 0, #222 var(--scan), #999 var(--scan), #999 calc(var(--scan) * 2));
  background-position:
    calc(((50% - var(--background-x)) * 2.6) + 50%) calc(((50% - var(--background-y)) * 3.5) + 50%),
    center;
  background-size: 400% 400%, auto;
  background-blend-mode: overlay;
  filter: brightness(1.3) contrast(1.2) saturate(1.15);
  mix-blend-mode: color-dodge;
}
/* Resting, the brushed silver shows more than the colour. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-holo:not(.lit):not(.settling) .foil {
  filter: brightness(0.9) contrast(1.1) saturate(0.6);
  opacity: calc(0.22 * var(--foil-strength, 1));
}
/* The bands: two families of vertical bars at different rates. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-holo .foil::before {
  --bars: 3%;
  --bar-color: hsla(0, 0%, 70%, 1);
  --bar-bg: hsla(0, 0%, 0%, 1);
  background-image:
    repeating-linear-gradient(90deg,
      var(--bar-bg) calc(var(--bars) * 2), var(--bar-color) calc(var(--bars) * 3),
      var(--bar-bg) calc(var(--bars) * 3.5), var(--bar-color) calc(var(--bars) * 4),
      var(--bar-bg) calc(var(--bars) * 5), var(--bar-bg) calc(var(--bars) * 14)),
    repeating-linear-gradient(90deg,
      var(--bar-bg) calc(var(--bars) * 2), var(--bar-color) calc(var(--bars) * 3),
      var(--bar-bg) calc(var(--bars) * 3.5), var(--bar-color) calc(var(--bars) * 4),
      var(--bar-bg) calc(var(--bars) * 5), var(--bar-bg) calc(var(--bars) * 10));
  background-position:
    clamp(0%, calc((((50% - var(--background-x)) * 1.65) + 50%) + (var(--background-y) * 0.5)), 100%) var(--background-x),
    clamp(0%, calc((((50% - var(--background-x)) * -0.9) + 50%) - (var(--background-y) * 0.75)), 100%) var(--background-y);
  background-size: 200% 200%, 200% 200%;
  background-blend-mode: screen;
  filter: brightness(1.15) contrast(1.1);
  mix-blend-mode: hard-light;
}
/* The hot spot: only the foil near the light shows its colour. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-holo .foil::after {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 92%, 0.9) 0%, hsla(0, 0%, 70%, 0.6) 40%, hsla(0, 0%, 25%, 0.9) 100%);
  background-size: cover;
  mix-blend-mode: luminosity;
  filter: brightness(0.75) contrast(2);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-holo .glare {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsl(180, 100%, 95%) 5%, hsla(0, 0%, 39%, 0.25) 55%, hsla(0, 0%, 0%, 0.36) 110%);
  mix-blend-mode: overlay;
  filter: brightness(0.8) contrast(1.5);
  opacity: calc(var(--card-opacity) * 0.8);
}

/* ---- Celebrations 001-025: whole-face pearl holo ---------------------------
   Photos (Lugia 022, Lunala 015, flat and lit): every card of the 25 is foil
   over the whole face inside the yellow frame, text box included. The sheen
   is a soft pearl, pale rainbow patches drifting over a fine galaxy of
   specks, with no brushed lines and no bars; the 25th logo and the text
   stay matte print. Live's maps give the Rares a window only, so the map
   is dropped and the face is cut with an inset. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-cel .foil,
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-cel .glare {
  clip-path: inset(3.4% 3.8% 3.4% 3.8% round 2.2% / 1.6%);
  border-radius: 0;
  -webkit-mask-image: var(--art);
  mask-image: var(--art);
  -webkit-mask-composite: source-over;
  mask-composite: add;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-cel .foil {
  background-image:
    var(--swsh-cosmos),
    radial-gradient(ellipse 60% 45% at calc(var(--pointer-x) * 0.6 + 20%) calc(var(--pointer-y) * 0.5 + 25%),
      hsla(330, 70%, 80%, 0.9) 0%, hsla(330, 70%, 80%, 0) 70%),
    radial-gradient(ellipse 55% 50% at calc(100% - var(--pointer-x) * 0.6) calc(var(--pointer-y) * 0.7 + 15%),
      hsla(160, 60%, 78%, 0.9) 0%, hsla(160, 60%, 78%, 0) 70%),
    radial-gradient(ellipse 65% 40% at calc(var(--pointer-x) * 0.4 + 30%) calc(100% - var(--pointer-y) * 0.6),
      hsla(210, 70%, 80%, 0.9) 0%, hsla(210, 70%, 80%, 0) 70%),
    radial-gradient(ellipse 50% 45% at calc(100% - var(--pointer-x) * 0.5) calc(100% - var(--pointer-y) * 0.4),
      hsla(50, 80%, 80%, 0.9) 0%, hsla(50, 80%, 80%, 0) 70%),
    radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
      #8c8c8c 0%, #3c3c3c 45%, #101010 100%);
  background-position: var(--seed-pos), center, center, center, center, center;
  background-size: 34% auto, cover, cover, cover, cover, cover;
  background-blend-mode: screen, normal, normal, normal, normal, multiply;
  filter: brightness(calc(0.55 + var(--pointer-from-center) * 0.3)) contrast(1.15) saturate(0.8);
  mix-blend-mode: color-dodge;
  opacity: calc(var(--card-opacity) * 0.45 * var(--foil-strength, 1));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-cel:not(.lit):not(.settling) .foil {
  filter: brightness(0.8) contrast(1.1) saturate(0.6);
  opacity: calc(0.2 * var(--foil-strength, 1));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-cel .foil::before {
  background-image: none;
}
/* Only the pearl near the light shows; the far side goes grey, never dark. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-cel .foil::after {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 95%, 0.9) 0%, hsla(0, 0%, 75%, 0.6) 45%, hsla(0, 0%, 40%, 0.9) 100%);
  background-size: cover;
  mix-blend-mode: luminosity;
  filter: brightness(0.85) contrast(1.6);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-cel .glare {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsl(0, 0%, 96%) 5%, hsla(0, 0%, 45%, 0.2) 55%, hsla(0, 0%, 0%, 0.3) 110%);
  mix-blend-mode: overlay;
  filter: brightness(0.85) contrast(1.3);
  opacity: calc(var(--card-opacity) * 0.7);
}

/* ---- Celebrations' Classic Collection: confetti holofoil --------------------
   No TCG Live map. Photos (Charizard 4/102, graded "Confetti Holofoil";
   Blastoise 2/102, Venusaur 15/102 flat): the whole card face is a dense
   galaxy of tiny light flecks, strongest in the window, faint on the yellow
   frame, each fleck flashing white or a pale colour on its own as the card
   turns. No bands, no wash: the colour lives in the flecks. Two copies of
   the galaxy at different scales move against each other, so flecks wink. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-classic .foil,
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-classic .glare {
  clip-path: inset(3.4% 3.8% 3.4% 3.8% round 2.2% / 1.6%);
  border-radius: 0;
  -webkit-mask-image: var(--art);
  mask-image: var(--art);
  -webkit-mask-composite: source-over;
  mask-composite: add;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-classic .foil {
  background-image:
    var(--swsh-cosmos),
    var(--swsh-cosmos),
    repeating-linear-gradient(115deg,
      var(--violet), var(--blue), var(--green), var(--yellow), var(--red),
      var(--violet), var(--blue), var(--green), var(--yellow), var(--red)),
    radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
      #9a9a9a 0%, #444 40%, #141414 100%);
  background-position:
    calc(var(--seed-x, 0.5) * 100% + (50% - var(--background-x)) * 0.35) calc(var(--seed-y, 0.5) * 100% + (50% - var(--background-y)) * 0.35),
    calc(var(--seed-y, 0.5) * 100% - (50% - var(--background-x)) * 0.5) calc(var(--seed-x, 0.5) * 100% - (50% - var(--background-y)) * 0.5),
    calc(((50% - var(--background-x)) * 2) + 50%) calc(((50% - var(--background-y)) * 2.5) + 50%),
    center;
  background-size: 24% auto, 31% auto, 700% 700%, cover;
  background-blend-mode: screen, multiply, multiply;
  filter: brightness(calc(0.6 + var(--pointer-from-center) * 0.35)) contrast(1.7) saturate(0.6);
  mix-blend-mode: color-dodge;
  opacity: calc(var(--card-opacity) * 0.6 * var(--foil-strength, 1));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-classic:not(.lit):not(.settling) .foil {
  filter: brightness(0.9) contrast(1.5) saturate(0.5);
  opacity: calc(0.28 * var(--foil-strength, 1));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-classic .foil::before {
  background-image: none;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-classic .foil::after {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 98%, 0.9) 0%, hsla(0, 0%, 70%, 0.6) 40%, hsla(0, 0%, 35%, 0.9) 100%);
  background-size: cover;
  mix-blend-mode: luminosity;
  filter: brightness(0.8) contrast(1.8);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-classic .glare {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsl(0, 0%, 97%) 5%, hsla(0, 0%, 45%, 0.2) 55%, hsla(0, 0%, 0%, 0.3) 110%);
  mix-blend-mode: overlay;
  filter: brightness(0.85) contrast(1.3);
  opacity: calc(var(--card-opacity) * 0.7);
}

/* ---- Pokémon V: the textured foil with diagonal streaks ---------------------
   Photos (Zacian V SSH 138, Glaceon V EVS 40, Charizard V DAA 19): the whole
   card is foil, frame and text box included, and etched with long straight
   streaks rising to the right at about 55 degrees; under a lamp the streaks
   are bright hairlines and broad rainbow flashes sweep along them, blue,
   magenta, gold, green; away from the light the card is dark metallic
   silver with the art printed over it. The Pokémon takes a lighter sheen
   (the map holds it at part strength). TCG Live ships no etch for the
   regular V, so the streak tile stands in: the same sun-pillar stack as the
   full arts (sv-fullart.css), brighter on the streaks, and the streaks lit
   white under the pointer. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-v {
  --v-etch: var(--swsh-streaks);
  --v-etch-size: 100% auto;
  --v-etch-pos: var(--seed-pos);
  --v-etch-repeat: repeat;
  --v-space: 5%;
  --v-pillar: repeating-linear-gradient(0deg,
    var(--sunpillar-clr-1) calc(var(--v-space) * 1),
    var(--sunpillar-clr-2) calc(var(--v-space) * 2),
    var(--sunpillar-clr-3) calc(var(--v-space) * 3),
    var(--sunpillar-clr-4) calc(var(--v-space) * 4),
    var(--sunpillar-clr-5) calc(var(--v-space) * 5),
    var(--sunpillar-clr-6) calc(var(--v-space) * 6),
    var(--sunpillar-clr-1) calc(var(--v-space) * 7));
  /* The tinsel bars run with the streaks. */
  /* Broad soft bands, not a grating: a grating at this pitch became a
     second line screen at phone size (Surfing Pikachu V, 2026-09-29). */
  /* Tuned 2026-09-29 against poke-holo.simey.me's V: the lit bars a
     little wider and paler, the dark gap shorter, so more of the card
     carries the rainbow at any tilt. */
  --v-bars: repeating-linear-gradient(145deg,
    #0e152e 0%, hsl(180, 10%, 54%) 7%, hsl(185, 32%, 68%) 12%,
    hsl(180, 10%, 54%) 17%, #0e152e 24%, #0e152e 29%);
  --v-dim: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 0%, 0.1) 12%, hsla(0, 0%, 0%, 0.15) 20%, hsla(0, 0%, 0%, 0.25) 120%);
  --v-pos: 0% var(--background-y),
    calc(var(--background-x) + (var(--background-y) * 0.2)) var(--background-y),
    var(--background-x) var(--background-y);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-v .foil {
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(#000, #000),
    var(--v-pillar), var(--v-bars), var(--v-dim);
  background-size: cover, cover, 200% 700%, 200% 100%, 200% 100%;
  background-position: center, center, var(--v-pos);
  background-blend-mode: soft-light, soft-light, color, hard-light, normal;
  /* Closing contrast(0.8): dodge-safe, see the full-art family below. */
  filter: brightness(calc((var(--pointer-from-center) * 0.45) + 0.62)) contrast(2.2) saturate(1.25) contrast(0.8);
  mix-blend-mode: color-dodge;
}
/* Where the light is: a pool around the pointer, as the full arts. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-v.has-foil-map .foil {
  --v-light: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    #000 0%, #000 30%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.4) 100%);
  clip-path: none;
  border-radius: 0;
  -webkit-mask-image: var(--art), var(--foil-map), var(--v-light);
  -webkit-mask-composite: source-in, source-in, source-over;
  mask-image: var(--art), var(--foil-map), var(--v-light);
  mask-composite: intersect, intersect, add;
  mask-mode: alpha;
  -webkit-mask-size: contain, 100% 100%, 100% 100%;
  mask-size: contain, 100% 100%, 100% 100%;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
/* Resting: dark metallic silver, the streaks just visible. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-v:not(.lit):not(.settling) .foil {
  filter: brightness(0.5) contrast(2.5) saturate(0.35);
}
/* The streaks, a step brighter than the foil between them. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-v .foil::before {
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff),
    var(--v-pillar), var(--v-bars), var(--v-dim);
  background-size: cover, cover, 200% 700%, 200% 100%, 200% 100%;
  background-position: center, center, var(--v-pos);
  background-blend-mode: soft-light, soft-light, color, hard-light, normal;
  -webkit-mask-image: var(--v-etch);
  mask-image: var(--v-etch);
  -webkit-mask-size: var(--v-etch-size);
  mask-size: var(--v-etch-size);
  -webkit-mask-position: var(--v-etch-pos);
  mask-position: var(--v-etch-pos);
  -webkit-mask-repeat: var(--v-etch-repeat);
  mask-repeat: var(--v-etch-repeat);
}
/* The exclusion twin, sliding the other way: the colour flips where they
   cross instead of one rainbow sliding past. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-v .foil::after {
  background-image:
    linear-gradient(#fff, #fff),
    linear-gradient(#000, #000),
    var(--v-pillar), var(--v-bars), var(--v-dim);
  background-size: cover, cover, 200% 400%, 130% 100%, 200% 100%;
  background-position: center, center,
    0% var(--background-y),
    calc(100% - (var(--background-x) + (var(--background-y) * 0.2))) calc(var(--background-y) * -1),
    var(--background-x) var(--background-y);
  background-blend-mode: soft-light, soft-light, color, hard-light, normal;
  filter: brightness(calc((var(--pointer-from-center) * 0.4) + 0.5)) contrast(1.66) saturate(1);
  mix-blend-mode: exclusion;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-v .glare {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsl(0, 0%, 100%) 0%, hsla(210, 3%, 54%, 0.33) 45%, hsla(0, 0%, 20%, 0.9) 130%);
  background-size: 120% 150%;
  background-position: center;
  mix-blend-mode: hard-light;
  filter: brightness(0.9) contrast(1.6);
  opacity: calc(var(--card-opacity) * 0.6);
  clip-path: none;
  border-radius: 0;
}
/* The streaks under the light, over the whole card, Pokémon included. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-v .glare::after {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 100%, 0.6) 0%, hsla(0, 0%, 100%, 0.3) 25%, hsla(0, 0%, 100%, 0.14) 60%, hsla(0, 0%, 100%, 0.08) 100%);
  background-size: 100% 100%;
  -webkit-mask-image: var(--v-etch);
  mask-image: var(--v-etch);
  -webkit-mask-size: var(--v-etch-size);
  mask-size: var(--v-etch-size);
  -webkit-mask-position: var(--v-etch-pos);
  mask-position: var(--v-etch-pos);
  -webkit-mask-repeat: var(--v-etch-repeat);
  mask-repeat: var(--v-etch-repeat);
  mix-blend-mode: normal;
  filter: none;
  opacity: calc(0.5 + var(--pointer-from-center) * 0.5);
}

/* ---- The full-art family: VMAX, VSTAR, full-art V, full-art Trainer -----------
   sv-fullart.css's Ultra Rare (SUN_PILLAR / ETCHED) is the same stock. Tuned
   from the photos:
   - VMAX (Charizard VMAX CPA 74 on wood, Umbreon VMAX EVS 215): the whole
     card washes pink, green and gold at once; the regular VMAX background
     carries etched diagonal streaks besides the art's own etch. Hotter, and
     the light pool wider.
   - VSTAR (Charizard VSTAR BRS 18, Arceus VSTAR): white frame and a pale
     starburst background, so the rainbow reads pastel, pink, cyan and gold;
     the streaks run through it. Paler, cooler glare.
   - Full-art Trainer (Marnie SSH 200): dense etched streaks over the whole
     card, silver base, rainbow bands along the streaks. Flatter light, the
     streaks strongest of all.
   The streaks join the etch on the lit lines (`.glare::after`), never on
   the alternate arts, whose etch follows the painting alone. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-vmax, .swsh-vstar, .swsh-tfa) {
  --swsh-streak-size: 100% auto;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-vstar.foil-ultra.has-foil-map .glare {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsl(195, 60%, 78%) 5%, hsl(300, 3%, 52%) 60%, hsl(350, 0%, 32%) 150%);
  filter: brightness(0.9) contrast(1.3);
  opacity: calc(var(--card-opacity) * 0.45);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-tfa.foil-ultra.has-foil-map .glare {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsl(0, 0%, 80%) 5%, hsl(200, 5%, 45%) 65%, hsl(320, 20%, 15%) 150%);
  filter: brightness(0.9) contrast(1.1);
  opacity: calc(var(--card-opacity) * 0.4);
}
/* The streaks on the lit lines, with the etch. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-vmax:not(.swsh-alt), .swsh-vstar, .swsh-tfa).foil-ultra.has-foil-map:is(.has-etch-map, .has-etch-tile) .glare::after {
  -webkit-mask-image: var(--fa-etch), var(--swsh-streaks);
  -webkit-mask-composite: source-over, source-over;
  mask-image: var(--fa-etch), var(--swsh-streaks);
  mask-composite: add, add;
  -webkit-mask-size: var(--fa-etch-size), var(--swsh-streak-size);
  mask-size: var(--fa-etch-size), var(--swsh-streak-size);
  -webkit-mask-position: var(--fa-etch-pos), var(--seed-pos);
  mask-position: var(--fa-etch-pos), var(--seed-pos);
  -webkit-mask-repeat: var(--fa-etch-repeat), repeat;
  mask-repeat: var(--fa-etch-repeat), repeat;
  opacity: calc(0.55 + var(--pointer-from-center) * 0.45);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-tfa.foil-ultra.has-foil-map:is(.has-etch-map, .has-etch-tile) .glare::after {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 100%, 0.7) 0%, hsla(0, 0%, 100%, 0.4) 25%, hsla(0, 0%, 100%, 0.22) 60%, hsla(0, 0%, 100%, 0.14) 100%);
}

/* ---- Dodge-safe: no channel at 1.0 under the colour-dodge ----------------
   The family's `.foil` is colour-dodged onto the scan, and its filters end
   in contrast(2.2) to 2.5, which pins whole bands of the sun pillar at
   channel 1.0. Dodge divides the backdrop by (1 - source): at 1.0 the dark
   ink of a gold card or a VMAX's text bars, never quite black in a scan,
   blows up into pure blue and red, and Safari draws the singularity as
   jagged pixel blocks (Eternatus V / VMAX SV121-122, Surfing Pikachu VMAX
   cel25 9, Meowth VMAX SWSH005; Noah 2026-09-29). A closing contrast(0.8)
   keeps every channel at or under 0.9, a tenfold gain at most, so ink stays
   ink. Restated per finish because filter is one property. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.foil-ultra.has-foil-map .foil {
  filter: brightness(calc((var(--pointer-from-center) * 0.4) + 0.5)) contrast(2.2) saturate(1) contrast(0.8);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-vmax.foil-ultra.has-foil-map:not(.swsh-alt):not(.swsh-shiny) .foil {
  --fa-light: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    #000 0%, #000 30%, rgba(0, 0, 0, 0.6) 65%, rgba(0, 0, 0, 0.35) 100%);
  filter: brightness(calc((var(--pointer-from-center) * 0.4) + 0.4)) contrast(2) saturate(0.85) contrast(0.8);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-vstar.foil-ultra.has-foil-map .foil {
  filter: brightness(calc((var(--pointer-from-center) * 0.4) + 0.55)) contrast(1.9) saturate(0.85) contrast(0.8);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-tfa.foil-ultra.has-foil-map .foil {
  filter: brightness(calc((var(--pointer-from-center) * 0.15) + 0.5)) contrast(1.9) saturate(1) contrast(0.8);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-vfa.foil-ultra.has-foil-map .foil {
  filter: brightness(calc((var(--pointer-from-center) * 0.4) + 0.4)) contrast(2) saturate(0.85) contrast(0.8);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.foil-ultra.has-foil-map:not(.lit):not(.settling) .foil {
  filter: brightness(0.5) contrast(2.5) saturate(0.35) contrast(0.8);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.foil-gold.has-foil-map .foil {
  filter: brightness(0.62) contrast(1.5) saturate(0.45) contrast(0.8);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.foil-gold.has-foil-map:not(.lit):not(.settling) .foil {
  filter: brightness(0.6) contrast(1.5) saturate(0.3) contrast(0.8);
}

/* ---- A gentler glare over the full-art family -------------------------------
   sv-fullart.css's hard-light glare runs at the card's full opacity, which
   over a saturated painting is a milky veil at one tilt (Charizard VSTAR,
   Umbreon VMAX, Marnie beside poke-holo.simey.me, 2026-09-29): the art
   loses its darks and the rainbow has nothing to sit on. About half keeps
   the sheen and the contrast. The VSTAR and full-art Trainer set their own,
   above. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.foil-ultra.has-foil-map:not(.swsh-vstar):not(.swsh-tfa) .glare {
  opacity: calc(var(--card-opacity) * 0.5);
}

/* ---- The etched twin, held back -----------------------------------------------
   `.foil::before` is the same stack again under the etch map, a step
   brighter (sv-fullart.css). With TCG Live's native etch (era maps -v4) the
   lit lines cover most of a painted Pokémon, so the twin at full strength
   turned Gyarados VMAX's pink mouth magenta at one tilt and yellow-green at
   the other; poke-holo.simey.me keeps the art's own colours and lets the
   rainbow ride over them. A third of the strength keeps the lines and the
   colours. The full-art Trainer is silver over flat colour: there the twin
   is the brushed streak the reference shows, so it stays whole. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.foil-ultra.has-foil-map:not(.swsh-tfa):is(.has-etch-map, .has-etch-tile) .foil::before {
  opacity: 0.35;
}

/* ---- Reverse holo: the chevron sheet, deeper ---------------------------------
   sv-reverse.css lights the sheet with a colour-dodge at brightness 0.55,
   which on a yellow or orange print lifted the chevrons to a pale wash
   (Pikachu SIT 49 beside poke-holo.simey.me, 2026-09-29: the real card is a
   deeper gold with the chevrons darker than the ground). Less light in, more
   contrast out. */
body.fx-holo.fx-holo.fx-holo .tcg.foil-reverse.rev-swsh.rev-sv .foil {
  filter: brightness(0.42) contrast(1.6) saturate(1.1);
}

/* ---- Plain cards: a glare that reads -------------------------------------------
   base.css leaves a non-foil card a faint varnish (0.5 white); poke-holo.simey.me
   gives the same card the standard overlay glare, a visible lift under the
   pointer. Whites as the standard glare, the dark end kept at 0.3 so the
   thumb pose does not shade the card. */
body.fx-holo.fx-holo.fx-holo .tcg.foil-none.era-swsh .glare {
  background-image: radial-gradient(
    farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 100%, 0.8) 10%,
    hsla(0, 0%, 100%, 0.65) 20%,
    hsla(0, 0%, 0%, 0.3) 90%
  );
}

/* ---- Whole-card foil: no edge to the map ------------------------------------
   A V or full art is foil edge to edge, silver frame included, but TCG
   Live's map shades the frame and the copyright band dark, so under the
   light the lit frame stopped in a hard line at the bottom-left corner
   (Charizard V SWSH260, Noah's desktop shot, 2026-09-29). A floor of foil
   under the map: the map still says where it is brightest, and nothing on
   the card is matte. Layers compose bottom-up: art ∩ light ∩ (map ∪ floor). */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-v.has-foil-map .foil,
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.foil-ultra.has-foil-map .foil {
  --swsh-floor: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
  -webkit-mask-image: var(--art), var(--v-light, var(--fa-light)), var(--foil-map), var(--swsh-floor);
  -webkit-mask-composite: source-in, source-in, source-over, source-over;
  mask-image: var(--art), var(--v-light, var(--fa-light)), var(--foil-map), var(--swsh-floor);
  mask-composite: intersect, intersect, add, add;
  -webkit-mask-size: contain, 100% 100%, 100% 100%, 100% 100%;
  mask-size: contain, 100% 100%, 100% 100%, 100% 100%;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* ---- Trainer Gallery character rares ----------------------------------------
   Photos (Altaria SIT TG11 on stone, Milotic TG02, Hoothoot ASR TG12): the
   whole card is foil, text box included; a soft, even pearlescent rainbow
   covers the picture at an angle, pastel and low contrast, with a fine
   sparkle in the light areas and faint etched lines following the
   illustration. No directional streaks. Upstream's trainer gallery holo:
   pastel bands at -22deg colour-dodged on, a hard-light ellipse. The
   Pokémon V and VMAX of the gallery are ordinary full arts (swsh-vfa,
   swsh-vmax); the Trainers are swsh-tfa. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-tg .foil {
  --tg-space: 5%;
  background-image:
    repeating-linear-gradient(-22deg,
      hsla(283, 49%, 60%, 0.75) calc(var(--tg-space) * 1),
      hsla(2, 74%, 59%, 0.75) calc(var(--tg-space) * 2),
      hsla(53, 67%, 53%, 0.75) calc(var(--tg-space) * 3),
      hsla(93, 56%, 52%, 0.75) calc(var(--tg-space) * 4),
      hsla(176, 38%, 50%, 0.75) calc(var(--tg-space) * 5),
      hsla(228, 100%, 77%, 0.75) calc(var(--tg-space) * 6),
      hsla(283, 49%, 61%, 0.75) calc(var(--tg-space) * 7)),
    radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
      #fff 0%, #a8a8a8 40%, #4a4a4a 100%);
  background-size: 300% 400%, cover;
  background-position: 0% var(--background-y), center;
  background-blend-mode: multiply;
  filter: brightness(calc((var(--pointer-from-center) * 0.3) + 0.55)) contrast(2) saturate(0.9);
  mix-blend-mode: color-dodge;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-tg:not(.lit):not(.settling) .foil {
  filter: brightness(0.6) contrast(1.8) saturate(0.5);
}
/* The sparkle: fine, in the light. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-tg .foil::before {
  background-image: var(--swsh-glitter), var(--swsh-flecks);
  background-size: 34% auto, 30% auto;
  background-position: var(--seed-pos), calc(var(--seed-x, 0.5) * -100%) calc(var(--seed-y, 0.5) * 100%);
  background-blend-mode: screen, normal;
  filter: saturate(0.3) brightness(1.3);
  mix-blend-mode: screen;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    #000 0%, hsla(0, 0%, 0%, 0.6) 40%, hsla(0, 0%, 0%, 0.25) 100%);
  mask-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    #000 0%, hsla(0, 0%, 0%, 0.6) 40%, hsla(0, 0%, 0%, 0.25) 100%);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-tg .foil::after {
  background-image: radial-gradient(farthest-corner ellipse at
    calc(var(--pointer-x) * 0.5 + 25%) calc(var(--pointer-y) * 0.5 + 25%),
    hsl(0, 0%, 100%) 5%, hsla(300, 100%, 11%, 0.6) 40%, hsl(0, 0%, 22%) 120%);
  background-size: 400% 500%;
  background-position: center;
  filter: brightness(calc((var(--pointer-from-center) * 0.2) + 0.4)) contrast(0.85) saturate(1.1);
  mix-blend-mode: hard-light;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-tg .glare {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 100%, 1) 10%, hsla(0, 0%, 100%, 0.6) 35%, hsl(180, 11%, 35%) 60%);
  mix-blend-mode: soft-light;
  filter: none;
  opacity: calc(var(--card-opacity) * 0.9);
  clip-path: none;
  border-radius: 0;
}
/* The faint etched lines following the painting. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-tg:is(.has-etch-map, .has-etch-tile) .glare::after {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 100%, 0.45) 0%, hsla(0, 0%, 100%, 0.2) 30%, hsla(0, 0%, 100%, 0.06) 70%);
  background-size: 100% 100%;
  -webkit-mask-image: var(--tg-etch);
  mask-image: var(--tg-etch);
  -webkit-mask-size: var(--tg-etch-size);
  mask-size: var(--tg-etch-size);
  -webkit-mask-position: var(--tg-etch-pos);
  mask-position: var(--tg-etch-pos);
  -webkit-mask-repeat: var(--tg-etch-repeat);
  mask-repeat: var(--tg-etch-repeat);
  opacity: calc(0.5 + var(--pointer-from-center) * 0.5);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-tg, .swsh-rainbow, .swsh-amazing, .swsh-shiny, .swsh-radiant).has-etch-map {
  --tg-etch: var(--etch-map);
  --tg-etch-size: 100% 100%;
  --tg-etch-pos: center;
  --tg-etch-repeat: no-repeat;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-tg, .swsh-rainbow, .swsh-amazing, .swsh-shiny, .swsh-radiant).has-etch-tile {
  --tg-etch: var(--etch-tile);
  --tg-etch-size: 100% auto;
  --tg-etch-pos: var(--seed-pos);
  --tg-etch-repeat: repeat;
}

/* ---- Rainbow Rare and Amazing Rare: the glitter foils ---------------------------
   Rainbow (Pikachu VMAX VIV 188, Charizard VSTAR BRS 174): the rainbow is
   printed and stays put; the foil under it is a fine dense glitter that
   flashes white and prismatic points across the whole card as it tilts,
   with the art's etch as faint relief. Amazing Rare (Rayquaza VIV 138,
   Jirachi VIV 119): the same sparkle, in the art window only (the map),
   under a printed paint-splash burst. So no colour of our own beyond a
   faint pastel sheen: white sparkle in the light, the grains winking as the
   card turns. Kept restrained (Noah, 2026-09-28): fine tiles, no speckle. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-rainbow, .swsh-amazing) .foil {
  --shift: 3px;
  background-image:
    var(--swsh-glitter),
    var(--swsh-flecks),
    radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
      #fff 0%, #a0a0a0 35%, #3c3c3c 100%);
  background-size: 30% auto, 26% auto, cover;
  background-position:
    calc(var(--seed-x, 0.5) * 100% + (var(--pointer-from-left) - 0.5) * var(--shift))
      calc(var(--seed-y, 0.5) * 100% + (var(--pointer-from-top) - 0.5) * var(--shift)),
    calc(var(--seed-y, 0.5) * 100%) calc(var(--seed-x, 0.5) * -100%),
    center;
  background-blend-mode: screen, multiply;
  filter: brightness(calc(0.95 + var(--pointer-from-center) * 0.4)) contrast(1.8) saturate(0.5);
  mix-blend-mode: color-dodge;
}
/* Resting, the grain shows as it does flat on a table. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-rainbow, .swsh-amazing):not(.lit):not(.settling) .foil {
  filter: brightness(0.9) contrast(1.4) saturate(0.3);
  opacity: calc(0.24 * var(--foil-strength, 1));
}
/* The wink: the grain multiplied by itself at another pitch, one copy
   moving with the pointer, so only the grains that line up light. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-rainbow, .swsh-amazing) .foil::before {
  background-image: var(--swsh-flecks), var(--swsh-flecks);
  background-size: 112px 112px, 131px 131px;
  background-position: var(--seed-pos),
    calc(50% + var(--pointer-from-left, 0.5) * 90px) calc(50% + var(--pointer-from-top, 0.5) * 70px);
  background-blend-mode: multiply, normal;
  filter: brightness(3.2) saturate(0.6);
  mix-blend-mode: screen;
  opacity: calc(var(--card-opacity) * 0.5);
}
/* A faint pastel sheen drifting over the sparkle. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-rainbow, .swsh-amazing) .foil::after {
  background-image: repeating-linear-gradient(15deg, var(--swsh-spectrum), var(--swsh-spectrum));
  background-size: 240% 240%;
  background-position: var(--background-x) var(--background-y);
  mix-blend-mode: soft-light;
  opacity: 0.4;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-rainbow, .swsh-amazing) .glare {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(50, 20%, 92%, 0.7) 0%, hsla(150, 10%, 40%, 0.5) 45%, hsla(0, 0%, 5%, 0.9) 110%);
  mix-blend-mode: hard-light;
  filter: brightness(0.95) contrast(1.4);
  opacity: calc(var(--card-opacity) * 0.6);
  clip-path: none;
  border-radius: 0;
}
/* The art's etch as relief under the light. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh:is(.swsh-rainbow, .swsh-amazing):is(.has-etch-map, .has-etch-tile) .glare::after {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 100%, 0.5) 0%, hsla(0, 0%, 100%, 0.25) 30%, hsla(0, 0%, 100%, 0.1) 70%);
  background-size: 100% 100%;
  -webkit-mask-image: var(--tg-etch);
  mask-image: var(--tg-etch);
  -webkit-mask-size: var(--tg-etch-size);
  mask-size: var(--tg-etch-size);
  -webkit-mask-position: var(--tg-etch-pos);
  mask-position: var(--tg-etch-pos);
  -webkit-mask-repeat: var(--tg-etch-repeat);
  mask-repeat: var(--tg-etch-repeat);
  opacity: calc(0.5 + var(--pointer-from-center) * 0.5);
}
/* Amazing Rare with no map falls to the layout's window. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-amazing.has-foil-map .glare {
  -webkit-mask-image: var(--art), var(--foil-map);
  -webkit-mask-composite: source-in, source-over;
  mask-image: var(--art), var(--foil-map);
  mask-composite: intersect, add;
  -webkit-mask-size: contain, 100% 100%;
  mask-size: contain, 100% 100%;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Amazing Rare's window is the loudest foil of the era: the paint splash
   printed under it goes saturated blue, red, green and gold, with white
   bursts where the light lands (Rayquaza VIV 138 beside poke-holo.simey.me,
   2026-09-29). The shared glitter recipe above left it pastel, so the
   window's own grain runs at full colour and the sheen rides on overlay. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-amazing .foil {
  filter: brightness(calc(1 + var(--pointer-from-center) * 0.45)) contrast(2.7) saturate(2.8);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-amazing .foil::after {
  mix-blend-mode: overlay;
  filter: saturate(3) contrast(1.5);
  opacity: 1;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-amazing .foil::before {
  opacity: calc(var(--card-opacity) * 0.7);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-amazing:not(.lit):not(.settling) .foil {
  filter: brightness(0.9) contrast(1.4) saturate(0.3);
}

/* ---- Radiant Rare: the cracked-ice mosaic ---------------------------------------
   Photos (Radiant Steelix LOR 124, Radiant Gardevoir LOR 69): the whole
   card, frame and text box included, is a mosaic of large angular facets,
   8 to 15 mm, in diagonal drifts; each facet reflects its own hue, so
   patches of magenta, cyan, gold and silver sit side by side and swap
   colour as the card tilts rather than sweep. Faintly visible flat on.
   The flakes: the cracked-ice tile at facet size, each flake taking its
   colour from a rainbow sliding under it (exclusion), a second copy
   counter-shifting so flakes wink; the light a wide pool. Held to a silver
   with a hint of colour: at full saturation colour-dodge turned the black
   text and the silver Charizard green, cyan and purple (Radiant Charizard
   PGO 11 beside poke-holo.simey.me, 2026-09-29). */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-radiant .foil {
  background-image:
    var(--swsh-ice),
    repeating-linear-gradient(45deg,
      hsl(2, 100%, 73%) 5%, hsl(53, 100%, 69%) 10%, hsl(93, 100%, 69%) 15%,
      hsl(176, 100%, 76%) 20%, hsl(228, 100%, 74%) 25%, hsl(283, 100%, 73%) 30%, hsl(2, 100%, 73%) 35%),
    radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
      #fff 0%, #8c8c8c 40%, #2a2a2a 100%);
  background-size: 44% auto, 260% 260%, cover;
  background-position: var(--seed-pos), var(--background-x) var(--background-y), center;
  background-blend-mode: exclusion, multiply;
  filter: brightness(calc(0.45 + var(--pointer-from-center) * 0.25)) contrast(1.5) saturate(0.35) contrast(0.8);
  mix-blend-mode: color-dodge;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-radiant:not(.lit):not(.settling) .foil {
  filter: brightness(0.7) contrast(1.6) saturate(0.9);
  opacity: calc(0.3 * var(--foil-strength, 1));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-radiant .foil::before {
  background-image: var(--swsh-ice);
  background-size: 44% auto;
  background-position:
    calc(var(--seed-x, 0.5) * 100% + (var(--pointer-from-left) - 0.5) * 10px)
    calc(var(--seed-y, 0.5) * 100% + (var(--pointer-from-top) - 0.5) * 10px);
  mix-blend-mode: difference;
  filter: brightness(0.8) contrast(1.3);
  opacity: 0.15;
}
/* The drifts: brighter diagonal bands across the mosaic. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-radiant .foil::after {
  background-image: repeating-linear-gradient(-45deg,
    hsla(0, 0%, 100%, 0) 0%, hsla(0, 0%, 100%, 0.18) 6%, hsla(0, 0%, 100%, 0) 12%, hsla(0, 0%, 0%, 0.2) 18%, hsla(0, 0%, 100%, 0) 24%);
  background-size: 250% 250%;
  background-position: calc(((var(--background-x) - 50%) * 1.5) + 50%) calc(((var(--background-y) - 50%) * 1.5) + 50%);
  mix-blend-mode: overlay;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-radiant .glare {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 100%, 0.4) 0%, hsl(0, 0%, 25%) 110%);
  mix-blend-mode: hard-light;
  filter: brightness(1) contrast(1.4);
  opacity: calc(var(--card-opacity) * 0.45);
  clip-path: none;
  border-radius: 0;
}

/* ---- Shining Fates' Shiny Vault -----------------------------------------------------
   Photos (Inteleon SV027, Dottler SV008, Charizard VMAX SV107 on marble): a
   baby shiny is foil in the art window plus its silver frame, a shiny V or
   VMAX edge to edge; the foil is a fine dense sparkle ("sparkle etch", the
   etch TCG Live ships for these) over silver, flashing white and prismatic
   points, with a soft rainbow wash over the whole of it in hand. The scan
   already prints the silver, so the foil only has to sparkle and shift.
   Baby shinies get this in place of the holo; the V and VMAX keep their
   textured recipes and add the sparkle on the lit lines. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-shiny.foil-holo .foil {
  --shift: 3px;
  background-image:
    var(--swsh-glitter),
    var(--swsh-flecks),
    repeating-linear-gradient(118deg,
      transparent 0%, hsla(0, 90%, 72%, 0.5) 1.5%, hsla(42, 100%, 66%, 0.5) 3%, hsla(100, 80%, 66%, 0.5) 4.5%,
      hsla(186, 90%, 64%, 0.5) 6%, hsla(230, 90%, 74%, 0.5) 7.5%, hsla(285, 80%, 76%, 0.5) 9%, transparent 10%, transparent 30%),
    radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
      #fff 0%, #a0a0a0 35%, #3c3c3c 100%);
  background-size: 30% auto, 26% auto, 200% 200%, cover;
  background-position:
    calc(var(--seed-x, 0.5) * 100% + (var(--pointer-from-left) - 0.5) * var(--shift))
      calc(var(--seed-y, 0.5) * 100% + (var(--pointer-from-top) - 0.5) * var(--shift)),
    calc(var(--seed-y, 0.5) * 100%) calc(var(--seed-x, 0.5) * -100%),
    calc((var(--background-x) - 50%) * 3 + 50%) calc((var(--background-y) - 50%) * 3 + 50%),
    center;
  background-blend-mode: screen, screen, multiply;
  filter: brightness(calc(0.85 + var(--pointer-from-center) * 0.35)) contrast(1.5) saturate(0.7);
  mix-blend-mode: color-dodge;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-shiny.foil-holo:not(.lit):not(.settling) .foil {
  filter: brightness(0.9) contrast(1.4) saturate(0.3);
  opacity: calc(0.24 * var(--foil-strength, 1));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-shiny.foil-holo .foil::before {
  background-image: var(--swsh-flecks), var(--swsh-flecks);
  background-size: 112px 112px, 131px 131px;
  background-position: var(--seed-pos),
    calc(50% + var(--pointer-from-left, 0.5) * 90px) calc(50% + var(--pointer-from-top, 0.5) * 70px);
  background-blend-mode: multiply, normal;
  filter: brightness(3.2) saturate(0.6);
  mix-blend-mode: screen;
  opacity: calc(var(--card-opacity) * 0.5);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-shiny.foil-holo .foil::after {
  background-image: none;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-shiny.foil-holo .glare {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 100%, 0.75) 4%, hsla(0, 0%, 100%, 0.25) 24%, hsla(0, 0%, 0%, 0.3) 90%);
  mix-blend-mode: overlay;
  filter: none;
  opacity: calc(var(--card-opacity) * 0.8);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-shiny.foil-holo:is(.has-etch-map, .has-etch-tile) .glare::after {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 100%, 0.6) 0%, hsla(0, 0%, 100%, 0.3) 30%, hsla(0, 0%, 100%, 0.12) 70%);
  background-size: 100% 100%;
  -webkit-mask-image: var(--tg-etch);
  mask-image: var(--tg-etch);
  -webkit-mask-size: var(--tg-etch-size);
  mask-size: var(--tg-etch-size);
  -webkit-mask-position: var(--tg-etch-pos);
  mask-position: var(--tg-etch-pos);
  -webkit-mask-repeat: var(--tg-etch-repeat);
  mask-repeat: var(--tg-etch-repeat);
  opacity: calc(0.5 + var(--pointer-from-center) * 0.5);
}
/* Shiny V: the V recipe, the sparkle etch in the streaks' place. */
body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-shiny.swsh-v.has-etch-map {
  --v-etch: var(--etch-map);
  --v-etch-size: 100% 100%;
  --v-etch-pos: center;
  --v-etch-repeat: no-repeat;
}

/* ---- Phones ----------------------------------------------------------------------
   The brushed lines alias at phone widths; open them up. */
@media (max-width: 900px) {
  body.fx-holo.fx-holo.fx-holo .tcg.era-swsh.era-swsh.era-swsh.era-swsh.era-swsh.swsh-holo .foil {
    --scan: 1.5px;
  }
}
