/* ══════════════════════════════════════════════════════════════════
   DBTS V 0.462 — HOLOGRAPHIC LEADERS
   Presentation for scripts/systems/76-holo-leaders.js. Additive only.

   The foil is a LAYER (.holo-fx) placed over an awakened leader's art.
   The artwork file is never modified.

   Performance contract
     - The layer is one blended group with a static texture plus two
       children. Only `transform` and `opacity` are ever animated, so the
       browser composites the motion without repainting the card.
     - .holo-static (Dragon Vault grid, box summary, Max Performance) has
       no children, no animation and no blend mode.
     - The layer only exists while an awakened holographic leader is on
       screen; an un-awakened leader has no layer at all.
   ══════════════════════════════════════════════════════════════════ */

/* ── Palettes: one block per card colour ─────────────────────────────
   --ha/--hb  band colours     --hc  bright core of the band
   --ht       resting tint     --he  reflective edge
   A second colour ([data-holo2]) fills --ga/--gb/--gt for two-colour
   leaders; without it the gradients fall back to the first colour.
   To support a new card colour, add one [data-holo] + [data-holo2] pair. */
.holo-fx { --ha: 255, 95, 214; --hb: 60, 210, 255; --hc: 255, 240, 170; --ht: 150, 190, 255; --he: 190, 235, 255; --hk: 1; }
.holo-fx[data-holo="red"]    { --ha: 255, 44, 30;   --hb: 255, 128, 40;  --hc: 255, 214, 190; --ht: 255, 60, 40;   --he: 255, 120, 90; }
.holo-fx[data-holo="blue"]   { --ha: 30, 120, 255;  --hb: 50, 228, 255;  --hc: 205, 244, 255; --ht: 40, 140, 255;  --he: 110, 215, 255; }
.holo-fx[data-holo="green"]  { --ha: 12, 196, 100;  --hb: 120, 255, 150; --hc: 220, 255, 226; --ht: 20, 200, 110;  --he: 110, 245, 160; }
.holo-fx[data-holo="yellow"] { --ha: 255, 176, 0;   --hb: 255, 226, 80;  --hc: 255, 248, 208; --ht: 255, 196, 30;  --he: 255, 224, 110; }
/* Black: graphite base with an oil-slick rainbow inside the band. */
.holo-fx[data-holo="black"]  { --ha: 134, 84, 232;  --hb: 44, 178, 170;  --hc: 214, 176, 96;  --ht: 120, 128, 150; --he: 176, 170, 206; --hk: 1.15; }
/* White: pearl / silver with soft iridescence. */
.holo-fx[data-holo="white"]  { --ha: 214, 228, 255; --hb: 255, 224, 246; --hc: 255, 255, 255; --ht: 226, 234, 255; --he: 246, 248, 255; --hk: .9; }
.holo-fx[data-holo2="red"]    { --ga: 255, 44, 30;  --gb: 255, 128, 40;  --gt: 255, 60, 40; }
.holo-fx[data-holo2="blue"]   { --ga: 30, 120, 255; --gb: 50, 228, 255;  --gt: 40, 140, 255; }
.holo-fx[data-holo2="green"]  { --ga: 12, 196, 100; --gb: 120, 255, 150; --gt: 20, 200, 110; }
.holo-fx[data-holo2="yellow"] { --ga: 255, 176, 0;  --gb: 255, 226, 80;  --gt: 255, 196, 30; }
.holo-fx[data-holo2="black"]  { --ga: 134, 84, 232; --gb: 44, 178, 170;  --gt: 120, 128, 150; }
.holo-fx[data-holo2="white"]  { --ga: 214, 228, 255; --gb: 255, 224, 246; --gt: 226, 234, 255; }

/* ── The layer: oil-slick foil film ───────────────────────────────────
   V0.466. A semi-transparent film ON TOP of the art, blended with plain
   alpha. No overlay / soft-light / dodge: the artwork keeps its own
   colours and brightness, and the foil is seen as a separate iridescent
   skin over it.

   The look is the soft "oil spill" of holographic stock — wide pastel
   rainbow washes that melt into each other, with no gaps and no streaks.
   Two sheets make it:
     sheet A  a continuous rainbow that drifts on a diagonal (7s loop)
     sheet B  large colour pools that turn around the card centre (13s)
   Because sheet A has no gaps there is nothing to "swipe" across the card;
   every spot just keeps changing colour. Only `transform` is animated.

   A static cracked-ice facet pattern sits on top for a slight texture. */
.holo-fx {
  --oil:
    #ff2fa8 0%, #ff7a1f 8%, #ffd21f 16%, #2fe870 25%, #12cfff 35%, #2f6bff 45%,
    #8a3dff 55%, #ff2fd0 64%, #1fe0b4 74%, #2f9bff 84%, #b040ff 92%, #ff2fa8 100%;
  position: absolute; inset: 0; z-index: 3; display: block;
  overflow: hidden; border-radius: inherit; pointer-events: none;
  contain: strict;
  mix-blend-mode: normal;
  opacity: calc(.38 * var(--hk));
  /* V0.468: the foil covers the WHOLE card evenly, text box included. */
  background: none;
  box-shadow: inset 0 0 0 1px rgba(var(--he), .9), inset 0 0 8px 1px rgba(var(--ha), .5);
}

/* V0.519: the V0.512 compositor stabilization is intentionally scoped to
   in-match cards only. Pack-opening cards flip their front face with a 3D
   rotateY(180deg); applying backface-visibility to their nested foil can hide
   the oil-spill layer entirely in some browsers. */
#table .card .holo-fx,
.hand-card .holo-fx,
.opp-card .holo-fx {
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform, opacity;
}

/* V0.520 — keep the playmat Leader itself on a stable compositor island.
   Remote actions can re-run the board renderer many times per second; the
   renderer now avoids identical style writes, and this parent layer prevents
   unrelated board paint/layout work from disturbing the live foil children. */
#table .card.holo-live-card {
  will-change: transform;
  contain: layout paint style;
}
/* Sheet A: continuous pastel rainbow. One gradient period is 1.5 card
   widths, so the washes are broad; it moves exactly one period per loop. */
.holo-fx > .holo-sheen {
  position: absolute; left: -250%; top: -150%; width: 600%; height: 400%;
  background: repeating-linear-gradient(90deg, var(--oil)) 0 0 / 20% 100%;
  transform: rotate(-32deg) translate3d(0, 0, 0);
  animation: holoFlowA 7s linear infinite;
  will-change: transform;
}
/* Sheet B: big soft colour pools, turning slowly the other way. They bend
   sheet A's straight washes into the uneven, pooled look of real foil. */
.holo-fx > .holo-glint {
  position: absolute; left: 50%; top: 50%; width: 300%; aspect-ratio: 1; margin: -150% 0 0 -150%;
  background:
    radial-gradient(24% 30% at 30% 30%, rgba(20, 215, 255, .9), rgba(20, 215, 255, 0) 100%),
    radial-gradient(28% 22% at 66% 36%, rgba(255, 50, 180, .9), rgba(255, 50, 180, 0) 100%),
    radial-gradient(22% 28% at 44% 56%, rgba(70, 80, 255, .9), rgba(70, 80, 255, 0) 100%),
    radial-gradient(26% 22% at 70% 68%, rgba(40, 235, 120, .9), rgba(40, 235, 120, 0) 100%),
    radial-gradient(22% 26% at 30% 72%, rgba(255, 170, 30, .9), rgba(255, 170, 30, 0) 100%),
    radial-gradient(20% 20% at 52% 22%, rgba(160, 60, 255, .9), rgba(160, 60, 255, 0) 100%);
  transform: rotate(0deg);
  animation: holoTurnB 13s linear infinite;
  will-change: transform;
}
@keyframes holoFlowA {
  from { transform: rotate(-32deg) translate3d(0, 0, 0); }
  to   { transform: rotate(-32deg) translate3d(-20%, 0, 0); }
}
@keyframes holoTurnB { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
/* Cracked-ice facets: a static, seamless tile of faint light and dark
   shards, so the film reads as textured foil rather than a flat tint. */
.holo-fx::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22120%22 height=%22120%22 viewBox=%220 0 120 120%22%3E%3Cpath d=%22M40.6 69.5 L62.6 56.2 L58.9 72.7 Z%22 fill=%22%23000%22 fill-opacity=%220.29%22/%3E%3Cpath d=%22M85.8 72.8 L75.3 78.1 L76.3 66.5 Z%22 fill=%22%23fff%22 fill-opacity=%220.38%22/%3E%3Cpath d=%22M-6.4 -9.5 L14.4 1.7 L-14.9 8.2 Z%22 fill=%22%23000%22 fill-opacity=%220.20%22/%3E%3Cpath d=%22M-6.4 110.5 L14.4 121.7 L-14.9 128.2 Z%22 fill=%22%23000%22 fill-opacity=%220.20%22/%3E%3Cpath d=%22M113.6 -9.5 L134.4 1.7 L105.1 8.2 Z%22 fill=%22%23000%22 fill-opacity=%220.20%22/%3E%3Cpath d=%22M113.6 110.5 L134.4 121.7 L105.1 128.2 Z%22 fill=%22%23000%22 fill-opacity=%220.20%22/%3E%3Cpath d=%22M-9.0 44.4 L6.2 45.0 L-1.5 55.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.45%22/%3E%3Cpath d=%22M111.0 44.4 L126.2 45.0 L118.5 55.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.45%22/%3E%3Cpath d=%22M18.8 83.9 L32.0 89.4 L21.2 95.4 Z%22 fill=%22%23fff%22 fill-opacity=%220.70%22/%3E%3Cpath d=%22M24.8 39.4 L20.8 21.3 L41.0 35.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.32%22/%3E%3Cpath d=%22M-11.6 105.2 L-20.7 100.1 L-5.1 93.4 Z%22 fill=%22%23fff%22 fill-opacity=%220.62%22/%3E%3Cpath d=%22M108.4 105.2 L99.3 100.1 L114.9 93.4 Z%22 fill=%22%23fff%22 fill-opacity=%220.62%22/%3E%3Cpath d=%22M68.9 27.3 L79.8 35.6 L68.1 42.1 Z%22 fill=%22%23fff%22 fill-opacity=%220.42%22/%3E%3Cpath d=%22M78.6 10.0 L73.1 22.6 L61.7 12.4 Z%22 fill=%22%23fff%22 fill-opacity=%220.58%22/%3E%3Cpath d=%22M78.6 130.0 L73.1 142.6 L61.7 132.4 Z%22 fill=%22%23fff%22 fill-opacity=%220.58%22/%3E%3Cpath d=%22M32.2 -3.8 L45.8 -3.6 L37.1 6.6 Z%22 fill=%22%23000%22 fill-opacity=%220.22%22/%3E%3Cpath d=%22M32.2 116.2 L45.8 116.4 L37.1 126.6 Z%22 fill=%22%23000%22 fill-opacity=%220.22%22/%3E%3Cpath d=%22M69.1 33.8 L86.0 42.4 L69.9 53.9 Z%22 fill=%22%23fff%22 fill-opacity=%220.52%22/%3E%3Cpath d=%22M46.1 32.7 L64.5 17.6 L63.1 39.1 Z%22 fill=%22%23fff%22 fill-opacity=%220.55%22/%3E%3Cpath d=%22M35.9 42.9 L24.0 65.9 L15.6 49.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.37%22/%3E%3Cpath d=%22M15.8 50.9 L25.8 36.2 L31.6 59.6 Z%22 fill=%22%23fff%22 fill-opacity=%220.31%22/%3E%3Cpath d=%22M60.0 16.7 L43.1 -8.8 L63.4 -7.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.46%22/%3E%3Cpath d=%22M60.0 136.7 L43.1 111.2 L63.4 112.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.46%22/%3E%3Cpath d=%22M80.2 27.4 L84.5 14.7 L95.7 21.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.66%22/%3E%3Cpath d=%22M49.4 53.8 L51.5 80.6 L33.9 64.2 Z%22 fill=%22%23fff%22 fill-opacity=%220.61%22/%3E%3Cpath d=%22M32.9 -2.2 L28.1 -20.7 L53.3 -6.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.32%22/%3E%3Cpath d=%22M32.9 117.8 L28.1 99.3 L53.3 113.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.32%22/%3E%3Cpath d=%22M55.9 75.6 L73.1 91.1 L53.1 98.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.42%22/%3E%3Cpath d=%22M-12.5 -19.8 L-15.3 -6.6 L-28.5 -15.0 Z%22 fill=%22%23fff%22 fill-opacity=%220.47%22/%3E%3Cpath d=%22M-12.5 100.2 L-15.3 113.4 L-28.5 105.0 Z%22 fill=%22%23fff%22 fill-opacity=%220.47%22/%3E%3Cpath d=%22M107.5 -19.8 L104.7 -6.6 L91.5 -15.0 Z%22 fill=%22%23fff%22 fill-opacity=%220.47%22/%3E%3Cpath d=%22M107.5 100.2 L104.7 113.4 L91.5 105.0 Z%22 fill=%22%23fff%22 fill-opacity=%220.47%22/%3E%3Cpath d=%22M69.9 13.0 L82.2 -3.6 L93.0 13.2 Z%22 fill=%22%23000%22 fill-opacity=%220.14%22/%3E%3Cpath d=%22M69.9 133.0 L82.2 116.4 L93.0 133.2 Z%22 fill=%22%23000%22 fill-opacity=%220.14%22/%3E%3Cpath d=%22M96.3 10.1 L88.3 0.3 L97.5 -2.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.44%22/%3E%3Cpath d=%22M96.3 130.1 L88.3 120.3 L97.5 117.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.44%22/%3E%3Cpath d=%22M57.9 11.6 L71.9 20.0 L62.4 24.6 Z%22 fill=%22%23fff%22 fill-opacity=%220.70%22/%3E%3Cpath d=%22M57.9 131.6 L71.9 140.0 L62.4 144.6 Z%22 fill=%22%23fff%22 fill-opacity=%220.70%22/%3E%3Cpath d=%22M-17.3 6.6 L-4.0 20.3 L-17.1 18.4 Z%22 fill=%22%23000%22 fill-opacity=%220.14%22/%3E%3Cpath d=%22M-17.3 126.6 L-4.0 140.3 L-17.1 138.4 Z%22 fill=%22%23000%22 fill-opacity=%220.14%22/%3E%3Cpath d=%22M102.7 6.6 L116.0 20.3 L102.9 18.4 Z%22 fill=%22%23000%22 fill-opacity=%220.14%22/%3E%3Cpath d=%22M102.7 126.6 L116.0 140.3 L102.9 138.4 Z%22 fill=%22%23000%22 fill-opacity=%220.14%22/%3E%3Cpath d=%22M54.2 85.6 L71.3 88.5 L57.7 96.2 Z%22 fill=%22%23000%22 fill-opacity=%220.14%22/%3E%3Cpath d=%22M8.0 -16.0 L18.0 3.3 L-0.1 -0.1 Z%22 fill=%22%23fff%22 fill-opacity=%220.32%22/%3E%3Cpath d=%22M8.0 104.0 L18.0 123.3 L-0.1 119.9 Z%22 fill=%22%23fff%22 fill-opacity=%220.32%22/%3E%3Cpath d=%22M128.0 -16.0 L138.0 3.3 L119.9 -0.1 Z%22 fill=%22%23fff%22 fill-opacity=%220.32%22/%3E%3Cpath d=%22M128.0 104.0 L138.0 123.3 L119.9 119.9 Z%22 fill=%22%23fff%22 fill-opacity=%220.32%22/%3E%3Cpath d=%22M71.0 -12.2 L70.9 17.2 L49.9 0.7 Z%22 fill=%22%23000%22 fill-opacity=%220.19%22/%3E%3Cpath d=%22M71.0 107.8 L70.9 137.2 L49.9 120.7 Z%22 fill=%22%23000%22 fill-opacity=%220.19%22/%3E%3Cpath d=%22M-12.2 -27.0 L-3.3 -10.2 L-24.7 -14.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.40%22/%3E%3Cpath d=%22M-12.2 93.0 L-3.3 109.8 L-24.7 105.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.40%22/%3E%3Cpath d=%22M107.8 -27.0 L116.7 -10.2 L95.3 -14.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.40%22/%3E%3Cpath d=%22M107.8 93.0 L116.7 109.8 L95.3 105.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.40%22/%3E%3Cpath d=%22M67.8 73.3 L71.2 57.1 L88.2 68.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.29%22/%3E%3Cpath d=%22M16.9 -13.8 L32.0 -19.0 L30.5 -3.5 Z%22 fill=%22%23fff%22 fill-opacity=%220.47%22/%3E%3Cpath d=%22M16.9 106.2 L32.0 101.0 L30.5 116.5 Z%22 fill=%22%23fff%22 fill-opacity=%220.47%22/%3E%3Cpath d=%22M60.3 15.5 L74.6 -5.1 L85.9 8.1 Z%22 fill=%22%23fff%22 fill-opacity=%220.59%22/%3E%3Cpath d=%22M60.3 135.5 L74.6 114.9 L85.9 128.1 Z%22 fill=%22%23fff%22 fill-opacity=%220.59%22/%3E%3Cpath d=%22M58.0 -5.9 L38.1 0.5 L49.6 -25.7 Z%22 fill=%22%23000%22 fill-opacity=%220.27%22/%3E%3Cpath d=%22M58.0 114.1 L38.1 120.5 L49.6 94.3 Z%22 fill=%22%23000%22 fill-opacity=%220.27%22/%3E%3Cpath d=%22M65.2 20.8 L76.9 2.7 L81.6 23.1 Z%22 fill=%22%23000%22 fill-opacity=%220.29%22/%3E%3Cpath d=%22M65.2 140.8 L76.9 122.7 L81.6 143.1 Z%22 fill=%22%23000%22 fill-opacity=%220.29%22/%3E%3Cpath d=%22M95.2 23.3 L88.8 36.3 L79.9 23.8 Z%22 fill=%22%23000%22 fill-opacity=%220.28%22/%3E%3Cpath d=%22M-1.1 14.1 L6.3 -1.3 L11.6 10.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.63%22/%3E%3Cpath d=%22M-1.1 134.1 L6.3 118.7 L11.6 130.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.63%22/%3E%3Cpath d=%22M118.9 14.1 L126.3 -1.3 L131.6 10.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.63%22/%3E%3Cpath d=%22M118.9 134.1 L126.3 118.7 L131.6 130.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.63%22/%3E%3Cpath d=%22M-4.0 8.1 L22.6 17.4 L5.4 25.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.42%22/%3E%3Cpath d=%22M-4.0 128.1 L22.6 137.4 L5.4 145.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.42%22/%3E%3Cpath d=%22M116.0 8.1 L142.6 17.4 L125.4 25.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.42%22/%3E%3Cpath d=%22M116.0 128.1 L142.6 137.4 L125.4 145.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.42%22/%3E%3Cpath d=%22M18.0 -12.6 L7.0 -12.8 L10.5 -22.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.31%22/%3E%3Cpath d=%22M18.0 107.4 L7.0 107.2 L10.5 97.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.31%22/%3E%3Cpath d=%22M138.0 -12.6 L127.0 -12.8 L130.5 -22.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.31%22/%3E%3Cpath d=%22M138.0 107.4 L127.0 107.2 L130.5 97.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.31%22/%3E%3Cpath d=%22M50.1 97.5 L32.4 92.3 L43.9 77.8 Z%22 fill=%22%23fff%22 fill-opacity=%220.41%22/%3E%3Cpath d=%22M37.4 50.4 L42.5 35.6 L55.2 46.1 Z%22 fill=%22%23fff%22 fill-opacity=%220.51%22/%3E%3Cpath d=%22M6.1 78.0 L-18.0 83.1 L-2.7 65.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.59%22/%3E%3Cpath d=%22M126.1 78.0 L102.0 83.1 L117.3 65.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.59%22/%3E%3Cpath d=%22M54.8 99.7 L59.6 82.1 L73.5 95.4 Z%22 fill=%22%23000%22 fill-opacity=%220.28%22/%3E%3Cpath d=%22M-9.0 68.5 L3.5 76.2 L-11.0 79.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.39%22/%3E%3Cpath d=%22M111.0 68.5 L123.5 76.2 L109.0 79.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.39%22/%3E%3Cpath d=%22M18.4 90.9 L4.6 79.9 L21.8 65.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.38%22/%3E%3Cpath d=%22M138.4 90.9 L124.6 79.9 L141.8 65.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.38%22/%3E%3Cpath d=%22M10.8 85.9 L27.4 88.3 L24.9 97.6 Z%22 fill=%22%23000%22 fill-opacity=%220.19%22/%3E%3Cpath d=%22M72.1 61.3 L57.8 69.9 L57.6 56.6 Z%22 fill=%22%23000%22 fill-opacity=%220.21%22/%3E%3Cpath d=%22M70.2 -4.1 L85.2 -6.7 L82.6 7.1 Z%22 fill=%22%23000%22 fill-opacity=%220.23%22/%3E%3Cpath d=%22M70.2 115.9 L85.2 113.3 L82.6 127.1 Z%22 fill=%22%23000%22 fill-opacity=%220.23%22/%3E%3Cpath d=%22M-26.3 47.2 L-16.8 26.5 L-6.2 39.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.57%22/%3E%3Cpath d=%22M93.7 47.2 L103.2 26.5 L113.8 39.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.57%22/%3E%3Cpath d=%22M36.2 86.6 L41.7 75.1 L50.2 86.6 Z%22 fill=%22%23fff%22 fill-opacity=%220.34%22/%3E%3Cpath d=%22M65.5 31.2 L77.7 26.2 L76.3 44.3 Z%22 fill=%22%23000%22 fill-opacity=%220.14%22/%3E%3Cpath d=%22M13.4 -2.3 L26.3 10.2 L13.0 22.2 Z%22 fill=%22%23fff%22 fill-opacity=%220.54%22/%3E%3Cpath d=%22M13.4 117.7 L26.3 130.2 L13.0 142.2 Z%22 fill=%22%23fff%22 fill-opacity=%220.54%22/%3E%3Cpath d=%22M133.4 -2.3 L146.3 10.2 L133.0 22.2 Z%22 fill=%22%23fff%22 fill-opacity=%220.54%22/%3E%3Cpath d=%22M133.4 117.7 L146.3 130.2 L133.0 142.2 Z%22 fill=%22%23fff%22 fill-opacity=%220.54%22/%3E%3Cpath d=%22M91.8 105.4 L89.2 89.2 L99.1 99.7 Z%22 fill=%22%23fff%22 fill-opacity=%220.42%22/%3E%3Cpath d=%22M55.0 84.0 L72.4 93.2 L58.0 107.2 Z%22 fill=%22%23fff%22 fill-opacity=%220.68%22/%3E%3Cpath d=%22M74.1 29.7 L69.3 19.0 L81.0 20.3 Z%22 fill=%22%23fff%22 fill-opacity=%220.37%22/%3E%3Cpath d=%22M-16.9 -10.9 L-0.2 -10.9 L-6.8 8.8 Z%22 fill=%22%23000%22 fill-opacity=%220.29%22/%3E%3Cpath d=%22M-16.9 109.1 L-0.2 109.1 L-6.8 128.8 Z%22 fill=%22%23000%22 fill-opacity=%220.29%22/%3E%3Cpath d=%22M103.1 -10.9 L119.8 -10.9 L113.2 8.8 Z%22 fill=%22%23000%22 fill-opacity=%220.29%22/%3E%3Cpath d=%22M103.1 109.1 L119.8 109.1 L113.2 128.8 Z%22 fill=%22%23000%22 fill-opacity=%220.29%22/%3E%3Cpath d=%22M79.2 25.4 L88.2 40.1 L71.7 45.8 Z%22 fill=%22%23fff%22 fill-opacity=%220.40%22/%3E%3Cpath d=%22M84.7 13.0 L64.5 3.0 L86.0 -5.6 Z%22 fill=%22%23fff%22 fill-opacity=%220.45%22/%3E%3Cpath d=%22M84.7 133.0 L64.5 123.0 L86.0 114.4 Z%22 fill=%22%23fff%22 fill-opacity=%220.45%22/%3E%3Cpath d=%22M59.2 -8.6 L78.3 -19.8 L74.3 -3.6 Z%22 fill=%22%23fff%22 fill-opacity=%220.45%22/%3E%3Cpath d=%22M59.2 111.4 L78.3 100.2 L74.3 116.4 Z%22 fill=%22%23fff%22 fill-opacity=%220.45%22/%3E%3Cpath d=%22M56.4 42.1 L66.0 52.5 L53.9 51.1 Z%22 fill=%22%23fff%22 fill-opacity=%220.59%22/%3E%3Cpath d=%22M69.8 -20.2 L73.2 -9.3 L59.4 -8.9 Z%22 fill=%22%23fff%22 fill-opacity=%220.27%22/%3E%3Cpath d=%22M69.8 99.8 L73.2 110.7 L59.4 111.1 Z%22 fill=%22%23fff%22 fill-opacity=%220.27%22/%3E%3Cpath d=%22M-5.9 -9.6 L10.1 -22.6 L10.3 -6.5 Z%22 fill=%22%23000%22 fill-opacity=%220.30%22/%3E%3Cpath d=%22M-5.9 110.4 L10.1 97.4 L10.3 113.5 Z%22 fill=%22%23000%22 fill-opacity=%220.30%22/%3E%3Cpath d=%22M114.1 -9.6 L130.1 -22.6 L130.3 -6.5 Z%22 fill=%22%23000%22 fill-opacity=%220.30%22/%3E%3Cpath d=%22M114.1 110.4 L130.1 97.4 L130.3 113.5 Z%22 fill=%22%23000%22 fill-opacity=%220.30%22/%3E%3Cpath d=%22M26.8 68.8 L22.9 83.2 L17.8 76.9 Z%22 fill=%22%23fff%22 fill-opacity=%220.39%22/%3E%3Cpath d=%22M83.6 30.9 L77.2 22.0 L93.8 20.4 Z%22 fill=%22%23fff%22 fill-opacity=%220.69%22/%3E%3Cpath d=%22M64.0 68.6 L48.1 73.6 L51.0 54.5 Z%22 fill=%22%23000%22 fill-opacity=%220.13%22/%3E%3Cpath d=%22M62.2 87.2 L53.3 100.8 L49.8 84.0 Z%22 fill=%22%23000%22 fill-opacity=%220.15%22/%3E%3C/svg%3E") 0 0 / 44% auto;
  /* Overlay INTO the foil: shards become lighter and darker facets of the
     rainbow itself instead of white flecks laid over the picture. */
  mix-blend-mode: overlay;
}

/* On the board a card is small, so the foil is pushed a little harder. */
#table .card .holo-fx, .hand-card .holo-fx { --hk: 1.2; }

/* ── Static foil: no children, no animation, no blend mode ───────────
   Used for the Dragon Vault grid and the box summary, where many leaders
   are on screen at once: a still frame of the same rainbow. */
.holo-fx.holo-static {
  mix-blend-mode: normal; contain: paint; opacity: 1;
  background:
    radial-gradient(60% 45% at 20% 18%, rgba(255, 110, 200, .40), rgba(255, 110, 200, 0)), radial-gradient(60% 45% at 85% 30%, rgba(70, 225, 255, .42), rgba(70, 225, 255, 0)), radial-gradient(70% 45% at 40% 62%, rgba(120, 110, 255, .38), rgba(120, 110, 255, 0)), radial-gradient(55% 40% at 85% 85%, rgba(110, 255, 190, .40), rgba(110, 255, 190, 0)), radial-gradient(55% 40% at 12% 90%, rgba(255, 200, 110, .38), rgba(255, 200, 110, 0));
  box-shadow: inset 0 0 0 1px rgba(var(--he), .7);
}
.holo-fx.holo-static::after { display: none; }

/* Max Performance (webcam matches): the same still frame, no motion and
   no blending, so it costs the same as a plain overlay. */
body.fx-ultra #table .card .holo-fx, body.fx-ultra .hand-card .holo-fx {
  mix-blend-mode: normal; contain: paint; opacity: 1;
  background:
    radial-gradient(60% 45% at 20% 18%, rgba(255, 110, 200, .40), rgba(255, 110, 200, 0)), radial-gradient(60% 45% at 85% 30%, rgba(70, 225, 255, .42), rgba(70, 225, 255, 0)), radial-gradient(70% 45% at 40% 62%, rgba(120, 110, 255, .38), rgba(120, 110, 255, 0)), radial-gradient(55% 40% at 85% 85%, rgba(110, 255, 190, .40), rgba(110, 255, 190, 0)), radial-gradient(55% 40% at 12% 90%, rgba(255, 200, 110, .38), rgba(255, 200, 110, 0));
}
body.fx-ultra #table .card .holo-fx > i, body.fx-ultra .hand-card .holo-fx > i,
body.fx-ultra #table .card .holo-fx::after, body.fx-ultra .hand-card .holo-fx::after { display: none; }
/* A card being dragged or animated is already on its own layer; park the
   foil so the move stays as cheap as it was before. */
#table .card.dragging .holo-fx > i, #table .card.card-in-flight .holo-fx > i { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .holo-fx > i { animation: none; }
}

/* V0.487: in-match foil visibility is owner-controlled by the synced
   card flag. A viewer setting never hides another player's holo Leader. */

/* ── Capsule Shop: collection switch ──────────────────────────────── */
.shop-line-tabs {
  display: flex; gap: 10px; flex: none; min-width: 0; overflow-x: auto; overflow-y: hidden;
  padding: 0 2px 5px; scrollbar-width: thin; scrollbar-color: rgba(150,180,255,.45) transparent;
}
.shop-line-tab {
  display: grid; place-items: center; flex: 0 0 auto; min-width: 132px; min-height: 46px; padding: 0 14px; cursor: pointer; user-select: none;
  background: rgba(10, 18, 44, .85); color: var(--text-dim);
  box-shadow: inset 0 0 0 1px var(--line-2);
  clip-path: var(--chamfer-s);
  font: italic 900 19px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; text-align: center;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.shop-line-tab:hover, .shop-line-tab:focus-visible { background: rgba(40, 64, 130, .8); color: #fff; outline: none; }
.shop-line-tab.active { background: var(--btn-primary); color: #2a0e00; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 18px rgba(var(--orange-rgb), .2); }
.shop-line-tab[data-line="leader"].active { background: linear-gradient(100deg, #b8f4ff, #c9b6ff 55%, #ffd9f3); color: #10123a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 18px rgba(150, 190, 255, .3); }
.shop-line-tab[data-line="token"].active { background: linear-gradient(100deg, #ffb7e8, #ff77c8); color: #2a0920; }
.shop-line-tab[data-line="red"].active { background: linear-gradient(100deg, #ffb1a8, #ff665b); color: #2d0906; }
.shop-line-tab[data-line="blue"].active { background: linear-gradient(100deg, #a9dcff, #5baaff); color: #06172d; }
.shop-line-tab[data-line="green"].active { background: linear-gradient(100deg, #b8efbf, #61cc78); color: #08250e; }
.shop-line-tab[data-line="yellow"].active { background: linear-gradient(100deg, #fff0a3, #ffd74f); color: #2a2100; }
.shop-line-tab[data-line="black"].active { background: linear-gradient(100deg, #aeb5c5, #687084); color: #080b11; }
.shop-line-tab[data-line="white"].active { background: linear-gradient(100deg, #ffffff, #dfe6f5); color: #151a25; }
.shop-products { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.shop-product.line-leader .shop-product-info h3 { font-size: 23px; letter-spacing: 0; }
.shop-product.line-leader { background: linear-gradient(170deg, rgba(58, 34, 120, .62), rgba(8, 14, 36, .94)); }
.shop-product.line-leader.is-box { background: linear-gradient(170deg, rgba(20, 80, 104, .6), rgba(12, 12, 40, .94)); }
.shop-product.line-leader .shop-product-art {
  background:
    radial-gradient(ellipse 60% 70% at 50% 55%, rgba(150, 130, 255, .3), transparent 70%),
    repeating-linear-gradient(135deg, rgba(120, 230, 255, .06) 0 10px, transparent 10px 20px);
}
.shop-product.line-leader:hover { box-shadow: inset 0 0 0 1px rgba(170, 220, 255, .7), inset 0 0 40px rgba(150, 190, 255, .1); }
.shop-odds-table p + p { margin-top: 8px; }

/* ── Pack opening: leader reveal ──────────────────────────────────── */
.co-card.rarity-HL { --glow-tier: 3; }
.co-rays.rarity-HL { --ray: rgba(170, 215, 255, .26); }
.co-banner.rarity-HL { --bc: #b8f4ff; }
.co-leader-card .co-rarity-pill { background: linear-gradient(100deg, #b8f4ff, #c9b6ff 55%, #ffd9f3); }
/* The awakened art sits behind the live oil-spill foil layer. Pack reveals
   deliberately do not add the generic one-shot white shine. */
.co-leader-card .co-card-code { white-space: normal; width: calc(var(--cw) * 1.1); text-align: center; line-height: 1.2; }
.co-leader-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 8%; text-align: center; color: #fff; font: italic 900 clamp(14px, 2.4vh, 40px)/1.05 var(--f-ui); text-transform: uppercase; }
.co-leader-caption { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 0 16px; animation: fxSlideIn .35s var(--ease-out) both; }
.co-leader-caption[hidden] { display: none; }
.co-leader-caption b {
  font: italic 900 clamp(16px, 2.5vh, 56px)/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase;
  background: linear-gradient(100deg, #b8f4ff, #ffffff 30%, #c9b6ff 60%, #ffd9f3); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .55));
}
.co-leader-caption span { color: rgba(226, 236, 255, .9); font: 700 clamp(11px, 1.5vh, 32px)/1.2 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; }
.capsule-opening.line-leader .co-backdrop {
  background:
    radial-gradient(ellipse 55% 60% at 50% 52%, rgba(150, 130, 255, .18), transparent 70%),
    radial-gradient(ellipse 90% 80% at 50% 110%, rgba(40, 170, 200, .28), transparent 60%),
    linear-gradient(180deg, rgba(3, 6, 16, .96), rgba(6, 10, 30, .97));
}
.co-summary-card .holo-fx { z-index: 1; }
.co-summary-card .co-summary-rarity, .co-summary-card .co-new { z-index: 2; }

/* ── Dragon Vault: Holo Leaders ───────────────────────────────────── */
.dragon-vault-panel .dragon-vault-tabs { grid-template-columns: 1fr 1fr 1.35fr 1.2fr; }
.dragon-vault-panel .dragon-vault-tabs .hub-btn { padding-left: 8px; padding-right: 8px; white-space: nowrap; }
.vault-leaders-pane .vault-markers-head { grid-template-columns: minmax(180px, 1fr) minmax(0, 1.5fr); }
.vault-leader-note { margin: 0; padding: 10px 14px; background: rgba(8, 14, 34, .7); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: var(--chamfer-s); color: var(--text-dim); font: 600 14px/1.35 var(--f-ui); letter-spacing: .03em; }
.vault-leaders-pane .vault-marker-toolbar { flex-wrap: wrap; }
.vault-leaders-pane .vault-marker-filters { flex: 1 1 100%; }
#customSleevesPanel #vaultLeaderSearch,
#customSleevesPanel #vaultLeaderSort {
  flex: 0 0 auto; width: auto !important; min-height: 38px; padding: 0 12px; border: 0; border-radius: 0;
  background: rgba(10, 18, 44, .9); color: #fff; box-shadow: inset 0 0 0 1px var(--line-2);
  font: 700 15px/1 var(--f-ui); letter-spacing: .04em;
}
#customSleevesPanel #vaultLeaderSearch { flex: 1 1 220px; }
#customSleevesPanel #vaultLeaderSearch::placeholder { color: var(--text-mute); }
#customSleevesPanel #vaultLeaderSort { max-width: 190px; }
.vault-leader-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
/* Hundreds of leaders: let the browser skip rows that are off screen. */
.vl-card { content-visibility: auto; contain-intrinsic-size: auto 118px auto 214px; }
.vl-card .vm-art { background: #0b1433; }
/* Locked leaders stay recognisable (unlike locked markers) so players can
   see who they are missing — just dimmed and desaturated. */
.vm-card.vl-card.locked .vm-art img { filter: grayscale(1) brightness(.34) contrast(1.1); }
.vl-card .vm-foot { padding-bottom: 3px; }
.vl-card .vm-code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vl-badge { position: absolute; right: 0; top: 0; z-index: 4; padding: 3px 6px; background: linear-gradient(100deg, #b8f4ff, #c9b6ff 55%, #ffd9f3); color: #10123a; font: italic 900 11px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; }
.vl-name {
  display: block; padding: 0 8px 7px; min-height: 2.3em;
  background: rgba(6, 10, 26, .98); color: var(--text-dim);
  font: 700 12px/1.15 var(--f-ui); letter-spacing: .02em; text-transform: uppercase;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.vl-card.owned .vl-name { color: #e6ecff; }

/* Detail view: the one place in the Vault where the foil animates. */
.holo-leader-detail .marker-detail-rarity { background: linear-gradient(100deg, #b8f4ff, #c9b6ff 55%, #ffd9f3); }
.holo-leader-detail .marker-detail-art { background: #0b1433; }
.holo-leader-detail .marker-detail-info h3 { font-size: 38px; line-height: .96; }
.holo-detail-note { margin: 0; color: var(--text-dim); font: 600 15px/1.35 var(--f-ui); letter-spacing: .03em; }

/* ══════════════════════════════════════════════════════════════════
   V 0.478 — Capsule Shop redesign.
   Header   title + Zeni chip + Back
   Body     collection tabs  →  two product cards  →  one footer row
   Sheets   Unopened purchases and Drop Rates rise over the products
   Nothing scrolls: the product cards take whatever height is left and
   their artwork sizes itself to the card.
   ══════════════════════════════════════════════════════════════════ */
.capsule-shop-panel .hub-panel-head { grid-template-columns: 1fr auto auto; column-gap: 14px; }
.capsule-shop-panel .hub-back { grid-column: 3; }
.shop-zeni-chip { padding: 12px 18px 12px 12px; font-size: 26px; gap: 10px; }
.shop-zeni-chip .zeni-coin { font-size: 26px; }

.capsule-shop-body { position: relative; gap: 18px; overflow: hidden; }

/* Tabs: collection name with its progress underneath. */
.shop-line-tabs { gap: 10px; }
.shop-line-tab { display: grid; gap: 4px; min-width: 132px; min-height: 54px; padding: 7px 12px; align-content: center; font-size: 17px; }
.shop-line-tab b { font: inherit; }
.shop-line-tab small { font: 700 13px/1 var(--f-num); font-style: normal; letter-spacing: .06em; text-transform: none; opacity: .75; }

/* Products: equal cards filling the space; art is the flexible part. */
.shop-products { flex: 1 1 0; min-height: 0; gap: 18px; }
.shop-product { grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
.shop-product-art { min-height: 0; container-type: size; }
.shop-pack-float { height: min(250px, 78cqh); width: auto; aspect-ratio: 128 / 188; }
.shop-product .capsule-box { --bh: min(165px, 50cqh); --bw: calc(var(--bh) * 1.371); --bd: calc(var(--bh) * .468); }
.shop-product-info { gap: 8px; padding: 18px 22px 18px; }
.shop-product-info .shop-price { margin: 4px 0 2px; }
.shop-product .shop-buy { min-height: 54px; }
.capsule-shop-body > .hub-status { flex: none; text-align: center; }

/* Footer: unopened packs on the left, earn note in the middle, odds on the right. */
.shop-footer { flex: none; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.shop-foot-btn { min-height: 44px; padding: 8px 18px; font-size: 16px; white-space: nowrap; }
#shopUnopenedToggle { justify-self: start; grid-column: 1; }
#shopOddsToggle { justify-self: end; grid-column: 2; }
.shop-foot-btn.active { box-shadow: inset 0 0 0 2px var(--cyan), inset 0 0 14px rgba(var(--cyan-rgb), .35); }
/* V0.479: the earn rate sits above the collection tabs, larger. */
.shop-earn-note { flex: none; height: 26px; margin: 0; color: var(--text-dim); font: 700 21px/26px var(--f-ui); letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.shop-earn-note b { color: #ffe7a8; font: 700 23px/26px var(--f-num); }

/* Sheet: covers the products, sits above the footer. */
.shop-sheet {
  /* Starts below the tabs so the collection can still be switched. */
  position: absolute; left: 44px; right: 40px; top: 150px; bottom: 96px; z-index: 6;
  display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 18px;
  background: linear-gradient(180deg, rgba(16, 28, 64, .99), rgba(6, 10, 26, .99));
  box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 50px rgba(0, 0, 0, .6);
  clip-path: var(--chamfer-m);
  animation: fxSlideIn .25s var(--ease-out) both;
}
.shop-sheet[hidden] { display: none; }
.shop-sheet::before { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--orange) 0 26%, var(--gold) 26% 30%, rgba(var(--cyan-rgb), .6) 30% 60%, transparent 90%); }
.shop-sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shop-sheet-head .hub-kicker { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .22em; }
.shop-sheet-close { flex: none; width: 44px !important; min-width: 44px; min-height: 40px; padding: 0; font-style: normal; }
.shop-sheet .shop-unopened, .shop-sheet .shop-odds-table { flex: 1 1 0; min-height: 0; overflow-y: auto; }
.shop-sheet .shop-unopened[hidden], .shop-sheet .shop-odds-table[hidden] { display: none; }
.shop-sheet .shop-unopened { display: block; }
.shop-sheet .shop-unopened-list { max-height: none; overflow: visible; gap: 10px; padding-right: 4px; }
.shop-sheet .shop-odds-table table { font-size: 17px; }
.shop-sheet .shop-odds-table th, .shop-sheet .shop-odds-table td { padding: 9px 10px; }
.shop-sheet .shop-odds-table p { font-size: 15px; margin-top: 14px; }

/* V0.486 — Holographic Leader pack reveals use only the moving oil-spill
   foil. Remove the separate white sweep and cracked-ice facet film that made
   large reveal cards look washed out. Board/Vault foil is unchanged. */
.co-leader-card .co-shine { display: none !important; }
.co-leader-card .holo-fx::after { display: none !important; }

/* ══════════════════════════════════════════════════════════════════
   V0.527 — Capsule Shop collection rail.
   Nine collections no longer fight for space in one horizontal row.
   ══════════════════════════════════════════════════════════════════ */
.capsule-shop-body { padding: 20px 22px 20px; gap: 0; }
.shop-main { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 18px; flex: 1 1 0; min-height: 0; }
.shop-collection-rail {
  min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, rgba(13,24,55,.96), rgba(6,11,27,.96));
  box-shadow: inset 0 0 0 1px var(--line-2), inset 3px 0 0 rgba(var(--cyan-rgb), .58);
  clip-path: var(--chamfer-m);
}
.shop-rail-head { flex: none; padding: 16px 15px 13px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, rgba(var(--cyan-rgb),.08), transparent 70%); }
.shop-rail-head .hub-kicker { display: block; margin-bottom: 7px; letter-spacing: .18em; }
.shop-rail-head .shop-earn-note { height: auto; margin: 0; text-align: left; font: 700 11px/1.25 var(--f-ui); letter-spacing: .045em; color: var(--text-mute); }
.shop-rail-head .shop-earn-note b { font: 800 12px/1 var(--f-num); color: #ffe4a0; }

.capsule-shop-panel .shop-line-tabs {
  display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden; padding: 8px 7px 10px; scrollbar-width: thin;
}
.capsule-shop-panel .shop-line-group {
  flex: none; padding: 8px 8px 4px; color: rgba(176,196,235,.58);
  font: 800 10px/1 var(--f-ui); letter-spacing: .19em; text-transform: uppercase;
}
.capsule-shop-panel .shop-line-tab {
  --rail-accent: 104, 205, 255;
  position: relative; display: grid; grid-template-columns: 7px minmax(0,1fr) auto; align-items: center; gap: 10px;
  flex: none; min-width: 0; min-height: 50px; padding: 8px 9px; place-items: initial; text-align: left;
  background: transparent; color: var(--text-dim); box-shadow: none; clip-path: none;
  font: 700 13px/1.05 var(--f-ui); letter-spacing: .025em; text-transform: none;
  border-radius: 3px;
}
.capsule-shop-panel .shop-line-tab:hover,
.capsule-shop-panel .shop-line-tab:focus-visible { background: rgba(72,102,166,.18); color: #fff; }
.capsule-shop-panel .shop-line-tab.active {
  background: linear-gradient(90deg, rgba(var(--rail-accent),.23), rgba(var(--rail-accent),.06));
  color: #fff; box-shadow: inset 0 0 0 1px rgba(var(--rail-accent),.32); clip-path: none;
}
.shop-line-swatch { width: 5px; height: 28px; border-radius: 5px; background: rgb(var(--rail-accent)); box-shadow: 0 0 10px rgba(var(--rail-accent),.45); }
.shop-line-copy { min-width: 0; display: grid; gap: 5px; }
.shop-line-copy b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 13px/1 var(--f-ui); text-transform: uppercase; letter-spacing: .04em; }
.shop-line-copy small { color: rgba(198,212,240,.6); font: 700 11px/1 var(--f-num); letter-spacing: .04em; }
.shop-line-tab em { color: rgba(220,232,255,.35); font: 400 22px/1 sans-serif; font-style: normal; }
.shop-line-tab.active em { color: rgb(var(--rail-accent)); }
.shop-line-tab[data-line="marker"] { --rail-accent: 255, 184, 66; }
.shop-line-tab[data-line="leader"] { --rail-accent: 184, 214, 255; }
.shop-line-tab[data-line="token"] { --rail-accent: 255, 119, 200; }
.shop-line-tab[data-line="red"] { --rail-accent: 255, 94, 86; }
.shop-line-tab[data-line="blue"] { --rail-accent: 74, 162, 255; }
.shop-line-tab[data-line="green"] { --rail-accent: 76, 202, 109; }
.shop-line-tab[data-line="yellow"] { --rail-accent: 255, 215, 70; }
.shop-line-tab[data-line="black"] { --rail-accent: 149, 160, 185; }
.shop-line-tab[data-line="white"] { --rail-accent: 235, 241, 255; }

.shop-stage { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 13px; }
.shop-stage-head {
  flex: none; min-height: 72px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px;
  padding: 12px 17px 12px 18px; background: rgba(7,13,32,.72); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: var(--chamfer-s);
}
.shop-stage-copy { min-width: 0; display: grid; gap: 3px; }
.shop-stage-copy .hub-kicker { font-size: 10px; letter-spacing: .18em; }
.shop-stage-copy h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font: italic 900 27px/.95 var(--f-ui); letter-spacing: .025em; text-transform: uppercase; }
.shop-stage-copy p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-mute); font: 600 12px/1.25 var(--f-ui); }
.shop-stage-progress { min-width: 88px; display: grid; justify-items: end; gap: 3px; padding-left: 16px; border-left: 1px solid var(--line); }
.shop-stage-progress b { color: #fff; font: 800 20px/1 var(--f-num); }
.shop-stage-progress span { color: var(--text-mute); font: 800 9px/1 var(--f-ui); letter-spacing: .16em; text-transform: uppercase; }

.capsule-shop-panel .shop-products { flex: 1 1 0; min-height: 0; gap: 13px; }
.capsule-shop-panel .shop-product { grid-template-rows: minmax(0,1fr) auto; min-height: 0; }
.capsule-shop-panel .shop-product-art { min-height: 150px; }
.capsule-shop-panel .shop-pack-float { height: min(230px, 82cqh); }
.capsule-shop-panel .shop-product .capsule-box { --bh: min(148px, 52cqh); }
.capsule-shop-panel .shop-product-info { position: relative; gap: 5px; padding: 14px 17px 13px; }
.shop-product-type { color: var(--text-mute); font: 800 10px/1 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; }
.capsule-shop-panel .shop-product-info h3 { margin: 0; font-size: 23px; letter-spacing: .025em; }
.capsule-shop-panel .shop-product-info p { font-size: 12px; letter-spacing: .07em; }
.capsule-shop-panel .shop-price { margin: 5px 0 1px; font-size: 25px; }
.capsule-shop-panel .shop-price .zeni-coin { font-size: 22px; }
.capsule-shop-panel .shop-product .shop-buy { min-height: 46px; font-size: 17px; }
.capsule-shop-panel .shop-need { min-height: 14px; font-size: 10px; }
.capsule-shop-panel .shop-footer { padding-top: 10px; gap: 10px; }
.capsule-shop-panel .shop-foot-btn { min-height: 39px; padding: 6px 14px; font-size: 14px; }
.capsule-shop-panel .capsule-shop-body > .hub-status { display: none; }
.shop-stage > .hub-status { flex: none; text-align: center; min-height: 0; }

/* The sheet belongs to the selected collection stage, not the whole panel. */
.capsule-shop-panel .shop-sheet { left: 0; right: 0; top: 85px; bottom: 51px; }

@media (max-height: 760px) {
  .shop-main { grid-template-columns: 176px minmax(0,1fr); gap: 13px; }
  .shop-rail-head { padding: 11px 12px 9px; }
  .capsule-shop-panel .shop-line-tabs { padding-top: 5px; }
  .capsule-shop-panel .shop-line-tab { min-height: 43px; padding-top: 6px; padding-bottom: 6px; }
  .shop-line-swatch { height: 24px; }
  .shop-stage-head { min-height: 61px; padding-top: 8px; padding-bottom: 8px; }
  .shop-stage-copy h3 { font-size: 23px; }
  .capsule-shop-panel .shop-product-info { padding-top: 10px; padding-bottom: 9px; }
  .capsule-shop-panel .shop-product-info h3 { font-size: 20px; }
  .capsule-shop-panel .shop-sheet { top: 74px; }
}

/* V0.528 — local shop preview state. Product artwork always stays visible
   even when the local PHP/account backend is missing or older than the UI. */
.shop-preview-ribbon {
  position: absolute; right: 10px; top: 10px; z-index: 4; padding: 6px 9px;
  background: rgba(5, 15, 34, .9); color: #8eeaff;
  box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb), .55);
  clip-path: var(--chamfer-s); font: italic 800 9px/1 var(--f-ui);
  letter-spacing: .13em; text-transform: uppercase;
}
.shop-product.is-preview .shop-product-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb), .18);
}
.shop-product.is-preview .shop-need { color: #82dff8; }

/* ── V0.531 Dragon Vault: unified Holo Collection ───────────────────── */
.vault-holo-pane { min-height: 0; }
.vault-holo-head { align-items: start; }
.vault-holo-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.vault-holo-categories .hub-btn { min-height: 38px; }
.vault-holo-categories .hub-btn.active {
  background: linear-gradient(180deg, rgba(45, 85, 165, .96), rgba(14, 28, 72, .96));
  box-shadow: inset 0 0 0 1px var(--cyan), 0 0 18px rgba(73, 198, 255, .12);
}
.vault-holo-filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(6, minmax(118px, .72fr));
  gap: 7px;
  align-items: center;
}
#customSleevesPanel .vault-holo-filter-panel input,
#customSleevesPanel .vault-holo-filter-panel select {
  width: 100%; min-width: 0; height: 36px; padding: 0 9px;
  color: var(--text); background: rgba(6, 12, 30, .94);
  border: 0; box-shadow: inset 0 0 0 1px var(--line-2);
  font: 650 12px/1 var(--f-ui);
  clip-path: var(--chamfer-xs);
}
#customSleevesPanel .vault-holo-filter-panel input:focus,
#customSleevesPanel .vault-holo-filter-panel select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--cyan), 0 0 0 1px rgba(81, 205, 255, .16); }
.vault-holo-quick-filters { min-height: 28px; }
.vault-holo-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.vh-card .vl-name { min-height: 2.5em; }
.vh-meta {
  display: block; padding: 0 7px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-mute); font: 650 10px/1.2 var(--f-ui); letter-spacing: .02em;
}
.vault-holo-load-more { align-self: center; min-width: 230px; margin: 2px auto 6px; }
@media (max-width: 1500px) {
  .vault-holo-filter-panel { grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(130px, 1fr)); }
  .vault-holo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .vault-holo-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vault-holo-filter-panel { grid-template-columns: 1fr 1fr; }
  .vault-holo-filter-panel #vaultLeaderSearch { grid-column: 1 / -1; }
  .vault-holo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .vault-holo-filter-panel { grid-template-columns: 1fr; }
  .vault-holo-filter-panel #vaultLeaderSearch { grid-column: auto; }
  .vault-holo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ══════════════════════════════════════════════════════════════════
   V0.539 — SHADER FOIL
   Every foil is now drawn by scripts/systems/73-foil-engine.js on a
   <canvas class="foil-canvas"> placed exactly over the card image
   ("Cosmos": rainbow clouds + stars, intensity 0.40, speed 1.00 — set in
   76-holo-leaders.js). The .holo-fx span is still the marker for a foil
   card and still carries the older CSS oil-slick as a fallback.

     .holo-fx            just inserted: hidden until its mode is known
     .holo-fx.holo-gl    shader foil is running: the span shows nothing
     .holo-fx.holo-css   shader foil unavailable for this card (no WebGL,
                         or a cross-origin fallback image): CSS foil shows

   holoMount is a one-shot animation with no visual effect; its
   animationstart event is how 76-holo-leaders.js notices a new layer.
   ══════════════════════════════════════════════════════════════════ */
@keyframes holoMount { from { outline-color: transparent; } to { outline-color: transparent; } }
.holo-fx { animation: holoMount .01s linear 1; }
.holo-fx:not(.holo-gl):not(.holo-css) { visibility: hidden; }
.holo-fx.holo-gl,
.holo-fx.holo-gl.holo-static,
body.fx-ultra #table .card .holo-fx.holo-gl,
body.fx-ultra .hand-card .holo-fx.holo-gl {
  background: none !important;
  box-shadow: none !important;
  opacity: 1;
  mix-blend-mode: normal;
  contain: none;
  will-change: auto;
}
.holo-fx.holo-gl > i,
.holo-fx.holo-gl::after { display: none !important; }

.foil-canvas {
  display: block;
  pointer-events: none;
  user-select: none;
  image-rendering: auto;
}
/* On the board the canvas replaces the picture, so it gets the same
   compositor treatment the card image has. */
#table .card .foil-canvas,
.hand-card .foil-canvas {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ── V0.539 card tilt in the card info views (78-card-tilt.js) ───────
   The card art leans toward the pointer in 3D. Non-foil cards get a soft
   moving highlight; foil cards get theirs from the shader instead. */
.card-tilt-on { will-change: transform; }
.card-tilt-glare {
  position: absolute; inset: 0; z-index: 6;
  border-radius: inherit; pointer-events: none;
  opacity: var(--tilt-glare, 0);
  background: radial-gradient(circle at var(--tilt-x, 50%) var(--tilt-y, 50%),
    rgba(255, 255, 255, .26), rgba(255, 255, 255, .07) 36%, rgba(255, 255, 255, 0) 62%);
  mix-blend-mode: screen;
}

/* ══════════════════════════════════════════════════════════════════
   V0.541 — sideways artwork outside matches
   Landscape card art (Z-Extra style) is turned a quarter turn so it fills
   a portrait card, the same way .h-card-wrap does on the board.
   76-holo-leaders.js adds .art-sideways and the two size variables when
   the picture loads. The foil canvas copies this transform.
   ══════════════════════════════════════════════════════════════════ */
img.art-sideways {
  position: absolute !important;
  left: 50% !important; top: 50% !important;
  width: var(--art-w, 140.116%) !important;
  height: var(--art-h, 71.369%) !important;
  max-width: none !important; max-height: none !important;
  object-fit: cover !important;
  transform: translate(-50%, -50%) rotate(90deg);
  transform-origin: center center;
}

/* ══════════════════════════════════════════════════════════════════
   V0.541 — pack opening performance
   While the opening screen is up (body.capsule-opening-active) every CSS
   animation BEHIND it is paused: hub card float, glows, sheens, shop pack
   bob, spinners. They resume from the same point when it closes. Nothing
   inside #capsuleOpening is touched, so the pack, the cards, the foil and
   every reveal effect run exactly as before.
   ══════════════════════════════════════════════════════════════════ */
body.capsule-opening-active > :not(#capsuleOpening):not(#cardInspector),
body.capsule-opening-active > :not(#capsuleOpening):not(#cardInspector)::before,
body.capsule-opening-active > :not(#capsuleOpening):not(#cardInspector)::after,
body.capsule-opening-active > :not(#capsuleOpening):not(#cardInspector) *,
body.capsule-opening-active > :not(#capsuleOpening):not(#cardInspector) *::before,
body.capsule-opening-active > :not(#capsuleOpening):not(#cardInspector) *::after {
  animation-play-state: paused !important;
}
/* Each pack card flips and scales on its own compositor layer, so a flip
   never repaints its neighbours. Visual result is identical. */
#capsuleOpening .co-card,
#capsuleOpening .co-card-inner { will-change: transform; }

/* V0.542 — pack opening: the card row is raised by --co-lift (set by
   75-capsule-shop.js) only when the footer would otherwise touch the card
   names. 0px in every other case. */
#capsuleOpening .co-cards {
  translate: 0 calc(var(--co-lift, 0px) * -1);
  transition: translate .3s ease;
}

/* V0.542 — the last card of a pack is drawn larger (.hit). That makes sense
   for Energy Marker packs, where the last card is the best pull, but Holo
   Card / Leader / Token packs have no rarity order, so there it just made
   one random card bigger than the rest. Same size for all of those. */
.co-cards.row .co-card.placed.hit.co-holo-unlock-card,
.co-cards.row .co-card.placed.hit.co-leader-card { --s: .98; }
.co-cards.many.row .co-card.placed.hit.co-holo-unlock-card,
.co-cards.many.row .co-card.placed.hit.co-leader-card { --s: .70; }

/* V0.543 — rarity tags use the rarity's own colour (--rar, set per card by
   75-capsule-shop.js) instead of the card colour. Cards without --rar
   (Energy Markers, Leaders, Tokens) keep what they had. */
.co-rarity-pill { background: var(--rar, var(--rc)); }
.co-summary-rarity { background: var(--rar, var(--rc)); }

/* V0.543 — long card names under pack cards wrap inside their own card's
   width instead of running into the neighbouring card. */
.co-holo-unlock-card .co-card-code {
  white-space: normal; width: calc(var(--cw) * 1.1);
  text-align: center; line-height: 1.2; text-wrap: balance;
}

/* V0.544 — Card Info popup opened from a pulled card sits above the
   pack-opening screen (which is z-index 100100). It is also exempt from the
   "pause everything behind" rule above, so it opens and animates normally. */
body.capsule-opening-active #cardInspector { z-index: 100200; }
/* Pulled cards that can be clicked for their Card Info. */
#capsuleOpening .co-summary-card { cursor: pointer; }

/* V0.545 — Holo Collection tiles keep one size whatever the picture is.
   .vm-card is a grid and .vm-art was a content-sized grid item, so a
   picture with an unusual pixel size or shape (the Token art) stretched its
   own art box wider or taller than the tile, and every tile ended up a
   different size. The art box now always takes the tile's width and the
   card shape, and the picture is laid over it instead of sizing it. */
.vh-card { grid-template-columns: minmax(0, 1fr); align-content: start; }
.vh-card > .vm-art { width: 100%; min-width: 0; min-height: 0; justify-self: stretch; }
.vh-card > .vm-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vh-card > .vm-foot, .vh-card > .vl-name, .vh-card > .vh-meta { min-width: 0; }

/* ══════════════════════════════════════════════════════════════════
   V0.546 — DRAGON VAULT: one layout for all four pages
   Sleeves, Decks, Energy Markers and Holo Collection now share:
     1. the same header   — gold label + big count on the left,
                            a boxed note (or the equipped marker) on the right
     2. the same rhythm   — one 14px gap between every block on the page
     3. the same controls — every input, select and action button in a
                            toolbar row is 44px tall
     4. the same tiles    — list cards share one surface and padding
   Only spacing, sizes and the two rebuilt headers change; nothing was
   removed and every control keeps its id.
   ══════════════════════════════════════════════════════════════════ */
.dragon-vault-panel { --vault-gap: 14px; --vault-ctl: 44px; }

/* 2. rhythm: every page is a column with one gap */
.dragon-vault-panel .vault-flow,
.dragon-vault-panel .vault-markers-pane { display: flex; flex-direction: column; gap: var(--vault-gap); }
.dragon-vault-panel .vault-flow[hidden],
.dragon-vault-panel .vault-markers-pane[hidden] { display: none; }
.dragon-vault-panel .dragon-vault-tabs { margin-bottom: var(--vault-gap); }
.dragon-vault-panel .vault-deck-list { margin-top: 0; }
.dragon-vault-panel .custom-sleeve-list,
.dragon-vault-panel .vault-deck-list,
.dragon-vault-panel .vault-marker-grid { gap: 12px; }

/* 1. header: same two columns, same alignment, same note box */
.dragon-vault-panel .vault-pane-head {
  display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.5fr);
  gap: 18px; align-items: stretch; flex: none;
}
.dragon-vault-panel .vault-pane-head .vault-markers-progress { align-content: center; }
.dragon-vault-panel .vault-pane-head .vault-markers-progress strong { font: 700 34px/1 var(--f-num); color: #fff; white-space: nowrap; }
.dragon-vault-panel .vault-pane-head .vault-leader-note,
.dragon-vault-panel .vault-pane-head .vault-equipped-marker {
  margin: 0; min-height: 76px; padding: 12px 16px;
  display: flex; align-items: center;
  background: rgba(8, 14, 34, .7); box-shadow: inset 0 0 0 1px var(--line-2); clip-path: var(--chamfer-s);
}
.dragon-vault-panel .vault-pane-head .vault-leader-note { color: var(--text-dim); font: 600 14px/1.4 var(--f-ui); letter-spacing: .03em; }

/* 3. controls: one height for every toolbar input, select and button */
.dragon-vault-panel .custom-sleeve-import,
.dragon-vault-panel .vault-deck-import { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; align-items: stretch; flex: none; }
.dragon-vault-panel .custom-sleeve-import > input,
.dragon-vault-panel .vault-deck-import > input,
.dragon-vault-panel .custom-sleeve-import > .hub-btn,
.dragon-vault-panel .vault-deck-import > .hub-btn {
  height: var(--vault-ctl) !important; min-height: var(--vault-ctl) !important; margin: 0 !important; box-sizing: border-box;
}
.dragon-vault-panel .custom-sleeve-import > input,
.dragon-vault-panel .vault-deck-import > input { padding: 0 14px !important; font: 600 15px/1 var(--f-num) !important; }
.dragon-vault-panel .custom-sleeve-import > .hub-btn,
.dragon-vault-panel .vault-deck-import > .hub-btn { padding: 0 14px !important; font-size: 17px !important; }
#customSleevesPanel .vault-holo-filter-panel input,
#customSleevesPanel .vault-holo-filter-panel select,
#customSleevesPanel #vaultMarkerSort { height: var(--vault-ctl); min-height: var(--vault-ctl); font-size: 14px; }
.dragon-vault-panel .vault-holo-categories .hub-btn { min-height: var(--vault-ctl); }
.dragon-vault-panel .vault-marker-toolbar { min-height: var(--vault-ctl); }
.dragon-vault-panel .custom-sleeve-status,
.dragon-vault-panel .hub-status { flex: none; }

/* 4. tiles: sleeve and deck cards share one surface */
.dragon-vault-panel .custom-sleeve-item,
.dragon-vault-panel .vault-deck-item {
  padding: 14px; gap: 14px;
  background: linear-gradient(135deg, rgba(16, 31, 69, .9), rgba(5, 10, 27, .96));
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: var(--chamfer-s);
}
.dragon-vault-panel .vault-pane-head { grid-template-columns: minmax(min-content, 1fr) minmax(0, 1.5fr); }
.dragon-vault-panel .vault-pane-head .hub-kicker { white-space: nowrap; }
.dragon-vault-panel .vault-pane-head .vault-markers-progress strong { text-transform: uppercase; letter-spacing: .02em; }

/* V0.547 — Dragon Vault header: identical size on all four pages.
   Energy Markers and Holo Collection have a progress bar under the count,
   which made their header taller than Sleeves / Decks, and each page split
   its two columns differently. The header is now one fixed height with one
   fixed column split; the label and count sit at the same spot on every
   page, and the bar (where there is one) uses the space underneath. */
.dragon-vault-panel .vault-pane-head {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  height: 88px; min-height: 88px; align-items: stretch;
}
.dragon-vault-panel .vault-pane-head .vault-markers-progress { align-content: start; padding-top: 4px; gap: 8px; min-width: 0; }
.dragon-vault-panel .vault-pane-head .vault-leader-note,
.dragon-vault-panel .vault-pane-head .vault-equipped-marker { min-height: 0; height: 100%; box-sizing: border-box; overflow: hidden; }
.dragon-vault-panel .vault-pane-head .vault-leader-note { font-size: 13.5px; line-height: 1.35; }

/* V0.548 — Holo Collection filter row fits inside the page.
   The old layout was seven fixed-minimum columns, wider than the Vault
   panel, so the last dropdown ran under the scroll bar. Now: four equal
   columns that always fit — search (double width) + two dropdowns on the
   first row, the other four dropdowns on the second. Small screens keep
   their existing two-column / one-column layouts. */
@media (min-width: 981px) {
  .dragon-vault-panel .vault-holo-filter-panel { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
  .dragon-vault-panel .vault-holo-filter-panel #vaultLeaderSearch { grid-column: span 2; }
}
.dragon-vault-panel .vault-holo-filter-panel > * { min-width: 0; max-width: 100%; }

/* V0.549 — eight-card packs (Red / Blue / Green / Yellow).
   Same single row as six-card packs, just tighter so all eight fit on
   screen. Names and tags are sized back up so they stay readable on the
   smaller cards, and tags stack instead of running into the next card. */
.co-cards.many8 .co-card.placed { --tx: calc(var(--pos) * var(--cw) * .615); --s: .50; }
.co-cards.many8.row .co-card.placed,
.co-cards.many8.row .co-card.placed.hit,
.co-cards.many8.row .co-card.placed.hit.co-holo-unlock-card { --s: .555; }
.co-cards.many8 .co-card-code { width: calc(var(--cw) * 1.06); font-size: clamp(13px, 2.3vh, 46px); }
.co-cards.many8 .co-card-tags { flex-wrap: wrap; justify-content: center; width: calc(var(--cw) * 1.06); white-space: normal; gap: 5px; }
.co-cards.many8 .co-rarity-pill,
.co-cards.many8 .co-new,
.co-cards.many8 .co-dupe { font-size: clamp(12px, 2.1vh, 42px); white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════════
   V0.550 — CAPSULE SHOP PRESENTATION
   Same layout and controls; the showcase is rebuilt so it reads as an
   in-game store:
     - every collection has an accent colour (--sa) that lights the
       selected rail row, the stage header and both product showcases
     - products stand on a lit floor under a spotlight, with slow light
       rays behind them, instead of on a striped background
     - price sits on its own plate; the box shows its per-pack price
     - progress bars on the rail rows and the stage header
   Decorative motion is off in Performance Mode and reduced-motion.
   ══════════════════════════════════════════════════════════════════ */
.capsule-shop-panel { --sa: 255, 184, 66; }
.capsule-shop-panel [data-line="marker"], .capsule-shop-panel .line-marker { --sa: 255, 150, 60; }
.capsule-shop-panel [data-line="leader"], .capsule-shop-panel .line-leader { --sa: 168, 110, 255; }
.capsule-shop-panel [data-line="token"],  .capsule-shop-panel .line-token  { --sa: 255, 96, 150; }
.capsule-shop-panel [data-line="red"],    .capsule-shop-panel .line-red    { --sa: 255, 86, 86; }
.capsule-shop-panel [data-line="blue"],   .capsule-shop-panel .line-blue   { --sa: 74, 170, 255; }
.capsule-shop-panel [data-line="green"],  .capsule-shop-panel .line-green  { --sa: 84, 214, 96; }
.capsule-shop-panel [data-line="yellow"], .capsule-shop-panel .line-yellow { --sa: 255, 214, 70; }
.capsule-shop-panel [data-line="black"],  .capsule-shop-panel .line-black  { --sa: 160, 150, 215; }
.capsule-shop-panel [data-line="white"],  .capsule-shop-panel .line-white  { --sa: 232, 240, 255; }

/* ── collection rail ── */
.capsule-shop-panel .shop-collection-rail {
  background: linear-gradient(180deg, rgba(14, 26, 60, .97), rgba(5, 9, 24, .98));
  box-shadow: inset 0 0 0 1px var(--line-2), inset 3px 0 0 rgba(var(--cyan-rgb), .5), 0 14px 30px rgba(0, 0, 0, .35);
}
.capsule-shop-panel .shop-line-tab { --rail-accent: var(--sa); min-height: 54px; padding: 7px 9px; transition: background .16s ease, box-shadow .16s ease, transform .16s ease; }
.capsule-shop-panel .shop-line-tab:hover { transform: translateX(2px); }
.capsule-shop-panel .shop-line-tab.active {
  background: linear-gradient(90deg, rgba(var(--sa), .3), rgba(var(--sa), .05) 85%);
  box-shadow: inset 0 0 0 1px rgba(var(--sa), .45), inset 3px 0 0 rgb(var(--sa)), 0 0 18px rgba(var(--sa), .14);
}
.capsule-shop-panel .shop-line-copy { gap: 4px; }
.capsule-shop-panel .shop-line-copy small { font-size: 10.5px; }
.shop-line-bar { display: block; height: 3px; background: rgba(140, 170, 235, .14); overflow: hidden; }
.shop-line-bar i { display: block; height: 100%; min-width: 0; background: rgb(var(--sa)); box-shadow: 0 0 8px rgba(var(--sa), .7); }
.shop-line-tab:not(.active) .shop-line-bar i { opacity: .6; }

/* ── stage header ── */
.capsule-shop-panel .shop-stage-head {
  position: relative; overflow: hidden; min-height: 76px;
  background:
    linear-gradient(100deg, rgba(var(--sa), .2), rgba(var(--sa), .04) 46%, rgba(7, 13, 32, 0) 72%),
    rgba(7, 13, 32, .82);
  box-shadow: inset 0 0 0 1px rgba(var(--sa), .3), inset 4px 0 0 rgb(var(--sa));
}
.capsule-shop-panel .shop-stage-head::after {
  content: ''; position: absolute; right: -30px; top: -60px; width: 220px; height: 220px; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--sa), .2), transparent 65%);
}
.capsule-shop-panel .shop-stage-copy .hub-kicker { color: rgb(var(--sa)); }
.capsule-shop-panel .shop-stage-copy h3 { font-size: 30px; text-shadow: 0 2px 0 rgba(0, 0, 0, .5), 0 0 22px rgba(var(--sa), .35); }
.capsule-shop-panel .shop-stage-progress { position: relative; z-index: 1; min-width: 118px; gap: 5px; border-left-color: rgba(var(--sa), .3); }
.capsule-shop-panel .shop-stage-progress b { font-size: 22px; white-space: nowrap; }
.shop-stage-bar { display: block; width: 100%; height: 4px; background: rgba(140, 170, 235, .16); overflow: hidden; }
.shop-stage-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, rgba(var(--sa), .7), rgb(var(--sa))); box-shadow: 0 0 10px rgba(var(--sa), .8); transition: width .5s var(--ease-out); }

/* ── product showcase ── */
.capsule-shop-panel .shop-product,
.capsule-shop-panel .shop-product.line-leader,
.capsule-shop-panel .shop-product.line-leader.is-box {
  background: linear-gradient(180deg, rgba(10, 18, 44, .96), rgba(5, 9, 24, .98));
  box-shadow: inset 0 0 0 1px rgba(var(--sa), .28), 0 16px 34px rgba(0, 0, 0, .4);
  transition: box-shadow .2s ease, transform .2s var(--ease-out);
}
.capsule-shop-panel .shop-product:hover,
.capsule-shop-panel .shop-product.line-leader:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px rgba(var(--sa), .75), inset 0 0 50px rgba(var(--sa), .1), 0 22px 44px rgba(0, 0, 0, .5), 0 0 30px rgba(var(--sa), .18);
}
.capsule-shop-panel .shop-product.is-box { box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), .45), 0 16px 34px rgba(0, 0, 0, .4); }

.capsule-shop-panel .shop-product-art,
.capsule-shop-panel .shop-product.line-leader .shop-product-art {
  isolation: isolate;
  background:
    radial-gradient(ellipse 58% 62% at 50% 44%, rgba(var(--sa), .42), rgba(var(--sa), .1) 48%, transparent 72%),
    radial-gradient(ellipse 120% 60% at 50% 118%, rgba(var(--sa), .26), transparent 62%),
    linear-gradient(180deg, #0a1230 0%, #060a1c 62%, #03050f 100%);
  border-bottom: 1px solid rgba(var(--sa), .4);
}
/* hex texture, faded toward the edges */
.capsule-shop-panel .shop-product-art::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--hex) 0 0 / 44px 76px; opacity: .1;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 45%, #000, transparent 90%);
          mask-image: radial-gradient(ellipse 75% 75% at 50% 45%, #000, transparent 90%);
}
/* slow light rays behind the product */
.shop-art-rays {
  position: absolute; left: 50%; top: 44%; width: 150%; aspect-ratio: 1; translate: -50% -50%; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(var(--sa), .16) 0deg 5deg, transparent 5deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 8%, transparent 58%);
          mask-image: radial-gradient(circle, #000 8%, transparent 58%);
  animation: shopRays 46s linear infinite;
}
@keyframes shopRays { to { rotate: 360deg; } }
/* lit floor the product stands on */
.shop-art-floor {
  position: absolute; left: 12%; right: 12%; bottom: 7%; height: 15%; z-index: -1; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(var(--sa), .6), rgba(var(--sa), .16) 46%, transparent 70%);
  box-shadow: 0 0 34px 6px rgba(var(--sa), .2);
}
.shop-art-floor::after {
  content: ''; position: absolute; left: 14%; right: 14%; top: 34%; height: 32%; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(var(--sa), .75), 0 0 14px rgba(var(--sa), .7);
}
.capsule-shop-panel .shop-pack-float,
.capsule-shop-panel .capsule-box-wrap { position: relative; z-index: 1; filter: drop-shadow(0 20px 20px rgba(0, 0, 0, .6)) drop-shadow(0 0 16px rgba(var(--sa), .28)); }
.capsule-shop-panel .shop-product:hover .shop-pack-float,
.capsule-shop-panel .shop-product:hover .capsule-box-wrap { filter: drop-shadow(0 22px 22px rgba(0, 0, 0, .6)) drop-shadow(0 0 26px rgba(var(--sa), .55)) brightness(1.06); }

/* ribbon */
.capsule-shop-panel .shop-product-ribbon { z-index: 5; letter-spacing: .08em; box-shadow: 0 6px 16px rgba(0, 0, 0, .45); }

/* ── product info ── */
.capsule-shop-panel .shop-product-info {
  gap: 7px; padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(var(--sa), .07), transparent 46%);
}
.capsule-shop-panel .shop-product-type { color: rgb(var(--sa)); }
.capsule-shop-panel .shop-product-info h3 { font-size: 25px; }
.capsule-shop-panel .shop-product-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.capsule-shop-panel .shop-product-chips span {
  padding: 4px 8px; background: rgba(var(--sa), .1); box-shadow: inset 0 0 0 1px rgba(var(--sa), .3);
  color: #dfe8ff; font: 800 11px/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.capsule-shop-panel .shop-price {
  margin: 4px 0 2px; padding: 8px 12px; gap: 10px; align-items: center;
  background: linear-gradient(90deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, .18));
  box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb), .28), inset 3px 0 0 var(--gold);
  color: #ffe7a8; font-size: 27px; text-shadow: 0 0 16px rgba(var(--gold-rgb), .35);
  clip-path: var(--chamfer-s);
}
.capsule-shop-panel .shop-price small {
  margin-left: auto; color: var(--text-dim); font: 700 12px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; text-shadow: none; white-space: nowrap;
}
.capsule-shop-panel .shop-product .shop-buy { min-height: 48px; font-size: 18px; letter-spacing: .08em; }
.capsule-shop-panel .shop-product .shop-buy.hub-btn-primary:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 20px rgba(var(--orange-rgb), .28); }
.capsule-shop-panel .shop-need { min-height: 13px; font-size: 10px; letter-spacing: .08em; }

/* ── footer ── */
.capsule-shop-panel .shop-footer { border-top-color: rgba(var(--cyan-rgb), .18); }

body.fx-lite .shop-art-rays, body.fx-ultra .shop-art-rays { animation: none; }
@media (prefers-reduced-motion: reduce) { .shop-art-rays { animation: none; } .capsule-shop-panel .shop-product:hover { transform: none; } }
/* keep the preview tag clear of the "Best Value" ribbon */
.capsule-shop-panel .shop-product.is-box .shop-preview-ribbon { top: 44px; }

/* V0.551 — "nothing here costs real money" messaging in the Capsule Shop */
.shop-free-banner {
  flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px;
  background: linear-gradient(90deg, rgba(60, 220, 130, .16), rgba(60, 220, 130, .04) 60%, rgba(7, 13, 32, .6));
  box-shadow: inset 0 0 0 1px rgba(90, 230, 150, .4), inset 4px 0 0 #4be39b;
  clip-path: var(--chamfer-s);
}
.shop-free-badge {
  flex: none; padding: 7px 10px; background: linear-gradient(180deg, #7dffb6, #2fc878); color: #04220f;
  font: italic 900 14px/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  clip-path: var(--chamfer-s); box-shadow: 0 0 16px rgba(75, 227, 155, .35);
}
.shop-free-banner p { margin: 0; min-width: 0; color: #d6e6dd; font: 600 12.5px/1.3 var(--f-ui); letter-spacing: .03em; }
.shop-free-banner p b { color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.shop-rail-head .shop-free-tag {
  margin: 7px 0 0; padding: 5px 7px; display: inline-block;
  background: rgba(60, 220, 130, .12); box-shadow: inset 0 0 0 1px rgba(90, 230, 150, .4);
  color: #8dffc0; font: 800 10px/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase;
}
.capsule-shop-panel .shop-need { color: #8fa3c8; }
.capsule-shop-panel .shop-product.is-short .shop-need { color: #ff9aa8; }
.capsule-shop-panel .shop-product.is-preview .shop-need { color: #82dff8; }
.shop-odds-table .shop-free-note {
  margin: 0 0 14px !important; padding: 10px 12px;
  background: rgba(60, 220, 130, .1); box-shadow: inset 0 0 0 1px rgba(90, 230, 150, .4), inset 4px 0 0 #4be39b;
  color: #d6e6dd;
}
.shop-odds-table .shop-free-note b { color: #8dffc0; }

/* V0.556 — "one unlock covers every version" notices */
.shop-versions-note {
  flex: none; display: flex; align-items: center; gap: 12px; padding: 7px 14px 7px 8px;
  background: linear-gradient(90deg, rgba(var(--cyan-rgb), .16), rgba(var(--cyan-rgb), .04) 60%, rgba(7, 13, 32, .6));
  box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb), .4), inset 4px 0 0 var(--cyan);
  clip-path: var(--chamfer-s);
}
.shop-versions-note[hidden] { display: none; }
.shop-versions-badge {
  flex: none; padding: 7px 10px; background: linear-gradient(180deg, #9be9ff, #35b9ee); color: #04202e;
  font: italic 900 13px/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  clip-path: var(--chamfer-s);
}
.shop-versions-note p { margin: 0; min-width: 0; color: #d6e4ee; font: 600 12.5px/1.3 var(--f-ui); letter-spacing: .03em; }
.shop-versions-note p b,
.dragon-vault-panel .vault-pane-head .vault-leader-note b { color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
/* the two shop notices sit a little closer together than other blocks */
.capsule-shop-panel .shop-free-banner { padding-top: 7px; padding-bottom: 7px; }
.capsule-shop-panel .shop-free-banner + .shop-versions-note { margin-top: -6px; }
.dragon-vault-panel .vault-holo-head .vault-leader-note { box-shadow: inset 0 0 0 1px rgba(var(--cyan-rgb), .4), inset 4px 0 0 var(--cyan); }

/* ───────── V0.558 — Holo Collection foil is ready before it is seen ─────────
   Off-screen tiles used to be skipped by the browser until scrolled near,
   so their foil could only start then. A page is 60 tiles; lay them all out. */
/* (V0.559: only while the page is loading — see below.) */

/* ───────── V0.529 — Holo Collection: no loading cover ─────────
   The "Loading Holos…" panel is gone. While a page's foil is being finished
   (.holo-loading, normally a few frames) every tile is laid out so off-screen
   cards are foiled too; afterwards off-screen tiles are skipped again. */
.vault-holo-grid.holo-loading > .vh-card { content-visibility: visible; }

/* ───────── V0.530 — Holo Collection tile captions ─────────
   The caption under each card was three separately-styled strips: the name
   was clamped to two lines but its bottom padding let a third line peek
   through, and the type line sat on top of it. It is now one panel with a
   fixed layout: number, a name area that is always exactly two lines, a
   hairline, then the type line. Every tile is the same height. */
.vh-card { background: linear-gradient(180deg, #0c1638 0%, #070c20 100%); }
.vh-card > .vm-foot { background: none; padding: 8px 9px 0; }
.vh-card .vm-code { font-size: 12px; letter-spacing: .05em; color: #9fb4e8; }
.vh-card.owned .vm-code { color: color-mix(in srgb, var(--rc) 55%, #ffffff); }
.vh-card > .vl-name {
  box-sizing: content-box; margin: 5px 9px 0; padding: 0; background: none;
  font-size: 12.5px; line-height: 1.22; letter-spacing: .015em;
  height: 2.44em; min-height: 0; max-height: 2.44em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.vh-card > .vh-meta {
  margin: 7px 9px 0; padding: 6px 0 9px;
  border-top: 1px solid rgba(128, 176, 255, .14);
  font: 700 10px/1.1 var(--f-ui); letter-spacing: .09em; text-transform: uppercase;
  color: #7f8fb8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vh-card.owned > .vh-meta { color: color-mix(in srgb, var(--rc) 45%, #aab8dc); }

/* ───────── V0.526 — Developer menu: give Zeni ───────── */
.dev-zeni { display: grid; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(128, 176, 255, .16); }
.dev-zeni-title { margin: 4px 0 0; font: 800 12px/1.1 var(--f-ui, inherit); letter-spacing: .1em; text-transform: uppercase; color: #ffd24a; }
.dev-zeni-row { display: flex; gap: 6px; align-items: stretch; }
.dev-zeni-row input { flex: 1 1 0; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid rgba(128, 176, 255, .28); background: #0a1230; color: #eaf0ff; font: 600 13px/1 inherit; }
.dev-zeni-row input[type="number"] { flex: 0 1 150px; }
.dev-zeni-row input[data-dev-zeni-all-amount] { flex: 1 1 0; }
.dev-zeni-row input:focus { outline: none; border-color: #51cdff; }
.dev-zeni-row button { flex: 0 0 auto; min-width: 92px; height: 36px; }
.dev-zeni-bad { color: #ff8a8a !important; }
/* V0.528: the generic hub input width:100% + huge full-row buttons were
   squeezing the username/amount controls to almost zero width. Limit these
   rules to the Developer giveaway form so unrelated settings are untouched. */
.hub-panel .dev-zeni, #settingsModal .dev-zeni { min-width:0; width:100%; box-sizing:border-box; }
.hub-panel .dev-zeni-row, #settingsModal .dev-zeni-row {
  display:grid; width:100%; min-width:0; box-sizing:border-box;
  grid-template-columns:minmax(0,1fr) minmax(108px,150px) 118px;
  gap:10px; align-items:center;
}
.hub-panel .dev-zeni-row:has([data-dev-zeni-all-amount]),
#settingsModal .dev-zeni-row:has([data-dev-zeni-all-amount]) { grid-template-columns:minmax(0,1fr) 132px; }
.hub-panel .dev-zeni-row input, #settingsModal .dev-zeni-row input,
.hub-panel .dev-zeni-row input[type="number"], #settingsModal .dev-zeni-row input[type="number"] {
  box-sizing:border-box; width:100% !important; min-width:0 !important;
  max-width:none; height:44px !important; min-height:44px !important;
  padding:8px 12px !important; font:600 15px/1.2 var(--f-ui,inherit) !important;
  flex:none; color:#f1f6ff;
}
.hub-panel .dev-zeni-row input[type="number"], #settingsModal .dev-zeni-row input[type="number"] { -moz-appearance:textfield; appearance:textfield; }
.dev-zeni-row input[type="number"]::-webkit-inner-spin-button, .dev-zeni-row input[type="number"]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.hub-panel .dev-zeni-row button, #settingsModal .dev-zeni-row button {
  box-sizing:border-box; display:block; width:100% !important; max-width:none;
  min-width:0 !important; height:44px !important; min-height:44px !important;
  padding:8px 12px !important; font-size:15px !important;
  letter-spacing:.06em !important; white-space:nowrap;
}
.dev-zeni-repair-row { margin-top:12px; }
.hub-panel .dev-zeni-repair-row button, #settingsModal .dev-zeni-repair-row button {
  width:auto !important; max-width:100%; padding:10px 18px !important;
  font-size:14px !important; min-height:42px !important;
}
.dev-zeni [data-dev-zeni-status] { margin:4px 0 0; line-height:1.45; overflow-wrap:anywhere; }
@media (max-width:700px) {
  .hub-panel .dev-zeni-row, #settingsModal .dev-zeni-row {
    grid-template-columns:minmax(0,1fr) minmax(0,115px);
  }
  .hub-panel .dev-zeni-row:not(:has([data-dev-zeni-all-amount])) button,
  #settingsModal .dev-zeni-row:not(:has([data-dev-zeni-all-amount])) button { grid-column:1 / -1; }
}
@media (max-width:420px) {
  .hub-panel .dev-zeni-row:has([data-dev-zeni-all-amount]),
  #settingsModal .dev-zeni-row:has([data-dev-zeni-all-amount]) { grid-template-columns:minmax(0,1fr); }
}

