/* MARKET GAME — STORE
   Day / night atmospheric storefront. Tokens follow the game cards;
   the scene is a separate, quieter layer so type stays readable.

   Theme cascade: each layer STARTS just after the one behind it
   (sky → hills → trees → type → boxes). They overlap; nothing waits
   for the sky to finish. Animate registered tokens on html only —
   also transitioning `color` on body/hero made type flash to the
   end color, snap back, then ease. */

@property --bg { syntax: "<color>"; inherits: true; initial-value: #efe6d6; }
@property --bg-deep { syntax: "<color>"; inherits: true; initial-value: #e4d7c2; }
@property --panel { syntax: "<color>"; inherits: true; initial-value: #f7f1e6; }
@property --panel-a { syntax: "<color>"; inherits: true; initial-value: rgba(247, 241, 230, 0.9); }
@property --border { syntax: "<color>"; inherits: true; initial-value: rgba(36, 30, 24, 0.14); }
@property --text { syntax: "<color>"; inherits: true; initial-value: #1c1814; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #5c5348; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #3f5c2a; }
@property --accent-ink { syntax: "<color>"; inherits: true; initial-value: #f7f1e6; }
@property --gold { syntax: "<color>"; inherits: true; initial-value: #9a6b14; }
@property --gold-ink { syntax: "<color>"; inherits: true; initial-value: #1c1814; }
@property --positive { syntax: "<color>"; inherits: true; initial-value: #2d6a32; }
@property --negative { syntax: "<color>"; inherits: true; initial-value: #b3261e; }
@property --halo { syntax: "<color>"; inherits: true; initial-value: rgba(255, 196, 70, 0.5); }
@property --grid { syntax: "<color>"; inherits: true; initial-value: rgba(36, 30, 24, 0.055); }
@property --ticker-bg { syntax: "<color>"; inherits: true; initial-value: rgba(28, 22, 16, 0.9); }
@property --ticker-fg { syntax: "<color>"; inherits: true; initial-value: rgba(255, 235, 180, 0.78); }

:root,
html[data-theme="day"] {
  --bg: #efe6d6;
  --bg-deep: #e4d7c2;
  --panel: #f7f1e6;
  --panel-a: rgba(247, 241, 230, 0.9);
  --border: rgba(36, 30, 24, 0.14);
  --text: #1c1814;
  --muted: #5c5348;
  --accent: #3f5c2a;
  --accent-ink: #f7f1e6;
  --gold: #9a6b14;
  --gold-ink: #1c1814;
  --positive: #2d6a32;
  --negative: #b3261e;
  --sky-top: #fff6d4;
  --sky-mid: #f0c57a;
  --sky-bot: #dccbb0;
  --far: #7d8d6e;
  --mid: #445536;
  --near: #243018;
  --fog: rgba(255, 248, 236, 0.42);
  --grid: rgba(36, 30, 24, 0.055);
  --ticker-bg: rgba(28, 22, 16, 0.9);
  --ticker-fg: rgba(255, 235, 180, 0.78);
  --halo: rgba(255, 196, 70, 0.5);
  --shadow: 0 10px 40px rgba(40, 28, 16, 0.08);
  --cloud: rgba(255, 252, 246, 0.55);
}

html[data-theme="night"] {
  --bg: #0d1117;
  --bg-deep: #080c10;
  --panel: #161b22;
  --panel-a: rgba(22, 27, 34, 0.9);
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #8ab85a;
  --accent-ink: #0d1117;
  --gold: #d29922;
  --gold-ink: #0d1117;
  --positive: #3fb950;
  --negative: #f85149;
  --sky-top: #1c3048;
  --sky-mid: #0c1a2c;
  --sky-bot: #081218;
  --far: #163044;
  --mid: #0e1c18;
  --near: #070d0a;
  --fog: rgba(8, 16, 24, 0.45);
  --grid: rgba(230, 237, 243, 0.045);
  --ticker-bg: rgba(4, 10, 16, 0.88);
  --ticker-fg: rgba(230, 237, 243, 0.62);
  --halo: rgba(180, 200, 220, 0.28);
  --shadow: 0 12px 48px rgba(0, 0, 0, 0.35);
  --cloud: rgba(180, 200, 220, 0.08);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--bg);
}

body {
  font-family: "IBM Plex Sans", "Noto Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  padding-top: 28px;
}

html.theme-animated {
  transition:
    --halo 1.15s ease,
    --grid 1.15s ease 0.08s,
    --bg 1.15s ease 0.4s,
    --bg-deep 1.15s ease 0.4s,
    --text 1.15s ease 0.48s,
    --muted 1.15s ease 0.48s,
    --accent 1.15s ease 0.48s,
    --accent-ink 1.15s ease 0.48s,
    --gold 1.15s ease 0.48s,
    --gold-ink 1.15s ease 0.48s,
    --positive 1.15s ease 0.48s,
    --negative 1.15s ease 0.48s,
    --ticker-bg 1.15s ease 0.48s,
    --ticker-fg 1.15s ease 0.48s,
    --panel 1.15s ease 0.56s,
    --panel-a 1.15s ease 0.56s,
    --border 1.15s ease 0.56s;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.9em;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--panel);
  color: var(--text);
  padding: 0.6rem 1rem;
}
.skip:focus {
  top: 2.6rem;
}

/* ── Scene ─────────────────────────────────────────────── */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.layer-sky-day,
.layer-sky-night {
  position: absolute;
  inset: 0;
}

.layer-sky-day {
  background:
    radial-gradient(ellipse at 72% -4%, #fff6d4 0%, #f0c57a 26%, #dccbb0 62%, #efe6d6 100%);
  opacity: 1;
}

.layer-sky-night {
  background:
    radial-gradient(ellipse at 72% 8%, #1c3048 0%, #0c1a2c 38%, #081218 100%);
  opacity: 0;
}

html[data-theme="night"] .layer-sky-day { opacity: 0; }
html[data-theme="night"] .layer-sky-night { opacity: 1; }

.layer-stars {
  opacity: 0;
}
html[data-theme="night"] .layer-stars { opacity: 1; }

html.theme-animated .layer-sky-day,
html.theme-animated .layer-sky-night {
  transition: opacity 1.15s ease;
}

html.theme-animated .layer-stars {
  transition: opacity 1.15s ease 0.08s;
}

.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: starPulse var(--dur, 2s) ease-in-out infinite alternate;
}

.layer-clouds {
  color: #fffaf0;
  opacity: 0.35;
}
html[data-theme="night"] .layer-clouds {
  color: #b4c8dc;
  opacity: 0.08;
}

html.theme-animated .layer-clouds {
  transition: opacity 1.15s ease 0.08s, color 1.15s ease 0.08s;
}

.cloud-svg,
.grid-svg,
.svg-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.layer-far .svg-fallback,
.layer-mid .svg-fallback,
.layer-near .svg-fallback {
  fill: currentColor;
  color: inherit;
}

.layer-grid {
  opacity: 1;
}
.grid-svg line {
  stroke: rgba(36, 30, 24, 0.055);
  stroke-width: 0.35;
}
html[data-theme="night"] .grid-svg line {
  stroke: rgba(230, 237, 243, 0.045);
}

html.theme-animated .grid-svg line {
  transition: stroke 1.15s ease 0.08s;
}

.layer-far,
.layer-mid,
.layer-near {
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

.layer-far {
  height: 36%;
}
.layer-mid {
  height: 28%;
}
.layer-near {
  height: 20%;
}

.sil {
  position: absolute;
  inset: 0;
  color: inherit;
}

.layer-far .sil-day { color: #7d8d6e; }
.layer-far .sil-night { color: #163044; }
.layer-mid .sil-day { color: #445536; }
.layer-mid .sil-night { color: #0e1c18; }
.layer-near .sil-day { color: #243018; }
.layer-near .sil-night { color: #070d0a; }

.sil-day { opacity: 1; }
.sil-night { opacity: 0; }

html[data-theme="night"] .sil-day { opacity: 0; }
html[data-theme="night"] .sil-night { opacity: 1; }

html.theme-animated .layer-far .sil {
  transition: opacity 1.15s ease 0.16s;
}
html.theme-animated .layer-mid .sil {
  transition: opacity 1.15s ease 0.24s;
}
html.theme-animated .layer-near .sil {
  transition: opacity 1.15s ease 0.32s;
}

.layer-fog {
  top: auto;
  height: 28%;
  bottom: 8%;
  background: none;
}
.fog-near {
  height: 22%;
  bottom: 0;
}

.layer-fog::before,
.layer-fog::after {
  content: "";
  position: absolute;
  inset: 0;
}

.fog-far::before {
  background: linear-gradient(to top, rgba(255, 248, 236, 0.42), transparent);
}
.fog-far::after {
  background: linear-gradient(to top, rgba(8, 16, 24, 0.45), transparent);
  opacity: 0;
}
.fog-near::before {
  background: linear-gradient(to top, rgba(255, 248, 236, 0.5), transparent);
}
.fog-near::after {
  background: linear-gradient(to top, rgba(8, 16, 24, 0.5), transparent);
  opacity: 0;
}

html[data-theme="night"] .fog-far::before,
html[data-theme="night"] .fog-near::before {
  opacity: 0;
}
html[data-theme="night"] .fog-far::after,
html[data-theme="night"] .fog-near::after {
  opacity: 1;
}

html.theme-animated .fog-far::before,
html.theme-animated .fog-far::after {
  transition: opacity 1.15s ease 0.24s;
}
html.theme-animated .fog-near::before,
html.theme-animated .fog-near::after {
  transition: opacity 1.15s ease 0.32s;
}

.layer-vignette {
  background: none;
}

.layer-vignette::before,
.layer-vignette::after {
  content: "";
  position: absolute;
  inset: 0;
}

.layer-vignette::before {
  background:
    linear-gradient(to right, rgba(239, 230, 214, 0.78) 0%, rgba(239, 230, 214, 0.4) 34%, transparent 58%),
    linear-gradient(to top, #efe6d6 0%, rgba(239, 230, 214, 0.7) 14%, transparent 32%);
}

.layer-vignette::after {
  background:
    linear-gradient(to right, rgba(13, 17, 23, 0.78) 0%, rgba(13, 17, 23, 0.4) 34%, transparent 58%),
    linear-gradient(to top, #0d1117 0%, rgba(13, 17, 23, 0.7) 14%, transparent 32%);
  opacity: 0;
}

html[data-theme="night"] .layer-vignette::before { opacity: 0; }
html[data-theme="night"] .layer-vignette::after { opacity: 1; }

html.theme-animated .layer-vignette::before,
html.theme-animated .layer-vignette::after {
  transition: opacity 1.15s ease 0.4s;
}

html[data-page="legal"] .layer-vignette::before,
html[data-page="buy"] .layer-vignette::before,
html[data-page="account"] .layer-vignette::before {
  background:
    linear-gradient(to top, #efe6d6 0%, rgba(239, 230, 214, 0.82) 38%, rgba(239, 230, 214, 0.35) 100%);
}

html[data-page="legal"] .layer-vignette::after,
html[data-page="buy"] .layer-vignette::after,
html[data-page="account"] .layer-vignette::after {
  background:
    linear-gradient(to top, #0d1117 0%, rgba(13, 17, 23, 0.82) 38%, rgba(13, 17, 23, 0.35) 100%);
}

/* ── Celestial axis ────────────────────────────────────── */

.celestial-par {
  overflow: hidden;
}

.celestial-axis {
  position: absolute;
  left: 72%;
  top: 46%;
  width: 0;
  height: 0;
  transform: rotate(0deg);
}

html.theme-animated .celestial-axis {
  transition: transform 1.6s cubic-bezier(0.65, 0, 0.35, 1);
}

html.theme-animated .sun-ray {
  transition: opacity 1.15s ease;
}

html.theme-animated .sun-core,
html.theme-animated .moon-core,
html.theme-animated .orb-halo {
  transition: box-shadow 1.15s ease, background 1.15s ease, opacity 1.15s ease;
}

html.theme-animated .theme-toggle-face {
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.orb {
  position: absolute;
  left: 0;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
}

.sun { top: -34vh; }
.moon { top: 34vh; }

.orb-core {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
}

.sun-core {
  background: radial-gradient(circle at 38% 34%, #fff8d0 0%, #ffcc4a 42%, #ef9b1c 68%, transparent 72%);
  box-shadow: 0 0 36px rgba(255, 196, 70, 0.5), 0 0 88px rgba(240, 160, 32, 0.28);
}

.moon-core {
  background: radial-gradient(circle at 34% 32%, #f6f6ee 0%, #c5d0da 60%, #8ea6b6 100%);
  box-shadow: 0 0 28px rgba(255, 196, 70, 0.35);
}

html[data-theme="night"] .sun-core {
  box-shadow: 0 0 36px rgba(180, 200, 220, 0.22), 0 0 72px rgba(120, 160, 200, 0.1);
}

html[data-theme="night"] .moon-core {
  box-shadow: 0 0 28px rgba(180, 200, 220, 0.28);
}

.orb-halo {
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 70, 0.5) 0%, transparent 68%);
}

html[data-theme="night"] .orb-halo {
  background: radial-gradient(circle, rgba(180, 200, 220, 0.28) 0%, transparent 68%);
}

.sun-rays {
  position: absolute;
  inset: 0;
}
.sun-ray {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 46px;
  margin-left: -0.5px;
  transform-origin: 50% 0;
  background: linear-gradient(to bottom, rgba(255, 210, 90, 0.0), rgba(255, 200, 80, 0.55), transparent);
  opacity: 0.55;
}

html[data-theme="night"] .sun-ray { opacity: 0.12; }

/* ── Chrome ────────────────────────────────────────────── */

.ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 28px;
  overflow: hidden;
  background: var(--ticker-bg);
  color: var(--ticker-fg);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker 42s linear infinite;
  gap: 0;
}

.ticker-track span {
  padding: 0 0.35rem;
}
.ticker .dot {
  opacity: 0.35;
  font-size: 8px;
}

.site-header {
  position: sticky;
  top: 28px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.5rem;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
  text-decoration: none;
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 8px;
  padding: 0.15rem 0.35rem 0.15rem 0.1rem;
  transition: background-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.brand:hover,
.brand:focus-visible {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  transform: translateY(-1px);
}

.brand-sub {
  color: var(--muted);
  letter-spacing: 0.14em;
}

.mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.header-end {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.nav-cluster {
  position: relative;
  display: flex;
  align-items: center;
  z-index: 40;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem 1.1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.55rem;
  border-radius: 8px;
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.nav a.is-on {
  color: var(--text);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 10%, transparent);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: color-mix(in srgb, var(--text) 10%, transparent);
  transform: translateY(-1px);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  transition: transform 0.22s ease, top 0.22s ease, background 0.22s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

.nav-toggle.is-open .nav-toggle-bars {
  background: transparent;
}

.nav-toggle.is-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0 0.75rem 0 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-a);
  color: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--text) 28%, var(--border));
  background: color-mix(in srgb, var(--text) 8%, var(--panel-a));
}

.btn-discord {
  background: #5865f2;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(88, 101, 242, 0.28);
  flex: none;
}

.btn-discord:hover,
.btn-discord:focus-visible {
  filter: brightness(1.08);
  color: #fff;
  transform: translateY(-2px);
}

.btn-account {
  padding-left: 0.55rem;
}

.btn-account img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.site-header .btn-discord {
  min-height: 40px;
  padding: 0.35rem 0.95rem;
}

.theme-toggle-face {
  position: relative;
  width: 22px;
  height: 22px;
}
.mini-sun,
.mini-moon {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
}
.mini-sun {
  background: #f0c14a;
}
.mini-moon {
  background: #c5d0da;
  transform: translateY(18px);
  opacity: 0;
}
html[data-theme="night"] .mini-sun {
  transform: translateY(-18px);
  opacity: 0;
}
html[data-theme="night"] .mini-moon {
  transform: none;
  opacity: 1;
}
html.theme-animated .mini-sun,
html.theme-animated .mini-moon {
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.panel,
.legal-card,
.legal-doc,
.theme-toggle,
.nav-toggle,
.hero-copy,
.flash,
.wallet {
  transition: none;
}

html.theme-animated .panel,
html.theme-animated .legal-card,
html.theme-animated .legal-doc,
html.theme-animated .hero-copy,
html.theme-animated .flash,
html.theme-animated .site-header,
html.theme-animated .ticker {
  transition: none;
}

html.theme-animated .band::before {
  transition: none;
}

html.theme-animated .sku,
html.theme-animated .beat {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

html.theme-animated .legal-card {
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

/* ── Layout ────────────────────────────────────────────── */

.wrap {
  position: relative;
  z-index: 10;
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}

.hero {
  position: relative;
  min-height: 0;
  height: auto;
  display: block;
  padding: 0.75rem 0 0.35rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 38rem;
  width: fit-content;
  height: auto;
  padding: 1rem 1.2rem 1.05rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-copy .display {
  margin: 0 0 0.7rem;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
}

.hero-copy .lede {
  margin: 0 0 0.95rem;
}

.hero-copy .cta-row {
  margin: 0;
}

.kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
}

.display {
  font-family: Fraunces, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0 0 1.4rem;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

.display em {
  font-weight: 360;
  font-style: italic;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.display-page {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
}

.lede {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  margin: 0 0 1.5rem;
  max-width: 38rem;
}

.lede.narrow {
  max-width: 36rem;
}

.hint {
  color: var(--muted);
  font-size: 0.88rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
  margin-bottom: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(0);
}

.btn .ico {
  width: 18px;
  height: 18px;
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

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

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn:disabled {
  background: var(--muted);
  color: var(--bg);
  cursor: not-allowed;
}

.btn:disabled:hover {
  transform: none;
  filter: none;
}

.text-link {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--text);
  opacity: 0.88;
}

.band {
  position: relative;
  margin: 3.25rem 0 0;
  padding: 1.25rem 0 0.25rem;
}

.band::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -0.75rem -1.25rem -1.5rem;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-radius: 12px;
  pointer-events: none;
}

.band.tight {
  margin-top: 1.5rem;
}

.section-title {
  font-family: Fraunces, serif;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 500;
  margin: 0 0 1.4rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-head .section-title {
  margin: 0;
}

.panel {
  background: var(--panel-a);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
}

.wallet-grid,
.sku-grid,
.legal-grid {
  display: grid;
  gap: 1rem;
}

.wallet-grid {
  grid-template-columns: repeat(3, 1fr);
}

.beat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.beat h3 {
  font-family: Fraunces, serif;
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0.2rem 0 0.45rem;
}

.beat p {
  color: var(--muted);
  margin: 0;
}

.patron-note p {
  margin: 0;
  max-width: 40rem;
}

.close-band .lede {
  margin-bottom: 1.1rem;
}

.sku-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.legal-grid {
  grid-template-columns: repeat(2, 1fr);
}

.wallet .code,
.sku .code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.wallet h3,
.sku h3 {
  font-family: Fraunces, serif;
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0.35rem 0 0.4rem;
}

.wallet p,
.sku p {
  color: var(--muted);
  margin: 0 0 0.8rem;
}

.stamp {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text) !important;
  margin: 0 !important;
}

.wallet-gold .code,
.sku-gold .code {
  color: var(--gold);
}

.balance {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 1.8rem;
  color: var(--text) !important;
  margin: 0.2rem 0 0.5rem !important;
}

.sku {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.sku:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--gold) 45%, var(--border));
}

.beat {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.beat:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.sku-blurb {
  flex: 1 1 auto;
}

.sku-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}

.sku-grant {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--text) !important;
}

.sku-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.15rem;
}

.price {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 1rem 0 1rem 3.2rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
}

.note ul.plain {
  margin: 0.4rem 0 1rem;
  padding-left: 1.1rem;
  color: var(--muted);
}

.facts {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.facts div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.75rem;
}

.facts dt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.facts dd {
  margin: 0;
}

.check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0 0 0.9rem;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
  margin-left: -0.45rem;
  margin-right: -0.45rem;
  border-radius: 8px;
  transition: background-color 0.18s ease;
}

.check:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  flex: none;
}

.buy-form .btn {
  margin-top: 0.6rem;
  width: 100%;
}

.flash {
  background: color-mix(in srgb, var(--negative) 12%, var(--panel));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
}

.account-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.pass-status {
  margin-top: 1rem;
  display: grid;
  gap: 0.4rem;
}

.pass-flag {
  font-family: Fraunces, serif;
  font-size: 2rem;
  margin: 0.2rem 0;
}

.pass-flag.on { color: var(--positive); }
.pass-flag.off { color: var(--muted); }

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin: 0.25rem 0 1.5rem;
}

.legal-toc a {
  color: var(--muted);
  text-decoration: none;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.55rem;
  border-radius: 8px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.legal-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-a);
  text-decoration: none;
  color: var(--text);
  min-height: 96px;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.legal-card:hover,
.legal-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.legal-doc {
  background: var(--panel-a);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.5rem 2rem;
}

.legal-book {
  padding-top: 0.5rem;
}

.legal-chapter {
  scroll-margin-top: 6rem;
  padding: 1.75rem 0 0.5rem;
  border-top: 1px solid var(--border);
}

.legal-chapter:first-of-type {
  border-top: none;
  padding-top: 0.75rem;
}

.legal-chapter h2 {
  font-family: Fraunces, serif;
  font-weight: 500;
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  margin: 0.15rem 0 1rem;
}

.legal-body {
  max-width: 40rem;
}

.legal-body p {
  margin: 0 0 1rem;
}

.legal-updated {
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-body ol {
  padding-left: 1.2rem;
  margin: 0 0 1rem;
}

.legal-body h3 {
  font-family: Fraunces, serif;
  font-weight: 500;
  font-size: 1.15rem;
  margin: 1.25rem 0 0.5rem;
}

.muted { color: var(--muted); }

.page-hero {
  padding: 1.5rem 0 0.5rem;
}

.site-footer {
  position: relative;
  z-index: 10;
  width: min(960px, calc(100% - 2rem));
  margin: 0 auto 2.5rem;
}

.footer-rule {
  height: 1px;
  background: var(--border);
  margin-bottom: 1.1rem;
}

.fine {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: 0.8rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.35rem;
  border-radius: 6px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.to-top {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 45;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel-a) 86%, transparent);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px) scale(0.92);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.to-top svg {
  width: 20px;
  height: 20px;
}

.to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}

.to-top.is-visible:hover,
.to-top.is-visible:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: var(--panel);
}

/* ── Motion ────────────────────────────────────────────── */

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

@keyframes starPulse {
  from { opacity: 0.2; }
  to { opacity: 0.85; }
}

@keyframes navDrop {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.site-header.is-compact .nav-toggle {
  display: inline-flex;
}

.site-header.is-compact .theme-toggle-label {
  display: none;
}

.site-header.is-compact .theme-toggle {
  width: 44px;
  padding: 0;
  justify-content: center;
}

.site-header.is-compact .nav {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.05rem;
  width: max-content;
  max-width: min(16rem, calc(100vw - 2rem));
  padding: 0;
  border: none;
  background: none;
  pointer-events: none;
  visibility: hidden;
}

.site-header.is-compact .nav.is-open {
  pointer-events: auto;
  visibility: visible;
}

.site-header.is-compact .nav a {
  min-height: 38px;
  justify-content: flex-end;
  color: var(--text);
  font-size: 1.05rem;
  padding: 0.2rem 0.7rem;
  opacity: 0;
  transform: translateY(-8px);
}

.site-header.is-compact .nav a:hover,
.site-header.is-compact .nav a:focus-visible {
  background: color-mix(in srgb, var(--text) 12%, transparent);
  transform: none;
}

.site-header.is-compact .nav.is-open a {
  opacity: 1;
  animation: navDrop 0.34s ease both;
}

.site-header.is-compact .nav.is-open a:nth-child(1) { animation-delay: 0.02s; }
.site-header.is-compact .nav.is-open a:nth-child(2) { animation-delay: 0.07s; }
.site-header.is-compact .nav.is-open a:nth-child(3) { animation-delay: 0.12s; }
.site-header.is-compact .nav.is-open a:nth-child(4) { animation-delay: 0.17s; }

@media (max-width: 900px) {
  .wallet-grid,
  .sku-grid,
  .legal-grid,
  .beat-grid {
    grid-template-columns: 1fr;
  }

  .ticker {
    display: none;
  }

  body {
    padding-top: 0;
  }

  .site-header {
    top: 0;
    flex-wrap: nowrap;
    align-items: center;
    padding: 0.4rem 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .theme-toggle-label {
    display: none;
  }

  .theme-toggle {
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.05rem;
    width: max-content;
    max-width: min(16rem, calc(100vw - 2rem));
    padding: 0;
    border: none;
    background: none;
    pointer-events: none;
    visibility: hidden;
  }

  .nav.is-open {
    pointer-events: auto;
    visibility: visible;
  }

  .nav a {
    min-height: 38px;
    justify-content: flex-end;
    color: var(--text);
    font-size: 1.05rem;
    padding: 0.2rem 0.7rem;
    opacity: 0;
    transform: translateY(-8px);
  }

  .nav a:hover,
  .nav a:focus-visible {
    background: color-mix(in srgb, var(--text) 12%, transparent);
    transform: none;
  }

  .nav.is-open a {
    opacity: 1;
    animation: navDrop 0.34s ease both;
  }

  .nav.is-open a:nth-child(1) { animation-delay: 0.02s; }
  .nav.is-open a:nth-child(2) { animation-delay: 0.07s; }
  .nav.is-open a:nth-child(3) { animation-delay: 0.12s; }
  .nav.is-open a:nth-child(4) { animation-delay: 0.17s; }

  .brand-sub {
    display: none;
  }

  .btn-account span {
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .celestial-axis {
    left: 88%;
    top: 22%;
  }

  .sun { top: -28vh; }
  .moon { top: 28vh; }

  .orb {
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
  }

  .hero {
    min-height: 0;
    height: auto;
    padding: 0.5rem 0 0.25rem;
  }

  .hero-copy {
    width: 100%;
    max-width: none;
    height: auto;
    background: var(--panel-a);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.95rem 0.95rem 1rem;
    box-shadow: var(--shadow);
  }

  .hero-copy .display {
    font-size: clamp(1.85rem, 8vw, 2.6rem);
    margin-bottom: 0.55rem;
  }

  .layer-far { height: 26%; opacity: 0.7; }
  .layer-mid { height: 18%; opacity: 0.7; }
  .layer-near { height: 14%; opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  html.theme-animated .celestial-axis {
    transition: none;
  }

  .site-header.is-compact .nav a,
  .nav a {
    opacity: 1 !important;
    transform: none !important;
  }
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(10px);
}

html[data-age-ok="yes"] .age-gate {
  display: none;
}

.age-gate-card {
  width: min(32rem, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.35rem 1.35rem 1.2rem;
  box-shadow: var(--shadow);
}

.age-gate-card .display {
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  margin: 0.2rem 0 0.55rem;
}

.age-gate-actions {
  margin-top: 1rem;
}

.age-gate-deny {
  display: none;
}

html[data-age-ok="no"] .age-gate-ask {
  display: none;
}

html[data-age-ok="no"] .age-gate-deny {
  display: block;
}

html[data-page="store"]:not([data-age-ok="yes"]),
html[data-page="buy"]:not([data-age-ok="yes"]) {
  overflow: hidden;
}
