/* ============================================================
   BONEYARD — "vault drop"
   Near-black ink with a cool bias. Champagne is the only value
   colour; mint is reserved for verified. The card art is the
   only chroma on screen, so the interface stays monochrome.
   Mobile is the design; desktop is the enhancement.
   ============================================================ */
:root {
  --ink-0: #07080c;
  --ink-1: #0d0f16;
  --ink-2: #141824;
  --ink-3: #1c2130;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --text: #f2f4f9;
  --dim: #99a1b5;
  --dimmer: #626b80;
  --gold: #e9cd97;
  --gold-2: #d8b57a;
  --gold-deep: #a9834a;
  --mint: #6fe3b0;
  --rose: #ff8fa5;
  --holo: linear-gradient(115deg, #8ee9ff 0%, #c9a6ff 22%, #ffd9a8 45%, #9dffd2 68%, #a9c8ff 88%);
  --dock-h: 78px;
  --ease: cubic-bezier(.2, .9, .25, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background: var(--ink-0) url("/static/images/party-packs/PPBG.webp") center / cover no-repeat fixed;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

/* ---------- app frame: one act per screen, dock in the thumb zone ---------- */
.app {
  position: fixed; inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: transparent;
}

.party-legal-footer { display: none; }

@media (min-width: 901px) {
  .app { grid-template-rows: auto minmax(0, 1fr) auto auto; }
  .party-legal-footer {
    min-height: 62px;
    padding: 10px clamp(24px, 4vw, 64px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: var(--dim);
    background: rgba(7, 8, 12, .9);
  }
  .party-legal-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
  }
  .party-legal-copy span { color: #c7ccda; font-size: 11px; font-weight: 750; }
  .party-legal-copy small { max-width: 790px; font-size: 9px; line-height: 1.35; }
  .party-legal-footer nav { flex: none; display: flex; align-items: center; gap: 20px; }
  .party-legal-footer nav a {
    color: #c7ccda;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
  }
  .party-legal-footer nav a:hover { color: var(--gold); }
}

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: calc(env(safe-area-inset-top) + 14px) 20px 12px;
}
.party-site-bar {
  position: relative;
  z-index: 70;
  min-height: 68px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(7, 8, 12, .54);
  backdrop-filter: blur(18px);
}
.party-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.party-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.party-brand > span {
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}
.party-brand small { color: var(--gold); font-size: .62em; }
.party-nav-actions { display: flex; align-items: center; gap: 10px; }
.party-nav-audio { display: flex; align-items: center; gap: 6px; }
.party-nav-audio button {
  height: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.11); border-radius: 6px;
  background: rgba(10, 12, 18, .66);
  color: rgba(239, 241, 248, .68);
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.party-nav-audio button:hover { background: rgba(255,255,255,.07); }
.party-nav-audio button i {
  min-width: 20px;
  color: rgba(241, 242, 249, .66);
  font-size: 9px; font-style: normal; font-weight: 900; letter-spacing: 0;
  text-align: center;
}
.party-nav-audio button:last-child i { font-size: 16px; line-height: 1; }
.party-nav-audio button span {
  color: rgba(239, 241, 248, .46);
  font-size: 9px; font-weight: 850; text-transform: uppercase;
}
.party-nav-audio button[aria-pressed="true"] {
  border-color: rgba(203, 170, 255, .3);
  background: rgba(133, 83, 202, .12);
}
.party-nav-audio button[aria-pressed="true"] i,
.party-nav-audio button[aria-pressed="true"] span { color: #ddc5ff; }
.party-balance {
  display: grid;
  min-width: 92px;
  padding: 7px 12px;
  color: var(--text);
  text-decoration: none;
  text-align: right;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(10, 12, 18, .72);
}
.party-balance small {
  color: var(--dim);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.party-balance strong { margin-top: 4px; color: var(--gold); font-size: 14px; line-height: 1; }
.party-balance.is-login { display: inline-flex; justify-content: center; font-weight: 800; }
.party-menu { position: relative; }
.party-menu summary {
  width: 42px;
  height: 42px;
  display: grid;
  place-content: center;
  gap: 4px;
  cursor: pointer;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(10, 12, 18, .72);
}
.party-menu summary::-webkit-details-marker { display: none; }
.party-menu summary i { width: 17px; height: 2px; background: var(--text); }
.party-menu nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(9, 11, 17, .98);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .45);
}
.party-menu nav a,
.party-menu nav button {
  width: 100%;
  display: block;
  padding: 11px 12px;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
}
.party-menu nav a:hover,
.party-menu nav button:hover { background: rgba(255, 255, 255, .07); }
.party-menu form { margin: 0; }

.party-sim-banner {
  position: fixed; z-index: 69;
  top: calc(env(safe-area-inset-top) + 68px); left: 0; right: 0;
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 32px; padding: 6px 12px;
  color: #dce7f8; background: rgba(10, 13, 20, .94);
  border-block: 1px solid rgba(169, 200, 255, .18);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
  backdrop-filter: blur(16px);
  pointer-events: none;
}
.party-sim-banner[hidden] { display: none; }
.party-sim-banner b { color: #c8daf4; font-size: 9px; letter-spacing: 0; }
.party-sim-banner b::before { content: "\25C7"; margin-right: 6px; color: var(--gold); }
.party-sim-banner span { color: var(--dim); font-size: 9px; font-weight: 750; white-space: nowrap; }
.app.is-sim-mode .party-site-bar { border-bottom-color: rgba(169, 200, 255, .16); }
@media (min-width: 760px) {
  .party-sim-banner { top: 80px; }
}

/* ---------- Party-aware store credit checkout ---------- */
.party-topup {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  overflow: auto;
  background: rgba(3, 5, 10, .72);
  backdrop-filter: blur(10px);
}
.party-topup[hidden] { display: none; }
.party-topup-panel {
  position: relative;
  width: min(100%, 500px);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 28px;
  color: #172036;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
}
.party-topup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe4ed;
  border-radius: 6px;
  color: #657086;
  background: #fff;
  font-size: 22px;
}
.party-topup-panel > header { padding-right: 30px; }
.party-topup-panel > header span {
  color: #9b752f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
}
.party-topup-panel > header h2 {
  margin: 6px 0 0;
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: 0;
}
.party-topup-panel > header p { margin: 8px 0 0; color: #737d91; font-size: 13px; }
.party-topup-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 12px 0;
  border-top: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
}
.party-topup-balance span { color: #737d91; font-size: 13px; font-weight: 700; }
.party-topup-balance strong { color: #0d63c7; font-size: 18px; }
.party-topup-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-top: 18px;
  padding: 3px;
  border-radius: 8px;
  background: #f0f2f6;
}
.party-topup-modes button {
  min-height: 42px;
  border-radius: 6px;
  color: #727b8d;
  font-size: 13px;
  font-weight: 800;
}
.party-topup-modes button.is-active {
  color: #172036;
  background: #fff;
  box-shadow: 0 3px 10px rgba(20, 31, 53, .09);
}
.party-topup form { display: grid; gap: 15px; margin-top: 16px; }
.party-topup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0f5;
}
.party-topup-item > img { width: 42px; height: 68px; object-fit: contain; }
.party-topup-item > div:nth-child(2) {
  min-width: 0;
  display: grid;
  margin-right: auto;
}
.party-topup-item strong { font-size: 15px; line-height: 1.2; }
.party-topup-item small { margin-top: 4px; color: #737d91; font-size: 12px; }
.party-topup-stepper { display: flex; align-items: center; }
.party-topup-stepper button {
  width: 34px;
  height: 34px;
  border: 1px solid #dce2ec;
  border-radius: 6px;
  color: #172036;
  background: #fff;
  font-size: 18px;
}
.party-topup-stepper input {
  width: 38px;
  border: 0;
  color: #172036;
  background: transparent;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  appearance: textfield;
}
.party-topup-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
}
.party-topup-total span { color: #737d91; font-size: 13px; font-weight: 700; }
.party-topup-total strong { font-size: 20px; }
.party-topup-amount[hidden] { display: none; }
.party-topup-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.party-topup-presets button {
  min-height: 44px;
  border: 1px solid #dce2ec;
  border-radius: 6px;
  color: #172036;
  background: #fff;
  font-weight: 800;
}
.party-topup-presets button.is-active { border-color: #0d63c7; color: #fff; background: #0d63c7; }
.party-topup-amount label {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-top: 12px;
  padding: 25px 12px 8px;
  border: 1px solid #dce2ec;
  border-radius: 6px;
}
.party-topup-amount label > span {
  position: absolute;
  top: 6px;
  left: 12px;
  color: #7b8496;
  font-size: 11px;
  font-weight: 700;
}
.party-topup-amount label i { color: #7b8496; font-style: normal; font-weight: 800; }
.party-topup-amount input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #172036;
  background: transparent;
  font-size: 18px;
  font-weight: 800;
}
.party-topup-bonus {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #dcefe3;
  border-radius: 6px;
  background: #f5fbf7;
}
.party-topup-bonus span { display: flex; justify-content: space-between; color: #47705a; font-size: 12px; }
.party-topup-bonus span:last-child { padding-top: 6px; border-top: 1px solid #dcefe3; color: #184f31; font-weight: 800; }
.party-topup-submit {
  min-height: 52px;
  border-radius: 6px;
  color: #fff;
  background: #0d63c7;
  box-shadow: 0 10px 22px rgba(13, 99, 199, .24);
  font-size: 15px;
  font-weight: 900;
}
.party-topup-submit:disabled { opacity: .55; }
.party-topup-trust { display: flex; justify-content: center; gap: 18px; color: #7b8496; font-size: 11px; font-weight: 700; }
.party-topup form > small { min-height: 16px; color: #b11d35; text-align: center; font-size: 11px; }
.party-checkout-notice {
  position: fixed;
  z-index: 175;
  top: calc(env(safe-area-inset-top) + 78px);
  left: 50%;
  width: min(calc(100% - 28px), 480px);
  padding: 12px 15px;
  transform: translateX(-50%);
  border: 1px solid rgba(111, 227, 176, .42);
  border-radius: 6px;
  color: #d9ffed;
  background: rgba(8, 35, 25, .94);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}
@media (max-width: 520px) {
  .party-topup-panel { padding: 24px 18px 20px; }
  .party-topup-presets { grid-template-columns: repeat(2, 1fr); }
  .party-topup-trust { flex-direction: column; align-items: center; gap: 5px; }
}
.bar-mark {
  font-size: 12px; font-weight: 800; letter-spacing: .34em;
  color: var(--text); opacity: .92;
}
.bar-step {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dimmer);
  text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 620px) {
  .party-site-bar { padding-left: 14px; padding-right: 14px; }
  .party-brand > span { font-size: 17px; }
  .party-brand img { width: 30px; height: 30px; }
  .party-site-bar > .bar-step { display: none; }
  .party-balance { min-width: 82px; padding: 7px 9px; }
  .party-nav-actions { gap: 6px; }
  .party-nav-audio { gap: 4px; }
  .party-nav-audio button { width: 36px; height: 36px; padding: 0; }
  .party-nav-audio button span { display: none; }
}
@media (max-width: 390px) {
  .party-brand { gap: 7px; }
  .party-brand > span { display: none; }
  .party-balance { min-width: 76px; padding-inline: 7px; }
}
.bar-step[hidden] { display: none; }
/* the way out lives in the bar, so the dock stays free for the real action */
.bar-back {
  flex: none; min-height: 34px; padding: 0 14px 0 11px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .04em; color: var(--dim);
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform .14s var(--ease), color .14s ease, box-shadow .14s ease;
}
.bar-back::before { content: "\2039"; font-size: 17px; line-height: 1; margin-top: -2px; }
.bar-back:active { transform: scale(.96); }
.bar-back:hover { color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26); }
.bar-back[hidden] { display: none; }

.body { position: relative; min-height: 0; }
.app.is-sim-mode .scr { top: 36px; }

.scr {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: scr-in .42s var(--ease) both;
}
.scr[hidden] { display: none; }
@keyframes scr-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.scr-head { flex: none; padding: 14px 22px 20px; }
.scr-head h1 {
  margin: 0; font-size: 40px; line-height: 1.02; font-weight: 800; letter-spacing: -.03em;
}
.scr-head h1 em {
  font-style: normal;
  background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.scr-head h2 { margin: 0; font-size: 25px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.scr-head p { margin: 10px 0 0; color: var(--dim); font-size: 14.5px; }
.scr[data-scr="select"] .scr-head p {
  max-width: 570px; margin: 13px auto 0; padding: 0; text-align: center;
  color: rgba(249, 250, 253, .94); font-size: 16.5px; font-weight: 700; line-height: 1.4;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .52);
}
.scr-head.is-compact { padding: 10px 22px 16px; }
.scr-head.is-compact p { margin-top: 6px; font-size: 13.5px; }

/* ---------- dock ---------- */
.dock {
  flex: none;
  position: relative; z-index: 45;   /* the dock is always reachable, even under a veil */
  padding: 12px 18px calc(env(safe-area-inset-bottom) + 14px);
  display: flex; align-items: center; gap: 12px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 8, 12, .5), var(--ink-0) 46%);
  backdrop-filter: blur(14px);
}
.dock:empty { display: none; }
.dock-price { flex: 1 1 auto; min-width: 0; }
.dock-price span {
  display: block; font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--dimmer);
}
.dock-price strong {
  display: block; margin-top: 2px; font-size: 27px; font-weight: 800; letter-spacing: -.02em;
  color: var(--gold); font-variant-numeric: tabular-nums;
}
.dock-price small { display: block; color: var(--dimmer); font-size: 11px; }
.btn {
  flex: none; min-height: 52px; padding: 0 24px; border-radius: 999px;
  font-size: 14.5px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
  transition: transform .14s var(--ease), opacity .14s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .38; }
.btn-gold {
  color: #16120a;
  background: linear-gradient(170deg, #f6e0b4, var(--gold) 42%, var(--gold-deep));
  box-shadow: 0 10px 30px rgba(201, 160, 92, .26), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.btn-sim {
  color: #e4eaf4;
  border: 1px solid rgba(169, 200, 255, .28);
  background: linear-gradient(165deg, rgba(31, 38, 52, .96), rgba(18, 22, 31, .98));
  box-shadow: 0 10px 26px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .06);
  letter-spacing: 0;
}
.btn-sim:hover {
  color: #fff;
  border-color: rgba(190, 215, 250, .48);
  background: linear-gradient(165deg, rgba(39, 48, 65, .98), rgba(21, 27, 38, .98));
}
.btn-ghost { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-quiet { min-height: 44px; padding: 0 18px; color: var(--dim); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13px; }
.btn-wide { flex: 1 1 auto; }
.party-action-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* ---------- select: one roundup per screen, swipe between ---------- */
.reel {
  flex: 1 1 auto; min-height: 0;
  display: flex; gap: 14px;
  /* enough inline room for the first and last party to reach dead centre */
  padding: 4px max(22px, calc(50% - min(39vw, 170px))) 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.reel::-webkit-scrollbar { display: none; }
.reel.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.reel.is-rebasing { scroll-snap-type: none !important; }
.reel.is-rebasing .lot { transition: none !important; }

.lot {
  position: relative; flex: 0 0 min(78vw, 340px); scroll-snap-align: center;
  display: flex; flex-direction: column;
  padding: 18px 18px 20px; border-radius: 22px; text-align: left;
  color: inherit; font: inherit; cursor: pointer;
  border: 1px solid var(--line); background: linear-gradient(180deg, var(--ink-2), var(--ink-1) 62%);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s ease;
}
.lot::before {
  content: ""; position: absolute; inset: -1px -1px auto; height: 3px;
  background: var(--lot-accent, var(--holo)); opacity: .9;
}
.lot::after {
  content: ""; position: absolute; inset: -40% -30% auto; height: 62%;
  background: radial-gradient(60% 60% at 50% 50%, var(--lot-glow, rgba(255, 255, 255, .12)), transparent 70%);
  pointer-events: none;
}
.lot.is-active { border-color: var(--line-2); transform: translateY(-2px); }
.lot-art {
  position: relative; flex: 1 1 150px;
  width: min(72%, 210px); min-height: 112px; max-height: 310px;
  margin: 0 auto 16px;
}
.lot-art img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; border-radius: 8px;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, .6));
  opacity: 0; transition: opacity .7s ease;
}
.lot-art img.is-on { opacity: 1; }
.lot-art .lot-fan-card {
  opacity: 1;
  transform-origin: 50% 92%;
  transition: opacity .35s ease, filter .35s ease;
}
.lot-art .lot-fan-card.is-fan-1 {
  z-index: 3;
  transform: translateY(-3%) scale(.94);
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, .72));
}
.lot-art .lot-fan-card.is-fan-2 {
  z-index: 1;
  transform: translateX(-23%) translateY(4%) rotate(-9deg) scale(.82);
  filter: brightness(.82) saturate(.85) drop-shadow(0 14px 24px rgba(0, 0, 0, .58));
}
.lot-art .lot-fan-card.is-fan-3 {
  z-index: 2;
  transform: translateX(23%) translateY(4%) rotate(9deg) scale(.82);
  filter: brightness(.86) saturate(.88) drop-shadow(0 14px 24px rgba(0, 0, 0, .58));
}
.lot-art .lot-fan-card.is-swap {
  opacity: .18;
}
.lot-art.is-grail-showcase {
  display: grid;
  place-items: center;
  isolation: isolate;
}
.grail-showcase-card {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.grail-showcase-card img {
  opacity: 0;
  z-index: 0;
  transform: translateX(82%) translateY(4%) scale(.64);
  transition:
    opacity .46s ease,
    transform 1s cubic-bezier(.2, .72, .22, 1),
    filter .9s ease;
  filter:
    brightness(.62)
    saturate(.72)
    blur(.4px)
    drop-shadow(0 12px 20px rgba(0, 0, 0, .5));
  will-change: transform, opacity, filter;
}
.grail-showcase-card img.is-left {
  z-index: 1;
  opacity: .58;
  transform: translateX(-43%) translateY(4%) scale(.73);
}
.grail-showcase-card img.is-center {
  z-index: 3;
  opacity: 1;
  transform: translateX(0) translateY(-3%) scale(.94);
  filter:
    drop-shadow(0 20px 34px rgba(0, 0, 0, .72))
    drop-shadow(0 0 13px color-mix(in srgb, var(--lot-accent-solid, var(--gold)) 16%, transparent));
}
.grail-showcase-card img.is-right {
  z-index: 2;
  opacity: .62;
  transform: translateX(43%) translateY(4%) scale(.73);
}
.grail-showcase-card img.is-next {
  z-index: 0;
  opacity: 0;
  transform: translateX(82%) translateY(5%) scale(.64);
  transition: none;
}
.grail-showcase-card img.is-exit {
  z-index: 0;
  opacity: 0;
  transform: translateX(-82%) translateY(5%) scale(.64);
}
.lot-name {
  font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15;
  color: var(--lot-ink, var(--text));
}
.lot-cap { margin-top: 8px; color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.lot-price {
  flex: none; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.lot-price b {
  font-size: 24px; font-weight: 800; color: var(--gold);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.lot-price span {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dimmer);
}
.lot-preview-cards {
  position: relative; z-index: 3;
  padding: 4px 0 3px;
  color: var(--lot-ink, var(--gold));
  border-bottom: 1px solid color-mix(in srgb, var(--lot-accent-solid, var(--gold)) 55%, transparent);
  font-size: 9.5px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
}
.lot-preview-cards:hover { color: var(--text); }
.lot-preview-cards:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.lot[data-theme="gengar"]    { --lot-accent: linear-gradient(90deg, #a97bff, #d9b6ff); --lot-glow: rgba(169, 123, 255, .3); --lot-ink: #d9c2ff; }
.lot[data-theme="treekachu"] { --lot-accent: linear-gradient(90deg, #a8e063, #f6e27a); --lot-glow: rgba(200, 230, 120, .26); --lot-ink: #e2f0a8; }
.lot[data-theme="pinkachu"]  { --lot-accent: linear-gradient(90deg, #ff6fae, #ffc0dc); --lot-glow: rgba(255, 105, 168, .25); --lot-ink: #ffd0e5; }
.lot[data-theme="charizard"] { --lot-accent: linear-gradient(90deg, #ed4f55, #f4ca72); --lot-glow: rgba(237, 79, 85, .25); --lot-ink: #ffd19c; }
.lot[data-theme="mewtwo"]    { --lot-accent: linear-gradient(90deg, #d287f4, #8fd7ef); --lot-glow: rgba(210, 135, 244, .23); --lot-ink: #e9c9fb; }
.lot[data-theme="psyduck"]   { --lot-accent: linear-gradient(90deg, #f2cf59, #74c9eb); --lot-glow: rgba(242, 207, 89, .23); --lot-ink: #ffe9a0; }
.lot[data-theme="dragonite"] { --lot-accent: linear-gradient(90deg, #ffb26b, #ffd9c0 46%, #bfe4ff); --lot-glow: rgba(255, 178, 107, .26); --lot-ink: #ffd8b8; }
.lot[data-theme="custom"]    { --lot-accent: linear-gradient(90deg, #7fe3d0, #bfe9ff); --lot-glow: rgba(127, 227, 208, .22); --lot-ink: #b9f0e2; }

.dots { flex: none; display: flex; justify-content: center; gap: 1px; padding: 4px 0 16px; }
.dots button { width: 24px; height: 24px; padding: 0; display: grid; place-items: center; }
.dots button::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--line-2); transition: width .25s ease, background .25s ease;
}
.dots button.is-on::before { width: 18px; border-radius: 999px; background: var(--gold); }
.dots button:focus-visible { outline: 1px solid var(--gold); outline-offset: -2px; border-radius: 6px; }
.party-reel-controls { flex: none; }

/* ---------- card grids ---------- */
.grid-cards {
  flex: 0 0 auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 10px;
  grid-auto-rows: min-content; align-items: start; align-content: start;
  padding: 0 18px 22px;
}
.tile {
  position: relative; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 5px;
  border-radius: 12px; text-align: center;
}
.tile img { width: 100%; aspect-ratio: 245 / 342; object-fit: contain; border-radius: 8px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); }
.tile b {
  font-size: 11px; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tile i { font-style: normal; font-size: 10px; color: var(--dimmer); letter-spacing: .04em; }
.tile em { font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--gold); }
.tile.is-on { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 10px; }
/* the pick is called out in its caption, never over the art */
.tile.is-yours { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 10px; }
.tile.is-yours .tag {
  align-self: center; padding: 3px 10px; border-radius: 999px;
  font-size: 8.5px; font-weight: 900; letter-spacing: .1em; color: #0a1017; background: var(--mint);
}

.chips { flex: none; display: flex; gap: 7px; padding: 0 18px 14px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 13px; border-radius: 999px; font-size: 11px; font-weight: 800;
  letter-spacing: .06em; color: var(--dimmer); box-shadow: inset 0 0 0 1px var(--line);
}
.chip.is-now { color: #16120a; background: var(--gold); box-shadow: none; }
.chip.is-done { color: var(--mint); box-shadow: inset 0 0 0 1px rgba(111, 227, 176, .4); }

/* ---------- sealed packs: a reel you flick through ---------- */
.pack-reel {
  flex: 0 0 auto; display: flex; gap: 14px;
  padding: 10px calc(50% - 30vw) 26px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab;
  overscroll-behavior-x: contain;
}
.pack-reel::-webkit-scrollbar { display: none; }
.pack-reel.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }

.pack {
  position: relative; flex: 0 0 60vw; max-width: 260px; scroll-snap-align: center;
  aspect-ratio: 926 / 1698; border-radius: 0; overflow: visible; padding: 0;
  border: 0;
  background: transparent;
  transform: scale(.84); opacity: .48;
  transition: transform .5s var(--ease), opacity .42s ease, box-shadow .5s ease, filter .42s ease;
}
.pack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pack.is-focus {
  transform: scale(1); opacity: 1;
  box-shadow: none;
}
.pack.is-focus::after {
  display: none;
}
.pack:active { transform: scale(.97); }
.pack:focus { outline: none; }
.pack:focus-visible img { filter: drop-shadow(0 0 9px rgba(233, 205, 151, .58)); }
.pack-hint {
  flex: none; text-align: center; padding: 0 22px 14px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dimmer);
}
.pack-reel-controls { display: none; }

/* the chosen pack, held up for confirmation */
.confirm {
  position: fixed; inset: 0; z-index: 42;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 26px 26px calc(env(safe-area-inset-bottom) + 70px);
  background: #050609;
  animation: confirm-scene-in 1.35s cubic-bezier(.2,.65,.2,1) both;
}
@keyframes confirm-scene-in {
  from { background: rgba(5, 6, 9, 0); }
  to { background: #050609; }
}
.confirm.is-departing { animation: confirm-scene-out .9s ease both; pointer-events: none; }
@keyframes confirm-scene-out {
  from { background: #050609; }
  to { background: rgba(5, 6, 9, 0); }
}
.confirm[hidden] { display: none; }
.confirm.is-opening { pointer-events: none; }
.confirm.is-arriving { pointer-events: none; }
.confirm-pack {
  width: min(60vw, 238px); aspect-ratio: 926 / 1698; overflow: visible;
  position: relative;
  filter: drop-shadow(0 30px 38px rgba(0, 0, 0, .66)) drop-shadow(0 0 28px rgba(233, 205, 151, .15));
  visibility: hidden;
}
.confirm-pack img { width: 100%; height: 100%; object-fit: contain; }
.confirm > b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.confirm > span { color: var(--dim); font-size: 13px; margin-top: -8px; }
.confirm > b, .confirm > span { display: none; }
.confirm > b,
.confirm > span {
  transition: opacity .24s ease, transform .32s var(--ease);
}
.confirm.is-arriving .confirm-pack { visibility: hidden; }
.confirm.is-arriving > b,
.confirm.is-arriving > span {
  opacity: 0;
  transform: translateY(7px);
}
.confirm-actions { transition: opacity .42s ease, transform .5s var(--ease); }
.confirm:is(.is-arriving, .is-opening) .confirm-actions {
  visibility: hidden; opacity: 0; transform: translateY(7px);
}
.confirm.is-departing > b,
.confirm.is-departing > span,
.confirm.is-departing .confirm-actions { opacity: 0; transform: translateY(7px); }
.confirm-flight {
  position: fixed; z-index: 44; display: block;
  margin: 0; padding: 0; overflow: visible;
  max-width: none; flex: none; aspect-ratio: auto;
  border: 0; border-radius: 0;
  background: transparent;
  animation: none !important;
  transition: none !important; pointer-events: none;
  box-shadow: none;
  transform-origin: center;
  transform-style: preserve-3d;
  will-change: transform;
}
.confirm-flight::after { display: none; }
.confirm-flight-front {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  border-radius: inherit;
  z-index: 4;
  filter: none;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(0deg) translateZ(7px);
  -webkit-transform: rotateY(0deg) translateZ(7px);
}
.confirm-flight .pack-number {
  display: none;
}
.confirm-flight-back {
  position: absolute; inset: 0; z-index: 4; overflow: visible;
  display: block; border-radius: inherit;
  background: transparent;
  opacity: 1;
  mix-blend-mode: normal;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(180deg) translateZ(7px);
  -webkit-transform: rotateY(180deg) translateZ(7px);
}
.confirm-flight-back > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 1;
  filter: none;
}
.confirm-flight.is-landed {
  filter: drop-shadow(0 20px 20px rgba(0, 0, 0, .48));
}
.confirm-flight-depth {
  position: absolute; inset: 0; z-index: 2;
  display: block; width: 100%; height: 100%; object-fit: contain;
  opacity: .92;
  filter: brightness(var(--pack-depth-light)) saturate(.92) contrast(1.04);
  -webkit-mask-image: linear-gradient(to bottom, transparent 2%, #000 11%, #000 89%, transparent 98%);
  mask-image: linear-gradient(to bottom, transparent 2%, #000 11%, #000 89%, transparent 98%);
  transform: translateZ(var(--pack-depth)) scale(var(--pack-depth-scale));
  pointer-events: none;
}
.confirm-dock-action { animation: confirm-action-in .42s var(--ease) both; }
.confirm-dock-action.is-back { animation-delay: .04s; }
.confirm-dock-action.is-open { animation-delay: .1s; }
@keyframes confirm-action-in {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}

/* ---------- party purchase: one intentional decision, no route change ---------- */
.party-purchase {
  position: fixed; inset: 0; z-index: 58;
  display: grid; place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(4, 5, 8, .86);
  backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity .24s ease;
}
.party-purchase[hidden] { display: none; }
.party-purchase.is-open { opacity: 1; }
.party-purchase-panel {
  position: relative;
  width: min(100%, 430px);
  max-height: 100%;
  overflow: auto;
  padding: 24px 22px 22px;
  text-align: center;
  border: 1px solid rgba(233, 205, 151, .24);
  border-radius: 8px;
  background:
    radial-gradient(80% 44% at 50% 18%, rgba(233, 205, 151, .13), transparent 72%),
    linear-gradient(180deg, #181b25, #0d0f16 68%);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .76), inset 0 1px 0 rgba(255, 255, 255, .05);
  transform: translateY(14px) scale(.975);
  transition: transform .34s var(--ease);
}
.party-purchase.is-open .party-purchase-panel { transform: none; }
.party-purchase-close {
  position: absolute; z-index: 5; top: 12px; right: 12px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 6px;
  color: var(--dim); font-size: 25px; line-height: 1;
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.party-purchase-kicker {
  display: block;
  color: var(--gold); font-size: 10px; font-weight: 900;
  letter-spacing: .24em;
}
.party-purchase-art {
  position: relative;
  width: 184px; height: 226px;
  margin: 14px auto 4px;
}
.party-purchase-card {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; border-radius: 8px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .7));
}
.party-purchase-card.is-card-1 { z-index: 3; transform: translateY(-2%) scale(.91); }
.party-purchase-card.is-card-2 { z-index: 1; transform: translateX(-25%) translateY(5%) rotate(-9deg) scale(.78); opacity: .72; }
.party-purchase-card.is-card-3 { z-index: 2; transform: translateX(25%) translateY(5%) rotate(9deg) scale(.78); opacity: .78; }
.party-purchase-panel h2 {
  margin: 0;
  font-size: 28px; line-height: 1.08; letter-spacing: -.025em;
}
.party-purchase-panel > p {
  max-width: 340px; margin: 8px auto 0;
  color: var(--dim); font-size: 13px;
}
.party-purchase-price {
  display: flex; align-items: baseline; justify-content: center; gap: 12px;
  margin: 18px 0 0; padding: 13px 0;
  border-block: 1px solid var(--line);
}
.party-purchase-price span {
  color: var(--dimmer); font-size: 9px; font-weight: 900; letter-spacing: .18em;
}
.party-purchase-price strong {
  color: var(--gold); font-size: 25px; line-height: 1; letter-spacing: -.02em;
}
.party-purchase-panel h3 {
  margin: 18px 0 12px;
  font-size: 18px; letter-spacing: -.01em;
}
.party-purchase-actions { display: flex; gap: 8px; }
.party-purchase-actions .btn { min-height: 50px; }
.party-purchase-actions .btn-sim { padding-inline: 18px; }
.party-purchase-actions [hidden] { display: none; }
.party-purchase-progress {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; white-space: nowrap;
}
.party-purchase-progress i {
  position: relative; width: 17px; height: 17px; flex: none;
  border: 2px solid rgba(15, 19, 30, .28);
  border-top-color: #111723;
  border-radius: 50%;
  animation: party-purchase-spin .72s linear infinite;
}
:is(.party-purchase-actions, .party-card-preview-actions) .btn.is-processing::after { opacity: 0; animation: none; }
:is(.party-purchase-actions, .party-card-preview-actions) .btn.is-processing:disabled,
:is(.party-purchase-actions, .party-card-preview-actions) .btn.is-confirmed:disabled { opacity: 1; cursor: default; }
:is(.party-purchase-actions, .party-card-preview-actions) .btn.is-confirmed {
  color: #f8fff9;
  background: linear-gradient(135deg, #16664d, #278467);
  box-shadow: 0 10px 30px rgba(31, 133, 99, .3), inset 0 1px 0 rgba(255, 255, 255, .2);
}
:is(.party-purchase-actions, .party-card-preview-actions) .btn.is-confirmed::after { opacity: 0; animation: none; }
:is(.party-purchase-actions, .party-card-preview-actions) .btn.is-confirmed .party-purchase-progress i {
  border: 0; border-radius: 0; animation: party-purchase-check .42s cubic-bezier(.16,.82,.2,1) both;
}
:is(.party-purchase-actions, .party-card-preview-actions) .btn.is-confirmed .party-purchase-progress i::before {
  content: ""; position: absolute; left: 3px; top: 1px; width: 7px; height: 11px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
@keyframes party-purchase-spin { to { transform: rotate(360deg); } }
@keyframes party-purchase-check {
  from { opacity: 0; transform: scale(.55) rotate(-12deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
.party-purchase.is-processing .party-purchase-close,
.party-purchase.is-processing .party-purchase-actions > :not(.is-processing),
.party-card-preview.is-processing .party-card-preview-close,
.party-card-preview.is-processing .party-card-preview-actions > :not(.is-processing) {
  opacity: .32; pointer-events: none;
}
.party-purchase.is-confirmed .party-purchase-close,
.party-purchase.is-confirmed .party-purchase-actions,
.party-card-preview.is-confirmed .party-card-preview-close,
.party-card-preview.is-confirmed .party-card-preview-actions { pointer-events: none; }
.party-purchase.is-confirmed .party-purchase-panel,
.party-card-preview.is-confirmed .party-card-preview-panel {
  animation: party-purchase-confirmed .58s cubic-bezier(.16,.82,.2,1) both;
}
@keyframes party-purchase-confirmed {
  0% { transform: scale(1); }
  52% { transform: scale(1.012); box-shadow: 0 34px 90px rgba(0,0,0,.76), 0 0 30px rgba(72, 204, 155, .2); }
  100% { transform: scale(1); }
}
.party-purchase.is-dematerializing,
.party-card-preview.is-dematerializing {
  pointer-events: none;
  background: #050609;
  backdrop-filter: none;
  transition: background .72s ease;
}
.party-purchase.is-dematerializing .party-purchase-panel,
.party-card-preview.is-dematerializing .party-card-preview-panel {
  animation: party-purchase-dematerialize .86s cubic-bezier(.22,.68,.18,1) both;
  will-change: transform, opacity, filter;
}
@keyframes party-purchase-dematerialize {
  0%, 18% { opacity: 1; filter: none; transform: scale(1); }
  42% { opacity: .92; filter: brightness(1.06); transform: scale(1.004); }
  100% { opacity: 0; filter: brightness(.72) blur(7px); transform: scale(.985); }
}

/* ---------- a paid Party waiting after an interrupted visit ---------- */
.party-resume {
  position: fixed; inset: 0; z-index: 96;
  display: grid; place-items: center; padding: 20px;
  background: rgba(3, 4, 8, .84); backdrop-filter: blur(12px);
  opacity: 0; transition: opacity .22s ease;
}
.party-resume[hidden] { display: none; }
.party-resume.is-open { opacity: 1; }
.party-resume-panel {
  position: relative; width: min(100%, 430px); padding: 24px;
  border: 1px solid rgba(233, 205, 151, .28); border-radius: 8px;
  background: linear-gradient(160deg, rgba(27, 29, 39, .99), rgba(10, 12, 18, .995) 62%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .66), inset 0 1px 0 rgba(255, 255, 255, .06);
  text-align: center; transform: translateY(12px) scale(.985);
  transition: transform .3s var(--ease);
}
.party-resume.is-open .party-resume-panel { transform: none; }
.party-resume-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; color: var(--dim); font-size: 25px;
}
.party-resume-art {
  position: relative; width: 108px; height: 142px; margin: -6px auto 12px;
}
.party-resume-art img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .62));
}
.party-resume-art i {
  position: absolute; right: -5px; bottom: 8px;
  display: grid; place-items: center; width: 30px; height: 30px;
  border: 1px solid rgba(174, 238, 207, .52); border-radius: 50%;
  color: #bff3d9; background: #13271f; font-size: 15px; font-style: normal;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
}
.party-resume-kicker {
  display: block; color: #bff3d9; font-size: 10px; font-weight: 850;
  letter-spacing: .16em; text-transform: uppercase;
}
.party-resume-panel h2 { margin: 7px 0 0; font-size: 27px; line-height: 1.08; }
.party-resume-panel > p { margin: 8px auto 18px; max-width: 330px; color: var(--dim); font-size: 13px; line-height: 1.45; }
.party-resume-receipt {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 14px;
  padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  text-align: left;
}
.party-resume-receipt span { color: var(--dimmer); font-size: 11px; }
.party-resume-receipt strong { color: var(--text); font-size: 12px; text-align: right; }
.party-resume-receipt strong:last-child { color: var(--gold); font-size: 14px; }
.party-resume-actions { display: flex; gap: 9px; margin-top: 18px; }
.party-resume-actions .btn { min-height: 50px; border-radius: 8px; padding-inline: 17px; }

@media (max-width: 520px) {
  .party-resume { align-items: center; padding: 16px; }
  .party-resume-panel { padding: 20px 18px 18px; }
  .party-resume-art { width: 94px; height: 124px; margin-bottom: 9px; }
  .party-resume-panel h2 { font-size: 24px; }
  .party-resume-actions .btn { font-size: 13px; }
}

/* ---------- fixed-party card preview: all ten, before purchase ---------- */
.party-card-preview {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  background: rgba(4, 5, 8, .9);
  backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity .24s ease;
}
.party-card-preview[hidden] { display: none; }
.party-card-preview.is-open { opacity: 1; }
.party-card-preview-panel {
  position: relative;
  /* never taller than the padded overlay: keeps the top on-screen on small
     phones and makes the card grid (not the panel) the scroller */
  width: min(100%, 920px); max-height: min(100%, 900px);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);   /* clamp children to panel width */
  overflow: hidden;
  border: 1px solid rgba(233, 205, 151, .24); border-radius: 8px;
  background: linear-gradient(180deg, #181b25, #0d0f16 72%);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .05);
  transform: translateY(14px) scale(.98);
  transition: transform .34s var(--ease);
}
.party-card-preview.is-open .party-card-preview-panel { transform: none; }
.party-card-preview-close {
  position: absolute; z-index: 4; top: 12px; right: 12px;
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 6px; color: var(--dim); font-size: 25px; line-height: 1;
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.party-card-preview-panel > header { padding: 22px 58px 16px 20px; }
.party-card-preview-panel > header span {
  display: block; color: var(--gold); font-size: 9px; font-weight: 900; letter-spacing: .22em;
}
.party-card-preview-panel > header h2 {
  margin: 4px 0 0; font-size: 25px; line-height: 1.12; letter-spacing: -.02em;
}
.party-card-preview-panel > header p {
  margin: 8px 0 0; color: rgba(245, 247, 252, .88);
  font-size: 14px; font-weight: 650; line-height: 1.35;
}
.party-card-preview-grid {
  min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  padding: 4px 14px 18px;
  overscroll-behavior: contain;
}
.party-card-preview-item {
  min-width: 0; margin: 0; padding: 9px;
  display: grid; grid-template-columns: 62px minmax(0, 1fr); align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 7px;
  background: rgba(255, 255, 255, .025);
}
.party-card-preview-item.is-grail { border-color: rgba(233, 205, 151, .34); }
.party-card-preview-item > span { display: block; }
.party-card-preview-item img {
  display: block; width: 100%; border-radius: 5px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .55));
}
.party-card-preview-item figcaption { min-width: 0; }
.party-card-preview-item small {
  display: block; color: var(--dimmer); font-size: 7.5px; font-weight: 900; letter-spacing: .16em;
}
.party-card-preview-item b {
  display: block; margin-top: 3px; overflow: hidden; color: var(--text);
  font-size: 11px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap;
}
.party-card-preview-item i { display: block; margin-top: 2px; color: var(--dim); font-size: 9px; font-style: normal; }
.party-card-preview-item em { display: block; margin-top: 3px; color: var(--gold); font-size: 10.5px; font-style: normal; font-weight: 850; }
.party-card-preview-panel > footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: rgba(7, 8, 12, .94);
}
.party-card-preview-price span {
  display: block; color: var(--dimmer); font-size: 8px; font-weight: 900; letter-spacing: .18em;
}
.party-card-preview-price strong { display: block; margin-top: 1px; color: var(--gold); font-size: 24px; line-height: 1; }
.party-card-preview-panel > footer .btn { min-height: 48px; }
.party-card-preview-actions { display: flex; gap: 8px; }
.party-card-preview-actions .btn { padding-inline: 18px; }

@media (min-width: 760px) {
  .party-card-preview-panel > header { padding: 24px 72px 18px 28px; text-align: center; }
  .party-card-preview-panel > header h2 { font-size: 30px; }
  .party-card-preview-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; padding: 6px 28px 24px; }
  .party-card-preview-item { display: flex; flex-direction: column; align-items: stretch; gap: 7px; padding: 10px; text-align: center; }
  .party-card-preview-item b { font-size: 11.5px; }
  .party-card-preview-panel > footer { padding: 14px 28px; }
  .party-card-preview-panel > footer .btn { min-width: 210px; }
  .party-card-preview-actions .btn { min-width: 150px; }
}

.confirm-actions,
.reveal-actions { display: none; }

/* ---------- the opening: laser cut, then the card climbs out ---------- */
.stage { position: relative; width: min(72%, 250px); margin: 18px auto 20px; aspect-ratio: 926 / 1698; }
.stage-pack { position: absolute; inset: 0; z-index: 2; }
.pack-body, .pack-lid {
  position: absolute; left: 0; right: 0; display: block;
  background-image: var(--pack-art); background-repeat: no-repeat;
  filter: drop-shadow(0 22px 44px rgba(0, 0, 0, .7));
}
.pack-lid { top: 0; height: 15%; background-size: 100% 666.6%; background-position: 0 0; border-radius: 12px 12px 0 0; }
.pack-body { top: 15%; bottom: 0; background-size: 100% 117.6%; background-position: 0 100%; border-radius: 0 0 12px 12px; }

.beam {
  position: absolute; z-index: 6; left: -12%; right: -12%; top: 15%; height: 2px;
  transform: scaleX(0); transform-origin: left center; opacity: 0;
  background: linear-gradient(90deg, transparent, #fff 18%, #ffe9bb 50%, #fff 82%, transparent);
  box-shadow: 0 0 14px 4px rgba(255, 230, 180, .85), 0 0 40px 12px rgba(233, 205, 151, .45);
}
.scar {
  position: absolute; z-index: 5; left: 0; right: 0; top: 15%; height: 1.5px; opacity: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0), #ffd89b, rgba(255,255,255,0));
  box-shadow: 0 0 12px rgba(255, 216, 155, .8);
}
.is-cutting .beam { animation: beam-cut 1.15s cubic-bezier(.5, 0, .3, 1) both; }
@keyframes beam-cut {
  0% { transform: scaleX(0); opacity: 0; }
  8% { opacity: 1; }
  85% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
.is-cutting .scar { animation: scar-in .5s ease .75s both; }
@keyframes scar-in { from { opacity: 0; } to { opacity: 1; } }
.is-cutting .stage-pack { animation: shudder .5s ease .7s both; }
@keyframes shudder {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  60% { transform: translateX(2px); }
}

/* ---------- manifest ---------- *//* ---------- manifest ---------- */
.manifest { flex: 1 1 auto; list-style: none; margin: 0; padding: 0 18px 22px; display: flex; flex-direction: column; gap: 10px; }
.manifest li {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-1);
}
/* aspect-ratio reserves the card's box before/while art loads — the rotator
   swaps src every ~2s, and without a reserved height each swap collapsed the
   row and bounced the whole page on slow connections. */
.manifest img { width: 100%; aspect-ratio: 245 / 342; object-fit: contain; border-radius: 5px; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .5)); }
.manifest img.is-any { opacity: .48; filter: grayscale(.5) drop-shadow(0 6px 12px rgba(0, 0, 0, .5)); transition: opacity .3s ease; }
.manifest img.is-swap { opacity: 0; }
.manifest b { display: block; font-size: 14.5px; font-weight: 700; }
.manifest span { display: block; margin-top: 2px; color: var(--dim); font-size: 12px; }
.manifest u { text-decoration: none; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--dimmer); white-space: nowrap; }

/* ---------- the seal ---------- */
.seal-rail { flex: none; padding: 0 18px 10px; }
.seal {
  position: relative; padding: 14px 16px; border-radius: 16px; text-align: center;
  border: 1px solid rgba(233, 205, 151, .26);
  background: linear-gradient(170deg, rgba(233, 205, 151, .09), rgba(255, 255, 255, .02));
}
.seal-proof {
  display: block; margin: 10px auto 0; padding: 5px 0 2px;
  color: var(--gold); font-size: 10px; font-weight: 850; letter-spacing: .1em;
  text-transform: uppercase; border-bottom: 1px solid rgba(233, 205, 151, .42);
}
.seal-proof[hidden] { display: none; }
.seal-label { display: block; font-size: 9.5px; font-weight: 900; letter-spacing: .22em; color: var(--gold); }
.seal-label em { font-style: normal; margin-left: 8px; padding: 2px 7px; border-radius: 999px; font-size: 8.5px; color: #08110d; background: var(--mint); }
.seal code {
  display: block; margin-top: 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; line-height: 1.6; color: var(--text); word-break: break-all;
}
.seal small { display: block; margin-top: 5px; font-size: 11px; color: var(--dimmer); }
.seal.is-verified { border-color: rgba(111, 227, 176, .4); }
.seal.is-verified .seal-label { color: var(--mint); }
.seal.is-compact {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; column-gap: 12px;
  padding: 9px 12px; text-align: left;
}
.seal.is-compact .seal-label {
  grid-column: 1; grid-row: 1;
  display: flex; align-items: center; gap: 6px;
  font-size: 8.5px;
}
.seal.is-compact code {
  grid-column: 1; grid-row: 2;
  min-width: 0; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  word-break: normal; color: var(--dim); font-size: 9.5px;
}
.seal.is-compact small { display: none; }
.seal.is-compact .seal-proof {
  grid-column: 2; grid-row: 1 / span 2;
  align-self: center; margin: 0; padding: 4px 0 2px;
}
.seal.is-compact.is-expanded {
  padding: 13px 14px;
}
.seal.is-compact.is-expanded code {
  grid-column: 1 / -1; grid-row: 2;
  margin-top: 8px; overflow: visible; white-space: normal;
  word-break: break-all; color: var(--text); font-size: 10px;
}
.seal.is-compact.is-expanded small {
  display: block; grid-column: 1 / -1; grid-row: 3;
  margin-top: 8px; line-height: 1.45;
}
.seal.is-compact.is-expanded .seal-proof {
  grid-column: 2; grid-row: 1;
}
.seal-flight {
  position: fixed; z-index: 70; margin: 0;
  transform-origin: top left; pointer-events: none;
  overflow: hidden; will-change: transform, opacity;
}
.seal-flight.is-collapsed {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; column-gap: 12px;
  padding: 9px 12px; text-align: left;
}
.seal-flight.is-collapsed > span:first-child {
  grid-column: 1; grid-row: 1;
  display: flex; align-items: center; gap: 6px;
  font-size: 8.5px;
}
.seal-flight.is-collapsed code {
  grid-column: 1; grid-row: 2; min-width: 0;
  margin-top: 2px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; word-break: normal; color: var(--dim); font-size: 9.5px;
}
.seal-flight .seal-flight-view {
  grid-column: 2; grid-row: 1 / span 2;
  align-self: center; margin: 0; padding: 4px 0 2px;
  color: var(--gold); font-size: 10px; font-weight: 850;
  letter-spacing: .1em; border-bottom: 1px solid rgba(233, 205, 151, .42);
}
.seal-lock-icon {
  position: relative; width: 14px; height: 11px;
  display: inline-block; flex: none;
  border: 1.5px solid currentColor; border-radius: 2px;
}
.seal-lock-icon::before {
  content: ""; position: absolute; left: 50%; top: -8px;
  width: 7px; height: 7px;
  border: 1.5px solid currentColor; border-bottom: 0;
  border-radius: 7px 7px 0 0;
  transform: translateX(-50%);
}
.seal-flight .seal-lock-icon {
  opacity: 0;
  transform: translateY(-2px);
}
.seal-flight.is-locking .seal-lock-icon {
  animation: seal-lock-close .46s cubic-bezier(.2,.82,.24,1) both;
}
@keyframes seal-lock-close {
  0% { opacity: 0; transform: translateY(-4px) scale(.9); }
  58% { opacity: 1; transform: translateY(1px) scale(1.04); }
  100% { opacity: 1; transform: none; }
}

/* ---------- veils: ceremony + reveal ---------- */
.veil {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center;
  padding: 26px 26px calc(env(safe-area-inset-bottom) + 108px);
  background: rgba(5, 6, 9, .93); backdrop-filter: blur(10px);
  animation: fade .3s ease both;
}
.veil[hidden] { display: none; }
.veil.is-exiting {
  pointer-events: none;
  animation: veil-exit .38s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes veil-exit {
  from { opacity: 1; }
  to { opacity: 0; }
}

.cer { width: min(420px, 100%); text-align: center; }
.cer-orb, .cer > b, .cer-steps {
  transition: opacity .24s ease, transform .24s ease;
}
.cer.is-seal-handoff .cer-orb,
.cer.is-seal-handoff > b,
.cer.is-seal-handoff .cer-steps {
  opacity: 0; transform: translateY(-8px);
}
.cer-orb { width: 64px; height: 64px; margin: 0 auto 22px; display: grid; place-items: center; position: relative; }
.cer-orb::before, .cer-orb::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(233, 205, 151, .35); animation: orb 2.4s linear infinite;
}
.cer-orb::after { inset: -14px; animation-duration: 3.4s; animation-direction: reverse; opacity: .5; }
@keyframes orb { from { transform: rotate(0) scale(.96); } to { transform: rotate(360deg) scale(1.04); } }
.cer-orb i {
  position: relative; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--gold); border-top-color: transparent; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cer-orb i::after {
  content: ""; width: 8px; height: 4px;
  border-left: 2px solid #07110d; border-bottom: 2px solid #07110d;
  opacity: 0; transform: translateY(-1px) rotate(-45deg) scale(.5);
}
.cer-orb.is-done i {
  border-color: var(--mint); background: var(--mint);
  animation: cer-orb-complete .46s var(--ease) both;
}
.cer-orb.is-done i::after {
  opacity: 1; transform: translateY(-1px) rotate(-45deg) scale(1);
  transition: opacity .18s ease .12s, transform .3s var(--ease) .1s;
}
@keyframes cer-orb-complete {
  0% { transform: scale(.86); box-shadow: 0 0 0 rgba(111, 227, 176, 0); }
  62% { transform: scale(1.12); box-shadow: 0 0 20px rgba(111, 227, 176, .3); }
  100% { transform: scale(1); box-shadow: 0 0 10px rgba(111, 227, 176, .14); }
}
.cer > b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.cer-steps { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.cer-steps li {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 12px;
  font-size: 14px; color: var(--dim); animation: step-in .4s var(--ease) both;
}
.cer-steps li[hidden] { display: none; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cer-steps i {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(111, 227, 176, .5); color: var(--mint); font-style: normal; font-size: 11px;
}
.cer-steps i::before { content: "\2713"; }
.cer-seal {
  margin-top: 24px; padding: 14px 16px; border-radius: 16px;
  border: 1px solid rgba(233, 205, 151, .3); background: rgba(233, 205, 151, .06);
  animation: step-in .5s var(--ease) both;
}
.cer-seal span { font-size: 9.5px; font-weight: 900; letter-spacing: .22em; color: var(--gold); }
.cer-seal code { display: block; margin-top: 6px; font-family: ui-monospace, Menlo, monospace; font-size: 10.5px; line-height: 1.6; word-break: break-all; }

@media (min-width: 760px) {
  .cer { width: min(640px, calc(100vw - 64px)); }
  .cer-steps { width: min(420px, 100%); margin-inline: auto; }
  .cer-seal code {
    white-space: nowrap;
    word-break: normal;
  }
}

.rev { width: min(420px, 100%); text-align: center; }
.rev-eyebrow {
  height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; letter-spacing: .28em; color: var(--gold);
}
.rev-card { margin: 20px auto 22px; width: min(74%, 260px); position: relative; animation: rev-in .8s var(--ease) both; }
.rev-card::after {
  content: ""; position: absolute; inset: -18%; border-radius: 50%; z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(233, 205, 151, .32), transparent 70%);
}
.rev-card img { width: 100%; border-radius: 12px; filter: drop-shadow(0 26px 50px rgba(0, 0, 0, .7)); }
@keyframes rev-in { from { opacity: 0; transform: translateY(26px) scale(.9); } to { opacity: 1; transform: none; } }
.rev > b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.rev-meta { display: block; margin-top: 5px; color: var(--dim); font-size: 13px; }
.rev-value { display: block; margin-top: 14px; font-size: 34px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- proof sheet ---------- */
.sheet-veil {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end;
  background: rgba(5, 6, 9, .72); backdrop-filter: blur(6px); animation: fade .28s ease both;
}
.sheet-veil[hidden] { display: none; }
.sheet {
  width: 100%; max-height: 92%; display: flex; flex-direction: column;
  border-radius: 26px 26px 0 0; border-top: 1px solid var(--line-2);
  background: var(--ink-1);
  animation: sheet-up .42s var(--ease) both;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grab { flex: none; height: 26px; display: block; width: 100%; position: relative; }
.sheet-grab::before {
  content: ""; position: absolute; left: 50%; top: 11px; transform: translateX(-50%);
  width: 40px; height: 4px; border-radius: 999px; background: var(--line-2);
}
.sheet-head { flex: none; padding: 4px 22px 14px; }
.sheet-head b { display: block; font-size: 19px; font-weight: 800; }
.sheet-head span { display: block; margin-top: 3px; color: var(--dim); font-size: 13px; }
.proof-seal-anchor {
  flex: none;
  min-height: 102px;
  padding: 0 18px 14px;
}
.proof-seal-anchor .seal {
  width: 100%;
  margin: 0;
  border-color: rgba(111, 227, 176, .42);
  background: rgba(111, 227, 176, .07);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .34);
}
.proof-seal-anchor .seal-label { color: var(--mint); }
.seal.is-in-proof { position: relative; z-index: 2; }
.sheet-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 22px calc(env(safe-area-inset-bottom) + 26px);
}

.prow { padding: 16px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px 12px; animation: step-in .4s var(--ease) both; }
.prow[hidden] { display: none; }
.prow > i {
  grid-row: span 2; align-self: start; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-style: normal; font-size: 11px;
  color: var(--mint); box-shadow: inset 0 0 0 1px rgba(111, 227, 176, .5);
}
.prow > b { grid-column: 2; font-size: 15px; font-weight: 800; }
.prow > *:not(i):not(b) { grid-column: 2; }
.prow p { margin: 4px 0 0; color: var(--dim); font-size: 13.5px; line-height: 1.55; }
.prow .key { display: block; font-size: 11px; line-height: 1.7; color: var(--gold); word-break: break-all; }
.prow .seal { text-align: left; }

.strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: none; width: 66px; margin: 0; position: relative; }
.strip img { width: 100%; border-radius: 5px; filter: drop-shadow(0 6px 11px rgba(0, 0, 0, .5)); }
.strip figcaption { margin-top: 4px; font-size: 9px; color: var(--dimmer); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip figure.is-yours img { outline: 2px solid var(--mint); outline-offset: 2px; }
.strip figure.is-yours figcaption { color: var(--mint); }

.prow textarea {
  width: 100%; min-height: 82px; margin-top: 10px; padding: 11px 12px; resize: vertical;
  border-radius: 12px; border: 1px solid var(--line-2); background: #090b11; color: var(--dim);
  font-size: 11.5px; line-height: 1.7;
}
.prow textarea.is-edited { border-color: rgba(255, 143, 165, .6); color: var(--rose); }
.runbar { margin-top: 11px; display: flex; align-items: center; gap: 11px; }
.runbar[hidden] { display: none; }
.runbar span { font-size: 10px; font-weight: 900; letter-spacing: .26em; color: var(--gold); }
.runbar i { flex: 1; height: 2px; border-radius: 999px; background: var(--ink-3); overflow: hidden; position: relative; }
.runbar i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: scan 1.1s linear infinite;
}
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.out { margin-top: 11px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #090b11; }
.out[hidden] { display: none; }
.out span { font-size: 9.5px; font-weight: 900; letter-spacing: .22em; color: var(--gold); }
.out code { display: block; margin-top: 5px; font-size: 11px; line-height: 1.7; word-break: break-all; }
.prow-make.is-ok .out { border-color: rgba(111, 227, 176, .45); }
.prow-make.is-ok .out span, .prow-make.is-ok .out code { color: var(--mint); }
.prow-make.is-bad .out { border-color: rgba(255, 143, 165, .45); }
.prow-make.is-bad .out span, .prow-make.is-bad .out code { color: var(--rose); }
.verdict { display: block; margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 15px; font-weight: 800; }
.verdict[hidden] { display: none; }
.prow-make.is-ok .verdict { color: var(--mint); background: rgba(111, 227, 176, .09); box-shadow: inset 0 0 0 1px rgba(111, 227, 176, .28); }
.prow-make.is-bad .verdict { color: var(--rose); background: rgba(255, 143, 165, .08); box-shadow: inset 0 0 0 1px rgba(255, 143, 165, .3); }
.prow-make.is-bad > i { color: var(--rose); box-shadow: inset 0 0 0 1px rgba(255, 143, 165, .5); }
.prow .btn-quiet { margin-top: 12px; justify-self: start; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 24px); transform: translateX(-50%);
  z-index: 60; padding: 11px 18px; border-radius: 999px; font-size: 13px;
  color: var(--text); background: rgba(20, 24, 36, .96); box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.toast[hidden] { display: none; }

.loading {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 52px 22px; text-align: center; color: var(--dim); font-size: 14px;
}
.manifest .loading, li.loading { border: 0; background: none; }
.loading::before {
  content: ""; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--gold); animation: spin .8s linear infinite;
}
.loading.is-bad { color: var(--rose); }
.loading.is-bad::before { display: none; }
.loading.is-bad { color: var(--rose); }

/* ============================================================
   Desktop: the same system, given room. Nothing is redrawn —
   the reel becomes a row, the grids widen, the sheet centres.
   ============================================================ */
@media (min-width: 760px) {
  .app {
    max-width: none;
    margin: 0;
    inset: 0;
  }
  .bar { padding: 22px 34px 16px; }
  .bar-mark { font-size: 13px; }
  .scr-head { padding: 18px 34px 26px; }
  .scr-head h1 { font-size: 62px; }
  .scr-head h2 { font-size: 32px; }
  [data-scr="select"] .scr-head {
    width: min(100%, 1110px);
    margin-inline: auto;
    text-align: center;
  }
  [data-scr="select"] .reel {
    padding: 14px calc(50% - 190px) 30px;
    scroll-padding-inline: calc(50% - 190px);
    gap: 28px;
  }
  [data-scr="select"] .lot {
    flex-basis: 380px;
    opacity: .4;
    transform: scale(.9);
    filter: saturate(.72) brightness(.82);
    border-color: rgba(255, 255, 255, .055);
    transition:
      transform .44s var(--ease),
      opacity .34s ease,
      filter .34s ease,
      border-color .34s ease,
      box-shadow .44s ease;
  }
  [data-scr="select"] .lot.is-active {
    z-index: 2;
    opacity: 1;
    transform: translateY(-4px) scale(1);
    filter: none;
    border-color: rgba(233, 205, 151, .36);
    box-shadow: 0 32px 70px rgba(0, 0, 0, .56), 0 0 44px rgba(233, 205, 151, .1);
  }
  [data-scr="select"] .lot.is-active .lot-name::before {
    content: "IN FOCUS";
    display: block;
    margin-bottom: 7px;
    color: var(--gold);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .2em;
  }
  [data-scr="select"] .lot-art {
    width: min(70%, 226px);
  }
  [data-scr="select"] .party-reel-controls { display: none; }
  .grid-cards { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; padding: 0 34px 28px; }
  .manifest { padding: 0 34px 28px; }
  .manifest li { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .seal-rail { padding: 0 34px 20px; }
  .dock {
    padding: 16px max(34px, calc((100% - 900px) / 2));
  }
  .dock-price strong { font-size: 32px; }
  .sheet-veil { align-items: center; justify-content: center; padding: 30px; }
  .sheet { max-width: 720px; max-height: 88%; border-radius: 22px; border: 1px solid var(--line-2); }
  .sheet-grab { pointer-events: none; }
  .strip figure { width: 84px; }

  [data-scr="round"].is-picking .pack-reel {
    padding-inline: calc(50% - 130px);
    scroll-padding-inline: calc(50% - 130px);
  }
  .confirm {
    padding: 28px;
    gap: 11px;
  }
  .confirm-pack { width: 286px; }
  .confirm > span { margin-top: -4px; }
  .confirm-actions {
    position: fixed;
    z-index: 45;
    width: 350px;
    display: flex;
    gap: 10px;
    margin-top: 0;
    transform: translateX(-50%);
  }
  .confirm:is(.is-arriving, .is-opening) .confirm-actions,
  .confirm.is-departing .confirm-actions { transform: translate(-50%, 7px); }
  .confirm-actions[hidden] { display: none; }
  .confirm-actions .btn:first-child { flex: 0 0 104px; }
  .confirm-actions .btn:last-child { flex: 1 1 auto; }
  .reveal-actions {
    width: 270px;
    margin: 12px auto 0;
  }
  .reveal-actions:not([hidden]) { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- custom builder: chips carry the pick ---------- */
.chip {
  display: flex; flex-direction: column; gap: 1px; padding: 7px 13px; line-height: 1.25;
}
.chip b { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; }
.chip i {
  font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: 0;
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85;
}
.chip.is-done { color: var(--mint); }
.chip.is-now b, .chip.is-now i { color: #16120a; }

/* denser grid once a pool gets long, so the scroll is not a chore */
.grid-cards.is-dense { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.grid-cards.is-dense .tile b { font-size: 9.5px; }
.grid-cards.is-dense .tile i, .grid-cards.is-dense .tile em { font-size: 9px; }

/* the completed roundup: a pick and a random slot must never look alike */
.grid-cards.is-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tile .tag {
  align-self: center; margin-top: 1px; padding: 3px 10px; border-radius: 999px;
  font-size: 8.5px; font-weight: 900; letter-spacing: .1em; color: #0a1017; background: var(--mint);
}
.tile .tag-any { color: var(--dim); background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.tile u { text-decoration: none; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dimmer); }
.tile.is-random img { opacity: .34; filter: grayscale(.85); transition: opacity .3s ease; }
.tile.is-random img.is-swap { opacity: 0; }
.tile.is-random b { color: var(--dim); }
.tile.is-random { position: relative; }
.tile.is-random::before {
  content: ""; position: absolute; inset: 0 0 auto; aspect-ratio: 5 / 7; border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: none;
}

/* the reveal arrives in sequence: eyebrow, card, name, then the number */
.rev-eyebrow { animation: step-in .5s var(--ease) both .06s; }
.rev > b { animation: step-in .5s var(--ease) both; }
.rev-meta { animation: step-in .5s var(--ease) both .1s; }
.rev-value { animation: value-in .7s var(--ease) both .3s; }
@keyframes value-in {
  0% { opacity: 0; transform: scale(.86); }
  62% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

/* ============================================================
   Iteration: Pack Catch
   ============================================================ */
/* holo hero */
.holo-title {
  display: inline-block;
  background: var(--holo);
  background-size: 240% 240%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: holo-slide 9s ease-in-out infinite alternate;
  filter: drop-shadow(0 2px 18px rgba(148, 121, 255, .22));
}
@keyframes holo-slide { from { background-position: 0% 40%; } to { background-position: 100% 60%; } }
.scr-label {
  display: block; margin-top: 18px;
  font-size: 10.5px; font-weight: 900; letter-spacing: .3em; color: var(--dimmer);
}

/* likelihood bars fill the tall-phone space with something worth reading */
.lot-stats { display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.lot-stats > b {
  display: block; margin-bottom: 8px;
  font-size: 8.5px; font-weight: 900; letter-spacing: .22em; color: var(--dimmer);
}
.stat { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 34px; align-items: center; gap: 8px; margin-top: 5px; }
.stat > u {
  text-decoration: none; font-size: 10.5px; font-weight: 700; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stat > i { display: block; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.stat > i em { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--lot-accent-solid, #e9cd97), rgba(255,255,255,.65)); }
.stat > s { text-decoration: none; font-size: 10px; font-weight: 800; color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; }
.stat.is-hero > u { color: var(--lot-ink, var(--gold)); }
.stat.is-dim > u, .stat.is-dim > s { color: var(--dimmer); }
.lot[data-theme="gengar"]    { --lot-accent-solid: #c39bff; }
.lot[data-theme="treekachu"] { --lot-accent-solid: #cbe27a; }
.lot[data-theme="pinkachu"]  { --lot-accent-solid: #ff82b9; }
.lot[data-theme="charizard"] { --lot-accent-solid: #ef7a63; }
.lot[data-theme="mewtwo"]    { --lot-accent-solid: #c896ef; }
.lot[data-theme="psyduck"]   { --lot-accent-solid: #e7c95e; }
.lot[data-theme="dragonite"] { --lot-accent-solid: #f7b26a; }
.lot[data-theme="custom"]    { --lot-accent-solid: #8fd5c8; }
.lot[data-theme="mix"]       { --lot-accent-solid: #a9c8ff; }

/* ---------- Pack Preview: dealt in, tiered, grail on a pedestal ---------- */
.tier-label {
  grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px;
  margin: 8px 0 -2px; font-size: 10px; font-weight: 900; letter-spacing: .2em; color: var(--dimmer);
}
.tier-label i { font-style: normal; font-weight: 800; letter-spacing: .04em; color: var(--dim); font-size: 10px; }
.tier-row {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px; align-items: center;
  padding: 13px 14px; border-radius: 16px;
  border: 1px solid var(--line-2);
  background: linear-gradient(170deg, var(--ink-2), var(--ink-1));
  overflow: hidden; position: relative;
}
.tier-row img { width: 100%; border-radius: 7px; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .55)); }
.tr-mid { text-align: center; min-width: 0; }
.tr-mid .gh-tag {
  display: inline-block; margin-bottom: 7px; padding: 3px 10px; border-radius: 999px;
  font-size: 8.5px; font-weight: 900; letter-spacing: .18em; color: #16120a;
  background: linear-gradient(90deg, #f6e0b4, var(--gold));
}
.tr-mid b { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; }
.tr-mid i { display: block; font-style: normal; margin-top: 3px; color: var(--dim); font-size: 12px; }
.tr-mid em { display: block; font-style: normal; margin-top: 6px; color: var(--gold); font-size: 15.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tr-appears {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 12px; border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.tr-appears span { font-size: 7.5px; font-weight: 900; letter-spacing: .24em; color: var(--dimmer); }
.tr-appears b {
  font-size: 19px; font-weight: 900; letter-spacing: -.01em; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.tr-appears b u { text-decoration: none; color: var(--dimmer); font-weight: 700; margin: 0 2px; }
.tier-row.is-grail { border-color: rgba(233, 205, 151, .3); }
.tier-row.is-grail::after {
  content: ""; position: absolute; inset: 0; opacity: .14; mix-blend-mode: screen; pointer-events: none;
  background: var(--holo); background-size: 240% 240%;
  animation: holo-slide 8s ease-in-out infinite alternate;
}
.tier-row.is-grail .tr-appears b { color: var(--gold); }
.deal-in { animation: deal-in .5s var(--ease) both; }
@keyframes deal-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

.preview-art {
  position: relative; display: block; width: 100%; aspect-ratio: 2.5 / 3.5;
}
.preview-art img {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; object-fit: contain;
}
.preview-art .preview-next { z-index: 2; }
.preview-slot img {
  transition: filter .28s ease;
}
.preview-slot {
  transition: border-color .28s ease, box-shadow .28s ease, transform .28s var(--ease);
}
.preview-slot.is-spinning img {
  filter: brightness(.7) saturate(.68);
}
.preview-slot.is-spinning .tr-mid > i,
.preview-slot.is-spinning .tr-mid > em,
.preview-slot.is-spinning > i,
.preview-slot.is-spinning > em {
  opacity: 0;
}
.preview-slot.is-spinning [data-preview-name] {
  opacity: .72;
  color: var(--dim);
}
.preview-slot.is-selecting {
  border-color: rgba(233, 205, 151, .48);
  box-shadow: 0 0 24px rgba(233, 205, 151, .11);
  transform: translateY(-2px) scale(1.008);
}
.preview-slot.is-selecting img {
  filter: brightness(1.08) saturate(1.06);
}
.preview-slot.is-locked {
  animation: preview-lock-in .38s cubic-bezier(.18, .9, .24, 1.12) both;
}
.scr-head p.is-preview-selecting {
  min-height: 22px;
  color: var(--gold);
}
.preview-status {
  display: inline-block;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  animation: preview-status-arrive 1.05s var(--ease) both;
}
.preview-status span {
  display: inline-block;
  width: 1.25em;
  overflow: hidden;
  vertical-align: bottom;
  animation: preview-status-dots .9s steps(4, end) infinite;
}
.preview-lock {
  position: absolute; z-index: 4; top: 9px; right: 9px;
  padding: 3px 7px; border-radius: 4px;
  opacity: 0; transform: translateY(-5px);
  color: #07110d; background: var(--mint);
  font-size: 7.5px; font-weight: 900; letter-spacing: .12em;
  pointer-events: none;
}
.preview-slot.is-locked .preview-lock {
  animation: preview-lock-label .38s var(--ease) .08s both;
}
.preview-slot.is-known {
  border-color: rgba(111, 227, 176, .34);
  box-shadow: 0 0 20px rgba(111, 227, 176, .07);
}
.preview-slot.is-known .preview-lock {
  opacity: 1;
  transform: none;
}

.grid-cards.is-known-party {
  gap: 10px;
}
.known-party-grail {
  margin-bottom: 2px;
}
.known-party-grail .preview-art img {
  filter:
    drop-shadow(0 14px 24px rgba(0, 0, 0, .58))
    drop-shadow(0 0 18px rgba(233, 205, 151, .1));
}
.known-party-pool-label {
  margin-top: 8px;
}
.known-party-pool {
  min-width: 0;
}
.known-party-pool .preview-art img {
  border-radius: 7px;
  filter: drop-shadow(0 9px 15px rgba(0, 0, 0, .48));
}
.known-party-pool > b,
.known-party-pool > i,
.known-party-pool > em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.known-party-pool > b {
  margin-top: 2px;
}
.known-party-pool .preview-lock {
  top: 5px;
  right: 5px;
  padding: 2px 5px;
  font-size: 6px;
}

@media (min-width: 901px) {
  [data-scr="round"]:not(.is-picking) .scr-head.is-compact,
  [data-scr="round"]:not(.is-picking) .grid-cards {
    width: min(calc(100% - 64px), 66rem);
    margin-inline: auto;
  }

  [data-scr="round"]:not(.is-picking) .seal-rail {
    width: min(calc(100% - 64px), 620px);
    margin-inline: auto;
    padding-inline: 0;
  }

  [data-scr="round"]:not(.is-picking) .grid-cards {
    padding-inline: 0;
  }

  .grid-cards.is-mystery-preview {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(12px, 1.6dvh, 18px);
  }

  .grid-cards.is-mystery-preview .tier-row {
    grid-column: span 3;
    grid-template-columns: clamp(96px, 13dvh, 150px) minmax(0, 1fr) auto;
    min-height: clamp(150px, 21dvh, 224px);
    min-width: 0;
    gap: clamp(14px, 1.8dvh, 20px);
    padding: clamp(14px, 1.8dvh, 20px);
  }

  .grid-cards.is-mystery-preview .tier-row .tr-mid b {
    font-size: clamp(16px, 1.8dvh, 20px);
  }

  .grid-cards.is-mystery-preview .tier-row .tr-mid i {
    font-size: clamp(11px, 1.25dvh, 13px);
  }

  .grid-cards.is-mystery-preview .tier-row .tr-mid em {
    font-size: clamp(15px, 1.7dvh, 18px);
  }

  .grid-cards.is-mystery-preview .tier-row .tr-appears {
    padding: clamp(10px, 1.35dvh, 14px);
  }

  .grid-cards.is-mystery-preview .tier-label {
    grid-column: 1 / -1;
  }
}

@keyframes preview-status-arrive {
  0% { opacity: 0; transform: translateY(5px); text-shadow: 0 0 0 rgba(233, 205, 151, 0); }
  48% { opacity: 1; transform: none; text-shadow: 0 0 18px rgba(233, 205, 151, .7); }
  100% { opacity: 1; transform: none; text-shadow: 0 0 5px rgba(233, 205, 151, .18); }
}
@keyframes preview-status-dots {
  from { width: 0; }
  to { width: 1.25em; }
}
@keyframes preview-lock-in {
  0% { transform: scale(.975); }
  58% { transform: scale(1.018); }
  100% { transform: scale(1); }
}
@keyframes preview-lock-label {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}

/* ---------- pick screen: glow focus, hyped numbers ---------- */
.pack::after { content: none; }
.pack-number {
  position: absolute; z-index: 5; top: 12px; left: 50%;
  display: grid; grid-template-columns: auto auto; align-items: end; justify-content: center; gap: 7px;
  min-width: 72px; padding: 7px 11px 8px;
  color: #f8edcf;
  border: 1px solid rgba(232, 202, 139, .72);
  border-radius: 4px;
  background: linear-gradient(155deg, rgba(30, 26, 24, .97), rgba(10, 11, 15, .96));
  box-shadow: 0 10px 24px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 245, 218, .14);
  text-shadow: none;
  transform: translate(-50%, -13px) scale(.88);
  transform-origin: 50% 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.pack-number::before {
  content: ""; position: absolute; top: 0; right: 10px; left: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 244, 211, .9), transparent);
}
.pack-number::after {
  content: ""; position: absolute; bottom: 0; left: 50%;
  width: 28px; height: 2px;
  background: #e9cd97;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
}
.pack-number i {
  padding-bottom: 2px;
  color: #d8c7a3;
  font-style: normal; font-size: 7px; font-weight: 900; letter-spacing: .22em;
}
.pack-number b {
  min-width: 20px; color: #f0d6a0; font-size: 24px; line-height: .88; font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.pack.is-focus .pack-number {
  border-color: rgba(246, 218, 157, .88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .58), 0 0 18px rgba(233, 205, 151, .14), inset 0 1px 0 rgba(255, 245, 218, .2);
  opacity: 1;
  animation: pack-number-lock .56s cubic-bezier(.16, .84, .2, 1) both;
}
.pack.is-focus .pack-number i { animation: pack-label-arrive .34s ease-out .16s both; }
.pack.is-focus .pack-number b { animation: pack-digit-arrive .42s cubic-bezier(.16, .88, .24, 1.16) .1s both; }
.pack.is-focus .pack-number::after {
  animation: pack-number-line .38s var(--ease) .22s both;
}
@keyframes pack-number-lock {
  0% { opacity: 0; transform: translate(-50%, -14px) scale(.86); }
  54% { opacity: 1; transform: translate(-50%, 2px) scale(1.04); }
  76% { transform: translate(-50%, -1px) scale(.99); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes pack-label-arrive {
  from { opacity: 0; transform: translateX(-5px); }
  to { opacity: 1; transform: none; }
}
@keyframes pack-digit-arrive {
  from { opacity: 0; transform: translateY(-7px) scale(.72); }
  70% { opacity: 1; transform: translateY(1px) scale(1.08); }
  to { opacity: 1; transform: none; }
}
@keyframes pack-number-line {
  from { opacity: 0; transform: translateX(-50%) scaleX(0); }
  to { opacity: 1; transform: translateX(-50%) scaleX(1); }
}
.pack.is-focus {
  transform: scale(1); opacity: 1;
  box-shadow: none;
  animation: pack-float 3.2s ease-in-out infinite alternate;
}
.pack-reel.is-scrolling .pack {
  animation: none;
}
@keyframes pack-float { from { transform: scale(1) translateY(0); } to { transform: scale(1.015) translateY(-5px); } }

.btn-sheen { position: relative; overflow: hidden; }
.btn-sheen::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 68%);
  transform: translateX(-120%); animation: sheen 2.6s ease-in-out infinite;
}
@keyframes sheen { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(130%); } }

/* ---------- the opening stage ---------- */
.stage { overflow: visible; margin-top: 4px; margin-bottom: 6px; }
.stage .fx { position: absolute; inset: -30% -30% -20%; width: 160%; height: 150%; pointer-events: none; z-index: 8; }
.stage-pack { position: absolute; inset: 0; z-index: 3; filter: drop-shadow(0 22px 44px rgba(0, 0, 0, .7)); }
.pk { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.is-settled .stage-pack { transition: transform 1.5s var(--ease), opacity 1.5s ease; transform: translateY(5%) scale(.96); opacity: .55; }
.stage.is-grail-burst .stage-pack {
  transform: translateY(8%) scale(.93); opacity: .46;
  transition: transform .62s cubic-bezier(.18,.78,.22,1), opacity .62s ease;
}
.pk-lid {
  will-change: transform, opacity, mask-position; transform-origin: 50% 90%;
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 26%, #000 100%);
          mask-image: linear-gradient(to top, transparent 0%, #000 26%, #000 100%);
  -webkit-mask-size: 100% 320%; mask-size: 100% 320%;
  -webkit-mask-position: 0% 0%; mask-position: 0% 0%;
}
/* the top erodes from the seam upward, drifting as it goes to dust */
.is-lid-off .pk-lid { animation: pk-top-erode 1.1s cubic-bezier(.4, .1, .3, 1) both; }
@keyframes pk-top-erode {
  0%   { opacity: 1; transform: translateY(0); -webkit-mask-position: 0% 0%; mask-position: 0% 0%; }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-14px); -webkit-mask-position: 0% 92%; mask-position: 0% 92%; }
}

.sleeve { position: absolute; left: 0; right: 0; top: -24%; height: 40%; z-index: 4; overflow: hidden; pointer-events: none; }
.sleeve.is-rising { overflow: visible; z-index: 2; }
.sleeve.is-free { overflow: visible; z-index: 6; }
/* the card starts fully below the sleeve's clip (inside the pack) */
.stage-card {
  position: absolute; left: 14%; right: 14%; top: 100%; transform: translateY(0); opacity: 0;
  border-radius: 9px; isolation: isolate;
  will-change: transform, opacity;
}
.stage-card.is-card-opaque { background: #f6fbff; }
.stage-card.is-card-dark { background: #020204; }
.stage-card.is-grail-concealed { background: #f6fbff; }
.stage-card.is-grail-concealed::after {
  inset: 0; z-index: 0; border-radius: 9px; opacity: 1;
  background: #f6fbff; transition: none;
}
.stage-card img {
  position: relative; z-index: 1; display: block; width: 100%; border-radius: 9px;
  filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .7));
  transition: filter .32s ease, transform .32s ease;
}
.stage-card .stage-card-light {
  --grail-reveal-y: -32%;
  position: absolute; inset: 0; z-index: 2;
  opacity: 0; pointer-events: none;
  animation: none !important; transform: none !important;
  -webkit-mask-image: linear-gradient(
    to top,
    #000 0%,
    #000 calc(var(--grail-reveal-y) - 28%),
    rgba(0, 0, 0, .96) calc(var(--grail-reveal-y) - 13%),
    rgba(0, 0, 0, .68) calc(var(--grail-reveal-y) + 8%),
    transparent calc(var(--grail-reveal-y) + 32%),
    transparent 100%
  );
  mask-image: linear-gradient(
    to top,
    #000 0%,
    #000 calc(var(--grail-reveal-y) - 28%),
    rgba(0, 0, 0, .96) calc(var(--grail-reveal-y) - 13%),
    rgba(0, 0, 0, .68) calc(var(--grail-reveal-y) + 8%),
    transparent calc(var(--grail-reveal-y) + 32%),
    transparent 100%
  );
  filter:
    brightness(1.08) saturate(1.08)
    drop-shadow(0 28px 52px rgba(0, 0, 0, .82))
    drop-shadow(0 0 11px rgba(255, 239, 193, .78))
    drop-shadow(0 0 26px rgba(117, 205, 255, .42));
}
.stage-card.is-flashlight-reveal::before {
  content: ""; position: absolute; inset: -8%; z-index: 3; pointer-events: none;
  border-radius: 14px;
  background: radial-gradient(
    ellipse 72% 25% at 50% var(--flashlight-y, 116%),
    rgba(255, 252, 232, .78) 0%,
    rgba(218, 240, 255, .38) 28%,
    rgba(153, 210, 255, .14) 52%,
    transparent 76%
  );
  mix-blend-mode: screen;
  filter: blur(7px);
  opacity: .9;
}
.stage-card.is-grail-concealed img {
  filter:
    brightness(4.8)
    saturate(0)
    contrast(.08)
    blur(1.5px)
    drop-shadow(0 0 18px rgba(255, 255, 255, .98))
    drop-shadow(0 0 46px rgba(143, 215, 255, .8));
}
.stage-card.is-grail-concealed::before {
  content: ""; position: absolute; inset: -3px; z-index: 2; border-radius: 11px;
  border: 2px solid rgba(255, 255, 255, .94);
  box-shadow:
    0 0 7px rgba(255, 255, 255, .94),
    0 0 18px rgba(132, 218, 255, .72),
    0 0 34px rgba(194, 143, 255, .48);
  animation: grail-concealed-pulse .48s ease-in-out infinite alternate;
}
@keyframes grail-concealed-pulse {
  from {
    opacity: .62;
    box-shadow: 0 0 5px rgba(255,255,255,.82), 0 0 13px rgba(132,218,255,.56), 0 0 25px rgba(194,143,255,.36);
  }
  to {
    opacity: 1;
    box-shadow: 0 0 9px rgba(255,255,255,1), 0 0 24px rgba(132,218,255,.86), 0 0 42px rgba(194,143,255,.56);
  }
}
.grail-shell {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: 9px;
  background: transparent;
  transform-origin: 50% 50%; will-change: transform, opacity;
}
.grail-shell[hidden] { display: none; }
/* The halo lives on its own unmasked layer so the drain can never clip it;
   it dims globally with the remaining shine via --shell-glow. */
.grail-shell::before {
  content: ""; position: absolute; inset: -1px; z-index: 1; border-radius: 10px;
  background: transparent;
  /* matches the is-grail-concealed drop-shadow scale so the halo hands off
     seamlessly when that class comes away at reveal start */
  box-shadow:
    0 0 9px rgba(255,255,255,.96),
    0 0 24px rgba(139,220,255,.78),
    0 0 52px rgba(143,215,255,.7),
    0 0 96px rgba(198,151,255,.4);
  opacity: var(--shell-glow, 1);
  animation: grail-shell-glow-charge .5s ease-in-out infinite alternate;
}
@keyframes grail-shell-glow-charge {
  from { filter: brightness(1.02); }
  to { filter: brightness(1.28); }
}
/* The shine surface — the only layer the drain mask touches. */
.grail-shell-fill {
  position: absolute; inset: -1px; z-index: 2; border-radius: 10px;
  display: block; overflow: hidden;
  background: linear-gradient(145deg, #fff 0 34%, #e3f8ff 58%, #f0e6ff 78%, #fff7dc 100%);
  box-shadow: inset 0 0 20px rgba(255,255,255,.94);
  animation: grail-shell-charge .5s ease-in-out infinite alternate;
}
.grail-shell-fill::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg,
    transparent 26%, rgba(139,220,255,.34) 42%,
    rgba(198,151,255,.3) 52%, rgba(255,231,170,.32) 62%, transparent 78%);
  background-size: 240% 100%;
  animation: grail-shell-holo 3.4s linear infinite;
}
@keyframes grail-shell-holo {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}
@keyframes grail-shell-charge {
  from { filter: brightness(1.05) saturate(.86); opacity: .9; }
  to { filter: brightness(1.34) saturate(1.08); opacity: 1; }
}
/* Handoff from the concealed shining card into the ascension: carries the
   concealed state's big glow + white ring and melts them away through the
   charge, so the swap is never a hard cut. Removed before the flashlight
   reveal (its ::before would collide with is-flashlight-reveal's). */
.stage-card.is-ascending {
  animation: grail-handoff-glow 1.4s ease both;
}
@keyframes grail-handoff-glow {
  from {
    filter:
      drop-shadow(0 0 18px rgba(255, 255, 255, .95))
      drop-shadow(0 0 46px rgba(143, 215, 255, .8));
  }
  to {
    filter:
      drop-shadow(0 0 18px rgba(255, 255, 255, 0))
      drop-shadow(0 0 46px rgba(143, 215, 255, 0));
  }
}
.stage-card.is-ascending::before {
  content: ""; position: absolute; inset: -3px; z-index: 4; border-radius: 11px;
  border: 2px solid rgba(255, 255, 255, .94);
  box-shadow:
    0 0 7px rgba(255, 255, 255, .94),
    0 0 18px rgba(132, 218, 255, .72),
    0 0 34px rgba(194, 143, 255, .48);
  pointer-events: none;
  animation: grail-handoff-ring 1.4s ease both;
}
@keyframes grail-handoff-ring {
  from { opacity: 1; }
  to { opacity: 0; }
}
/* Burn-off is driven per-frame from JS (burnOffGrailShine): the shell and
   aura take inline opacity/filter, so their looping animations must yield. */
.grail-aura.is-burnoff { animation: none; }
.grail-aura.is-burnoff::after { opacity: 0; animation: none; }
.stage-card::after {
  content: ""; position: absolute; inset: -18%; z-index: -1; border-radius: 50%; opacity: 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(233, 205, 151, .38), transparent 70%);
  transition: opacity .8s ease;
}
.stage-card.is-landed::after { opacity: 1; }
.stage-card.is-grail-revealed::after {
  inset: -5px; border-radius: 12px; opacity: 1; background: none;
  border: 1px solid rgba(255, 250, 238, .85);
  /* Resting light is a crisp edge, not a bloom: tight static shadow,
     opacity-only whisper of a pulse. Big blurred glows read as smudge. */
  box-shadow: 0 0 8px rgba(255,250,238,.4), 0 0 18px rgba(126,208,255,.18);
  animation:
    grail-ring-in .9s ease both,
    grail-presence 4s ease-in-out .9s infinite alternate;
}
@keyframes grail-ring-in {
  from { opacity: 0; }
  to { opacity: .7; }
}
@keyframes grail-presence {
  from { opacity: .7; }
  to { opacity: .95; }
}

.shockwave {
  position: absolute; left: 50%; top: 8%; width: 30px; height: 30px; z-index: 6; pointer-events: none;
  border-radius: 50%; border: 2px solid rgba(233, 205, 151, .8); transform: translate(-50%, -50%);
}
.shockwave[hidden] { display: none; }
.shockwave.is-live { animation: shock 0.95s cubic-bezier(.1, .7, .3, 1) both; }
.shockwave.is-mega { border-width: 3px; border-color: rgba(255, 240, 200, .95); animation: shock 1.15s cubic-bezier(.08, .8, .25, 1) both; }
@keyframes shock { from { opacity: .95; transform: translate(-50%, -50%) scale(.3); } to { opacity: 0; transform: translate(-50%, -50%) scale(11); } }
.grail-aura {
  position: absolute; z-index: 5; left: 50%; top: 36%;
  width: 104%; height: 62%; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(255, 242, 216, .26), rgba(150, 199, 255, .12) 40%, transparent 66%);
  filter: blur(10px);
  /* At rest: a faint, steady backlight hugging the card — no breathing loop.
     The one-shot impact/return animations still play at full drama, and the
     transition eases their hand-off down to this resting level. */
  opacity: .3;
  transition: opacity 1.4s ease;
}
.grail-aura[hidden] { display: none; }
.grail-aura.is-impact {
  animation: grail-aura-impact .9s cubic-bezier(.12,.78,.2,1) both;
}
.grail-aura.is-returning {
  animation: grail-aura-return 2s cubic-bezier(.18,.72,.2,1) both;
}
.grail-aura::after {
  content: ""; position: absolute; left: 50%; top: 68%; width: 3px; height: 3px;
  border-radius: 50%; background: rgba(255, 240, 204, .86);
  box-shadow:
    -86px -52px rgba(208, 185, 255, .58),
    -52px 28px rgba(255, 235, 194, .72),
    -18px -94px rgba(184, 226, 255, .62),
    34px -58px rgba(255, 240, 204, .7),
    68px 18px rgba(202, 180, 255, .58),
    92px -86px rgba(255, 235, 194, .62);
  animation: grail-motes 4.6s ease-in-out infinite alternate;
}
@keyframes grail-aura-breathe {
  /* opacity-only: scaling a blur(14px) layer re-blurs every frame (shimmer) */
  from { opacity: .55; transform: translate(-50%, -50%); }
  to { opacity: .82; transform: translate(-50%, -50%); }
}
@keyframes grail-aura-impact {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.42); }
  38% { opacity: 1; transform: translate(-50%, -50%) scale(1.18); }
  100% { opacity: .78; transform: translate(-50%, -50%) scale(1); }
}
@keyframes grail-aura-return {
  0% { opacity: 0; filter: blur(18px) brightness(.7); transform: translate(-50%, -38%) scale(.58); }
  46% { opacity: .26; filter: blur(16px) brightness(1.05); transform: translate(-50%, -46%) scale(.82); }
  100% { opacity: .85; filter: blur(14px) brightness(1.08); transform: translate(-50%, -50%) scale(1); }
}
@keyframes grail-motes {
  from { opacity: .4; transform: translateY(8px); }
  to { opacity: .85; transform: translateY(-10px); }
}
/* the world goes dark while something charges inside the pack */
.veil.is-reveal {
  opacity: 1;
  animation: none;
  background: #050609;
  transition: background .9s ease;
}
.veil.is-reveal.is-handoff-ready {
  z-index: 46;
  opacity: 1;
  animation: none;
  background: #050609;
}
.veil.is-reveal.is-handoff-ready .rev-eyebrow,
.veil.is-reveal.is-handoff-ready .rev-info {
  visibility: hidden;
}
.veil.is-reveal { padding-bottom: calc(env(safe-area-inset-bottom) + 54px); }
.veil.is-reveal.is-building { background: rgba(0, 0, 0, .99); }
.is-building .rev-eyebrow { opacity: 0; }
.rev-eyebrow { transition: opacity .5s ease; }
.rev-eyebrow.is-card-title {
  display: flex; justify-content: center; flex-wrap: wrap;
  column-gap: .22em; row-gap: .05em;
  align-content: center; max-width: min(94vw, 520px); margin-inline: auto;
  font-size: clamp(23px, 7vw, 38px); line-height: 1.08; letter-spacing: 0;
  color: #fff4d7; text-shadow: 0 3px 20px rgba(0, 0, 0, .75), 0 0 30px rgba(255, 221, 150, .48);
}
.grail-title-word { display: inline-flex; white-space: nowrap; }
.grail-title-letter {
  display: inline-block; opacity: 0; filter: blur(7px);
  animation: grail-title-letter .72s cubic-bezier(.14,.78,.2,1.12) forwards;
}
@keyframes grail-title-letter {
  0% { opacity: 0; filter: blur(7px); transform: translateY(15px) scale(.86); }
  68% { opacity: 1; filter: blur(0); transform: translateY(-2px) scale(1.045); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

.rev.is-grail .stage-card img {
  box-shadow: 0 0 0 1px rgba(255, 240, 203, .5), 0 0 34px rgba(106, 196, 255, .26);
}
.rev.is-grail-live .stage-card img {
  animation: grail-card-float 3.6s ease-in-out infinite alternate;
}
.rev.is-grail-live .stage-card .stage-card-light {
  animation: none !important;
}
.stage-card.is-grail-revealed img {
  filter:
    drop-shadow(0 28px 52px rgba(0, 0, 0, .82))
    drop-shadow(0 0 22px rgba(255, 220, 146, .44))
    drop-shadow(0 0 44px rgba(128, 205, 255, .2));
}
.stage-card.is-grail-revealed .stage-card-light {
  filter:
    brightness(1.08) saturate(1.08)
    drop-shadow(0 28px 52px rgba(0, 0, 0, .82))
    drop-shadow(0 0 11px rgba(255, 239, 193, .78))
    drop-shadow(0 0 26px rgba(117, 205, 255, .42));
}
.rev.is-grail .rev-info > b { display: none; min-height: 0; }
@keyframes grail-card-float {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

.rev-info {
  height: 138px; box-sizing: border-box;
  opacity: 0; transform: translateY(8px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.rev.is-grail .rev-info {
  position: relative; top: 24px; height: 108px;
}
.rev.is-grail .rev-meta {
  color: rgba(255, 255, 255, .9);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .95);
}
.rev-info.is-shown { opacity: 1; transform: none; }
.rev-info > b { display: block; min-height: 30px; }
.rev-info .rev-meta { display: block; min-height: 18px; margin-top: 3px; }
.rev-info .rev-value { display: block; min-height: 39px; margin-top: 6px; }

.vault-chip {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  color: var(--mint); box-shadow: inset 0 0 0 1px rgba(111, 227, 176, .4);
  animation: step-in .5s var(--ease) both;
}
.vault-chip { text-decoration: none; }
.vault-chip[hidden] { display: none; }
.sim-result-chip {
  display: inline-flex; align-items: center; margin-top: 8px;
  padding: 6px 12px; border: 1px solid rgba(169, 200, 255, .3); border-radius: 6px;
  color: #dce7f8; background: rgba(18, 23, 33, .72);
  font-size: 10.5px; font-weight: 900; letter-spacing: 0;
}
.sim-result-chip[hidden] { display: none; }

@media (max-width: 759px) and (max-height: 780px) {
  .veil.is-reveal .stage {
    width: min(72%, calc((100dvh - 330px) * .5323));
  }
  .veil.is-reveal .rev.is-grail .rev-info {
    top: 8px;
  }
}

@media (max-height: 700px) {
  .confirm { padding-bottom: calc(env(safe-area-inset-bottom) + 82px); }
  .veil.is-reveal { padding-bottom: calc(env(safe-area-inset-bottom) + 70px); }
}

/* ---------- revealed reel: every card in front of its pack ---------- */
.opened {
  position: relative; flex: 0 0 48vw; max-width: 220px; scroll-snap-align: center; margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  transform: scale(.88); opacity: .4;
  transition: transform .48s var(--ease), opacity .4s ease;
}
.opened.is-focus { transform: scale(1); opacity: 1; }
.is-opened-reel {
  align-items: flex-start;
  padding: 18px calc(50% - 24vw) 24px;
}

@media (max-width: 759px) and (min-height: 701px) {
  .is-opened-reel {
    flex: 1 1 auto;
    min-height: 0;
    align-items: center;
    padding-top: 22px;
    padding-bottom: 22px;
  }
}
.opened-stage {
  position: relative; width: 100%; aspect-ratio: 2.5 / 3.5;
}
.opened-stage .op-card {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: contain;
  border-radius: 9px;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .65));
}
.opened.is-focus .op-card { filter: drop-shadow(0 20px 38px rgba(0, 0, 0, .72)) drop-shadow(0 0 26px rgba(233, 205, 151, .18)); }
.opened-stage::after {
  content: ""; position: absolute; inset: -1px; z-index: 3;
  border: 1px solid transparent; border-radius: 10px; pointer-events: none;
  transition: border-color .4s ease, box-shadow .4s ease;
}
.opened.is-focus .opened-stage::after {
  border-color: rgba(233, 205, 151, .42);
  box-shadow: 0 0 24px rgba(233, 205, 151, .12);
}
.opened figcaption { text-align: center; min-height: 62px; }
.opened figcaption b { display: block; font-size: 14px; font-weight: 800; }
.opened figcaption i { display: block; font-style: normal; margin-top: 1px; color: var(--dim); font-size: 11px; }
.opened figcaption .opened-pack-label {
  margin: 0 0 3px;
  color: #f0d69a;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.05;
  text-shadow: 0 0 13px rgba(233, 205, 151, .28);
}
.opened figcaption em { display: block; font-style: normal; margin-top: 3px; color: var(--gold); font-size: 15px; font-weight: 800; }
.opened .yours-pill {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%); z-index: 4;
  padding: 3px 8px 4px; border-radius: 3px;
  font-size: 8.5px; font-weight: 900; letter-spacing: .14em;
  color: var(--gold); background: var(--ink-0);
  border-bottom: 2px solid var(--gold); white-space: nowrap;
}

@media (min-width: 760px) {
  .veil.is-reveal .stage { width: min(72%, 292px); }
  .scr-head h1.holo-title { font-size: 58px; }
  .opened {
    flex-basis: 205px;
    gap: 8px;
  }
  .opened figcaption { min-height: 52px; }
  .is-opened-reel {
    flex: 1 1 auto;
    min-height: 0;
    align-items: center;
    gap: 18px;
    padding: 10px calc(50% - 102.5px) 14px;
  }
  .proof-seal-anchor { padding-inline: 22px; }
}


/* ---------- quick-nav: jump straight to a pack ---------- */
.pack-nav {
  flex: none; display: grid; grid-template-columns: repeat(5, 38px);
  gap: 9px 11px; justify-content: center;
  padding: 3px 18px 18px; overflow: visible;
}
.pack-nav::-webkit-scrollbar { display: none; }
.pack-nav[hidden] { display: none; }
.pnav {
  position: relative; width: 38px; aspect-ratio: 926 / 1698;
  border-radius: 6px; overflow: hidden; padding: 0;
  opacity: .45; transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.pnav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pnav b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .85);
}
.pnav.is-here { opacity: 1; transform: translateY(-3px); box-shadow: 0 0 0 1.5px rgba(233, 205, 151, .8), 0 8px 18px rgba(0, 0, 0, .5); }

@media (max-width: 759px) {
  [data-scr="round"].is-picking {
    overflow: hidden;
  }
  [data-scr="round"].is-picking .scr-head.is-compact {
    padding: 8px 20px 9px;
    text-align: center;
  }
  [data-scr="round"].is-picking .scr-head h2 {
    font-size: 24px;
  }
  [data-scr="round"].is-picking .scr-head p:empty {
    display: none;
  }
  [data-scr="round"].is-picking .seal-rail {
    padding: 0 18px 8px;
  }
  [data-scr="round"].is-picking .pack-reel {
    flex: 1 1 auto;
    min-height: 0;
    align-items: center;
    padding-top: 6px;
    padding-bottom: 8px;
  }
  [data-scr="round"].is-picking .pack-nav {
    grid-template-columns: repeat(5, minmax(40px, 48px));
    gap: 7px 10px;
    padding: 8px 18px 15px;
  }
  [data-scr="round"].is-picking .pnav {
    width: 100%;
    height: 34px;
    aspect-ratio: auto;
    border: 1px solid var(--line-2);
    border-radius: 6px;
    background: rgba(255, 255, 255, .025);
    overflow: hidden;
    opacity: .58;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  }
  [data-scr="round"].is-picking .pnav img {
    display: none;
  }
  [data-scr="round"].is-picking .pnav b {
    position: relative;
    height: 100%;
    font-size: 14px;
    color: var(--dim);
    text-shadow: none;
  }
  [data-scr="round"].is-picking .pnav.is-here {
    opacity: 1;
    transform: translateY(-1px);
    border-color: rgba(233, 205, 151, .52);
    background: linear-gradient(180deg, rgba(233, 205, 151, .12), rgba(233, 205, 151, .035));
    box-shadow: 0 7px 16px rgba(0, 0, 0, .34), inset 0 -2px 0 var(--gold);
  }
  [data-scr="round"].is-picking .pnav.is-here b {
    color: var(--gold);
  }
}

@media (max-width: 759px) and (min-height: 641px) {
  [data-scr="round"].is-picking .scr-head.is-compact {
    padding-top: clamp(12px, 2.1dvh, 18px);
  }
  [data-scr="round"].is-picking .seal-rail {
    padding-bottom: clamp(12px, 2.1dvh, 18px);
  }
}

@media (max-width: 759px) and (max-height: 640px) {
  [data-scr="round"].is-picking .pack-reel {
    padding-right: calc(50% - 26.5vw);
    padding-left: calc(50% - 26.5vw);
  }
  [data-scr="round"].is-picking .pack {
    flex-basis: 53vw;
  }
}

@media (min-width: 760px) {
  [data-scr="round"]:is(.is-picking, .is-viewing-all) .pack-reel-controls {
    width: min(calc(100% - 64px), 520px);
    margin: -7px auto 12px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    border-block: 1px solid var(--line);
  }

  [data-scr="round"] .pack-step {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dim);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
    transition: color .2s ease, transform .2s var(--ease);
  }

  [data-scr="round"] .pack-step.is-next { justify-content: flex-end; }
  [data-scr="round"] .pack-step span {
    color: var(--gold);
    font-size: 21px;
    line-height: 1;
    transition: transform .22s var(--ease);
  }
  [data-scr="round"] .pack-step:hover { color: var(--text); }
  [data-scr="round"] .pack-step.is-prev:hover span { transform: translateX(-4px); }
  [data-scr="round"] .pack-step.is-next:hover span { transform: translateX(4px); }
  [data-scr="round"] .pack-step:active { transform: scale(.97); }
  [data-scr="round"] .pack-step:disabled { opacity: .24; pointer-events: none; }
  [data-scr="round"] .pack-reel-controls > strong {
    color: var(--gold);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    white-space: nowrap;
  }

  .pack-nav {
    display: flex; gap: 8px;
    padding: 2px 18px 16px; overflow-x: auto;
  }
  .pnav { flex: none; width: 34px; }
}

@media (min-width: 901px) {
  [data-scr="round"].is-picking .scr-head.is-compact {
    width: min(calc(100% - 64px), 680px);
    margin-inline: auto;
    padding: 16px 0 13px;
    text-align: center;
  }
  [data-scr="round"].is-picking .seal-rail {
    width: min(calc(100% - 64px), 620px);
    margin-inline: auto;
    padding: 0 0 16px;
  }
  [data-scr="round"].is-picking .seal {
    border-radius: 10px;
    background: rgba(12, 14, 21, .76);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
  }
  [data-scr="round"].is-picking .pack-nav {
    width: min(calc(100% - 64px), 520px);
    margin-inline: auto;
    justify-content: center;
    padding: 3px 0 16px;
  }
}

/* ---------- desktop party builder ---------- */
.custom-kicker,
.custom-progress { display: none; }

@media (min-width: 760px) {
  [data-scr="custom"] {
    --builder-width: 1380px;
    padding-bottom: 16px;
  }
  [data-scr="custom"] .scr-head.is-compact {
    width: min(100%, var(--builder-width));
    margin: 0 auto;
    padding: 26px 38px 20px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
  }
  [data-scr="custom"] .scr-head.is-compact > div {
    min-width: 0;
  }
  [data-scr="custom"] .custom-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--gold);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .24em;
  }
  [data-scr="custom"] .scr-head h2 {
    font-size: clamp(34px, 3.2vw, 48px);
    line-height: 1;
    letter-spacing: -.035em;
  }
  [data-scr="custom"] .scr-head p {
    max-width: 720px;
    margin-top: 10px;
    color: #adb4c5;
    font-size: 15px;
  }
  [data-scr="custom"] .custom-progress {
    display: block;
    flex: none;
    padding-bottom: 5px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .18em;
  }
  [data-scr="custom"] .chips {
    width: min(calc(100% - 76px), calc(var(--builder-width) - 76px));
    margin: 0 auto 24px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    overflow: visible;
    counter-reset: builder-step;
    border-bottom: 1px solid var(--line);
  }
  [data-scr="custom"] .chip {
    position: relative;
    min-width: 0;
    min-height: 58px;
    padding: 10px 14px 12px 38px;
    display: flex;
    justify-content: center;
    border-radius: 0;
    color: var(--dimmer);
    background: none;
    box-shadow: none;
    counter-increment: builder-step;
  }
  [data-scr="custom"] .chip::before {
    content: counter(builder-step, decimal-leading-zero);
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #4f5668;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
  }
  [data-scr="custom"] .chip::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: transparent;
  }
  [data-scr="custom"] .chip b {
    overflow: hidden;
    color: inherit;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  [data-scr="custom"] .chip i {
    max-width: 100%;
    color: inherit;
    font-size: 10px;
  }
  [data-scr="custom"] .chip.is-now {
    color: var(--text);
    background: linear-gradient(180deg, transparent, rgba(233, 205, 151, .045));
  }
  [data-scr="custom"] .chip.is-now::before { color: var(--gold); }
  [data-scr="custom"] .chip.is-now::after {
    background: var(--gold);
    box-shadow: 0 0 12px rgba(233, 205, 151, .34);
  }
  [data-scr="custom"] .chip.is-done {
    color: var(--mint);
    box-shadow: none;
  }
  [data-scr="custom"] .chip.is-done::before {
    content: "\2713";
    color: var(--mint);
    font-size: 13px;
  }
  [data-scr="custom"] .grid-cards,
  [data-scr="custom"] .grid-cards.is-dense {
    width: min(calc(100% - 76px), calc(var(--builder-width) - 76px));
    margin: 0 auto;
    padding: 0 0 34px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 20px 16px;
  }
  [data-scr="custom"] .grid-cards .tile {
    min-width: 0;
    padding: 11px;
    gap: 4px;
    overflow: hidden;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 8px;
    background: linear-gradient(165deg, rgba(28, 33, 48, .9), rgba(12, 14, 21, .96));
    box-shadow: 0 14px 28px rgba(0, 0, 0, .24);
    content-visibility: auto;
    contain-intrinsic-size: 210px 330px;
    transition:
      transform .24s var(--ease),
      border-color .24s ease,
      background .24s ease,
      box-shadow .24s ease;
  }
  [data-scr="custom"] .grid-cards button.tile:hover,
  [data-scr="custom"] .grid-cards button.tile:focus-visible {
    z-index: 2;
    transform: translateY(-5px);
    border-color: rgba(233, 205, 151, .52);
    background: linear-gradient(165deg, rgba(38, 41, 54, .96), rgba(15, 16, 23, .98));
    box-shadow: 0 24px 46px rgba(0, 0, 0, .46), 0 0 26px rgba(233, 205, 151, .08);
    outline: none;
  }
  [data-scr="custom"] .grid-cards .tile img {
    width: 100%;
    aspect-ratio: 2.5 / 3.5;
    object-fit: contain;
    margin-bottom: 7px;
    border-radius: 7px;
    filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .58));
  }
  [data-scr="custom"] .grid-cards .tile b,
  [data-scr="custom"] .grid-cards.is-dense .tile b {
    color: var(--text);
    font-size: 12.5px;
    line-height: 1.3;
  }
  [data-scr="custom"] .grid-cards .tile i,
  [data-scr="custom"] .grid-cards.is-dense .tile i {
    color: var(--dim);
    font-size: 10.5px;
  }
  [data-scr="custom"] .grid-cards .tile em,
  [data-scr="custom"] .grid-cards.is-dense .tile em {
    margin-top: 3px;
    color: var(--gold);
    font-size: 14px;
  }
  [data-scr="custom"] .grid-cards.is-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  [data-scr="custom"] .grid-cards.is-summary .tile {
    text-align: center;
  }
  [data-scr="custom"] .grid-cards.is-summary .tag {
    margin: 0 auto 3px;
  }
  [data-scr="custom"] .grid-cards.is-party-review {
    grid-template-columns: minmax(280px, .86fr) repeat(2, minmax(250px, 1fr));
    grid-template-rows: repeat(2, minmax(218px, auto)) auto;
    align-items: stretch;
    gap: 16px;
  }
  [data-scr="custom"] .is-party-review .tile {
    content-visibility: visible;
  }
  [data-scr="custom"] .is-party-review .tile.is-featured {
    grid-row: 1 / span 2;
    padding: 18px;
    text-align: center;
    border-color: rgba(233, 205, 151, .3);
    background:
      radial-gradient(80% 50% at 50% 28%, rgba(233, 205, 151, .12), transparent 72%),
      linear-gradient(165deg, rgba(30, 33, 45, .96), rgba(12, 14, 21, .98));
    box-shadow: 0 24px 56px rgba(0, 0, 0, .42), 0 0 36px rgba(233, 205, 151, .07);
  }
  [data-scr="custom"] .is-party-review .tile.is-featured img {
    width: min(78%, 270px);
    margin: 4px auto 10px;
  }
  [data-scr="custom"] .is-party-review .tile:not(.is-featured) {
    min-height: 218px;
    padding: 14px;
    display: grid;
    grid-template-columns: 122px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto 1fr;
    column-gap: 16px;
    align-content: center;
    text-align: left;
  }
  [data-scr="custom"] .is-party-review .tile:not(.is-featured) img {
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: center;
    margin: 0;
  }
  [data-scr="custom"] .is-party-review .tile:not(.is-featured) > :not(img) {
    grid-column: 2;
  }
  [data-scr="custom"] .is-party-review .tile:not(.is-featured) .tag {
    justify-self: start;
    margin: 8px 0 5px;
  }
  [data-scr="custom"] .review-slot-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--gold);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .15em;
    text-transform: uppercase;
  }
  [data-scr="custom"] .review-slot-label i {
    color: var(--dimmer);
    font-size: 9px;
    font-style: normal;
    letter-spacing: .08em;
    white-space: nowrap;
  }
  [data-scr="custom"] .is-party-review .tile.is-featured .review-slot-label {
    width: 100%;
  }
  [data-scr="custom"] .custom-review-assurance {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-block: 1px solid var(--line);
  }
  [data-scr="custom"] .custom-review-assurance > span {
    min-width: 0;
    padding: 14px 20px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    border-right: 1px solid var(--line);
  }
  [data-scr="custom"] .custom-review-assurance > span:last-child {
    border-right: 0;
  }
  [data-scr="custom"] .custom-review-assurance b {
    color: var(--gold);
    font-size: 18px;
    letter-spacing: -.01em;
  }
  [data-scr="custom"] .custom-review-assurance i {
    color: var(--dimmer);
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .14em;
  }
}

@media (min-width: 760px) and (max-width: 1180px) {
  [data-scr="custom"] .grid-cards,
  [data-scr="custom"] .grid-cards.is-dense {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  [data-scr="custom"] .grid-cards.is-party-review {
    grid-template-columns: minmax(250px, .8fr) repeat(2, minmax(210px, 1fr));
  }
}

@media (max-width: 759px) {
  [data-scr="custom"] .review-slot-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
    color: var(--dim);
    font-size: 8.5px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  [data-scr="custom"] .review-slot-label i {
    color: var(--dimmer);
    font-size: 8px;
    font-style: normal;
  }
  [data-scr="custom"] .custom-review-assurance {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 4px;
    border-block: 1px solid var(--line);
  }
  [data-scr="custom"] .custom-review-assurance span {
    padding: 10px 4px;
    text-align: center;
  }
  [data-scr="custom"] .custom-review-assurance b,
  [data-scr="custom"] .custom-review-assurance i {
    display: block;
  }
  [data-scr="custom"] .custom-review-assurance b {
    color: var(--gold);
    font-size: 12px;
  }
  [data-scr="custom"] .custom-review-assurance i {
    margin-top: 2px;
    color: var(--dimmer);
    font-size: 7px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .08em;
  }
}

/* ---------- rarity composition on each party ---------- */
.lot-rarities {
  display: block; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
}
.lot-rarities > b {
  display: flex; align-items: center; gap: 7px;
  font-size: 8.5px; font-weight: 900; letter-spacing: .16em;
  color: var(--dimmer);
}
.lot-rarities > b::before {
  content: ""; width: 5px; height: 5px; flex: none; border-radius: 50%;
  background: var(--lot-accent-solid, var(--gold));
  box-shadow: 0 0 9px var(--lot-accent-solid, var(--gold));
}
.lot-rarities > span {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}
.lot-rarities i {
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 35px;
  align-items: center;
  gap: 8px;
  font-style: normal;
}
.lot-rarities i u {
  overflow: hidden;
  color: var(--dim);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lot-rarities i em {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  font-style: normal;
}
.lot-rarities i em s {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lot-accent-solid, #e9cd97), rgba(255, 255, 255, .7));
  text-decoration: none;
}
.lot-rarities i strong {
  color: var(--lot-accent-solid, var(--gold));
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.prow-mini.is-hero > u { opacity: 1; }
.prow-mini.is-dim > b, .prow-mini.is-dim > u { color: var(--dimmer); opacity: .8; }

[data-scr="select"].is-compact-fit .lot-art {
  flex-basis: 100px; width: min(45%, 124px);
  min-height: 82px; max-height: 150px; margin-bottom: 9px;
}
[data-scr="select"].is-compact-fit .lot-cap {
  display: -webkit-box; overflow: hidden;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
[data-scr="select"].is-compact-fit .lot-rarities {
  margin-top: 9px; padding-top: 8px;
}
[data-scr="select"].is-compact-fit .lot-rarities > span {
  display: flex; flex-wrap: wrap; gap: 4px 11px; margin-top: 6px;
}
[data-scr="select"].is-compact-fit .lot-rarities i {
  display: inline-flex; align-items: baseline; gap: 4px;
  white-space: nowrap;
}
[data-scr="select"].is-compact-fit .lot-rarities i em { display: none; }
[data-scr="select"].is-compact-fit .lot-rarities i u { overflow: visible; font-size: 8.5px; }
[data-scr="select"].is-compact-fit .lot-rarities i strong { font-size: 9px; }
[data-scr="select"].is-compact-fit .lot-price { margin-top: 9px; padding-top: 9px; }

/* ---------- Party Packs welcome ---------- */
.party-welcome {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  background: rgba(5, 6, 10, .97);
  opacity: 1;
  transition: opacity .34s ease;
}
.party-welcome[hidden] { display: none; }
.party-welcome.is-leaving { opacity: 0; pointer-events: none; }
.party-welcome-panel {
  position: relative;
  width: min(100%, 500px);
  padding: 30px 28px 26px;
  overflow: hidden;
  border: 1px solid rgba(205, 180, 255, .28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(42, 31, 64, .96), rgba(17, 18, 26, .99) 48%, rgba(10, 12, 18, .99));
  box-shadow: 0 34px 90px rgba(0, 0, 0, .72), inset 0 1px 0 rgba(255, 255, 255, .08);
  text-align: center;
  animation: party-welcome-in .48s cubic-bezier(.18,.8,.22,1) both;
}
.party-welcome-panel::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 211, 255, .86), transparent);
}
@keyframes party-welcome-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.party-welcome-close {
  position: absolute; z-index: 2; top: 12px; right: 12px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.1); border-radius: 6px;
  color: rgba(244, 245, 251, .7); font-size: 24px; line-height: 1;
}
.party-welcome-mark {
  width: 58px; height: 58px; margin: 0 auto 13px;
}
.party-welcome-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.party-welcome-panel > span {
  display: block;
  color: #d8c0ff; font-size: 9px; font-weight: 900; letter-spacing: .24em;
}
.party-welcome-panel h1 {
  margin: 5px 0 0;
  color: #fff; font-size: 37px; line-height: 1; letter-spacing: 0;
}
/* How it works: stated as game rules, not a marketing grid. Left-aligned
   numbered lines read as "here is the mechanic" and stay legible at 320px,
   where a three-column diagram had to shrink to stay on one row. */
.party-welcome-how {
  display: grid; gap: 9px;
  margin: 22px 0 0; padding: 17px 2px 16px;
  border-block: 1px solid rgba(255,255,255,.09);
  list-style: none;
  counter-reset: pw-step;
  text-align: left;
}
/* The line text lives in its own <span> so inline markup inside it can't
   become a second grid item and break out of the column. */
.party-welcome-how > li {
  display: grid; grid-template-columns: 22px minmax(0, 1fr);
  align-items: baseline; gap: 9px;
  color: rgba(238,238,247,.9); font-size: 12.5px; font-weight: 650;
  line-height: 1.35;
  counter-increment: pw-step;
}
.party-welcome-how > li::before {
  content: counter(pw-step);
  justify-self: center;
  color: var(--gold);
  font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums;
  line-height: 1;
}
.party-welcome-how strong {
  color: #f0d69a; font-weight: 900; letter-spacing: .01em;
}
.party-welcome-settings {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 22px;
}
.party-welcome-settings button {
  min-height: 48px;
  display: grid; grid-template-columns: 1fr auto 30px;
  align-items: center; gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.11); border-radius: 6px;
  background: rgba(255,255,255,.035);
  color: rgba(246,247,252,.78);
  text-align: left;
}
.party-welcome-settings button > span { font-size: 12px; font-weight: 800; }
.party-welcome-settings button > b {
  color: rgba(246,247,252,.52); font-size: 10px; text-transform: uppercase;
}
.party-welcome-settings button > i {
  position: relative; width: 28px; height: 16px;
  border: 1px solid rgba(255,255,255,.16); border-radius: 4px;
  background: rgba(255,255,255,.06);
}
.party-welcome-settings button > i::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 10px; height: 10px; border-radius: 2px;
  background: rgba(255,255,255,.42);
  transition: transform .2s ease, background .2s ease;
}
.party-welcome-settings button[aria-pressed="true"] {
  border-color: rgba(202,167,255,.34);
  background: rgba(151, 99, 225, .11);
}
.party-welcome-settings button[aria-pressed="true"] > b { color: #d9c1ff; }
.party-welcome-settings button[aria-pressed="true"] > i::after {
  background: #d8beff;
  transform: translateX(12px);
}
.party-welcome-enter {
  width: 100%; min-height: 52px; margin-top: 10px;
  font-size: 14px; font-weight: 900;
}
@media (max-width: 480px) {
  .party-welcome-panel { padding: 25px 16px 18px; }
  .party-welcome-mark { width: 50px; height: 50px; margin-bottom: 10px; }
  .party-welcome-panel h1 { font-size: 32px; }
  .party-welcome-how { gap: 8px; margin-top: 18px; padding: 15px 0 13px; }
  .party-welcome-how > li { font-size: 11.5px; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; }
  .party-welcome-how > li::before { font-size: 13px; }
  .party-welcome-settings { margin-top: 17px; }
  .party-welcome-settings button { grid-template-columns: 1fr auto; padding: 0 10px; }
  .party-welcome-settings button > b { display: none; }
}

/* Desktop pack preview: featured cards sit two-up with the grail full-width,
   instead of every card stacking one per row. */
@media (min-width: 760px) {
  .grid-cards .tier-row {
    grid-column: span 3;
    grid-template-columns: 116px minmax(0, 1fr) auto;
    align-content: center;
  }
  .grid-cards .tier-row.is-grail {
    grid-column: 1 / -1;
    grid-template-columns: 158px minmax(0, 1fr) auto;
    padding: 18px 22px;
  }
  .grid-cards .tier-label { grid-column: 1 / -1; }

  /* Known-party (grail + 9-card pool): a centered composition instead of a
     sparse edge-to-edge band over a ragged grid. */
  .grid-cards.is-known-party {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 14px; max-width: 1040px; width: 100%; margin-inline: auto;
  }
  .grid-cards.is-known-party .known-party-grail {
    flex: 1 1 100%;
    grid-template-columns: 150px auto auto;
    justify-content: center; column-gap: 34px;
    padding: 18px 26px;
  }
  .grid-cards.is-known-party .known-party-grail .tr-mid { text-align: left; }
  .grid-cards.is-known-party .known-party-pool-label {
    flex: 1 1 100%; justify-content: center;
  }
  .grid-cards.is-known-party .known-party-pool { flex: 0 0 178px; }
}

/* ================= final-touch pass ================= */

/* Shared explainer strip — the "10 / 1 / SHA-256" assurance, reusable. */
.party-assurance {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid rgba(255, 255, 255, .09);
}
.party-assurance > span {
  min-width: 0; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border-right: 1px solid rgba(255, 255, 255, .09);
}
.party-assurance > span:last-child { border-right: 0; }
.party-assurance b { color: var(--gold); font-size: 19px; letter-spacing: -.01em; line-height: 1; }
.party-assurance i {
  color: var(--dimmer); font-size: 8.5px; font-style: normal; font-weight: 900;
  letter-spacing: .16em; white-space: nowrap;
}
.party-welcome-assurance { margin-top: 14px; }

/* Iridescent party names, tinted to each party's main chase. */
[data-theme="mix"]       { --holo-a: #d8bdff; --holo-b: #9fe8ff; }
[data-theme="gengar"]    { --holo-a: #cba4ff; --holo-b: #a9ff6e; }
[data-theme="treekachu"] { --holo-a: #b7f06e; --holo-b: #f6e27a; }
[data-theme="pinkachu"]  { --holo-a: #ffe066; --holo-b: #ff8ec2; }
[data-theme="charizard"] { --holo-a: #ff8a5c; --holo-b: #ffd36e; }
[data-theme="mewtwo"]    { --holo-a: #d9a4ff; --holo-b: #8fd7ef; }
[data-theme="psyduck"]   { --holo-a: #ffd75e; --holo-b: #7fd0ff; }
[data-theme="dragonite"] { --holo-a: #ffbf7a; --holo-b: #a8d8ff; }
[data-theme="custom"]    { --holo-a: #7fe3d0; --holo-b: #bfe9ff; }
.lot .lot-name,
.party-card-preview-panel[data-theme] h2,
.party-purchase-panel[data-theme] h2 {
  background: linear-gradient(104deg,
    var(--holo-a, #fff) 8%, var(--holo-b, #fff) 34%,
    #fff 50%, var(--holo-a, #fff) 66%, var(--holo-b, #fff) 92%);
  background-size: 230% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: holo-name-sweep 4.2s linear infinite;
}
@keyframes holo-name-sweep {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

/* Builder chips are buttons now — jump back to any step. */
.chips .chip {
  appearance: none; font: inherit; cursor: pointer;
  background: none; text-align: left;
}
.chips .chip:disabled { cursor: default; opacity: .55; }
.chips .chip:not(:disabled):hover { border-color: rgba(233, 205, 151, .5); }

/* Double Rare allocation: tap art to add, +/- to fine-tune. */
.dr-tile { position: relative; }
.dr-tile .dr-add {
  appearance: none; border: 0; padding: 0; background: none; cursor: pointer;
  display: block; border-radius: 8px;
}
.dr-tile .dr-add img { display: block; width: 100%; border-radius: 8px; }
.dr-tile.is-on { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 10px; }
.dr-qty {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 4px;
}
.dr-qty button {
  appearance: none; cursor: pointer;
  width: 26px; height: 26px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--ink-2);
  color: var(--text); font-size: 15px; font-weight: 800; line-height: 1;
}
.dr-qty button:disabled { opacity: .35; cursor: default; }
.dr-qty > b { min-width: 18px; text-align: center; font-size: 13px; color: var(--dim); }
.dr-qty.is-active > b { color: var(--mint); }

/* Custom review on desktop: grail hero, then three featured across,
   Double Rare tiles flowing beneath — no more lopsided 2x2. */
@media (min-width: 760px) {
}

/* Mobile fit pass: dock buttons never clip, review cards stay small. */
.dock .btn { white-space: nowrap; }
@media (max-width: 420px) {
  .dock { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .dock .btn { padding-left: 13px; padding-right: 13px; font-size: 12.5px; }
}
/* Custom-build review on phones: compact three-across, grail hero contained. */

/* Small phones: the dock wraps — price on its own line, buttons share the
   row and shrink to fit. Nothing (Continue / Purchase / Open This Pack)
   can be pushed off-screen anymore. */
@media (max-width: 560px) {
  .dock { flex-wrap: wrap; row-gap: 10px; }
  .dock .dock-price { flex: 1 1 100%; }
  .dock .btn { flex: 1 1 auto; min-width: 0; padding-left: 12px; padding-right: 12px; }
}
/* Custom-build review hero: contained on phones. */

/* Tiny phones: the header must never be wider than the screen — when it was,
   it stretched the whole page and pushed docks/buttons off the right edge. */
.app { max-width: 100vw; overflow-x: clip; }
@media (max-width: 430px) {
  .party-site-bar { padding-left: 10px; padding-right: 10px; gap: 6px; }
  .party-site-bar .party-nav-actions { gap: 6px; min-width: 0; }
  .party-site-bar .party-balance small { display: none; }
  .party-site-bar .party-balance strong { font-size: 12px; }
  .party-site-bar .party-balance { padding: 6px 8px; min-width: 0; }
  .party-site-bar .bar-step { display: none; }
  .party-nav-audio button { padding: 5px 7px; }
}
@media (max-width: 360px) {
  .party-site-bar .party-brand span { display: none; }
  .party-site-bar .bar-back { font-size: 11px; padding: 6px 8px; }
}
/* Hard clamp: no top-level region may ever exceed the app's width. This is
   what actually keeps docks/bars inside small screens regardless of any
   min-content propagation deeper in the tree. */
.app > * { min-width: 0; max-width: 100%; }
.body > .scr { min-width: 0; max-width: 100%; }
@media (max-width: 759px) {
  .party-card-preview-panel > footer { flex-wrap: wrap; }
  .party-card-preview-panel > footer .btn { flex: 1 1 auto; min-width: 0; }
}
