:root {
  color-scheme: dark;
  --canvas:var(--fist-ink,#101922);
  --panel:var(--fist-surface,#181d25);
  --cream:var(--fist-cream,#fff4df);
  --muted:var(--fist-muted,#aab6c1);
  --gold:var(--fist-gold,#f0bd31);
  --line:var(--fist-line,#384651);
  --control-radius:var(--fist-control-radius,8px);
  --ease:cubic-bezier(.22,.75,.22,1);
  --mono:"DM Mono", monospace;
  --display:"Archivo Black",sans-serif;
  --foil-atlas:url("assets/studio/front-single.webp");
  --foil-reflections:url("../assets/studio/foil-reflections-v1.webp");
  --foil-display-ratio:3 / 5;
  font-family:Inter,sans-serif;
  color:var(--cream);
  background:#111214;
}
* { box-sizing:border-box; }
body {
  --fist-ink:#111214;
  --fist-surface:#18191c;
  --fist-cream:#f1f2f3;
  --fist-line:#33363b;
  --fist-muted:#aeb2b8;
  --canvas:var(--fist-ink);
  --panel:var(--fist-surface);
  --line:var(--fist-line);
  --muted:var(--fist-muted);
  --cream:var(--fist-cream);
  --interface-accent:#e2e4e7;
  --action:#eef0f2;
  --action-hover:#fff;
  --on-action:#15171a;
  margin:0;
  min-width:0;
  background:radial-gradient(ellipse at 38% -16%,#222429,transparent 58%),var(--canvas);
  color:var(--cream);
}
button { color:inherit; font-family:inherit; }
button,a,label { -webkit-tap-highlight-color:transparent; }
button:disabled { cursor:default; }
a { color:inherit; text-decoration:none; }
img { display:block; }
button:focus-visible,a:focus-visible, select:focus-visible, input:focus-visible + span { outline:2px solid var(--interface-accent); outline-offset:4px; }
h1,h2,h3,p,dl,dd { margin:0; }
.wrap { width:min(1320px,calc(100% - 112px)); margin-inline:auto; }
#opening { scroll-margin-top:76px; }
.sr-only { position:absolute; width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0; }
.topbar { min-height:68px; display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:9px; font-family:var(--display); font-size:22px; letter-spacing:.12em; }
.brand img { width:32px; height:32px; object-fit:contain; }
nav { display:flex; gap:26px; height:68px; align-items:center; color:var(--muted); font-size:13px; font-weight:600; }
nav a { position:relative; height:100%; display:grid; align-items:center; }
nav a.current { color:var(--cream); }
nav a.current::after { content:""; background:var(--interface-accent); height:2px; position:absolute; inset:auto 0 0; }
.opening-header-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; color:var(--muted); }
.opening-header-actions .opening-theme-moon,
html[data-theme="light"] .opening-header-actions .opening-theme-sun { display:none; }
html[data-theme="light"] .opening-header-actions .opening-theme-moon { display:block; }
.opening-sound:not([hidden]) {
  display:inline-grid;
  place-items:center;
  flex:none;
  width:40px;
  min-height:40px;
  padding:0;
  border:1px solid var(--line);
  border-radius:50%;
  background:var(--panel);
  color:var(--cream);
  cursor:pointer;
}
.opening-sound:hover { border-color:var(--muted); }
.opening-sound svg { width:20px; height:20px; }
.opening-sound[aria-pressed="false"] [data-sound-on],
.opening-sound[aria-pressed="true"] [data-sound-off] { display:none; }
@media (max-width:440px) {
  header.topbar { grid-template-columns:auto minmax(0,1fr) auto; }
  .mobile-page-title {
    justify-self:center;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
  }
}
@media (max-width:360px) {
  .opening-sound { width:36px; }
}

.stage-meta i { display:inline-block; width:6px; height:6px; background:var(--interface-accent); border-radius:50%; margin-right:5px; vertical-align:1px; }
.hero-copy {
  display:grid;
  align-items:end;
  grid-template-columns:minmax(0,1fr) minmax(180px,245px);
  gap:12px 30px;
  padding:clamp(24px,3.1vw,40px) 0 22px;
}
h1 { font:750 clamp(32px,4.1vw,61px)/1.05 Inter,system-ui,sans-serif; letter-spacing:-.06em; color:var(--cream); }
.hero-deck {
  border-inline-start:1px solid var(--line);
  padding-inline-start:14px;
  padding-block:2px;
  font-size:13px;
  line-height:1.5;
  color:var(--muted);
  text-wrap:pretty;
}
.opening-layout {
  --opening-inner-radius:15px;
  display:grid;
  grid-template-columns:minmax(0,1fr) clamp(270px,33%,375px);
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel);
  box-shadow:0 20px 60px #03070d66;
}
#stage {
  --stage-accent:#ffe08e;
  --card-w:clamp(111px,15vw,194px);
  --left:-24%; --right:24%;
  --stage-bg:#141518;
  --stage-wash:#3a3d43;
  --stage-floor:#1a1c20;
  --stage-rule:#a4a9b240;
  --stage-light:#e1e6ef19;
  --stage-glass:#666d7663;
  --stage-plinth-edge:#cbd0d47a;
  --stage-plinth-face:#35393e;
  --stage-plinth-shadow:#07080ac9;
  --stage-min-height:clamp(472px,40vw,552px);
  --pack-width:clamp(153px,16.2vw,186px);
  --pack-center:43%;
  --stage-ink:#f0f1f3;
  --stage-muted:#babdc5;
  --stage-control:#212327;
  --stage-control-hover:#303236;
  position:relative;
  min-height:var(--stage-min-height);
  overflow:hidden;
  isolation:isolate;
  --cream:var(--stage-ink);
  --muted:var(--stage-muted);
  --line:var(--stage-rule);
  --panel:var(--stage-control);
  --canvas:var(--stage-bg);
  color:var(--stage-ink);
  color-scheme:dark;
  border-radius:var(--opening-inner-radius) 0 0 0;
  background:
    radial-gradient(ellipse at 50% 68%,color-mix(in srgb,var(--stage-accent) 16%,transparent),transparent 45%),
    linear-gradient(112deg,transparent 23%,var(--stage-light) 46%,transparent 62%),
    radial-gradient(ellipse at 50% 53%,var(--stage-wash),transparent 66%),
    linear-gradient(180deg,var(--stage-bg),var(--stage-floor));
}
.stage-plinth {
  position:absolute;
  left:50%;
  top:77%;
  width:min(60%,328px);
  height:clamp(22px,3.3vw,40px);
  translate:-50% 0;
  pointer-events:none;
  filter:drop-shadow(0 13px 17px var(--stage-plinth-shadow));
  transition:opacity .36s var(--ease), translate .5s var(--ease);
}
.stage-plinth::before,.stage-plinth::after {
  content:"";
  position:absolute;
}
.stage-plinth::before {
  inset:0 0 7px;
  background:
    radial-gradient(ellipse at 50% 74%,color-mix(in srgb,var(--stage-accent) 31%,transparent),transparent 45%),
    radial-gradient(ellipse at 50% 75%,var(--stage-plinth-shadow),transparent 60%),
    linear-gradient(180deg,var(--stage-glass),var(--stage-plinth-face));
  clip-path:polygon(14% 0,86% 0,100% 100%,0 100%);
}
.stage-plinth::after {
  inset:auto 0 0;
  height:7px;
  border-top:1px solid var(--stage-plinth-edge);
  border-radius:0 0 4px 4px;
  background:var(--stage-plinth-face);
}
.stage-meta,.stage-bottom { position:absolute; z-index:5; left:23px; right:23px; display:flex; align-items:center; justify-content:space-between; gap:9px; }
.stage-meta { top:21px; color:var(--stage-muted); font:500 10px/1.2 var(--mono); letter-spacing:.15em; }
#stage-progress { color:var(--stage-muted); letter-spacing:.1em; }
#stage[data-phase="sealed"] { touch-action:pan-y pinch-zoom; }
#stage[data-phase="sealed"] #stage-progress { visibility:hidden; }
.stage-pack-neighbor,.stage-pack-button,#stage-pack-selection { display:none; }
#stage[data-phase="sealed"] .stage-pack-button {
  position:absolute; top:48%; z-index:4; display:grid; place-items:center;
  width:44px; height:44px; padding:0; translate:0 -50%;
  border:1px solid var(--stage-rule);
  border-radius:10px;
  background:var(--stage-control); color:var(--stage-ink); cursor:pointer;
}
#previous-pack { left:22px; }
#next-pack { right:22px; }
.stage-pack-button svg { width:20px; height:20px; }
.stage-pack-button:hover:not(:disabled) { border-color:var(--stage-muted); background:var(--stage-control-hover); }
.stage-pack-button:disabled { opacity:.55; cursor:default; }
#stage :focus-visible { outline-color:var(--stage-ink); }
#stage[data-phase="sealed"] #stage-pack-selection {
  position:absolute; z-index:5; right:23px; top:21px; display:block;
  max-width:52%; color:var(--stage-ink);
  font:500 11px/1.3 var(--mono); letter-spacing:.045em; text-align:right;
  pointer-events:none;
}
.stage-draw-summary {
  position:absolute; z-index:4; top:21px; left:50%; translate:-50% 0;
  color:var(--stage-ink); white-space:nowrap; pointer-events:none;
  font:500 11px/1.3 var(--mono);
}
.stage-bottom { bottom:16px; }
#stage-status { color:var(--stage-muted); font:400 11px/1.35 var(--mono); }
#skip-batch:not([hidden]) { min-height:36px; padding:8px 10px; border:1px solid var(--stage-rule); border-radius:6px; background:var(--stage-control); color:var(--stage-ink); cursor:pointer; white-space:nowrap; font-size:12px; font-weight:650; }
#skip-batch:hover { border-color:var(--stage-muted); }

.foil {
  --seal-cut:8.3%;
  width:var(--pack-width); aspect-ratio:var(--foil-display-ratio);
  position:absolute; left:50%; top:var(--pack-center); z-index:3;
  translate:-50% -50%; rotate:-2deg; transform-origin:center;
  filter:drop-shadow(0 0 .55px var(--foil-light, #ffe08e)) drop-shadow(7px 15px 14px #000b);
  transition:scale .44s var(--ease), translate .52s var(--ease), rotate .52s var(--ease), opacity .34s ease;
  animation:foil-idle 5.2s ease-in-out infinite;
}
#stage[data-phase="sealed"] .foil {
  translate:calc(-50% + var(--pack-drag-offset,0px)) -50%;
}
#stage[data-phase="sealed"][data-pack-dragging] .foil { transition-property:scale,rotate,opacity; }
#stage[data-phase="sealed"][data-pack-dragging] :is(.stage-pack-neighbor,.foil-glint) { transition:none; }
@keyframes foil-idle { 50% { transform:translateY(-5px) rotate(1.4deg); } }
.foil-stack,.foil-stack > span,.foil-body,.foil-cap,.foil-glint { position:absolute; inset:0; pointer-events:none; }
.foil-stack { z-index:-1; }
.foil-stack > span {
  background:var(--foil-atlas) var(--foil-position) / var(--foil-size) no-repeat;
  filter:brightness(.89) drop-shadow(0 0 .7px var(--foil-light));
  opacity:0;
  transform:scale(.88);
  transition:transform .26s var(--ease), opacity .2s ease;
}
.foil-stack > [data-visible] {
  opacity:1;
  transform:translate(calc(var(--stack-x) * var(--stack-spread,1)),var(--stack-y)) rotate(calc(var(--stack-angle) * var(--stack-turn,1))) scale(.88);
}
#stage:not(:is([data-phase="sealed"],[data-phase="batch-opening"])) .foil-stack { visibility:hidden; }
.foil-body,.foil-cap {
  background:var(--foil-atlas) var(--foil-position) / var(--foil-size) no-repeat;
  filter:brightness(1.05) saturate(1.06);
}
.foil-body { clip-path:inset(7.8% 0 0); }
.foil-cap { clip-path:inset(0 0 91.4%); transition:transform .53s var(--ease),opacity .43s ease; }
.foil-body::after,.foil-cap::after,.foil-stack > span::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:
    linear-gradient(90deg,color-mix(in srgb,var(--foil-light) 60%,transparent),transparent 3.5% 96.5%,color-mix(in srgb,var(--foil-light) 60%,transparent)),
    var(--foil-reflections) center / 100% 100% no-repeat;
  background-blend-mode:screen;
  mask:var(--foil-atlas) var(--foil-position) / var(--foil-size) no-repeat;
  mix-blend-mode:screen;
  opacity:.59;
}
.foil-stack > span::after { opacity:.32; }
.foil-glint {
  clip-path:inset(8.7% 0 6%);
  mask:var(--foil-atlas) var(--foil-position) / var(--foil-size) no-repeat;
  opacity:.48;
  background:linear-gradient(109deg,transparent 29%,color-mix(in srgb,var(--foil-light,#ffe08e) 28%,transparent) 41%,transparent 51%);
  background-position:calc(53% + .55 * var(--pack-drag-offset,0px)) center;
  background-size:175% 100%;
  background-repeat:no-repeat;
  mix-blend-mode:soft-light;
  transition:background-position .52s var(--ease);
}
#tear-seal {
  position:absolute; inset:calc(var(--seal-cut) - 32px) -2px auto; height:47px; cursor:grab; touch-action:pan-y;
  color:#faf0d5; background:transparent; border:0;
}
#tear-seal:active { cursor:grabbing; }
#stage[data-available="false"] #tear-seal { visibility:hidden; }
#stage[data-phase="batch-opening"] #tear-seal { visibility:hidden; }
#tear-seal::after {
  content:""; position:absolute; inset:auto 6px 14px; border-top:1px dashed #ffdc91e6;
}
#tear-seal::before {
  content:""; position:absolute; left:7px; bottom:13px; height:2px; width:var(--tear-progress,0%);
  border-radius:2px; background:linear-gradient(90deg,#ad7825,#f0b80d 72%,#fff1c6);
  box-shadow:0 0 7px #e8ae4380;
}
#tear-seal span {
  position:absolute; inset:auto auto 20px 50%; transform:translateX(-50%); padding:4px 6px; border:1px solid #e3b65b77;
  border-radius:3px; background:#17120ce8; font:500 8px/1 var(--mono); letter-spacing:.16em; white-space:nowrap;
}
/* The same stage becomes a fullscreen opening room while a draw is in motion. */
.cinematic-lighting,.cinematic-caption,#reveal-cards { display:none; }
body:has(#stage[data-phase="batch-opening"]) { overflow:hidden; }
#stage[data-phase="batch-opening"] {
  --cinematic-center:43dvh;
  --cinematic-key:var(--stage-accent);
  --cinematic-card-width:min(54vw,34dvh,292px);
  --pack-center:var(--cinematic-center);
  --pack-width:min(60vw,30dvh,248px);
  --stage-min-height:100dvh;
  --stage-ink:#f1f4fc;
  --stage-muted:#b8c0cf;
  --stage-rule:#bec9dd40;
  position:fixed; inset:0; z-index:20;
  border-radius:0;
  background:
    radial-gradient(ellipse at 50% 38%,color-mix(in srgb,var(--cinematic-key) 17%,#171a21),transparent 59%),
    linear-gradient(164deg,#111319,#080a10 68%);
}
#stage[data-phase="batch-opening"]:is([data-batch-cards="2"],[data-batch-cards="3"]) {
  --cinematic-card-width:min(37vw,32dvh,276px);
}
#stage[data-phase="batch-opening"][data-batch-cards="3"] {
  --cinematic-card-width:min(35vw,31dvh,254px);
}
#stage[data-phase="batch-opening"][data-reveal-step="reveal"] {
  --cinematic-key:var(--reveal-accent,var(--stage-accent));
}
#stage[data-phase="batch-opening"] .stage-meta {
  inset:max(18px,env(safe-area-inset-top)) clamp(18px,5vw,74px) auto;
  padding-bottom:14px;
  border-bottom:1px solid var(--stage-rule);
  color:#e1e5ef;
}
#stage[data-phase="batch-opening"] .stage-meta i {
  background:var(--cinematic-key); box-shadow:0 0 12px var(--cinematic-key);
}
#stage[data-phase="batch-opening"] .stage-bottom {
  inset:auto clamp(18px,5vw,74px) max(18px,env(safe-area-inset-bottom));
  display:flex; justify-content:space-between;
  padding-top:12px; border-top:1px solid var(--stage-rule);
}
#stage[data-phase="batch-opening"][data-reveal-step="reveal"] .stage-bottom { justify-content:flex-end; }
#stage[data-phase="batch-opening"][data-reveal-step="reveal"] #stage-status {
  position:absolute; width:1px; height:1px; overflow:hidden;
  clip-path:inset(50%); white-space:nowrap;
}
#stage[data-phase="batch-opening"] #skip-batch:not([hidden]) {
  min-height:44px;
  padding-inline:14px;
  background:#151922;
}
#stage[data-phase="batch-opening"] .stage-draw-summary { display:none; }
#stage[data-phase="batch-opening"] .stage-plinth {
  --stage-glass:#5d6a7e;
  --stage-plinth-face:#131721;
  --stage-plinth-edge:#c2cce2;
  --stage-plinth-shadow:#030409;
  top:calc(var(--cinematic-center) + var(--pack-width) * .95);
  width:min(76%,565px);
  height:clamp(25px,5dvh,56px);
  z-index:1;
}
#stage[data-phase="batch-opening"] .stage-plinth::before {
  clip-path:polygon(19% 0,81% 0,100% 100%,0 100%);
  background:
    linear-gradient(90deg,transparent,color-mix(in srgb,var(--cinematic-key) 34%,transparent) 50%,transparent),
    repeating-linear-gradient(90deg,transparent 0 14px,#bac8e312 15px 16px),
    linear-gradient(180deg,var(--stage-glass),var(--stage-plinth-face) 74%);
}
#stage[data-phase="batch-opening"] .stage-plinth::after {
  height:6px;
  box-shadow:0 -5px 19px color-mix(in srgb,var(--cinematic-key) 28%,transparent);
}
#stage[data-phase="batch-opening"][data-reveal-step="reveal"] .stage-plinth {
  opacity:.38;
}
#stage[data-phase="batch-opening"] .cinematic-lighting {
  display:block; position:absolute; inset:0; pointer-events:none;
}
.cinematic-lighting::before {
  content:"";
  position:absolute; left:50%; top:43%; width:max(100%,920px); height:67dvh;
  transform:translateX(-50%) perspective(310px) rotateX(47deg);
  transform-origin:50% 66%;
  background:
    repeating-linear-gradient(90deg,transparent 0 61px,#a3b6dd21 62px 63px),
    repeating-linear-gradient(0deg,transparent 0 39px,#a3b6dd21 40px 41px);
  mask-image:radial-gradient(ellipse at 50% 58%,#000b 12%,transparent 65%);
}
.cinematic-lighting::after {
  content:"";
  position:absolute; left:50%; top:var(--cinematic-center); z-index:1;
  width:min(92vw,1080px); aspect-ratio:1.9;
  translate:-50% -50%;
  background:radial-gradient(ellipse,#f7fbffe8 0%,color-mix(in srgb,var(--cinematic-key) 74%,transparent) 23%,transparent 67%);
  opacity:0;
}
.cinematic-rail {
  position:absolute;
  inset:16dvh auto 21dvh max(5%,calc(50% - 460px));
  width:clamp(46px,14vw,152px);
  filter:drop-shadow(0 0 10px color-mix(in srgb,var(--cinematic-key) 72%,transparent));
}
.cinematic-rail + .cinematic-rail {
  inset-inline:auto max(5%,calc(50% - 460px));
  transform:scaleX(-1);
}
.cinematic-rail::before,.cinematic-rail::after {
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(180deg,#bad1ff72 2%,var(--cinematic-key) 22%,#f6faff 49%,var(--cinematic-key) 78%,#bad1ff61);
  clip-path:polygon(100% 0,100% 1%,26% 10%,5% 29%,5% 74%,26% 92%,71% 99%,71% 100%,22% 94%,0 76%,0 27%,22% 8%);
}
.cinematic-rail::after {
  inset:8% -13% 13% 14%;
  opacity:.37;
}
.cinematic-scan {
  position:absolute; z-index:4;
  left:var(--seal-x,50%); top:var(--seal-y,29dvh);
  width:min(85vw,740px); height:3px;
  translate:-50% -50%;
  background:linear-gradient(90deg,transparent 3%,var(--cinematic-key) 31%,#f9fbff 49% 51%,var(--cinematic-key) 69%,transparent 97%);
  box-shadow:0 0 7px 1px color-mix(in srgb,var(--cinematic-key) 72%,transparent),
    0 0 24px 4px color-mix(in srgb,var(--cinematic-key) 48%,transparent);
  opacity:0;
}
.cinematic-fragments {
  position:absolute; z-index:4;
  left:var(--seal-x,50%); top:var(--seal-y,29dvh);
}
.cinematic-fragments > i {
  position:absolute;
  width:calc(var(--particle-size,8px) + 8px); height:2px;
  background:linear-gradient(90deg,transparent,var(--cinematic-key) 55%,#fff);
  box-shadow:0 0 9px color-mix(in srgb,var(--cinematic-key) 65%,transparent);
  opacity:0;
}
#stage[data-phase="batch-opening"] .foil {
  rotate:0deg;
  animation:none;
  transition:none;
  filter:drop-shadow(0 0 1px var(--foil-light)) drop-shadow(0 18px 24px #0009);
}
#stage[data-phase="batch-opening"][data-reveal-step="reveal"] .foil {
  visibility:hidden;
}
#stage[data-phase="batch-opening"] #reveal-cards {
  display:block; position:absolute; z-index:3; inset:0; pointer-events:none;
}
#stage .reveal-card:not([data-featured]) { display:none; }
#stage[data-phase="batch-opening"] .reveal-card[data-featured] {
  --reveal-scale:.86;
  --reveal-flip:0deg;
  --reveal-offset:calc(-50% + var(--reveal-x,0%));
  display:block; position:absolute; left:50%; top:var(--cinematic-center);
  width:var(--cinematic-card-width); aspect-ratio:5 / 7;
  border-radius:clamp(4px,.7vw,9px);
  transform-style:preserve-3d;
  opacity:0;
}
#stage[data-phase="batch-opening"] .reveal-card[data-featured][data-hero] {
  --reveal-scale:1;
  z-index:2;
}
#stage[data-phase="batch-opening"] .reveal-card[data-face-ready] { --reveal-flip:180deg; }
#stage[data-phase="batch-opening"][data-reveal-step="reveal"] .reveal-card[data-featured] {
  opacity:1;
  transform:perspective(880px) translate(var(--reveal-offset),-50%) rotate(var(--reveal-turn,0deg)) scale(var(--reveal-scale)) rotateY(var(--reveal-flip));
}
#stage .reveal-card > :is(.cinematic-front,.card-back) {
  position:absolute; inset:0;
  width:100%; height:100%;
  border-radius:inherit; overflow:hidden;
  backface-visibility:hidden;
  background:#121317;
  box-shadow:
    0 0 0 1px color-mix(in srgb,var(--card-accent,var(--cinematic-key)) 52%,transparent),
    0 12px 34px #000b;
}
#stage .cinematic-front {
  object-fit:contain;
  transform:rotateY(180deg);
}
#stage .card-back img {
  width:100%; height:100%; display:block; object-fit:contain;
}
#stage:is([data-reveal-tier="4"],[data-reveal-tier="5"],[data-reveal-tier="6"]) .reveal-card[data-hero] .cinematic-front {
  box-shadow:
    0 0 0 1px var(--cinematic-key),
    0 0 50px color-mix(in srgb,var(--cinematic-key) 44%,transparent),
    0 18px 48px #000c;
}
#stage[data-phase="batch-opening"][data-reveal-step="reveal"] .cinematic-caption {
  display:grid; gap:5px;
  position:absolute; z-index:4;
  inset:calc(var(--cinematic-center) + var(--cinematic-card-width) * .76 + clamp(10px,2.1dvh,21px)) 12% auto;
  text-align:center; pointer-events:none;
}
.cinematic-rarity {
  color:color-mix(in srgb,var(--cinematic-key) 76%,white);
  font:600 clamp(10px,1.4vw,13px)/1.1 var(--mono);
  text-transform:uppercase; letter-spacing:.14em;
}
.cinematic-name {
  color:#f4f6fc;
  font:700 clamp(18px,4.2vw,36px)/1.05 Inter,sans-serif;
  text-wrap:balance;
}
#stage[data-reduced-motion] :is(.cinematic-lighting,.foil,.stage-plinth) { visibility:hidden; }

@media (prefers-reduced-motion:no-preference) {
  #stage[data-reveal-step="charge"] .foil { animation:cinematic-pack-charge .55s var(--ease) both; }
  #stage[data-reveal-step="charge"] .cinematic-rail { animation:cinematic-rails-in .55s var(--ease) both; }
  #stage[data-reveal-step="charge"] .cinematic-scan { animation:cinematic-charge-scan .55s var(--ease) both; }
  #stage[data-reveal-step="tear"] .foil { animation:cinematic-pack-fall .57s ease-in both; }
  #stage[data-reveal-step="tear"] .foil-cap { animation:cinematic-seal-release .52s var(--ease) both; }
  #stage[data-reveal-step="tear"] .cinematic-rail { animation:cinematic-rail-impact .57s linear both; }
  #stage[data-reveal-step="tear"] .cinematic-lighting::after { animation:cinematic-backlight .57s linear both; }
  #stage[data-reveal-step="tear"] .cinematic-scan { animation:cinematic-tear-slash .53s linear both; }
  #stage[data-reveal-step="tear"] .cinematic-fragments > i { animation:cinematic-fragment .49s linear var(--delay,0ms) both; }
  #stage[data-reveal-step="tear"] .reveal-card[data-featured] { animation:cinematic-card-lift .43s var(--ease) calc(65ms + var(--reveal-order,0) * 26ms) both; }
  #stage[data-reveal-step="reveal"]:not([data-reduced-motion]) .reveal-card[data-featured] { animation:cinematic-card-turn .79s var(--ease) calc(var(--reveal-order,0) * 46ms) both; }
  #stage[data-reveal-step="reveal"]:not([data-reduced-motion]) .cinematic-caption { animation:cinematic-caption-in .36s var(--ease) .51s both; }
}

@keyframes cinematic-pack-charge {
  from { transform:perspective(850px) translateY(18px) rotateY(-16deg) scale(.86); }
  to { transform:perspective(850px); }
}
@keyframes cinematic-rails-in {
  from { opacity:.12; }
  to { opacity:.9; }
}
@keyframes cinematic-charge-scan {
  0% { opacity:0; transform:translateY(24dvh) scaleX(.34); }
  25% { opacity:.46; }
  84% { opacity:.8; transform:translateY(0) scaleX(.65); }
  100% { opacity:.44; transform:translateY(0) scaleX(.63); }
}
@keyframes cinematic-pack-fall {
  0% { transform:none; opacity:1; }
  18% { transform:translateY(4px) rotate(2deg) scale(1.025); opacity:1; }
  58% { transform:translateY(27px) rotate(-2deg) scale(1.02); opacity:1; }
  79% { transform:translateY(8dvh) rotate(-7deg) scale(.94); opacity:.72; }
  100% { transform:translateY(18dvh) rotate(-13deg) scale(.82); opacity:0; }
}
@keyframes cinematic-seal-release {
  0% { transform:none; opacity:1; }
  38% { opacity:1; }
  100% { transform:translate(28%,-30%) rotate(27deg); opacity:0; }
}
@keyframes cinematic-rail-impact {
  0%,100% { opacity:.78; }
  14%,61% { opacity:1; }
}
@keyframes cinematic-backlight {
  0% { transform:scale(.45); opacity:0; }
  16% { opacity:.7; }
  48% { opacity:.54; }
  100% { transform:scale(1.2); opacity:0; }
}
@keyframes cinematic-tear-slash {
  0% { transform:scaleX(.35) rotate(-2deg); opacity:.45; }
  18% { transform:scaleX(1.08) rotate(-2deg); opacity:.97; }
  56% { transform:scaleX(1.16) rotate(-2deg); opacity:.8; }
  100% { transform:scaleX(1.22) rotate(-2deg); opacity:0; }
}
@keyframes cinematic-fragment {
  0% { transform:scale(.4); opacity:0; }
  16% { opacity:1; }
  58% { opacity:.84; }
  100% { transform:translate3d(var(--x,0px),var(--y,0px),0) rotate(var(--turn,0deg)) scale(.36); opacity:0; }
}
@keyframes cinematic-card-lift {
  0% { transform:perspective(880px) translate(-50%,calc(-50% + var(--seal-y,29dvh) - var(--cinematic-center) + 9dvh)) scale(.42); opacity:0; }
  31% { opacity:1; }
  100% { transform:perspective(880px) translate(calc(-50% + var(--reveal-x,0%) * .38),calc(-50% - 3dvh)) rotate(calc(var(--reveal-turn,0deg) * .45)) scale(.73); opacity:1; }
}
@keyframes cinematic-card-turn {
  0% { transform:perspective(880px) translate(calc(-50% + var(--reveal-x,0%) * .38),calc(-50% - 3dvh)) rotate(calc(var(--reveal-turn,0deg) * .45)) scale(.73); }
  100% { transform:perspective(880px) translate(var(--reveal-offset),-50%) rotate(var(--reveal-turn,0deg)) scale(var(--reveal-scale)) rotateY(var(--reveal-flip)); }
}
@keyframes cinematic-caption-in {
  from { transform:translateY(8px); opacity:0; }
  to { transform:none; opacity:1; }
}
@media (max-height:570px) {
  #stage[data-phase="batch-opening"] .stage-meta { padding-bottom:9px; }
  #stage[data-phase="batch-opening"] .stage-bottom { padding-top:7px; }
  .cinematic-name { font-size:clamp(16px,3.2vw,27px); }
}

.pack-panel {
  --pack-accent:#ffe08e;
  --paper:#202125;
  --paper-ink:#f1f2f4;
  --paper-muted:#aeb2b8;
  --paper-rule:#383b40;
  --control-bg:#191a1d;
  --control-ink:#f0f1f3;
  --balance-ink:#eceef0;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:clamp(22px,3vw,38px);
  border-inline-start:1px solid var(--paper-rule);
  border-radius:0 var(--opening-inner-radius) 0 0;
  color:var(--paper-ink);
  background:linear-gradient(155deg,color-mix(in srgb,#28292d 98%,var(--pack-accent)),var(--paper) 72%);
}
.pack-panel h2 {
  font:740 clamp(32px,3.6vw,50px)/1.04 Inter,system-ui,sans-serif;
  letter-spacing:-.052em;
  text-wrap:balance;
}
.pack-controls { display:grid; gap:9px; margin-top:17px; }
.pack-preview-note { display:none; }
.pack-panel[data-available="false"] .pack-preview-note { display:block; margin-top:9px; color:var(--paper-muted); font-size:13px; }
.pack-panel[data-available="false"] :is(.quantity-label,.card-quantity,.pack-prices,.open-pack,.demo-note) { display:none; }
.pack-prices,.demo-wallet-row {
  display:flex;
  grid-column:1 / -1;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:3px 8px;
  color:var(--paper-muted);
  font:500 11px/1.3 var(--mono);
}
.pack-prices { margin-block:2px 0; }
#pack-total-price { color:var(--paper-ink); }
#pack-total-price[data-insufficient] { color:#ef9da6; }
:root[data-theme="light"] #pack-total-price[data-insufficient] { color:#a22c46; }
#demo-wallet-button {
  min-height:36px;
  margin-inline-start:-1px;
  padding:5px 9px;
  border:1px solid var(--paper-rule);
  border-radius:7px;
  background:var(--control-bg);
  color:var(--control-ink);
  font-size:12px;
  font-weight:650;
  cursor:pointer;
}
#demo-wallet-button:hover:not(:disabled) { border-color:var(--paper-muted); }
#demo-wallet-button:disabled { opacity:.62; }
.demo-wallet-dialog {
  width:min(410px,calc(100% - 28px));
  max-height:calc(100% - 32px);
  border:1px solid var(--line);
  border-radius:16px;
  padding:20px;
  background:var(--panel);
  color:var(--cream);
  box-shadow:0 22px 70px #01040966;
}
.demo-wallet-dialog::backdrop { background:#0009; backdrop-filter:blur(4px); }
.demo-wallet-panel { display:grid; gap:14px; }
.demo-wallet-panel header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.demo-wallet-panel h2 { font-size:22px; }
.demo-wallet-panel p { color:var(--muted); font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
#demo-wallet-address { color:var(--cream); font:500 13px/1.5 var(--mono); }
.demo-wallet-panel button {
  min-height:44px;
  padding:7px 12px;
  border:1px solid var(--line);
  border-radius:7px;
  background:transparent;
  color:var(--cream);
  font-size:13px;
  font-weight:650;
  cursor:pointer;
}
.demo-wallet-panel .demo-wallet-close { min-width:44px; font-size:20px; }
#demo-wallet-providers:not([hidden]) { display:grid; gap:7px; }
#demo-wallet-providers button { text-align:start; }
.draw-info { display:grid; gap:12px; }
.mobile-balance-label { display:none; }
.demo-balance {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  flex-wrap:wrap;
  min-width:0;
  gap:4px 8px;
  padding-block:11px;
  border-block:1px solid var(--paper-rule);
}
.pack-controls label { color:var(--paper-muted); font:500 11px/1.3 var(--mono); letter-spacing:.025em; }
.quantity-label span { white-space:nowrap; }
#demo-balance { color:var(--balance-ink); font:600 clamp(14px,1.52vw,20px)/1.25 var(--mono); overflow-wrap:anywhere; }
.card-quantity { display:grid; grid-template-columns:minmax(104px,1.45fr) minmax(92px,1fr); gap:7px; }
.card-stepper,.quantity-presets button {
  min-height:46px;
  border:1px solid var(--paper-rule);
  border-radius:8px;
  background:var(--control-bg);
  color:var(--control-ink);
}
.card-stepper { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; }
.card-stepper button,#card-quantity { min-width:0; min-height:44px; border:0; border-radius:5px; background:transparent; color:inherit; text-align:center; }
.card-stepper button { padding:0; font-size:20px; cursor:pointer; }
.card-stepper button:disabled { opacity:.38; cursor:default; }
#card-quantity { width:100%; padding:0 2px; appearance:textfield; font-size:16px; font-weight:700; }
#card-quantity::-webkit-inner-spin-button,#card-quantity::-webkit-outer-spin-button { appearance:none; margin:0; }
.pack-panel :focus-visible { outline:2px solid var(--balance-ink); outline-offset:3px; }
.card-stepper :focus-visible,.quantity-presets button:focus-visible { outline-offset:-4px; }
.card-stepper:has([aria-invalid="true"]) { border-color:#a43c25; }
.quantity-presets { display:grid; grid-template-columns:repeat(2,minmax(44px,1fr)); gap:7px; }
.quantity-presets button { padding-inline:0; font-size:11px; font-weight:700; cursor:pointer; }
.quantity-presets button:disabled { opacity:.5; cursor:default; }
.quantity-presets button:is(:enabled:hover,[aria-pressed="true"]) {
  border-color:var(--balance-ink);
  background:color-mix(in srgb,var(--balance-ink) 14%,var(--control-bg));
  color:var(--balance-ink);
}
.pack-controls .open-pack {
  grid-column:1 / -1;
  justify-content:space-between;
  min-height:50px;
  padding:10px 14px;
  border:1px solid var(--action);
  border-radius:8px;
  background:var(--action);
  color:var(--on-action);
  text-align:start;
  cursor:pointer;
}
.pack-controls .open-pack::after { content:"→"; color:currentColor; font-size:17px; font-weight:400; }
.pack-controls .open-pack:hover:not(:disabled) { border-color:var(--action-hover); background:var(--action-hover); }
.open-pack:disabled { opacity:.62; }
.try-pack:not([hidden]) {
  display:flex; grid-column:1 / -1; align-items:center; justify-content:space-between;
  min-height:44px; padding:7px 12px; border:1px solid var(--paper-rule); border-radius:8px;
  background:var(--control-bg); color:var(--balance-ink); font-size:13px; font-weight:700; cursor:pointer;
}
.demo-note { margin-top:11px; color:var(--paper-muted); font:400 10px/1.45 var(--mono); }

@media (min-width:761px) {
  .opening-layout .mobile-pack-section {
    display:block;
    grid-column:1 / -1;
    grid-row:2;
    padding:0 14px;
    border-top:1px solid var(--line);
    border-radius:0 0 var(--opening-inner-radius) var(--opening-inner-radius);
    background:var(--panel);
  }
  #mobile-packs { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); }
  #mobile-packs .mobile-pack-option {
    position:relative;
    display:flex;
    gap:clamp(6px,1vw,14px);
    justify-content:center;
    align-items:center;
    min-width:0;
    min-height:65px;
    padding:7px 4px 9px;
    border:0;
    background:none;
    color:var(--muted);
    text-align:start;
    font-size:11px;
    font-weight:650;
  }
  #mobile-packs .mobile-pack-option:not(:first-child) { border-inline-start:1px solid var(--line); }
  #mobile-packs .mobile-pack-option[aria-pressed="true"] { color:var(--cream); background:color-mix(in srgb,var(--interface-accent) 11%,transparent); }
  #mobile-packs .mobile-pack-option[aria-pressed="true"]::after {
    content:""; position:absolute; inset:auto 16% -1px;
    height:2px;
    background:var(--interface-accent);
  }
  #mobile-packs .mobile-pack-option:hover:not(:disabled) { color:var(--cream); }
  #mobile-packs .mobile-pack-option:focus-visible { outline-offset:-3px; }
  .mobile-pack-art {
    flex:none;
    width:20px;
    aspect-ratio:var(--foil-display-ratio);
    background:var(--foil-atlas) var(--foil-position)/var(--foil-size) no-repeat;
  }
}

.collection { padding:30px 0 40px; }
.collection-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:6px 10px; margin-bottom:13px; }
.collection-head h2 { font-size:14px; letter-spacing:.01em; }
.collection-head > span { color:var(--muted); font:500 9px/1.2 var(--mono); letter-spacing:.10em; }
.collection-filters:not([hidden]) { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.collection-filter {
  --filter-accent:var(--gold);
  display:inline-flex; align-items:center; justify-content:space-between; gap:10px;
  min-width:0; min-height:38px; padding:6px 10px; text-align:left;
  border:1px solid var(--line); border-radius:6px; background:var(--panel);
  color:var(--cream); cursor:pointer; font:600 12px/1.2 Inter,sans-serif;
}
.collection-filter small { color:var(--filter-accent); font:500 10px/1 var(--mono); }
.collection-filter:hover,.collection-filter[aria-pressed="true"] { border-color:var(--filter-accent); }
.collection-filter[aria-pressed="true"] { color:var(--filter-accent); background:color-mix(in srgb,var(--filter-accent) 13%,var(--panel)); }
.collection-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; }
.collection-card { display:grid; align-content:start; gap:9px; min-width:0; padding:7px; border:1px solid var(--line); border-radius:6px; background:var(--panel); }
#collection-grid .collection-card[hidden] { display:none; }
.collection-card:hover { border-color:var(--accent); }
.collection-card img { width:100%; height:auto; aspect-ratio:5 / 7; object-fit:contain; border-radius:4px; }
.collection-card b { display:block; font-size:12px; overflow-wrap:anywhere; }
.collection-card small { display:block; margin-top:3px; color:var(--accent); text-transform:uppercase; font:500 9px/1.15 var(--mono); }

@media(max-width:1060px) {
  .wrap { width:calc(100% - 56px); }
  #stage { --card-w:clamp(90px,15vw,166px); }
}
@media(max-width:760px) {
  .wrap { width:calc(100% - 32px); }
  .topbar,nav { min-height:57px; height:57px; }
  nav { gap:13px; font-size:11px; }
  .brand { gap:4px; font-size:16px; }
  .brand img { width:27px;height:27px; }
  .hero-copy { padding:26px 0 19px; }
  .hero-deck { font-size:12px; }
  .opening-layout { grid-template-columns:minmax(0,1fr); }
  #stage {
    --card-w:clamp(76px,23vw,174px);
    --left:-27%; --right:27%;
    --stage-min-height:clamp(350px,72vw,480px);
    border-radius:var(--opening-inner-radius) var(--opening-inner-radius) 0 0;
  }
  .stage-meta,.stage-bottom { left:13px;right:13px; }
  .stage-meta { top:17px; font-size:9px; }
  .stage-bottom { bottom:12px; padding-top:9px; }
  #stage-status { font-size:10px; }
  .pack-panel {
    padding:16px;
    border-inline-start:0;
    border-block-start:1px solid var(--line);
    border-radius:0 0 var(--opening-inner-radius) var(--opening-inner-radius);
  }
  .pack-panel h2 { margin-top:14px; }
  .collection-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
}
@media(max-width:375px) {
  .wrap { width:calc(100% - 24px); }
  nav { gap:8px; font-size:10px; }
  h1 { font-size:37px; }
}
@media(max-width:440px) {
  .topbar { gap:9px; }
  .brand span { display:none; }
  nav { gap:10px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none!important; animation:none!important; }
}

:root[data-theme="light"] {
  color-scheme:light;
  background:#f6f7f8;
}
:root[data-theme="light"] body {
  --fist-ink:#17191d;
  --fist-cream:#17191d;
  --fist-muted:#565b64;
  --fist-surface:#fafbfc;
  --fist-line:#d8dce1;
  --interface-accent:#292d34;
  --action:#17191d;
  --action-hover:#2a2d32;
  --on-action:#fff;
  --canvas:#f6f7f8;
  --mobile-bg:#f6f7f8;
  --mobile-layer:#fafbfc;
  --mobile-raised:#e9ebee;
  background:radial-gradient(ellipse at 35% -5%,#fff,transparent 58%),var(--canvas);
}
:root[data-theme="light"] .opening-layout { box-shadow:0 20px 62px #22273519; }
:root[data-theme="light"] #stage[data-phase="sealed"] {
  --stage-bg:#f3f4f6;
  --stage-wash:#ffffff;
  --stage-floor:#e5e8ec;
  --stage-rule:#b9c0ca;
  --stage-light:#ffffff91;
  --stage-glass:#fafbffb0;
  --stage-plinth-edge:#fff;
  --stage-plinth-face:#bdc3ca;
  --stage-plinth-shadow:#49526945;
  --stage-ink:#262a31;
  --stage-muted:#555b64;
  --stage-control:#f8f9fb;
  --stage-control-hover:#e9ecf0;
  color-scheme:light;
}
:root[data-theme="light"] .pack-panel {
  --paper:#f5f6f7;
  --paper-ink:#17191d;
  --paper-muted:#565b64;
  --paper-rule:#d8dce1;
  --control-bg:#fbfcfd;
  --control-ink:#25282e;
  --balance-ink:#25282e;
  color-scheme:light;
  background:linear-gradient(145deg,#fff,var(--paper) 72%);
}
body .my-card-group { background:var(--panel); }
body .my-card-group-buyback { background:color-mix(in srgb,var(--tier-accent) 8%,var(--panel)); }
body #my-cards-balance { color:var(--interface-accent); }
:root[data-theme="light"] :is(.my-card-group-heading h3,.my-card-group-quote,.collection-card small,.collection-filter small) {
  color:color-mix(in srgb,var(--filter-accent,var(--tier-accent,var(--accent))) 35%,#30353d);
}
:root[data-theme="light"] .collection-filter[aria-pressed="true"] { color:#262a31; border-color:#7f8792; }
