/* ZAZA Card Hunt: the sealed pack and the "found it" reveal, in the ZAZA World look (navy, gold, electric blue,
   Titan One + Jersey 10). Shared by /hunt/ and ZAZA World (loaded by reveal.js). */

/* ---------- Sealed packs ---------- */
.zpack {
  --foil: linear-gradient(135deg, #0a1a6b, #8fb0ff 28%, #1d4bff 52%, #d8e3ff 70%, #0a1a6b);
  --edge: #ffd23f;
  position: relative;
  width: 200px;
  aspect-ratio: 0.62;
  container-type: inline-size;
  filter: drop-shadow(0 14px 18px rgba(0, 4, 24, 0.55));
  user-select: none;
  -webkit-user-select: none;
}
/* demo packs: the pixel ZAZA of ZAZA World, one colour per demo card type (--a light, --b dark) */
.zpack--demo {
  --a: #5b8cff;
  --b: #0a1a6b;
  --foil: linear-gradient(135deg, var(--b), color-mix(in srgb, var(--a) 50%, #fff) 26%, var(--a) 50%, color-mix(in srgb, var(--a) 30%, #fff) 68%, var(--b));
  --edge: color-mix(in srgb, var(--a) 55%, #fff);
}
/* real packs: black foil like Collector Crypt's own packs, with an electric accent (--acc) */
.zpack--real {
  --acc: #ff8a1f;
  --foil: linear-gradient(135deg, #050505, #5c5c5c 26%, #111 50%, #7c7c7c 68%, #090909);
  --edge: var(--acc);
}

.zpack-foil {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 3px;
  background: var(--foil);
  -webkit-mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 7.4cqw 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 7.4cqw 51% repeat-x;
  mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 7.4cqw 51% repeat-x,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 7.4cqw 51% repeat-x;
}
/* heat-sealed crimps, top and bottom, with a seam */
.zpack-foil::before,
.zpack-foil::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  height: 6.5%;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0 1cqw, rgba(0, 0, 0, 0.22) 1cqw 2cqw), var(--foil);
}
.zpack-foil::before { top: 0; box-shadow: 0 0.5cqw 0 rgba(0, 0, 0, 0.35), 0 1cqw 0 rgba(255, 255, 255, 0.15); }
.zpack-foil::after { bottom: 0; box-shadow: 0 -0.5cqw 0 rgba(0, 0, 0, 0.35), 0 -1cqw 0 rgba(255, 255, 255, 0.15); }

.zpack-art {
  position: absolute;
  inset: 7.5% 4%;
  overflow: hidden;
  border-radius: 2.4cqw;
  background: #0a1a6b;
}
/* the frame and the top/bottom shading sit over the art */
.zpack-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1cqw var(--edge),
    inset 0 0 0 1.8cqw rgba(0, 0, 0, 0.4),
    inset 0 28cqw 22cqw -12cqw rgba(3, 10, 44, 0.8),
    inset 0 -26cqw 20cqw -12cqw rgba(3, 10, 44, 0.8);
}
/* demo art: pixel ZAZA on a burst of the card type's colour */
.zpack-px { background: radial-gradient(circle at 50% 52%, color-mix(in srgb, var(--a) 60%, #fff) 0%, var(--a) 28%, var(--b) 88%); }
.zpack-px::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(rgba(255, 255, 255, 0.24) 0.8cqw, transparent 1.2cqw) 0 0 / 5.4cqw 5.4cqw,
    repeating-conic-gradient(from 0deg at 50% 52%, rgba(255, 255, 255, 0.14) 0deg 7deg, rgba(255, 255, 255, 0) 7deg 20deg);
  -webkit-mask: radial-gradient(circle at 50% 52%, #000 18%, transparent 78%);
  mask: radial-gradient(circle at 50% 52%, #000 18%, transparent 78%);
}
.zpack-px img {
  position: absolute;
  left: 50%;
  top: 54%;
  z-index: 1;
  width: 94%;
  max-width: none;
  translate: -50% -50%;
  image-rendering: pixelated;
  filter: drop-shadow(0 1.4cqw 0 rgba(0, 0, 0, 0.3));
}
/* real art: electric lightning around a mystery graded slab */
.zpack-realart { background: radial-gradient(70% 55% at 50% 52%, color-mix(in srgb, var(--acc) 40%, #140a02) 0%, #0b0705 55%, #030303 100%); }
.zpack-realart::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(color-mix(in srgb, var(--acc) 30%, transparent) 0.8cqw, transparent 1.2cqw) 0 0 / 5cqw 5cqw;
  -webkit-mask: radial-gradient(circle at 50% 52%, transparent 20%, #000 80%);
  mask: radial-gradient(circle at 50% 52%, transparent 20%, #000 80%);
}
.zp-bolts {
  position: absolute;
  inset: 5% 0 0;
  z-index: 0;
  width: 100%;
  height: 92%;
  fill: var(--acc);
  filter: drop-shadow(0 0 1.6cqw var(--acc)) drop-shadow(0 0 5cqw color-mix(in srgb, var(--acc) 60%, transparent));
}
/* the mystery graded slab: glassy case, grading label, a gold-framed holo card with a glowing "?" */
.zp-slab {
  position: absolute;
  left: 52%;
  top: 52%;
  z-index: 1;
  display: grid;
  grid-template-rows: 19% 1fr;
  gap: 1.3cqw;
  width: 43%;
  aspect-ratio: 0.62;
  padding: 1.7cqw;
  translate: -50% -50%;
  rotate: -5deg;
  border-radius: 3cqw;
  background: linear-gradient(150deg, #fbfcff 0%, #d5dcea 34%, #f4f7fc 52%, #b9c3d6 78%, #e9edf5 100%);
  box-shadow:
    inset 0 0 0 0.5cqw rgba(255, 255, 255, 0.95),
    inset 0 0 0 0.9cqw rgba(110, 125, 155, 0.35),
    0 0 0 0.45cqw rgba(0, 0, 0, 0.55),
    0 2.4cqw 4cqw rgba(0, 0, 0, 0.6),
    0 0 10cqw color-mix(in srgb, var(--acc) 65%, transparent);
}
/* glare across the case */
.zp-slab::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: linear-gradient(118deg, transparent 22%, rgba(255, 255, 255, 0.6) 30%, transparent 38%, transparent 62%, rgba(255, 255, 255, 0.28) 66%, transparent 71%);
  pointer-events: none;
}
.zp-label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1cqw;
  padding: 0.6cqw 1cqw 0.6cqw 1.3cqw;
  border-top: 1.3cqw solid #d8302a;
  border-radius: 1cqw;
  background: #fff;
  box-shadow: inset 0 -0.3cqw 0 rgba(0, 0, 0, 0.08);
}
.zp-label em {
  height: 100%;
  background:
    linear-gradient(#2c3140, #2c3140) 0 22% / 72% 0.8cqw no-repeat,
    linear-gradient(#8a90a0, #8a90a0) 0 52% / 50% 0.7cqw no-repeat,
    repeating-linear-gradient(90deg, #22252f 0 0.45cqw, transparent 0.45cqw 0.9cqw) 0 88% / 44% 1.6cqw no-repeat;
}
.zp-label s {
  display: grid;
  place-items: center;
  width: 6.4cqw;
  aspect-ratio: 1;
  border-radius: 1.2cqw;
  background: linear-gradient(180deg, #ffe066, #e8b52a);
  box-shadow: inset 0 0 0 0.35cqw #fff3b0, 0 0.4cqw 0 #8a6410;
  color: #06124f;
  font: 400 4.6cqw / 1 "Titan One", "Arial Black", sans-serif;
  text-decoration: none;
}
.zp-card {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 1.6cqw;
  background:
    radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--acc) 55%, #1b1240) 0%, #120c33 48%, #07051a 100%);
  box-shadow: inset 0 0 0 0.7cqw #ffd23f, inset 0 0 0 1.1cqw #07051a, inset 0 0 6cqw rgba(0, 0, 0, 0.55);
}
/* star-dust pattern and a moving holo shimmer */
.zp-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(rgba(255, 255, 255, 0.5) 0.35cqw, transparent 0.6cqw) 0 0 / 5cqw 5cqw,
    repeating-conic-gradient(from 0deg at 50% 46%, color-mix(in srgb, var(--acc) 30%, transparent) 0deg 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle at 50% 46%, #000 25%, transparent 78%);
  mask: radial-gradient(circle at 50% 46%, #000 25%, transparent 78%);
  opacity: 0.8;
}
.zp-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 25%, rgba(255, 70, 190, 0.55) 38%, rgba(70, 210, 255, 0.55) 50%, rgba(255, 230, 70, 0.55) 62%, transparent 75%) 130% 0 / 260% 100% no-repeat;
  mix-blend-mode: color-dodge;
  opacity: 0.45;
  animation: zpackSheen 5s ease-in-out infinite;
}
.zp-card b {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58%;
  aspect-ratio: 1;
  border: 0.8cqw solid var(--acc);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--acc) 40%, #231a4d), #0b0822 75%);
  box-shadow: 0 0 4cqw var(--acc), inset 0 0 3cqw color-mix(in srgb, var(--acc) 50%, transparent);
  color: #fff;
  font: 400 12.5cqw / 1 "Titan One", "Arial Black", sans-serif;
  text-shadow: 0 0 3cqw var(--acc), 0 0.7cqw 0 #000;
}

/* plastic: side shading, a gloss streak and a crease */
.zpack-shade {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0) 11%, rgba(255, 255, 255, 0) 16%, rgba(255, 255, 255, 0.2) 21%, rgba(255, 255, 255, 0) 27%, rgba(0, 0, 0, 0) 89%, rgba(0, 0, 0, 0.42)),
    linear-gradient(176deg, rgba(255, 255, 255, 0) 33%, rgba(255, 255, 255, 0.12) 34%, rgba(255, 255, 255, 0) 36%),
    linear-gradient(8deg, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.12) 71%, rgba(255, 255, 255, 0.08) 72%, rgba(0, 0, 0, 0) 74%);
}
/* holographic shimmer (follows the pointer on the /hunt/ page via --sx) */
.zpack-holo,
.zpack-sheen {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background-size: 260% 100%;
  background-position: var(--sx, 130%) 0;
  animation: zpackSheen 6s ease-in-out infinite;
}
.zpack-holo {
  background-image: linear-gradient(115deg, transparent 25%, rgba(255, 70, 190, 0.5) 38%, rgba(70, 210, 255, 0.5) 50%, rgba(255, 230, 70, 0.5) 62%, transparent 75%);
  mix-blend-mode: color-dodge;
  opacity: 0.3;
}
.zpack--real .zpack-holo { opacity: 0.45; }
.zpack-sheen { background-image: linear-gradient(115deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0) 56%); mix-blend-mode: soft-light; }
@keyframes zpackSheen {
  0%, 55% { background-position: 130% 0; }
  85%, 100% { background-position: -30% 0; }
}
.zpack-tear { position: absolute; left: 7%; right: 7%; top: 9.2%; z-index: 5; border-top: 0.5cqw dashed rgba(255, 255, 255, 0.4); pointer-events: none; }

.zpack-logo {
  position: absolute;
  top: 12%;
  left: 0;
  right: 0;
  z-index: 6;
  display: grid;
  justify-items: center;
  gap: 1.6cqw;
  pointer-events: none;
}
.zpack-logo b {
  font-family: "Titan One", "Arial Black", sans-serif;
  font-weight: 400;
  font-size: 12.6cqw;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0.7cqw 0 0 #000a2e, -0.7cqw 0 0 #000a2e, 0 0.7cqw 0 #000a2e, 0 -0.7cqw 0 #000a2e, 0 1.8cqw 0 #000a2e, 0 0 6cqw rgba(0, 0, 0, 0.55);
}
.zpack-logo b i { font-style: normal; color: #ffd23f; }
.zpack-logo small {
  padding: 0.6cqw 3.4cqw 0.9cqw;
  border: 0.5cqw solid color-mix(in srgb, var(--edge) 70%, transparent);
  border-radius: 99px;
  background: rgba(3, 10, 44, 0.72);
  color: var(--edge);
  font-family: "Jersey 10", ui-monospace, monospace;
  font-size: 7.6cqw;
  line-height: 1;
  letter-spacing: 0.16em;
  white-space: nowrap;
}
/* the $CARDS mark: small in the label, and a sticker on the slab's corner */
.zp-cards-badge {
  position: absolute;
  left: 28%;
  top: 36%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 23cqw;
  aspect-ratio: 1;
  translate: -50% -50%;
  rotate: -10deg;
  border-radius: 50%;
  box-shadow: 0 0 0 0.6cqw rgba(255, 255, 255, 0.8), 0 1.2cqw 0 0.6cqw #000a2e, 0 0 7cqw rgba(91, 234, 255, 0.7), 0 0 14cqw rgba(255, 124, 1, 0.4);
  pointer-events: none;
  animation: zpCardsPop 2.4s ease-in-out infinite;
}
/* a spinning ring in the $CARDS colours around a white disc */
.zp-cards-badge::before,
.zp-cards-badge::after { content: ""; position: absolute; border-radius: 50%; }
.zp-cards-badge::before { inset: 0; background: conic-gradient(#ff7c01, #ffd23f, #5beaff, #0483ff, #e35200, #ff7c01); animation: zpCardsSpin 4s linear infinite; }
.zp-cards-badge::after { inset: 1.4cqw; border: 0.8cqw solid #06124f; background: radial-gradient(circle at 35% 28%, #ffffff, #eef6ff 55%, #bcd6f2); box-shadow: inset 0 -1.2cqw 0 rgba(6, 18, 79, 0.12); }
.zp-cards { position: relative; z-index: 1; width: auto; height: 12.5cqw; filter: drop-shadow(0 0.7cqw 0 rgba(6, 18, 79, 0.3)) drop-shadow(0 0 2cqw rgba(91, 234, 255, 0.6)); }
@keyframes zpCardsSpin { to { rotate: 360deg; } }
@keyframes zpCardsPop { 0%, 100% { scale: 1; } 50% { scale: 1.05; } }
.zpack-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 21%;
  z-index: 6;
  color: #fff;
  font-family: "Jersey 10", ui-monospace, monospace;
  font-size: 7.6cqw;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0.6cqw 0 #000, 0 0 3cqw #000;
  pointer-events: none;
}
.zpack-seal {
  position: absolute;
  bottom: 10%;
  left: 50%;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 1.6cqw;
  translate: -50% 0;
  padding: 1.2cqw 5cqw 1.4cqw;
  border: 0.9cqw solid #3a2a00;
  border-radius: 99px;
  background: linear-gradient(180deg, #ffe066, #e8b52a);
  box-shadow: inset 0 0 0 0.5cqw #fff3b0, 0 1.4cqw 0 #8a6410, 0 3cqw 5cqw rgba(0, 0, 0, 0.45);
  color: #06124f;
  font-family: "Titan One", "Arial Black", sans-serif;
  font-size: 8.4cqw;
  line-height: 1.1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
}
.zpack-seal svg { width: 5cqw; height: auto; fill: #06124f; }

/* a pack that's being opened for its finder */
.zpack.is-opening { animation: zpackShake 1.1s ease-in-out infinite; }
@keyframes zpackShake {
  0%, 60%, 100% { transform: rotate(0); }
  66% { transform: rotate(-4deg); }
  74% { transform: rotate(4deg); }
  82% { transform: rotate(-3deg); }
  90% { transform: rotate(2deg); }
}

/* ---------- Reveal overlay ---------- */
html.zrv-lock { overflow: hidden; }
.zrv {
  --rc: #ffd23f; /* rarity colour */
  --ui: "Jersey 10", ui-monospace, monospace;
  --display: "Titan One", "Arial Black", system-ui, sans-serif;
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: var(--ui);
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: #f1ecd8;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.zrv.is-in { opacity: 1; }
.zrv.r-common { --rc: #5fe86f; }
.zrv.r-uncommon { --rc: #7fd4ff; }
.zrv.r-rare { --rc: #ffd23f; }
.zrv.r-epic { --rc: #c08aff; }

.zrv-bg { position: absolute; inset: 0; background: radial-gradient(90% 70% at 50% 42%, #1d3fd8 0%, #0a1a6b 45%, #030a2c 100%); }
.zrv-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(127, 212, 255, 0.14) 1.2px, transparent 1.7px);
  background-size: 16px 16px;
  -webkit-mask: radial-gradient(ellipse at 50% 45%, transparent 25%, #000 80%);
  mask: radial-gradient(ellipse at 50% 45%, transparent 25%, #000 80%);
}
.zrv-rays {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 240vmax;
  height: 240vmax;
  translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 63, 0.11) 0deg 5deg, rgba(255, 210, 63, 0) 5deg 16deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.5) 18%, transparent 40%);
  mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.5) 18%, transparent 40%);
  animation: zrvSpin 50s linear infinite;
}
@keyframes zrvSpin { to { rotate: 360deg; } }
.zrv-px { position: absolute; width: 12px; height: 12px; background: #ffd23f; clip-path: polygon(40% 0, 60% 0, 60% 40%, 100% 40%, 100% 60%, 60% 60%, 60% 100%, 40% 100%, 40% 60%, 0 60%, 0 40%, 40% 40%); animation: zrvTwinkle 2.4s ease-in-out infinite; }
.zrv-px.a { left: 18%; top: 22%; }
.zrv-px.b { right: 20%; top: 18%; background: #7fd4ff; animation-delay: 0.7s; }
.zrv-px.c { right: 14%; top: 64%; width: 16px; height: 16px; animation-delay: 1.3s; }
.zrv-px.d { left: 12%; top: 70%; background: #7fd4ff; width: 9px; height: 9px; animation-delay: 1.9s; }
@keyframes zrvTwinkle { 0%, 100% { opacity: 0.15; scale: 0.6; } 50% { opacity: 1; scale: 1; } }

.zrv-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }

.zrv-top {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.zrv-who {
  min-width: 0;
  padding: 5px 14px;
  border: 1px solid #3b4c80;
  border-radius: 99px;
  background: rgba(3, 10, 44, 0.75);
  color: #f1ecd8;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zrv-who b { color: #ffd23f; font-weight: 400; }
.zrv-skip {
  flex: none;
  min-height: 38px;
  padding: 6px 16px;
  border: 1px solid #3b4c80;
  border-radius: 12px;
  background: rgba(20, 30, 82, 0.85);
  color: #f1ecd8;
  font: 400 19px var(--ui);
  cursor: pointer;
}
.zrv-skip:active { transform: scale(0.95); }

.zrv-main {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 5vw, 72px);
  width: 100%;
  height: 100%;
  padding: 64px 16px 24px;
}
.zrv-stage { position: relative; display: grid; justify-items: center; gap: 10px; }

.zrv-reels { display: flex; gap: clamp(22px, 5vw, 52px); min-height: 76px; transition: opacity 0.3s; }
.zrv.is-done .zrv-reels { opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0s 0.3s; }
.zrv-reel { display: grid; justify-items: center; gap: 0; opacity: 0; transform: translateY(8px) scale(0.9); transition: opacity 0.25s, transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.zrv-reel.is-on { opacity: 1; transform: none; }
.zrv-reel label { color: #a9b3d6; font-size: 17px; letter-spacing: 0.16em; text-transform: uppercase; }
.zrv-win { --h: 50px; height: var(--h); overflow: hidden; }
.zrv-strip { display: grid; will-change: transform; }
.zrv-strip span {
  display: block;
  height: var(--h);
  line-height: var(--h);
  text-align: center;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 2.3rem;
  color: #fff;
  text-shadow: 0 3px 0 #000a2e, 0 0 18px rgba(127, 212, 255, 0.4);
}
.zrv-reel[data-k="grade"] .zrv-strip span { color: #ffd23f; text-shadow: 0 3px 0 #8a6410, 0 6px 0 #000a2e; }
.zrv-reel[data-k="rarity"] .zrv-win { --h: 60px; }
.zrv-reel[data-k="rarity"] .zrv-strip span { font-size: 2.9rem; text-shadow: 0 4px 0 #000a2e, 0 0 24px currentColor; }
.zrv-strip span.t-common { color: #5fe86f; }
.zrv-strip span.t-uncommon { color: #7fd4ff; }
.zrv-strip span.t-rare { color: #ffd23f; }
.zrv-strip span.t-epic { color: #c08aff; }
.zrv-reel.is-landed { animation: zrvLand 0.45s cubic-bezier(0.3, 1.8, 0.5, 1); }
@keyframes zrvLand { 0% { transform: scale(1.22); } 100% { transform: scale(1); } }

.zrv-center {
  --ch: min(52vh, 460px);
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--ch) * 0.62);
  height: var(--ch);
  perspective: 1200px;
}
.zrv-center::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5%;
  z-index: 0;
  width: 150%;
  height: 16%;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 40%, transparent), rgba(29, 75, 255, 0.25) 60%, transparent);
  border: 2px solid rgba(127, 212, 255, 0.22);
}
.zrv-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 200%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--rc) 55%, transparent) 0%, color-mix(in srgb, var(--rc) 22%, transparent) 32%, transparent 62%),
    repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 30%, transparent) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%);
  mask: radial-gradient(circle, #000 18%, transparent 66%);
  opacity: 0;
  scale: 0.4;
  transition: opacity 0.4s, scale 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
  animation: zrvSpin 22s linear infinite;
}
.zrv-burst.is-on { opacity: 1; scale: 1; }

.zrv-packwrap { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; }
.zrv-packwrap .zpack { position: absolute; width: 100%; filter: drop-shadow(0 22px 26px rgba(0, 4, 24, 0.6)); }
.zrv-packwrap.is-spinning { animation: zrvPackSpin 1.2s linear infinite; }
@keyframes zrvPackSpin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
.zrv-packwrap.is-charging { animation: zrvCharge 0.5s ease-in-out infinite; }
@keyframes zrvCharge {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(-3px, 1px) rotate(-1.5deg); }
  75% { transform: translate(3px, -1px) rotate(1.5deg); }
}
.zrv-flash { position: absolute; inset: 0; z-index: 7; background: #fff; opacity: 0; pointer-events: none; }

.zrv-card { position: absolute; z-index: 2; width: 100%; height: 100%; opacity: 0; transform: translateY(26%) scale(0.84); }
.zrv-card-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(180deg); }
.zrv-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #070b1c;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rc) 65%, #fff), 0 26px 60px rgba(0, 4, 24, 0.6), 0 0 90px color-mix(in srgb, var(--rc) 45%, transparent);
}
.zrv-face img { width: 100%; height: 100%; object-fit: contain; }
.zrv-face.back { transform: rotateY(180deg); }
.zrv-face.is-fallback { display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, #1d4bff, #0a1a6b 70%); }
.zrv-face.is-fallback img { width: 58%; height: auto; object-fit: contain; }
.zrv-face.is-fallback p { position: absolute; bottom: 10%; left: 8%; right: 8%; margin: 0; color: #fff; font: 400 1.1rem/1.2 var(--display); text-align: center; }
.zrv-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 12px;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.7) 48%, transparent 60%);
  background-size: 300% 100%;
  background-position: 120% 0;
  mix-blend-mode: soft-light;
}
.zrv-shine.is-on { animation: zrvShine 1.1s ease-out forwards; }
@keyframes zrvShine { to { background-position: -40% 0; } }

.zrv-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin: 0;
  padding: 4px 16px;
  border: 1px solid rgba(255, 210, 63, 0.35);
  border-radius: 99px;
  background: rgba(3, 10, 44, 0.7);
  color: #f1ecd8;
  font-size: 19px;
  transition: opacity 0.3s;
}
.zrv-status.is-off { opacity: 0; }
.zrv-status i { width: 14px; height: 14px; border-radius: 50%; border: 3px solid #ffd23f; border-right-color: transparent; animation: zrvSpin 0.8s linear infinite; }

.zrv-banner {
  position: absolute;
  bottom: calc(100% - 80px); /* sits where the top reels were */
  left: 50%;
  z-index: 7;
  display: grid;
  justify-items: center;
  gap: 4px;
  translate: -50% 0;
  pointer-events: none;
  opacity: 0;
  scale: 0.3;
}
.zrv-banner b {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  line-height: 1;
  color: #ffd23f;
  white-space: nowrap;
  text-shadow: 0 4px 0 #8a6410, 0 8px 0 #000a2e, 0 0 30px rgba(255, 210, 63, 0.45);
}
.zrv-banner span { font-size: clamp(19px, 2.4vw, 23px); color: #fff; white-space: nowrap; text-shadow: 0 2px 0 #000a2e; }
.zrv-banner span em { color: var(--rc); font-style: normal; }

.zrv-panel {
  position: relative;
  z-index: 5;
  width: min(380px, 100%);
  padding: 18px;
  border: 1px solid #2c3b78;
  border-radius: 18px;
  background: linear-gradient(180deg, #1a2663, #141e52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 50px rgba(0, 4, 24, 0.5);
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
  transition: opacity 0.45s, transform 0.55s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.zrv:not(.is-done) .zrv-panel { position: absolute; }
.zrv.is-done .zrv-panel { opacity: 1; transform: none; pointer-events: auto; }
.zrv-kicker { margin: 0; color: #a9b3d6; font-size: 17px; letter-spacing: 0.1em; text-transform: uppercase; }
.zrv-kicker b { color: #ffd23f; font-weight: 400; }
.zrv-name { margin: 4px 0 2px; font: 400 1.5rem/1.12 var(--display); color: #fff; overflow-wrap: anywhere; }
.zrv-set { margin: 0; color: #a9b3d6; font-size: 18px; }
.zrv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.zrv-chip { --c: #a9b3d6; display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 99px; font-size: 17px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); white-space: nowrap; }
.zrv-chip.is-rarity { --c: var(--rc); }
.zrv-rows { display: grid; margin: 0 0 14px; }
.zrv-rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(59, 76, 128, 0.55); }
.zrv-rows div:last-child { border-bottom: 0; }
.zrv-rows dt { color: #a9b3d6; font-size: 18px; }
.zrv-rows dd { margin: 0; font-size: 19px; text-align: right; color: #f1ecd8; }
.zrv-rows dd span { color: #a9b3d6; }
.zrv-rows dd.is-value { font: 400 1.6rem var(--display); line-height: 1; color: #ffd23f; }
.zrv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zrv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #3b4c80;
  border-radius: 12px;
  background: rgba(3, 10, 44, 0.55);
  color: #f1ecd8;
  font: 400 19px var(--ui);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.zrv-btn.is-gold { font-family: var(--display); font-size: 16px; letter-spacing: 0.02em; color: #06124f; border: 2px solid #3a2a00; background: linear-gradient(180deg, #ffe066, #e8b52a); box-shadow: inset 0 0 0 1px #fff3b0, 0 3px 0 #8a6410; }
.zrv-btn.is-wide { grid-column: 1 / -1; }
.zrv-btn:hover { filter: brightness(1.08); }
.zrv-btn:active { transform: translateY(2px); }

.zrv-zaza {
  position: absolute;
  left: max(8px, 3vw);
  bottom: -4px;
  z-index: 7;
  width: clamp(96px, 15vw, 160px);
  image-rendering: pixelated;
  transform: translateY(110%);
  pointer-events: none;
}
.zrv-zaza.is-on { animation: zrvZaza 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) forwards, zrvBob 1.6s 0.7s ease-in-out infinite; }
@keyframes zrvZaza { to { transform: translateY(0); } }
@keyframes zrvBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.zrv-zap {
  position: absolute;
  left: calc(max(8px, 3vw) + clamp(80px, 12.5vw, 132px));
  bottom: clamp(92px, 14vw, 150px);
  z-index: 7;
  padding: 2px 12px 4px;
  border: 2px solid #3a2a00;
  border-radius: 12px 12px 12px 2px;
  background: linear-gradient(180deg, #ffe066, #e8b52a);
  box-shadow: inset 0 0 0 1px #fff3b0, 0 3px 0 #8a6410;
  color: #06124f;
  font: 400 1.15rem var(--display);
  opacity: 0;
  scale: 0.2;
  transition: opacity 0.2s 0.5s, scale 0.35s 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
  pointer-events: none;
}
.zrv.is-done .zrv-zap { opacity: 1; scale: 1; }

/* phones: card on top, details below */
@media (max-width: 820px) {
  .zrv-main { flex-direction: column; justify-content: flex-start; gap: 14px; padding-top: 66px; overflow-y: auto; }
  .zrv:not(.is-done) .zrv-main { justify-content: center; }
  .zrv.is-done .zrv-center { --ch: min(40vh, 360px); }
  .zrv-panel { transform: translateY(40px); }
  .zrv.is-done .zrv-reels, .zrv.is-done .zrv-status, .zrv.is-done .zrv-banner { display: none; }
  .zrv-banner { bottom: calc(100% - 66px); }
  .zrv-strip span { font-size: 1.9rem; }
  .zrv-reel[data-k="rarity"] .zrv-strip span { font-size: 2.3rem; }
  .zrv-win { --h: 42px; }
  .zrv-reel[data-k="rarity"] .zrv-win { --h: 50px; }
  .zrv-reels { min-height: 62px; }
  .zrv-zaza, .zrv-zap { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .zrv-rays, .zrv-burst, .zpack-sheen, .zpack-holo, .zpack.is-opening, .zp-cards-badge, .zp-cards-badge::before, .zp-card::after, .zrv-zaza.is-on, .zrv-packwrap, .zrv-px { animation: none !important; }
  .zrv-zaza.is-on { transform: none; }
}

/* Share on X (the picture rides along as the link's preview card) */
.zrv-share { margin-top: 8px; display: grid; }
.zrv-share .zrv-btn:disabled { opacity: 0.65; cursor: progress; }
.zrv-share-note { margin: 6px 2px 0; font-size: 16px; color: #a9b3d6; }
