/* ══════════════════════════════════════════════════════════
   CONSENSUS: the allowlist portal.

   The same printed board stock as consensus.games, narrowed to
   one job and split across five screens. The token block below
   is copied verbatim from web/index.html rather than imported,
   because this is a separate deployment on a separate subdomain
   and a cross-origin stylesheet would put a render-blocking
   request on another host in front of the only page that
   matters here.

   If a token changes on the landing page, change it here too.
   There is no dark mode anywhere in this brand: one committed
   world, every colour painted explicitly.
   ══════════════════════════════════════════════════════════ */

:root {
  --paper:    #F8F7F3;
  --paper-2:  #F1EFE9;
  --card:     #FFFFFF;
  --board:    #EEEBE2;
  --ink:      #15130E;
  --ink-2:    #5A5246;
  --ink-3:    #837968;
  --line:     #E4E0D6;
  --line-2:   #D6D0C2;

  --gold:     #A87C3A;
  --gold-lit: #D6AC5B;
  --gold-pale:#F0E2C2;

  --c1: #B5523C;
  --c2: #DE8F2E;
  --c3: #C9A227;
  --c4: #4E9E76;
  --c5: #3A7FA6;
  --c6: #7C56A6;
  --c7: #BC4468;

  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --deed: "Bodoni Moda", "Didot", "Bodoni MT", Georgia, serif;

  --s--2: 0.7rem;
  --s--1: clamp(0.79rem, 0.77rem + 0.12vw, 0.87rem);
  --s-0:  clamp(1rem, 0.97rem + 0.16vw, 1.08rem);
  --s-1:  clamp(1.2rem, 1.1rem + 0.45vw, 1.5rem);
  --s-2:  clamp(1.6rem, 1.35rem + 1.1vw, 2.3rem);
  --s-3:  clamp(2.1rem, 1.6rem + 2.2vw, 3.4rem);
  --s-4:  clamp(2.7rem, 1.9rem + 4vw, 5.2rem);

  --pad: clamp(1.15rem, 3.4vw, 2.75rem);

  --glass-ring: rgba(21,19,14,.13);
  --glass-shadow: 0 14px 30px -20px rgba(21,19,14,.28);
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

/* A column that fills the viewport. Without this the footer sat wherever the
   content happened to end, which on the shorter screens left it stranded in the
   middle of the page with paper below it. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at center, rgba(21,19,14,.055) 1px, transparent 1.4px) 0 0 / 26px 26px,
    radial-gradient(circle at center, rgba(168,124,58,.05) 1px, transparent 1.3px) 13px 13px / 26px 26px,
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--s-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.06; text-wrap: balance; letter-spacing: -0.03em; }
p { margin: 0; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
img { max-width: 100%; }

.coupe .bowl { fill: currentColor; }
.coupe .fizz { fill: var(--gold-lit); }

.eyebrow { font-size: var(--s--2); font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.tnum { font-variant-numeric: tabular-nums; }
.hint { font-size: var(--s--2); color: var(--ink-3); line-height: 1.5; }
.hint.is-bad { color: var(--c1); }

/* ── Buttons, identical stock to the landing page ──────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.78rem 1.4rem; border-radius: 999px; cursor: pointer;
  font-family: var(--sans); font-size: var(--s--1); font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  color: #2A1E08;
  background: var(--gold-lit);
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--glass-ring));
  box-shadow: 0 6px 18px -10px rgba(168,124,58,.7);
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s, filter .18s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 12px 26px -10px rgba(168,124,58,.75); }
.btn--quiet { color: var(--ink); background: var(--card); border: 1px solid var(--glass-ring); box-shadow: none; }
.btn:active, .linkbtn:active { transform: translateY(1px) scale(0.985); }
.btn--quiet:hover { border-color: var(--gold); color: var(--gold); filter: none; box-shadow: none; }
.btn--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 0 6px 18px -10px rgba(21,19,14,.7); }
.btn--dark:hover { filter: brightness(1.2); }
.btn--sm { padding: 0.52rem 1rem; font-size: var(--s--2); }
.btn--lg { padding: 0.95rem 1.9rem; font-size: var(--s-0); }
.btn--wide { width: 100%; }
.btn[disabled], .btn.is-off { opacity: .45; cursor: not-allowed; pointer-events: none; transform: none; filter: none; box-shadow: none; }
.btn--link {
  background: none; border: 0; box-shadow: none; padding: 0.5rem 0.2rem;
  color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px;
}
.btn--link:hover { color: var(--ink); transform: none; filter: none; box-shadow: none; }

/* ── Dev banner ──────────────────────────────────────────── */
.devbar {
  flex: 0 0 auto;
  background: #1D1A14;
  color: #F8F7F3;
  padding: 0.55rem var(--pad);
  font-size: var(--s--2);
  border-bottom: 1px solid rgba(214,172,91,.35);
}
.devbar__in {
  width: min(100%, 820px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.devbar b {
  color: var(--gold-lit);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.devbar .btn {
  padding: 0.38rem 0.85rem;
  font-size: 0.68rem;
}

/* ── Header ────────────────────────────────────────────── */
.top {
  flex: 0 0 auto;
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.top__in {
  width: min(100%, 820px);
  margin-inline: auto;
  padding: 0.65rem var(--pad);
  display: flex; align-items: center; gap: 0.8rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; min-width: 0; }
.brand__mark { color: var(--ink); flex: 0 0 auto; }
.brand__word { display: grid; gap: 0.02rem; min-width: 0; }
.brand__name { font-weight: 800; letter-spacing: 0.2em; font-size: 0.76rem; text-transform: uppercase; }
.brand__tag { font-family: var(--deed); font-style: italic; font-size: 0.72rem; color: var(--gold); white-space: nowrap; }
.top__spacer { margin-left: auto; }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.42rem 0.85rem; border-radius: 999px;
  background: var(--card); border: 1px solid var(--glass-ring);
  font-size: var(--s--1); font-weight: 800; color: var(--ink);
  cursor: pointer; white-space: nowrap;
  transition: border-color .18s;
}
.chip:hover { border-color: var(--gold); }
.chip b { font-size: var(--s-0); }
.chip span { font-size: var(--s--2); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 800; }
.chip.is-x3 { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-pale); }
.chip__handle { font-size: var(--s--1); font-weight: 800; color: var(--ink); }
.chip__av { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--paper-2); }

@media (max-width: 640px) {
  .brand__tag, .chip span { display: none; }
  .top__in { gap: 0.45rem; }
}

/* ── The progress spine ──────────────────────────────────── */
.prog { flex: 0 0 auto; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.prog__in {
  width: min(100%, 820px);
  margin-inline: auto;
  padding: 0.55rem var(--pad);
  display: flex; align-items: center; gap: 0.4rem;
}
.prog__step {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.35rem 0.55rem; border-radius: 999px;
  background: none; border: 1px solid transparent; cursor: default;
  font-family: var(--sans); text-align: left; color: var(--ink-3);
  transition: all .18s cubic-bezier(.2,.8,.2,1);
}
.prog__step[data-can-go="1"] { cursor: pointer; }
.prog__step[data-can-go="1"]:hover { background: var(--card); border-color: var(--line); color: var(--ink-2); }
.prog__n {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  font-family: var(--deed); font-size: 0.85rem; font-weight: 800;
  background: var(--card); color: var(--ink-3); border: 1px solid var(--line-2);
  transition: all .18s ease;
}
.prog__n svg { width: 13px; height: 13px; }
.prog__lbl {
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prog__step.is-on { color: var(--ink); }
.prog__step.is-on .prog__n { background: var(--gold-lit); color: #2A1E08; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-pale); }
.prog__step.is-done { color: var(--ink-2); }
.prog__step.is-done .prog__n { background: var(--c4); color: #FFF; border-color: var(--c4); }

@media (max-width: 760px) {
  .prog__lbl { display: none; }
  .prog__in { gap: 0.45rem; justify-content: center; }
  .prog__step { flex: 0 0 auto; }
}

/* ── Screens / Card Container ────────────────────────────── */
.wrap {
  width: min(100%, 820px);
  margin-inline: auto;
  padding: clamp(1.4rem, 3.2vw, 2.4rem) var(--pad) clamp(2rem, 4vw, 3.2rem);
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.screen {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--glass-ring);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 36px -18px rgba(21,19,14,.18), 0 0 0 1px rgba(21,19,14,.04);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 440px;
  will-change: transform, opacity;
}

@keyframes screenSoftIn {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen:not([hidden]) {
  animation: screenSoftIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.screen.is-leaving {
  opacity: 0 !important;
  transform: translateY(-8px) scale(0.995) !important;
  transition: opacity 0.16s ease-in, transform 0.16s ease-in !important;
  pointer-events: none !important;
}

/* 7-property spectrum ribbon on every card, matching the landing page */
.screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg,
    var(--c1) 0%, var(--c1) 14.28%,
    var(--c2) 14.28%, var(--c2) 28.57%,
    var(--c3) 28.57%, var(--c3) 42.85%,
    var(--c4) 42.85%, var(--c5) 57.14%,
    var(--c5) 57.14%, var(--c6) 71.42%,
    var(--c6) 71.42%, var(--c7) 85.71%,
    var(--c7) 85.71%, var(--gold) 100%
  );
}

.screen__top {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  justify-items: start;
}

.screen__body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
  flex: 1 0 auto;
}

.screen h1, .screen h2 {
  font-size: clamp(1.6rem, 1.45rem + 1.1vw, 2.2rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.lede {
  color: var(--ink-2);
  font-size: var(--s-0);
  line-height: 1.55;
  max-width: 62ch;
}

.msg {
  font-size: var(--s--1);
  font-weight: 600;
  color: var(--gold);
  min-height: 1.35em;
}
.msg.is-bad { color: var(--c1); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }

.screen__body > .missions,
.screen__body > .boosts,
.screen__body > .wallet,
.screen__body > .share,
.screen__body > .field { width: 100%; }

.actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.actions--bare { border-top-color: transparent; }
.actions__note { font-size: var(--s--2); color: var(--ink-3); margin-left: auto; text-align: right; }

@media (max-width: 700px) {
  .screen { min-height: 0; padding: 1.4rem; }
}

.linkbtn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: var(--s--1); font-weight: 700;
  color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px;
  transition: color .18s;
}
.linkbtn:hover { color: var(--ink); }

/* ── Missions ────────────────────────────────────────────── */
.missions {
  display: grid;
  gap: 0.75rem;
  width: 100%;
}

.mission {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.9rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), border-color .18s, box-shadow .18s, background .18s;
}

.mission:hover {
  background: var(--card);
  border-color: var(--gold-lit);
  box-shadow: 0 6px 18px -10px rgba(168,124,58,.25);
  transform: translateY(-1px);
}

.mission.is-approved {
  background: color-mix(in srgb, var(--c4) 7%, var(--card));
  border-color: color-mix(in srgb, var(--c4) 35%, var(--line-2));
}

.mission__ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #FFF;
  box-shadow: 0 2px 6px rgba(21,19,14,.08);
}
.mission__ico svg { width: 18px; height: 18px; display: block; }

.mission__t {
  font-size: var(--s-0);
  font-weight: 700;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.pts {
  flex: 0 0 auto;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line-2);
  font-size: var(--s--2);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.mission.is-approved .pts {
  background: color-mix(in srgb, var(--c4) 14%, var(--card));
  border-color: color-mix(in srgb, var(--c4) 45%, var(--glass-ring));
  color: color-mix(in srgb, var(--c4) 78%, var(--ink));
}

.mission__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  white-space: nowrap;
}
.mission__actions .btn {
  white-space: nowrap;
}

.mission__state {
  font-size: var(--s--2);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.mission.is-approved .mission__state {
  color: color-mix(in srgb, var(--c4) 78%, var(--ink));
}
.mission__state.is-bad { color: var(--c1); }

.mission__req {
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8C6524;
  background: var(--gold-pale);
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
}

.mission .field { flex: 1 1 200px; flex-wrap: nowrap; }
.mission .field input { flex: 1 1 80px; padding-inline: 0.85rem; }
.mission .hint { flex: 1 1 100%; }

/* ── Fields ────────────────────────────────────────────── */
.field { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.field input {
  flex: 1 1 220px; min-width: 0;
  padding: 0.65rem 1rem; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line-2);
  font-family: var(--sans); font-size: var(--s--1); color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.field input::placeholder { color: var(--ink-3); }
.field input:focus-visible { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-pale); }
.field input[data-mono] { font-variant-numeric: tabular-nums; }

/* ── Status pills ──────────────────────────────────────── */
.status {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.32rem 0.8rem 0.32rem 0.65rem; border-radius: 999px;
  font-size: var(--s--2); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  white-space: nowrap;
}
.status__dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.status--soon { background: var(--card); border: 1px solid var(--glass-ring); color: var(--ink-3); }
.status--soon .status__dot { background: var(--ink-3); }
.status--done {
  background: color-mix(in srgb, var(--c4) 14%, var(--card));
  border: 1px solid color-mix(in srgb, var(--c4) 45%, var(--glass-ring));
  color: color-mix(in srgb, var(--c4) 78%, var(--ink));
}
.status--done .status__dot { background: var(--c4); }

/* ── Wallet ────────────────────────────────────────────── */
.wallet {
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 1.3rem 1.45rem; display: grid; gap: 0.95rem;
  background: var(--paper-2);
  transition: all .2s ease;
}
.wallet.is-set {
  border-color: color-mix(in srgb, var(--c4) 45%, var(--glass-ring));
  background: color-mix(in srgb, var(--c4) 5%, var(--card));
  box-shadow: 0 6px 20px -10px rgba(78,158,118,.25);
}
.wallet__addr {
  font-weight: 800; font-size: var(--s-0); font-variant-numeric: tabular-nums;
  word-break: break-all; margin-bottom: 0.4rem;
  padding: 0.75rem 1rem; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--ink);
}

/* ── Boost ───────────────────────────────────────────────── */
.boosts { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.boost {
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--paper-2); padding: 1.2rem 1.3rem; display: grid; gap: 0.25rem;
  transition: transform .18s, border-color .18s, background .18s;
}
.boost:hover {
  border-color: var(--gold);
  background: var(--card);
  transform: translateY(-1px);
}
.boost__x { font-family: var(--deed); font-size: var(--s-3); font-weight: 800; line-height: 1; color: var(--gold); }
.boost__t { font-size: var(--s-0); font-weight: 800; color: var(--ink); }
.boost__d { font-size: var(--s--1); color: var(--ink-2); line-height: 1.45; }

/* ── Boost Slots (X company left) ────────────────────────── */
.boost-slots {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.8rem; padding: 0.95rem 1.25rem;
  background: var(--paper-2); border: 1px solid var(--line-2);
  border-radius: var(--r-md); margin: 0.2rem 0;
  transition: border-color .2s, background .2s;
}
.boost-slots__inner { display: inline-flex; align-items: center; gap: 0.65rem; }
.boost-slots__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--c4); box-shadow: 0 0 0 3px rgba(78, 158, 118, .2);
  animation: pulseDot 2s infinite ease-in-out; flex: 0 0 auto;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: .9; box-shadow: 0 0 0 3px rgba(78, 158, 118, .2); }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 0 6px rgba(78, 158, 118, .35); }
}
.boost-slots__text {
  font-family: var(--sans); font-size: var(--s-0); font-weight: 700;
  color: var(--ink); letter-spacing: -0.01em;
}
.boost-slots__text b {
  font-family: var(--deed); font-size: var(--s-1); color: var(--gold);
  margin-right: 0.2rem;
}
.boost-slots__sub { font-size: var(--s--2); color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.boost-slots.is-sold-out {
  border-color: rgba(181, 82, 60, .35); background: rgba(181, 82, 60, .05);
}
.boost-slots.is-sold-out .boost-slots__dot {
  background: var(--c1); box-shadow: 0 0 0 3px rgba(181, 82, 60, .2);
  animation: none;
}
.boost-slots.is-sold-out .boost-slots__text b { color: var(--c1); }
.badge--soldout {
  display: inline-block; font-size: var(--s--2); font-weight: 800;
  padding: 0.15rem 0.55rem; border-radius: 999px;
  background: var(--c1); color: var(--paper); text-transform: uppercase;
  letter-spacing: 0.05em; margin-left: 0.4rem; vertical-align: middle;
}

/* ── Done Screen Celebration ─────────────────────────────── */
.done-banner { display: flex; align-items: center; gap: 1.15rem; margin-bottom: 0.35rem; }
.done-tick {
  width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(78,158,118,.16) 0%, rgba(214,172,91,.18) 100%);
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--c4);
  box-shadow: 0 6px 20px -6px rgba(78,158,118,.45), 0 0 0 4px rgba(78,158,118,.1);
  animation: tickPop .6s cubic-bezier(.175, .885, .32, 1.275) forwards;
}
.done-tick__svg { width: 32px; height: 32px; display: block; }
.done-tick__circle {
  stroke: var(--c4); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 145; stroke-dashoffset: 145;
  animation: strokeCircle .55s ease-out forwards;
}
.done-tick__check {
  stroke: var(--c4); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 38; stroke-dashoffset: 38;
  animation: strokeCheck .38s .28s ease-out forwards;
}

@keyframes tickPop {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  65% { transform: scale(1.15) rotate(6deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes strokeCircle { to { stroke-dashoffset: 0; } }
@keyframes strokeCheck { to { stroke-dashoffset: 0; } }

.confetti-canvas {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 99999;
}

/* ── Done / Share ──────────────────────────────────────── */
.share { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 780px) { .share { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 1.8rem; } }
.share__left { display: grid; gap: 0.85rem; justify-items: start; }
.share__card { display: grid; gap: 0.5rem; }
.reflink { display: flex; gap: 0.5rem; width: 100%; }
.reflink input {
  flex: 1 1 auto; min-width: 0; padding: 0.65rem 0.9rem; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line-2);
  font-family: var(--sans); font-size: var(--s--2); color: var(--ink-2);
}
.cardprev__frame {
  border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden;
  background: var(--paper-2); aspect-ratio: 1200 / 630;
  box-shadow: 0 8px 24px -12px rgba(21,19,14,.2);
}
.cardprev__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── The wallet picker ───────────────────────────────────── */
.sheet {
  width: min(100%, 380px); border: 1px solid var(--glass-ring); border-radius: var(--r-lg);
  background: var(--card); color: var(--ink); padding: 0;
  box-shadow: 0 30px 60px -30px rgba(21,19,14,.45);
}
.sheet::backdrop { background: rgba(21,19,14,.34); }
.sheet__head { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); }
.sheet__head h3 { font-size: var(--s-1); font-weight: 800; }
.sheet__close {
  margin-left: auto; width: 30px; height: 30px; border-radius: 8px;
  background: none; border: 1px solid var(--line-2); color: var(--ink-3);
  font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.sheet__close:hover { color: var(--ink); border-color: var(--gold); }
.sheet__body { padding: 1.1rem; display: grid; gap: 0.7rem; }

.wallets { display: grid; gap: 0.45rem; }
.wallet-opt {
  display: flex; align-items: center; gap: 0.8rem; width: 100%;
  padding: 0.65rem 0.85rem; text-align: left; cursor: pointer;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; font: inherit;
  transition: border-color .18s, transform .18s;
}
.wallet-opt:hover { border-color: var(--gold); transform: translateY(-1px); }
.wallet-opt__icon { width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto; object-fit: cover; background: var(--paper-2); border: 1px solid var(--line); }
.wallet-opt__letter {
  width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--gold-pale); color: var(--gold);
  font-family: var(--deed); font-weight: 800; border: 1px solid var(--line);
}
.wallet-opt__name { font-weight: 700; flex: 1 1 auto; min-width: 0; }
.wallet-opt__tag { font-size: var(--s--2); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .wallet-opt:hover { transform: none; } }

/* ── The invite landing, server rendered ───────────────── */
.invite { min-height: 100vh; display: grid; place-items: center; padding: var(--pad); }
.invite__card {
  width: min(100%, 560px);
  background: var(--card); border: 1px solid var(--glass-ring);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--glass-shadow);
}
.panel__ribbon { display: flex; height: 5px; }
.panel__ribbon i { flex: 1; }
.invite__in { padding: clamp(1.3rem, 4vw, 2.1rem); display: grid; gap: 0.8rem; justify-items: start; }
.invite__h { font-size: var(--s-2); font-weight: 800; }
.invite__p { color: var(--ink-2); font-size: var(--s--1); }

/* ── Footer ────────────────────────────────────────────── */
.foot { flex: 0 0 auto; border-top: 1px solid var(--line); padding: 0.85rem var(--pad); background: var(--paper-2); }
.foot__in {
  width: min(100%, 820px);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}
.foot__nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-left: auto; }
.foot__nav a { font-size: var(--s--2); font-weight: 700; color: var(--ink-2); text-decoration: none; }
.foot__nav a:hover { color: var(--gold); }

/* ── What an invite link has actually done ────────────
   The number sits beside the link rather than under the hint, because it is
   the answer to the question somebody asks the moment they copy it. */
.reftally {
  display: flex; align-items: baseline; gap: .5rem;
  padding: .5rem .7rem; margin-top: .1rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--paper-2, rgba(0,0,0,.02));
}
.reftally__n {
  font-family: var(--deed, Georgia, serif);
  font-size: 1.35rem; font-weight: 600; line-height: 1;
  color: var(--gold); font-variant-numeric: tabular-nums;
}
.reftally__k {
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3);
}
