/* Chroma Packs (lab prototype). Scoped under .cp; the colours, radii, shadows and easings come from site.css.
   Animation is transform and opacity only. Card size comes from --cw, which chroma.js sets from the table width. */

.cp {
  --stock: #FFFFFF; --stock-ink: #16151B; --stock-muted: #77727F; --stock-line: rgb(22 21 27 / 8%);
  --felt: #EFEDE7; --felt-dot: rgb(22 21 27 / 7%); --spot: rgb(255 255 255 / 92%);
  --foil: linear-gradient(135deg, #F5F7FC 0%, #D7DEEC 28%, #FBFCFF 48%, #CFD8EA 70%, #F1F4FA 100%);
  --gold: linear-gradient(135deg, #FFF8E4 0%, #F1D58F 30%, #FFFBF0 50%, #EACB7C 72%, #FFF5D8 100%);
  --sil: color-mix(in srgb, var(--ink) 9%, var(--surface));
  --t0: #9C98A6; --t1: #17A673; --t2: #3D8BFD; --t3: #8B5CF6; --t4: #F5A524;
}
@media (prefers-color-scheme: dark) {
  .cp {
    --stock: #24222C; --stock-ink: #F1EFF6; --stock-muted: #A29EAE; --stock-line: rgb(255 255 255 / 7%);
    --felt: #131218; --felt-dot: rgb(255 255 255 / 5%); --spot: rgb(142 128 255 / 11%);
    --foil: linear-gradient(135deg, #2B303E 0%, #46506A 28%, #272B37 50%, #4A5470 72%, #2B303D 100%);
    --gold: linear-gradient(135deg, #3A2E15 0%, #6E5524 30%, #2E2512 52%, #75592A 74%, #3B2F16 100%);
    --sil: color-mix(in srgb, var(--ink) 6%, var(--bg));
  }
}
.cp [hidden] { display: none !important; }
.cp-head { padding-bottom: clamp(18px, 3vw, 28px); }
.cp-head h1 { margin-bottom: .3em; }

/* ---------------------------------------------------------------- stage */
.cp-stage { position: relative; container: cpstage / inline-size; isolation: isolate; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1);
  background: radial-gradient(58% 60% at 50% 55%, var(--spot), transparent 72%),
    radial-gradient(var(--felt-dot) 1px, transparent 1.6px) 0 0 / 18px 18px, var(--felt); }
@media (max-width: 520px) { .cp-stage { margin-inline: -10px; border-radius: 22px; } }

/* HUD */
.cp-hud { position: relative; z-index: 6; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; padding: 12px; }
.cp-stat { min-width: 0; padding: 9px 12px 10px; border-radius: 14px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, transparent); }
.cp-stat-label { display: block; margin-bottom: 7px; font: 650 .66rem/1 var(--sans); letter-spacing: .11em; text-transform: uppercase;
  color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-stat-val { display: flex; align-items: center; gap: 7px; min-height: 16px; font: 750 1rem/1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-stat-val b { display: inline-block; }
.cp-timer, .cp-dust-of, .cp-pity-n { font-weight: 600; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.cp-pips, .cp-pity { display: inline-flex; gap: 3px; flex: none; }
.cp-pips i { position: relative; width: 9px; height: 15px; border-radius: 3px; overflow: hidden; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.cp-pips i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--rose), var(--accent));
  transform: scaleY(var(--f, 0)); transform-origin: bottom; transition: transform .3s var(--ease-out); }
.cp-pips i.is-next::after { transition: transform 1s linear; opacity: .55; }
.cp-pity i { position: relative; width: 5px; height: 15px; border-radius: 2px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cp-pity i::after { content: ""; position: absolute; inset: 0; background: var(--t3); opacity: 0; transition: opacity .3s; }
.cp-pity i.on::after { opacity: 1; }
.cp-stat-pity.is-hot .cp-pity i::after { background: linear-gradient(var(--t4), var(--t3)); }
.cp-stat-pity.is-hot .cp-pity-n { color: var(--t3); }
.cp-dust-ico { width: 17px; height: 17px; fill: var(--t4); flex: none; }
.cp-sound { width: 46px; align-self: stretch; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line); cursor: pointer;
  background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--ink); transition: transform .18s var(--ease-out), background .18s; }
.cp-sound:hover { background: var(--surface); }
.cp-sound:active { transform: scale(.94); }
.cp-sound svg { width: 22px; height: 22px; }
.cp-sound[aria-pressed="true"] .i-off, .cp-sound[aria-pressed="false"] .i-on { display: none; }
.cp-sound[aria-pressed="false"] { color: var(--faint); }
@container cpstage (max-width: 599px) {
  .cp-hud { gap: 6px; padding: 10px; }
  .cp-stat { padding: 8px 9px 9px; border-radius: 12px; }
  .cp-stat-label { font-size: .6rem; letter-spacing: .08em; margin-bottom: 6px; }
  .cp-stat-val { gap: 5px; font-size: .92rem; }
  .cp-timer, .cp-dust-of, .cp-pity-n { font-size: .72rem; }
  .cp-pips i { width: 7px; height: 13px; }
  .cp-pity { gap: 2px; }
  .cp-pity i { width: 2px; height: 13px; border-radius: 1px; }
  .cp-packs-n, .cp-wide { display: none !important; }
  .cp-sound { width: 40px; border-radius: 12px; }
}
@container cpstage (max-width: 380px) { .cp-dust-of { display: none; } .cp-pity { gap: 1px; } }

/* table: pack, hand and their light */
.cp-table { position: relative; height: 440px; --cw: 160px; --ch: calc(var(--cw) * 1.4); --pw: 214px; }
@container cpstage (max-width: 599px) { .cp-table { height: 378px; --pw: 172px; } }
.cp-ambient { position: absolute; left: 50%; top: 50%; width: 900px; height: 520px; margin: -260px 0 0 -450px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--amb, var(--accent)) 30%, transparent), transparent);
  opacity: 0; transform: scale(.85); transition: opacity .8s, transform 1.2s var(--ease-out); }
.cp-stage.has-amb .cp-ambient { opacity: 1; transform: none; }

/* the pack */
.cp-pack { position: absolute; z-index: 3; left: 50%; top: 50%; width: var(--pw); height: calc(var(--pw) * 1.5636);
  margin: calc(var(--pw) * -0.7818) 0 0 calc(var(--pw) / -2); padding: 0; border: 0; background: none; color: #fff;
  cursor: pointer; touch-action: pan-y; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; border-radius: 12px; }
.cp-pack:focus-visible { outline: none; }
.cp-pack:focus-visible .cp-pack-body { outline: 3px solid var(--accent); outline-offset: 6px; }
.cp-pack > span, .cp-pack-float > span, .cp-pack-wobble > span { position: absolute; inset: 0; display: block; }
.cp-pack-float { animation: cp-float 3.4s ease-in-out infinite alternate; }
.cp-pack-shadow { inset: auto 8% -7% 8% !important; height: 26px; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(10 9 16 / 32%), transparent); animation: cp-shadow 3.4s ease-in-out infinite alternate; }
.cp-stage:not([data-flow="idle"]) .cp-pack-float, .cp-stage:not([data-flow="idle"]) .cp-pack-shadow { animation-play-state: paused; }
@keyframes cp-float { from { transform: translateY(0) rotate(-.6deg); } to { transform: translateY(-9px) rotate(.6deg); } }
@keyframes cp-shadow { from { transform: scale(1); opacity: 1; } to { transform: scale(.86); opacity: .7; } }
.cp-pack:hover .cp-pack-tilt { transform: translateY(-3px) scale(1.015); }
.cp-pack.is-pressed .cp-pack-tilt { transform: scale(.97); }
.cp-pack-tilt { transition: transform .25s var(--ease-out); }
.cp-pack.is-tearing .cp-pack-tilt { transition: none; }
.cp-rumble { animation: cp-rumble .09s linear infinite; }
@keyframes cp-rumble { 25% { transform: translate(-1px, .5px) rotate(-.4deg); } 50% { transform: translate(1px, -.5px) rotate(.4deg); } 75% { transform: translate(-.5px, -.5px) rotate(-.2deg); } }

.cp-pack-glow { position: absolute; inset: -38% -55%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow, #fff) 0%, color-mix(in srgb, var(--glow, #fff) 45%, transparent) 38%, transparent 72%);
  opacity: 0; transform: scale(.7); }
.cp-pack-rays { position: absolute; inset: -60% -90%; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--glow, #fff) 55%, transparent) 0 5deg, transparent 5deg 15deg);
  -webkit-mask: radial-gradient(closest-side, #000 18%, transparent 70%); mask: radial-gradient(closest-side, #000 18%, transparent 70%);
  animation: cp-spin 14s linear infinite paused; }
.cp-pack.has-rays .cp-pack-rays { animation-play-state: running; }

.cp-pack-body, .cp-pack-flap { position: absolute; left: 0; right: 0; overflow: hidden;
  background: linear-gradient(158deg, #332C55 0%, #1C1930 34%, #2C2748 55%, #15131E 100%); }
.cp-pack-body { top: 15%; bottom: 0; border-radius: 0 0 6px 6px; padding-top: 9%;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 10%); }
.cp-pack-flap { top: 0; height: 15.2%; border-radius: 6px 6px 0 0; transform-origin: 100% 100%;
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
  mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%; }
.cp-pack-crimp { position: absolute; left: 0; right: 0; height: 15px;
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / 16%) 0 1px, transparent 1px 4px); }
.cp-pack-body .cp-pack-crimp { bottom: 0; }
.cp-pack-flap .cp-pack-crimp { top: 0; height: 60%; }
.cp-pack-holo { position: absolute; inset: 0; opacity: .5; mix-blend-mode: screen;
  background: radial-gradient(120% 70% at 20% 0%, rgb(255 111 154 / 35%), transparent 60%),
    radial-gradient(90% 60% at 100% 45%, rgb(61 139 253 / 32%), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, rgb(23 166 115 / 26%), transparent 60%); }
.cp-pack-shine { position: absolute; inset: 0; overflow: hidden; }
.cp-pack-shine::before { content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 60%;
  background: linear-gradient(100deg, transparent 0%, rgb(255 255 255 / 0%) 25%, rgb(255 255 255 / 28%) 50%, rgb(255 255 255 / 0%) 75%, transparent);
  transform: translateX(0) skewX(-12deg); animation: cp-shine 3.8s var(--ease-out) infinite 1.2s; }
@keyframes cp-shine { 0% { transform: translateX(0) skewX(-12deg); } 45%, 100% { transform: translateX(330%) skewX(-12deg); } }
.cp-pack-series { position: relative; font: 700 calc(var(--pw) * .042)/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: rgb(255 255 255 / 55%); }
.cp-pack-logo { position: relative; width: 62%; height: 30%; margin: 7% 0 4%; }
.cp-pack-logo i { position: absolute; left: 50%; bottom: 0; width: 34%; aspect-ratio: 5 / 7; margin-left: -17%; border-radius: 7px;
  border: 3px solid #fff; box-shadow: 0 6px 14px rgb(0 0 0 / 35%); transform-origin: 50% 120%; }
.cp-pack-logo i:nth-child(1) { background: var(--coral); transform: rotate(-26deg); }
.cp-pack-logo i:nth-child(2) { background: var(--sun); transform: rotate(-13deg); }
.cp-pack-logo i:nth-child(3) { background: var(--leaf); transform: rotate(0deg); }
.cp-pack-logo i:nth-child(4) { background: var(--sky); transform: rotate(13deg); }
.cp-pack-logo i:nth-child(5) { background: var(--grape); transform: rotate(26deg); }
.cp-pack-title { position: relative; display: flex; flex-direction: column; align-items: center; font: 850 calc(var(--pw) * .15)/.9 var(--sans);
  letter-spacing: -.04em; text-transform: uppercase; background: linear-gradient(180deg, #fff 30%, #CFC8FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cp-pack-title small { font-size: .42em; letter-spacing: .42em; margin: .5em -.42em 0 0; font-weight: 750; }
.cp-pack-sub { position: relative; margin-top: auto; margin-bottom: 15%; font: 600 calc(var(--pw) * .045)/1.45 var(--sans); color: rgb(255 255 255 / 62%); letter-spacing: .02em; }

/* the tear line: a dashed guide, a light leak in the tell colour and the bright seam that follows the finger */
.cp-rip { position: absolute; left: 0; right: 0; top: 15.2%; height: 0; pointer-events: none; }
.cp-rip-guide { position: absolute; left: 6px; right: 6px; top: -1px; border-top: 2px dashed rgb(255 255 255 / 30%); }
.cp-rip-guide::before, .cp-rip-guide::after { content: ""; position: absolute; top: -7px; width: 0; height: 0; border: 6px solid transparent; }
.cp-rip-guide::before { left: -7px; border-left-color: rgb(255 255 255 / 55%); }
.cp-rip-guide::after { right: -7px; border-right-color: rgb(255 255 255 / 55%); }
.cp-rip-line, .cp-rip-leak { position: absolute; left: 0; right: 0; transform: scaleX(0); transform-origin: left center; }
.cp-rip-line { top: -2px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #fff, color-mix(in srgb, var(--glow, #fff) 60%, #fff));
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--glow, #fff) 80%, transparent); }
.cp-rip-leak { top: -22px; height: 44px; border-radius: 50%; opacity: .9;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow, #fff) 85%, transparent), transparent); }

/* idle hint: a fingertip that swipes along the tear line */
.cp-hint { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.cp-hint-dot { position: absolute; top: 15.2%; left: 8%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  background: rgb(255 255 255 / 70%); box-shadow: 0 0 0 6px rgb(255 255 255 / 20%), 0 4px 14px rgb(0 0 0 / 30%); }
.cp-stage[data-flow="idle"] .cp-hint { animation: cp-hint-show 3.6s linear infinite 1.4s; }
.cp-stage[data-flow="idle"] .cp-hint-dot { animation: cp-hint-move 3.6s var(--ease-out) infinite 1.4s; }
.cp-stage.was-opened[data-flow="idle"] .cp-hint, .cp-stage.was-opened[data-flow="idle"] .cp-hint-dot { animation-delay: 6s; }
@keyframes cp-hint-show { 0% { opacity: 0; } 8% { opacity: 1; } 42% { opacity: 1; } 52%, 100% { opacity: 0; } }
@keyframes cp-hint-move { 0% { transform: translateX(0) scale(.7); } 10% { transform: translateX(0) scale(1); } 46% { transform: translateX(calc(var(--pw) * .84)) scale(1); } 100% { transform: translateX(calc(var(--pw) * .84)) scale(.8); } }

/* spare packs behind the current one, and the empty slot when none are left */
.cp-ghosts { position: absolute; inset: 0; pointer-events: none; transition: opacity .3s; }
.cp-ghost { position: absolute; left: 50%; top: 50%; width: var(--pw); height: calc(var(--pw) * 1.5636); margin: calc(var(--pw) * -0.7818) 0 0 calc(var(--pw) / -2);
  border-radius: 8px; background: linear-gradient(158deg, #2C2649, #17152A 50%, #241F3C); box-shadow: 0 10px 26px rgb(10 9 16 / 22%);
  opacity: 0; transition: opacity .35s, transform .45s var(--spring); }
.cp-ghost:nth-child(1) { transform: translate(-16%, 2%) rotate(-7deg) scale(.95); }
.cp-ghost:nth-child(2) { transform: translate(16%, 3%) rotate(7deg) scale(.95); }
.cp-ghosts[data-n="1"] .cp-ghost:nth-child(1), .cp-ghosts[data-n="2"] .cp-ghost { opacity: .9; }
.cp-stage:not([data-flow="idle"]):not([data-flow="charging"]):not([data-flow="tearing"]) .cp-ghosts { opacity: 0; }
.cp-empty { position: absolute; left: 50%; top: 50%; width: var(--pw); height: calc(var(--pw) * 1.5636); margin: calc(var(--pw) * -0.7818) 0 0 calc(var(--pw) / -2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; border-radius: 14px;
  border: 2px dashed color-mix(in srgb, var(--ink) 18%, transparent); color: var(--muted); opacity: 0; transform: scale(.94); pointer-events: none;
  transition: opacity .3s, transform .4s var(--ease-out); }
.cp-stage[data-flow="empty"] .cp-empty { opacity: 1; transform: none; }
.cp-empty-label { font: 650 .7rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.cp-empty-time { font: 800 2.6rem/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.cp-empty-bar { width: 60%; height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.cp-empty-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--rose)); transform-origin: left; transform: scaleX(var(--f, 0)); transition: transform 1s linear; }
.cp-empty-note { font-size: .82rem; }

/* ---------------------------------------------------------------- cards */
.cp-hand { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cp-dim { position: absolute; inset: 0 -40px; z-index: 5; background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), rgb(12 10 20 / 0%) calc(var(--cw) * .75), rgb(12 10 20 / 46%) calc(var(--cw) * 2)); opacity: 0; transition: opacity .45s; pointer-events: none;
  -webkit-mask: linear-gradient(transparent, #000 90px, #000 calc(100% - 90px), transparent); mask: linear-gradient(transparent, #000 90px, #000 calc(100% - 90px), transparent); }
.cp-under { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cp-under-item { position: absolute; left: 50%; top: 50%; width: var(--cw); height: var(--ch); margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2); }
.cp-hand .cp-slot { z-index: 1; }
.cp-hand .cp-slot .cp-rays, .cp-hand .cp-slot.is-revealed .cp-aura { display: none; }
.cp-hand.is-dim .cp-dim { opacity: 1; }
.cp-slot { position: absolute; left: 50%; top: 50%; width: var(--cw); height: var(--ch); margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2);
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; perspective: 1100px; pointer-events: auto;
  -webkit-tap-highlight-color: transparent; --cr: calc(var(--cw) * .075); }
.cp-slot:focus-visible { outline: none; }
.cp-slot:focus-visible .cp-face { outline: 3px solid var(--accent); outline-offset: 4px; }
.cp-slot:hover, .cp-slot:focus-visible { z-index: 4; }
.cp-slot.is-building { z-index: 8; }
.cp-lift, .cp-flip, .cp-face { position: absolute; inset: 0; display: block; }
.cp-lift { transform-style: preserve-3d; transition: transform .28s var(--ease-out); }
.cp-flip { transform-style: preserve-3d; transform: rotateY(180deg); }
.cp-slot.is-revealed .cp-flip { transform: rotateY(0deg); }
.cp-slot:not(.is-revealed):hover .cp-lift { transform: translateY(-7px) rotate(-1.2deg); }
.cp-slot.is-revealed:hover .cp-lift { transform: translateY(-10px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.05); transition-duration: .12s; }
.cp-face { border-radius: var(--cr); overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }

/* back: ink stock, a quiet lattice, the studio's colour mark */
.cp-back { transform: rotateY(180deg); background:
    radial-gradient(circle at 50% 46%, rgb(142 128 255 / 26%), transparent 55%),
    repeating-linear-gradient(45deg, rgb(255 255 255 / 4.5%) 0 1px, transparent 1px calc(var(--cw) * .07)),
    repeating-linear-gradient(-45deg, rgb(255 255 255 / 4.5%) 0 1px, transparent 1px calc(var(--cw) * .07)),
    linear-gradient(160deg, #2A2540, #15131D 60%, #211D33);
  box-shadow: 0 1px 2px rgb(0 0 0 / 20%), 0 12px 26px -10px rgb(10 9 16 / 55%); }
.cp-back::before { content: ""; position: absolute; inset: 6%; border-radius: calc(var(--cr) * .7); border: 1px solid rgb(255 255 255 / 16%); }
.cp-back::after { content: ""; position: absolute; left: 50%; top: 46%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(45deg); border-radius: 22%;
  background: conic-gradient(from 210deg, var(--accent), var(--rose), var(--sun), var(--leaf), var(--sky), var(--accent));
  box-shadow: 0 0 0 calc(var(--cw) * .025) rgb(255 255 255 / 12%), 0 6px 18px rgb(0 0 0 / 40%); }
.cp-back-word { position: absolute; left: 0; right: 0; bottom: 15%; text-align: center; font: 750 calc(var(--cw) * .06)/1 var(--sans); letter-spacing: .38em; text-indent: .38em; color: rgb(255 255 255 / 55%); }
.cp-back-gloss { position: absolute; inset: -30%; background: linear-gradient(115deg, transparent 40%, rgb(255 255 255 / 10%) 50%, transparent 60%); }
.cp-back-mark { position: absolute; left: 50%; top: 46%; z-index: 1; width: 12%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(45deg); border-radius: 26%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 30%); }
@media (prefers-color-scheme: dark) { .cp-back { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%), 0 12px 26px -10px rgb(0 0 0 / 70%); } }

/* front: a swatch card. The colour field is the colour, nothing else touches its value. */
.cp-front { container-type: inline-size; background: var(--stock); color: var(--stock-ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 10%), 0 14px 30px -12px rgb(10 9 16 / 45%); }
.cp-stock { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 6cqw; gap: 4.5cqw; border-radius: inherit; background: var(--stock); }
.cp-field { position: relative; flex: 1; border-radius: 4.5cqw; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 7%); overflow: hidden; }
.cp-info { position: relative; height: 27cqw; display: flex; flex-direction: column; text-align: left; }
.cp-name { font: 760 10.4cqw/1.05 var(--sans); letter-spacing: -.025em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cp-meta { margin-top: auto; display: flex; justify-content: space-between; gap: 4cqw; font: 600 6.6cqw/1 var(--mono); color: var(--stock-muted); letter-spacing: .01em; }
.cp-gem { position: absolute; right: 5.5cqw; top: 5.5cqw; width: 12cqw; aspect-ratio: 1; }
.cp-info .cp-tier-name { display: none; }

/* rarity gems: shape and colour both carry the tier */
.cp-gem, .cp-gem-s { display: inline-block; flex: none; background: #fff; filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 30%)); }
.cp-gem::after, .cp-gem-s::after { content: ""; display: block; width: 100%; height: 100%; transform: scale(.72);
  background: radial-gradient(circle at 35% 30%, rgb(255 255 255 / 70%), transparent 45%), var(--rc); clip-path: inherit; }
.r-0 .cp-gem, .r-0 .cp-gem-s, .cp-gem-s.r-0 { clip-path: circle(50%); }
.r-1 .cp-gem, .r-1 .cp-gem-s, .cp-gem-s.r-1 { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.r-2 .cp-gem, .r-2 .cp-gem-s, .cp-gem-s.r-2 { clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); }
.r-3 .cp-gem, .r-3 .cp-gem-s, .cp-gem-s.r-3 { clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%); }
.r-4 .cp-gem, .r-4 .cp-gem-s, .cp-gem-s.r-4 { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 92%, 50% 71%, 21% 92%, 32% 57%, 2% 35%, 39% 35%); }
.r-0 { --rc: var(--t0); } .r-1 { --rc: var(--t1); } .r-2 { --rc: var(--t2); } .r-3 { --rc: var(--t3); } .r-4 { --rc: var(--t4); }

/* finishes */
.r-1 .cp-stock::before { content: ""; position: absolute; inset: 2.6cqw; border-radius: 5cqw; border: 1px solid color-mix(in srgb, var(--t1) 45%, transparent); pointer-events: none; }
.r-2 .cp-stock, .r-3 .cp-stock { background: var(--foil); }
.r-4 .cp-stock { background: var(--gold); }
.r-3 .cp-stock, .r-4 .cp-stock { inset: 2.8cqw; padding: 3.6cqw; border-radius: calc(var(--cr) * .8); }
.cp-holo { position: absolute; left: 50%; top: 50%; width: 190cqw; height: 190cqw; margin: -95cqw 0 0 -95cqw; display: none; animation: cp-spin 4.5s linear infinite; }
.r-3 .cp-holo { display: block; background: conic-gradient(from 0deg, #FF6F9A, #FFC23D, #5EE0A0, #3DC8FD, #8B5CF6, #FF6FD8, #FF6F9A); }
.r-4 .cp-holo { display: block; animation-duration: 3s; background: conic-gradient(from 0deg, #FFF4C9, #F5A524, #FF7A3D, #FFE38A, #FFFFFF, #F5B83D, #C9821A, #FFF4C9); }
.cp-sheen-drift, .cp-sheen { position: absolute; inset: 0; pointer-events: none; display: none; }
.r-2 .cp-sheen-drift, .r-3 .cp-sheen-drift, .r-4 .cp-sheen-drift { display: block; animation: cp-drift 5s ease-in-out infinite alternate; }
.r-2 .cp-sheen, .r-3 .cp-sheen, .r-4 .cp-sheen { display: block; inset: -40% -60%; border-radius: 0;
  transform: translate3d(calc((var(--px, .5) - .5) * -55%), calc((var(--py, .5) - .5) * -30%), 0); transition: transform .25s var(--ease-out);
  background: linear-gradient(112deg, transparent 41%, rgb(255 255 255 / 0%) 43%, rgb(255 255 255 / 42%) 47%, rgb(255 255 255 / 0%) 51%, transparent 53%); }
.r-3 .cp-sheen, .r-4 .cp-sheen { background:
    linear-gradient(112deg, transparent 41%, rgb(255 255 255 / 0%) 43%, rgb(255 255 255 / 46%) 47%, rgb(255 255 255 / 0%) 51%, transparent 53%),
    linear-gradient(112deg, transparent 33%, rgb(255 90 170 / 12%) 39%, rgb(255 214 70 / 12%) 45%, rgb(80 230 170 / 12%) 51%, rgb(90 140 255 / 12%) 57%, transparent 62%); }
@keyframes cp-drift { from { transform: translateX(-22%); } to { transform: translateX(22%); } }
@keyframes cp-spin { to { transform: rotate(360deg); } }
.cp-sparkles { position: absolute; inset: 0; pointer-events: none; display: none; }
.r-4 .cp-sparkles { display: block; }
.cp-sparkles i { position: absolute; width: 9cqw; aspect-ratio: 1; background: #fff; opacity: 0;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: cp-twinkle 2.4s ease-in-out infinite; }
.cp-sparkles i:nth-child(1) { left: 10%; top: 12%; }
.cp-sparkles i:nth-child(2) { right: 14%; top: 34%; animation-delay: .8s; width: 6cqw; }
.cp-sparkles i:nth-child(3) { left: 22%; top: 55%; animation-delay: 1.5s; width: 7cqw; }
@keyframes cp-twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); } 50% { opacity: .95; transform: scale(1) rotate(45deg); } }

/* aura, rays and tags around a card */
.cp-aura { position: absolute; inset: -34% -48%; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 75%, transparent), color-mix(in srgb, var(--rc) 22%, transparent) 55%, transparent); }
.cp-slot.tell .cp-aura { animation: cp-tell 1.6s ease-in-out infinite; }
.is-revealed.r-2 .cp-aura { opacity: .45; }
.is-revealed.r-3 .cp-aura { opacity: .6; }
.is-revealed.r-4 .cp-aura { opacity: .8; }
@keyframes cp-tell { 0%, 100% { opacity: .2; transform: scale(.9); } 50% { opacity: .65; transform: scale(1.04); } }
.cp-rays { position: absolute; left: 50%; top: 50%; width: calc(var(--cw) * 3); aspect-ratio: 1; margin: calc(var(--cw) * -1.5) 0 0 calc(var(--cw) * -1.5); pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 50%, transparent) 0 6deg, transparent 6deg 20deg);
  -webkit-mask: radial-gradient(closest-side, #000 25%, transparent 72%); mask: radial-gradient(closest-side, #000 25%, transparent 72%);
  transition: opacity .8s; animation: cp-spin 18s linear infinite; }
.is-revealed.r-3 .cp-rays { opacity: .5; }
.is-revealed.r-4 .cp-rays { opacity: .85; }
.cp-tag { position: absolute; left: 50%; top: 0; z-index: 3; max-width: calc(var(--cw) + 18px); padding: 5px 9px; border-radius: 999px; pointer-events: none;
  font: 750 .72rem/1.15 var(--sans); text-align: center; white-space: nowrap; letter-spacing: .01em;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 4px 14px rgb(10 9 16 / 18%);
  transform: translate(-50%, -60%) scale(.3); opacity: 0; transition: transform .45s var(--spring), opacity .2s; }
.cp-tag.is-new { background: var(--ink); color: var(--bg); border-color: transparent; }
.cp-tag.show { transform: translate(-50%, -60%) scale(1); opacity: 1; }
@container cpstage (max-width: 599px) { .cp-tag { white-space: normal; font-size: .62rem; padding: 4px 7px; } }

/* ---------------------------------------------------------------- actions under the table */
.cp-actions { position: relative; z-index: 6; min-height: 100px; display: flex; align-items: center; justify-content: center; padding: 0 14px 18px; }
.cp-act { display: none; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; text-align: center; animation: cp-in .35s var(--ease-out); }
.cp-stage[data-flow="idle"] .cp-act-idle, .cp-stage[data-flow="empty"] .cp-act-empty,
.cp-stage[data-flow="reveal"] .cp-act-reveal, .cp-stage[data-flow="done"] .cp-act-done { display: flex; }
.cp-stage[data-flow="charging"] .cp-act-idle, .cp-stage[data-flow="tearing"] .cp-act-idle { display: flex; opacity: .35; transition: opacity .3s; }
@keyframes cp-in { from { opacity: 0; transform: translateY(6px); } }
.cp-tip, .cp-summary, .cp-wait { margin: 0; color: var(--muted); font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; }
.cp-tip svg { width: 20px; height: 20px; flex: none; color: var(--faint); }
.cp-summary { color: var(--ink); font-weight: 650; flex-basis: 100%; justify-content: center; flex-wrap: wrap; }
.cp-summary .cp-gem-s { width: 14px; height: 14px; }
.cp-act .btn { min-height: 42px; }
.cp-buy[disabled], .cp-next[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.cp-next { box-shadow: 0 6px 18px rgb(22 21 27 / 18%); }
@container cpstage (max-width: 599px) { .cp-actions { min-height: 108px; } .cp-summary { font-size: .9rem; gap: 6px; } }

/* particles + flash sit above the page, never take input */
.cp-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 40; pointer-events: none; }
.cp-flash { position: fixed; inset: 0; z-index: 41; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at var(--fx, 50%) var(--fy, 50%), rgb(255 246 214 / 95%), rgb(255 196 80 / 45%) 35%, rgb(255 196 80 / 0%) 75%); }

/* ---------------------------------------------------------------- collection */
.cp-section { padding-top: clamp(56px, 8vw, 96px); }
.cp-section:last-child { padding-bottom: clamp(64px, 9vw, 104px); }
.cp-col-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 32px; margin-bottom: 22px; }
.cp-col-head p.muted { margin: 0; max-width: 520px; }
.cp-complete { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 12px; min-width: 220px; }
.cp-complete-pct { font: 800 2.4rem/1 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.cp-complete-of { color: var(--muted); font-size: .92rem; }
.cp-bar { grid-column: 1 / -1; height: 8px; margin-top: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.cp-bar i { display: block; height: 100%; border-radius: inherit; transform-origin: left; transform: scaleX(var(--f, 0)); transition: transform .8s var(--ease-out);
  background: linear-gradient(90deg, var(--t1), var(--t2), var(--t3), var(--t4)); }
.cp-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.cp-filter { display: grid; grid-template: "gem name n" auto "bar bar bar" auto / auto 1fr auto; align-items: center; gap: 4px 8px; padding: 10px 12px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 650 .86rem/1 var(--sans); text-align: left;
  transition: border-color .2s, background .2s, transform .18s var(--ease-out); }
.cp-filter:hover { border-color: color-mix(in srgb, var(--rc) 45%, var(--line)); }
.cp-filter:active { transform: scale(.98); }
.cp-filter[aria-pressed="true"] { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 9%, var(--surface)); }
.cp-filter .cp-gem-s { grid-area: gem; width: 13px; height: 13px; }
.cp-filter-name { grid-area: name; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-filter-n { grid-area: n; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; font-size: .8rem; }
.cp-filter .cp-bar { grid-area: bar; margin-top: 4px; height: 4px; }
.cp-filter .cp-bar i { background: var(--rc); }
@media (max-width: 760px) {
  .cp-filters { gap: 6px; }
  .cp-filter { grid-template: "gem n" auto "name name" auto "bar bar" auto / auto 1fr; gap: 5px 6px; padding: 9px 9px 10px; border-radius: 12px; }
  .cp-filter-n { color: var(--ink); font-weight: 750; font-size: .84rem; }
  .cp-filter-name { font: 600 .66rem/1 var(--sans); letter-spacing: -.01em; color: var(--muted); }
  .cp-filter .cp-bar { margin-top: 1px; }
}
.cp-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 7px; }
@media (max-width: 1000px) { .cp-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; } }
@media (max-width: 480px) { .cp-grid { gap: 4px; } }
.cp-tile { position: relative; aspect-ratio: 5 / 7; transition: opacity .3s, transform .3s var(--ease-out); }
.cp-grid[data-filter] .cp-tile:not(.is-match) { opacity: .16; transform: scale(.94); }
.cp-tile-in { position: absolute; inset: 0; display: block; width: 100%; padding: 0; border: 0; border-radius: clamp(5px, 14%, 9px); font: inherit; color: inherit; }
.cp-tile:not(.is-owned) .cp-tile-in { background: var(--sil); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent); }
.cp-tile:not(.is-owned) .cp-tile-in::before { content: ""; position: absolute; inset: 22% 18% 30%; border-radius: 4px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.cp-tile-no { position: absolute; left: 0; right: 0; bottom: 7%; text-align: center; font: 650 clamp(7px, 1.6vw, 10px)/1 var(--mono); color: var(--faint); letter-spacing: -.02em; }
.cp-tile.is-owned .cp-tile-in { cursor: pointer; padding: 3px; background: var(--stock); box-shadow: 0 1px 2px rgb(10 9 16 / 12%), inset 0 0 0 1px var(--stock-line);
  transition: transform .2s var(--ease-out), box-shadow .2s; }
.cp-tile.is-owned .cp-tile-in::before { content: ""; position: absolute; inset: 3px; border-radius: clamp(3px, 10%, 6px); background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 7%); }
.cp-tile.is-owned.r-2 .cp-tile-in, .cp-tile.is-owned.r-3 .cp-tile-in { background: var(--foil); }
.cp-tile.is-owned.r-3 .cp-tile-in { background: conic-gradient(from 200deg, #FF6F9A, #FFC23D, #5EE0A0, #3DC8FD, #8B5CF6, #FF6F9A); }
.cp-tile.is-owned.r-4 .cp-tile-in { background: conic-gradient(from 200deg, #FFF4C9, #F5A524, #FF7A3D, #FFE38A, #FFF4C9); }
.cp-tile.is-owned .cp-tile-in:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 8px 18px rgb(10 9 16 / 22%); z-index: 1; }
.cp-tile.is-owned .cp-tile-no { color: var(--on); opacity: .8; }
.cp-tile-n { position: absolute; right: -4px; top: -5px; z-index: 1; min-width: 18px; padding: 3px 4px; border-radius: 999px; font: 750 9.5px/1 var(--sans); font-variant-numeric: tabular-nums;
  background: var(--ink); color: var(--bg); box-shadow: 0 0 0 2px var(--bg); }
.cp-tile .cp-gem-s { position: absolute; left: 50%; top: 13%; width: 26%; aspect-ratio: 1; transform: translateX(-50%); }
.cp-tile.r-0 .cp-gem-s { display: none; }
.cp-tile.is-fresh .cp-tile-in::after { content: ""; position: absolute; left: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--bg); animation: cp-pulse 1.6s ease-in-out infinite; }
@keyframes cp-pulse { 50% { transform: scale(1.35); opacity: .7; } }
.cp-tile.pop { animation: cp-pop .6s var(--spring); }
@keyframes cp-pop { 0% { transform: scale(.6); } 100% { transform: none; } }
@media (max-width: 1000px) { .cp-tile-n { font-size: 8.5px; min-width: 15px; padding: 2px 3px; right: -3px; top: -4px; } .cp-tile .cp-gem-s { display: none; } }
@media (max-width: 480px) { .cp-tile-n { min-width: 0; padding: 2px 3px; right: 1px; top: 1px; font-size: 7.5px; box-shadow: none; } .cp-tile-n::first-letter { font-size: 0; } }

/* ---------------------------------------------------------------- transparency + notes */
.cp-info-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin-top: 24px; }
.cp-info-grid > * { min-width: 0; }
.cp-why { grid-column: 1 / -1; }
@media (max-width: 860px) { .cp-info-grid { grid-template-columns: 1fr; } }
.cp-transp .card p { margin-bottom: 14px; }
.cp-table-wrap { overflow-x: auto; margin: 0 -6px; }
.cp-odds-table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.cp-odds-table th, .cp-odds-table td { padding: 9px 6px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cp-odds-table th:first-child, .cp-odds-table td:first-child { text-align: left; }
.cp-odds-table thead th { font: 650 .7rem/1.25 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); vertical-align: bottom; white-space: normal; }
.cp-odds-table td:first-child { font-weight: 650; }
.cp-odds-table .cp-gem-s { width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; }
.cp-odds-table tfoot td { font-weight: 650; border-bottom: 0; color: var(--muted); }
@media (max-width: 520px) {
  .cp-odds-table { font-size: .84rem; }
  .cp-odds-table th, .cp-odds-table td { padding: 8px 4px; }
  .cp-odds-table th:last-child, .cp-odds-table td:last-child { display: none; }
  .cp-odds-table .cp-gem-s { margin-right: 6px; }
}
.cp-fine { font-size: .88rem; color: var(--muted); }
.cp-rule-list { margin: 0 0 18px; padding-left: 1.1em; color: var(--muted); }
.cp-rule-list li { margin: .45em 0; }
.cp-rule-list strong { color: var(--ink); }
.cp-reset { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cp-reset-confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: .9rem; color: var(--ink); }
.cp-danger { background: #D9363E; color: #fff; }
.cp-danger:hover { box-shadow: 0 6px 18px rgb(217 54 62 / 30%); }
.cp-why p:first-of-type { color: var(--muted); }
.cp-shows-grid { margin-top: 24px; }
.cp-built { margin-top: 18px; }

/* ---------------------------------------------------------------- detail dialog */
.cp-dialog { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: var(--r-l);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); overflow: auto; }
.cp-dialog::backdrop { background: rgb(14 13 18 / 55%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cp-dialog[open] { animation: cp-dlg .35s var(--ease-out); }
@keyframes cp-dlg { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.cp-d-x { position: absolute; right: 12px; top: 12px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.cp-d-x svg { width: 18px; height: 18px; }
.cp-d-body { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 32px; }
.cp-d-stage { position: relative; width: 250px; height: 350px; --cw: 250px; --ch: 350px; }
.cp-d-stage .cp-slot { cursor: default; }
.cp-d-stage .cp-slot.is-revealed:hover .cp-lift { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.02); }
.cp-d-stage .cp-slot.r-4 .cp-rays, .cp-d-stage .cp-slot.r-3 .cp-rays { opacity: .4; }
.cp-d-info h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 14px; }
.cp-d-kicker { display: flex; align-items: center; gap: 8px; }
.cp-d-kicker .cp-gem-s { width: 13px; height: 13px; }
.cp-d-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0 0 22px; font-size: .95rem; }
.cp-d-facts dt { color: var(--muted); }
.cp-d-facts dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.cp-d-facts code { font-size: .92em; }
.cp-d-nav { display: flex; gap: 8px; }
.cp-d-nav .btn { padding-inline: 14px; }
@media (max-width: 620px) {
  .cp-d-body { grid-template-columns: 1fr; justify-items: center; gap: 18px; padding: 56px 20px 22px; }
  .cp-d-stage { width: 200px; height: 280px; --cw: 200px; --ch: 280px; }
  .cp-d-info { width: 100%; }
  .cp-d-info h2 { text-align: center; }
  .cp-d-kicker { justify-content: center; }
  .cp-d-nav { justify-content: center; }
}
