:root {
  --gold: #f6d900;
  --gold-deep: #c1a900;
  --bg: #0a0a0c;
  --panel: #141418;
  --line: #2a2a30;
  --text: #f1f1f1;
  --muted: #8a8a92;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
:root { color-scheme: dark; accent-color: #f6d900; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Archivo Black', system-ui, sans-serif;
  overflow-x: hidden;
  transition: padding-right .28s ease;
}

.hidden { display: none !important; }

/* ---------- screens ---------- */
.screen { display: none; min-height: 100dvh; flex-direction: column; }
.screen.active { display: flex; }

/* ---------- landing ---------- */
#screen-landing {
  align-items: stretch; justify-content: flex-start; text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(246,217,0,.13), transparent),
    var(--bg);
  overflow-x: hidden; overflow-y: auto;
}
.landing-shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  min-height: 100%;
  box-sizing: border-box;
}
.landing-inner { padding: 32px 20px; max-width: 560px; width: 100%; flex: 1 1 auto; }

.pixel-tag {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px; letter-spacing: 1px;
  color: var(--gold);
  border: 1px solid var(--gold-deep);
  display: inline-block; padding: 8px 14px; border-radius: 2px;
  margin-bottom: 28px;
  text-shadow: 0 0 12px rgba(246,217,0,.5);
}
.pixel-tag.small { font-size: 8px; padding: 6px 8px; margin: 0; }

h1 { font-size: clamp(44px, 9vw, 84px); line-height: .95; letter-spacing: -1px; }
h1 .gold {
  color: var(--gold);
  text-shadow: 0 0 30px rgba(246,217,0,.35);
}

.sub { color: var(--muted); font-family: system-ui, sans-serif; font-size: 15px; line-height: 1.5; margin: 20px 0 32px; }


.landing-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }

/* ---------- wallet sheet (mobile MetaMask deep link) ---------- */
.wallet-sheet {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none; opacity: 0;
  transition: opacity .2s ease;
}
.wallet-sheet.open { pointer-events: auto; opacity: 1; }
.wallet-sheet-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.72);
}
.wallet-sheet-panel {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: var(--panel); border: 1px solid var(--line); border-bottom: none;
  border-radius: 14px 14px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px; align-items: stretch;
  transform: translateY(100%); transition: transform .24s ease;
}
.wallet-sheet.open .wallet-sheet-panel { transform: translateY(0); }
.wallet-sheet-title {
  font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--gold);
  text-align: center; letter-spacing: 1px;
}
.wallet-sheet-lede {
  color: var(--muted); font-family: system-ui, sans-serif; font-size: 14px;
  line-height: 1.5; text-align: center; margin: 0;
}
.wallet-options { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.wallet-opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px; border-radius: 8px; cursor: pointer; text-decoration: none;
  background: #0e0e11; border: 1px solid var(--line); color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
.wallet-opt:hover, .wallet-opt:focus-visible {
  border-color: var(--gold-deep); outline: none;
  box-shadow: 0 0 16px rgba(246,217,0,.15);
}
.wallet-opt-primary {
  border-color: var(--gold-deep);
  background: linear-gradient(180deg, #1c1605, #0e0e11 70%);
}
.wallet-opt-primary:hover, .wallet-opt-primary:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(246,217,0,.22);
}
.wallet-opt-icon { font-size: 28px; line-height: 1; flex: none; }
.wallet-opt-text { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.wallet-opt-text b { font-family: 'Archivo Black', sans-serif; font-size: 16px; }
.wallet-opt-text small { color: var(--muted); font-family: system-ui, sans-serif; font-size: 12px; }
.wallet-sheet .btn { min-width: 0; width: 100%; }
.wallet-sheet .linkish { align-self: center; margin-top: 2px; }
.wallet-sheet-help {
  color: var(--muted); font-family: system-ui, sans-serif; font-size: 12px;
  line-height: 1.45; text-align: center; margin: 0;
}
@media (min-width: 641px) {
  .wallet-sheet { align-items: center; padding: 20px; }
  .wallet-sheet-panel { border-radius: 14px; border-bottom: 1px solid var(--line); transform: translateY(12px) scale(.98); }
  .wallet-sheet.open .wallet-sheet-panel { transform: translateY(0) scale(1); }
}

/* ---------- buttons ---------- */
.btn {
  font-family: 'Archivo Black', sans-serif;
  font-size: 15px; letter-spacing: .5px;
  padding: 14px 28px; border-radius: 4px;
  border: none; cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease;
  min-width: 240px;
}
.btn:active { transform: scale(.97); }
.btn.small { min-width: 0; padding: 8px 14px; font-size: 12px; }
.btn.big { font-size: 18px; padding: 16px 36px; }

.btn-gold {
  background: linear-gradient(180deg, #ffe94d, var(--gold) 45%, var(--gold-deep));
  color: #141400;
  box-shadow: 0 4px 24px rgba(246,217,0,.35);
}
.btn-gold:hover { box-shadow: 0 4px 34px rgba(246,217,0,.55); }

.btn-dark { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.btn-dark:hover { border-color: var(--gold-deep); }

.btn-ghost { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.btn-ghost:hover { color: var(--gold); border-color: var(--gold-deep); }

.address-form { display: flex; gap: 8px; margin-top: 16px; justify-content: center; }
.address-form input {
  flex: 1; max-width: 360px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  color: var(--text); font-family: monospace; font-size: 13px; padding: 12px;
}
.address-form input:focus { outline: none; border-color: var(--gold-deep); }

.status { color: var(--gold); font-family: 'Press Start 2P', monospace; font-size: 8px; line-height: 1.8; min-height: 20px; margin-top: 18px; text-align: center; padding: 0 16px; }
#result-status { font-size: 8px; padding: 10px 16px 18px; }
.fineprint { color: #55555c; font-family: system-ui, sans-serif; font-size: 12px; margin-top: 26px; }


.fineprint.disclaimer { font-size: 11px; max-width: 480px; margin: 20px auto 0; line-height: 1.5; color: #45454c; }

/* ---------- fx chips / stacking / recording ---------- */
.fx-row { display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding: 2px 4px; scrollbar-width: none; }
.fx-row::-webkit-scrollbar { display: none; }
.chip {
  font-family: 'Press Start 2P', monospace; font-size: 8px; letter-spacing: .5px;
  color: var(--muted); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 13px; cursor: pointer; white-space: nowrap; flex: none;
  transition: color .12s, border-color .12s;
}
.chip:hover { border-color: var(--gold-deep); color: var(--text); }
.chip.active {
  color: #141400;
  background: linear-gradient(180deg, #ffe94d, var(--gold) 45%, var(--gold-deep));
  border-color: var(--gold);
}
#btn-adjust { display: none; }

.stack-row {
  display: flex; gap: 8px; align-items: center;
  flex-wrap: nowrap; justify-content: flex-start;
  max-width: 100%; overflow-x: auto; overflow-y: hidden;
  padding: 2px 4px 6px; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.stack-row::-webkit-scrollbar { display: none; }
.stack-label { font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--muted); flex: none; }
.stack-thumb {
  width: 46px; height: 46px; border: 2px solid var(--line); border-radius: 6px;
  cursor: pointer; image-rendering: pixelated; background: #0e0e11; opacity: .5;
  transition: border-color .12s, opacity .12s; flex: none;
}
.stack-thumb.worn { border-color: var(--gold); opacity: 1; box-shadow: 0 0 12px rgba(246,217,0,.35); }

.cap-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }


/* ---------- header bar ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  gap: 10px;
}
.bar-title { font-size: 16px; letter-spacing: 1px; text-align: center; }

/* ---------- picker ---------- */
.chain-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px; padding: 18px; max-width: 1100px; margin: 0 auto; width: 100%;
}
.chain-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 12px; cursor: pointer; text-align: center;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.chain-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(246,217,0,.15); }
.chain-card img { width: 100%; image-rendering: pixelated; background: #0e0e11; border-radius: 4px; }
.chain-card .name { font-size: 13px; margin-top: 10px; }
.chain-card .trait { font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--muted); margin-top: 6px; line-height: 1.6; }

.chain-card.baller-card {
  border-color: var(--gold-deep);
  background: linear-gradient(180deg, #1c1605, var(--panel) 55%);
  box-shadow: 0 0 18px rgba(246,217,0,.12);
}
.chain-card.baller-card img { background: #131007; }
.baller-badge {
  font-family: 'Press Start 2P', monospace; font-size: 8px;
  color: #141400;
  background: linear-gradient(180deg, #ffe94d, var(--gold) 45%, var(--gold-deep));
  border-radius: 3px; padding: 4px 7px; display: inline-block; margin-top: 8px;
}
.loaner-badge {
  font-family: 'Press Start 2P', monospace; font-size: 7px; letter-spacing: .5px;
  color: var(--gold); border: 1px solid var(--gold-deep);
  border-radius: 3px; padding: 4px 7px; display: inline-block; margin-top: 8px;
}
.chain-card.loaner-card { border-style: dashed; }

/* ---------- camera ---------- */
#screen-camera { background: #000; }
#screen-camera.active {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
.camera-stage {
  position: relative; flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #000;
}
#video { display: none; }
#stage {
  display: block;
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
}
.camera-hint {
  position: absolute; inset: auto 0 18px 0; text-align: center;
  font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--gold);
  text-shadow: 0 2px 8px #000; pointer-events: none;
}
/* model download: a real progress bar under the hint */
.camera-hint.loading::after {
  content: ''; display: block; margin: 8px auto 0; height: 4px; width: min(60%, 240px);
  background: linear-gradient(to right, var(--gold) var(--p, 0%), rgba(255,255,255,.15) var(--p, 0%));
  border-radius: 2px; box-shadow: 0 0 10px rgba(246,217,0,.4);
}

.camera-controls {
  flex-shrink: 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px; align-items: center;
  border-top: 1px solid var(--line); background: var(--bg);
}
.sliders { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.sliders label { font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.sliders input[type=range] { accent-color: var(--gold); width: 130px; }

/* ---------- result ---------- */
.result-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 18px; }
#card { max-width: min(92vw, 440px); max-height: 62dvh; border-radius: 6px; box-shadow: 0 10px 60px rgba(246,217,0,.18); }

@media (max-width: 600px) {
  .btn { min-width: 200px; }
}

/* ---------- v2: buy pill, census, rental ---------- */
.buy-pill {
  position: absolute; top: 14px; right: 14px;
  font-family: 'Press Start 2P', monospace; font-size: 8px; letter-spacing: .5px;
  color: #141400; text-decoration: none;
  background: linear-gradient(180deg, #ffe94d, var(--gold) 45%, var(--gold-deep));
  border-radius: 999px; padding: 10px 14px;
  box-shadow: 0 4px 20px rgba(246,217,0,.45);
  animation: buypulse 2.4s ease-in-out 2;
}
@keyframes buypulse { 50% { box-shadow: 0 4px 34px rgba(246,217,0,.8); } }


.census-sub { color: var(--muted); font-family: system-ui, sans-serif; font-size: 13px; text-align: center; padding: 14px 16px 0; }

.vault-cta { text-align: center; padding: 6px 16px 0; }



/* ---------- lore / the story ---------- */

.t-date { font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--gold); letter-spacing: 1px; }

.lore-sub { font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--gold); text-align: center; margin-bottom: 18px; letter-spacing: 1px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 32px; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px 14px; text-align: center; }
.fact b { display: block; font-family: 'Archivo Black', sans-serif; font-size: 26px; color: var(--gold); margin-bottom: 8px; }
.fact span { color: var(--muted); font-family: system-ui, sans-serif; font-size: 12px; line-height: 1.5; }


.sources { display: flex; flex-direction: column; gap: 8px; margin-bottom: 26px; }
.sources a {
  display: flex; gap: 12px; align-items: baseline; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px;
  transition: border-color .15s;
}
.sources a:hover { border-color: var(--gold-deep); }
.sources b { font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--gold); flex: none; min-width: 74px; }
.sources span { color: var(--muted); font-family: system-ui, sans-serif; font-size: 12.5px; line-height: 1.5; }


/* ---------- discord / community ---------- */
.landing-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }


/* ============================================================
   Panel-2 build: hero chain, result IA, clasp/print, mobile
   ============================================================ */

/* ---------- landing: show the chain ---------- */
.hero-chain { position: relative; opacity: 0; max-height: 0; overflow: hidden; transition: opacity .5s ease, max-height .4s ease; margin: 6px auto 0; width: min(62vw, 300px); }
.hero-chain.ready { opacity: 1; max-height: 400px; overflow: visible; }
.hero-chain img { display: block; width: 100%; height: min(62vw, 300px); object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 22px rgba(246,217,0,.28));
  animation: sway 6s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(3px) rotate(1deg); } }
.hero-cap { font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--muted); margin: 8px -80px 4px; letter-spacing: 0; white-space: nowrap; line-height: 1.6; }
.landing-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin-top: 18px; color: #3a3a40; font-family: 'Press Start 2P', monospace; font-size: 8px; }
.linkish { background: none; border: 0; padding: 6px 2px; color: var(--gold); font-family: 'Press Start 2P', monospace; font-size: 8px; cursor: pointer; letter-spacing: 0;
  text-decoration: underline; text-decoration-color: var(--gold-deep); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.linkish:hover { color: #ffe94d; text-decoration-color: var(--gold); }
.landing-links { margin-top: 10px; }
.sub { margin: 22px 0 8px; }
.landing-actions { margin-top: 26px; }

/* ---------- camera: flash + countdown + chip row edge fade ---------- */
.countdown {
  position: fixed; inset: 0; z-index: 200;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(0,0,0,.62); pointer-events: none;
}
.countdown.on { display: flex; }
.countdown-num {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(120px, 34vw, 220px); line-height: 1; color: var(--gold);
  text-shadow: 0 4px 24px rgba(0,0,0,.85), 0 0 60px rgba(246,217,0,.45);
}
.countdown-num.pop { animation: countpop 1s ease-out both; }
.countdown-label {
  font-family: 'Press Start 2P', monospace; font-size: 10px; letter-spacing: 1px;
  color: var(--gold); text-shadow: 0 2px 8px #000;
}
@keyframes countpop {
  0% { opacity: 0; transform: scale(1.25); }
  12% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.on { animation: flashout .22s ease-out both; }
@keyframes flashout { 0% { opacity: .85; } 100% { opacity: 0; } }
.fx-row { mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent); }

/* ---------- result: the print, the doorway, thumbs-first bar ---------- */
#card.printing { animation: print .6s steps(24, end) both; }
@keyframes print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
#screen-result .result-stage { padding: 12px 16px 6px; }
#card { max-height: min(62dvh, calc(100dvh - 300px)); }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .landing-inner { padding: 22px 16px; }
  h1 { font-size: clamp(40px, 13vw, 60px); }
  .sub { font-size: 14px; margin: 14px 0 10px; }
  .sub br { display: none; }
  .landing-actions .btn { min-width: 0; width: 100%; max-width: 360px; }
  .btn.big { font-size: 16px; padding: 15px 22px; }

  /* camera: preview-first — fill leftover space, never squash the feed */
  #screen-camera .bar {
    flex-shrink: 0;
    padding: 8px 12px;
  }
  #screen-camera .bar-title { font-size: 13px; letter-spacing: 0; }
  #screen-camera .pixel-tag.small { padding: 5px 6px; }

  .camera-stage {
    flex: 1 1 auto;
    min-height: 48dvh;
    max-height: none;
  }
  #stage {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  .camera-hint { bottom: 10px; font-size: 7px; line-height: 1.5; padding: 0 10px; }

  .buy-pill { top: 10px; right: 10px; padding: 7px 10px; font-size: 7px; max-width: 46%; }

  .camera-controls {
    flex: 0 0 auto;
    overflow: visible;
    padding: 8px 12px 0;
    gap: 8px;
    width: 100%;
  }
  .camera-controls .fx-row { padding: 0 2px; }
  .camera-controls .chip { padding: 7px 10px; font-size: 7px; }
  #btn-adjust { display: inline-block; }
  .camera-controls .sliders {
    display: none;
    gap: 8px; width: 100%; justify-content: center;
  }
  .camera-controls.adjust-open .sliders { display: flex; }
  .camera-controls .sliders label { gap: 6px; font-size: 7px; }
  .camera-controls .sliders input[type=range] { width: min(34vw, 120px); }

  /* one-line swap strip — never a wrapping vault grid */
  .camera-controls .stack-row {
    width: 100%;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 6px;
    padding: 0 2px 4px;
    mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 16px), transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 16px), transparent);
  }
  .camera-controls .stack-thumb { width: 40px; height: 40px; }
  .camera-controls .stack-label { font-size: 7px; }

  .camera-controls .cap-row {
    flex-wrap: nowrap;
    width: 100%;
    margin: 0;
    padding: 6px 0 calc(10px + env(safe-area-inset-bottom));
  }
  .camera-controls .cap-row .btn {
    min-width: 0;
    width: 100%;
    max-width: none;
  }
  #btn-vault-cam { display: none !important; }

  /* result: card is the hero */
  #screen-result .result-stage { padding: 8px 12px 4px; flex: 1 1 auto; min-height: 0; }
  #card { max-width: 92vw; max-height: calc(100dvh - 210px); }
}
@media (max-width: 640px) and (max-height: 700px) {
  .camera-stage { min-height: 42dvh; }
  .camera-controls .chip { padding: 6px 8px; }
  .btn.big { font-size: 15px; padding: 13px 18px; }
  #card { max-height: calc(100dvh - 190px); }
}

/* ---------- flex wall push pane + cards ---------- */
:root { --wall-pane-w: min(300px, 88vw); }

.wall-pane-tab {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 70;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  margin: 0;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, #1c1605, #121214 55%, #0e0e11);
  color: var(--gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: -6px 0 24px rgba(0,0,0,.35);
  transition: right .28s ease, background .15s, color .15s;
}
.wall-pane-tab:hover { color: #ffe94d; background: #1a1508; }
.wall-pane-tab-label { display: inline-block; padding: 4px 0; }
body.wall-pane-open .wall-pane-tab { right: var(--wall-pane-w); transform: translateY(-50%); }

.wall-pane {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: var(--wall-pane-w);
  z-index: 65;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 12px;
  box-sizing: border-box;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(28,22,5,.4), transparent 22%),
    linear-gradient(270deg, #0c0c0e, #101012);
  transform: translateX(100%);
  transition: transform .28s ease;
  text-align: left;
  pointer-events: none;
}
body.wall-pane-open .wall-pane {
  transform: translateX(0);
  pointer-events: auto;
}

body.wall-pane-open { padding-right: var(--wall-pane-w); }

.wall-pane-head { padding-bottom: 12px; }
.wall-pane-head-actions { display: flex; align-items: center; gap: 10px; }
.wall-pane-close {
  appearance: none; border: 1px solid var(--line); background: transparent;
  color: var(--muted); width: 28px; height: 28px; border-radius: 6px;
  cursor: pointer; font-size: 12px; line-height: 1;
}
.wall-pane-close:hover { color: var(--gold); border-color: var(--gold-deep); }
.wall-pane-track {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(180deg, transparent, #000 10px, #000 calc(100% - 18px), transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 10px, #000 calc(100% - 18px), transparent);
}
.wall-pane-track::-webkit-scrollbar { width: 3px; }
.wall-pane-track::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 4px; }
.wall-pane-foot { flex: none; padding-top: 10px; }

.home-wall-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; padding: 0 2px 14px; flex-shrink: 0;
}
.home-wall-title {
  font-family: 'Press Start 2P', monospace; font-size: 7px; letter-spacing: 1px;
  color: var(--gold);
}
.home-wall-link {
  font-family: 'Press Start 2P', monospace; font-size: 7px;
  color: var(--gold); text-decoration: none; white-space: nowrap;
}
.home-wall-link:hover { color: #ffe94d; text-decoration: underline; text-underline-offset: 4px; }
.home-wall-empty {
  text-align: center;
  font-family: 'Press Start 2P', monospace; font-size: 7px; line-height: 1.7;
  color: var(--muted); padding: 18px 8px;
  border: 1px dashed var(--line); border-radius: 8px;
}
.home-wall-card {
  flex: 0 0 auto; width: 100%;
  text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: #0e0e11;
  transition: border-color .15s, transform .12s, box-shadow .15s;
}
.home-wall-card:hover {
  border-color: var(--gold-deep); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(246,217,0,.18);
}
.home-wall-card.owned { border-color: var(--gold-deep); }
.home-wall-card img {
  display: block; width: 100%; aspect-ratio: 1080 / 1350; object-fit: cover;
  background: #0a0a0c;
}
.home-wall-card .hw-meta {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 6px;
  padding: 7px 8px; font-family: 'Press Start 2P', monospace; font-size: 6px;
  color: var(--muted); line-height: 1.7;
}
.home-wall-card .hw-meta span:last-child { min-width: 0; overflow-wrap: anywhere; text-align: right; }
.home-wall-card .hw-badge { color: var(--gold); }
.home-wall-card.owned .hw-badge { color: #ffe94d; }

@media (max-width: 640px) {
  body.wall-pane-open { padding-right: 0; }
  body.wall-pane-open .wall-pane-tab { right: 0; opacity: 0; pointer-events: none; }
}


/* ---------- single flex share page ---------- */
.flex-page-inner {
  max-width: 480px; margin: 0 auto; padding: 8px 16px 24px;
  display: flex; flex-direction: column; align-items: center;
}
.flex-live {
  margin: 0 0 14px; text-align: center;
  font-family: 'Press Start 2P', monospace; font-size: 8px; line-height: 1.6;
  color: var(--gold); text-shadow: 0 0 16px rgba(246,217,0,.35);
}
.flex-hero {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #0a0a0c;
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
}
/* capped so the FLEX BACK button under it is above the fold on a phone */
.flex-hero img { display: block; width: 100%; height: auto; max-height: 58dvh; aspect-ratio: 1080 / 1350; object-fit: contain; }
/* CHAIN FACTS — hover the flex (tap the tag on a phone): the photo lights up
   gold and the chain's on-chain record slides over the bottom of it */
.flex-hero { position: relative; transition: box-shadow .25s ease, border-color .25s ease; }
.flex-hero > img { transition: filter .25s ease; }
.flex-hero.facts-open, .flex-hero:focus-within { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 32px rgba(246,217,0,.35), 0 16px 48px rgba(0,0,0,.45); }
.flex-hero.facts-open > img, .flex-hero:focus-within > img { filter: brightness(1.08) saturate(1.1); }
.chain-tag {
  position: absolute; left: 10px; top: 10px; z-index: 2; cursor: pointer;
  font-family: 'Press Start 2P', monospace; font-size: 7px; letter-spacing: .5px;
  color: var(--gold); background: rgba(10,10,12,.78); border: 1px solid var(--gold-deep);
  border-radius: 4px; padding: 7px 8px; text-shadow: 0 0 8px rgba(246,217,0,.5);
  animation: chaintag 2.4s ease-in-out infinite;
}
.chain-tag { display: inline-flex; align-items: center; gap: 7px; }
.chain-tag .cf-i {
  display: inline-grid; place-items: center; width: 14px; height: 14px; flex: none;
  border-radius: 50%; border: 1px solid currentColor; font-style: normal;
  font-family: 'Archivo Black', system-ui, sans-serif; font-size: 9px; line-height: 1;
}
@keyframes chaintag { 0%, 100% { box-shadow: 0 0 0 rgba(246,217,0,0); } 50% { box-shadow: 0 0 14px rgba(246,217,0,.55); } }
.flex-hero.facts-open .chain-tag, .flex-hero:focus-within .chain-tag { animation: none; background: var(--gold); color: #0a0a0c; text-shadow: none; }
.chain-facts {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 44px 12px 12px;
  background: linear-gradient(180deg, rgba(10,10,12,0), rgba(10,10,12,.88) 16%, rgba(10,10,12,.97));
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  font-family: 'Press Start 2P', monospace; color: var(--text); text-align: left;
}
.flex-hero.facts-open .chain-facts, .flex-hero:focus-within .chain-facts { opacity: 1; transform: none; pointer-events: auto; }
@media (hover: hover) {
  .flex-hero:hover { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 32px rgba(246,217,0,.35), 0 16px 48px rgba(0,0,0,.45); }
  .flex-hero:hover > img { filter: brightness(1.08) saturate(1.1); }
  .flex-hero:hover .chain-tag { animation: none; background: var(--gold); color: #0a0a0c; text-shadow: none; }
  .flex-hero:hover .chain-facts { opacity: 1; transform: none; pointer-events: auto; }
}
.cf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.flex-hero .cf-thumb { width: 64px; height: 64px; max-height: none; aspect-ratio: auto; flex: none; image-rendering: pixelated; object-fit: contain; filter: none; filter: drop-shadow(0 0 10px rgba(246,217,0,.45)); }
.cf-titles { min-width: 0; }
.cf-coll { font-size: 7px; color: var(--gold); line-height: 1.6; text-shadow: 0 0 10px rgba(246,217,0,.4); }
.cf-token { font-size: 10px; color: #fff; line-height: 1.6; margin-top: 2px; }
.cf-sub { font-size: 6px; color: var(--muted); line-height: 1.7; margin-top: 2px; overflow-wrap: anywhere; }
.cf-stats { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0 0 8px; font-size: 7px; line-height: 1.6; }
.cf-stats dt { color: var(--muted); white-space: nowrap; }
.cf-stats dd { margin: 0; color: #fff; overflow-wrap: anywhere; }
.cf-stats dd.cf-price { color: var(--gold); }
.cf-stats dd.cf-price.big { font-size: 9px; text-shadow: 0 0 10px rgba(246,217,0,.5); }
.cf-traits { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.cf-traits:empty { display: none; }
.cf-chip { font-size: 6px; line-height: 1.4; padding: 4px 6px; border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,.04); color: #fff; }
.cf-chip i { font-style: normal; color: var(--muted); }
.cf-links { display: flex; gap: 8px; }
.cf-links .btn { flex: 1; min-height: 36px; font-size: 10px; text-decoration: none; }
@media (hover: none) { .chain-tag { font-size: 8px; padding: 9px 10px; } .flex-hero { cursor: pointer; } }
@media (max-width: 380px) { .chain-facts { padding-top: 30px; } .flex-hero .cf-thumb { width: 48px; height: 48px; } }
@media (prefers-reduced-motion: reduce) { .chain-tag { animation: none; } }
.flex-meta {
  display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 6px;
  font-family: 'Press Start 2P', monospace; font-size: 9px; color: var(--text);
  line-height: 1.7;
}
.flex-meta b { min-width: 0; overflow-wrap: anywhere; }
.flex-caption {
  margin: 0 0 18px; text-align: center; max-width: 420px;
  color: var(--muted); font-family: system-ui, sans-serif; font-size: 14px; line-height: 1.45;
}
.flex-share-bar {
  width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: stretch;
  margin-top: 4px;
}
.flex-share-bar .btn { width: 100%; text-align: center; text-decoration: none; box-sizing: border-box; }

.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; padding: 8px 16px 30px; max-width: 1100px; margin: 0 auto; width: 100%;
}
.wall-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  transition: border-color .15s, transform .12s;
}
.wall-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.wall-card.owned { border-color: var(--gold-deep); }
.wall-card img { display: block; width: 100%; aspect-ratio: 1080 / 1350; object-fit: cover; background: #0a0a0c; }
.wall-meta {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px;
  font-family: 'Press Start 2P', monospace; font-size: 7px; color: var(--text);
  /* Press Start 2P has almost no built-in leading — a wrapped chain name
     collides with the line above it without this. */
  line-height: 1.7;
}
.wall-meta b { min-width: 0; overflow-wrap: anywhere; }
.wall-badge { color: var(--gold); flex: none; }
@media (max-width: 640px) {
  .wall-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .flex-page-inner { padding: 4px 12px 20px; }
}

/* ---------- necks: the hold landing, the board, HELD badges ---------- */
#screen-hold {
  align-items: stretch; justify-content: flex-start; text-align: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(127,231,255,.12), transparent),
    var(--bg);
  overflow-x: hidden; overflow-y: auto;
}
.hold-inner { padding-top: 28px; }
.hold-title { margin: 10px 0 6px; font-size: clamp(30px, 8vw, 56px); line-height: 1; }
.hold-hero { margin: 0 auto; }
.hold-owner {
  font-family: 'Press Start 2P', monospace; font-size: 8px; letter-spacing: 1px;
  color: var(--muted); margin: 10px 0 16px;
}
.hold-count { font-family: 'Archivo Black', system-ui, sans-serif; font-size: 20px; color: var(--text); line-height: 1.2; }
.hold-next {
  font-family: 'Press Start 2P', monospace; font-size: 9px; line-height: 1.7;
  color: var(--gold); margin: 10px 0 20px; text-shadow: 0 0 16px rgba(246,217,0,.35);
}
.neck-tag {
  display: inline-block; margin-top: 4px; padding: 3px 5px; border-radius: 3px;
  font-family: 'Press Start 2P', monospace; font-size: 6px; letter-spacing: 1px;
  color: #0a0a0c; background: var(--gold);
}
.wall-badge.held, .hw-badge.held, .home-wall-card .hw-badge.held { color: #7fe7ff; }
.wall-badge.jackpot, .hw-badge.jackpot, .home-wall-card .hw-badge.jackpot { color: #ffe94d; text-shadow: 0 0 10px rgba(246,217,0,.6); }
.flex-necks {
  margin: 0 0 12px; text-align: center;
  font-family: 'Press Start 2P', monospace; font-size: 7px; line-height: 1.7; color: #7fe7ff;
}

.board-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  text-decoration: none; color: inherit;
  font-family: 'Press Start 2P', monospace; font-size: 8px; line-height: 1.6;
  transition: border-color .15s, transform .12s;
}
.board-row:hover { border-color: var(--gold); transform: translateY(-1px); }
.board-row .rank { color: var(--gold); min-width: 32px; flex: none; }
.board-row .who { flex: 1; min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-row .haul { color: var(--gold); flex: none; }

.pane-board { flex: none; padding: 0 2px 10px; }
.pane-board-title { font-family: 'Press Start 2P', monospace; font-size: 7px; color: var(--gold); margin-bottom: 6px; }
.pane-board .board-row { padding: 6px 8px; margin-bottom: 4px; font-size: 6px; gap: 6px; }
.pane-board .board-row .rank { min-width: 20px; }

@media (max-width: 640px) {
  .board-row { font-size: 7px; gap: 8px; }
}

/* fx-row wraps on desktop — the phone scroll strip clipped DAY / SHUFFLE / SIZE off the right edge with no hint */
@media (min-width: 721px) {
  .fx-row { flex-wrap: wrap; justify-content: center; overflow-x: visible; row-gap: 8px; mask-image: none; -webkit-mask-image: none; }
}

/* phone header: nothing wraps — at 390px "← HOME", the title and "FLEX YOURS" all broke onto two lines */
@media (max-width: 640px) {
  .bar { padding: 10px 10px; gap: 6px; }
  .bar .btn.small, .bar .pixel-tag.small { white-space: nowrap; flex: none; }
  .bar .btn.small { padding: 8px 10px; font-size: 11px; }
  .bar .pixel-tag.small { font-size: 7px; padding: 5px 6px; }
  .bar-title { font-size: 12px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}

/* ---------- FLEX WARS ---------- */
/* a flex item of .screen: min-width 0 so the horizontal rack scrolls instead of widening the page */
.wars-inner { max-width: 520px; width: 100%; min-width: 0; box-sizing: border-box; margin: 0 auto; padding: 8px 14px 40px; }
.wars-h { font-family: 'Press Start 2P', monospace; font-size: 10px; color: var(--gold); margin: 24px 0 8px; }
.wars-hsub { font-size: 7px; color: var(--muted); margin-left: 8px; }

/* ---------- ONE PATH: door, gate, lobby, board ---------- */
.door { text-align: center; }
.door-round { font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--gold); letter-spacing: 1px; margin-bottom: 14px; }
.door-line { font-family: 'Press Start 2P', monospace; font-size: 8px; line-height: 1.9; color: #cfc9b0; margin: 14px 0 6px; }
.door-links { margin-top: 14px; }
.disclaimer a { color: var(--muted); }
.hold-hero.card img { width: 100%; max-width: 260px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; border: 1px solid var(--gold); }
/* the gate */
.cam-gate { position: absolute; inset: 0; z-index: 5; background: #08080a; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.cam-gate.hidden { display: none; }
.cam-gate-inner { max-width: 360px; }
.cam-gate h2 { font-family: 'Archivo Black', sans-serif; font-size: 24px; line-height: 1.15; margin: 14px 0 12px; }
.cam-gate p { font-family: 'Press Start 2P', monospace; font-size: 7px; line-height: 1.9; color: #cfc9b0; margin-bottom: 18px; }
.cam-gate .btn { width: 100%; box-sizing: border-box; }
/* chips: three up front, the rest behind MORE */
.fx-row .chip.extra { display: none; }
.fx-row.open .chip.extra { display: inline-flex; }
/* the board page */
.wall-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wall-card { display: block; text-decoration: none; color: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #0e0e11; }
.wall-card img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.wall-meta { padding: 6px; font-family: 'Press Start 2P', monospace; font-size: 6px; line-height: 1.7; display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
.board-foot { margin-top: 26px; line-height: 1.8; }
.board-foot a { color: var(--muted); }

/* the board: crews */
.board-toggle { display: flex; gap: 6px; margin-bottom: 12px; }
.board-toggle button { flex: 1; font-family: 'Press Start 2P', monospace; font-size: 8px; padding: 12px; background: #0e0e11; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.board-toggle button.active { color: #000; background: var(--gold); border-color: var(--gold); }









/* the gate as a scanning state */
.cam-gate.scanning h2 { color: var(--gold); }
.scan { position: relative; width: 120px; height: 150px; margin: 0 auto; border: 2px solid var(--gold); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 46px; opacity: .9; box-shadow: 0 0 30px rgba(246,217,0,.2); }
.scan-line { position: absolute; left: 0; right: 0; height: 3px; background: var(--gold); box-shadow: 0 0 16px var(--gold); animation: scanmove 1.4s ease-in-out infinite; }
@keyframes scanmove { 0% { top: 4%; } 50% { top: 94%; } 100% { top: 4%; } }
.cam-gate:not(.scanning) .scan-line { display: none; }


/* ---------- REDESIGN A: the ICED OUT moment ---------- */
.cardscreen { max-width: 520px; margin: 0 auto; padding: 10px 14px 40px; display: flex; flex-direction: column; gap: 12px; }
.cardscreen .result-stage { margin: 0; }
.card-line { font-family: 'Press Start 2P', monospace; font-size: 8px; line-height: 1.9; color: var(--gold); text-align: center; margin: 4px 8px 0; }
.card-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.card-actions .btn.big { min-height: 56px; font-size: 18px; }
.card-actions-row { display: flex; gap: 8px; } .card-actions-row .btn { flex: 1; min-height: 48px; }
.card-actions .linkish { align-self: center; padding: 12px; }

/* ---------- THE DOOR: the mirror is already on ---------- */
.doorwall { padding-bottom: 132px; }
.doorwall h1 { font-size: 38px; line-height: .95; margin: 6px 0 4px; text-align: left; }
.door-wall { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 18px; }
.dw-card { position: relative; display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 4 / 5; }
.dw-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dw-card.fresh { border-color: var(--gold); box-shadow: 0 0 16px rgba(246,217,0,.25); }
.door-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(10,10,12,0), rgba(10,10,12,.96) 40%); }
.door-sticky .btn { width: 100%; min-height: 56px; font-size: 18px; box-sizing: border-box; }

/* THE MIRROR — a pixel bust (bald, shades, hoodie) wearing the day's chain; tapping it plays */
.mirror {
  position: relative; display: block; width: min(58vw, 250px); margin: 8px auto 0;
  padding: 0; background: none; border: 0; cursor: pointer; overflow: visible;
}
.mirror-bust { display: block; width: 100%; height: auto; }
/* the chain img is the on-chain 26x26 SVG: strands start at row 2 and span
   columns 5..21, so 62% wide / 51.5% down lands the strand tops on the sides of
   the bust's neck and drops the pendant onto the hoodie */
.mirror img {
  position: absolute; left: 50%; top: 51.5%; width: 62%;
  image-rendering: pixelated; transform-origin: 50% 0%;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 22px rgba(246,217,0,.30));
}
.mirror.ready img { animation: chainsway 6s ease-in-out infinite; }
@keyframes chainsway {
  0%, 100% { transform: translateX(-50%) rotate(-1.6deg); }
  50% { transform: translateX(-50%) rotate(1.6deg); }
}
.mirror-glint { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0; }
.mirror.ready .mirror-glint { animation: mirrorglint 1.4s ease-out .6s 1; }
.mirror-glint::before {
  content: ''; position: absolute; top: -20%; bottom: -20%; left: -35%; width: 30%;
  background: linear-gradient(105deg, rgba(255,255,255,0), rgba(255,250,200,.5), rgba(255,255,255,0));
  transform: rotate(8deg);
  animation: inherit; animation-name: mirrorsweep;
}
@keyframes mirrorglint { 0% { opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mirrorsweep { from { left: -35%; } to { left: 110%; } }
@media (prefers-reduced-motion: reduce) {
  .mirror.ready img { animation: none; }
  .mirror.ready .mirror-glint { animation: none; }
}
.mirror-cap {
  text-align: center; margin: 10px 0 2px;
  font-family: 'Press Start 2P', monospace; font-size: 8px; line-height: 1.7; color: var(--gold);
}
.fact-line {
  display: block; width: 100%; text-align: center; margin: 4px 0 10px;
  font-family: 'Press Start 2P', monospace; font-size: 7px; line-height: 1.9; color: #cfc9b0;
}

/* the camera hint lives INSIDE the stage now — pinned just under the face and
   chain, over the video, never over the rack strip or the shutter */
.camera-hint { padding: 0 16px; }

/* the #CHAINGANG medal and the DAY stamp no longer print on the card — chips retired */
.chip[data-fx="blocked"], #fx-day { display: none !important; }

#camera-live-tag { display: none !important; }

/* ---------- CAPTURE: the catch, the turn-around, the roll ---------- */
.door-catch { display: block; width: 100%; text-align: center; padding: 12px 0 2px; font-size: 8px; }
.turnaround { position: absolute; inset: 0; z-index: 8; background: #000; display: flex; flex-direction: column; }
.turnaround.hidden { display: none; }
.turnaround img { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: #000; }
.ta-inner { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.ta-inner.hidden { display: none; }
.ta-line { font-family: 'Press Start 2P', monospace; font-size: 9px; color: var(--gold); text-align: center; margin: 0; }
.ta-btns { display: flex; gap: 10px; } .ta-btns .btn { flex: 1; min-height: 56px; }
.roll-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.roll-card { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.roll-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.roll-card i { position: absolute; left: 6px; bottom: 6px; font-style: normal; font-family: 'Press Start 2P', monospace; font-size: 6px; color: var(--gold); background: rgba(10,10,12,.7); padding: 3px 5px; border-radius: 3px; }
.roll-empty { grid-column: 1 / -1; font-family: 'Archivo Black', sans-serif; font-size: 40px; color: #2c2c33; text-align: center; padding: 60px 0 10px; }


/* the claim ticker — the room is live */
.door-ticker {
  margin: 2px 0 6px; font-family: 'Press Start 2P', monospace; font-size: 7px;
  letter-spacing: .5px; color: var(--gold); opacity: .85;
}
.door-ticker.hidden { display: none; }

/* the 1-in-20 pays out like one */
.flash.gold { background: #f6d900; }
.gold-burst { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.gold-burst i {
  position: absolute; top: -28px; font-style: normal; color: #f6d900; font-size: 18px;
  text-shadow: 0 0 8px rgba(246,217,0,.7); animation: goldfall linear forwards;
}
@keyframes goldfall { to { transform: translateY(115vh) rotate(340deg); opacity: .1; } }

/* BLESS branches: in the room -> camera; not here -> the link */
.bless-choice { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.bless-choice .btn { width: 100%; min-height: 48px; font-size: 12px; box-sizing: border-box; }
