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

/* Self-hosted fonts (latin + latin-ext subsets cover every supported
   language). Bricolage Grotesque and Instrument Sans are variable fonts: one
   file serves both weights. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

: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: 220ms;

  /* Z-index scale, low to high. Every overlay sits on one of these rungs;
     in-between steps are derived with calc() at the point of use instead of
     new literals:
       25 wall furniture (zoomers, minimap) = chips - 20
       30 top chrome (topbar, ticker)       = chips - 15
       40 hint chip                         = chips - 5
       51 stacked panel (.panel-over)       = panels + 1
       60 tooltip / search dropdown         = modals - 5
       90 boot splash                       = toasts + 20
      100 no-JS veil (inline <noscript>)    = toasts + 30 */
  --z-base: 10;      /* sticky in-page bars (my pixels, admin) */
  --z-chips: 45;     /* floating chips on the wall (claim chip) */
  --z-mobilebar: 45; /* mobile action bar (deliberately shares the chip rung) */
  --z-panels: 50;    /* side panels / bottom sheets */
  --z-sheets: 55;    /* centered modal sheets (choice, special) */
  --z-consent: 60;   /* consent bar: above the mobilebar, below toasts */
  --z-modals: 65;    /* help / language modals */
  --z-toasts: 70;    /* toast stack, onboarding */
}

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

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

html { height: 100%; }

/* Smooth anchor/in-page scrolling, but only when the visitor has not asked
   for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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;
}

/* A whisper of pixel-dither texture over the room, in the wall's own medium.
   Pure CSS (no image, no request), static, pointer-events none. At z-index 0
   it sits under the wall canvas and every z-indexed overlay, so it textures
   the document pages (my pixels, profiles, thanks, admin) and never touches
   the canvas or a panel. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-conic-gradient(rgba(244, 236, 221, 0.02) 0% 25%, transparent 0% 50%);
  background-size: 3px 3px;
}

/* 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);
  /* Even out ragged two-line headings where supported; ignored elsewhere. */
  text-wrap: balance;
}

.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: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:hover:not(:disabled) { background-color: rgba(232, 163, 61, 0.06); }
.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); }

/* Press feedback: a quick 2% press-in, transform only so layout never moves.
   Disabled buttons stay put. */
.btn-primary:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn-ghost:active:not(:disabled),
.btn-danger:active:not(:disabled) { transform: scale(0.98); }

.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,
              background-color var(--speed) ease-out, transform var(--speed) ease-out;
}
.icon-btn:hover { border-color: var(--gold); color: var(--ivory); background-color: rgba(232, 163, 61, 0.08); }
.icon-btn:active:not(:disabled) { transform: scale(0.96); }

/* ---------- 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); }

/* ---------- boot splash (first paint, before app JS) ---------- */

.boot-splash {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-toasts) + 20);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  background: var(--ink);
  text-align: center;
}
/* No-JS visitors get the <noscript> overlay instead. */
html:not(.js) .boot-splash { display: none; }
.boot-splash-mark { font-size: 28px; pointer-events: none; }
.boot-splash-line {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dust);
  animation: boot-pulse 1.6s ease-in-out infinite;
}
.boot-splash.is-error .boot-splash-line { color: var(--danger); animation: none; }
.boot-splash-reload { margin-top: 4px; }

@keyframes boot-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* A non-English table is still loading: hide i18n-controlled text rather
   than flashing English first (see the inline script in index.html). */
html.i18n-wait:not(.i18n-ready) [data-i18n],
html.i18n-wait:not(.i18n-ready) [data-i18n-html] { visibility: hidden; }

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

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-chips) - 15);
  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 {
  /* In-flow with an auto left margin: the free space splits evenly with the
     top-nav's own auto margin, which keeps the group optically centered
     without ever overlapping the nav (the old absolute centering collided
     with the buttons by up to ~220px between 901px and 1610px). */
  margin-left: auto;
  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: calc(var(--z-chips) - 15);
  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,
.ticker-viewport:focus-within .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;
}

/* ---------- stage alerts (footer signup) ---------- */

/* The quiet right-hand slot of the ticker bar: a dust-colored CTA that swaps
   into a compact inline email form, then a single gold done line. */
.stage-alerts {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.stage-alerts-cta {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  color: var(--dust);
  text-transform: uppercase;
  transition: color var(--speed) ease-out;
}
.stage-alerts-cta:hover { color: var(--gold); }
.stage-alerts-cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.stage-alerts-form { display: flex; align-items: center; gap: 8px; }
.stage-alerts-form[hidden] { display: none; }
.stage-alerts-input { width: 180px; padding: 6px 10px; font-size: 12px; }
.stage-alerts-done { color: var(--gold); white-space: nowrap; }

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

.zoomers {
  position: fixed;
  right: 16px;
  bottom: 56px;
  z-index: calc(var(--z-chips) - 20);
  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,
              transform var(--speed) ease-out;
}
.zoom-btn:hover { border-color: var(--gold); color: var(--flare); }
.zoom-btn:active:not(:disabled) { transform: scale(0.96); }

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

.hint-chip {
  position: fixed;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  z-index: calc(var(--z-chips) - 5);
  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: var(--z-chips);
  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: calc(var(--z-modals) - 5);
  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;
}

/* ---------- hover price hint (empty open-region pixels) ---------- */

/* A small floating drop-price tag that follows the cursor over purchasable
   empty pixels. Positioned purely via transform (no layout thrash on
   pointermove); the engine drives the matching ghost pixel on the canvas. */
.hover-hint {
  position: fixed;
  left: 0;
  top: 0;
  z-index: calc(var(--z-modals) - 6);
  padding: 4px 8px;
  background: rgba(20, 16, 11, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 120ms ease-out, visibility 0s linear 120ms;
  will-change: transform;
}
.hover-hint.show {
  opacity: 1;
  visibility: visible;
  transition: opacity 120ms ease-out;
}

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

.panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-panels);
  width: 480px;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  gap: 22px;
  /* Optical padding: a touch more air at the bottom than the top. */
  padding: 20px 24px 28px;
  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: calc(var(--z-panels) + 1); }

.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); }
/* It is a button (role=button): give the press the same gold wash as a drag. */
.dropzone:active { 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-thumb {
  width: 48px;
  height: 48px;
  flex: none;
  object-fit: cover;
  image-rendering: pixelated;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #3A2A12;
}
.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); box-shadow: 0 0 0 2px rgba(232, 163, 61, 0.35); }
.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; }

/* Territory tab: eyebrow separating the King block from the per-plot list. */
.fame-section-label { margin: 14px 0 6px; }

.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: var(--z-toasts);
  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;
  /* Optical padding: bottom slightly larger than top. */
  padding: 36px 40px 44px;
  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: 1360px) {
  .stats-line { display: none; }
  .stats-compact { display: inline-block; }
}

@media (max-width: 1600px) {
  /* The tagline is the widest decorative item in the bar; in the widest
     translation (FR, measured 1574px of chrome) the full bar only fits
     side by side above ~1600px. */
  .tagline { display: none; }
}

@media (max-width: 900px) {
  .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: var(--z-mobilebar);
    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;
    transition: border-color var(--speed) ease-out, background-color var(--speed) ease-out;
  }
  .mbtn:hover { border-color: var(--gold); }
  .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: 24px 20px 32px; }
  .panel { padding: 16px 16px 22px; }
}

/* ==========================================================================
   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 {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  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 5px;
  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;
}
/* The author display above would otherwise defeat the hidden attribute. */
.stage-pill[hidden] { display: none; }
/* Ring-fill micro-bar inside the pill: gold fill on a dust track, mirroring
   the topbar hairline (ringSold / ringAreas of the open stage). */
.stage-pill-bar {
  display: block;
  height: 2px;
  background: var(--line);
  border-radius: 1px;
  overflow: hidden;
}
.stage-pill-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 600ms ease-out;
}

/* ---------- 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: var(--z-sheets);
  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: 22px 24px 28px;
  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);
  transition: border-color var(--speed) ease-out;
}
.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;
}

/* Long kind labels (nl "GA MAANDELIJKS") wrap ugly against the price tag on
   phones: stack the head instead of squeezing both on one line. */
@media (max-width: 760px) {
  .choice-card-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* Collapsible personalization zone (image/name/link/message/gift): pay-first
   keeps it behind one toggle on every device, with the hint under the toggle. */
.checkout-more { margin: -4px 0 4px; }
.personalize-hint { margin: 0 0 8px; }
.checkout-optional[hidden] { display: none; }

/* Redeem-code zone: a quiet founding-partner path under the payment methods.
   While the code form is open it replaces the whole pay zone (methods,
   total, pay button) - those nodes hide through the global [hidden] rule. */
.code-zone { margin: 2px 0; }
.code-toggle {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--dust);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color var(--speed) ease-out;
}
.code-toggle:hover { color: var(--gold); }
.code-form { display: flex; flex-direction: column; gap: 8px; }
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row .code-input { flex: 1; font-family: var(--font-mono); letter-spacing: 0.04em; }
.code-row .btn { flex: none; }
.code-success-state { border-color: var(--gold); }

.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,
              transform var(--speed) ease-out;
}
.pack-btn:hover { border-color: var(--gold); background-color: rgba(232, 163, 61, 0.06); }
.pack-btn:active:not(:disabled) { transform: scale(0.97); }
.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: 16px 16px 22px; }
  .ticker-last { display: none; }
  /* The narrow bar keeps the live ticker only; the signup returns at wider
     widths, same treatment as the last-purchase line. */
  .stage-alerts { display: none; }
}

/* Tablet band (761-1360px): the bar cannot hold wordmark + both pills + the
   full top-nav at once (worst case FR translation, measured in a headless
   browser). These rules sit after the pill's own display rules so they
   actually win. */
@media (min-width: 761px) and (max-width: 1200px) {
  /* The sold counter stays; the stage pill returns at wider widths and is
     always present <= 760px, where the nav moves to the mobile bar. The
     ring fill stays visible on the hairline at the bottom of the bar. */
  .stage-pill { display: none; }
}

@media (min-width: 761px) and (max-width: 1050px) {
  /* "How it works" stays one tap away via the shortcuts (?) panel's FAQ
     link; dropping it here keeps the bar on one row at tablet widths. */
  .topnav #btnHow { display: none; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .topnav { gap: 6px; }
  .topnav .btn { font-size: 13px; padding: 8px 12px; }
  .topnav .explore-icon { width: 32px; height: 32px; }
}

/* ---------- 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: var(--z-base);
}
.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;
}

/* Loading: the "Reading the record" line over a skeleton that mirrors the
   dashboard's real shape (totals strip + plot cards), so the swap to live
   data does not jump. Reuses the .skel shimmer from the search skeleton. */
.my-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 48px 0;
  text-align: center;
}
.my-skel { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.my-skel-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.skel-total { height: 74px; border-radius: var(--radius); }
.my-skel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.skel-plot { height: 236px; border-radius: var(--radius); }

/* ---------- 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-note { margin-top: 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; }
/* Rendered as an h1 (the dashboard's one heading); keep the original look. */
.my-email {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: normal;
  line-height: 1.4;
  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: 14px 16px 18px;
  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;
}

/* ---------- danger zone (account deletion) ---------- */

.danger-card { max-width: none; border-color: rgba(229, 72, 77, 0.4); }
.danger-hint { font-size: 13px; color: var(--dust); max-width: 60ch; }
.danger-form { display: flex; flex-direction: column; gap: 12px; max-width: 320px; }
.danger-actions { display: flex; }
.login-notice { font-size: 13px; color: var(--gold); }

/* ---------- 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; }
}

/* Skeleton mirrors the totals strip's own breakpoints. */
@media (max-width: 760px) {
  .my-skel-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .my-skel-totals { grid-template-columns: 1fr; }
  .my-skel-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   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, background-color var(--speed) ease-out,
              transform var(--speed) ease-out;
}
.tier-row:hover { border-color: var(--gold); background-color: rgba(232, 163, 61, 0.05); }
.tier-row:active:not(:disabled) { transform: scale(0.99); }
.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;
  transition: color var(--speed) ease-out;
}

.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, background-color var(--speed) ease-out,
              transform var(--speed) ease-out;
}
.gallery-card:hover { border-color: var(--gold); background-color: rgba(232, 163, 61, 0.05); }
.gallery-card:active:not(:disabled) { transform: scale(0.99); }

.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; }

/* Report this pixel: a quiet link that reveals a tiny inline form. Kept
   deliberately understated so it never competes with the buy/share actions. */
.profile-report {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.report-trigger {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dust);
  transition: color var(--speed) ease-out;
}
.report-trigger:hover { color: var(--ivory); }
.report-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.report-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
}
.report-select,
.report-note {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ivory);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 10px;
}
.report-select:focus,
.report-note:focus { outline: none; border-color: var(--gold); }
.report-actions { display: flex; }
.report-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--dust);
  min-height: 14px;
}
.report-status.is-ok { color: var(--gold); }
.report-status.is-err { color: var(--danger); }

/* 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;
  transition: border-color var(--speed) ease-out, background-color var(--speed) ease-out,
              transform var(--speed) ease-out;
}
.fame-row-btn:hover { border-color: var(--gold); background-color: rgba(232, 163, 61, 0.04); }
.fame-row-btn:active:not(:disabled) { transform: scale(0.99); }
.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: calc(var(--z-modals) - 5);
}
.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-field:focus-within {
  border-bottom-color: var(--gold);
  box-shadow: inset 0 -2px 0 var(--gold);
}
.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: calc(var(--z-chips) - 20);
  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;
  transition: color var(--speed) ease-out, border-color var(--speed) ease-out,
              transform var(--speed) ease-out;
}
.minimap-toggle:hover,
.minimap-show:hover { color: var(--ivory); border-color: var(--gold); }
.minimap-toggle:active:not(:disabled),
.minimap-show:active:not(:disabled) { transform: scale(0.96); }
.minimap-show {
  position: fixed;
  left: 16px;
  bottom: 56px;
  z-index: calc(var(--z-chips) - 20);
}

@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: var(--z-toasts);
  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: var(--z-modals);
  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;
  transition: background-color var(--speed) ease-out, transform var(--speed) ease-out;
}
.lang-item:hover { background: rgba(232, 163, 61, 0.1); }
.lang-item:active:not(:disabled) { transform: scale(0.99); }
.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; }
  .boot-splash-line { animation: none; }
}

/* ==========================================================================
   V11 engagement: badges, owner profiles, leaderboards, referrals
   ========================================================================== */

/* Badge chip: a small gold pill. label via i18n badge.<key>, title = _desc. */
.badge-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid rgba(232, 163, 61, 0.5);
  border-radius: 999px;
  background: rgba(232, 163, 61, 0.08);
  color: var(--gold);
  white-space: nowrap;
  cursor: default;
}

.badge-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Pixel profile: owner name links to the public /u/<handle> profile. */
.profile-owner-link { color: inherit; }
.profile-owner-link:hover { color: var(--flare); }
#profileOwnerBadges { margin-top: 2px; }

/* Wall-of-Fame tabs (Territory / Spenders / Plots / Subscribers / This week). */
.fame-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.fame-tab {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dust);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 10px;
  transition: color var(--speed) ease-out, border-color var(--speed) ease-out,
              transform var(--speed) ease-out;
}
.fame-tab:hover { color: var(--ivory); border-color: var(--gold); }
.fame-tab:active:not(:disabled) { transform: scale(0.96); }
.fame-tab.active {
  color: var(--gold);
  border-color: rgba(232, 163, 61, 0.5);
  background: rgba(232, 163, 61, 0.07);
}
.fame-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* My-pixels public profile card. Full dashboard width (overrides .card cap). */
.profile-card { gap: 20px; max-width: none; }
.profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-card-form { display: flex; flex-direction: column; gap: 14px; }
.profile-card-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--dust);
}
.profile-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-card-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--dust);
  min-height: 14px;
}
.profile-card-status.is-ok { color: var(--gold); }

/* V12 profile social links: heading + hint + a responsive grid of the ten
   labelled link inputs. Reuses .field / .field-label / .input. */
.profile-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 2px;
}

/* V12 social icons. Small gold glyph prefixing each link-editor label; the
   svg inherits currentColor set to --gold. */
.social-label-icon {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 6px;
  color: var(--gold);
}
.social-label-icon svg { display: block; width: 16px; height: 16px; }
.social-label-text { vertical-align: middle; }

/* V12 social icon buttons: square gold ghost buttons on the public profile
   (u.html). The glyph inherits currentColor; hover flares like other ghosts. */
.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--gold);
  transition: border-color var(--speed) ease-out, color var(--speed) ease-out;
}
.social-icon-btn:hover,
.social-icon-btn:focus-visible {
  border-color: var(--gold);
  color: var(--flare);
}
.social-icon { display: inline-flex; }
.social-icon svg,
.social-icon-btn svg { display: block; }

.badge-shelf-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* Invite block: link + copy + "N friends joined, N pixels earned". */
.invite-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.invite-copy { font-size: 13px; color: var(--dust); }
.invite-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.invite-url {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
}
.invite-row .btn { flex: none; }
.invite-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.invite-count {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.invite-copied {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gold);
  min-height: 14px;
}

@media (max-width: 560px) {
  .profile-card-fields { grid-template-columns: 1fr; }
  .profile-links-grid { grid-template-columns: 1fr; }
  .invite-row { flex-wrap: wrap; }
  .invite-url { flex-basis: 100%; }
}

/* ==========================================================================
   V14: cookie consent bar, gift-a-plot, embed snippets
   ========================================================================== */

/* ---------- consent bar (index) ---------- */

/* Fixed bottom strip, above the mobilebar (--z-mobilebar) and hint chip,
   below the toasts (--z-toasts). Hidden by default; app.js unhides it on
   first visit when no mw_consent cookie is present. */
.consent-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: var(--z-consent);
  width: max-content;
  max-width: calc(100vw - 32px);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  background: rgba(20, 16, 11, 0.96);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.consent-bar[hidden] { display: none; }
/* Never compete with an open dialog: sheets, onboarding, help and the side
   panels all own the bottom half of a mobile screen. :has() keeps this a
   pure-CSS concern — the bar returns the moment the dialog closes. */
body:has(.sheet-backdrop:not([hidden])) .consent-bar,
body:has(.onboard:not([hidden])) .consent-bar,
body:has(.help-modal:not([hidden])) .consent-bar,
body:has(.panel:not([aria-hidden="true"])) .consent-bar { display: none; }
.consent-text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ivory);
  max-width: 52ch;
}
.consent-link { color: var(--gold); text-decoration: none; white-space: nowrap; }
.consent-link:hover { color: var(--flare); }
.consent-actions { display: flex; gap: 8px; flex: none; }

@media (max-width: 760px) {
  /* Clear of the fixed mobilebar (same offset the hint chip uses). */
  .consent-bar {
    bottom: 112px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: calc(100vw - 24px);
  }
  .consent-actions { justify-content: flex-end; }
}

/* ---------- gift checkbox row (checkout panel) ---------- */

.field-check { gap: 6px; }
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ivory);
  cursor: pointer;
}
.check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  transition: border-color var(--speed) ease-out, background-color var(--speed) ease-out;
}
.check-input:checked { background: var(--gold); border-color: var(--gold); }
.check-input:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- embed snippet panel (my dashboard + plot page) ---------- */

.embed-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
}
.embed-panel[hidden] { display: none; }
.embed-title {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.embed-snippet {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  padding: 10px 12px;
  background: var(--room);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
}
.embed-snippet:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232, 163, 61, 0.35); }
.embed-actions { display: flex; align-items: center; gap: 12px; }
.embed-copied {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gold);
  min-height: 14px;
}

/* ---------- gift link block (thanks page) ---------- */

.gift-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 460px;
  padding: 16px;
  border: 1px solid rgba(232, 163, 61, 0.45);
  border-radius: var(--radius);
  background: rgba(232, 163, 61, 0.06);
}
.gift-block[hidden] { display: none; }
.gift-row {
  display: flex;
  gap: 8px;
  width: 100%;
}
.gift-url {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
}
.gift-copied {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gold);
  min-height: 14px;
}
@media (max-width: 560px) {
  .gift-row { flex-wrap: wrap; }
  .gift-url { flex-basis: 100%; }
}

/* ==========================================================================
   V15: referral earnings card (My pixels dashboard)
   ========================================================================== */

/* Full dashboard width like the profile card (overrides the .card cap). */
.ref-card { gap: 16px; max-width: none; }

.ref-per-pixel { font-size: 13px; color: var(--dust); }

.ref-balances {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ref-balance {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(232, 163, 61, 0.02);
  min-width: 0;
}

.ref-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ref-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ref-table th {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dust);
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ref-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ivory);
  vertical-align: middle;
}
.ref-table tbody tr:last-child td { border-bottom: none; }
.ref-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ref-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dust);
  white-space: nowrap;
}

.ref-payout { display: flex; flex-direction: column; gap: 10px; }
.ref-payout-open { font-size: 13px; color: var(--gold); }
.ref-payout-form { display: flex; gap: 10px; align-items: flex-end; }
.ref-payout-form .field { flex: 1 1 auto; min-width: 0; }
.ref-payout-form .btn { flex: none; }

@media (max-width: 560px) {
  .ref-balances { grid-template-columns: 1fr; }
  .ref-payout-form { flex-direction: column; align-items: stretch; }
}

/* ---------- payment method picker (checkout panel) ---------- */
.pay-methods { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-method {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--dust);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  cursor: pointer;
  transition: color var(--speed) ease, border-color var(--speed) ease, background var(--speed) ease, transform var(--speed) ease;
}
.pay-method:hover { color: var(--ivory); border-color: rgba(232, 163, 61, 0.5); }
.pay-method:active { transform: scale(0.97); }
.pay-method[aria-checked="true"] { color: var(--gold); border-color: var(--gold); background: rgba(232, 163, 61, 0.08); }
.pay-method[hidden] { display: none; }
.pay-bank { margin-top: 8px; }
