/* =========================================================
   VAULT · Waitlist
   Apple-like restraint: black, SF Pro (Geist fallback), one gold accent,
   real photography, glass only on the navigation.
   ========================================================= */

:root {
  --bg: #000;
  --s1: #0d0d0e;
  --s2: #161617;
  --s3: #1d1d1f;
  --s4: #2c2c2e;
  --line: rgba(255, 255, 255, .09);

  --ink: #f5f5f7;
  --ink-2: #d2d2d7;
  --muted: #86868b;
  --subtle: #6e6e73;

  --gold: #CFAE72;
  --gold-2: #E6C98E;
  --gold-3: #F6E3B0;
  --prism: #7FE0D2;
  --green: #30D158;
  --red: #FF6961;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Geist", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Geist Mono", Menlo, monospace;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lock, html.lock body { overflow: hidden; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.47; letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); letter-spacing: .04em; }
[hidden] { display: none !important; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #000; font-weight: 600; text-decoration: none; transition: top .2s; }
.skip:focus { top: 60px; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }

.ico { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ico-u { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Navigation (the one piece of glass) ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 40;
  padding-top: env(safe-area-inset-top);
  background: rgba(22, 22, 23, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .07);
}
.nav-in { max-width: 1024px; height: 48px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { font-size: 13px; font-weight: 600; letter-spacing: .38em; margin-right: -.38em; color: var(--ink); text-decoration: none; }
.nav-btn { width: 36px; height: 36px; margin-right: -8px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: color .2s, background .2s; }
.nav-btn:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.nav-btn[aria-pressed="true"] { color: var(--muted); }

main { position: relative; overflow-x: hidden; overflow-x: clip; }

/* ---------- Type ---------- */
.eyebrow { font-size: 15px; font-weight: 600; color: var(--gold); letter-spacing: -.01em; }
h1 { font-size: clamp(40px, 11vw, 80px); line-height: 1.05; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.lede { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.35; color: var(--muted); font-weight: 500; letter-spacing: -.02em; text-wrap: pretty; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1024px; margin: 0 auto;
  padding: calc(48px + env(safe-area-inset-top) + 44px) 20px 64px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px;
  grid-template-areas: "copy" "wall" "form";
}
.hero-copy { grid-area: copy; display: flex; flex-direction: column; gap: 12px; text-align: center; align-items: center; }
.hero-copy .lede { max-width: 30ch; }
.hero-copy > *, .wall, .join { animation: rise 1s var(--ease-out) both; }
.hero-copy > :nth-child(2) { animation-delay: .05s; }
.hero-copy > :nth-child(3) { animation-delay: .1s; }
.wall { animation-delay: .16s; }
.join { animation-delay: .22s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* the wall: nine pieces, one missing */
.wall { grid-area: wall; width: 100%; max-width: 380px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wt { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--s2); }
.wt img { width: 100%; height: 100%; object-fit: cover; }
.wt.slot { display: grid; place-items: center; background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22); animation: slot 2.8s ease-in-out infinite; }
.wt.slot i { font-style: normal; font-size: 28px; font-weight: 500; color: var(--muted); }
@keyframes slot { 0%, 100% { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16); } 50% { box-shadow: inset 0 0 0 1.5px rgba(207, 174, 114, .75); } }
.wt.slot.filled { animation: none; box-shadow: none; }
.wt.slot.filled::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--gold); }
.wt.slot.filled img { animation: fillIn .9s var(--ease-out) both; }
@keyframes fillIn { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }

/* ---------- Form ---------- */
.join { grid-area: form; width: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.lbl { display: flex; justify-content: space-between; align-items: baseline; width: 100%; padding: 0; margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
legend.lbl { float: left; }
legend.lbl + * { clear: both; }
.lbl-note { font-size: 13px; font-weight: 500; color: var(--muted); }
.input {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 14px;
  background: var(--s3); border: 1px solid transparent;
  font-size: 17px; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--subtle); }
.input:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(207, 174, 114, .22); }
.input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 4px rgba(255, 105, 97, .16); }
.err { display: flex; align-items: flex-start; gap: 6px; margin: 8px 2px 0; font-size: 14px; line-height: 1.35; color: var(--red); }
.err .ico-u { width: 16px; height: 16px; margin-top: 1px; }

.picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.opt { position: relative; min-width: 0; }
.opt.wide { grid-column: span 2; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.opt label {
  position: relative; height: 86px; padding: 8px 6px; border-radius: 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--s3); color: var(--ink-2); --ibg: var(--s3);
  font-size: 13px; font-weight: 500; line-height: 1.15; text-align: center; letter-spacing: -.01em;
  -webkit-user-select: none; user-select: none;
  transition: background .2s, box-shadow .2s, transform .2s var(--ease-out);
}
.opt.wide label { flex-direction: row; gap: 10px; }
.opt label .ico { width: 28px; height: 28px; color: var(--gold); transition: transform .3s var(--ease-spring); }
@media (hover: hover) { .opt label:hover { background: #242426; --ibg: #242426; } }
.opt label:active { transform: scale(.96); }
.opt input:checked + label { background: var(--s4); --ibg: var(--s4); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--gold); }
.opt input:checked + label .ico { transform: scale(1.08); }
.opt input:checked + label::after {
  content: ""; position: absolute; top: 7px; right: 7px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4.2 4.2L18.5 8'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.opt input:focus-visible + label { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.picker.invalid .opt label { box-shadow: inset 0 0 0 1px rgba(255, 105, 97, .5); }

.other-wrap { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .35s var(--ease-out), opacity .25s, margin .35s var(--ease-out); }
.other-wrap.open { grid-template-rows: 1fr; opacity: 1; margin-top: 16px; }
.other-inner { overflow: hidden; padding: 4px; margin: -4px; }
.pick-hint { margin: 10px 2px 0; font-size: 14px; color: var(--muted); }
.pick-hint:empty { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  font-size: 16px; font-weight: 500; letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  transition: background .2s, transform .2s var(--ease-out), opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #000; }
@media (hover: hover) { .btn-primary:hover { background: #fff; } }
.btn-secondary { background: var(--s4); color: var(--ink); }
@media (hover: hover) { .btn-secondary:hover { background: #3a3a3c; } }
.btn-xl { height: 56px; width: 100%; font-size: 17px; font-weight: 600; }
.btn-small { height: 34px; padding: 0 14px; font-size: 14px; background: var(--ink); color: #000; font-weight: 600; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .7; }
.micro { margin-top: -8px; text-align: center; font-size: 14px; color: var(--muted); }

/* =========================================================
   STAGE — pack, opening, card, result
   ========================================================= */
.stage {
  max-width: 1024px; margin: 0 auto; min-height: 100vh; min-height: 100svh;
  padding: calc(48px + env(safe-area-inset-top) + 36px) 20px 64px;
  display: flex; flex-direction: column; align-items: center;
}
.stage-head { text-align: center; animation: rise .8s var(--ease-out) both; }
.stage-title { font-size: 32px; font-weight: 600; letter-spacing: -.03em; margin-top: 2px; }
.stage-area { position: relative; width: 100%; min-height: min(560px, calc(100svh - 210px)); display: grid; place-items: center; grid-template-columns: minmax(0, 1fr); }
.stage-area > * { grid-area: 1 / 1; }
.stage.done .stage-area { min-height: 0; padding: 12px 0 92px; }
.stage-hint { min-height: 24px; margin-top: 6px; font-size: 15px; color: var(--muted); animation: breathe 2.4s ease-in-out infinite; }
.stage-hint.still { animation: none; }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- PACK ---------- */
.pack-wrap { position: relative; z-index: 3; width: min(250px, 62vw); aspect-ratio: 5 / 8; animation: packFloat 4.6s ease-in-out infinite; }
.pack-drop { position: absolute; inset: 0; perspective: 1100px; animation: packDrop 1.1s var(--ease-out) both; }
.pack-shadow {
  z-index: 1; align-self: center; width: min(200px, 50vw); height: 24px; border-radius: 50%;
  transform: translateY(calc(min(250px, 62vw) * .8 + 28px));
  background: radial-gradient(closest-side, rgba(0, 0, 0, .9), transparent);
  animation: shadowFloat 4.6s ease-in-out infinite;
}
@keyframes packFloat { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(8px); } }
@keyframes shadowFloat { 0%, 100% { opacity: .5; scale: .88; } 50% { opacity: .85; scale: 1; } }
@keyframes packDrop { from { opacity: 0; transform: translateY(-60px) scale(.92); } to { opacity: 1; transform: none; } }

.pack {
  --pw: min(250px, 62vw);
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  transform-style: preserve-3d;
  animation: packSpinIn 1.5s var(--ease-out) both, packSway 7.2s ease-in-out 1.5s infinite;
}
.pack:focus-visible { outline: none; }
.pack:focus-visible::after { content: ""; position: absolute; inset: -10px; border-radius: 18px; border: 2px solid var(--gold-2); transform: translateZ(1px); }
@keyframes packSpinIn { from { transform: rotateY(-560deg) rotateX(8deg); } to { transform: rotateY(-18deg) rotateX(4deg); } }
@keyframes packSway { 0%, 100% { transform: rotateY(-18deg) rotateX(4deg); } 50% { transform: rotateY(18deg) rotateX(-3deg); } }
.pack-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.pack-back { transform: rotateY(180deg); overflow: hidden; }
.pk { position: absolute; inset: 0; overflow: hidden; }

.pk-foil {
  position: absolute; inset: 0;
  background:
    radial-gradient(95% 60% at 50% 46%, rgba(255, 255, 255, .07), transparent 68%),
    linear-gradient(90deg, rgba(0, 0, 0, .65), transparent 14%, transparent 86%, rgba(0, 0, 0, .65)),
    linear-gradient(90deg, transparent 5%, rgba(255, 255, 255, .05) 7%, transparent 10%, transparent 90%, rgba(255, 255, 255, .04) 93%, transparent 95%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 5px),
    linear-gradient(170deg, #1c1c1d 0%, #0a0a0a 38%, #151516 62%, #060606 100%);
}
.pk-crimp { position: absolute; left: 0; right: 0; height: 8%; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .12) 0 1.5px, rgba(0, 0, 0, .45) 1.5px 3.6px), linear-gradient(180deg, #303032, #111112); }
.pk-crimp.top { top: 0; }
.pk-crimp.bottom { bottom: 0; }
.pk-band { position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(230, 201, 142, .8) 20%, rgba(246, 227, 176, .9) 50%, rgba(230, 201, 142, .8) 80%, transparent); }
.pk-band.top { top: 8%; }
.pk-band.bottom { bottom: 8%; }
.pk-notch { position: absolute; top: 10%; right: 6%; font-size: calc(var(--pw) * .03); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .35); }
.pk-tearline { position: absolute; left: 5%; right: 5%; top: calc(15% + 5px); border-top: 1px dashed rgba(255, 255, 255, .14); }
.pk-brand {
  position: absolute; left: 0; right: 0; top: 21%; text-align: center; line-height: 1;
  font-size: calc(var(--pw) * .13); font-weight: 700; letter-spacing: .28em; padding-left: .28em;
  background: linear-gradient(180deg, #FFF3D6 0%, #E6C98E 42%, #A68347 64%, #EBD29A 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pk-kicker { position: absolute; left: 0; right: 0; top: 32%; text-align: center; font-size: calc(var(--pw) * .042); font-weight: 600; letter-spacing: .38em; padding-left: .38em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.pk-emblem {
  position: absolute; left: 50%; top: 41.5%; width: calc(var(--pw) * .3); height: calc(var(--pw) * .3); transform: translateX(-50%);
  border-radius: 50%; display: grid; place-items: center; color: var(--gold-2); --ibg: #121212;
  box-shadow: inset 0 0 0 1px rgba(230, 201, 142, .7), 0 0 0 5px rgba(0, 0, 0, .4), 0 0 0 6px rgba(230, 201, 142, .22);
}
.pk-emblem .ico { width: calc(var(--pw) * .15); height: calc(var(--pw) * .15); }
.pk-edition { position: absolute; left: 8%; right: 8%; top: 64%; text-align: center; font-size: calc(var(--pw) * .06); font-weight: 600; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-fine { position: absolute; left: 9%; bottom: 12.5%; font-family: var(--mono); font-size: calc(var(--pw) * .03); line-height: 1.5; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .42); }
.pk-seal { position: absolute; right: 8%; bottom: 10.5%; width: calc(var(--pw) * .22); height: calc(var(--pw) * .22); transform: rotate(-12deg); filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6)); }
.pk-seal svg { width: 100%; height: 100%; overflow: visible; }
.pk-holo {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .26;
  background: linear-gradient(115deg, transparent 28%, rgba(127, 224, 210, .2) 38%, rgba(246, 227, 176, .38) 47%, rgba(245, 179, 207, .2) 56%, transparent 68%);
  background-size: 260% 260%; animation: holoShift 7.2s ease-in-out 1.5s infinite;
}
@keyframes holoShift { 0%, 100% { background-position: 0% 30%; } 50% { background-position: 100% 70%; } }
.pk-sheen {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, .2) 50%, transparent 58%);
  background-size: 320% 100%; animation: sheen 4.2s var(--ease) infinite;
}
@keyframes sheen { 0% { background-position: 115% 0; } 55%, 100% { background-position: -15% 0; } }
.pk-seam { position: absolute; top: 0; bottom: 0; left: 50%; width: 8%; transform: translateX(-50%); background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .1) 0 1.5px, rgba(0, 0, 0, .5) 1.5px 3.6px), linear-gradient(90deg, #111, #2a2a2b 50%, #111); }
.pk-back-copy {
  position: absolute; left: 13%; right: 13%; top: 22%; bottom: 18%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7em; text-align: center;
  font-size: calc(var(--pw) * .05); font-weight: 600; color: var(--ink-2);
  background: rgba(0, 0, 0, .85); border-radius: 12px; padding: 1em .9em; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.pk-back-brand { font-weight: 700; letter-spacing: .3em; padding-left: .3em; font-size: 1.4em; color: var(--gold-2); }
.pk-back-small { font-size: .7em; font-weight: 500; color: var(--muted); line-height: 1.4; }
.pk-barcode { width: 70%; height: 2em; opacity: .7; background: repeating-linear-gradient(90deg, var(--ink-2) 0 2px, transparent 2px 4px, var(--ink-2) 4px 5px, transparent 5px 8px, var(--ink-2) 8px 11px, transparent 11px 12px); }
.pk-beam {
  position: absolute; left: 50%; top: 15%; width: 90%; height: 100%; pointer-events: none; opacity: 0;
  transform: translate(-50%, -100%) scaleY(0); transform-origin: 50% 100%;
  background: radial-gradient(60% 100% at 50% 100%, rgba(255, 246, 222, .85), rgba(246, 227, 176, .25) 42%, transparent 75%);
  filter: blur(6px); mix-blend-mode: screen;
}

/* ---------- Aura behind the card ---------- */
.aura {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 1;
  width: min(440px, 115vw); aspect-ratio: 1; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .16), transparent);
  filter: blur(20px); transition: opacity .7s var(--ease-out);
}
.aura[data-state="charging"] { opacity: .9; animation: charge .45s ease-in-out infinite alternate; }
@keyframes charge { from { transform: scale(.82); } to { transform: scale(.94); } }
.aura[data-state="on"] { opacity: 1; }
.aura[data-r="common"][data-state="on"] { opacity: 0; }
.aura[data-r="rare"] { background: radial-gradient(closest-side, rgba(230, 201, 142, .3), transparent); }
.aura[data-r="epic"] { background: radial-gradient(closest-side, rgba(127, 224, 210, .3), rgba(169, 194, 248, .08) 55%, transparent); }
.aura[data-r="legendary"] {
  background: conic-gradient(from 0deg, rgba(246, 227, 176, .6), rgba(127, 224, 210, .45), rgba(230, 201, 142, .6), rgba(245, 179, 207, .35), rgba(246, 227, 176, .6));
  -webkit-mask: radial-gradient(closest-side, #000 25%, transparent); mask: radial-gradient(closest-side, #000 25%, transparent);
}
.aura[data-r="legendary"][data-state="on"] { animation: auraSpin 10s linear infinite, auraBreath 3s ease-in-out infinite alternate; }
@keyframes auraSpin { to { rotate: 360deg; } }
@keyframes auraBreath { from { scale: .94; } to { scale: 1.1; } }

.card-move { position: relative; z-index: 2; visibility: hidden; will-change: transform; }
.card-move.show { visibility: visible; }

/* =========================================================
   THE CARD
   ========================================================= */
.card3d {
  --cw: min(300px, 76vw);
  position: relative; width: var(--cw); font-size: calc(var(--cw) / 18.75);
  perspective: 1100px; color: var(--ink); line-height: 1.2; letter-spacing: -.01em;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: grab;
}
.card3d:active { cursor: grabbing; }
.card3d[data-shape="coin"] { --cw: min(320px, 82vw); font-size: calc(var(--cw) / 20); }
.card3d[data-shape="vinyl"] { --cw: min(264px, 64vw); font-size: calc(var(--cw) / 16.5); }

.card-shadow { position: absolute; left: 12%; right: 12%; bottom: -6%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .9), transparent); filter: blur(5px); }
.card-tilt { position: relative; transform-style: preserve-3d; will-change: transform; }
.card-flip { position: relative; transform-style: preserve-3d; aspect-ratio: 63 / 88; }
.card3d[data-shape="coin"] .card-flip, .card3d[data-shape="vinyl"] .card-flip { aspect-ratio: 1; }
.card3d.facedown .card-flip { transform: rotateY(180deg); }
.card-face, .card-back { position: absolute; inset: 0; border-radius: 1.1em; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.card-back { transform: rotateY(180deg); }

/* finishes */
.card3d[data-rarity="common"] { --finish: linear-gradient(160deg, #4a4a4d, #2a2a2c 45%, #3a3a3c 70%, #232325); --tone: #a1a1a6; --tone-2: #d2d2d7; --tint: rgba(255, 255, 255, .07); }
.card3d[data-rarity="rare"] { --finish: linear-gradient(150deg, #F8E7BD 0%, #C9A565 22%, #8C6A33 44%, #EBCF92 60%, #A7823F 80%, #F3DFAE 100%); --tone: #D9B97C; --tone-2: #F3DFAE; --tint: rgba(207, 174, 114, .14); }
.card3d[data-rarity="epic"] { --finish: linear-gradient(125deg, #8FE6D9, #D4F2C0 18%, #F6E6B0 34%, #F4C0D8 52%, #B6C8F6 70%, #8FE6D9 86%, #D4F2C0) var(--hx, 50%) 50% / 300% 100%; --tone: #8FE6D9; --tone-2: #D6FBF5; --tint: rgba(127, 224, 210, .13); }
.card3d[data-rarity="legendary"] { --finish: conic-gradient(from var(--ang, 0deg), #FFF1CC, #CFAE72, #9FE9DE, #F6E3B0, #8E6A2F, #F5C98F, #C9F2EB, #E6C98E, #FFF1CC); --tone: #EBCB8E; --tone-2: #FFF3D6; --tint: rgba(230, 201, 142, .16); }
@property --ang { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.card3d[data-rarity="legendary"] .cf, .card3d[data-rarity="legendary"] .coin, .card3d[data-rarity="legendary"] .sleeve { animation: angSpin 6s linear infinite; }
@keyframes angSpin { to { --ang: 360deg; } }

.cf { position: absolute; inset: 0; border-radius: inherit; padding: .42em; background: var(--finish); box-shadow: 0 1.6em 3em -1.2em rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .18); }
.cf-in {
  position: relative; height: 100%; border-radius: .72em; overflow: hidden;
  padding: .75em .8em .7em; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #121213, #0a0a0b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.cf-head { display: flex; align-items: center; justify-content: space-between; gap: .5em; }
.cf-rar {
  display: inline-flex; align-items: center; gap: .4em; height: 1.9em; padding: 0 .8em 0 .65em; border-radius: 99px;
  font-size: .62em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  color: var(--tone-2); background: var(--tint);
}
.rsym { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
.card3d[data-rarity="legendary"] .cf-rar { background: linear-gradient(90deg, rgba(230, 201, 142, .22), rgba(127, 224, 210, .18)); }
.cf-serial { font-family: var(--mono); font-size: .68em; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); white-space: nowrap; }
.cf-serial i { font-style: normal; color: var(--subtle); }

.cf-photo { position: relative; flex: 1; min-height: 0; margin-top: .6em; border-radius: .6em; overflow: hidden; background: var(--pbg, #1d1d1f); }
.cf-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: var(--fit, cover); object-position: var(--pos, 50% 50%); }
.cf-photo.contain img { padding: .8em; }
.cf-badge {
  position: absolute; left: .5em; bottom: .5em; width: 2em; height: 2em; border-radius: .55em; display: grid; place-items: center;
  background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--gold-2); --ibg: #161616; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.cf-badge .ico { width: 1.2em; height: 1.2em; }
.cf-item { margin-top: .65em; min-width: 0; }
.cf-name { font-size: 1.2em; font-weight: 600; letter-spacing: -.02em; line-height: 1.12; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-meta { margin-top: .22em; font-size: .7em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-row { display: flex; align-items: center; gap: .6em; margin-top: .6em; padding-top: .6em; border-top: 1px solid rgba(255, 255, 255, .08); }
.cf-owner { flex: 1; min-width: 0; }
.cf-owner b { display: block; font-size: .78em; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-owner span { display: block; margin-top: .15em; font-size: .6em; color: var(--tone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-stats { display: flex; gap: .15em; flex: none; }
.cf-stat { width: 2.7em; text-align: center; }
.cf-stat b { display: block; font-size: .9em; font-weight: 600; line-height: 1.1; }
.cf-stat span { display: block; margin-top: .25em; font-size: .44em; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cf-note { margin-top: .5em; font-size: .5em; color: var(--subtle); }
.cf-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: .3em; }
.cf-since { font-size: .5em; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cf-logo { font-size: .72em; font-weight: 700; letter-spacing: .32em; margin-right: -.32em; color: var(--tone-2); }

/* light & holo */
.cf-glare, .cf-holo, .cf-sparks { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.cf-glare { background: radial-gradient(farthest-corner circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, .3), rgba(255, 255, 255, .05) 30%, transparent 55%); mix-blend-mode: soft-light; }
.card3d[data-rarity="common"] .cf-glare { opacity: .5; }
.cf-holo { display: none; }
.card3d[data-rarity="epic"] .cf-holo, .card3d[data-rarity="legendary"] .cf-holo {
  display: block; border-radius: 0; mix-blend-mode: color-dodge; opacity: .3;
  background: repeating-linear-gradient(115deg, #FFE7A3 0%, #9CF2DF 7%, #A6D8FF 14%, #FFB8D9 21%, #FFE7A3 28%) var(--hx, 50%) var(--hy, 50%) / 260% 260%;
  -webkit-mask: radial-gradient(farthest-corner circle at var(--gx, 50%) var(--gy, 30%), #000, rgba(0, 0, 0, .15) 70%);
  mask: radial-gradient(farthest-corner circle at var(--gx, 50%) var(--gy, 30%), #000, rgba(0, 0, 0, .15) 70%);
}
.cf-sparks i {
  position: absolute; left: var(--x); top: var(--y); width: calc(var(--s) * 1em); aspect-ratio: 1; background: var(--sc, #fff);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  opacity: 0; animation: twinkle var(--t, 2.6s) ease-in-out var(--d, 0s) infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(0); } 45% { opacity: .95; transform: scale(1) rotate(45deg); } 70% { opacity: 0; transform: scale(.2) rotate(90deg); } }

/* back */
.card-back { overflow: hidden; display: grid; place-items: center; background: linear-gradient(160deg, #161617, #050505); box-shadow: 0 1.6em 3em -1.2em rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.card-back::before { content: ""; position: absolute; inset: .8em; border-radius: .6em; box-shadow: inset 0 0 0 1px rgba(230, 201, 142, .45); }
.card-back::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .06) 50%, transparent 65%); }
.cb { display: flex; flex-direction: column; align-items: center; gap: .7em; }
.cb-word { font-size: 1.6em; font-weight: 700; letter-spacing: .36em; margin-right: -.36em; color: var(--ink); }
.cb-sub { font-size: .5em; font-weight: 600; letter-spacing: .32em; margin-right: -.32em; text-transform: uppercase; color: var(--gold); }
.card3d.charging .card-back { animation: backCharge .5s ease-in-out infinite alternate; }
@keyframes backCharge { from { box-shadow: 0 0 1em rgba(255, 255, 255, .06), inset 0 0 0 1px rgba(255, 255, 255, .12); } to { box-shadow: 0 0 3em rgba(246, 227, 176, .35), inset 0 0 0 1px rgba(246, 227, 176, .6); } }

/* ---------- Coin: round medallion ---------- */
.card3d[data-shape="coin"] .card-face, .card3d[data-shape="coin"] .card-back { border-radius: 50%; }
.card3d[data-shape="coin"] .card-back::before { inset: .9em; border-radius: 50%; }
.coin { position: absolute; inset: 0; border-radius: 50%; padding: .9em; background: var(--finish); box-shadow: 0 1.6em 3em -1.2em rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .35), inset 0 .1em 0 rgba(255, 255, 255, .45); }
.coin-reed {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(0, 0, 0, .32) 0 .9deg, rgba(255, 255, 255, .2) .9deg 1.8deg);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - .45em), #000 calc(100% - .43em));
  mask: radial-gradient(closest-side, transparent calc(100% - .45em), #000 calc(100% - .43em));
}
.coin-field { position: relative; height: 100%; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #1a1a1b, #070707 75%); box-shadow: inset 0 .4em 1.2em rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .1); }
.coin-text { position: absolute; inset: 0; width: 100%; height: 100%; }
.coin-text text { font-family: var(--font); font-size: 8.4px; font-weight: 700; letter-spacing: 1.6px; fill: var(--tone-2); }
.coin-text .ring { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: .6; }
.coin-core { position: absolute; inset: 12.5%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.coin-photo { position: relative; width: 6.6em; height: 6.6em; flex: none; border-radius: 50%; overflow: hidden; background: #111; box-shadow: 0 0 0 .12em var(--tone), 0 .5em 1.2em rgba(0, 0, 0, .6); }
.coin-photo img { width: 100%; height: 100%; object-fit: cover; }
.coin-core .cf-name { margin-top: .5em; font-size: 1em; -webkit-line-clamp: 1; max-width: 100%; }
.coin-core .cf-meta { font-size: .6em; max-width: 100%; }
.coin-core .cf-owner-line { margin-top: .35em; font-size: .58em; color: var(--tone); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coin-core .cf-owner-line b { color: var(--ink); font-weight: 600; }
.coin-core .cf-stats { margin-top: .35em; }
.coin-core .cf-stat { width: 2.6em; }
.coin-core .cf-note { margin-top: .3em; font-size: .44em; }

/* ---------- Stamp: perforated ---------- */
.card3d[data-shape="stamp"] .card-face, .card3d[data-shape="stamp"] .card-back { border-radius: 0; }
.card3d[data-shape="stamp"] .card-back::before { inset: 1.2em; border-radius: 0; }
.card3d[data-shape="stamp"] .cf { border-radius: 0; padding: .95em; box-shadow: none; }
.card3d[data-shape="stamp"] .cf-in { border-radius: .15em; }
.card3d[data-shape="stamp"] .cf-photo { border-radius: .2em; }

/* ---------- Vinyl: square sleeve + record ---------- */
.card3d[data-shape="vinyl"] .card-face, .card3d[data-shape="vinyl"] .card-back { border-radius: .35em; }
.sleeve { position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: .38em; background: var(--finish); box-shadow: 0 1.6em 3em -1.2em rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .2), 1em 0 2em -1em rgba(0, 0, 0, .8); }
.sleeve .cf-in { border-radius: .2em; padding: .6em .65em .55em; }
.sleeve .cf-photo { margin-top: .5em; }
.sleeve .cf-item { margin-top: .5em; }
.sleeve .cf-name { font-size: 1em; -webkit-line-clamp: 1; }
.sleeve .cf-meta { margin-top: .15em; font-size: .64em; }
.sleeve .cf-row { margin-top: .45em; padding-top: .45em; }
.sleeve .cf-note { display: none; }
.disc { position: absolute; z-index: 0; top: 3%; left: 3%; width: 94%; aspect-ratio: 1; border-radius: 50%; transition: transform 1.2s var(--ease-out); }
.card3d.revealed .disc { transform: translateX(46%); }
.card3d[data-shape="vinyl"] { transition: translate 1.2s var(--ease-out); }
.card3d[data-shape="vinyl"].revealed { translate: -20% 0; }
.disc-spin {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, #000 0 2.2%, transparent 2.4%),
    radial-gradient(circle, var(--tone) 0 17%, #0d0d0d 17.4% 18.5%, transparent 18.8%),
    repeating-radial-gradient(circle, #151515 0 .9px, #242424 .9px 2.2px);
  box-shadow: inset 0 0 0 .18em #0b0b0b, inset 0 0 0 .24em rgba(255, 255, 255, .1), 0 1em 2em rgba(0, 0, 0, .6);
  animation: discSpin 5s linear infinite;
}
.disc-spin::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 20deg, transparent, rgba(255, 255, 255, .2) 8%, transparent 18%, transparent 50%, rgba(255, 255, 255, .15) 58%, transparent 68%); }
@keyframes discSpin { to { transform: rotate(360deg); } }

/* reduced motion: faces cross-fade instead of flipping */
.card3d.rm .card-back { transform: none; transition: opacity .5s; opacity: 0; }
.card3d.rm .card-face { transition: opacity .5s; }
.card3d.rm .card-flip { transform: none !important; }
.card3d.rm.facedown .card-back { opacity: 1; }
.card3d.rm.facedown .card-face { opacity: 0; }

/* ---------- Result ---------- */
.result { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 14px; }
.result > * { animation: rise .8s var(--ease-out) both; }
.result > :nth-child(2) { animation-delay: .06s; }
.result > :nth-child(3) { animation-delay: .12s; }
.result > :nth-child(5) { animation-delay: .18s; }
.result > :nth-child(6) { animation-delay: .24s; }
.result-title { font-size: clamp(34px, 9.4vw, 52px); line-height: 1.06; font-weight: 600; letter-spacing: -.03em; text-align: center; outline: none; }
.result-sub { text-align: center; font-size: 17px; color: var(--muted); text-wrap: balance; }
.result-sub b { color: var(--ink); font-weight: 600; }
.r-common { color: var(--ink-2); }
.r-rare { color: var(--gold-2); }
.r-epic { color: var(--prism); }
.r-legendary { background: linear-gradient(90deg, var(--gold-3), var(--prism), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.actions { position: relative; z-index: 5; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.actions .btn { width: 100%; padding: 0 12px; height: 50px; }
.one-card { text-align: center; font-size: 13px; color: var(--subtle); }

.panel { margin-top: 10px; padding: 22px 20px; border-radius: 22px; background: var(--s2); display: flex; flex-direction: column; gap: 14px; }
.panel h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.panel-copy { font-size: 15px; color: var(--muted); line-height: 1.45; }
.invite { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 14px; border-radius: 14px; background: var(--s3); }
.invite:focus-within { box-shadow: 0 0 0 2px var(--gold); }
.invite-link { flex: 1; min-width: 0; height: 36px; border: 0; background: none; outline: none; padding: 0; font-family: var(--mono); font-size: 13.5px; letter-spacing: 0; color: var(--gold-2); text-overflow: ellipsis; }
.rows { display: flex; flex-direction: column; }
.row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-size: 15px; border-top: 1px solid var(--line); }
.row dt { color: var(--muted); }
.row dd { color: var(--ink); font-weight: 600; }

.set-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.set-boost { font-size: 13px; font-weight: 600; color: var(--prism); font-family: var(--mono); letter-spacing: 0; white-space: nowrap; }
.set-list { display: flex; flex-direction: column; }
.set-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.set-list img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--s3); flex: none; }
.set-list .si { flex: 1; min-width: 0; }
.set-list .si b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-list .si span { display: block; font-size: 13px; }
.set-list .odds { font-family: var(--mono); font-size: 13px; color: var(--ink-2); letter-spacing: 0; flex: none; }
.set-list li.mine .odds { color: #000; background: var(--gold); padding: 3px 9px; border-radius: 99px; font-family: var(--font); font-weight: 600; font-size: 12px; }
.d-common { color: var(--muted); }
.d-rare { color: var(--gold-2); }
.d-epic { color: var(--prism); }
.d-legendary { color: var(--gold-3); }
.fine { font-size: 12.5px; line-height: 1.45; color: var(--subtle); }

/* ---------- About ---------- */
.about { max-width: 1024px; margin: 0 auto; padding: 88px 20px 24px; }
.about h2 { margin-top: 10px; font-size: clamp(36px, 9vw, 64px); line-height: 1.06; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
.about .lede { margin-top: 16px; max-width: 34ch; }
.bento { margin-top: 44px; display: grid; grid-template-columns: 1fr; gap: 12px; }
.tile { border-radius: 24px; background: var(--s2); padding: 26px 24px; overflow: hidden; }
.tile h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.tile p { margin-top: 6px; font-size: 16px; color: var(--muted); line-height: 1.45; }
.t-ico { width: 30px; height: 30px; color: var(--gold); --ibg: var(--s2); margin-bottom: 16px; }
.tile-photo { padding: 0; display: flex; flex-direction: column; }
.tile-photo img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.tile-copy { padding: 22px 24px 26px; }
.trust { margin-top: 12px; border-radius: 24px; background: var(--s2); padding: 26px 24px; }
.trust h3 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.trust-list { margin-top: 14px; display: grid; gap: 12px; }
.trust-list li { position: relative; padding-left: 28px; font-size: 16px; color: var(--ink-2); line-height: 1.45; }
.trust-list li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4.2 4.2L18.5 8'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.badge-v, .badge-a { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; margin: 0 6px 4px 0; border-radius: 99px; font-size: 12px; font-weight: 600; vertical-align: 1px; }
.badge-v { background: rgba(48, 209, 88, .15); color: #5de07f; }
.badge-a { background: rgba(207, 174, 114, .16); color: var(--gold-2); }
.who { margin-top: 12px; display: grid; gap: 12px; }
.who li { padding: 22px 24px; border-radius: 24px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 4px; }
.who b { font-size: 17px; font-weight: 600; }
.who span { font-size: 15px; color: var(--muted); }

.outro { max-width: 1024px; margin: 0 auto; padding: 110px 20px 72px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.outro-mark { font-size: clamp(64px, 20vw, 168px); font-weight: 600; letter-spacing: .16em; margin-right: -.16em; line-height: .95; }
.outro h2 { font-size: clamp(28px, 7vw, 44px); font-weight: 600; letter-spacing: -.03em; margin-bottom: 22px; }
.outro .btn { max-width: 320px; }

.foot { max-width: 1024px; margin: 0 auto; padding: 22px 20px calc(30px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 12px; color: var(--subtle); }
.foot-row { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; }
.credits { margin-top: 14px; text-align: center; }
.credits summary { cursor: pointer; color: var(--muted); display: inline-block; }
.credits ul { margin-top: 12px; text-align: left; columns: 1; column-gap: 24px; font-size: 11.5px; line-height: 1.5; }
.credits li { break-inside: avoid; margin-bottom: 4px; }
.credits a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .2); text-underline-offset: 2px; }

/* ---------- FX layers ---------- */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 45; }
.flash { position: fixed; inset: 0; z-index: 44; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 45%, var(--flash, rgba(255, 244, 214, .8)), transparent 65%); }
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--ink);
  background: rgba(44, 44, 46, .82); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 30px rgba(0, 0, 0, .5);
  opacity: 0; transform: translate(-50%, 14px); pointer-events: none;
  transition: opacity .25s var(--ease-out), transform .4s var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ico-u { color: var(--green); }
.toast.err .ico-u { color: var(--red); }

.dev { position: fixed; left: 12px; bottom: 12px; z-index: 70; padding: 8px; border-radius: 14px; display: flex; flex-wrap: wrap; gap: 6px; max-width: 320px; background: rgba(44, 44, 46, .9); font: 600 12px/1 var(--mono); }
.dev button, .dev select { height: 30px; border-radius: 9px; border: 0; padding: 0 10px; background: rgba(255, 255, 255, .1); color: var(--ink); cursor: pointer; font: inherit; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 359px) {
  .actions { grid-template-columns: 1fr; }
}
@media (min-width: 640px) {
  .picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .opt.wide { grid-column: span 2; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-wide { grid-column: span 2; flex-direction: row; }
  .tile-wide img { width: 50%; height: auto; aspect-ratio: auto; min-height: 320px; }
  .tile-wide .tile-copy { display: flex; flex-direction: column; justify-content: center; padding: 32px; }
  .tile-wide h3 { font-size: 28px; }
  .who { grid-template-columns: repeat(3, 1fr); }
  .credits ul { columns: 2; }
}
@media (min-width: 980px) {
  .nav-in { padding: 0 22px; }
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: 72px; row-gap: 36px; align-items: start;
    grid-template-areas: "copy wall" "form wall";
    padding-top: calc(48px + 88px);
  }
  .hero-copy { text-align: left; align-items: flex-start; }
  .hero h1 { font-size: 64px; }
  .join { margin: 0; }
  .wall { max-width: 440px; gap: 10px; position: sticky; top: 96px; }
  .wt { border-radius: 20px; }
  .stage { padding-top: calc(48px + 64px); }
  .stage.done { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: start; column-gap: 56px; }
  .stage.done .stage-area { position: sticky; top: 90px; min-height: calc(100svh - 140px); padding: 0 0 70px; }
  .stage.done .result { margin-top: 24px; }
  .stage.done .result-title, .stage.done .result-sub, .stage.done .one-card { text-align: left; }
  .card3d { --cw: 330px; }
  .card3d[data-shape="coin"] { --cw: 380px; }
  .card3d[data-shape="vinyl"] { --cw: 300px; }
  .pack-wrap { width: 280px; }
  .pack { --pw: 280px; }
  .pack-shadow { width: 220px; transform: translateY(252px); }
  .bento { grid-template-columns: repeat(3, 1fr); }
  .tile-wide { grid-column: span 2; }
  .trust { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
  .trust-list { margin-top: 0; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
  .credits ul { columns: 3; }
}

/* ---------- Reduced motion: no rotations, no particles, only simple fades ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-copy > *, .wall, .join, .result > *, .stage-head { animation: fadeIn .4s ease both !important; animation-duration: .4s !important; }
  .pack-wrap, .pack, .pack-drop, .pack-shadow, .pk-holo, .pk-sheen, .wt.slot, .disc-spin, .cf-sparks i, .aura, .stage-hint, .pk-swipe i, .cf-foilsheen, .save-menu { animation: none !important; }
  .pk-swipe { display: none; }
  .pack { transform: none !important; }
  .card3d .card-tilt { transform: none !important; }
  .card3d.rm .card-back, .card3d.rm .card-face { transition-duration: .5s !important; }
  .other-wrap, .opt label, .toast { transition-duration: .2s !important; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* the wall again at the end, with your piece in the empty slot */
.outro-wall { width: 100%; max-width: 300px; margin: 30px auto 14px; animation: none; }
.outro-wall .wt { border-radius: 14px; }


/* =========================================================
   v3 additions: swipe to tear, card story, save menu, grail, invite rewards
   ========================================================= */

/* ---------- Swipe to tear ---------- */
.pack { touch-action: pan-y; }
.pk-rip {
  position: absolute; left: 3%; right: 3%; top: calc(15% - 1px); height: 3px; border-radius: 3px; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 241, 204, 0), #FFF3D6 25%, #fff 50%, #FFF3D6 75%, rgba(255, 241, 204, 0));
  box-shadow: 0 0 12px rgba(255, 236, 190, .9), 0 0 30px rgba(246, 227, 176, .5);
  transform: scaleX(0); transform-origin: 0 50%; opacity: 0;
}
.pk-swipe { position: absolute; left: 9%; right: 9%; top: calc(15% - 5px); height: 10px; pointer-events: none; transition: opacity .3s; }
.pk-swipe i { position: absolute; top: 0; left: 0; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff, 0 0 22px rgba(246, 227, 176, .9); opacity: 0; animation: swipeHint 2.6s var(--ease) 2s infinite; }
.pk-swipe i::before { content: ""; position: absolute; right: 6px; top: 3px; width: 56px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75)); }
@keyframes swipeHint {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 1; }
  70% { transform: translateX(calc(var(--pw) * .74)); opacity: 1; }
  85%, 100% { transform: translateX(calc(var(--pw) * .78)); opacity: 0; }
}
.pack.touched .pk-swipe { opacity: 0; }
.stage-hint { display: inline-flex; align-items: center; gap: 8px; }
.stage-hint .ico-u { width: 18px; height: 18px; }
.stage-hint.still .ico-u { display: none; }

/* ---------- Card back: the story of the piece ---------- */
.cb-info { display: none; }
.card3d.revealed .cb { display: none; }
.card3d.revealed .cb-info { display: flex; }
.cb-info { position: absolute; inset: 0; z-index: 1; flex-direction: column; padding: 1.5em 1.45em 1.3em; text-align: left; }
.cbi-head { display: flex; align-items: center; justify-content: space-between; gap: .6em; }
.cbi-pos { font-size: .62em; color: var(--muted); font-weight: 500; white-space: nowrap; }
.cbi-name { margin-top: 1em; font-size: 1.45em; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: #fff; }
.cbi-meta { margin-top: .3em; font-size: .72em; color: var(--muted); }
.cbi-story { margin-top: 1em; font-size: .86em; line-height: 1.45; color: var(--ink-2); letter-spacing: -.01em; }
.cbi-rows { margin-top: auto; display: flex; flex-direction: column; }
.cbi-rows div { display: flex; justify-content: space-between; gap: 1em; padding: .55em 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .7em; }
.cbi-rows dt { color: var(--muted); flex: none; }
.cbi-rows dd { color: var(--ink); font-weight: 600; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbi-grail dd { color: var(--gold-2); }
.cbi-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; margin-top: .5em; padding-top: .6em; border-top: 1px solid rgba(255, 255, 255, .08); }
.cbi-credit { font-size: .5em; color: var(--subtle); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbi-logo { font-size: .66em; font-weight: 700; letter-spacing: .32em; margin-right: -.32em; color: var(--tone-2); flex: none; }
.card3d[data-shape="coin"] .cb-info { padding: 3em 3.2em 2.6em; text-align: center; align-items: center; justify-content: center; }
.card3d[data-shape="coin"] .cbi-head { flex-direction: column; gap: .45em; }
.card3d[data-shape="coin"] .cbi-name { margin-top: .6em; font-size: 1.2em; }
.card3d[data-shape="coin"] .cbi-story { margin-top: .6em; font-size: .72em; }
.card3d[data-shape="coin"] .cbi-rows { margin-top: .8em; width: 82%; }
.card3d[data-shape="coin"] .cbi-foot { display: none; }
.card3d[data-shape="vinyl"] .cb-info { padding: 1.2em 1.2em 1em; }
.card3d[data-shape="vinyl"] .cbi-name { margin-top: .7em; font-size: 1.2em; }
.card3d[data-shape="vinyl"] .cbi-story { margin-top: .6em; font-size: .76em; }
.card3d[data-shape="stamp"] .cb-info { padding: 1.9em 1.8em 1.6em; }
.card3d.rm.flipped .card-back { opacity: 1; }
.card3d.rm.flipped .card-face { opacity: 0; }

.flip-btn {
  display: none; position: absolute; left: 50%; top: 100%; translate: -50% 0; margin-top: 30px;
  height: 34px; padding: 0 14px; border: 0; border-radius: 999px; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .08); color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s;
}
.flip-btn:hover { background: rgba(255, 255, 255, .14); color: var(--ink); }
.flip-btn .ico-u { width: 16px; height: 16px; }
.stage.done .flip-btn { display: inline-flex; }

/* ---------- Foil edition (1 invite) + Founding Collector badge (5 invites) ---------- */
.cf-tags { display: inline-flex; align-items: center; gap: .35em; min-width: 0; }
.cf-foil {
  display: inline-flex; align-items: center; height: 1.9em; padding: 0 .7em; border-radius: 99px;
  font-size: .62em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #1a1408;
  background: linear-gradient(110deg, #F6E3B0, #fff 35%, #BFF5EC 55%, #F5C98F 80%);
}
.cf-foilsheen {
  display: none; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; mix-blend-mode: overlay;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .6) 46%, rgba(191, 245, 236, .45) 50%, rgba(255, 230, 180, .5) 54%, transparent 62%);
  background-size: 260% 100%; animation: foilSweep 3.8s var(--ease) infinite;
}
.card3d.foil .cf-foilsheen { display: block; }
@keyframes foilSweep { 0% { background-position: 120% 0; } 60%, 100% { background-position: -20% 0; } }
.fc-badge { display: inline-block; width: 1.05em; height: 1.05em; margin-left: .3em; vertical-align: -.16em; color: var(--gold-2); filter: drop-shadow(0 0 .3em rgba(230, 201, 142, .55)); }

/* ---------- Save menu ---------- */
.save-wrap { position: relative; }
.save-wrap > .btn { width: 100%; }
.save-menu {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; min-width: 250px; padding: 6px; border-radius: 16px;
  background: rgba(44, 44, 46, .94); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 44px rgba(0, 0, 0, .6);
  display: flex; flex-direction: column; gap: 2px; transform-origin: top left; animation: menuIn .22s var(--ease-out);
}
@keyframes menuIn { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.save-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 11px; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.save-menu button:hover, .save-menu button:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.save-menu b { display: block; font-size: 15px; font-weight: 600; }
.save-menu small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--muted); }
.sm-shape { flex: none; width: 22px; height: 27px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.sm-shape.story { width: 19px; height: 34px; }

/* ---------- Grail ---------- */
.grail-form { display: flex; gap: 8px; align-items: center; }
.grail-form .input { height: 46px; font-size: 16px; }
.grail-form .btn-small { height: 46px; padding: 0 18px; flex: none; }
.grail-saved { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--s3); }
.gs-label { flex: none; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.grail-saved b { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-btn { flex: none; border: 0; background: none; padding: 4px; color: var(--gold-2); font-size: 14px; font-weight: 500; cursor: pointer; }

/* ---------- Invite rewards ---------- */
.miles { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.miles-head { display: flex; justify-content: space-between; align-items: baseline; }
.miles-head h4 { margin: 0; font-size: 15px; font-weight: 600; }
.miles-head span { font-size: 13px; color: var(--muted); }
.miles-bar { position: relative; height: 6px; margin: 4px 6px 8px; border-radius: 6px; background: var(--s4); }
.miles-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-3)); transition: width .8s var(--ease-out); }
.miles-bar span { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; translate: -50% -50%; background: var(--s2); box-shadow: inset 0 0 0 2px #3a3a3c; transition: background .3s, box-shadow .3s; }
.miles-bar span.on { background: var(--gold); box-shadow: 0 0 0 3px rgba(207, 174, 114, .25); }
.miles-list { display: flex; flex-direction: column; gap: 12px; }
.mile { display: flex; align-items: flex-start; gap: 12px; }
.mile-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); color: var(--muted); font: 600 13px/1 var(--mono); letter-spacing: 0; }
.mile-ic .ico-u { width: 16px; height: 16px; }
.mile.on .mile-ic { background: var(--gold); color: #000; }
.mile .mt { flex: 1; min-width: 0; }
.mile b { display: block; font-size: 15px; font-weight: 600; }
.mile .mt span { display: block; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.mile .ms { flex: none; padding-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mile.on .ms { color: var(--gold-2); }


/* ---------- The film: the ad, in an iPhone ---------- */
.about-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; }
.film-controls { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.film-controls .btn { height: 44px; padding: 0 18px; font-size: 15px; }
.btn-ghost { background: none; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
@media (hover: hover) { .btn-ghost:hover { background: rgba(255, 255, 255, .06); color: var(--ink); } }
.film-cap { margin-top: 12px; font-size: 14px; color: var(--muted); }
.phone {
  position: relative; justify-self: center; width: min(290px, 74vw); aspect-ratio: 9 / 19.3; padding: 10px; border-radius: 50px;
  background: linear-gradient(145deg, #3a3a3c, #1c1c1e 40%, #2c2c2e);
  box-shadow: inset 0 0 0 1.5px #4a4a4d, inset 0 0 0 4px #0b0b0b, 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 120px rgba(207, 174, 114, .08);
}
.phone-screen { position: relative; height: 100%; border-radius: 41px; overflow: hidden; background: #000; cursor: pointer; }
.phone-screen video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.film-again {
  position: absolute; left: 50%; bottom: 4.5%; translate: -50% 8px; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: var(--ink); background: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none; transition: opacity .35s, translate .35s var(--ease-out), background .2s;
}
@media (hover: hover) { .film-again:hover { background: rgba(255, 255, 255, .24); } }
.film-again .ico-u { width: 15px; height: 15px; }
.phone-screen.ended .film-again { opacity: 1; translate: -50% 0; pointer-events: auto; }
.island { position: absolute; top: 11px; left: 50%; translate: -50% 0; width: 31%; height: 26px; border-radius: 20px; background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); }
.phone::after { content: ""; position: absolute; right: -3px; top: 24%; width: 3px; height: 12%; border-radius: 0 3px 3px 0; background: #2a2a2c; }
@media (min-width: 980px) {
  .about-top { grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; }
  .phone { width: 320px; }
}
