/*
 * Holo family dp-special-rares: DP-era special rares.
 *
 * Scope: Rotom RT1-RT6 (`dp-rotom`), Shining SH1-SH12 (`dp-shining`), Arceus AR1-AR9 (`dp-ar`), Shiny Legendary SL1-SL11
 * (`dp-shiny-legend`), the 13 secret rares (`dp-secret`) and the four Alph Lithographs (`dp-alph`, a matte stone: no foil, an emboss
 * that follows the pointer).
 * Cards: the faces js/fam/dp-special-rares.js claims; it adds `fam-dp-special-rares` to them, and every rule below is scoped to it.
 * Specificity: body.fx-holo.fx-holo.fx-holo .tcg.era-dp.(x5).fam-dp-special-rares.(x4) beats the era sheets
 * (this sheet loads after them); keep the era's :not(.lit):not(.settling) when overriding a rest-state rule.
 * Part of the older-era holo remaster (2026-10-01): the research, photos and review for this family are in
 * /mnt/project-files/holo-remaster/dp-special-rares/.
 *
 * Every map read here is drawn from the card's own scan (scripts/fam/dp-special-rares/ in the card-textures skill, into
 * assets/foil/fam/dp-special-rares/); the module hands each card its maps as custom properties. The scans already carry the
 * printed foil (the Rotom shards, the Arceus rings, the Shining stripes), so these layers draw LIGHT on it, not structure.
 * v2 (2026-10-02, Noah: "really shitty texture", "overuse of the rainbow glare"): the real cosmos (secret, AR, SL) is a silver glitter on the
 * print's own colours, so the cosmos block draws no rainbow, only round glitter (cos-<id>-v2.webp); Rotom keeps its recipe with calmer shard
 * colours (rt<n>-ice-v2.webp); Shining is a silver face (the one place a layer takes colour away: it caps the scan's lamp-lit chroma) with a
 * slow pastel comb. Every hue that moves is held to 1.5 spectra a full pointer sweep or less (rainbow_speed.py; the blocks say how).
 * Reference note: .claude/skills/card-textures/reference/fam-dp-special-rares.md.
 */

/* ---- Shared: clear what dp.css and dp-secret.css paint on every layer of these cards ------------------------------ */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares .foil,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares .glare {
  clip-path: none;
  border-radius: 0;
  transform: none;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares .foil::before,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares .foil::after,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares .glare::after {
  background: none;
  background-image: none;
  background-size: auto;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: normal;
  mix-blend-mode: normal;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
  clip-path: none;
  border-radius: 0;
  transform: none;
  opacity: 1;
}

/* ---- Rotom RT1-RT6 (Rising Rivals): cracked ice, shard by shard ----------------------------------------------------
   Real card (refs/rotom-*): the whole face inside the yellow border but the art window is "cracked ice" foil: flat angular
   shards 5-13% of the card wide. Tipped under a lamp a shard lights all at once, in one colour, and goes dark again a few
   degrees later; many shards are lit at a time, more near the light, different ones at every tilt. Through the yellow
   ink of RT1-RT5 the flashes read white-yellow with some green and cyan, through Charon's Choice's grey every colour shows.
   The scan already shows each shard, so make_rotom_ice.py segments the shards from it: --dsr-ice holds where the foil is
   (alpha: the border, window, bevel and ink cut out) and the colour each shard flashes; --dsr-px / --dsr-py hold each
   shard's tilt phase along x and y.
   A gate is |phase - pointer ramp| (difference), inverted and cut by contrast: white only while the card is tipped to the
   shard's own angle. The ramp is 300% wide, so a shard lights evenly; the radial multiplied under it widens the gate near
   the light, so more shards burn there. Two gates (x and y) multiplied: a shard lights at its own tilt in both axes.
   `.foil` = shard colour x gate x gate, colour-dodged onto the print (light only, dark ink stays dark). `.glare` = the same
   colour where the gates are open and white elsewhere (screen of the inverted gates), multiplied: it pulls a lit shard's
   other channels down, so a flash is saturated pink, cyan or yellow and not a pastel; --dsr-tint sets how much (more on
   the grey Charon's Choice, little on the yellow Pokemon, whose ink turns every flash white-yellow).
   At rest only `.foil` paints: the colours faint under the shards.
   v2 (Noah, 2026-10-02: "overuse of the rainbow glare"): the recipe is unchanged, the COLOURS are new: --dsr-ice is rt<n>-ice-v2.webp, the same
   shards and the same tilt phases (--dsr-px / --dsr-py) with a calmer palette. RT1-RT5: white and pale yellow flashes, a few pale cyan, green or
   pink, as the real yellow cards show. RT6 (Charon's Choice): pink, cyan, yellow, lavender, sky and white, no neon. No hue slides here (each
   shard is one fixed colour that lights and goes dark): 0 spectra a sweep. */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .foil,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .glare {
  background-image: var(--dsr-ice);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: normal;
  -webkit-mask-image: var(--dsr-ice);
  mask-image: var(--dsr-ice);
  mask-mode: alpha;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-composite: source-over;
  mask-composite: add;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .foil {
  background-color: hsl(0, 0%, 0%);
  mix-blend-mode: color-dodge;
  filter: brightness(calc(0.7 * max(1, var(--foil-strength, 1)))) saturate(1.25) contrast(0.8);
  opacity: calc((0.72 + var(--pointer-from-center) * 0.28) * min(1, var(--foil-strength, 1)));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom:not(.lit):not(.settling) .foil {
  filter: brightness(0.6) saturate(1.1) contrast(0.8);
  opacity: calc(0.2 * var(--foil-strength, 1));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .glare {
  background-color: hsl(0, 0%, 100%);
  mix-blend-mode: multiply;
  filter: none;
  opacity: calc(var(--card-opacity) * var(--dsr-tint, 0.3) * min(1, var(--foil-strength, 1)));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .glare::before {
  content: "";
  position: absolute;
  inset: 0;
}
/* the gates: x on .foil::before and .glare::before, y on .foil::after and .glare::after */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .foil::before,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .glare::before {
  background-image:
    radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y), hsl(0, 0%, 58%) 0%, hsl(0, 0%, 100%) 55%),
    linear-gradient(90deg, hsl(0, 0%, 0%) 15%, hsl(0, 0%, 100%) 85%),
    var(--dsr-px);
  background-size: 100% 100%, 300% 100%, 100% 100%;
  background-position: center, calc(var(--pointer-from-left) * 100%) 0%, center;
  background-repeat: no-repeat;
  background-blend-mode: multiply, difference, normal;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .foil::after,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .glare::after {
  background-image:
    radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y), hsl(0, 0%, 58%) 0%, hsl(0, 0%, 100%) 55%),
    linear-gradient(180deg, hsl(0, 0%, 0%) 15%, hsl(0, 0%, 100%) 85%),
    var(--dsr-py);
  background-size: 100% 100%, 100% 300%, 100% 100%;
  background-position: center, 0% calc(var(--pointer-from-top) * 100%), center;
  background-repeat: no-repeat;
  background-blend-mode: multiply, difference, normal;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .foil::before,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .foil::after {
  filter: invert(1) brightness(0.6) contrast(10);
  mix-blend-mode: multiply;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .glare::before,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-rotom .glare::after {
  filter: invert(1) brightness(0.6) contrast(10) invert(1);
  mix-blend-mode: screen;
}

/* ---- Shining SH1-SH12 (Platinum): the Mirror foil on a shiny-colour card ---------------------------------------------
   Real card (refs/shining-*: tilt frames of the real Shining Bagon SH10 and Shinx SH12; Collexy "reverse sheet"): a Shining
   Pokemon is printed like a reverse holo. The whole face inside the yellow border but the art window is one smooth mirror
   (silver, gold on Shinx): no cells, no dots. At a tilt a band of vertical comb stripes lies across the face, in PASTEL pink,
   yellow, green, cyan and lavender (a spectrum a fifth of the card wide, several side by side), brightest in the middle of the
   band and fading to plain silver on either side; the band slides sideways as the card tips. The shiny-colour art window is
   plain and the ink (text, numbers) stays dark on the foil.
   v2 (Noah, 2026-10-02: "overuse of the rainbow glare"). Two faults in v1: the scan itself carries the comb it was photographed
   with (a scanner lamp: saturated blue, violet and yellow columns across the whole face, bluer than the card in hand), and v1
   colour-dodged a saturated three-cycle gradient over it that slid 9.5 spectra past a point as the pointer crossed the card.
   Now: `.foil` caps the print's own chroma inside the foil area at 0.16 (a warm-grey layer of that chroma in the `saturation`
   blend at 90%: the print's light and dark are untouched, only how coloured it is, the same for a blue Milotic and a gold
   Shinx), so the face reads silver, pale gold on Shinx, at rest and under the light.
   `.glare` (lit only) lays the real comb on it: a repeating 7-stop pastel gradient, one cycle = 20% of the card, in a layer
   120% wide slid by --background-x (1.0 spectrum a full sweep, rainbow_speed.py), inside a soft band, a second mask layer 200%
   wide that follows the pointer (an intensity, not a hue), over a soft white sheen at the pointer, in the overlay blend so the
   Poke-BODY names and other dark print stay dark under the comb (review v2: the normal blend faded them 30-39%). Both read
   --dsr-mask (sh<n>-mask.webp: inside the border, minus the window, the bevel at 0.45, and minus the card's own ink). */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-shining .foil,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-shining .glare {
  -webkit-mask-image: var(--dsr-mask);
  mask-image: var(--dsr-mask);
  mask-mode: alpha;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-composite: source-over;
  mask-composite: add;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-shining .foil {
  background-color: rgb(148, 128, 107);
  background-image: none;
  background-blend-mode: normal;
  mix-blend-mode: saturation;
  filter: none;
  opacity: calc(0.9 * min(1, var(--foil-strength, 1)));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-shining:not(.lit):not(.settling) .foil {
  filter: none;
  opacity: calc(0.9 * min(1, var(--foil-strength, 1)));
}
/* The two Lightning Shining cards (SH3 Voltorb, SH12 Shinx) are printed yellow over the mirror, which reads gold on the real
   card (refs/shining-sh12-*). The chroma cap above leaves them olive, so their foil area takes a gold hue in the color blend
   instead: the hue comes from this layer, the light and dark stay the print's (review v2, N2). */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-shining.dsr-gold .foil {
  background-color: rgb(214, 176, 64);
  mix-blend-mode: color;
  opacity: calc(0.85 * min(1, var(--foil-strength, 1)));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-shining .glare {
  background-color: transparent;
  background-image:
    radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
      hsla(200, 40%, 100%, 0.42) 0%, hsla(0, 0%, 100%, 0.14) 36%, hsla(0, 0%, 100%, 0) 74%),
    repeating-linear-gradient(90deg,
      hsl(335, 85%, 76%) 0%,
      hsl(48, 95%, 74%) 2.78%,
      hsl(105, 60%, 72%) 5.56%,
      hsl(180, 70%, 70%) 8.33%,
      hsl(215, 85%, 78%) 11.11%,
      hsl(268, 75%, 80%) 13.89%,
      hsl(335, 85%, 76%) 16.667%);
  background-size: 100% 100%, 120% 100%;
  background-position: center, calc(50% + (var(--background-x) - 50%) * 3.85) 0%;
  background-repeat: no-repeat, repeat-x;
  background-blend-mode: normal;
  -webkit-mask-image: var(--dsr-mask), linear-gradient(90deg, hsla(0, 0%, 0%, 0.08) 0%, hsla(0, 0%, 0%, 0.08) 18%, hsl(0, 0%, 0%) 50%, hsla(0, 0%, 0%, 0.08) 82%, hsla(0, 0%, 0%, 0.08) 100%);
  mask-image: var(--dsr-mask), linear-gradient(90deg, hsla(0, 0%, 0%, 0.08) 0%, hsla(0, 0%, 0%, 0.08) 18%, hsl(0, 0%, 0%) 50%, hsla(0, 0%, 0%, 0.08) 82%, hsla(0, 0%, 0%, 0.08) 100%);
  mask-mode: alpha, alpha;
  -webkit-mask-size: 100% 100%, 200% 100%;
  mask-size: 100% 100%, 200% 100%;
  -webkit-mask-position: center, calc((1 - var(--pointer-from-left, 0.5)) * 100%) 0%;
  mask-position: center, calc((1 - var(--pointer-from-left, 0.5)) * 100%) 0%;
  -webkit-mask-repeat: no-repeat, no-repeat;
  mask-repeat: no-repeat, no-repeat;
  -webkit-mask-composite: source-in, source-over;
  mask-composite: intersect, add;
  mix-blend-mode: overlay;
  filter: none;
  opacity: calc(var(--card-opacity) * (0.85 + var(--pointer-from-center) * 0.15) * min(1, var(--foil-strength, 1)));
}

/* ---- Arceus AR1-AR9, Shiny Legendary SL1-SL11 and the 13 secrets: the DP cosmos on the art window, the Pokemon matte -----------
   Real cards (refs/: Articuno 148, Zapdos 150, Charizard 103, Pikachu 112, Scyther 130 and Arceus AR1/AR2/AR4/AR5, Shiny Rayquaza SL10 in tilt
   frames; Collexy; Flipside): the art window is the DP cosmos holo, which is SILVER: the print keeps its own colours and a fine round glitter
   lights on it, mostly white or a pale tint with some dots in saturated blue, violet, cyan, green or gold, thicker in patches, with a few round
   orbs and rings of dots. There is no broad rainbow sheen over the window; the colour is in the dots and it turns with the tilt. The Pokemon is
   ink over foil, so it stays matte. (v1 of this block was dp-cosmos-holo's recipe: a 300 % rainbow slid under a pool of light, colour-dodged on the
   art, over square-pixel flecks; Noah, 2026-10-02: "really shitty texture", "overuse of the rainbow glare". v2 drops the rainbow and draws
   round glitter, cos-<id>-v2.webp, make_cosmos_flecks_v2.py.) Arceus also has broad concentric ripple rings over the body (printed into the scan,
   so only a soft sheen band lights them), a Shiny Legendary a silver border that glitters (the era's `.glare`, kept).
   The card's own map (`cos-<id>-v2.webp`: alpha = art window minus the Pokemon, from the live map; RGB = the glitter) is both the foil mask and
   the lit fleck layer (`.cure`). Keep the two in step. Rainbow speed: the only hue that moves is the fleck layer's hue-rotate, 270 deg a full
   horizontal sweep of the pointer plus 90 deg a full vertical one (0.75 + 0.25 = 1.0 spectrum a full diagonal sweep, limit 1.5; rainbow_speed.py
   cannot parse a filter, computed by hand). */

/* ---- the foil group: mask = the card's own map (art window minus the Pokemon) ---- */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos .foil,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos .cure {
  clip-path: none;
  border-radius: 0;
  -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;
  mask-mode: alpha;
  -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;
}
/* lit: a silver pool of light at the pointer, no hue. soft-light only lifts the print where the pool is (the Pokemon is outside the
   mask); the colour of the cosmos is in the glitter layer below. */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos .foil {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(0, 0%, 100%, 0.85) 0%, hsla(0, 0%, 100%, 0.4) 26%, hsla(0, 0%, 100%, 0) 64%);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: normal;
  filter: none;
  mix-blend-mode: soft-light;
  opacity: calc(var(--card-opacity, 1) * 0.75 * max(1, var(--foil-strength, 1)));
}
/* rest: the glitter, light only */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos:not(.lit):not(.settling) .foil {
  background-image: var(--foil-map);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: normal;
  filter: none;
  mix-blend-mode: screen;
  opacity: calc(0.7 * var(--foil-strength, 1));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos .foil::before,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos .foil::after {
  display: none;
}

/* ---- the cosmos glitter (lit, its own screened layer so it lights dark skies too): the card's own map, each
   dot one colour that turns with the tilt (white stays white), and a band of white glints that runs across with the light ---- */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos .cure {
  background-image: var(--foil-map);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: normal;
  filter: hue-rotate(calc(var(--pointer-from-left, 0.5) * 270deg + var(--pointer-from-top, 0.5) * 90deg)) brightness(1.5) saturate(1.6);
  mix-blend-mode: screen;
  opacity: calc((0.55 + var(--pointer-from-center, 0) * 0.45) * var(--card-opacity, 1) * max(1, var(--foil-strength, 1)));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos .cure::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--foil-map);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(115deg, transparent 0%, transparent 36%, #000 46%, #000 54%, transparent 64%, transparent 100%);
  mask-image: linear-gradient(115deg, transparent 0%, transparent 36%, #000 46%, #000 54%, transparent 64%, transparent 100%);
  -webkit-mask-size: 300% 300%;
  mask-size: 300% 300%;
  -webkit-mask-position: calc(100% - var(--pointer-from-left, 0.5) * 100%) calc(100% - var(--pointer-from-top, 0.5) * 100%);
  mask-position: calc(100% - var(--pointer-from-left, 0.5) * 100%) calc(100% - var(--pointer-from-top, 0.5) * 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  filter: grayscale(1) brightness(2.2);
  mix-blend-mode: screen;
  opacity: 0.9;
}

/* Arceus: the body's ripple sheen, as the era drew it (dp-secret.css, dp-ar) but cut with the era's window mask (--dsr-win), not the
   card's own map, which has the Pokemon cut out and would let the sheen onto Arceus. */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos.dsr-ar .glare {
  background-image: none;
  clip-path: none;
  -webkit-mask-image: var(--art), var(--dsr-win);
  mask-image: var(--art), var(--dsr-win);
  -webkit-mask-composite: source-out;
  mask-composite: subtract;
  mask-mode: alpha, alpha;
  -webkit-mask-size: contain, 100% 100%;
  mask-size: contain, 100% 100%;
  -webkit-mask-position: center, center;
  mask-position: center, center;
  -webkit-mask-repeat: no-repeat, no-repeat;
  mask-repeat: no-repeat, no-repeat;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos.dsr-ar .glare::after {
  background-image: linear-gradient(112deg, transparent 20%, hsla(210, 30%, 93%, 0.8) 38%, hsla(0, 0%, 100%, 0.62) 48%,
    hsla(40, 28%, 92%, 0.66) 58%, transparent 76%);
  background-size: 260% 100%;
  background-position: calc(100% * var(--pointer-from-left)) 50%;
  background-repeat: no-repeat;
  mix-blend-mode: screen;
  opacity: calc(0.1 + var(--card-opacity) * 0.3);
}

/* ---- The 13 secret rares: Time-Space Distortion (dp2-124), the retro Charmander line (dp7-101..103), the Haymaker trio (pl1-128..130), the
   three Pikachu (pl2-112..114) and the Legendary Birds (pl3-148..150) -------------------------------------------------------------------
   Real cards (refs/: Stormfront Charizard 103, Supreme Victors Articuno 148 and Zapdos 150, Rising Rivals Pikachu 112, all tilted in a
   glove; the Scrydex scans; Collexy and Bulbapedia on the Cosmos Holofoil): the same cosmos holo as a Rare Holo, on the art window only, the
   Pokemon ink over foil and matte. The Time-Space Distortion scan also carries the glitter on the card's thin outer border (the inner silver
   frame, the header and the text box are flat), so its map covers the border ring too.
   The foil, the fleck layer and the Pokemon cut-out are the `.dsr-cosmos` block above (map = cos-<set>-<number>.webp); what is added here is
   dp-cosmos-holo's light varnish, a small soft-light gloss at the pointer, never dark. */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos.dsr-secret .glare {
  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.16) 22%, hsla(0, 0%, 100%, 0) 48%);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: normal;
  filter: none;
  mix-blend-mode: soft-light;
  opacity: calc(var(--card-opacity, 1) * 0.6);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-cosmos.dsr-secret .glare::after {
  background-image: none;
  filter: none;
  mix-blend-mode: normal;
  opacity: 0;
}

/* ---- Alph Lithograph ONE-FOUR (hgss1-ONE .. hgss4-FOUR): the stone's relief under a raking light, no foil and no hue ----------------
   Real card (refs/SOURCES.md; the sleeved ONE in two lights, the four on a mat, a graded ONE): a textured, matte stone slab, no rainbow and
   no cosmos at any tilt; tipped under a lamp the grain of the stone catches the light and the shading of its relief moves. Elite Fourum
   calls all four "textured" and "(non-Holo) Secret Rares"; Collexy and TCGplayer list a holofoil, which the photos do not show.
   So no foil layer. `.foil` is an emboss: the card's own greyscale laid over itself twice, once offset the pointer's way and once,
   inverted at half strength, the other way. Their sum is mid-grey plus the stone's slope along the pointer's direction; the contrast
   stretches it and `overlay` lays it on the print, so the facets turned to the light brighten and the ones turned away darken. The
   direction flips as the pointer crosses the card and nothing shows at the centre (a head-on light shows no relief). The offset ramps
   with the pointer and stops at 0.1% of the card width a copy (0.6 px of the 600 px scan, reached 0.2 of the way from the centre), so
   the corners are no stronger than 30:25 and there is no double image. Each copy is blurred 0.27cqw (1.6 scan px; `.tcg` is an inline-size
   container, so the relief keeps its scale at every card size): the stone's coarse relief shades, its finest flecks do not. Together with
   the brightness 1.1 on the group that keeps the dark side of the emboss off the print: dark_specks.py, at 220 and 340 px wide, poses
   rest, 30:25, 50:78 and the four corners: 0 specks at 220, at most 12 a card at 340 (budget 40); a sharper or stronger emboss
   passed 40 on the slate THREE. `--dsr-stone` (alph-stone.webp, one mask for the four) cuts it to the tablet of Unown tiles and the
   lettered slab; the border, the banner, the name and the illustrator line stay as printed. `.glare` keeps the era's broad warm hot
   spot (dp-secret.css). At rest nothing is drawn: a matte card. */
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-alph:not(.lit):not(.settling) .foil {
  display: none;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-alph .foil {
  background: none;
  -webkit-mask-image: var(--dsr-stone);
  mask-image: var(--dsr-stone);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  filter: contrast(2.2) brightness(1.1);
  mix-blend-mode: overlay;
  opacity: var(--card-opacity, 0);
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-alph .foil::before,
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-alph .foil::after {
  background-image: var(--art);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(1) blur(0.27cqw);
  mix-blend-mode: normal;
  opacity: 1;
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-alph .foil::before {
  transform: translate(clamp(-0.1%, calc((var(--pointer-from-left, 0.5) - 0.5) * 0.5%), 0.1%),
    clamp(-0.1%, calc((var(--pointer-from-top, 0.5) - 0.5) * 0.5%), 0.1%));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-alph .foil::after {
  filter: grayscale(1) invert(1) blur(0.27cqw);
  opacity: 0.5;
  transform: translate(clamp(-0.1%, calc((var(--pointer-from-left, 0.5) - 0.5) * -0.5%), 0.1%),
    clamp(-0.1%, calc((var(--pointer-from-top, 0.5) - 0.5) * -0.5%), 0.1%));
}
body.fx-holo.fx-holo.fx-holo .tcg.era-dp.era-dp.era-dp.era-dp.era-dp.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.fam-dp-special-rares.dsr-alph .glare {
  background-image: radial-gradient(farthest-corner circle at var(--pointer-x) var(--pointer-y),
    hsla(40, 100%, 96%, 0.6) 8%, hsla(40, 60%, 70%, 0.3) 40%, hsla(0, 0%, 40%, 0.12) 100%);
  mix-blend-mode: overlay;
  opacity: calc(var(--card-opacity, 0) * 0.4);
}
