/* ==========================================================================
   MillionWall design system
   A dark gallery room; the wall is the single lit artifact. Gold = value.
   ========================================================================== */

:root {
  --ink: #0B0906;
  --room: #14100B;
  --line: #2A231A;
  --ivory: #F4ECDD;
  --dust: #97896F;
  --gold: #E8A33D;
  --flare: #FFCF6B;
  --live: #57D98A;
  --danger: #E5484D;

  --font-display: "Bricolage Grotesque", "Arial Black", Arial, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Courier New", monospace;

  --radius: 2px;
  --speed: 180ms;
}

/* ---------- base ---------- */

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

html { height: 100%; }

body {
  min-height: 100%;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The wall page itself never scrolls; only panels scroll internally. */
.wall-page {
  position: fixed;
  inset: 0;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  width: 100%;
}

[hidden] { display: none !important; }

::selection { background: var(--gold); color: var(--ink); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--flare); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ivory);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

/* ---------- typographic utilities ---------- */

.micro {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dust);
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ---------- buttons ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--speed) ease-out,
              border-color var(--speed) ease-out,
              color var(--speed) ease-out,
              transform var(--speed) ease-out;
}

.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--flare); color: var(--ink); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: var(--line); color: var(--dust); cursor: not-allowed; transform: none; }

.btn-ghost { background: transparent; color: var(--ivory); border-color: var(--line); }
.btn-ghost:hover { color: var(--ivory); border-color: var(--gold); }
.btn-ghost:disabled { color: var(--dust); border-color: var(--line); cursor: not-allowed; }

.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--ivory); }

.btn-small { padding: 7px 12px; font-size: 12px; }
.btn-block { width: 100%; }

.icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--dust);
  cursor: pointer;
  transition: border-color var(--speed) ease-out, color var(--speed) ease-out;
}
.icon-btn:hover { border-color: var(--gold); color: var(--ivory); }

/* ---------- canvas ---------- */

.wall-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--ink);
  touch-action: none;
}

/* ---------- staggered reveal ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 480ms ease-out, transform 480ms ease-out;
  transition-delay: calc(var(--rv, 0) * 90ms);
}
html.js .ui-ready .reveal { opacity: 1; transform: translateY(0); }

/* ---------- top bar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
  padding: 0 20px;
  background: rgba(11, 9, 6, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ivory);
  text-decoration: none;
  line-height: 1;
}
.wordmark:hover { color: var(--ivory); }
.wordmark-gold { color: var(--gold); }

.tagline {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--dust);
  white-space: nowrap;
}

.stats {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.stats-line {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stats-line-label { color: var(--dust); }

.stats-compact {
  display: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--room);
  white-space: nowrap;
}

.topnav { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
  pointer-events: none;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(232, 163, 61, 0.55);
  transition: width 600ms ease-out;
}

/* ---------- bottom ticker ---------- */

.ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 40px;
  padding: 0 16px;
  background: rgba(11, 9, 6, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  overflow: hidden;
}

.live-badge { display: flex; align-items: center; gap: 8px; flex: none; color: var(--ivory); }

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  animation: live-pulse 2.2s ease-out infinite;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(87, 217, 138, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(87, 217, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(87, 217, 138, 0); }
}

.ticker-viewport { flex: 1; overflow: hidden; min-width: 0; }

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  white-space: nowrap;
}
.ticker-track.marquee { animation: ticker-scroll var(--ticker-dur, 30s) linear infinite; }
.ticker-viewport:hover .ticker-track.marquee { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-set { display: inline-flex; align-items: center; padding-right: 22px; }
.ticker-item { display: inline-flex; align-items: center; }
.t-name { color: var(--ivory); text-transform: uppercase; }
.t-verb { color: var(--dust); white-space: pre; }
.t-amt { color: var(--gold); font-variant-numeric: tabular-nums; }
.t-div {
  display: inline-block;
  width: 3px;
  height: 3px;
  background: var(--gold);
  margin: 0 18px;
  flex: none;
}

/* ---------- zoom controls ---------- */

.zoomers {
  position: fixed;
  right: 16px;
  bottom: 56px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zoom-btn {
  appearance: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--room);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ivory);
  cursor: pointer;
  transition: border-color var(--speed) ease-out, color var(--speed) ease-out;
}
.zoom-btn:hover { border-color: var(--gold); color: var(--flare); }

/* ---------- hint chip ---------- */

.hint-chip {
  position: fixed;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 22px;
  background: var(--room);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--speed) ease-out, transform var(--speed) ease-out,
              visibility 0s linear var(--speed);
}
.hint-chip.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity var(--speed) ease-out, transform var(--speed) ease-out;
}
.hint-main {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory);
}
.hint-sub {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dust);
}

/* ---------- claim chip (the signature moment) ---------- */

.claim-chip {
  position: fixed;
  z-index: 45;
  display: none;
  min-width: 190px;
  padding: 14px 18px;
  background: var(--room);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.55);
}
.claim-chip.show { display: block; animation: chip-in 160ms ease-out; }
.claim-chip.live { pointer-events: none; }
.claim-chip.over { border-color: var(--danger); }

@keyframes chip-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.claim-chip.live .chip-confirm { display: none; }
.claim-chip.confirm .chip-live { display: none; }

.chip-live { display: flex; flex-direction: column; gap: 3px; }

.chip-size {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--dust);
  font-variant-numeric: tabular-nums;
}
.chip-px {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}
.chip-price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.01em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.chip-limit {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--danger);
}

.chip-confirm { display: flex; flex-direction: column; gap: 8px; }
.chip-confirm-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}
.chip-confirm-size {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}
.chip-error {
  font-size: 12px;
  color: var(--danger);
  max-width: 240px;
}
.chip-error:empty { display: none; }
.chip-actions { display: flex; gap: 8px; margin-top: 2px; }

.claim-chip.shake { animation: chip-shake 340ms ease-out; }

@keyframes chip-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* ---------- tooltip ---------- */

.tooltip {
  position: fixed;
  z-index: 60;
  display: none;
  max-width: 260px;
  padding: 9px 12px;
  background: var(--room);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.tooltip.show { display: block; }
.tt-name {
  font-weight: 500;
  font-size: 13px;
  color: var(--ivory);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tt-size {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--dust);
  font-variant-numeric: tabular-nums;
}
.tt-visit {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
}

/* ---------- panels ---------- */

.panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: 480px;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 24px;
  background: var(--room);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  transform: translateX(103%);
  visibility: hidden;
  transition: transform 220ms ease-out, visibility 0s linear 220ms;
}
.panel.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 220ms ease-out;
}
.panel-narrow { width: 420px; }
.panel-over { z-index: 51; }

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.panel-head-titles { display: flex; flex-direction: column; gap: 6px; }
.panel-title { font-size: 24px; font-weight: 800; }

.hairline { border: 0; border-top: 1px solid var(--line); }

/* ---------- checkout ---------- */

.claim-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
}
.summary-cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.summary-value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.countdown { color: var(--gold); }
.countdown.crit { color: var(--danger); }

.checkout-body { display: flex; flex-direction: column; gap: 22px; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 26px 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--speed) ease-out, background-color var(--speed) ease-out;
}
.dropzone:hover { border-color: var(--gold); }
.dropzone.dragover { border-color: var(--gold); background: rgba(232, 163, 61, 0.06); }
.dz-title { font-weight: 500; font-size: 14px; color: var(--ivory); }
.dz-sub { font-size: 12px; color: var(--dust); }

.dz-fileline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
}
.dz-name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  color: var(--ivory);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dust);
}
.input {
  appearance: none;
  width: 100%;
  padding: 11px 12px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--speed) ease-out;
}
.input::placeholder { color: var(--dust); opacity: 0.7; }
.input:focus { outline: none; border-color: var(--gold); }
.input.invalid { border-color: var(--danger); }
.field-error { font-size: 12px; color: var(--danger); min-height: 0; }
.field-error:empty { display: none; }

.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.total-value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 22px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.fineprint { font-size: 12px; color: var(--dust); text-align: center; }

.expired-state {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
}
.expired-title { font-size: 18px; font-weight: 600; }
.expired-copy { font-size: 13px; color: var(--dust); }

/* ---------- wall of fame ---------- */

.fame-list { display: flex; flex-direction: column; gap: 8px; }

.fame-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
}
.fame-row.top {
  border-color: rgba(232, 163, 61, 0.5);
  background: rgba(232, 163, 61, 0.05);
}

.fame-rank {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  color: var(--dust);
  width: 32px;
  flex: none;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.fame-row.top .fame-rank { color: var(--gold); font-size: 20px; }

.fame-thumb {
  width: 48px;
  height: 48px;
  flex: none;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #3A2A12;
  image-rendering: pixelated;
  display: block;
}
.fame-row.top .fame-thumb { border-color: rgba(232, 163, 61, 0.5); }

.fame-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fame-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--ivory);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fame-name-link { color: var(--ivory); }
.fame-name-link:hover { color: var(--flare); }
.fame-meta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--dust);
  font-variant-numeric: tabular-nums;
}

.empty-note { font-size: 14px; color: var(--dust); }

/* ---------- how it works ---------- */

.steps { display: flex; flex-direction: column; gap: 18px; list-style: none; }
.step { display: flex; gap: 14px; }
.step-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
}
.step-body { display: flex; flex-direction: column; gap: 3px; }
.step-title { font-size: 16px; font-weight: 600; }
.step-copy { font-size: 13px; color: var(--dust); }

.faq { display: flex; flex-direction: column; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  padding: 13px 0;
  font-weight: 500;
  font-size: 14px;
  color: var(--ivory);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--dust); }
.faq-item[open] summary::after { content: "\2212"; color: var(--gold); }
.faq-answer { padding: 0 0 14px; font-size: 13px; color: var(--dust); }

.panel-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.footer-line {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
}
.footer-contact { font-size: 12px; }

/* ---------- toasts ---------- */

.toasts {
  position: fixed;
  top: 76px;
  right: 16px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(340px, calc(100vw - 32px));
}

.toast {
  padding: 12px 16px;
  background: var(--room);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--ivory);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toast-in 200ms ease-out;
}
.toast.danger { border-left-color: var(--danger); }
.toast.out { opacity: 0; transform: translateX(8px); transition: opacity 280ms ease-out, transform 280ms ease-out; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- standalone pages (thanks, admin gate) ---------- */

.page-center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--ink);
}

.card {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 40px;
  background: var(--room);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- status badges (admin, shared tokens) ---------- */

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--dust);
}
.badge-paid { color: var(--live); border-color: rgba(87, 217, 138, 0.4); }
.badge-pending { color: var(--gold); border-color: rgba(232, 163, 61, 0.4); }
.badge-expired { color: var(--dust); }
.badge-rejected { color: var(--danger); border-color: rgba(229, 72, 77, 0.4); }

.error-text { font-size: 13px; color: var(--danger); }

/* ---------- responsive ---------- */

@media (max-width: 1220px) {
  .stats-line { display: none; }
  .stats-compact { display: inline-block; }
}

@media (max-width: 900px) {
  .tagline { display: none; }
  .stats { position: static; transform: none; margin-left: auto; }
  .topnav { margin-left: 0; }
}

@media (max-width: 760px) {
  /* One thin top row: wordmark left, live numbers right. All actions move
     to the thumb-reach mobile bar above the ticker. */
  .topbar {
    height: 52px;
    padding: 0 12px;
    gap: 8px;
  }
  .topnav { display: none; }
  .wordmark { font-size: 17px; flex-shrink: 0; }
  .stats { display: flex; align-items: center; min-width: 0; }
  /* The stage pill tells the story on mobile; the raw counter is noise. */
  .stats-compact { display: none; }
  .stage-pill { font-size: 10px; padding: 4px 8px; white-space: nowrap; letter-spacing: 0.08em; }

  .mobilebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 40px;
    z-index: 45;
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(20, 16, 11, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }
  .mbtn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 4px;
    font-family: "Instrument Sans", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--ivory);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 2px;
    text-decoration: none;
    cursor: pointer;
  }
  .mbtn:active { border-color: var(--gold); }
  .mbtn-claim {
    flex: 1.5;
    background: var(--gold);
    border-color: var(--gold);
    color: #241A0B;
    font-weight: 600;
  }
  .mbtn-claim:active { background: var(--flare); }

  .toasts { top: 64px; }

  .panel,
  .panel-narrow {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 82vh;
    max-height: 82dvh;
    border-left: none;
    border-top: 1px solid var(--line);
    transform: translateY(103%);
  }
  .panel.open { transform: translateY(0); }

  .zoomers { bottom: 108px; right: 10px; }
  .hint-chip { bottom: 112px; width: max-content; max-width: calc(100vw - 24px); }
  .claim-summary { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 761px) {
  .mobilebar { display: none; }
}

@media (max-width: 420px) {
  .card { padding: 28px 20px; }
  .panel { padding: 18px 16px; }
}

/* ==========================================================================
   V2: stage pill, last purchase, choice sheet, king block, stage table
   ========================================================================== */

/* ---------- stage pill (top bar) ---------- */

.stats { display: flex; align-items: center; justify-content: center; gap: 10px; }

.stage-pill {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  padding: 4px 9px;
  border: 1px solid rgba(232, 163, 61, 0.45);
  border-radius: var(--radius);
  background: rgba(232, 163, 61, 0.07);
  white-space: nowrap;
  pointer-events: auto;
  cursor: help;
}

/* ---------- last purchase line (ticker left slot) ---------- */

.ticker-last {
  flex: none;
  color: var(--dust);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-right: 16px;
  border-right: 1px solid var(--line);
}

/* ---------- choice sheet ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 9, 6, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.choice-sheet {
  width: 100%;
  max-width: 660px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: var(--room);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: chip-in 180ms ease-out;
}

.choice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.choice-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.choice-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.choice-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.choice-card:hover { border-color: rgba(232, 163, 61, 0.5); }

.choice-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.choice-kind {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--ivory);
}

.choice-tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.choice-copy { font-size: 13px; color: var(--dust); }

.pack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.pack-btn {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px;
  background: var(--room);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--speed) ease-out, background-color var(--speed) ease-out;
}
.pack-btn:hover { border-color: var(--gold); }
.pack-btn:disabled { opacity: 0.5; cursor: wait; }

.pack-size {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}

.pack-price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.choice-note {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dust);
}

.choice-claim-btn { margin-top: auto; }

/* ---------- king of the wall (fame panel) ---------- */

.king-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 18px 18px;
  text-align: center;
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(232, 163, 61, 0.09), rgba(232, 163, 61, 0.02));
}

.crown {
  width: 42px;
  height: 24px;
  background: var(--gold);
  clip-path: polygon(
    0% 100%, 0% 26%, 22% 56%, 38% 8%, 50% 42%, 62% 8%, 78% 56%, 100% 26%,
    100% 100%, 100% 82%, 0% 82%
  );
  margin-bottom: 4px;
}

.king-eyebrow { color: var(--gold); }

.king-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ivory);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.king-meta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.king-caption {
  font-size: 12px;
  color: var(--dust);
  margin-top: 4px;
}

/* ---------- stage pricing table (how it works) ---------- */

.stage-pricing { display: flex; flex-direction: column; gap: 12px; }

.stage-table-wrap { overflow-x: auto; }

.stage-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.stage-table th {
  text-align: left;
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--line);
}
.stage-table td {
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ivory);
  white-space: nowrap;
}
.stage-table td:last-child, .stage-table th:last-child { padding-right: 0; }
.stage-table tr.stage-open td { color: var(--gold); }
.stage-table tr.stage-past td { color: var(--dust); }

.rule-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}
.rule-line { display: flex; gap: 10px; font-size: 13px; }
.rule-term {
  flex: none;
  width: 110px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 2px;
}
.rule-copy { color: var(--dust); }

/* ---------- V2 responsive ---------- */

@media (max-width: 900px) {
  .stats { gap: 8px; }
}

@media (max-width: 760px) {
  .choice-cards { grid-template-columns: 1fr; }
  .choice-sheet { padding: 18px 16px; }
  .ticker-last { display: none; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .ticker-track.marquee { animation: none; }
  .live-dot { animation: none; }
  html.js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   V3: My pixels page (login card, totals strip, plot card grid, edit states)
   ========================================================================== */

/* ---------- page frame ---------- */

.my-page { padding: 0 0 60px; }

.my-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--room);
  position: sticky;
  top: 0;
  z-index: 10;
}
.my-bar-brand { display: flex; align-items: baseline; gap: 12px; }

.my-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.my-loading { text-align: center; padding: 64px 0; }

/* ---------- logged-out card ---------- */

.login-card { margin: 48px auto 0; max-width: 440px; }
.login-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.login-copy { font-size: 13px; color: var(--dust); }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-sent { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.login-sent-line { font-size: 14px; color: var(--ivory); }

.dev-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  background: rgba(232, 163, 61, 0.05);
}
.dev-label { color: var(--gold); }
.dev-copy { font-size: 12px; color: var(--dust); }

/* ---------- dashboard ---------- */

.dash { display: flex; flex-direction: column; gap: 20px; }

.my-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.my-head-id { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.my-email {
  font-weight: 500;
  font-size: 16px;
  color: var(--ivory);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.my-head-actions { display: flex; gap: 8px; flex: none; }

.king-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(232, 163, 61, 0.09), rgba(232, 163, 61, 0.02));
}
.king-badge-crown {
  width: 26px;
  height: 15px;
  flex: none;
  background: var(--gold);
  clip-path: polygon(
    0% 100%, 0% 26%, 22% 56%, 38% 8%, 50% 42%, 62% 8%, 78% 56%, 100% 26%,
    100% 100%, 100% 82%, 0% 82%
  );
}
.king-badge-text {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
}

/* ---------- totals strip ---------- */

.totals-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.total-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--room);
  min-width: 0;
}
.total-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 22px;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- plot card grid ---------- */

.plot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.plot-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--room);
}

.plot-card-view { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.plot-card.editing .plot-card-view { display: none; }
.plot-card.editing .plot-card-actions { display: none; }

.plot-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #3A2A12;
  image-rendering: pixelated;
}
.plot-thumb-empty {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--dust);
}

.plot-card-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plot-id {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}
.plot-kind {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.plot-size {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--dust);
  font-variant-numeric: tabular-nums;
}
.plot-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--ivory);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plot-link {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plot-link a { color: var(--dust); }
.plot-link a:hover { color: var(--flare); }
.plot-link-none { color: var(--dust); opacity: 0.6; }

.plot-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.file-btn { cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }

.card-error { font-size: 12px; color: var(--danger); }
.card-error:empty { display: none; }

/* ---------- per-card edit form ---------- */

.plot-edit { display: none; }
.plot-card.editing .plot-edit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plot-edit-actions { display: flex; gap: 8px; }

/* ---------- empty state ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.empty-line {
  font-size: 15px;
  color: var(--dust);
  overflow-wrap: anywhere;
  max-width: 46ch;
}

/* ---------- V3 responsive ---------- */

@media (max-width: 560px) {
  /* Four topnav buttons no longer fit on one row: let the ghosts share the
     first row and give the primary CTA its own full-width row. */
  .topnav { flex-wrap: wrap; }
  .topnav .btn-primary { flex: 1 1 100%; }
}

@media (max-width: 520px) {
  .totals-strip { grid-template-columns: 1fr; }
  .plot-grid { grid-template-columns: 1fr; }
  .my-main { padding: 20px 14px; }
}

/* ==========================================================================
   V4: certificate downloads, share row, Google login
   ========================================================================== */

/* ---------- share section ---------- */

.share-slot { width: 100%; }

.share-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.share-eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dust);
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.share-copied {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.share-copied:empty { display: none; }

/* ---------- login divider (Google above, email below) ---------- */

.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.or-divider-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.or-divider-text {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
}

/* ==========================================================================
   V5: plot messages + value presentation (today's rate, growth badges)
   ========================================================================== */

/* ---------- wall tooltip: owner message line ---------- */

.tt-msg {
  font-size: 11px;
  font-style: italic;
  color: var(--dust);
  max-width: 236px;
  overflow-wrap: anywhere;
  margin-top: 1px;
}

/* ---------- plot page: owner message under the name ---------- */

.plot-message {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--dust);
  max-width: 52ch;
  overflow-wrap: anywhere;
}

/* ---------- plot page: value strip ---------- */

.value-strip {
  display: flex;
  align-items: stretch;
  justify-content: center;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
}

.value-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 20px;
  min-width: 0;
}

.value-cell + .value-cell { border-left: 1px solid var(--line); }

.value-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dust);
  white-space: nowrap;
}

.value-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.value-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--gold);
  border: 1px solid #E8A33D;
  border-radius: var(--radius);
  background: rgba(232, 163, 61, 0.07);
  padding: 5px 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.value-badge-flat {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--dust);
  border-color: var(--line);
  background: transparent;
}

.value-gift {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.value-note {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
}

/* ---------- my pixels: message on plot cards ---------- */

.plot-msg {
  font-size: 12px;
  font-style: italic;
  color: var(--dust);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- my pixels: value-today totals cell ---------- */

.totals-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.total-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.total-pct {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gold);
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: var(--radius);
  padding: 2px 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- V5 responsive ---------- */

@media (max-width: 760px) {
  .totals-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .value-strip { flex-direction: column; align-items: stretch; }
  .value-cell + .value-cell { border-left: none; border-top: 1px solid var(--line); }
}

@media (max-width: 520px) {
  .totals-strip { grid-template-columns: 1fr; }
}

/* ==========================================================================
   V6: monthly subscriptions (GO MONTHLY card, tier rows, subscription card)
   ========================================================================== */

/* ---------- choice sheet grows to three columns ---------- */

.choice-sheet { max-width: 960px; }

.choice-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- tier rows (GO MONTHLY card) ---------- */

.tier-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tier-row {
  appearance: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  padding: 11px 12px;
  background: var(--room);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--speed) ease-out;
}
.tier-row:hover { border-color: var(--gold); }
.tier-row:disabled { opacity: 0.5; cursor: wait; }

.tier-row-line {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tier-save {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--dust);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- start-subscription mini form ---------- */

.sub-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- how it works: monthly line under the stage table ---------- */

.monthly-line {
  font-size: 13px;
  color: var(--dust);
  padding: 10px 12px;
  border-left: 2px solid var(--gold);
  background: rgba(232, 163, 61, 0.05);
}

/* ---------- my pixels: subscription card ---------- */

.sub-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(232, 163, 61, 0.07), rgba(232, 163, 61, 0.01));
}

.sub-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sub-card-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.sub-tier {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--gold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-meta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ivory);
  font-variant-numeric: tabular-nums;
}

.sub-next {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--dust);
  font-variant-numeric: tabular-nums;
}

.sub-forever { font-size: 13px; color: var(--dust); }

.sub-card-actions { display: flex; gap: 8px; }

/* ---------- my pixels: quiet monthly CTA under the totals ---------- */

.sub-cta { font-size: 13px; color: var(--dust); }
.sub-cta a { color: var(--gold); }
.sub-cta a:hover { color: var(--flare); }

/* ---------- V6 responsive ---------- */

@media (max-width: 1020px) {
  .choice-sheet { max-width: 660px; }
  .choice-cards { grid-template-columns: 1fr; }
}

/* ==========================================================================
   V7: quiet legal links (Privacy / Terms) in page and panel footers
   ========================================================================== */

.footer-legal {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-legal a {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
  text-decoration: none;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--ivory);
  text-decoration: underline;
}

/* Standalone page footer (my pixels, plot page): centered, out of the way. */
.page-footer {
  justify-content: center;
  padding: 20px 16px 28px;
}

/* ==========================================================================
   V8: The Gallery (specials) - sheet line, gallery panel, special dialog
   ========================================================================== */

/* ---------- quiet line under the choice cards ---------- */

.gallery-line {
  appearance: none;
  width: 100%;
  padding: 14px 8px 2px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dust);
  text-align: center;
  cursor: pointer;
  transition: color var(--speed) ease-out;
}
.gallery-line:hover,
.gallery-line:focus-visible { color: var(--gold); }

/* ---------- gallery panel (side panel like Wall of Fame) ---------- */

.gallery-intro { font-size: 13px; color: var(--dust); font-style: italic; }

.gallery-list { display: flex; flex-direction: column; gap: 8px; }

.gallery-card {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--speed) ease-out;
}
.gallery-card:hover { border-color: var(--gold); }

.gallery-thumb {
  width: 64px;
  height: 64px;
  flex: none;
  object-fit: cover;
  border: 1px dashed rgba(232, 163, 61, 0.5);
  border-radius: var(--radius);
  background: #3A2A12;
  image-rendering: pixelated;
  display: block;
}

.gallery-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.gallery-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ivory);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-artist {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.gallery-owned {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dust);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* ---------- special dialog ---------- */

.special-sheet { max-width: 560px; }

.special-head-titles { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.special-eyebrow { color: var(--gold); }

.special-artist {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
}

.special-body { display: flex; flex-direction: column; gap: 18px; }

.special-art-frame {
  padding: 10px;
  border: 1px dashed rgba(232, 163, 61, 0.6);
  border-radius: var(--radius);
  background: var(--ink);
}

.special-art {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  image-rendering: pixelated;
}

.special-art-empty { height: 180px; background: #3A2A12; }

.special-info { display: flex; flex-direction: column; gap: 14px; }

.special-sub { font-size: 13px; color: var(--dust); font-style: italic; }

.special-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
}

.special-size {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--dust);
  font-variant-numeric: tabular-nums;
}

.special-price {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 22px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

#spForm { display: flex; flex-direction: column; gap: 14px; }

.special-pending {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(232, 163, 61, 0.4);
  border-radius: var(--radius);
  background: rgba(232, 163, 61, 0.05);
}
.special-pending-line { font-weight: 500; font-size: 14px; color: var(--ivory); }
.special-pending-sub { font-size: 12px; color: var(--dust); }

.special-soldbox {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(232, 163, 61, 0.08), rgba(232, 163, 61, 0.02));
}

.special-owned {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gold);
  overflow-wrap: anywhere;
}

/* ==========================================================================
   V8 PIXEL PROFILE
   The panel that opens when a paid pixel plot is clicked (or reached from a
   Wall-of-Fame row, ticker item, deep link, or the explore agent's search).
   Reuses .panel .panel-narrow .panel-over for the side-panel / bottom-sheet
   chrome and .value-strip / .share-section for the value + share blocks; the
   rules below cover only the profile-specific pieces.
   ========================================================================== */

.profile-kind {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: var(--radius);
  background: rgba(232, 163, 61, 0.07);
  padding: 3px 8px;
}

.profile-art-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  min-height: 120px;
}

.profile-art {
  max-width: 100%;
  max-height: 260px;
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: var(--radius);
  /* Crisp pixels: never smooth the plot's own artwork. */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

.profile-art-empty {
  width: 140px;
  height: 140px;
  background: #3A2A12;
  image-rendering: auto;
}

.profile-special-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--ivory);
  letter-spacing: 0.01em;
}

.profile-special-artist {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dust);
}

.profile-owner {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  color: var(--ivory);
  overflow-wrap: anywhere;
}

.profile-msg {
  font-size: 14px;
  font-style: italic;
  color: var(--dust);
  overflow-wrap: anywhere;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dust);
  font-variant-numeric: tabular-nums;
}

.profile-meta-item { white-space: nowrap; }

.profile-owned-line {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.profile-manage { margin-left: auto; }

.profile-copied {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
  min-height: 14px;
}

.profile-share { margin-top: 4px; }

/* Wall-of-Fame rows are now buttons that open the owner's pixel profile:
   strip the native button chrome so they still look like the old rows. */
.fame-row-btn {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.fame-row-btn:hover { border-color: var(--gold); }
.fame-row-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Recent-ticker entries become buttons that zoom to the pixel. */
.ticker-item-btn {
  font: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
}
.ticker-item-btn:hover .t-name { color: var(--gold); }
.ticker-item-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (max-width: 420px) {
  .profile-owner { font-size: 24px; }
  .profile-art { max-height: 200px; }
}

/* ==========================================================================
   V8 explore tools: search, minimap, onboarding, help, language
   (additive; flat selectors; theme tokens only)
   ========================================================================== */

/* ---------- top-bar icon controls ---------- */

.topbar-icons { display: flex; align-items: center; gap: 8px; }
/* The mobile cluster lives in the top bar itself (the text nav is hidden on
   small screens); it is out of the flow on desktop. */
.topbar-icons-m { display: none; margin-left: auto; flex: none; }
.explore-icon { width: 36px; height: 36px; }
.topnav .explore-icon { color: var(--dust); }
.topnav .explore-icon:hover { color: var(--ivory); }

/* ---------- search ---------- */

.explore-search {
  position: fixed;
  inset: 0;
  z-index: 60;
}
.explore-search-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}
.explore-search-box {
  position: absolute;
  top: 66px;
  right: 16px;
  width: 380px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  background: var(--room);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: chip-in 160ms ease-out;
}
.explore-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 12px;
  border-bottom: 1px solid var(--line);
}
.explore-search-ico { color: var(--dust); flex: none; }
.explore-search-input {
  flex: 1;
  min-width: 0;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 4px 0;
}
.explore-search-input:focus { outline: none; }
.explore-search-input::placeholder { color: var(--dust); }
.explore-search-close { width: 30px; height: 30px; flex: none; }

.explore-search-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dust);
  padding: 10px 14px;
}
.explore-search-empty {
  font-size: 13px;
  color: var(--dust);
  padding: 14px;
}
.explore-search-results {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 52vh;
  overflow-y: auto;
}
.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  cursor: pointer;
}
.search-row.active,
.search-row:hover { background: rgba(232, 163, 61, 0.1); }
.search-thumb {
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #3A2A12;
  object-fit: cover;
  image-rendering: pixelated;
}
.search-body { flex: 1; min-width: 0; }
.search-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ivory);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--dust);
  font-variant-numeric: tabular-nums;
}
.search-chip {
  flex: none;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: var(--radius);
  background: rgba(232, 163, 61, 0.07);
  padding: 3px 6px;
}

/* search loading skeleton */
.search-skel { cursor: default; }
.skel { background: linear-gradient(90deg, #241C12, #322619, #241C12); background-size: 200% 100%; animation: skel-shimmer 1.2s linear infinite; }
.skel-line { height: 10px; border-radius: 2px; margin: 4px 0; background: linear-gradient(90deg, #241C12, #322619, #241C12); background-size: 200% 100%; animation: skel-shimmer 1.2s linear infinite; }
.skel-line.short { width: 55%; }
@keyframes skel-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- minimap ---------- */

.minimap {
  position: fixed;
  left: 16px;
  bottom: 56px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: rgba(20, 16, 11, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.minimap-canvas {
  display: block;
  width: 180px;
  height: 112px;
  cursor: crosshair;
  touch-action: none;
}
.minimap-toggle,
.minimap-show {
  appearance: none;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dust);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 8px;
  cursor: pointer;
}
.minimap-toggle:hover,
.minimap-show:hover { color: var(--ivory); border-color: var(--gold); }
.minimap-show {
  position: fixed;
  left: 16px;
  bottom: 56px;
  z-index: 25;
}

@media (max-width: 760px) {
  .minimap { bottom: 108px; }
  .minimap-show { bottom: 108px; }
}
@media (max-width: 479px) {
  .minimap,
  .minimap-show { display: none !important; }
}

/* ---------- onboarding ---------- */

.onboard {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 20px;
}
.onboard-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 9, 6, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.onboard-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: var(--room);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: chip-in 200ms ease-out;
}
.onboard-close { position: absolute; top: 12px; right: 12px; }
.onboard-eyebrow { color: var(--dust); }
.onboard-title { font-size: 26px; font-weight: 800; }
.onboard-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.onboard-step { display: flex; align-items: baseline; gap: 12px; }
.onboard-step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  flex: none;
}
.onboard-step-copy { color: var(--ivory); font-size: 15px; }
.onboard-gallery {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--dust);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* ---------- help / shortcuts ---------- */

.help-modal,
.lang-modal {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  padding: 20px;
}
.help-backdrop,
.lang-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 9, 6, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.help-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: var(--room);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: chip-in 180ms ease-out;
}
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.help-title { font-size: 20px; font-weight: 800; }
.help-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.help-row { display: flex; align-items: center; gap: 12px; }
.help-keys { flex: none; display: flex; gap: 4px; min-width: 76px; }
.help-row kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ivory);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2px 6px;
  min-width: 22px;
  text-align: center;
}
.help-drag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dust);
}
.help-copy { color: var(--ivory); font-size: 14px; }
.help-faq { align-self: flex-start; }

/* ---------- language menu ---------- */

.lang-card {
  position: relative;
  width: 100%;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: var(--room);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  animation: chip-in 160ms ease-out;
}
.lang-item {
  appearance: none;
  text-align: left;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ivory);
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  padding: 11px 14px;
  cursor: pointer;
}
.lang-item:hover { background: rgba(232, 163, 61, 0.1); }
.lang-item.on { color: var(--gold); }
.lang-item.on::after { content: " -"; color: var(--gold); }

@media (max-width: 760px) {
  .topbar-icons-m { display: flex; }
  .explore-search-box { top: 56px; left: 12px; right: 12px; width: auto; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .explore-search-box,
  .onboard-card,
  .help-card,
  .lang-card { animation: none; }
  .skel,
  .skel-line { animation: none; }
}
