/* ------------------------------------------------------------------
   CashVers redesign — design tokens
   ------------------------------------------------------------------ */
:root {
  /* Surfaces (dark default) */
  --bg:           #0F0E0C;
  --bg-2:         #181613;
  --bg-3:         #221F1B;
  --line:         #2A2622;
  --line-strong:  #3A352F;
  --fg:           #F6F3EC;
  --fg-dim:       #B8B2A7;
  --fg-mute:      #807A6E;
  --fg-faint:     #524C42;

  /* Accent — cash-green (oklch-derived) */
  --accent:       #B9F472;
  --accent-deep:  #8FD938;
  --accent-fg:    #0F0E0C;
  --accent-soft:  rgba(185, 244, 114, 0.12);

  /* Semantic */
  --pos: #B9F472;
  --neg: #F87171;
  --warn: #F0B354;

  /* Type */
  --f-sans: "Geist", system-ui, -apple-system, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, monospace;
  --f-serif: "Instrument Serif", "Times New Roman", serif;

  /* Radius / shadow */
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 16px;
  --r-4: 22px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 0 rgba(255,255,255,0.04) inset, 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 10px 30px -10px rgba(0,0,0,0.6);

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  --header-h: 68px;
  --maxw: 1280px;
}

/* Light theme */
[data-theme="light"] {
  --bg:           #F6F3EC;
  --bg-2:         #EFEAE0;
  --bg-3:         #E5DFD2;
  --line:         #DCD5C5;
  --line-strong:  #C9C0AC;
  --fg:           #181613;
  --fg-dim:       #4A453E;
  --fg-mute:      #7A7367;
  --fg-faint:     #B1A99A;
  --accent-fg:    #0F0E0C;
  --shadow-md:    0 10px 30px -10px rgba(0,0,0,0.15);
}

/* Accent variants */
[data-accent="amber"]  { --accent: #F0B354; --accent-deep: #D49538; --accent-soft: rgba(240,179,84,0.14); --pos: #F0B354; }
[data-accent="blue"]   { --accent: #7AB8FF; --accent-deep: #4D95E6; --accent-soft: rgba(122,184,255,0.14); --pos: #7AB8FF; }

/* Density */
[data-density="compact"] {
  --sp-5: 18px;
  --sp-6: 24px;
  --sp-7: 36px;
  --sp-8: 48px;
  --sp-9: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ------------------------------------------------------------------
   Type utilities
   ------------------------------------------------------------------ */
.mono { font-family: var(--f-mono); font-feature-settings: "tnum","zero"; }
.serif { font-family: var(--f-serif); font-style: italic; }
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-mute);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: middle;
}

/* ------------------------------------------------------------------
   Shell / layout
   ------------------------------------------------------------------ */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
@media (max-width: 720px) {
  .shell { padding: 0 var(--sp-4); }
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.app-header .row {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  height: var(--header-h);
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex: 1;
}
.nav a {
  font-size: 14px;
  color: var(--fg-dim);
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color 120ms;
}
.nav a:hover { color: var(--fg); }
.nav a.active { color: var(--fg); }
.header-right { display: flex; align-items: center; gap: var(--sp-3); }

/* Logo — uses real CashVers brand image */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 18px;
  color: var(--fg);
}
.logo-img img {
  display: block;
  height: 28px;
  width: auto;
  /* Light theme inverts the logo to dark (brand asset is white-on-dark) */
  filter: brightness(0) invert(1);
  transition: opacity 200ms ease;
}
[data-theme="light"] .logo-img img {
  filter: brightness(0);
}
.logo-fallback {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--fg);
}
@media (max-width: 760px) {
  .logo-img img { height: 24px; }
}

/* ------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg);
  transition: all 140ms ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-0.5px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-deep); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--fg-faint); }

.btn-quiet {
  color: var(--fg-dim);
}
.btn-quiet:hover { color: var(--fg); background: var(--bg-2); }

.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: var(--r-2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

/* ------------------------------------------------------------------
   Card primitives
   ------------------------------------------------------------------ */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}
.card-pad { padding: var(--sp-5); }

/* Section spacing */
.section { padding: var(--sp-9) 0; }
.section-sm { padding: var(--sp-7) 0; }
.section h2.section-title {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}
.section-title .serif { font-weight: 400; color: var(--accent); }
.section-sub {
  margin: 12px 0 0;
  color: var(--fg-dim);
  font-size: 16px;
  max-width: 56ch;
}

/* ------------------------------------------------------------------
   Hero — landing
   ------------------------------------------------------------------ */
.hero {
  padding-top: var(--sp-9);
  padding-bottom: var(--sp-9);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-8);
  align-items: end;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
}
.hero h1 {
  font-size: clamp(48px, 7.5vw, 116px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 500;
  margin: 0;
}
.hero h1 .serif {
  font-weight: 400;
  letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub {
  margin: var(--sp-5) 0 var(--sp-6);
  font-size: 18px;
  color: var(--fg-dim);
  max-width: 46ch;
  line-height: 1.5;
}
.hero-cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* Live ledger card on right */
.ledger {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  position: relative;
}
.ledger-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line);
}
.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.ledger-row:last-child { border-bottom: none; }
.ledger-row .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ledger-row .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--fg-dim);
  flex: none;
  border: 1px solid var(--line);
}
.ledger-row .name { font-weight: 500; }
.ledger-row .what { color: var(--fg-mute); font-size: 12px; }
.ledger-row .amt { font-family: var(--f-mono); font-weight: 600; color: var(--accent); }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: live 1.6s ease-out infinite;
  display: inline-block;
  margin-right: 8px;
}
@keyframes live {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}

/* Marquee stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: var(--sp-7);
}
.stat {
  padding: var(--sp-5) var(--sp-5);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.stat:last-child { border-right: none; }
.stat .num {
  font-family: var(--f-mono);
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.02em;
  font-weight: 500;
}
.stat .lbl { color: var(--fg-mute); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; font-family: var(--f-mono); }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); }
}

/* How it works */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
}
@media (max-width: 800px) { .how-grid { grid-template-columns: 1fr; } }
.how-step {
  padding: var(--sp-6);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--bg-2);
  position: relative;
  min-height: 260px;
}
.how-step:last-child { border-right: none; }
@media (max-width: 800px) {
  .how-step { border-right: none; border-bottom: 1px solid var(--line); }
  .how-step:last-child { border-bottom: none; }
}
.how-step .step-num {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--fg-mute);
}
.how-step h3 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}
.how-step p { color: var(--fg-dim); margin: 0; font-size: 15px; }
.how-step .visual {
  margin-top: auto;
  height: 110px;
  background: var(--bg-3);
  border-radius: var(--r-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--fg-mute);
  overflow: hidden;
  position: relative;
}

/* Payout methods */
.payouts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
@media (max-width: 900px) { .payouts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .payouts { grid-template-columns: repeat(2, 1fr); } }
.payout {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-2);
  transition: all 160ms;
}
.payout:hover { border-color: var(--line-strong); background: var(--bg-3); }
.payout .sym {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--fg-mute);
}
.payout .name { font-weight: 500; font-size: 14px; }
.payout .meta { color: var(--fg-mute); font-size: 12px; font-family: var(--f-mono); }
.payout .glyph {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; }
.faq {
  border-top: 1px solid var(--line);
  padding: var(--sp-5) 0;
  cursor: pointer;
}
.faq:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  list-style: none;
  gap: var(--sp-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus {
  width: 26px; height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-dim);
  transition: transform 200ms;
  flex: none;
}
.faq[open] summary .plus { transform: rotate(45deg); background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.faq .answer {
  padding-top: var(--sp-3);
  color: var(--fg-dim);
  max-width: 64ch;
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--line);
  padding: var(--sp-7) 0 var(--sp-6);
  margin-top: var(--sp-8);
  color: var(--fg-mute);
  font-size: 13px;
}
.app-footer .row { display: flex; gap: var(--sp-6); flex-wrap: wrap; align-items: flex-start; }
.app-footer .col { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 140px; }
.app-footer .col .head { color: var(--fg); font-weight: 500; font-size: 13px; margin-bottom: 4px; }
.app-footer .col a:hover { color: var(--fg); }
.app-footer .bottom {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3);
}

/* Grid children must be allowed to shrink — fixes intrinsic-width overflow
   when inner content (scrollers, long titles, ledger rows) is wider than the track. */
.store-layout > *,
.cart-grid > *,
.pd > *,
.checkout-grid > *,
.earn-hero > *,
.hero-grid > *,
.two-paths > * { min-width: 0; }

/* ------------------------------------------------------------------
   Store
   ------------------------------------------------------------------ */
.store-head {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap;
  gap: var(--sp-4);
  padding: var(--sp-7) 0 var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.store-head h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 8px 0 0;
}
.store-head h1 .serif { color: var(--accent); }
.store-head .lead { color: var(--fg-dim); max-width: 44ch; margin-top: 12px; }
.balance-pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg-2);
  font-size: 14px;
}
.balance-pill .lbl { color: var(--fg-mute); font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.balance-pill .val { font-family: var(--f-mono); font-weight: 600; color: var(--accent); }

.store-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--sp-6);
  padding-top: var(--sp-6);
}
@media (max-width: 900px) { .store-layout { grid-template-columns: 1fr; } }

.filters {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
  display: flex; flex-direction: column;
  gap: var(--sp-5);
}
.filter-group .head {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
  margin-bottom: 10px;
}
.filter-list { display: flex; flex-direction: column; gap: 2px; }
.filter-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--r-1);
  font-size: 14px;
  color: var(--fg-dim);
  cursor: pointer;
  border: 1px solid transparent;
}
.filter-item:hover { background: var(--bg-2); color: var(--fg); }
.filter-item.active { background: var(--bg-2); color: var(--fg); border-color: var(--line); }
.filter-item .count { font-family: var(--f-mono); font-size: 11px; color: var(--fg-mute); }

.search-input {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 0 12px;
  height: 40px;
}
.search-input input {
  background: transparent;
  border: none; outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  flex: 1;
}
.search-input input::placeholder { color: var(--fg-mute); }

.store-toolbar {
  display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}
.store-toolbar .count { color: var(--fg-mute); font-family: var(--f-mono); font-size: 12px; margin-right: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--fg-dim);
  font-size: 13px;
  cursor: pointer;
}
.chip.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Game grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
}
.gcard {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--bg-2);
  overflow: hidden;
  cursor: pointer;
  transition: all 180ms ease;
  display: flex; flex-direction: column;
}
.gcard:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.gcard .art {
  aspect-ratio: 3 / 4;
  background: var(--bg-3);
  position: relative;
  overflow: hidden;
}
.gcard .art .ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--fg-mute);
  text-align: center;
  padding: 8px;
}
.gcard .tag {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--fg-dim);
  padding: 4px 8px;
  border-radius: var(--r-pill);
}
.gcard .tag.hot { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
.gcard .body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.gcard .platform { font-family: var(--f-mono); font-size: 11px; color: var(--fg-mute); text-transform: uppercase; letter-spacing: 0.06em; }
.gcard .title { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gcard .price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; }
.gcard .price { font-family: var(--f-mono); font-weight: 600; font-size: 17px; }
.gcard .price-from { font-family: var(--f-mono); font-size: 11px; color: var(--fg-mute); }
.gcard .price-cv {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--accent);
  padding: 3px 7px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
}

/* Generated game art */
.art-gen {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--art-a, #312925) 0%, var(--art-b, #5a4538) 100%);
  display: flex; align-items: flex-end;
  padding: 14px;
}
.art-gen::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 14px);
  pointer-events: none;
}
.art-gen .name {
  position: relative;
  font-family: var(--f-serif);
  font-style: italic;
  color: rgba(255,255,255,0.92);
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

/* Banner (store hero) */
.store-banner {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--bg-2);
  padding: var(--sp-6);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-5);
  align-items: center;
  position: relative;
  overflow: hidden;
}
.store-banner::after {
  content: "";
  position: absolute; right: -30px; top: -30px; width: 280px; height: 280px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}
.store-banner h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.05;
}
.store-banner p { color: var(--fg-dim); margin: 6px 0 0; }

/* ------------------------------------------------------------------
   Product detail
   ------------------------------------------------------------------ */
.pd-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--fg-dim);
  font-size: 13px;
  padding: var(--sp-5) 0 var(--sp-3);
}
.pd-back:hover { color: var(--fg); }

.pd {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--sp-7);
  padding-top: var(--sp-3);
}
@media (max-width: 900px) { .pd { grid-template-columns: 1fr; } }

.pd-art {
  aspect-ratio: 3 / 4;
  max-height: 580px;
  border-radius: var(--r-3);
  overflow: hidden;
  position: relative;
}
.pd-info { display: flex; flex-direction: column; gap: var(--sp-4); padding-top: 8px; }
.pd-info .platform-row { display: flex; gap: 8px; }
.platform-tag {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  color: var(--fg-dim);
}
.pd-info h1 {
  font-size: clamp(32px, 4.4vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1.0;
  font-weight: 500;
  margin: 0;
}
.pd-info .pub { color: var(--fg-mute); font-size: 14px; }

.pd-price {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-5) 0;
  margin: var(--sp-3) 0;
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.pd-price .row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pd-price .big { font-family: var(--f-mono); font-weight: 600; font-size: 42px; letter-spacing: -0.02em; }
.pd-price .old { font-family: var(--f-mono); color: var(--fg-mute); text-decoration: line-through; font-size: 16px; }
.pd-price .save {
  font-family: var(--f-mono); font-size: 12px;
  background: var(--accent); color: var(--accent-fg);
  padding: 4px 8px; border-radius: var(--r-1); font-weight: 600;
}
.pd-pay-tabs {
  display: flex; gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 4px;
  background: var(--bg);
  width: fit-content;
}
.pd-pay-tabs .tab {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--fg-dim);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
}
.pd-pay-tabs .tab.active { background: var(--bg-2); color: var(--fg); }
.pd-actions { display: flex; gap: var(--sp-3); }
.pd-actions .btn-primary { flex: 1; }

.pd-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: var(--sp-4) 0;
  font-size: 14px;
}
.pd-meta .lbl { font-family: var(--f-mono); font-size: 11px; color: var(--fg-mute); text-transform: uppercase; letter-spacing: 0.08em; }
.pd-meta .val { margin-top: 4px; color: var(--fg); }

.pd-about h3 {
  font-size: 14px;
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
  margin: 0 0 12px;
  font-weight: 500;
}
.pd-about p { color: var(--fg-dim); line-height: 1.6; margin: 0 0 var(--sp-3); }

/* ------------------------------------------------------------------
   Cart / Checkout
   ------------------------------------------------------------------ */
.cart-page { padding: var(--sp-7) 0; }
.cart-page h1 {
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0 0 var(--sp-6);
  line-height: 0.95;
}
.cart-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-6);
}
@media (max-width: 900px) { .cart-grid { grid-template-columns: 1fr; } }

.cart-items {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--bg-2);
  overflow: hidden;
}
.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cart-item:last-child { border-bottom: none; }
.cart-item .thumb {
  width: 70px; height: 90px;
  border-radius: var(--r-2);
  overflow: hidden;
  position: relative;
}
.cart-item .title { font-weight: 500; font-size: 15px; }
.cart-item .sub { color: var(--fg-mute); font-size: 13px; font-family: var(--f-mono); margin-top: 4px; }
.cart-item .price { font-family: var(--f-mono); font-weight: 600; font-size: 17px; text-align: right; }
.cart-item .qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  margin-top: 8px;
}
.cart-item .qty button {
  background: none; border: none; color: var(--fg-dim);
  width: 28px; height: 28px;
  font-size: 14px;
}
.cart-item .qty .n { font-family: var(--f-mono); font-size: 13px; padding: 0 8px; }
.cart-item .remove {
  background: none; border: none;
  color: var(--fg-mute); font-size: 12px;
  text-decoration: underline;
  margin-top: 6px;
  display: block;
}
.cart-item .remove:hover { color: var(--neg); }

.summary {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--bg-2);
  padding: var(--sp-5);
  height: fit-content;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.summary h3 {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
  margin: 0 0 var(--sp-4);
  font-weight: 500;
}
.sum-row {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
}
.sum-row.total {
  border-top: 1px solid var(--line);
  margin-top: var(--sp-3);
  padding-top: var(--sp-4);
  font-size: 22px;
  font-weight: 600;
  font-family: var(--f-mono);
  letter-spacing: -0.01em;
}
.sum-row .v { font-family: var(--f-mono); }

.pay-method {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--sp-4);
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
  margin-bottom: 10px;
  background: var(--bg);
  transition: all 140ms;
}
.pay-method.active { border-color: var(--accent); background: var(--accent-soft); }
.pay-method .radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-strong);
  position: relative;
}
.pay-method.active .radio { border-color: var(--accent); }
.pay-method.active .radio::after {
  content: ""; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--accent);
}
.pay-method .name { font-weight: 500; font-size: 14px; }
.pay-method .desc { font-size: 12px; color: var(--fg-mute); margin-top: 2px; }
.pay-method .extra { font-family: var(--f-mono); font-size: 12px; color: var(--accent); }

/* Checkout */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-6);
  padding: var(--sp-7) 0;
}
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }

.field {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: var(--sp-4);
}
.field label {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
}
.field input, .field select {
  height: 44px;
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 120ms;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }

.section-h {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
  margin: 0 0 var(--sp-4);
  font-weight: 500;
}

/* ------------------------------------------------------------------
   Earn dashboard
   ------------------------------------------------------------------ */
.earn-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-5);
  padding: var(--sp-6) 0;
}
@media (max-width: 900px) { .earn-hero { grid-template-columns: 1fr; } }

.balance-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-6);
  display: flex; flex-direction: column;
  gap: var(--sp-4);
  position: relative;
  overflow: hidden;
}
.balance-card::before {
  content: ""; position: absolute; right: -40px; bottom: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  pointer-events: none;
}
.balance-card .top { display: flex; justify-content: space-between; align-items: center; }
.balance-card .amount {
  font-family: var(--f-mono);
  font-size: clamp(48px, 6vw, 80px);
  letter-spacing: -0.03em;
  line-height: 1;
  font-weight: 500;
}
.balance-card .amount .currency { color: var(--fg-mute); font-weight: 400; }
.balance-card .delta { color: var(--accent); font-family: var(--f-mono); font-size: 13px; margin-top: 6px; }
.balance-card .actions { display: flex; gap: 10px; margin-top: var(--sp-4); }

.kpi-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-5);
  display: flex; flex-direction: column; gap: 6px;
}
.kpi-card .lbl { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-mute); }
.kpi-card .val { font-family: var(--f-mono); font-size: 28px; letter-spacing: -0.02em; }
.kpi-card .sub { color: var(--fg-mute); font-size: 12px; font-family: var(--f-mono); }

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}
@media (max-width: 700px) { .kpi-row { grid-template-columns: 1fr; } }

.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-3);
}
.offer {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-3);
  cursor: pointer;
  transition: all 160ms;
}
.offer:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.offer .top { display: flex; gap: 12px; align-items: flex-start; }
.offer .icon {
  width: 44px; height: 44px;
  border-radius: var(--r-2);
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 600;
}
.offer .h { font-weight: 500; font-size: 15px; }
.offer .desc { font-size: 13px; color: var(--fg-dim); margin-top: 2px; }
.offer .bottom { display: flex; justify-content: space-between; align-items: center; }
.offer .reward { font-family: var(--f-mono); font-weight: 600; color: var(--accent); }
.offer .meta { color: var(--fg-mute); font-size: 12px; font-family: var(--f-mono); }

.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--line);
  margin: var(--sp-5) 0 var(--sp-5);
}
.tabs .tab {
  padding: 12px 0;
  margin-right: var(--sp-5);
  font-size: 14px;
  color: var(--fg-mute);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs .tab.active { color: var(--fg); border-bottom-color: var(--accent); }

/* ------------------------------------------------------------------
   Login modal
   ------------------------------------------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
  animation: fadeIn 200ms ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  width: 100%;
  max-width: 440px;
  padding: var(--sp-6);
  position: relative;
  animation: slideUp 240ms cubic-bezier(.16,1,.3,1);
}
@keyframes slideUp { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal .close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border: none; background: transparent;
  color: var(--fg-mute);
  border-radius: 8px;
}
.modal .close:hover { background: var(--bg-3); color: var(--fg); }
.modal h2 {
  font-size: 28px;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 6px;
}
.modal .lead { color: var(--fg-dim); font-size: 14px; margin: 0 0 var(--sp-5); }
.modal .modal-tabs { display: flex; gap: 0; margin-bottom: var(--sp-5); border-bottom: 1px solid var(--line); }
.modal .modal-tabs .tab { padding: 10px 0; margin-right: var(--sp-5); font-size: 13px; cursor: pointer; color: var(--fg-mute); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.modal .modal-tabs .tab.active { color: var(--fg); border-bottom-color: var(--accent); }
.modal .oauth-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: var(--sp-3); }
.modal .oauth {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--bg);
  color: var(--fg-dim);
  font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.modal .oauth:hover { color: var(--fg); border-color: var(--line-strong); }
.modal .divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg-mute);
  font-size: 11px;
  font-family: var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: var(--sp-4) 0;
}
.modal .divider::before, .modal .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* misc */
.divider-line { height: 1px; background: var(--line); margin: var(--sp-5) 0; }
.kbd {
  font-family: var(--f-mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--fg-dim);
  background: var(--bg-2);
}

/* Cart bubble */
.cart-bubble {
  position: relative;
  display: inline-flex;
}
.cart-bubble .badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: var(--accent-fg);
  font-family: var(--f-mono); font-size: 10px; font-weight: 600;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--fg); color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500;
  z-index: 80;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-md);
  animation: toastIn 200ms ease;
}
@keyframes toastIn { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Hide horizontal scroll artifacts */
.scroller {
  display: flex; gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; flex: none; }

/* Header avatar button */
.avatar-btn { padding-left: 4px; padding-right: 12px; height: 36px; gap: 0; }

/* ------------------------------------------------------------------
   EARN — restructured
   ------------------------------------------------------------------ */
.earn-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-6);
  padding: var(--sp-7) 0 var(--sp-6);
  align-items: end;
}
@media (max-width: 900px) { .earn-top { grid-template-columns: 1fr; } }
.earn-top > * { min-width: 0; }

.earn-title {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.035em;
  line-height: 0.95;
  font-weight: 500;
  margin: 12px 0 0;
}
.earn-title .serif { color: var(--accent); }
.earn-lead {
  margin-top: 12px;
  color: var(--fg-dim);
  max-width: 56ch;
}

.earn-top-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mini-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.mini-card .lbl { font-family: var(--f-mono); font-size: 11px; color: var(--fg-mute); text-transform: uppercase; letter-spacing: 0.08em; }
.mini-card .val { font-family: var(--f-mono); font-size: 28px; letter-spacing: -0.02em; font-weight: 500; }
.streak-bar {
  margin-top: 6px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 11px;
}
.streak-flame { color: var(--accent); font-weight: 500; }
.streak-mul { color: var(--fg-mute); }

.earn-section { padding: var(--sp-7) 0; border-top: 1px solid var(--line); }
.earn-section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}
.earn-h2 {
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0;
  line-height: 1.1;
}
.earn-sub {
  margin: 8px 0 0;
  color: var(--fg-dim);
  max-width: 56ch;
  font-size: 15px;
}

.offer { position: relative; }
.offer-flag {
  position: absolute; top: -8px; left: 12px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--r-pill);
  font-weight: 600;
}

/* Offerwall placement cards */
.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-3);
}
.wall-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-4);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  cursor: pointer;
  transition: all 160ms;
}
.wall-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.wall-art {
  width: 64px; height: 64px; border-radius: var(--r-2);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.wall-glyph {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.wall-name { font-weight: 500; font-size: 15px; }
.wall-desc { color: var(--fg-dim); font-size: 13px; margin-top: 2px; }
.wall-stats {
  margin-top: 6px;
  font-size: 12px;
  color: var(--fg-mute);
  display: flex; gap: 8px; align-items: center;
}
.dot-sep { color: var(--fg-faint); }

/* Offerwall modal — wider than login modal */
.ow-modal {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-4);
  width: 100%;
  max-width: 880px;
  height: 80vh;
  max-height: 720px;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: slideUp 240ms cubic-bezier(.16,1,.3,1);
}
.ow-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.ow-modal-body { flex: 1; overflow: hidden; padding: 16px 20px 20px; }
.ow-frame {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ow-frame-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.ow-rows { flex: 1; overflow-y: auto; padding: 8px; }
.ow-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px;
  border-radius: var(--r-2);
  cursor: pointer;
}
.ow-row:hover { background: var(--bg-2); }
.ow-row-icon { width: 36px; height: 36px; border-radius: 8px; flex: none; }

/* Achievements */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-3);
}
.ach {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.ach.done { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ach-icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-3); color: var(--fg-mute);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.ach.done .ach-icon { background: var(--accent); color: var(--accent-fg); }
.ach-h { font-weight: 500; font-size: 14px; }
.ach-m { font-size: 11px; color: var(--fg-mute); margin-top: 2px; }

/* ------------------------------------------------------------------
   CASHOUT page
   ------------------------------------------------------------------ */
.cashout-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--sp-6);
  padding-top: var(--sp-6);
}
@media (max-width: 900px) { .cashout-grid { grid-template-columns: 1fr; } }
.cashout-grid > * { min-width: 0; }

.cashout-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-5);
}
.cashout-tabs .tab {
  padding: 12px 0;
  margin-right: var(--sp-5);
  font-size: 14px;
  color: var(--fg-mute);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.cashout-tabs .tab.active { color: var(--fg); border-bottom-color: var(--accent); }

.cashout-grid-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-3);
}
.cashout-method {
  display: grid;
  grid-template-columns: 44px 1fr 20px;
  gap: 12px; align-items: center;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  cursor: pointer;
  transition: all 140ms;
}
.cashout-method:hover { border-color: var(--line-strong); }
.cashout-method.active { border-color: var(--accent); background: var(--accent-soft); }
.cashout-method-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: -0.02em;
  flex: none;
}
.cashout-method-name { font-weight: 500; font-size: 14px; }
.cashout-method-meta { font-size: 11px; color: var(--fg-mute); margin-top: 2px; }
.cashout-method .radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-strong);
  position: relative;
}
.cashout-method.active .radio { border-color: var(--accent); }
.cashout-method.active .radio .dot {
  position: absolute; inset: 3px;
  border-radius: 50%; background: var(--accent);
}

.cashout-summary { padding: var(--sp-5); position: sticky; top: calc(var(--header-h) + 16px); }
.amount-input {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 6px;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 8px 12px;
  position: relative;
}
.amount-input input {
  background: transparent; border: none; outline: none;
  color: var(--fg);
  font-family: var(--f-mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  width: 100%;
}
.amount-prefix { color: var(--fg-mute); font-size: 22px; font-weight: 500; }
.amount-quick {
  grid-column: 1 / -1;
  display: flex; gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.amount-quick button {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--fg-dim);
  font-size: 11px;
  font-family: var(--f-mono);
  cursor: pointer;
}
.amount-quick button:hover { background: var(--bg-2); color: var(--fg); }
.hint { font-size: 12px; color: var(--fg-mute); margin-top: 4px; }
.hint.warn { color: var(--warn); }

.security-row {
  margin-top: 12px;
  text-align: center;
  color: var(--fg-mute);
  font-size: 11px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* ------------------------------------------------------------------
   LEADERBOARD — compact podium (no wasteful "block")
   ------------------------------------------------------------------ */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: var(--sp-3);
  align-items: end;
  margin: var(--sp-6) 0;
}
@media (max-width: 700px) {
  .podium { grid-template-columns: 1fr; }
  .podium .podium-card.rank-1 { order: -1; }
}
.podium-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 28px 16px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative;
  text-align: center;
  min-width: 0;
}
.podium-card.rank-1 {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-2) 60%);
  padding-top: 36px;
  padding-bottom: 24px;
}
.podium-medal {
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent-fg);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  box-shadow: 0 0 0 4px var(--bg);
}
.podium-card.rank-1 .podium-medal { width: 34px; height: 34px; font-size: 14px; top: -17px; }
.podium-name { font-weight: 500; font-size: 14px; margin-top: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-card.rank-1 .podium-name { font-size: 16px; }
.podium-country { font-size: 11px; color: var(--fg-mute); }
.podium-earned { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--accent); margin-top: 6px; }
.podium-card.rank-1 .podium-earned { font-size: 28px; }
.podium-meta { font-size: 10px; color: var(--fg-mute); letter-spacing: 0.02em; }

.prize-strip {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--bg-2);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.prize-strip .lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
}
.prize-num {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
  line-height: 1;
}
.prize-split { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.prize-tier { display: flex; flex-direction: column; gap: 4px; }
.prize-tier .val { font-size: 16px; font-weight: 600; }

.lb-table {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--bg-2);
  overflow: hidden;
}
.lb-header, .lb-row {
  display: grid;
  grid-template-columns: 60px 2fr 80px 100px 1fr 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.lb-row:last-child { border-bottom: none; }
.lb-row.you { background: var(--accent-soft); }
.lb-header {
  background: var(--bg);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
}
.lb-rank { font-size: 16px; font-weight: 600; color: var(--fg-dim); }
.lb-row:first-of-type:not(.lb-header) .lb-rank { color: var(--accent); }
.lb-user { display: flex; align-items: center; gap: 10px; }
.lb-user > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.lb-name { font-weight: 500; font-size: 14px; }
.lb-country { font-size: 11px; color: var(--fg-mute); }
.lb-earned { font-weight: 600; }
.lb-youtag {
  font-family: var(--f-mono); font-size: 9px;
  background: var(--accent); color: var(--accent-fg);
  padding: 2px 5px; border-radius: 3px; margin-left: 6px;
  letter-spacing: 0.08em;
}
@media (max-width: 700px) {
  .lb-header, .lb-row { grid-template-columns: 40px 1.5fr 1fr; gap: 8px; padding: 12px; font-size: 13px; }
  .lb-header > *:nth-child(3), .lb-header > *:nth-child(4), .lb-header > *:nth-child(6) { display: none; }
  .lb-row > *:nth-child(3), .lb-row > *:nth-child(4), .lb-row > *:nth-child(6) { display: none; }
}

/* ------------------------------------------------------------------
   PROFILE
   ------------------------------------------------------------------ */
.profile-head {
  display: flex; align-items: center; gap: var(--sp-5);
  padding: var(--sp-7) 0 var(--sp-5);
  flex-wrap: wrap;
}
.profile-name {
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 8px 0 6px;
  line-height: 0.95;
  font-family: var(--f-mono);
}
.profile-tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tier-ladder {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-3);
}
.tier {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-4);
  display: flex; gap: var(--sp-3);
  position: relative;
  opacity: 0.65;
}
.tier.reached { opacity: 1; }
.tier.current { border-color: var(--accent); background: var(--accent-soft); }
.tier.next { border-color: var(--line-strong); }
.tier-badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  font-weight: 700;
  font-size: 12px;
}
.tier-info { flex: 1; min-width: 0; }
.tier-name { font-weight: 500; font-size: 16px; letter-spacing: -0.01em; }
.tier-thresh { font-size: 11px; color: var(--fg-mute); margin-top: 2px; }
.tier-progress {
  height: 4px; background: var(--bg-3);
  border-radius: 2px; margin: 10px 0;
  overflow: hidden;
}
.tier-progress-fill { height: 100%; background: var(--accent); transition: width 800ms ease; }
.tier-perks {
  margin: 8px 0 0; padding: 0;
  list-style: none;
}
.tier-perks li {
  font-size: 12px;
  color: var(--fg-dim);
  padding: 3px 0 3px 14px;
  position: relative;
}
.tier-perks li::before {
  content: "•";
  position: absolute; left: 0;
  color: var(--accent);
}

/* Transactions */
.tx-table {
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--bg-2);
  overflow: hidden;
}
.tx-header, .tx-row {
  display: grid;
  grid-template-columns: 130px 110px 1fr 120px;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.tx-row:last-child { border-bottom: none; }
.tx-header {
  background: var(--bg);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
}
.tx-when { font-size: 12px; color: var(--fg-mute); }
.tx-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
}
.tx-pill.kind-earn    { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tx-pill.kind-spend   { color: var(--fg-dim); }
.tx-pill.kind-cashout { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.tx-pill.kind-lootbox { color: var(--accent); }
.tx-amt.pos { color: var(--accent); font-weight: 600; }
.tx-amt.neg { color: var(--fg); font-weight: 500; }
@media (max-width: 700px) {
  .tx-header, .tx-row { grid-template-columns: 1fr 100px; gap: 8px; padding: 12px; }
  .tx-header > *:nth-child(1), .tx-header > *:nth-child(2) { display: none; }
  .tx-row > *:nth-child(1), .tx-row > *:nth-child(2) { display: none; }
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-3);
}
.inv-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.inv-art {
  aspect-ratio: 3/2;
  position: relative;
}
.inv-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.inv-title { font-weight: 500; font-size: 15px; }
.inv-meta { font-size: 11px; color: var(--fg-mute); }
.inv-code {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg);
  padding: 8px 12px;
  border-radius: var(--r-2);
  font-size: 13px;
  margin-top: 8px;
}
.inv-status {
  font-family: var(--f-mono); font-size: 11px;
  margin-top: 6px;
}
.inv-status.live { color: var(--accent); }
.inv-status.used { color: var(--fg-mute); }

/* ------------------------------------------------------------------
   TESTIMONIALS (humanized social proof)
   ------------------------------------------------------------------ */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-3);
}
.testimonial {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-5);
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
}
.testimonial::before {
  content: "\201C";
  position: absolute;
  top: -8px; left: 16px;
  font-family: var(--f-serif);
  font-size: 80px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.6;
}
.testimonial-quote {
  position: relative;
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  margin-top: 24px;
}
.testimonial-author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testimonial-meta { display: flex; flex-direction: column; gap: 2px; }
.testimonial-name { font-weight: 500; font-size: 13px; }
.testimonial-when { font-size: 11px; color: var(--fg-mute); font-family: var(--f-mono); }
.testimonial-payout {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--accent);
  padding: 4px 10px;
  background: var(--accent-soft);
  border-radius: var(--r-pill);
}

/* ------------------------------------------------------------------
   GAMIFICATION — quests, prize reel, photo strip
   ------------------------------------------------------------------ */

/* Two-col layout: quests on left, prize reel on right (stacks below 900px) */
.gami-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 900px) { .gami-grid { grid-template-columns: 1fr; } }
.gami-grid > * { min-width: 0; }

.earn-section-first { padding-top: var(--sp-6); }

/* Daily Quests strip */
.quests-strip {
  margin: var(--sp-6) 0 0;
  padding: var(--sp-6);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--bg-2)) 0%, var(--bg-2) 60%);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--r-3);
  position: relative;
  overflow: hidden;
}
.quests-strip::before {
  content: "";
  position: absolute; top: -40px; right: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  pointer-events: none;
}
.quests-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}
.quests-title {
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 8px 0 0;
  line-height: 1.05;
}
.quests-title .serif { color: var(--accent); }
.xp-bar-wrap { display: flex; flex-direction: column; gap: 8px; min-width: 260px; }
.xp-bar-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--fg-mute); }
.xp-bar {
  height: 8px;
  background: var(--bg-3);
  border-radius: 4px;
  overflow: hidden;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 0 12px var(--accent-soft);
  transition: width 800ms ease;
}
.quests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-3);
  position: relative;
  z-index: 1;
}
.quest {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: 14px;
  display: flex; gap: 12px;
  transition: all 160ms;
}
.quest:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.quest.done { border-color: var(--accent); background: var(--accent-soft); }
.quest-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-3);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  border: 1px solid var(--line);
}
.quest.done .quest-icon { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.quest-h {
  font-weight: 500; font-size: 14px;
  display: flex; justify-content: space-between; gap: 8px;
}
.quest-reward { color: var(--accent); font-size: 12px; font-weight: 600; }
.quest-desc { font-size: 12px; color: var(--fg-dim); margin-top: 2px; }
.quest-pbar {
  margin-top: 8px;
  height: 4px; background: var(--bg-3);
  border-radius: 2px; overflow: hidden;
}
.quest-pfill {
  height: 100%;
  background: var(--accent);
  transition: width 600ms ease;
}

/* === Prize reel (horizontal scrolling reward selector) === */
.prize-reel-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 20px;
  display: flex; flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.prize-reel-card::before {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  pointer-events: none;
}
.prize-reel-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 12px; position: relative; z-index: 1;
  flex-wrap: wrap;
}
.prize-reel-title {
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 8px 0 0;
  line-height: 1.05;
}
.prize-reel-title .serif { color: var(--accent); }
.prize-reel-meta { font-size: 11px; color: var(--fg-mute); }

.prize-reel-window {
  position: relative;
  height: 96px;
  overflow: hidden;
  border-radius: var(--r-2);
  background: var(--bg);
  border: 1px solid var(--line);
}
.prize-reel-pointer {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 2px; height: 100%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  z-index: 3;
}
.prize-reel-pointer::before,
.prize-reel-pointer::after {
  content: "";
  position: absolute; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
}
.prize-reel-pointer::before {
  top: -2px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid var(--accent);
}
.prize-reel-pointer::after {
  bottom: -2px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 9px solid var(--accent);
}
.prize-reel-fade {
  position: absolute; top: 0; bottom: 0;
  width: 50px;
  z-index: 2;
  pointer-events: none;
}
.prize-reel-fade-l { left: 0;  background: linear-gradient(90deg, var(--bg) 0%, transparent 100%); }
.prize-reel-fade-r { right: 0; background: linear-gradient(-90deg, var(--bg) 0%, transparent 100%); }

.prize-reel-track {
  display: flex; gap: 8px;
  padding: 8px;
  height: 100%;
  align-items: center;
  will-change: transform;
  transform: translateX(0);
}
.prize-reel-track.spinning {
  transition: transform 5.2s cubic-bezier(.12, .65, .12, 1);
}

.prize-tile {
  flex: none;
  width: 96px;
  height: 80px;
  border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  position: relative;
}
.prize-tile-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.prize-tile-rare {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

/* Rarity tints */
.prize-tile.rare-common    { background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-3) 100%); }
.prize-tile.rare-rare      {
  background: linear-gradient(180deg, color-mix(in srgb, #7AB8FF 15%, var(--bg-2)) 0%, var(--bg-3) 100%);
  border-color: color-mix(in srgb, #7AB8FF 30%, var(--line));
}
.prize-tile.rare-rare .prize-tile-value { color: #7AB8FF; }
.prize-tile.rare-epic      {
  background: linear-gradient(180deg, color-mix(in srgb, #E879F9 18%, var(--bg-2)) 0%, var(--bg-3) 100%);
  border-color: color-mix(in srgb, #E879F9 40%, var(--line));
}
.prize-tile.rare-epic .prize-tile-value { color: #E879F9; }
.prize-tile.rare-legendary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 25%, var(--bg-2)) 0%, color-mix(in srgb, var(--accent) 8%, var(--bg-3)) 100%);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 25%, transparent);
}
.prize-tile.rare-legendary .prize-tile-value { color: var(--accent); }

.prize-reel-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.prize-reel-spin { width: 100%; }
.prize-reel-result {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: var(--r-2);
  font-size: 14px;
  gap: 12px; flex-wrap: wrap;
  animation: pop 400ms cubic-bezier(.16,1,.3,1);
}
@keyframes pop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.prize-reel-foot {
  font-size: 10px;
  color: var(--fg-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

/* Countdown pills (flash deals) */
.flash-timer {
  display: inline-flex; align-items: center;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line));
  background: color-mix(in srgb, var(--warn) 6%, var(--bg-2));
  border-radius: var(--r-pill);
}
.countdown-pills { display: inline-flex; gap: 6px; align-items: center; }
.cd-pill {
  display: inline-flex; align-items: baseline; gap: 2px;
  padding: 3px 8px;
  background: var(--bg);
  border-radius: 5px;
  font-size: 13px;
}
.cd-num { font-weight: 700; font-size: 14px; letter-spacing: -0.02em; color: var(--warn); }
.cd-unit { font-size: 10px; color: var(--fg-mute); }

/* Live meta chips on product page */
.live-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.live-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--fg-dim);
}

/* Lifestyle photo strip on landing */
.photo-strip {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-3);
  height: 360px;
}
@media (max-width: 900px) {
  .photo-strip { grid-template-columns: 1fr 1fr; height: auto; grid-auto-rows: 200px; }
  .photo-strip .photo-tile-1 { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .photo-strip { grid-template-columns: 1fr; grid-auto-rows: 180px; }
}
.photo-tile {
  border-radius: var(--r-3);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 200ms ease;
  background-size: cover;
  background-position: center;
}
.photo-tile:hover { transform: translateY(-2px); }
/* Procedural "photo" — gradient mesh with layered shapes */
.photo-tile-1 {
  background:
    linear-gradient(135deg, rgba(15,14,12,0.4) 0%, rgba(15,14,12,0.8) 100%),
    radial-gradient(circle at 30% 30%, oklch(0.68 0.18 25) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, oklch(0.55 0.15 280) 0%, transparent 60%),
    linear-gradient(180deg, oklch(0.30 0.12 290) 0%, oklch(0.15 0.05 270) 100%);
}
.photo-tile-2 {
  background:
    linear-gradient(180deg, rgba(15,14,12,0.3) 50%, rgba(15,14,12,0.85) 100%),
    radial-gradient(circle at 50% 30%, oklch(0.78 0.17 65) 0%, transparent 60%),
    linear-gradient(180deg, oklch(0.42 0.13 35) 0%, oklch(0.20 0.06 30) 100%);
}
.photo-tile-3 {
  background:
    linear-gradient(180deg, rgba(15,14,12,0.3) 50%, rgba(15,14,12,0.85) 100%),
    radial-gradient(circle at 50% 50%, oklch(0.85 0.18 135) 0%, transparent 55%),
    linear-gradient(180deg, oklch(0.45 0.10 145) 0%, oklch(0.20 0.05 140) 100%);
}
.photo-tile::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 8px);
  pointer-events: none;
}
.photo-tile-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 24px;
  color: #F6F3EC;
  z-index: 1;
}
.photo-tile-overlay h3 {
  font-size: clamp(20px, 3vw, 32px);
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 8px 0 4px;
  line-height: 1.05;
}
.photo-tile-overlay p { margin: 0; opacity: 0.85; font-size: 14px; }
.coin-rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.coin-rain .coin {
  position: absolute;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0;
  animation: coin-fall 8s linear infinite;
}
.coin-rain .coin::after {
  content: "$";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-fg);
}
@keyframes coin-fall {
  0%   { transform: translateY(-40px) rotate(0deg);    opacity: 0; }
  10%  { opacity: 0.9; }
  90%  { opacity: 0.9; }
  100% { transform: translateY(calc(100vh + 40px)) rotate(540deg); opacity: 0; }
}
.hero { position: relative; }
.hero > .shell { position: relative; z-index: 1; }

/* ------------------------------------------------------------------
   ACADEMY (blog)
   ------------------------------------------------------------------ */
.academy-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--sp-7);
  padding: var(--sp-7) 0 var(--sp-6);
  align-items: end;
}
@media (max-width: 900px) { .academy-hero { grid-template-columns: 1fr; gap: var(--sp-5); } }
.academy-hero > * { min-width: 0; }

.academy-title {
  font-size: clamp(40px, 6vw, 84px);
  letter-spacing: -0.04em;
  line-height: 0.92;
  font-weight: 500;
  margin: 12px 0 0;
}
.academy-title .serif { color: var(--accent); }
.academy-lead {
  margin-top: 16px;
  color: var(--fg-dim);
  font-size: 17px;
  line-height: 1.5;
  max-width: 44ch;
}
.academy-search {
  margin-top: 24px;
  max-width: 480px;
}

/* Featured article card */
.academy-featured {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  cursor: pointer;
  transition: all 200ms ease;
  display: flex; flex-direction: column;
}
.academy-featured:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.academy-featured-cover {
  aspect-ratio: 16 / 10;
  position: relative;
}
.academy-featured-tag {
  position: absolute;
  top: 16px; left: 16px;
  padding: 6px 12px;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: var(--r-pill);
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
  z-index: 2;
}
.academy-featured-body { padding: var(--sp-5) var(--sp-5) var(--sp-5); }
.academy-featured-title {
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 12px 0 8px;
  line-height: 1.1;
}
.academy-featured-lead {
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 var(--sp-5);
  max-width: 56ch;
}
.academy-byline {
  display: flex; align-items: center; gap: 12px;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}
.academy-byline > div { display: flex; flex-direction: column; }
.academy-author { font-weight: 500; font-size: 14px; }
.academy-meta { font-size: 11px; color: var(--fg-mute); margin-top: 2px; }

/* Category chips row */
.academy-cats {
  display: flex; gap: 8px;
  flex-wrap: wrap;
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-6);
}
.cat-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 6px;
}
.cat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
}
.cat-pill .mono { font-size: 10px; }

/* Layout: grid + sidebar */
.academy-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--sp-6);
}
@media (max-width: 900px) { .academy-layout { grid-template-columns: 1fr; } }
.academy-layout > * { min-width: 0; }

.academy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-4);
}
.academy-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  cursor: pointer;
  transition: all 180ms ease;
  display: flex; flex-direction: column;
}
.academy-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.academy-card-cover {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}
.academy-card-body { padding: var(--sp-4); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.academy-card-title {
  font-size: 17px;
  letter-spacing: -0.015em;
  font-weight: 500;
  line-height: 1.25;
  margin: 6px 0 0;
}
.academy-card-lead {
  color: var(--fg-dim);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.academy-card-foot {
  margin-top: auto;
  display: flex; gap: 6px; align-items: center;
  font-size: 11px;
  color: var(--fg-mute);
  padding-top: 8px;
}

/* Sidebar */
.academy-side {
  display: flex; flex-direction: column;
  gap: var(--sp-3);
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
}
.academy-side-block {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-5);
}
.academy-side-h {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
  margin: 0 0 var(--sp-4);
  font-weight: 500;
}
.academy-toplist {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.academy-toplist li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.academy-toplist li:first-child { border-top: none; padding-top: 0; }
.academy-toplist-num {
  font-size: 18px;
  color: var(--fg-faint);
  font-weight: 700;
  line-height: 1;
}
.academy-toplist li:hover .academy-toplist-num { color: var(--accent); }
.academy-toplist-title { font-size: 13px; font-weight: 500; line-height: 1.3; }
.academy-toplist-meta { font-size: 10px; color: var(--fg-mute); margin-top: 4px; }

.academy-newsletter {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--bg-2)) 0%, var(--bg-2) 50%);
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
}

/* Article cover — procedural mesh */
.article-cover-mesh {
  position: absolute; inset: 0;
  overflow: hidden;
}
.article-cover-mesh .article-cover-noise {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 8px);
  pointer-events: none;
}
.article-cover-mesh .article-cover-shape {
  position: absolute; inset: 0;
  opacity: 0.8;
  mix-blend-mode: screen;
}

/* ------------------------------------------------------------------
   ARTICLE DETAIL
   ------------------------------------------------------------------ */
.article-page { padding: 0 0 var(--sp-7); }
.article-head {
  max-width: 760px;
  padding: var(--sp-5) 0 var(--sp-5);
}
.article-title {
  font-size: clamp(36px, 5.5vw, 64px);
  letter-spacing: -0.035em;
  line-height: 1.0;
  font-weight: 500;
  margin: 16px 0 16px;
}
.article-lead {
  font-size: 19px;
  line-height: 1.45;
  color: var(--fg-dim);
  margin: 0 0 var(--sp-5);
  max-width: 60ch;
}
.article-byline {
  display: flex; align-items: center; gap: 12px;
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.article-byline > div:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.article-share { margin-left: auto; }

.article-cover {
  aspect-ratio: 16 / 8;
  border-radius: var(--r-3);
  position: relative;
  overflow: hidden;
  margin: var(--sp-5) 0 var(--sp-6);
}

/* Two-column layout: body + sticky TOC */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: var(--sp-7);
  align-items: start;
}
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: var(--sp-5); }
  .article-toc { order: -1; position: static !important; padding: var(--sp-4); }
}

.article-body {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--fg);
}
.article-body p { margin: 0 0 1.3em; }
.article-body a { color: var(--accent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.article-body a:hover { border-bottom-color: var(--accent); }
.article-body h2 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.025em;
  font-weight: 500;
  line-height: 1.15;
  margin: 56px 0 16px;
}
.article-body h2:first-child { margin-top: 0; }

.article-intro {
  font-size: 21px;
  line-height: 1.5;
  color: var(--fg);
  font-weight: 400;
  margin-bottom: 1.4em;
  letter-spacing: -0.008em;
}
.article-quote {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.4;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding: 8px 0 8px 24px;
  margin: 40px 0;
  max-width: 50ch;
}

.article-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--sp-4);
  margin: var(--sp-6) 0;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
.article-step-n {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
  padding-top: 4px;
}
.article-step h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.6vw, 28px);
}
.article-step p {
  font-size: 17px;
  color: var(--fg);
  line-height: 1.6;
  margin: 0;
}

.article-checklist {
  margin: 24px 0 32px;
  padding-left: 20px;
}
.article-checklist li {
  margin-bottom: 12px;
  font-size: 17px;
  line-height: 1.55;
  padding-left: 8px;
}
.article-checklist li::marker {
  color: var(--accent);
  font-family: var(--f-mono);
  font-weight: 700;
}

.article-cta {
  margin-top: 64px;
  padding: var(--sp-6);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  position: relative;
  overflow: hidden;
}
.article-cta::before {
  content: "";
  position: absolute; right: -50px; top: -50px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  pointer-events: none;
}
.article-cta h3 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 8px;
  position: relative; z-index: 1;
}
.article-cta p {
  color: var(--fg-dim);
  margin: 0 0 var(--sp-4);
  position: relative; z-index: 1;
}

/* Sticky table of contents */
.article-toc {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--sp-4);
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
}
.article-toc h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
  margin: 0 0 12px;
  font-weight: 500;
}
.article-toc ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.article-toc a {
  display: block;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--fg-dim);
  border-radius: 4px;
  border-left: 2px solid transparent;
}
.article-toc a:hover {
  color: var(--fg);
  background: var(--bg-3);
  border-left-color: var(--accent);
}

.article-related {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .academy-side { position: static; }
  .article-toc { position: static; }
  .article-step { grid-template-columns: 1fr; gap: 8px; }
  .article-step-n { font-size: 22px; }
  .article-body { font-size: 17px; }
}

/* ------------------------------------------------------------------
   MOBILE — comprehensive responsive pass (most users are mobile)
   ------------------------------------------------------------------ */

/* Show/hide helpers */
.nav-burger { display: none; }
.hide-mobile { display: inherit; }

/* Icon-only header buttons get a tighter target */
.icon-btn { width: 40px; height: 40px; padding: 0; }

/* Mobile slide-down menu */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 16px 0;
  animation: slideDown 200ms ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.mobile-menu-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  font-weight: 500;
  color: var(--fg-dim);
  letter-spacing: -0.01em;
}
.mobile-menu-link.active { color: var(--accent); }
.mobile-menu-link:last-child { border-bottom: none; }

/* ===== Below 760px: phone layout ===== */
@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .shell { padding: 0 16px; }

  /* Header */
  .nav-desktop { display: none; }
  .nav-burger  { display: inline-flex; }
  .hide-mobile { display: none !important; }
  .header-right { gap: 6px; }
  .app-header .row { gap: 12px; }
  .mobile-menu { display: block; }
  .balance-pill { padding: 6px 10px; }
  .balance-pill .lbl { display: none; }

  /* Logo tightens */
  .logo span { font-size: 17px !important; }
  .logo-old::before { width: 20px; height: 20px; }

  /* Hero */
  .hero { padding-top: 32px; padding-bottom: 48px; }
  .hero-grid { gap: 32px; }
  .hero h1 { font-size: clamp(40px, 11vw, 64px) !important; }
  .hero-sub { font-size: 16px; }
  .hero-cta .btn { flex: 1; min-width: 0; }
  .hero-cta .btn-lg { height: 48px; padding: 0 16px; font-size: 14px; }
  .ledger { padding: 16px; }
  .ledger-row { padding: 8px 0; }
  .ledger-row .what { font-size: 11px; }
  .coin-rain { display: none; } /* feels cluttered on small screens */

  /* Stats row */
  .stats { margin-top: 32px; }
  .stat { padding: 16px; }
  .stat .num { font-size: 24px; }
  .stat .lbl { font-size: 10px; }

  /* How it works */
  .how-step { min-height: 0; padding: 24px; }
  .how-step h3 { font-size: 22px; }
  .how-step .visual { height: 80px; }

  /* Sections compress */
  .section { padding: 48px 0; }
  .section-sm { padding: 32px 0; }
  .section-title { font-size: clamp(28px, 7vw, 40px) !important; }
  .two-paths { grid-template-columns: 1fr !important; }
  .two-paths .card-pad { padding: 24px !important; min-height: 0 !important; }

  /* FAQ */
  .faq { padding: 16px 0; }
  .faq summary { font-size: 17px; }

  /* Footer */
  .app-footer .row { gap: 32px; }
  .app-footer .col { flex: 0 0 calc(50% - 16px); min-width: 0; }
  .app-footer .col:first-child { flex: 0 0 100%; }
  .app-footer .bottom { font-size: 11px; }

  /* Store */
  .store-head { padding: 32px 0 16px; }
  .store-head h1 { font-size: clamp(32px, 8vw, 44px) !important; }
  .store-layout { gap: 16px; padding-top: 24px; }
  .filters { position: static; }
  .filter-group .head { margin-bottom: 6px; }
  .filter-list { flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .filter-list::-webkit-scrollbar { display: none; }
  .filter-item { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-pill); flex: none; }
  .search-input { height: 44px; }
  .store-banner { grid-template-columns: 1fr; padding: 24px; }
  .store-banner > div:last-child { width: 120px; justify-self: center; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gcard .body { padding: 12px; }
  .gcard .title { font-size: 13px; }
  .gcard .price { font-size: 15px; }
  .gcard .price-cv { display: none; } /* save room on mobile cards */
  .store-toolbar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; }
  .store-toolbar::-webkit-scrollbar { display: none; }
  .store-toolbar .chip { flex: none; }

  /* Product detail */
  .pd { gap: 24px; padding-top: 8px; }
  .pd-art { max-height: 360px; }
  .pd-info h1 { font-size: clamp(28px, 7vw, 40px) !important; }
  .pd-price .big { font-size: 32px; }
  .pd-actions { flex-direction: column; }
  .pd-actions .btn { width: 100%; }
  .pd-meta { grid-template-columns: 1fr 1fr; gap: 12px; }

  /* Cart / checkout */
  .cart-page { padding: 32px 0; }
  .cart-page h1 { font-size: clamp(32px, 8vw, 44px) !important; }
  .cart-item { grid-template-columns: 56px 1fr; padding: 14px; }
  .cart-item > div:last-child { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
  .summary { position: static; padding: 20px; }
  .summary h3 { margin-bottom: 12px; }
  .checkout-grid { gap: 24px; padding: 32px 0; }
  .field input, .field select { height: 48px; font-size: 16px; } /* prevents iOS zoom-on-focus */

  /* Earn */
  .earn-top { gap: 20px; padding: 32px 0 20px; }
  .earn-title { font-size: clamp(28px, 7vw, 40px) !important; }
  .earn-top-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mini-card { padding: 12px; }
  .mini-card .val { font-size: 22px; }
  .earn-section { padding: 40px 0; }
  .earn-h2 { font-size: clamp(22px, 6vw, 28px) !important; }
  .earn-section-head { gap: 12px; }
  .earn-section-head > div:last-child { width: 100%; }
  .earn-section-head .chip { flex: none; }
  .earn-section-head > div:last-child[style] {
    overflow-x: auto; flex-wrap: nowrap !important;
    scrollbar-width: none; padding-bottom: 4px;
  }
  .offer-grid { grid-template-columns: 1fr; }
  .wall-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi-card .val { font-size: 22px; }

  /* Offerwall modal */
  .ow-modal { height: 90vh; max-height: none; border-radius: 16px 16px 0 0; align-self: flex-end; }
  .modal-backdrop { padding: 0; align-items: flex-end; }

  /* Cashout */
  .cashout-grid { gap: 24px; padding-top: 24px; }
  .cashout-grid-methods { grid-template-columns: 1fr; }
  .cashout-summary { position: static; }
  .amount-input input { font-size: 26px; }

  /* Leaderboard */
  .podium { gap: 8px; }
  .podium-card { padding: 24px 10px 14px; }
  .podium-card.rank-1 { padding-top: 32px; }
  .podium-name { font-size: 12px; }
  .podium-card.rank-1 .podium-name { font-size: 14px; }
  .podium-earned { font-size: 16px; }
  .podium-card.rank-1 .podium-earned { font-size: 22px; }
  .podium-meta { font-size: 9px; }
  .prize-strip { padding: 20px; }
  .prize-num { font-size: 32px; }
  .prize-split { gap: 16px; }

  /* Profile */
  .profile-head { padding: 32px 0 16px; gap: 16px; }
  .profile-name { font-size: clamp(28px, 7vw, 40px) !important; }
  .profile-head > div:last-child { width: 100%; flex-direction: row; justify-content: space-between; align-items: center !important; }
  .tier-ladder { grid-template-columns: 1fr; }
  .inventory-grid { grid-template-columns: 1fr; }

  /* Login modal — sheet style on mobile */
  .modal {
    align-self: flex-end;
    border-radius: 22px 22px 0 0;
    padding: 24px 20px 32px;
    max-width: 100%;
  }

  /* Tabs scrollable on mobile */
  .tabs { overflow-x: auto; scrollbar-width: none; padding-bottom: 0; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs .tab { flex: none; white-space: nowrap; }

  /* Tweaks panel — keep usable */
  .toast { bottom: 80px; }
}

/* ===== Below 480px: tiny phones tighten further ===== */
@media (max-width: 480px) {
  .header-right .btn-sm { padding: 0 10px; font-size: 12px; height: 32px; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ledger-row .avatar { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:nth-child(2) { border-right: none; }
  .stats .stat:nth-child(3), .stats .stat:nth-child(4) { border-top: 1px solid var(--line); }
}

/* Larger touch targets across the board for mobile */
@media (hover: none) and (pointer: coarse) {
  .btn, .filter-item, .chip, .pay-method, .cashout-method, .wall-card, .gcard, .offer { -webkit-tap-highlight-color: transparent; }
}
