/* Kruze Fam Vault — 3D card component styles (pairs with js/card3d.js).
   Tokens come from site.css; every var() carries a fallback so this file stands alone.
   Light/foil vars written by JS on the card root (or viewer face): --mx --my --o --bgx --bgy --dx --dy --hyp --angle.
   They are NOT declared here, so viewer-written values inherit cleanly; every use has a fallback. */

/* ============================================================ root + sizes */
.kz-card {
  --t: 9px;            /* slab thickness */
  --d: 38px;           /* sealed box depth */
  --persp: 700px;
  --pill-fs: 10.5px;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 63 / 88;
  perspective: var(--persp);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--kz-font-body, Inter, system-ui, sans-serif);
  color: var(--kz-text, #f4f1ea);
}
.kz-card--sm { width: 100%; }
.kz-card--md { width: var(--kz-card-md, 240px); --t: 14px; --d: 56px; --persp: 1000px; --pill-fs: 12px; }
.kz-card--lg { width: var(--kz-card-lg, min(400px, 86vw)); --t: 22px; --d: 92px; --persp: 1400px; --pill-fs: 13px; }
.kz-card.is-active { z-index: 3; }

/* hover pop: a warm glow blooms behind the card and the art brightens (driven by --o, 0 at rest -> 1 hovered) */
.kz-card::before {
  content: ""; position: absolute; inset: -14% -16%; z-index: -1; pointer-events: none;
  border-radius: 14%;
  background: radial-gradient(closest-side, rgba(255, 222, 140, .8), rgba(245, 197, 66, .34) 55%, transparent 80%);
  opacity: var(--o, 0);
  transform: scale(calc(.9 + var(--o, 0) * .2));
  transform-origin: 50% 100%;
  filter: blur(22px);
}
.kz-card.kz-tilt .kz-card__face {
  filter: brightness(calc(1.04 + var(--o, 0) * .14)) saturate(calc(1.04 + var(--o, 0) * .14));
}
.kz-card.is-active .kz-card__face {
  box-shadow: 0 0 0 1px rgba(255, 236, 180, calc(.08 + var(--o, 0) * .35)),
              0 calc(14px + var(--o, 0) * 18px) calc(28px + var(--o, 0) * 26px) -14px rgba(0, 0, 0, .9),
              0 0 calc(var(--o, 0) * 44px) rgba(255, 214, 120, calc(var(--o, 0) * .6));
}
/* inside a slab the card sits behind plastic: its own halo would smear across the case, so the glow behind the slab does the work */
.kz-card--graded.is-active .kz-card__face {
  box-shadow: 0 0 0 1px rgba(255, 236, 180, calc(.08 + var(--o, 0) * .3)), 0 8px 18px -10px rgba(0, 0, 0, .9);
}
.kz-card.is-active .kz-card__shadow { opacity: calc(.75 - var(--o, 0) * .25); transform: translateX(calc((50% - var(--mx, 50%)) * .25)) scale(calc(1 + var(--o, 0) * .25)); }

.kz-card__tilt {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
}
/* hover pop grows upward from the card's foot, so it never covers its own caption (viewer cards never get .kz-tilt) */
.kz-card.kz-tilt .kz-card__tilt { transform-origin: 50% 100%; }
/* touch: a small press pop before the viewer opens */
@media (hover: none) {
  .kz-card.kz-tilt { transition: transform .16s ease; }
  .kz-card.kz-tilt:active { transform: translateY(-3px) scale(1.025); }
}

/* soft floor shadow; drifts opposite the light */
.kz-card__shadow {
  position: absolute;
  left: 9%; right: 9%; bottom: -4.5%;
  height: 9%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0));
  opacity: .75;
  pointer-events: none;
  transform: translateX(calc((50% - var(--mx, 50%)) * .25));
}

/* ============================================================ card face */
.kz-card__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 4.6% / 3.3%;
  background: var(--kz-surface, #11131c) center / cover no-repeat;
  container-type: inline-size;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 14px 28px -14px rgba(0, 0, 0, .85);
}
.kz-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .35s ease;
  -webkit-user-drag: none;
}
.kz-card__img.is-loaded { opacity: 1; }

.kz-card__finish,
.kz-card__glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

/* glare: a soft light that follows the pointer */
.kz-card__glare {
  z-index: 3;
  background: radial-gradient(farthest-corner circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .16) 24%, rgba(0, 0, 0, .3) 88%);
  mix-blend-mode: overlay;
  opacity: calc(var(--o, 0) * .8 * var(--fx, 1));
}
/* big showcase cards (Top 10, hero): the same foil at full strength hides the art, so hover runs it at roughly half */
.kz-card--md.kz-tilt, .kz-card--lg.kz-tilt { --fx: .5; }
/* touch spotlight (cards crossing mid-screen): the light sits dead centre, so the foil runs gentler still */
.kz-card.kz-tilt.is-spot { --fx: .28; }

/* ---------- finishes ---------- */
.kz-card__finish { z-index: 2; mix-blend-mode: color-dodge; }
.kz-fin-normal .kz-card__finish { display: none; }

/* holo: rainbow bands in the art window that slide with the angle */
.kz-fin-holo .kz-card__finish,
.kz-fin-reverse .kz-card__finish {
  background-image:
    repeating-linear-gradient(110deg,
      hsl(2 85% 60%) 0%, hsl(45 95% 58%) 2%, hsl(120 75% 55%) 4%, hsl(185 90% 58%) 6%,
      hsl(245 85% 66%) 8%, hsl(305 80% 64%) 10%, hsl(2 85% 60%) 12%),
    repeating-linear-gradient(20deg, rgba(255, 255, 255, 0) 0 5px, rgba(255, 255, 255, .07) 5px 6px);
  background-size: 400% 400%, auto;
  background-position: var(--bgx, 50%) var(--bgy, 50%), 0 0;
  opacity: calc(var(--o, 0) * .5 * var(--fx, 1));
}
.kz-fin-holo .kz-card__finish {
  -webkit-mask: linear-gradient(#000 0 0) 50% 19% / 86% 42% no-repeat;
  mask: linear-gradient(#000 0 0) 50% 19% / 86% 42% no-repeat;
}
/* reverse holo: everything EXCEPT the art window */
.kz-fin-reverse .kz-card__finish {
  -webkit-mask: linear-gradient(#000 0 0), linear-gradient(#000 0 0) 50% 19% / 86% 42% no-repeat;
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0), linear-gradient(#000 0 0) 50% 19% / 86% 42% no-repeat;
  mask-composite: exclude;
  opacity: calc(var(--o, 0) * .42 * var(--fx, 1));
}

/* rare (ultra / illustration / secret ...): full-card rainbow + sparkle */
.kz-fin-rare .kz-card__finish {
  background-image:
    repeating-linear-gradient(125deg,
      hsl(330 85% 66%) 0%, hsl(30 95% 62%) 2.5%, hsl(60 95% 62%) 5%, hsl(140 80% 60%) 7.5%,
      hsl(195 90% 62%) 10%, hsl(265 85% 70%) 12.5%, hsl(330 85% 66%) 15%),
    radial-gradient(farthest-corner circle at var(--mx, 50%) var(--my, 50%),
      rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 55%);
  background-size: 300% 300%, 100% 100%;
  background-position: var(--bgx, 50%) var(--bgy, 50%), 0 0;
  opacity: calc(.06 + var(--o, 0) * .6 * var(--fx, 1));
}

/* gold (hyper / gold secret): warm sweep along the light angle */
.kz-fin-gold .kz-card__finish {
  background-image:
    linear-gradient(var(--angle, 135deg),
      rgba(255, 200, 80, 0) 12%, rgba(255, 206, 92, .7) 38%, rgba(255, 248, 214, .95) 50%,
      rgba(255, 186, 56, .7) 62%, rgba(255, 200, 80, 0) 88%),
    repeating-linear-gradient(60deg, rgba(255, 222, 128, .28) 0 2px, rgba(255, 222, 128, 0) 2px 9px);
  background-size: 220% 220%, auto;
  background-position: var(--bgx, 50%) var(--bgy, 50%), 0 0;
  opacity: calc(.1 + var(--o, 0) * .7 * var(--fx, 1));
}

/* sparkle layer for rare + gold: three prime-sized dot grids at different parallax rates,
   masked to the light so they glint where the light hits */
.kz-fin-rare .kz-card__finish::after,
.kz-fin-gold .kz-card__finish::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .95) 0 1px, rgba(255, 255, 255, 0) 1.6px),
    radial-gradient(circle, rgba(255, 255, 255, .8) 0 .8px, rgba(255, 255, 255, 0) 1.4px),
    radial-gradient(circle, rgba(255, 238, 196, .9) 0 1.2px, rgba(255, 238, 196, 0) 2px);
  background-size: 23px 29px, 37px 31px, 53px 47px;
  background-position:
    calc(var(--dx, 0) * -14px) calc(var(--dy, 0) * -14px),
    calc(var(--dx, 0) * 9px) calc(var(--dy, 0) * 11px),
    calc(var(--dx, 0) * -5px) calc(var(--dy, 0) * 6px);
  -webkit-mask-image: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), #000 0, rgba(0, 0, 0, .35) 30%, rgba(0, 0, 0, 0) 62%);
  mask-image: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), #000 0, rgba(0, 0, 0, .35) 30%, rgba(0, 0, 0, 0) 62%);
  opacity: calc(.35 + var(--hyp, 0) * .65);
}

/* ============================================================ fallback face */
.kz-fb {
  --acc: #e9b949;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 8.5cqw 8cqw 7cqw;
  color: var(--kz-text, #f4f1ea);
  background:
    radial-gradient(120% 70% at 50% 40%, rgba(233, 185, 73, .14), rgba(0, 0, 0, 0) 62%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 1px, rgba(255, 255, 255, 0) 1px 7px),
    linear-gradient(160deg, #1b1f2e 0%, #0b0c13 72%);
  background:
    radial-gradient(120% 70% at 50% 40%, color-mix(in srgb, var(--acc) 20%, transparent), transparent 62%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 1px, rgba(255, 255, 255, 0) 1px 7px),
    linear-gradient(160deg, #1b1f2e 0%, #0b0c13 72%);
}
/* foil ring frame */
.kz-fb__frame {
  position: absolute;
  inset: 2.6cqw;
  padding: 1.1cqw;
  border-radius: 3.4cqw;
  background: conic-gradient(from 210deg, #5f4f22, var(--acc), #fff4cf, var(--acc), #3f3418, var(--acc), #fff4cf, #5f4f22);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .9;
  pointer-events: none;
}
.kz-fb__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqw;
  min-height: 7cqw;
}
.kz-fb__set {
  min-width: 0;
  font: 600 4.3cqw/1.1 var(--kz-font-body, Inter, system-ui, sans-serif);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--kz-muted, #9a9aa8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kz-fb__jp {
  flex: none;
  font: 800 3.8cqw/1 var(--kz-font-body, Inter, system-ui, sans-serif);
  letter-spacing: .08em;
  padding: 1cqw 2.2cqw;
  border-radius: 999px;
  color: #17120a;
  background: var(--acc);
}
.kz-fb__art {
  position: relative;
  flex: 1;
  margin: 3.5cqw 0 4cqw;
  border-radius: 2.4cqw;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    repeating-conic-gradient(from 0deg at 50% 58%, rgba(255, 255, 255, .045) 0deg 5deg, rgba(255, 255, 255, 0) 5deg 15deg),
    radial-gradient(70% 60% at 50% 58%, rgba(233, 185, 73, .22), rgba(0, 0, 0, 0) 70%),
    linear-gradient(180deg, #151826, #0a0b12);
  background:
    repeating-conic-gradient(from 0deg at 50% 58%, rgba(255, 255, 255, .045) 0deg 5deg, rgba(255, 255, 255, 0) 5deg 15deg),
    radial-gradient(70% 60% at 50% 58%, color-mix(in srgb, var(--acc) 30%, transparent), transparent 70%),
    linear-gradient(180deg, #151826, #0a0b12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 -2cqw 6cqw rgba(0, 0, 0, .5);
}
.kz-fb__glyph {
  font: 600 44cqw/1 var(--kz-font-title, Cinzel, "Times New Roman", serif);
  background: linear-gradient(180deg, #fff 0%, var(--acc) 70%, rgba(0, 0, 0, .2) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .85;
  transform: translateY(4%);
}
.kz-fb__name {
  position: relative;
  font: 600 8.2cqw/1.1 var(--kz-font-title, Cinzel, "Times New Roman", serif);
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--kz-text, #f4f1ea);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.kz-fb__name--s { font-size: 7cqw; }
.kz-fb__name--xs { font-size: 6cqw; }
.kz-fb__foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 3cqw;
  margin-top: 3cqw;
  padding-top: 2.6cqw;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font: 600 4.1cqw/1.1 var(--kz-font-mono, ui-monospace, Menlo, monospace);
  color: var(--kz-muted, #9a9aa8);
}
.kz-fb__num, .kz-fb__rar { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kz-fb__rar { color: var(--acc); text-align: right; }

/* ============================================================ custom card back (Kruze Fam Vault) */
.kz-back {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 4.6% / 3.3%;
  container-type: inline-size;
  background: linear-gradient(160deg, #141826 0%, #07080d 75%);
  box-shadow: 0 0 0 1px rgba(245, 197, 66, .18), 0 14px 28px -14px rgba(0, 0, 0, .85);
}
.kz-back__pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 55% at 50% 45%, rgba(245, 197, 66, .2), rgba(245, 197, 66, 0) 70%),
    repeating-linear-gradient(60deg, rgba(245, 197, 66, .14) 0 1px, rgba(245, 197, 66, 0) 1px 7.5cqw),
    repeating-linear-gradient(-60deg, rgba(245, 197, 66, .14) 0 1px, rgba(245, 197, 66, 0) 1px 7.5cqw),
    repeating-linear-gradient(0deg, rgba(245, 197, 66, .07) 0 1px, rgba(245, 197, 66, 0) 1px 6.5cqw);
}
.kz-back__frame {
  position: absolute;
  inset: 4.5cqw;
  border-radius: 3cqw;
  border: 1px solid rgba(245, 197, 66, .55);
  box-shadow: inset 0 0 0 1.6cqw rgba(7, 8, 13, .55), inset 0 0 0 calc(1.6cqw + 1px) rgba(245, 197, 66, .3);
}
.kz-back__emblem {
  position: absolute;
  left: 50%;
  top: 41%;
  width: 36cqw;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) rotate(45deg);
  border: .9cqw solid var(--kz-gold, #f5c542);
  border-radius: 2cqw;
  background: radial-gradient(circle, #1f2437 0%, #0a0c14 75%);
  box-shadow: 0 0 0 1.8cqw #0a0c14, 0 0 0 2.2cqw rgba(245, 197, 66, .45), 0 0 8cqw rgba(245, 197, 66, .3);
}
.kz-back__kf {
  transform: rotate(-45deg);
  font: 600 13cqw/1 var(--kz-font-title, Cinzel, "Times New Roman", serif);
  letter-spacing: .04em;
  background: linear-gradient(180deg, #ffe9a3 0%, #f5c542 50%, #b37a12 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kz-back__word {
  position: absolute;
  left: 0; right: 0;
  top: 66%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4cqw;
  text-align: center;
  font-family: var(--kz-font-title, Cinzel, "Times New Roman", serif);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
}
.kz-back__w1, .kz-back__w2 {
  background: linear-gradient(180deg, #fff1c2 0%, #f5c542 60%, #c8881a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.kz-back__w1 { font-size: 6.4cqw; letter-spacing: .26em; padding-left: .26em; }
.kz-back__w2 { font-size: 10cqw; letter-spacing: .34em; padding-left: .34em; }
.kz-back .kz-card__glare { mix-blend-mode: soft-light; }

/* ============================================================ graded slab */
/* slab footprint: full height of the 63:88 box, width 86.6% (slab ratio 0.62) */
.kz-card--graded .kz-card__tilt { left: 6.7%; right: auto; width: 86.6%; }
.kz-slab {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  border-radius: 5% / 3.1%;
}
.kz-slab__plate { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.kz-slab__plate--back {
  transform: translateZ(calc(var(--t) / -2));
  background: linear-gradient(160deg, rgba(44, 50, 72, .6), rgba(12, 14, 22, .82));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 18px 34px -16px rgba(0, 0, 0, .9);
}
.kz-slab__plate--front {
  transform: translateZ(calc(var(--t) / 2));
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(145deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .03) 32%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, .07));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .38),
    inset 0 0 0 3px rgba(255, 255, 255, .05),
    inset 0 -12px 20px -14px rgba(255, 255, 255, .3);
}
/* recessed molding around the card well */
.kz-slab__plate--front::before {
  content: "";
  position: absolute;
  left: 6.4%; width: 87.2%;
  top: 21.6%; bottom: 2.9%;
  border-radius: 3.2% / 2.1%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 0 0 1px rgba(0, 0, 0, .25);
}
.kz-slab__glare {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0) calc(var(--mx, 50%) - 22%), rgba(255, 255, 255, .2) var(--mx, 50%), rgba(255, 255, 255, 0) calc(var(--mx, 50%) + 10%)),
    radial-gradient(farthest-corner circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .42), rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, 0) 60%);
  opacity: calc(.14 + var(--o, 0) * .6 * var(--fx, 1));
}
.kz-slab__side {
  position: absolute;
  background: linear-gradient(90deg, rgba(255, 255, 255, .3), rgba(205, 215, 235, .1) 50%, rgba(255, 255, 255, .3));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  pointer-events: none;
}
.kz-slab__side--l { left: 0;    top: 2.5%; height: 95%; width: var(--t); transform: translateX(-50%) rotateY(-90deg); }
.kz-slab__side--r { left: 100%; top: 2.5%; height: 95%; width: var(--t); transform: translateX(-50%) rotateY(90deg); }
.kz-slab__side--t { top: 0;    left: 4%; width: 92%; height: var(--t); transform: translateY(-50%) rotateX(90deg); }
.kz-slab__side--b { top: 100%; left: 4%; width: 92%; height: var(--t); transform: translateY(-50%) rotateX(-90deg); }

.kz-slab__well {
  position: absolute;
  left: 8%; width: 84%;
  top: 23%; height: 72.7%;   /* 84% x 72.7% of a 0.62 slab = 63:88 */
}
.kz-slab__well .kz-card__face { border-radius: 4.6% / 3.3%; }

/* at rest in small grids: flatten the slab (no 3D layers); depth comes back when hovered */
.kz-card--sm:not(.is-active) .kz-slab__side,
.kz-card--sm:not(.is-active) .kz-slab__plate--back { display: none; }
.kz-card--sm:not(.is-active) .kz-slab__label,
.kz-card--sm:not(.is-active) .kz-slab__plate--front { transform: none; }
.kz-card--sm:not(.is-active) .kz-slab__plate--front {
  background-color: rgba(30, 34, 50, .35);
}

/* ---------- grader label ---------- */
.kz-slab__label {
  position: absolute;
  left: 5%; right: 5%;
  top: 3%; height: 18%;
  transform: translateZ(calc(var(--t) / 4));
  container-type: inline-size;
}
.kz-lab {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 3cqw;
  padding: 3.2cqw 4.4cqw;
  border-radius: 2.2cqw;
  overflow: hidden;
  background: linear-gradient(180deg, #23263a, #15172a);
  color: #f4f1ea;
  box-shadow: inset 0 0 0 .6cqw rgba(245, 197, 66, .6), 0 2px 6px rgba(0, 0, 0, .4);
  font-family: var(--kz-font-body, Inter, system-ui, sans-serif);
}
.kz-lab__l { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.kz-lab__co {
  font: 800 7.6cqw/.95 var(--kz-font-body, Inter, system-ui, sans-serif);
  letter-spacing: .03em;
}
.kz-lab__meta { min-width: 0; }
.kz-lab__name, .kz-lab__set, .kz-lab__num { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kz-lab__name { font-size: 5cqw; line-height: 1.15; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.kz-lab__set, .kz-lab__num { font-size: 4cqw; line-height: 1.2; font-weight: 500; opacity: .82; }
.kz-lab__r { flex: none; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; text-align: right; }
.kz-lab__gl { font-size: 4.3cqw; line-height: 1; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.kz-lab__score { font: 800 16cqw/.82 var(--kz-font-body, Inter, system-ui, sans-serif); letter-spacing: -.03em; font-variant-numeric: lining-nums; }

/* PSA: white label, red border, red text */
.kz-gr-psa .kz-lab {
  background: linear-gradient(180deg, #ffffff, #f0efe9);
  color: #1a1a1a;
  box-shadow: inset 0 0 0 1.1cqw #c8102e, inset 0 0 0 1.7cqw #ffffff, inset 0 0 0 1.95cqw rgba(200, 16, 46, .45), 0 2px 6px rgba(0, 0, 0, .35);
}
.kz-gr-psa .kz-lab__co, .kz-gr-psa .kz-lab__score, .kz-gr-psa .kz-lab__gl { color: #c8102e; }
/* CGC: dark navy, gold text */
.kz-gr-cgc .kz-lab {
  background: linear-gradient(180deg, #13214d, #0a1330);
  color: #f5d77a;
  box-shadow: inset 0 0 0 .6cqw rgba(201, 162, 39, .75), 0 2px 6px rgba(0, 0, 0, .4);
}
.kz-gr-cgc .kz-lab__co, .kz-gr-cgc .kz-lab__score { color: var(--kz-gold, #f5c542); }
/* BGS: silver body, black score box with gold numerals */
.kz-gr-bgs .kz-lab {
  background: linear-gradient(180deg, #eef0f4, #b9bfc8 58%, #d9dde3);
  color: #121317;
  box-shadow: inset 0 0 0 .5cqw rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .4);
}
.kz-gr-bgs .kz-lab__score {
  background: #0d0d10;
  color: #e8c35a;
  font-size: 12.5cqw;
  line-height: .9;
  padding: 1.2cqw 2.4cqw .6cqw;
  border-radius: 1.4cqw;
  box-shadow: inset 0 0 0 .4cqw rgba(232, 195, 90, .6);
}
.kz-gr-bgs .kz-lab__gl { color: #8a6a12; }
/* AGS: black / white */
.kz-gr-ags .kz-lab {
  background: linear-gradient(180deg, #121212, #000);
  color: #fff;
  box-shadow: inset 0 0 0 .6cqw #fff, 0 2px 6px rgba(0, 0, 0, .4);
}
/* ACE: deep blue */
.kz-gr-ace .kz-lab {
  background: linear-gradient(180deg, #0f43b0, #08266b);
  color: #fff;
  box-shadow: inset 0 0 0 .6cqw rgba(127, 196, 255, .7), 0 2px 6px rgba(0, 0, 0, .4);
}
.kz-gr-ace .kz-lab__co { color: #9fd3ff; }

/* back of the label */
.kz-lab--back .kz-lab__name { font-size: 4.1cqw; letter-spacing: 0; }
.kz-lab--back { gap: 2cqw; }
.kz-lab__r--back { flex-direction: row; align-items: center; gap: 2.4cqw; }
.kz-lab__holo {
  width: 14cqw;
  aspect-ratio: 1;
  border-radius: 1.2cqw;
  background:
    linear-gradient(var(--angle, 135deg), rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 60%),
    conic-gradient(from 30deg, #ff6b9a, #ffd36b, #7dff9b, #6bd8ff, #b88bff, #ff6b9a);
  box-shadow: inset 0 0 0 .4cqw rgba(255, 255, 255, .6);
}
.kz-lab__bar {
  width: 24cqw;
  height: 17cqw;
  background: repeating-linear-gradient(90deg, currentColor 0 .5cqw, transparent .5cqw 1.1cqw, currentColor 1.1cqw 1.5cqw, transparent 1.5cqw 2.6cqw, currentColor 2.6cqw 3.6cqw, transparent 3.6cqw 4.2cqw);
  opacity: .85;
}

/* small grid size: keep the label to company + grade */
.kz-card--sm .kz-lab__meta { display: none; }
.kz-card--sm .kz-lab__co { font-size: 9.4cqw; }
.kz-card--sm .kz-lab__gl { font-size: 5.4cqw; }

/* ============================================================ sealed box */
.kz-box {
  position: absolute;
  left: 14%; width: 72%;
  top: 14%; height: 66%;
  transform-style: preserve-3d;
  transform: rotateX(-12deg) rotateY(-26deg);
}
.kz-box__f {
  position: absolute;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: linear-gradient(180deg, #1d2338, #0c0f19);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09);
}
.kz-box__f--front  { inset: 0; transform: translateZ(calc(var(--d) / 2)); container-type: inline-size; border-radius: 1.5%; }
.kz-box__f--back   { inset: 0; transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); container-type: inline-size; border-radius: 1.5%; }
.kz-box__f--left   { left: 0;    top: 0; height: 100%; width: var(--d); transform: translateX(-50%) rotateY(-90deg); }
.kz-box__f--right  { left: 100%; top: 0; height: 100%; width: var(--d); transform: translateX(-50%) rotateY(90deg); }
.kz-box__f--top    { top: 0;    left: 0; width: 100%; height: var(--d); transform: translateY(-50%) rotateX(90deg); }
.kz-box__f--bottom { top: 100%; left: 0; width: 100%; height: var(--d); transform: translateY(-50%) rotateX(-90deg); }

/* plain (no product photo) sides: navy with a gold seam */
.kz-box__f--left, .kz-box__f--right {
  background:
    linear-gradient(90deg, rgba(245, 197, 66, .55) 0 1px, rgba(245, 197, 66, 0) 1px calc(100% - 1px), rgba(245, 197, 66, .55) calc(100% - 1px)),
    linear-gradient(180deg, #171c2e, #090b13);
}
.kz-box__f--right::after, .kz-box__f--bottom::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .32); }
.kz-box__f--top {
  background:
    linear-gradient(180deg, rgba(245, 197, 66, 0) 40%, rgba(245, 197, 66, .5) 40% 60%, rgba(245, 197, 66, 0) 60%),
    linear-gradient(180deg, #2a3150, #161b2d);
}
/* with a product photo (a cut-out on a clear background): it stands on the dark front face, lit from behind;
   the other faces stay the plain navy-and-gold box */
.kz-box--img .kz-box__f--front {
  background: radial-gradient(90% 70% at 50% 46%, rgba(205, 179, 122, .22), transparent 70%), linear-gradient(180deg, #1d2338, #0c0f19);
  box-shadow: inset 0 0 0 1px rgba(205, 179, 122, .38);
}
.kz-box__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55));
  opacity: 0;
  transition: opacity .35s ease;
  -webkit-user-drag: none;
}
.kz-box__img.is-loaded { opacity: 1; }
.kz-box__f--front .kz-card__glare { z-index: 2; }

.kz-boxp {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3cqw;
  padding: 9cqw 8cqw;
  background:
    radial-gradient(90% 60% at 30% 20%, rgba(245, 197, 66, .22), rgba(245, 197, 66, 0) 70%),
    repeating-linear-gradient(60deg, rgba(245, 197, 66, .08) 0 1px, rgba(245, 197, 66, 0) 1px 6cqw),
    linear-gradient(165deg, #222a46, #0c0f1b 75%);
  box-shadow: inset 0 0 0 2cqw rgba(7, 8, 13, .4), inset 0 0 0 calc(2cqw + 1px) rgba(245, 197, 66, .45);
}
.kz-boxp__chip {
  position: absolute;
  top: 8cqw; left: 8cqw;
  font: 800 4.6cqw/1 var(--kz-font-body, Inter, system-ui, sans-serif);
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 1.6cqw 3cqw;
  border-radius: 999px;
  color: #17120a;
  background: var(--kz-gold, #f5c542);
}
.kz-boxp__name {
  font: 600 8.4cqw/1.1 var(--kz-font-title, Cinzel, "Times New Roman", serif);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--kz-text, #f4f1ea);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.kz-boxp__name--s { font-size: 7cqw; }
.kz-boxp__set {
  font: 600 4.6cqw/1.2 var(--kz-font-body, Inter, system-ui, sans-serif);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--kz-gold-soft, #cdb37a);
}
.kz-boxback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4cqw;
  background:
    repeating-linear-gradient(60deg, rgba(245, 197, 66, .12) 0 1px, rgba(245, 197, 66, 0) 1px 7cqw),
    repeating-linear-gradient(-60deg, rgba(245, 197, 66, .12) 0 1px, rgba(245, 197, 66, 0) 1px 7cqw),
    linear-gradient(165deg, #1a2036, #090b13);
}
.kz-box--img .kz-boxback { background: rgba(7, 8, 13, .55); }
.kz-boxback__mark {
  font: 600 20cqw/1 var(--kz-font-title, Cinzel, "Times New Roman", serif);
  color: var(--kz-gold, #f5c542);
}
.kz-boxback__word {
  font: 600 6.4cqw/1 var(--kz-font-title, Cinzel, "Times New Roman", serif);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--kz-text, #f4f1ea);
}
.kz-card--sealed .kz-card__shadow { left: 12%; right: 12%; bottom: 8%; height: 11%; }

/* ============================================================ badges */
.kz-card__badges {
  position: absolute;
  left: 5%; right: 5%;
  bottom: 3.5%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 4px;
  pointer-events: none;
  transform: translateZ(calc(var(--t) / 2 + 3px));
}
.kz-card--sealed .kz-card__badges { bottom: 1.5%; transform: none; }
.kz-card--sm:not(.is-active) .kz-card__badges { transform: none; }
.kz-badges__l, .kz-badges__r { display: flex; align-items: center; gap: 4px; min-width: 0; }
.kz-pill {
  display: inline-flex;
  align-items: center;
  height: 1.75em;
  padding: 0 .62em;
  border-radius: 999px;
  font: 700 var(--pill-fs, 10.5px)/1 var(--kz-font-body, Inter, system-ui, sans-serif);
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--kz-text, #f4f1ea);
  background: rgba(7, 8, 13, .82);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 4px 10px rgba(0, 0, 0, .45);
}
/* the slab label already carries the grade: no second gold pill on top of the art */
.kz-pill--grade {
  display: none;
  color: #17120a;
  background: linear-gradient(180deg, #ffe48a, var(--kz-gold, #f5c542));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 4px 10px rgba(0, 0, 0, .45);
}
.kz-favs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: calc(var(--pill-fs, 10.5px) * 1.75);
  padding: 0 2px;
}
/* favourite marker: one small dot in the member colour, no plate */
.kz-fav {
  width: calc(var(--pill-fs, 10.5px) * .62);
  height: calc(var(--pill-fs, 10.5px) * .62);
  border-radius: 50%;
  background: var(--c, #f5c542);
  box-shadow: 0 0 0 1.5px rgba(7, 8, 13, .72), 0 0 5px var(--c, #f5c542);
}

/* ============================================================ viewer */
html.kz-lock, html.kz-lock body { overflow: hidden !important; }

.kz-viewer {
  --kz-vcard: min(420px, 40vw, calc((100vh - 210px) * .716));
  position: fixed;
  inset: 0;
  z-index: 1000;
  color: var(--kz-text, #f4f1ea);
  font-family: var(--kz-font-body, Inter, system-ui, sans-serif);
}
@supports (height: 100dvh) {
  .kz-viewer { --kz-vcard: min(420px, 40vw, calc((100dvh - 210px) * .716)); }
}
.kz-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, .74);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
  animation: kz-fade .22s ease both;
}
.kz-viewer__shell {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
  align-items: stretch;
  overflow: hidden;
  touch-action: pan-y;   /* horizontal finger moves reach JS as swipes */
}
.kz-viewer__stage {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 64px 24px 28px;
  perspective: 1600px;
  perspective-origin: 50% 42%;
  touch-action: pan-y;
  animation: kz-rise .34s cubic-bezier(.2, .8, .2, 1) both;
}
.kz-viewer__flip {
  position: relative;
  flex: none;
  width: var(--kz-vcard);
  aspect-ratio: 63 / 88;
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: none;
  will-change: transform;
}
.kz-viewer.is-dragging .kz-viewer__flip { cursor: grabbing; }
.kz-viewer__front, .kz-viewer__back { position: absolute; inset: 0; transform-style: preserve-3d; }
.kz-viewer__back { transform: rotateY(180deg); }
.kz-viewer__flip.is-back .kz-viewer__front,
.kz-viewer__flip:not(.is-back) .kz-viewer__back { visibility: hidden; }
.kz-viewer .kz-card { width: 100%; perspective: none; transform-style: preserve-3d; touch-action: none; }
.kz-viewer .kz-card__shadow { display: none; }
.kz-viewer__shadow {
  flex: none;
  width: calc(var(--kz-vcard) * .85);
  height: 26px;
  margin-top: -12px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.kz-viewer__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.kz-viewer__count { min-height: 1em; font: 600 11.5px/1 var(--kz-font-body, Inter, system-ui, sans-serif); font-variant-numeric: tabular-nums; letter-spacing: .16em; color: var(--kz-muted, #9a9aa8); }
.kz-viewer__hint { font-size: 12px; color: var(--kz-muted, #9a9aa8); opacity: .8; text-align: center; }

.kz-vbtn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(244, 241, 234, .18);
  background: rgba(17, 19, 28, .78);
  color: var(--kz-text, #f4f1ea);
  font: 600 12px/1 var(--kz-font-body, Inter, system-ui, sans-serif);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.kz-vbtn[hidden] { display: none; }
.kz-vbtn:hover:not([disabled]) { border-color: var(--kz-gold-soft, #cdb37a); }
.kz-vbtn:active:not([disabled]) { transform: scale(.96); }
.kz-vbtn:focus-visible { outline: 2px solid var(--kz-gold, #f5c542); outline-offset: 3px; border-radius: 999px; }
.kz-vbtn[disabled] { opacity: .35; cursor: default; }
.kz-vbtn--icon { width: 42px; padding: 0; font-size: 24px; line-height: 1; }
.kz-vbtn--gold {
  min-width: 96px;
  border-color: transparent;
  color: #17120a;
  background: var(--kz-gold-grad, linear-gradient(180deg, #ffe9a3 0%, #f5c542 45%, #c8881a 100%));
}
.kz-vbtn--gold:hover:not([disabled]) { border-color: transparent; filter: brightness(1.06); }
.kz-viewer__close { position: absolute; top: 16px; right: 16px; z-index: 5; width: 46px; height: 46px; font-size: 28px; }

.kz-viewer__details {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 48px 40px 8px;
  animation: kz-rise .38s .04s cubic-bezier(.2, .8, .2, 1) both;
}
.kz-viewer__panel {
  max-width: 470px;
  width: 100%;
  margin: auto 0;
  padding: 28px 28px 24px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(24, 27, 40, .9), rgba(12, 14, 22, .92));
  border: 1px solid rgba(244, 241, 234, .09);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.kz-viewer__eyebrow {
  font: 600 11px/1.2 var(--kz-font-body, Inter, system-ui, sans-serif);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--kz-gold-soft, #cdb37a);
}
.kz-viewer__title {
  margin: 10px 0 12px;
  font: 600 clamp(22px, 2.2vw, 31px)/1.18 var(--kz-font-title, Cinzel, "Times New Roman", serif);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--kz-text, #f4f1ea);
  overflow-wrap: anywhere;
}
.kz-viewer__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.kz-vchip {
  font: 600 10px/1 var(--kz-font-body, Inter, system-ui, sans-serif);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(244, 241, 234, .2);
  color: var(--kz-muted, #9a9aa8);
}
.kz-viewer__price {
  margin: 18px 0 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(205, 179, 122, .06);
  border: 1px solid rgba(205, 179, 122, .24);
}
.kz-viewer__usd {
  font: 600 34px/1 var(--kz-font-title, Cinzel, "Times New Roman", serif);
  letter-spacing: .04em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--kz-cream, #e9dfc6);
}
.kz-viewer__each { margin-left: 8px; font: 600 12px/1 var(--kz-font-body, Inter, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: var(--kz-muted, #9a9aa8); }
.kz-viewer__cite { display: inline-block; margin-top: 8px; font-size: 12.5px; line-height: 1.35; color: var(--kz-muted, #9a9aa8); }
a.kz-viewer__cite { text-decoration: underline; text-decoration-color: rgba(244, 241, 234, .25); text-underline-offset: 3px; }
a.kz-viewer__cite:hover { color: var(--kz-gold-soft, #cdb37a); text-decoration-color: currentColor; }
.kz-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 18px;
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}
.kz-facts dt {
  padding-top: 2px;
  font: 600 10px/1.3 var(--kz-font-body, Inter, system-ui, sans-serif);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--kz-muted, #9a9aa8);
}
.kz-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kz-viewer__favs { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(244, 241, 234, .1); }
.kz-viewer__favlabel { margin-bottom: 10px; font: 600 10px/1 var(--kz-font-body, Inter, system-ui, sans-serif); letter-spacing: .16em; text-transform: uppercase; color: var(--kz-muted, #9a9aa8); }
.kz-viewer__favchips { display: flex; flex-wrap: wrap; gap: 8px; }
.kz-favchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .05);
  border-color: color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 15%, transparent);
}
.kz-favchip::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, #f5c542); box-shadow: 0 0 10px var(--c, #f5c542); }

.kz-viewer.is-closing { animation: kz-fadeout .18s ease forwards; pointer-events: none; }

@keyframes kz-fade { from { opacity: 0; } }
@keyframes kz-fadeout { to { opacity: 0; } }
@keyframes kz-rise { from { opacity: 0; transform: translateY(16px) scale(.97); } }

/* phone / narrow: card on top, details below, one scroll */
@media (max-width: 860px) {
  .kz-viewer { --kz-vcard: min(74vw, 330px, calc(56vh * .716)); }
  .kz-viewer__shell {
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .kz-viewer__stage { padding: 66px 16px 8px; gap: 14px; }
  .kz-viewer__details { overflow: visible; display: block; padding: 8px 16px 48px; }
  .kz-viewer__panel { margin: 0 auto; padding: 22px 20px 20px; }
  .kz-viewer__close { top: 10px; right: 10px; }
}
/* phone: prev / flip / next stay on one row; "Tilt with phone" takes its own full row underneath */
@media (max-width: 480px) {
  .kz-viewer__controls { width: min(100%, var(--kz-vcard)); }
  .kz-viewer__controls .kz-vbtn:not(.kz-vbtn--icon):not(.kz-vbtn--gold) { order: 3; flex: 0 0 100%; }
}

/* ============================================================ reduced motion */
@media (prefers-reduced-motion: reduce) {
  .kz-card__img, .kz-box__img { transition: none; }
  .kz-card__shadow { transform: none; }
  .kz-card__glare { --mx: 28%; --my: 18%; opacity: .22; }
  .kz-fin-holo .kz-card__finish,
  .kz-fin-reverse .kz-card__finish { opacity: .16; }
  .kz-fin-rare .kz-card__finish,
  .kz-fin-gold .kz-card__finish { opacity: .2; }
  .kz-slab__glare { opacity: .22; }
  .kz-viewer, .kz-viewer *, .kz-viewer__backdrop { animation: none !important; }
}
