/* GachaPack · holo.css — paint for the holographic card engine (js/ui/holo/).
   Each card is a stack of absolutely placed layers inside a flat, isolated face; the engine writes a dozen custom
   properties per frame on the host (.hc) and every layer reads them — nothing here animates on its own:
     --hc-rx/--hc-ry  card rotation        --hc-tx/--hc-ty  card tilt (-1..1)    --hc-sx/--hc-sy  foil, arrives late
     --hc-gx/--hc-gy  light position (%)   --hc-off  how far from face-on (0..1) --hc-ang  angle of the foil offset
     --hc-spd  foil speed   --hc-lift  hover lift   --hc-fl  flash (reveal)   --hc-w  host width (px)
   A foil slot (.hc-l1…3) reads --p (parallax: how far it slides per unit of tilt), --b and --g (opacity at face-on and
   the gain off face-on). Materials live under .hc-face[data-m=…]; blooms under .hc[data-hc-glow=…].
   Layer technique after "Holo" by Arlan Marat (MIT) — see web/CREDITS.md. Textures are generated SVG (data: URIs). */

.hc{
  --hc-rx:0deg;--hc-ry:0deg;--hc-tx:0;--hc-ty:0;--hc-sx:-.3;--hc-sy:-.22;--hc-gx:34%;--hc-gy:30%;--hc-off:.4;--hc-ang:216deg;--hc-spd:0;--hc-lift:0;--hc-fl:0;--hc-w:300px;
  --hc-tex-glitter:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' fill='%23fff'%3E%3Cpath d='M4.4 8.2L1.8 8L0.7 10.4L0.8 7.8L-1.6 6.7L1.1 6.9L2.1 4.4L2 7.1Z' opacity='0.69'/%3E%3Cpath d='M58.1 29L56.3 29.2L55.7 31L55.6 29.1L53.8 28.6L55.6 28.4L56.2 26.6L56.3 28.5Z' opacity='0.52'/%3E%3Cpath d='M92.8 62.6L91.8 62.4L91.3 63.3L91.5 62.3L90.6 61.9L91.6 62L92 61.1L91.9 62.1Z' opacity='0.54'/%3E%3Cpath d='M37.1 117.5L35.8 117.6L35.4 118.9L35.3 117.6L34 117.2L35.3 117.1L35.7 115.8L35.8 117.1Z' opacity='0.47'/%3E%3Cpath d='M20.5 36.1L18.7 35.4L17.4 36.8L18.1 35L16.6 33.7L18.4 34.4L19.7 33L19 34.8Z' opacity='0.40'/%3E%3Cpath d='M69 76.2L66.6 75.2L64.9 77.2L65.8 74.7L63.9 73L66.3 74L68 72L67.1 74.4Z' opacity='0.76'/%3E%3Cpath d='M100.4 4.8L99.5 5L99.3 5.9L99.1 5L98.2 4.8L99.1 4.6L99.3 3.7L99.5 4.6Z' opacity='0.63'/%3E%3Cpath d='M11.8 92.9L10.6 92.5L9.8 93.3L10.3 92.2L9.4 91.4L10.5 91.9L11.3 91L10.9 92.1Z' opacity='0.65'/%3E%3Cpath d='M85.7 82.7L84.6 82.8L84.3 83.9L84.2 82.8L83.1 82.5L84.2 82.4L84.5 81.3L84.6 82.4Z' opacity='0.44'/%3E%3Cpath d='M110.8 38.7L109.8 38.9L109.5 40L109.4 38.9L108.3 38.7L109.4 38.5L109.6 37.4L109.8 38.5Z' opacity='0.57'/%3E%3Cpath d='M84.1 111.8L82.2 111.1L80.9 112.6L81.6 110.7L80.1 109.3L82 110.1L83.3 108.6L82.6 110.4Z' opacity='0.78'/%3E%3Cpath d='M16.5 64.9L14.2 64.2L12.7 66L13.5 63.8L11.6 62.3L13.9 63L15.4 61.2L14.6 63.4Z' opacity='0.97'/%3E%3Cpath d='M73.9 115.7L71.7 116.1L71.3 118.3L70.9 116.1L68.7 115.7L70.9 115.3L71.3 113.1L71.7 115.3Z' opacity='0.88'/%3E%3Cpath d='M63.7 40.6L62 39.8L60.7 41.2L61.5 39.5L60.1 38.2L61.8 38.9L63.1 37.6L62.4 39.3Z' opacity='0.84'/%3E%3Cpath d='M68.6 99.4L67.1 99.1L66.3 100.5L66.6 99L65.2 98.2L66.7 98.4L67.5 97.1L67.3 98.6Z' opacity='0.83'/%3E%3Cpath d='M38.3 28.9L37.5 28.6L37.1 29.2L37.3 28.5L36.7 28L37.4 28.2L37.9 27.6L37.7 28.4Z' opacity='0.96'/%3E%3Cpath d='M77.4 2.9L75.8 2.2L74.5 3.4L75.2 1.8L74 0.6L75.6 1.3L76.8 0L76.1 1.6Z' opacity='0.82'/%3E%3Cpath d='M35.6 119.6L33.5 118.9L32.1 120.6L32.8 118.5L31.1 117.1L33.2 117.8L34.6 116.1L33.9 118.2Z' opacity='0.76'/%3E%3Cpath d='M18.5 119.7L16.9 119.6L16.3 121.1L16.3 119.5L14.9 118.9L16.5 119L17.1 117.5L17 119.1Z' opacity='0.45'/%3E%3Cpath d='M27.7 99.3L25.4 98.3L23.6 100.1L24.6 97.7L22.9 96L25.2 97L26.9 95.2L25.9 97.5Z' opacity='0.78'/%3E%3Cpath d='M75.4 89.2L73.3 88.9L72.3 90.6L72.6 88.6L70.9 87.6L72.9 87.9L73.9 86.1L73.6 88.2Z' opacity='0.50'/%3E%3Cpath d='M96.7 102.9L95.6 102.7L95.1 103.6L95.2 102.6L94.3 102.1L95.4 102.2L95.9 101.3L95.7 102.3Z' opacity='0.66'/%3E%3Cpath d='M23.2 30.1L21.9 30.3L21.6 31.6L21.4 30.3L20.1 30.1L21.4 29.8L21.6 28.5L21.9 29.8Z' opacity='0.46'/%3E%3Cpath d='M22 2.9L21 3.1L20.7 4.1L20.6 3.1L19.6 2.8L20.6 2.7L20.8 1.7L21 2.7Z' opacity='0.99'/%3E%3Cpath d='M23 49L21.2 49L20.5 50.6L20.6 48.8L18.9 48.2L20.7 48.2L21.4 46.6L21.3 48.4Z' opacity='0.59'/%3E%3Cpath d='M97.2 85.8L95.2 85.7L94.4 87.5L94.6 85.5L92.8 84.7L94.7 84.9L95.5 83.1L95.4 85Z' opacity='0.87'/%3E%3Ccircle cx='67.5' cy='35.1' r='0.49' opacity='0.77'/%3E%3Ccircle cx='9.6' cy='30.3' r='0.62' opacity='0.80'/%3E%3Ccircle cx='93' cy='51.6' r='0.41' opacity='0.85'/%3E%3Ccircle cx='30.2' cy='43.4' r='0.46' opacity='0.80'/%3E%3Ccircle cx='48.5' cy='116.9' r='0.50' opacity='0.56'/%3E%3Ccircle cx='40.6' cy='64.4' r='0.38' opacity='0.83'/%3E%3Ccircle cx='68.7' cy='118.3' r='0.63' opacity='0.60'/%3E%3Ccircle cx='52.4' cy='83.7' r='0.67' opacity='0.63'/%3E%3Ccircle cx='78.9' cy='19.5' r='0.56' opacity='0.53'/%3E%3Ccircle cx='73.2' cy='102.7' r='0.42' opacity='0.48'/%3E%3Ccircle cx='10.9' cy='82' r='0.58' opacity='0.88'/%3E%3Ccircle cx='38.1' cy='31.2' r='0.28' opacity='0.73'/%3E%3Ccircle cx='111.1' cy='94.1' r='0.62' opacity='0.88'/%3E%3Ccircle cx='27.2' cy='117.5' r='0.38' opacity='0.62'/%3E%3Ccircle cx='46.9' cy='85.6' r='0.59' opacity='0.67'/%3E%3Ccircle cx='87.1' cy='74.6' r='0.52' opacity='0.46'/%3E%3Ccircle cx='99.8' cy='57.9' r='0.31' opacity='0.73'/%3E%3Ccircle cx='55.7' cy='67.1' r='0.50' opacity='0.83'/%3E%3Ccircle cx='114.4' cy='18.4' r='0.30' opacity='0.47'/%3E%3Ccircle cx='62.9' cy='47.1' r='0.66' opacity='0.81'/%3E%3Ccircle cx='63.6' cy='109' r='0.38' opacity='0.60'/%3E%3Ccircle cx='111.1' cy='81.1' r='0.61' opacity='0.50'/%3E%3Ccircle cx='109.1' cy='116.4' r='0.63' opacity='0.30'/%3E%3Ccircle cx='20.1' cy='90.3' r='0.30' opacity='0.35'/%3E%3Ccircle cx='109.4' cy='32.6' r='0.52' opacity='0.46'/%3E%3Ccircle cx='95.3' cy='86.3' r='0.28' opacity='0.57'/%3E%3Ccircle cx='117.5' cy='9.9' r='0.29' opacity='0.53'/%3E%3Ccircle cx='94.7' cy='83' r='0.37' opacity='0.60'/%3E%3Ccircle cx='12.8' cy='57.9' r='0.45' opacity='0.63'/%3E%3Ccircle cx='20.2' cy='92.7' r='0.39' opacity='0.72'/%3E%3C/svg%3E");
  --hc-tex-stars:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' fill='%23fff'%3E%3Ccircle cx='84.8' cy='97.3' r='0.55' opacity='0.76'/%3E%3Ccircle cx='12.8' cy='84.9' r='0.55' opacity='0.52'/%3E%3Ccircle cx='135' cy='67.2' r='0.59' opacity='0.66'/%3E%3Ccircle cx='28.6' cy='44.2' r='0.45' opacity='0.48'/%3E%3Ccircle cx='20.4' cy='95.5' r='0.54' opacity='0.50'/%3E%3Ccircle cx='128.9' cy='123' r='0.41' opacity='0.62'/%3E%3Ccircle cx='9' cy='118.5' r='0.74' opacity='0.43'/%3E%3Ccircle cx='119' cy='55.6' r='0.53' opacity='0.60'/%3E%3Ccircle cx='22.9' cy='136' r='0.66' opacity='0.48'/%3E%3Ccircle cx='12.3' cy='134.6' r='1.30' opacity='0.90'/%3E%3Ccircle cx='43.3' cy='80.3' r='0.62' opacity='0.30'/%3E%3Ccircle cx='7.2' cy='71.1' r='0.57' opacity='0.84'/%3E%3Ccircle cx='74.6' cy='56.5' r='0.27' opacity='0.69'/%3E%3Ccircle cx='121.5' cy='48.1' r='0.53' opacity='0.46'/%3E%3Ccircle cx='25.6' cy='19' r='0.57' opacity='0.62'/%3E%3Ccircle cx='59.1' cy='60.4' r='0.72' opacity='0.76'/%3E%3Ccircle cx='65.7' cy='147' r='0.54' opacity='0.51'/%3E%3Ccircle cx='82.3' cy='1.4' r='0.69' opacity='0.43'/%3E%3Ccircle cx='19.8' cy='12.8' r='0.62' opacity='0.58'/%3E%3Ccircle cx='16.5' cy='89.5' r='0.56' opacity='0.78'/%3E%3Ccircle cx='95.7' cy='96.6' r='0.54' opacity='0.54'/%3E%3Ccircle cx='104.3' cy='104.1' r='0.75' opacity='0.68'/%3E%3Ccircle cx='22' cy='103.5' r='0.74' opacity='0.46'/%3E%3Ccircle cx='60.2' cy='121.7' r='0.58' opacity='0.29'/%3E%3Ccircle cx='106.2' cy='78.8' r='0.56' opacity='0.39'/%3E%3Ccircle cx='50.4' cy='14.7' r='0.53' opacity='0.48'/%3E%3Ccircle cx='130.7' cy='149.6' r='0.63' opacity='0.25'/%3E%3Ccircle cx='136.1' cy='91.1' r='0.60' opacity='0.63'/%3E%3Ccircle cx='79.4' cy='78.6' r='1.03' opacity='0.90'/%3E%3Ccircle cx='10.2' cy='13.6' r='0.75' opacity='0.62'/%3E%3Ccircle cx='133.6' cy='147' r='0.74' opacity='0.28'/%3E%3Ccircle cx='95.4' cy='63.2' r='0.46' opacity='0.57'/%3E%3Ccircle cx='9.7' cy='74' r='1.12' opacity='0.90'/%3E%3Ccircle cx='116.2' cy='66.2' r='0.42' opacity='0.60'/%3E%3Ccircle cx='156' cy='47.5' r='0.47' opacity='0.40'/%3E%3Ccircle cx='50.8' cy='90' r='0.57' opacity='0.25'/%3E%3Ccircle cx='26.4' cy='131.5' r='0.32' opacity='0.74'/%3E%3Ccircle cx='101.1' cy='132.1' r='0.62' opacity='0.74'/%3E%3Ccircle cx='14.2' cy='119.1' r='0.36' opacity='0.32'/%3E%3Ccircle cx='15.5' cy='141.4' r='0.57' opacity='0.68'/%3E%3Ccircle cx='121' cy='113.1' r='0.44' opacity='0.71'/%3E%3Ccircle cx='32.7' cy='22.2' r='0.56' opacity='0.26'/%3E%3Ccircle cx='154.5' cy='138.5' r='0.51' opacity='0.78'/%3E%3Ccircle cx='84.5' cy='122.9' r='1.10' opacity='0.90'/%3E%3Ccircle cx='22.2' cy='140' r='0.49' opacity='0.81'/%3E%3Ccircle cx='62.2' cy='74' r='0.47' opacity='0.31'/%3E%3Ccircle cx='15.2' cy='14.1' r='0.72' opacity='0.58'/%3E%3Ccircle cx='37' cy='149.5' r='0.29' opacity='0.75'/%3E%3Ccircle cx='10.1' cy='70.7' r='0.44' opacity='0.33'/%3E%3Ccircle cx='21.1' cy='143.5' r='0.54' opacity='0.53'/%3E%3Ccircle cx='55.7' cy='91.1' r='0.52' opacity='0.41'/%3E%3Ccircle cx='151.3' cy='48.3' r='0.49' opacity='0.49'/%3E%3Ccircle cx='37.9' cy='101.2' r='0.26' opacity='0.31'/%3E%3Ccircle cx='25.6' cy='34.1' r='0.47' opacity='0.72'/%3E%3Ccircle cx='96.8' cy='108.1' r='0.44' opacity='0.70'/%3E%3Ccircle cx='52.6' cy='113.7' r='0.29' opacity='0.33'/%3E%3Ccircle cx='109.1' cy='16' r='0.71' opacity='0.80'/%3E%3Ccircle cx='143.5' cy='61.3' r='0.61' opacity='0.59'/%3E%3Ccircle cx='154.5' cy='71' r='0.36' opacity='0.44'/%3E%3Ccircle cx='112.6' cy='7.9' r='0.61' opacity='0.32'/%3E%3Ccircle cx='121' cy='68.8' r='0.72' opacity='0.69'/%3E%3Ccircle cx='15.2' cy='27' r='0.26' opacity='0.82'/%3E%3Ccircle cx='104' cy='46.7' r='0.41' opacity='0.68'/%3E%3Ccircle cx='97.6' cy='155.9' r='0.53' opacity='0.73'/%3E%3Ccircle cx='62.8' cy='46' r='0.70' opacity='0.31'/%3E%3Ccircle cx='70.5' cy='107.5' r='0.51' opacity='0.36'/%3E%3Ccircle cx='44.8' cy='48' r='0.30' opacity='0.78'/%3E%3Ccircle cx='15.8' cy='91.3' r='0.47' opacity='0.37'/%3E%3Ccircle cx='9.5' cy='62.6' r='1.63' opacity='0.90'/%3E%3Ccircle cx='144.9' cy='55' r='0.42' opacity='0.62'/%3E%3Cpath d='M5 59.1L1.5 59.5L1.1 63L0.7 59.5L-2.8 59.1L0.7 58.6L1.1 55.2L1.5 58.6Z' opacity='.9'/%3E%3Cpath d='M131 113.3L127.4 113.8L126.9 117.4L126.5 113.8L122.8 113.3L126.5 112.8L126.9 109.2L127.4 112.8Z' opacity='.9'/%3E%3Cpath d='M155.9 100.1L153.2 100.5L152.9 103.1L152.5 100.5L149.9 100.1L152.5 99.8L152.9 97.1L153.2 99.8Z' opacity='.9'/%3E%3Cpath d='M17.4 20.8L14.6 21.1L14.3 23.9L13.9 21.1L11.1 20.8L13.9 20.4L14.3 17.7L14.6 20.4Z' opacity='.9'/%3E%3C/svg%3E");
  --hc-tex-crinkle:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.016 .021' numOctaves='4' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2.2' intercept='-.6'/%3E%3CfeFuncG type='linear' slope='2.2' intercept='-.6'/%3E%3CfeFuncB type='linear' slope='2.2' intercept='-.6'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  --hc-tex-brushed:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='b' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0035 .85' numOctaves='2' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23b)'/%3E%3C/svg%3E");
  position:relative;display:block;aspect-ratio:63/88;perspective:1100px;touch-action:pan-y;
  -webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;
}
.hc[data-hc-kind=pack]{aspect-ratio:64/100}
.hc[data-hc-kind=slab]{aspect-ratio:66/104}
.hc-bloom,.hc-tilt,.hc-tilt *{pointer-events:none}
.hc-tilt{position:absolute;inset:0;transform:rotateX(var(--hc-rx)) rotateY(var(--hc-ry)) scale(calc(1 + var(--hc-lift) * .035));will-change:transform}

/* ───────────── bloom: the glow the card throws on the page (behind it, does not rotate) */
.hc-bloom{position:absolute;inset:-9% -13%;border-radius:50%;
  background:radial-gradient(closest-side,var(--glow,rgba(255,255,255,.18)) 0%,var(--glow2,transparent) 55%,transparent 100%);
  opacity:calc(var(--bloom,.25) * (.5 + .5 * var(--hc-off)) + var(--hc-fl) * .9);
  transform:translate(calc(var(--hc-tx) * 3.5%),calc(var(--hc-ty) * 3.5%)) scale(calc(1 + var(--hc-fl) * .08));will-change:opacity,transform}
.hc[data-hc-glow=silver]{--glow:rgba(214,224,255,.2);--glow2:rgba(214,224,255,.05);--bloom:.4}
.hc[data-hc-glow=rainbow]{--glow:rgba(110,210,255,.34);--glow2:rgba(210,120,255,.1);--bloom:.5}
.hc[data-hc-glow=cosmos]{--glow:rgba(150,90,255,.5);--glow2:rgba(40,190,255,.14);--bloom:.62}
.hc[data-hc-glow=gold]{--glow:rgba(255,196,64,.62);--glow2:rgba(255,150,40,.18);--bloom:.85}
.hc[data-hc-glow=pack-foil]{--glow:rgba(255,206,70,.3);--glow2:rgba(255,206,70,.07);--bloom:.45}

/* ───────────── face */
.hc-face{position:absolute;inset:0;overflow:hidden;isolation:isolate;border-radius:4.8%/3.45%;background:#0a090e;
  box-shadow:0 0 0 .5px rgba(0,0,0,.6),0 calc(10px + var(--hc-lift) * 12px) calc(26px + var(--hc-lift) * 14px) -10px rgba(0,0,0,.8)}
.hc-face>*{position:absolute;inset:0;border-radius:inherit}
.hc-print{overflow:hidden;background:#0a090e}
.hc-print>svg,.hc-print>img{position:absolute;left:0;top:0;width:100%;height:100%;display:block}
.hc-print>img{object-fit:cover}
.hc-print>img.hc-crop{object-fit:fill;max-width:none;max-height:none}
.hc-print[data-state=loading]{background:linear-gradient(110deg,#0c0b10 35%,#1a1822 50%,#0c0b10 65%) 0 0/300% 100%;animation:hc-load 1.4s linear infinite}
.hc-print[data-state=loading]>img{opacity:0}
.hc-print[data-state=error]{background:repeating-linear-gradient(135deg,#0c0b10 0 10px,#121119 10px 20px)}
.hc-print[data-state=error]>img{visibility:hidden}
@keyframes hc-load{to{background-position:-150% 0}}
/* film and flake canvases: composited layers, so they sit beside the face with their own radius (never inside the
   clipped face — that would push the whole face through a 1x render surface inside the 3D tilt) */
.hc-gl,.hc-glit{position:absolute;left:0;top:0;width:100%;height:100%;display:block;border-radius:4.8%/3.45%}
/* the thin film can only add light (screen): its dim parts leave the print as it is instead of laying a haze over it */
.hc-gl{mix-blend-mode:screen}
.hc[data-hc-kind=pack] .hc-gl,.hc[data-hc-kind=pack] .hc-glit{border-radius:0}
.hc[data-hc-kind=slab] .hc-gl,.hc[data-hc-kind=slab] .hc-glit{left:7%;top:4.23%;width:86%;height:72.77%;border-radius:3.4%/2.6%}

/* foil slots */
.hc-l{--p:.3;--b:0;--g:0;background-repeat:repeat;
  background-position:calc(50% + var(--hc-sx) * var(--p) * 100%) calc(50% + var(--hc-sy) * var(--p) * 100%);
  opacity:calc(var(--b) + var(--g) * var(--hc-off))}
/* light-following mask (the foil only catches light near the glare point) */
.hc-face[data-m=rainbow] .hc-l1,.hc-face[data-m=rainbow] .hc-l2,.hc-face[data-m=rainbow] .hc-l3,.hc-face[data-m=cosmos] .hc-l3,.hc-face[data-m=gold] .hc-l2,.hc-face[data-m=gold] .hc-l3,.hc-face[data-m=pack-foil] .hc-l2{-webkit-mask-image:radial-gradient(farthest-corner circle at var(--hc-gx) var(--hc-gy),#000 0%,rgba(0,0,0,var(--lit-mid,.55)) 32%,rgba(0,0,0,var(--lit-far,.12)) 75%);
  mask-image:radial-gradient(farthest-corner circle at var(--hc-gx) var(--hc-gy),#000 0%,rgba(0,0,0,var(--lit-mid,.55)) 32%,rgba(0,0,0,var(--lit-far,.12)) 75%)}

/* glare, sheen, rim — shared by every material */
.hc-glare{background:radial-gradient(farthest-corner circle at var(--hc-gx) var(--hc-gy),rgba(255,255,255,.9) 0%,rgba(255,255,255,.55) 14%,rgba(255,255,255,.08) 42%,rgba(0,0,0,.42) 105%);
  mix-blend-mode:overlay;opacity:calc(var(--glare,.5) * (.72 + .28 * var(--hc-off)) + var(--hc-fl) * .5)}
.hc-spot{background:radial-gradient(circle at var(--hc-gx) var(--hc-gy),rgba(var(--spot-c,255,255,255),.6) 0%,rgba(var(--spot-c,255,255,255),.18) 15%,rgba(var(--spot-c,255,255,255),0) 40%);
  mix-blend-mode:screen;opacity:calc(var(--spot,.3) * (.3 + .7 * var(--hc-off)) + var(--hc-fl) * .6)}
.hc-sheen{background-image:linear-gradient(var(--sheen-a,112deg),transparent 36%,rgba(255,255,255,.5) 47%,rgba(255,255,255,.85) 50%,rgba(255,255,255,.5) 53%,transparent 64%);
  background-repeat:no-repeat;background-size:260% 260%;
  background-position:calc(50% + var(--hc-sx) * 80%) calc(50% + var(--hc-sy) * 80%);
  mix-blend-mode:soft-light;opacity:calc(var(--sheen,.3) * (.35 + .65 * var(--hc-off)))}
.hc-rim{box-shadow:
  inset 0 0 0 1px rgba(255,255,255,.13),
  inset 0 1.5px 0 rgba(255,255,255,calc(.05 + max(0, var(--hc-ty) * -1) * .5)),
  inset 0 -1.5px 0 rgba(255,255,255,calc(.04 + max(0, var(--hc-ty)) * .45)),
  inset 1.5px 0 0 rgba(255,255,255,calc(.05 + max(0, var(--hc-tx) * -1) * .5)),
  inset -1.5px 0 0 rgba(255,255,255,calc(.05 + max(0, var(--hc-tx)) * .5))}
.hc-rim::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:var(--ring,0px);background:var(--ring-bg,none);opacity:var(--ring-o,1);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}

/* ═════════════ C · silver sheen — brushed metal and one soft silver band; no colour, no flakes */
.hc-face[data-m=silver]{--glare:.42;--sheen:.75;--spot:.32;--spot-c:226,232,246}
.hc-face[data-m=silver] .hc-l1{background-image:var(--hc-tex-brushed);background-size:256px 256px;mix-blend-mode:overlay;--p:.02;--b:.42;--g:.1}
.hc-face[data-m=silver] .hc-l2{background-image:linear-gradient(108deg,transparent 18%,rgba(190,200,225,.1) 32%,rgba(232,238,255,.36) 45%,rgba(255,255,255,.56) 50%,rgba(225,232,248,.34) 55%,rgba(190,200,225,.08) 68%,transparent 82%);
  background-size:280% 280%;background-repeat:no-repeat;mix-blend-mode:screen;--p:.46;--b:.36;--g:.6}
.hc-face[data-m=silver] .hc-l3{background-image:linear-gradient(160deg,rgba(150,170,210,.5),rgba(240,236,226,.4) 50%,rgba(150,165,200,.5));background-size:200% 200%;mix-blend-mode:color;--p:.12;--b:.18;--g:.1}
.hc-face[data-m=silver] .hc-rim{--ring:1.1%;--ring-o:.9;--ring-bg:linear-gradient(calc(var(--hc-ang) + 90deg),#7d8495,#f5f7fc 28%,#868d9e 50%,#eef1f7 72%,#7d8495)}

/* ═════════════ B · rainbow holo — two crossing rainbow sheets, a line grating at the light, strong glare */
.hc-face[data-m=rainbow]{--glare:.62;--sheen:.42;--spot:.42}
.hc-face[data-m=rainbow] .hc-l1{background-image:repeating-linear-gradient(112deg,hsl(350,95%,52%) 0%,hsl(24,98%,54%) 2.6%,hsl(52,98%,52%) 5.2%,hsl(110,80%,46%) 7.8%,hsl(178,90%,46%) 10.4%,hsl(212,95%,56%) 13%,hsl(262,85%,60%) 15.6%,hsl(310,88%,56%) 18.2%,hsl(350,95%,52%) 20.8%);
  background-size:420% 420%;mix-blend-mode:color-dodge;--p:.32;--b:.32;--g:.5;--lit-mid:.62;--lit-far:.24}
.hc-face[data-m=rainbow] .hc-l2{background-image:repeating-linear-gradient(-28deg,rgba(255,110,190,.9) 0%,rgba(255,214,110,.9) 4%,rgba(130,255,180,.9) 8%,rgba(100,214,255,.9) 12%,rgba(168,136,255,.9) 16%,rgba(255,110,190,.9) 20%);
  background-size:300% 300%;mix-blend-mode:screen;--p:-.24;--b:.12;--g:.4;--lit-mid:.42;--lit-far:.05}
.hc-face[data-m=rainbow] .hc-l3{background-image:repeating-linear-gradient(90deg,rgba(255,255,255,.6) 0 1px,rgba(255,255,255,0) 1px 3px,rgba(0,0,0,.2) 3px 4px);background-size:auto;
  mix-blend-mode:overlay;--p:.01;--b:.3;--g:.5;--lit-mid:.35;--lit-far:0}
.hc-face[data-m=rainbow] .hc-rim{--ring:1%;--ring-o:.9;--ring-bg:conic-gradient(from var(--hc-ang),#ff7ac6,#ffb86b,#f6f07c,#7dffb5,#62e7ff,#7d8dff,#d27bff,#ff7ac6)}

/* ═════════════ A · cosmos — nebula and two star fields in parallax, a prismatic swirl at the light, coloured flakes */
.hc-face[data-m=cosmos]{--glare:.5;--sheen:.3;--spot:.38;--spot-c:226,214,255}
.hc-face[data-m=cosmos] .hc-l1{background-image:
    radial-gradient(ellipse 38% 26% at 28% 30%,rgba(150,70,255,.95),transparent 72%),
    radial-gradient(ellipse 34% 24% at 74% 58%,rgba(255,70,200,.8),transparent 72%),
    radial-gradient(ellipse 42% 30% at 58% 18%,rgba(50,200,255,.75),transparent 72%),
    radial-gradient(ellipse 46% 34% at 24% 82%,rgba(70,120,255,.8),transparent 72%),
    var(--hc-tex-crinkle);
  background-size:170% 170%,170% 170%,170% 170%,170% 170%,220px 220px;
  background-blend-mode:multiply,multiply,multiply,multiply,normal;
  mix-blend-mode:screen;--p:.1;--b:.36;--g:.26}
.hc-face[data-m=cosmos] .hc-l2{background-image:var(--hc-tex-stars),var(--hc-tex-stars);background-size:160px 160px,96px 96px;mix-blend-mode:screen;--p:.55;--b:.6;--g:.3}
.hc-face[data-m=cosmos] .hc-l3{background-image:conic-gradient(from calc(var(--hc-ang) * 1.5) at var(--hc-gx) var(--hc-gy),#ff6fd8,#ffd36b,#7dffb5,#62e7ff,#7d8dff,#d27bff,#ff6fd8);
  mix-blend-mode:color-dodge;--p:0;--b:.1;--g:.42;--lit-mid:.42;--lit-far:.04}
.hc[data-hc-glow=cosmos] .hc-gl{opacity:.75}
.hc-face[data-m=cosmos] .hc-rim{--ring:1.3%;--ring-o:.95;--ring-bg:conic-gradient(from var(--hc-ang),#62e7ff,#7d8dff,#d27bff,#ff6fd8,#7d8dff,#62e7ff)}

/* ═════════════ S · gold secret rare — gold metal bands, prismatic glints, dense gold flakes, gold film, bloom */
.hc-face[data-m=gold]{--glare:.62;--sheen:.6;--spot:.5;--spot-c:255,226,160}
.hc-face[data-m=gold] .hc-print{filter:sepia(.28) saturate(1.25)}
.hc-face[data-m=gold] .hc-l1{background-image:linear-gradient(122deg,#2a1b02 0%,#9a6c14 10%,#fff0b8 20%,#b8841f 30%,#3a2804 42%,#e8c060 54%,#fff6d8 61%,#a87416 72%,#2e1f03 86%,#2a1b02 100%);
  background-size:220% 220%;mix-blend-mode:overlay;--p:.42;--b:.72;--g:.2}
.hc-face[data-m=gold] .hc-l2{background-image:repeating-linear-gradient(105deg,hsl(350,80%,38%) 0%,hsl(40,90%,42%) 2.5%,hsl(80,70%,38%) 5%,hsl(170,75%,38%) 7.5%,hsl(220,80%,46%) 10%,hsl(290,70%,44%) 12.5%,hsl(350,80%,38%) 15%);
  background-size:360% 360%;mix-blend-mode:color-dodge;--p:-.3;--b:.06;--g:.62;--lit-mid:.4;--lit-far:.03}
.hc-face[data-m=gold] .hc-l3{background-image:var(--hc-tex-glitter),var(--hc-tex-glitter);background-size:120px 120px,74px 74px;mix-blend-mode:color-dodge;--p:.6;--b:.4;--g:.45;--lit-mid:.6;--lit-far:.18}
.hc[data-hc-glow=gold] .hc-gl{opacity:.9}
/* the S face of a slab is bright polished gold already (js/ui/dom.js faceSvg): no sepia, and the metal bands only
   modulate it (at full strength their dark stops read as tarnish on a light print) */
.hc[data-hc-kind=slab] .hc-face[data-m=gold] .hc-print{filter:saturate(1.06) contrast(1.03)}
.hc[data-hc-kind=slab] .hc-face[data-m=gold] .hc-l1{--b:.3;--g:.28}
.hc-face[data-m=gold] .hc-rim{--ring:1.7%;--ring-bg:conic-gradient(from var(--hc-ang),#6e4b0c,#ffe7a0,#c48e26,#fff6d8,#7d5810,#ffd56b,#6e4b0c)}

/* ═════════════ pack-foil — crimped seals, pillow shading, metallic sheen, crinkles, sparse glints */
.hc-face[data-m=pack-foil]{--glare:.5;--sheen:.7;--spot:.4;border-radius:1.6%/1%;background:#0b0a0d}
.hc-face[data-m=pack-foil] .hc-sheen{mix-blend-mode:screen;--sheen:.55}
.hc-face[data-m=pack-foil] .hc-l1{background-image:linear-gradient(100deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.75) 10%,rgba(90,90,100,.25) 20%,rgba(255,255,255,.9) 31%,rgba(60,60,70,.2) 44%,rgba(255,255,255,.7) 56%,rgba(255,255,255,0) 68%,rgba(255,255,255,.55) 82%,rgba(255,255,255,0) 100%);
  background-size:260% 260%;mix-blend-mode:overlay;--p:.5;--b:.55;--g:.4}
.hc-face[data-m=pack-foil] .hc-l2{background-image:repeating-linear-gradient(118deg,hsl(350,80%,42%) 0%,hsl(45,90%,45%) 4%,hsl(140,70%,38%) 8%,hsl(195,85%,42%) 12%,hsl(260,70%,48%) 16%,hsl(350,80%,42%) 20%);
  background-size:380% 380%;mix-blend-mode:color-dodge;--p:.3;--b:.05;--g:.42;--lit-mid:.45;--lit-far:.04}
.hc-face[data-m=pack-foil] .hc-l3{background-image:var(--hc-tex-crinkle);background-size:300px 300px;mix-blend-mode:soft-light;--p:.05;--b:.3;--g:.2}
.hc-face[data-m=pack-foil] .hc-crimp{background:
    repeating-linear-gradient(180deg,rgba(255,255,255,.32) 0 1px,rgba(0,0,0,.34) 1px 2.4px,rgba(255,255,255,0) 2.4px 3.8px) 0 0/100% 6.5% no-repeat,
    repeating-linear-gradient(180deg,rgba(255,255,255,.32) 0 1px,rgba(0,0,0,.34) 1px 2.4px,rgba(255,255,255,0) 2.4px 3.8px) 0 100%/100% 6.5% no-repeat,
    linear-gradient(180deg,rgba(0,0,0,.5),rgba(0,0,0,0)) 0 6.95%/100% 2.6% no-repeat,
    linear-gradient(0deg,rgba(0,0,0,.5),rgba(0,0,0,0)) 0 93.05%/100% 2.6% no-repeat}
.hc-face[data-m=pack-foil] .hc-pillow{background:
    radial-gradient(ellipse 78% 62% at 50% 50%,rgba(0,0,0,0) 58%,rgba(0,0,0,.42) 100%),
    linear-gradient(90deg,rgba(0,0,0,.5),rgba(0,0,0,0) 6%,rgba(0,0,0,0) 94%,rgba(0,0,0,.5))}
.hc-face[data-m=pack-foil] .hc-pillow::after{content:"";position:absolute;inset:0;
  background:linear-gradient(90deg,transparent 22%,rgba(255,255,255,.3) 46%,rgba(255,255,255,.42) 50%,rgba(255,255,255,.3) 54%,transparent 78%) no-repeat;
  background-size:180% 100%;background-position:calc(50% - var(--hc-sx) * 70%) 0;mix-blend-mode:soft-light}
.hc-face[data-m=pack-foil] .hc-rim{box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}

/* ═════════════ slab — an acrylic display case. The window (3:4) sits at the top: a picture of a graded card (which
   carries its own grading label) or a face of our own; the nameplate sits under the window. The tier material lives on
   the bevelled frame ring and the nameplate. A picture in the window is "plain" (data-hc-plain): shown as it is. */
.hc[data-hc-kind=slab] .hc-case{position:absolute;inset:0;border-radius:6.4%/4%;
  background:linear-gradient(158deg,rgba(255,255,255,.2),rgba(255,255,255,.05) 28%,rgba(255,255,255,.02) 50%,rgba(255,255,255,.08) 74%,rgba(255,255,255,.03)),rgba(12,12,16,.5);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.62),inset 0 0 0 2.5px rgba(255,255,255,.05),inset 0 0 22px rgba(255,255,255,.08),
    0 calc(16px + var(--hc-lift) * 12px) calc(40px + var(--hc-lift) * 12px) -16px rgba(0,0,0,.9)}
/* the bevelled frame in the tier material: it turns with the light (--hc-ang) */
.hc[data-hc-kind=slab] .hc-case::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1.9%;
  background:var(--case-ring,linear-gradient(calc(var(--hc-ang) + 90deg),#6e4b0c,#ffe7a0 28%,#9c6a10 50%,#fff1bf 72%,#6e4b0c));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.92}
.hc[data-hc-kind=slab] .hc-case::after{content:"";position:absolute;inset:1.9%;border-radius:5.2%/3.3%;box-shadow:inset 0 0 0 1px rgba(255,241,191,.42);pointer-events:none}
.hc[data-hc-kind=slab][data-hc-glow=gold]{--case-ring:conic-gradient(from var(--hc-ang),#6e4b0c,#ffe7a0,#c48e26,#fff6d8,#7d5810,#ffd56b,#6e4b0c)}
.hc[data-hc-kind=slab][data-hc-glow=cosmos]{--case-ring:conic-gradient(from var(--hc-ang),#62e7ff,#7d8dff,#d27bff,#ff6fd8,#ffd36b,#7d8dff,#62e7ff)}
.hc[data-hc-kind=slab][data-hc-glow=rainbow]{--case-ring:conic-gradient(from var(--hc-ang),#ff7ac6,#ffb86b,#f6f07c,#7dffb5,#62e7ff,#7d8dff,#d27bff,#ff7ac6)}
.hc[data-hc-kind=slab][data-hc-glow=silver]{--case-ring:linear-gradient(calc(var(--hc-ang) + 90deg),#7d8495,#f5f7fc 28%,#868d9e 50%,#eef1f7 72%,#7d8495)}
.hc[data-hc-kind=slab] .hc-face{inset:4.23% 7% 23% 7%;border-radius:3.4%/2.6%;background:#050507;box-shadow:0 0 0 1px rgba(0,0,0,.7)}
.hc-well{position:absolute;inset:2.9% 5.3% 21.6% 5.3%;border-radius:4.6%/3.3%;background:#050507;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16),inset 0 2px 10px rgba(0,0,0,.9)}
/* the nameplate: black and gold, tier letter in the tier colour; no coloured band, no grade words (it must not read as
   a grading company's label) */
.hc-label{position:absolute;left:7%;right:7%;top:79.6%;height:15.9%;border-radius:4.4%/15%;overflow:hidden;
  background:linear-gradient(180deg,#16120a,#0b0906 70%,#120e07);box-shadow:inset 0 0 0 1px rgba(255,212,110,.38),inset 0 0 0 3px rgba(0,0,0,.6),inset 0 0 0 3.6px rgba(255,212,110,.16);
  display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:4.5%;padding:0 12% 0 5%;color:#f4e6bd;
  font:600 calc(var(--hc-w) * .041)/1.22 var(--hc-font,"Inter","Noto Sans SC",system-ui,sans-serif)}
.hc-label::before{content:"";position:absolute;inset:0;background:linear-gradient(calc(100deg + var(--hc-tx) * 20deg),transparent 30%,rgba(255,241,191,.16) 46%,rgba(255,255,255,.26) 50%,rgba(255,241,191,.16) 54%,transparent 70%) no-repeat;
  background-size:240% 100%;background-position:calc(50% - var(--hc-sx) * 90%) 0;mix-blend-mode:screen;pointer-events:none}
.hc-lt{font-size:calc(var(--hc-w) * .13);font-weight:800;line-height:1;letter-spacing:-.02em;
  background:linear-gradient(180deg,#fff6d6,#ffd46b 45%,#b7801c);-webkit-background-clip:text;background-clip:text;color:transparent}
.hc-label[data-tier=A] .hc-lt{background-image:linear-gradient(180deg,#fff0fb,#ff8ad8 48%,#a24fd0)}
.hc-label[data-tier=B] .hc-lt{background-image:linear-gradient(180deg,#effdff,#79e6ff 48%,#2f86c9)}
.hc-label[data-tier=C] .hc-lt{background-image:linear-gradient(180deg,#ffffff,#c3c9d4 50%,#6f7686)}
.hc-lx{display:flex;flex-direction:column;min-width:0}
.hc-lh,.hc-ls{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hc-lh{letter-spacing:.05em;text-transform:uppercase}
.hc-ls{font-weight:600;font-size:.92em;color:#fff6dc;letter-spacing:.01em;font-variant-numeric:tabular-nums}
.hc-ln{font:500 calc(var(--hc-w) * .034)/1 var(--hc-mono,"JetBrains Mono",ui-monospace,monospace);color:rgba(244,230,189,.75);align-self:start;margin-top:22%;font-variant-numeric:tabular-nums}
.hc-sticker{position:absolute;right:4.2%;top:50%;width:7.2%;aspect-ratio:1;margin-top:-3.6%;border-radius:50%;
  background:conic-gradient(from var(--hc-ang),#ff7ac6,#ffd36b,#7dffb5,#62e7ff,#7d8dff,#d27bff,#ff7ac6);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.45),0 0 0 1px rgba(0,0,0,.5);opacity:.85}
.hc-sticker::after{content:"";position:absolute;inset:0;border-radius:inherit;background:radial-gradient(circle at var(--hc-gx) var(--hc-gy),rgba(255,255,255,.9),transparent 55%);mix-blend-mode:overlay}
.hc[data-hc-kind=slab] .hc-label[data-tier=""] .hc-lt{display:none}
.hc-acry{position:absolute;inset:0;border-radius:6.4%/4%;overflow:hidden}
.hc-acry>*{position:absolute;inset:0;border-radius:inherit}
.hc-acry-glare{
  background:radial-gradient(ellipse 75% 42% at calc(var(--hc-gx) * 1.3 - 15%) calc(var(--hc-gy) * 1.3 - 15%),rgba(255,255,255,.3),rgba(255,255,255,.06) 45%,rgba(255,255,255,0) 70%),
    linear-gradient(calc(118deg + var(--hc-tx) * 16deg),rgba(255,255,255,0) 38%,rgba(255,255,255,.16) 46%,rgba(255,255,255,.04) 50%,rgba(255,255,255,0) 56%);
  transform:translate(calc(var(--hc-tx) * -3%),calc(var(--hc-ty) * -3%));opacity:calc(.55 + .45 * var(--hc-off))}
.hc-acry-edge{box-shadow:
  inset calc(var(--hc-tx) * -3px) calc(var(--hc-ty) * -3px) 0 -1px rgba(255,255,255,calc(.12 + var(--hc-off) * .3)),
  inset 0 1px 0 rgba(255,255,255,.35)}
/* plain: a third-party picture is not tinted, foiled or filtered — only the acrylic reflection (screen, at most about
   16 %) and the 1px window rim stay; trimmed only at its black sides (cover on a 3:4 window) */
.hc[data-hc-plain] .hc-l,.hc[data-hc-plain] .hc-glare,.hc[data-hc-plain] .hc-spot,.hc[data-hc-plain] .hc-sheen,.hc[data-hc-plain] .hc-rim::before{display:none}
.hc[data-hc-plain] .hc-print{filter:none!important}
.hc[data-hc-plain] .hc-print>img:not(.hc-crop){object-fit:cover;object-position:50% 45%;transform:scale(1.08);transform-origin:50% 45%}
.hc[data-hc-plain] .hc-acry-glare{mix-blend-mode:screen;opacity:calc((.55 + .45 * var(--hc-off)) * .4)}
.hc[data-hc-kind=slab] .hc-print[data-state=loading]{background:linear-gradient(110deg,#0b0a08 35%,#2c2312 50%,#0b0a08 65%) 0 0/300% 100%}

/* reduced motion: still frame only (the engine never starts its loop) */
@media (prefers-reduced-motion: reduce){
  .hc-print[data-state=loading]{animation:none}
}
