:root {
  --bg: #100e0d;
  --surface: #1f1b18;
  --surface-hover: #292420;
  --text: #f2ece4;
  --muted: #b4aa9f;
  --soft: #8b8176;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --gold: #e6be6d;
  --gold-glow: rgba(230, 190, 109, 0.1);
  --error: #e57373;
  --success: #66bb6a;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
  --max: 1240px;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --radius: 20px;
}

html[data-theme="light"] {
  --bg: #f8f5f0;
  --surface: #ffffff;
  --surface-hover: #f0ece5;
  --text: #1a1714;
  --muted: #6b635a;
  --soft: #948b80;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --gold: #b38522;
  --gold-glow: rgba(179, 133, 34, 0.12);
  --shadow: 0 24px 50px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background-color: var(--bg);
  background-image: radial-gradient(circle at 50% 0%, var(--gold-glow), transparent 60vw);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

html[data-theme="dark"] body {
  background-image:
    radial-gradient(circle at 50% -14%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 56vw),
    radial-gradient(circle at 20% 120%, rgba(255, 255, 255, 0.03), transparent 42vw);
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
img { display: block; width: 100%; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Typography */
h1, h2, h3, h4, .serif { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(3.2rem, 8vw, 6.5rem); letter-spacing: -0.03em; }
h1 em { color: var(--gold); font-style: italic; }
h2 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
p { margin: 0 0 1rem; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.75rem; font-weight: 700; font-family: var(--sans); margin-bottom: 1.5rem; display: block; }
.lead { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--muted); max-width: 600px; line-height: 1.5; }

/* Layout Shell */
.site-shell { width: min(100%, var(--max)); margin: 0 auto; padding: 0 24px; }
.section-pad { padding: 120px 0; }

/* Navigation */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); background: color-mix(in srgb, var(--bg) 80%, transparent); border-bottom: 1px solid var(--border); }
html[data-theme="dark"] .topbar { background: color-mix(in srgb, var(--bg) 90%, transparent); }
.topbar-inner { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--gold); color: #111; display: grid; place-items: center; font-size: 0.8rem; font-family: var(--sans); font-weight: 800; }
.desktop-nav { display: none; gap: 32px; font-weight: 500; font-size: 0.95rem; }
.desktop-nav a:hover { color: var(--gold); }
.topbar-actions { display: flex; align-items: center; gap: 16px; }

/* Mobile Menu */
.menu-toggle, .theme-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: 0.2s; }
.menu-toggle:hover, .theme-toggle:hover { border-color: var(--gold); color: var(--gold); }
html[data-theme="light"] .icon-sun, html[data-theme="dark"] .icon-moon { display: none; }
.mobile-nav { position: fixed; inset: 80px 0 0 0; background: var(--bg); z-index: 40; padding: 40px 24px; display: flex; flex-direction: column; gap: 24px; transform: translateY(-10px); opacity: 0; pointer-events: none; transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.mobile-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-nav a { font-family: var(--serif); font-size: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 16px; }

@media (min-width: 900px) {
  .desktop-nav { display: flex; }
  .menu-toggle, .mobile-nav { display: none; }
}

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; height: 56px; padding: 0 32px; border-radius: 100px; font-weight: 600; font-size: 1rem; cursor: pointer; transition: all 0.2s ease; border: none; text-align: center; }
.button-primary { background: var(--gold); color: #111; box-shadow: 0 8px 20px var(--gold-glow); }
.button-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px var(--gold-glow); filter: brightness(1.1); }
.button-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.button-secondary:hover { border-color: var(--gold); color: var(--gold); }
.button-small { height: 44px; padding: 0 20px; font-size: 0.9rem; }
.text-link { color: var(--gold); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.text-link:hover { opacity: 0.8; }

/* Hero Flow */
.hero { min-height: 100vh; padding-top: 140px; display: grid; align-items: center; gap: 60px; padding-bottom: 60px; }
.hero-content { display: flex; flex-direction: column; gap: 24px; z-index: 2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; }
.hero-gallery { position: relative; height: 60vh; min-height: 400px; width: 100%; z-index: 1; }
.hg-img { position: absolute; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.hg-1 { width: 65%; height: 75%; top: 0; right: 0; z-index: 1; }
.hg-2 { width: 50%; height: 60%; bottom: 0; left: 0; z-index: 3; border: 4px solid var(--bg); }
.hg-3 { width: 40%; height: 50%; bottom: 15%; right: 10%; z-index: 2; border: 4px solid var(--bg); }
.hero-gallery:hover .hg-1 { transform: scale(1.02) translate(10px, -10px); }
.hero-gallery:hover .hg-2 { transform: scale(1.02) translate(-10px, 10px); }

@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 80px; }
  .hero-gallery { height: 75vh; }
}

/* Living Proof (Staggered Grid) */
.living-proof { position: relative; }
.proof-header { margin-bottom: 60px; max-width: 600px; }
.proof-grid { display: grid; gap: 40px; }
.proof-card { display: flex; flex-direction: column; gap: 20px; group; }
.proof-img-wrap { position: relative; overflow: hidden; border-radius: var(--radius); }
.proof-img-wrap img { aspect-ratio: 4/5; object-fit: cover; transition: transform 0.6s ease; }
.proof-card:hover .proof-img-wrap img { transform: scale(1.05); }
.proof-badge { position: absolute; top: 20px; left: 20px; background: rgba(17, 17, 17, 0.7); backdrop-filter: blur(10px); color: var(--gold); padding: 8px 14px; border-radius: 100px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid rgba(226, 186, 101, 0.3); }
.proof-meta { display: flex; flex-direction: column; gap: 8px; }
.proof-meta p { color: var(--muted); font-size: 0.95rem; margin: 0; }

@media (min-width: 768px) {
  .proof-grid { grid-template-columns: repeat(3, 1fr); gap: 30px; }
  .proof-card:nth-child(2) { transform: translateY(60px); }
  .proof-card:nth-child(3) { transform: translateY(30px); }
}

/* The Statement */
.statement { text-align: center; max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 30px; }
.statement h2 { line-height: 1.2; }
.statement .lead { max-width: 700px; margin: 0 auto; }

/* The Drop (Split area) */
.drop-section { display: grid; gap: 60px; align-items: center; background: var(--surface); border-radius: 32px; padding: 40px 24px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.drop-copy h2 { margin-bottom: 20px; }
.drop-form-wrap { background: var(--bg); padding: 32px; border-radius: 24px; border: 1px solid var(--border-strong); }
.inline-form { display: grid; gap: 16px; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; background: var(--surface); border: 1px solid var(--border-strong); height: 56px; border-radius: 12px; padding: 0 16px; color: var(--text); outline: none; transition: 0.2s; }
.input-wrap input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-glow); }
.input-wrap input::placeholder { color: var(--soft); }
.consent-wrap { display: flex; gap: 12px; align-items: flex-start; font-size: 0.85rem; color: var(--muted); margin-top: 8px; }
.consent-wrap input[type="checkbox"] { margin-top: 4px; accent-color: var(--gold); width: 16px; height: 16px; }

.permission-panel {
  display: grid;
  gap: 12px;
  background: color-mix(in srgb, var(--surface) 65%, var(--bg));
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 16px;
}

.permission-panel-compact {
  margin-top: 4px;
}

.permission-toggle-row {
  margin-top: 0;
}

.permission-copy {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.permission-fineprint {
  color: var(--soft);
  margin: 0;
  font-size: 0.82rem;
}

.permission-expand {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.permission-expand-compact {
  gap: 10px;
}

.permission-expand[hidden] {
  display: none;
}

.permission-expand textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  resize: vertical;
  min-height: 96px;
}

.permission-expand textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
  outline: none;
}

@media (min-width: 900px) {
  .drop-section { grid-template-columns: 1fr 1fr; padding: 80px; gap: 80px; }
}

/* Submit Teaser Banner */
.submit-teaser { position: relative; border-radius: 32px; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; padding: 100px 24px; background: linear-gradient(rgba(19, 17, 15, 0.7), rgba(19, 17, 15, 0.9)), url('https://res.cloudinary.com/dkuyvxtjy/image/upload/v1773496958/e415ab_10f34eafa8c3436babf39cdc17924b5f_mv2_j8h9l5.webp?auto=format&fit=crop&q=80&w=2000') center/cover; }
.submit-teaser-content { position: relative; z-index: 2; max-width: 600px; display: flex; flex-direction: column; gap: 24px; align-items: center; }
.submit-teaser h2 { color: #fff; }
.submit-teaser .lead { color: rgba(255, 255, 255, 0.8); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 60px 0; margin-top: 60px; }
.footer-inner { display: grid; gap: 40px; }
.future-signal { color: var(--soft); font-size: 0.95rem; max-width: 400px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; color: var(--muted); font-weight: 500; }
.footer-links a:hover { color: var(--gold); }
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: auto 1fr; justify-content: space-between; align-items: end; }
  .footer-links { justify-content: flex-end; }
}

/* Form Status */
.form-status { font-size: 0.9rem; min-height: 20px; display: block; margin-top: 8px; }
.form-status.success { color: var(--success); }
.form-status.error { color: var(--error); }
.form-status.loading { color: var(--gold); }

/* Animation Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* -----------------------------
   Submit Page Specifics 
----------------------------- */
.submit-header { padding: 160px 0 60px; max-width: none; }
.submit-lead { max-width: none; }
.submit-grid { display: grid; gap: 60px; align-items: start; padding-bottom: 120px; }

.brag-form { display: grid; gap: 40px; }
.form-group { display: grid; gap: 24px; background: var(--surface); padding: 40px; border-radius: 24px; border: 1px solid var(--border); }
.form-group-title { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 8px; display: block; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 600px) { .form-row.two-col { grid-template-columns: 1fr 1fr; } }

.brag-form label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.brag-form input, .brag-form select, .brag-form textarea { width: 100%; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 12px; padding: 14px 16px; color: var(--text); outline: none; transition: 0.2s; }
.brag-form textarea { resize: vertical; min-height: 120px; }
.brag-form input:focus, .brag-form select:focus, .brag-form textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }
.brag-form input.invalid, .brag-form select.invalid, .brag-form textarea.invalid { border-color: var(--error); }

/* Sleek File Upload */
.upload-zone { border: 2px dashed var(--border-strong); border-radius: 16px; padding: 40px 24px; text-align: center; background: var(--bg); transition: 0.2s; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.upload-zone:hover { border-color: var(--gold); background: var(--surface-hover); }
.upload-zone svg { color: var(--gold); width: 32px; height: 32px; }
.upload-zone span { font-weight: 600; color: var(--text); }
.upload-zone small { color: var(--soft); }
.file-input-hidden { display: none; }
.file-preview { margin-top: 16px; display: none; width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.file-preview.active { display: block; }
.file-preview-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); padding: 12px; background: var(--bg); }
.file-preview-item { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-hover); min-height: 90px; display: grid; place-items: center; }
.file-preview-item img, .file-preview-item video { width: 100%; height: 120px; object-fit: cover; display: block; }
.file-preview-item video { background: #000; }
.file-preview-fallback { color: var(--muted); font-size: 0.8rem; padding: 10px; text-align: center; }

.conditional-fields[hidden] { display: none; }

/* -----------------------------
   Issue Page Specifics 
----------------------------- */
.issue-page { padding: 140px 0 80px; max-width: 800px; margin: 0 auto; }
.issue-article { background: var(--surface); padding: clamp(30px, 5vw, 60px); border-radius: 32px; border: 1px solid var(--border); }
.issue-section { margin-top: 50px; }
.issue-section p { color: var(--muted); font-size: 1.1rem; }

/* Toast */
.toast-stack { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: flex; flex-direction: column; gap: 12px; width: min(calc(100vw - 48px), 340px); }
.toast { padding: 16px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; animation: slideIn 0.3s forwards; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
.toast-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.toast-text { color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
@keyframes slideIn { to { transform: translateY(0); opacity: 1; } }



/* -----------------------------
   Leaderboard Page
----------------------------- */
.leaderboard-page {
  padding-top: 112px;
  padding-bottom: 80px;
}

.lb-hero {
  padding-bottom: 28px;
}

.lb-hero-copy {
  display: grid;
  gap: 18px;
}

.lb-hero-copy .lead {
  max-width: none;
  width: 100%;
}

.lb-callout,
.lb-side-card,
.lb-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.lb-callout {
  padding: 24px;
}

.lb-callout p {
  color: var(--muted);
  margin: 10px 0 0;
}

.leaderboard-controls {
  padding-bottom: 16px;
}

.filter-row {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.filter-block {
  display: grid;
  gap: 8px;
}

.filter-block label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.filter-block select {
  width: 100%;
  min-height: 54px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0 16px;
  color: var(--text);
  outline: none;
}

.filter-block select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow);
}

.lb-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
}

.lb-strip strong {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
}

.lb-copy {
  color: var(--muted);
  font-size: 0.96rem;
  margin: 0;
}

.lb-rivalry {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.lb-rival-card {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.lb-rival-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
  font-weight: 700;
}

.lb-rival-card strong {
  font-size: 1.05rem;
  font-family: var(--serif);
}

.lb-rival-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.lb-layout {
  display: block;
}

.lb-main {
  min-width: 0;
}

.lb-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.lb-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
}

.lb-table th,
.lb-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.lb-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  background: color-mix(in srgb, var(--surface-hover) 72%, transparent);
}

.lb-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-hover) 72%, transparent);
}

.lb-rank {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 100px;
  background: var(--gold);
  color: #111;
  font-weight: 800;
  font-size: 0.88rem;
  box-shadow: 0 8px 20px rgba(226, 186, 101, 0.3);
}

.lb-rank-1 {
  background: linear-gradient(135deg, #f3d48a, #e2ba65);
}

.lb-rank-2 {
  background: linear-gradient(135deg, #d8dde7, #aeb8cb);
}

.lb-rank-3 {
  background: linear-gradient(135deg, #e3b38b, #c6875b);
}

.lb-rank-4 {
  background: var(--gold);
}

.lb-item {
  display: grid;
  gap: 2px;
}

.lb-item strong {
  font-family: var(--sans);
  font-size: 0.98rem;
}

.lb-item small {
  color: var(--muted);
  font-size: 0.8rem;
}

.lb-thumb-btn {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-hover);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.lb-thumb-btn:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.lb-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-thumb-chip {
  position: absolute;
  right: 6px;
  bottom: 6px;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lb-metric {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.lb-value-metric {
  display: grid;
  gap: 2px;
}

.lb-value-metric small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.lb-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 7px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border-strong);
}

.lb-total-month {
  background: color-mix(in srgb, var(--gold-glow) 70%, transparent);
  color: var(--gold);
}

.lb-total-year {
  background: color-mix(in srgb, var(--surface-hover) 80%, transparent);
  color: var(--text);
}

.lb-table td:nth-child(1),
.lb-table td:nth-child(2),
.lb-table td:nth-child(4),
.lb-table td:nth-child(6),
.lb-table td:nth-child(7),
.lb-table td:nth-child(8),
.lb-table td:nth-child(9),
.lb-table td:nth-child(10),
.lb-table th:nth-child(1),
.lb-table th:nth-child(2),
.lb-table th:nth-child(4),
.lb-table th:nth-child(6),
.lb-table th:nth-child(7),
.lb-table th:nth-child(8),
.lb-table th:nth-child(9),
.lb-table th:nth-child(10) {
  white-space: nowrap;
}

.lb-table th:nth-child(7),
.lb-table th:nth-child(8),
.lb-table td:nth-child(7),
.lb-table td:nth-child(8) {
  text-align: right;
}

.lb-link {
  font-size: 0.9rem;
}

.lb-sale-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.lb-sale-status-yes {
  color: #2f7a42;
  background: rgba(102, 187, 106, 0.2);
  border: 1px solid rgba(102, 187, 106, 0.35);
}

.lb-sale-status-no {
  color: var(--soft);
  background: color-mix(in srgb, var(--surface-hover) 84%, transparent);
  border: 1px solid var(--border);
}

.lb-sale-link {
  margin-left: 8px;
}

.lb-link-muted {
  color: var(--soft);
}

.lb-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 30px;
  padding: 0 10px;
  border-radius: 100px;
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid rgba(226, 186, 101, 0.25);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.lb-empty {
  text-align: center !important;
  color: var(--muted);
  padding: 28px !important;
}

body.modal-open {
  overflow: hidden;
}

.lb-media-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(6, 5, 5, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 24px;
}

.lb-media-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.lb-media-shell {
  width: min(100%, 1024px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
}

.lb-media-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: grid;
  place-items: center;
}

.lb-media-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.lb-media-frame {
  border-radius: 14px;
  overflow: hidden;
  background: #0f0d0b;
  border: 1px solid var(--border);
}

.lb-media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lb-media-prev { left: 14px; }
.lb-media-next { right: 14px; }

.lb-media-nav:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}

.lb-media-nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lb-media-frame img,
.lb-media-frame video {
  width: 100%;
  max-height: min(76vh, 760px);
  object-fit: contain;
  display: block;
}

.lb-media-caption {
  margin: 12px 4px 2px;
  color: var(--muted);
  font-size: 0.92rem;
}

.lb-media-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lb-media-count {
  color: var(--soft);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Leaderboard-specific footer breathing room on mobile */
.lb-footer {
  padding-left: 30px;
}

@media (min-width: 760px) {
  .filter-row {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (min-width: 980px) {
  .filter-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) {
  .lb-footer {
    padding-left: 24px;
  }
}

@media (max-width: 860px) {
  .lb-table-wrap {
    overflow: visible;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .lb-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  .lb-table thead {
    display: none;
  }

  .lb-table tbody {
    display: grid;
    gap: 14px;
  }

  .lb-table tbody tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
  }

  .lb-table tbody tr:hover {
    background: var(--surface);
  }

  .lb-table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    white-space: normal !important;
    text-align: right !important;
  }

  .lb-table td:last-child {
    border-bottom: none;
  }

  .lb-table td[data-label="Preview"] {
    order: -1;
    padding: 0;
    display: block;
    border-bottom: 1px solid var(--border);
  }

  .lb-table td[data-label="Preview"]::before {
    display: none;
  }

  .lb-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    text-align: left;
    flex-shrink: 0;
  }

  .lb-table .lb-empty {
    display: block;
    text-align: left !important;
  }

  .lb-table .lb-empty::before {
    content: none;
  }

  .lb-thumb-btn {
    width: 100%;
    height: 180px;
    border: none;
    border-radius: 0;
  }

  .lb-table td[data-label="Stone / Find"] .lb-item {
    text-align: right;
    justify-items: end;
  }

  .lb-table td[data-label="For Sale"] {
    justify-content: flex-end;
  }

  .lb-thumb-chip {
    right: 10px;
    bottom: 10px;
    font-size: 0.72rem;
    padding: 3px 8px;
  }

  .footer.site-shell {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}
