/* ============================================================
   Release Hub — Shared Design System
   Single source of truth. Linked from every page.
   Light + dark themes via [data-theme] on <html>.
   Brand blue: #0778fa (sampled from the Release Hub logo).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Tokens — Light (default) ──────────────────────────────── */
:root {
  --bg:           #ffffff;   /* swapped with --surface */
  --bg-soft:      #f5f4f4;   /* swapped with --surface-2 */
  --surface:      #faf9f9;   /* swapped with --bg (was Release Hub light logo bg) */
  --surface-2:    #f3f2f2;   /* swapped with --bg-soft */
  --border:       #d8dee7;
  --border-soft:  #e5eaf1;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --text-faint:   #94a3b8;
  --primary:      #0778fa;
  --primary-hover:#0061d6;
  --primary-soft: #dbeafe;
  --success:      #16a34a;
  --success-soft: #dcfce7;
  --danger:       #dc2626;
  --danger-soft:  #fee2e2;
  --warning:      #b45309;
  --warning-soft: #fef3c7;
  --shadow-sm:    0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow:       0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-md:    0 8px 24px rgba(15, 23, 42, 0.10);
  --ring:         0 0 0 3px rgba(7, 120, 250, 0.20);
  --nav-height:   64px;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    16px;
}

/* ── Tokens — Dark (reference-inspired) ────────────────────── */
[data-theme="dark"] {
  --bg:           #101216;   /* swapped with --surface */
  --bg-soft:      #181b20;   /* swapped with --surface-2 */
  --surface:      #030405;   /* swapped with --bg (was Release Hub dark logo bg) */
  --surface-2:    #07090b;   /* swapped with --bg-soft */
  --border:       rgba(255, 255, 255, 0.10);
  --border-soft:  rgba(255, 255, 255, 0.06);
  --text:         #ededed;
  --text-muted:   #9ca3af;
  --text-faint:   #6b7280;
  --primary:      #0778fa;
  --primary-hover:#3a92ff;
  --primary-soft: rgba(7, 120, 250, 0.18);
  --success:      #22c55e;
  --success-soft: rgba(34, 197, 94, 0.14);
  --danger:       #f43f5e;
  --danger-soft:  rgba(244, 63, 94, 0.14);
  --warning:      #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.14);
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow:       0 4px 12px rgba(0, 0, 0, 0.36);
  --shadow-md:    0 12px 28px rgba(0, 0, 0, 0.45);
  --ring:         0 0 0 3px rgba(7, 120, 250, 0.32);
}

/* ── Accent presets (override --primary family) ────────────── */
[data-accent="ocean"]   { --primary: #0778fa; --primary-hover: #0061d6; }
[data-accent="violet"]  { --primary: #8b5cf6; --primary-hover: #7c3aed; }
[data-accent="magenta"] { --primary: #ec4899; --primary-hover: #db2777; }
[data-accent="emerald"] { --primary: #10b981; --primary-hover: #059669; }
[data-accent="sunset"]  { --primary: #f97316; --primary-hover: #ea580c; }
[data-accent="cyan"]    { --primary: #06b6d4; --primary-hover: #0891b2; }

[data-theme="dark"][data-accent="ocean"]   { --primary-hover: #3a92ff; }
[data-theme="dark"][data-accent="violet"]  { --primary-hover: #a78bfa; }
[data-theme="dark"][data-accent="magenta"] { --primary-hover: #f472b6; }
[data-theme="dark"][data-accent="emerald"] { --primary-hover: #34d399; }
[data-theme="dark"][data-accent="sunset"]  { --primary-hover: #fb923c; }
[data-theme="dark"][data-accent="cyan"]    { --primary-hover: #22d3ee; }

[data-accent] {
  --primary-soft: color-mix(in srgb, var(--primary) 14%, transparent);
  --ring:         0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent);
}

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

html { color-scheme: light dark; }
[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

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

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
::-webkit-scrollbar-track { background: transparent; }

/* ── Lightweight utilities (used by static markup) ─────────── */
.row              { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between      { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.col              { display: flex; flex-direction: column; gap: 10px; }
.center           { text-align: center; }
.muted            { color: var(--text-muted); }
.faint            { color: var(--text-faint); }
.danger           { color: var(--danger); }
.hidden           { display: none !important; }

/* ============================================================
   SHARED NAV
   ============================================================ */
.nav {
  height: var(--nav-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.nav-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
}
.nav-logo span { color: var(--primary); }
.nav-logo .brand-wordmark { height: 26px; width: auto; }
.nav-logo .brand-mark     { height: 28px; width: auto; }

/* Light/dark variant swap.
   IMPORTANT: only the swap rules touch `display`. Container rules above set
   sizing only — that way these always win regardless of source order, and
   we never need !important. */
.brand-wordmark, .brand-mark { display: block; }
.brand-wordmark.on-dark, .brand-mark.on-dark { display: none; }
[data-theme="dark"] .brand-wordmark.on-light,
[data-theme="dark"] .brand-mark.on-light { display: none; }
[data-theme="dark"] .brand-wordmark.on-dark,
[data-theme="dark"] .brand-mark.on-dark  { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto 0 32px;
}
.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { color: var(--primary); background: var(--primary-soft); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.nav-btn:hover { border-color: var(--text-muted); color: var(--text); }

.nav-btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.nav-btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-family: inherit;
  padding: 0;
  transition: box-shadow 0.15s, transform 0.1s;
}
.nav-avatar:hover { box-shadow: 0 0 0 3px var(--primary-soft); }
.nav-avatar:focus-visible { outline: none; box-shadow: var(--ring); }

/* ── Profile dropdown ─────────────────────────────────────── */
.nav-profile {
  position: relative;
  display: inline-flex;
}
.nav-profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
  z-index: 1000;
}
.nav-profile.open .nav-profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
}
.nav-profile-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.nav-profile-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.nav-profile-email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.nav-profile-item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  text-align: left;
  transition: background 0.1s;
}
.nav-profile-item:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.nav-profile-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.nav-profile-danger { color: var(--danger); }
.nav-profile-danger:hover {
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

@media (max-width: 640px) {
  .nav-profile-dropdown {
    position: fixed;
    left: 8px;
    right: 8px;
    top: calc(var(--nav-height) + 4px);
    min-width: 0;
  }
}

/* ── Theme toggle (in nav) ─────────────────────────────────── */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
  line-height: 1;
}
.theme-toggle:hover { border-color: var(--text-muted); color: var(--text); }
.theme-toggle .sun  { display: inline; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun  { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: inline; }

/* ── Accent picker (in nav) ───────────────────────────────── */
.accent-picker { position: relative; display: inline-block; }
.accent-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--primary);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  padding: 0;
  box-shadow: inset 0 0 0 2px var(--surface);
}
.accent-toggle:hover { transform: scale(1.06); border-color: var(--text-muted); }
.accent-picker.open .accent-toggle { box-shadow: var(--ring), inset 0 0 0 2px var(--surface); }

.accent-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 10px;
  display: none;
  grid-template-columns: repeat(3, 28px);
  gap: 8px;
  z-index: 60;
}
.accent-picker.open .accent-menu { display: grid; }
.accent-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--swatch, #888);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, border-color 0.12s;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.accent-swatch:hover { transform: scale(1.12); }
.accent-swatch.active { border-color: var(--text); }

/* ============================================================
   SHARED FOOTER
   ============================================================ */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: auto;
}
.footer-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
}
.footer-logo span { color: var(--primary); }
.footer-logo .brand-wordmark { height: 22px; width: auto; }

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }

.footer-copy { font-size: 12px; color: var(--text-faint); }

/* ============================================================
   LANDING PAGE  (marketing — kept similar)
   ============================================================ */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  padding: 80px 28px 72px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 9999px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.08;
  color: var(--text);
  max-width: 680px;
  margin: 0 auto 20px;
}
.hero h1 span { color: var(--primary); }
.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-hero-primary {
  padding: 14px 32px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s, box-shadow 0.15s;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-hero-primary:hover  { background: var(--primary-hover); box-shadow: var(--shadow-md); }
.btn-hero-primary:active { transform: scale(0.98); }

.btn-hero-secondary {
  padding: 14px 28px;
  border-radius: 14px;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-hero-secondary:hover { border-color: var(--text-muted); color: var(--text); }

.hero-note { margin-top: 20px; font-size: 12px; color: var(--text-faint); }

/* Features */
.features {
  padding: 72px 28px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}
.section-sub {
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 48px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}
.feature-card:hover { box-shadow: var(--shadow); border-color: var(--border); transform: translateY(-2px); }
.feature-icon { font-size: 28px; margin-bottom: 14px; }
.feature-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.feature-desc  { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* Pricing */
.pricing {
  padding: 72px 28px;
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.pricing-inner { max-width: 1100px; margin: 0 auto; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 48px;
}
.plan-card {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px 32px;
  position: relative;
  transition: box-shadow 0.15s, transform 0.15s;
}
.plan-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.plan-card.popular {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 9999px;
  border: 1.5px solid var(--primary);
  white-space: nowrap;
}
.plan-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.plan-card.popular .plan-name { color: rgba(255, 255, 255, 0.78); }

.plan-price {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.plan-card.popular .plan-price { color: #fff; }
.plan-price sup {
  font-size: 20px;
  font-weight: 700;
  vertical-align: super;
  letter-spacing: 0;
}
.plan-period { font-size: 12px; color: var(--text-faint); margin-bottom: 24px; }
.plan-card.popular .plan-period { color: rgba(255, 255, 255, 0.65); }

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.plan-features li {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}
.plan-card.popular .plan-features li { color: rgba(255, 255, 255, 0.88); }
.plan-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}
.plan-card.popular .plan-features li::before { color: rgba(255, 255, 255, 0.95); }

.plan-cta {
  display: block;
  width: 100%;
  padding: 11px 0;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.plan-cta-outline {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
}
.plan-cta-outline:hover { border-color: var(--primary); color: var(--primary); }
.plan-cta-primary { background: #fff; color: var(--primary); }
.plan-cta-primary:hover { background: rgba(255, 255, 255, 0.92); }

.plan-foot-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 28px;
}

/* ============================================================
   AUTH PAGES (login + signup)
   ============================================================ */
.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: calc(100vh - var(--nav-height));
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-md);
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-align: center;
  padding: 8px 14px;
  width: fit-content;
}
.auth-logo span { color: var(--primary); }
.auth-logo .brand-wordmark { height: 32px; width: auto; }
.auth-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* Signup multi-step */
.signup-wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px 60px;
  min-height: calc(100vh - var(--nav-height));
}
.signup-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-md);
}
.step-panel { display: none; }
.step-panel.active { display: block; }
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}
.step-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.step-title { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 20px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.spotify-confirmed {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--success-soft);
  border: 1px solid var(--success);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 8px;
}
.spotify-confirmed img { width: 32px; height: 32px; border-radius: 50%; }
.spotify-confirmed-text { font-size: 13px; font-weight: 600; color: var(--success); }

.ai-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 8px;
}
.ai-option:hover { border-color: var(--primary); }
.ai-option.selected { border-color: var(--primary); background: var(--primary-soft); }
.ai-option input { margin-top: 2px; accent-color: var(--primary); }
.ai-option-text strong { font-size: 13px; font-weight: 600; display: block; margin-bottom: 2px; }
.ai-option-text span  { font-size: 12px; color: var(--text-muted); }

.terms-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 16px;
}

/* ── Form fields ─────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.field-label .required { color: var(--danger); margin-left: 2px; }
.field-label .hint { font-weight: 400; color: var(--text-faint); margin-left: 6px; }

.field-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}
.field-input::placeholder { color: var(--text-faint); }
.field-input.error { border-color: var(--danger); }

select.field-input { cursor: pointer; }
textarea.field-input { resize: vertical; min-height: 80px; line-height: 1.5; }

.field-error { font-size: 11px; color: var(--danger); margin-top: 2px; }
.field-help  { font-size: 11px; color: var(--text-faint); margin-top: 2px; line-height: 1.5; }

/* ── Toggle switch ──────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.toggle-label { font-size: 13px; font-weight: 500; color: var(--text); }
.toggle-sub   { font-size: 12px; color: var(--text-muted); }

.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-track { background: var(--primary); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(18px); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  padding: 11px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: var(--shadow); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }

.btn-secondary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-secondary:hover:not(:disabled) { background: var(--border-soft); color: var(--text); }

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.btn-danger:hover:not(:disabled) { background: var(--danger); color: #fff; }

.btn-full { width: 100%; }
.btn-sm   { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg   { padding: 14px 28px; font-size: 15px; }

/* ── Alert / banner ──────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.alert-error   { background: var(--danger-soft);  color: var(--danger);  border: 1px solid var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid var(--success); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid var(--warning); }
.alert-info    { background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary); }

/* ── Divider ────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-faint);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.auth-footer-link {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 20px;
}
.auth-footer-link a { color: var(--primary); font-weight: 600; }

/* ── Step indicator ─────────────────────────────────────── */
.steps-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
}
.step-dot.active  { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.step-dot.done    { border-color: var(--success); background: var(--success); color: #fff; }
.step-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 0.2s;
  margin: 0 4px;
}
.step-connector.done { background: var(--success); }

/* ── 2FA code input ─────────────────────────────────────── */
.code-input {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}
.code-digit {
  width: 48px;
  height: 56px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  caret-color: var(--primary);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.code-digit:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}

/* ── Spinner ────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Spotify search results ─────────────────────────────── */
.spotify-results {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
  background: var(--surface);
}
.spotify-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border-soft);
}
.spotify-result-item:last-child { border-bottom: none; }
.spotify-result-item:hover { background: var(--surface-2); }
.spotify-result-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.spotify-result-name { font-size: 13px; font-weight: 600; color: var(--text); }
.spotify-result-followers { font-size: 11px; color: var(--text-faint); }

/* ============================================================
   UPLOAD PAGE
   ============================================================ */
.upload-page-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.upgrade-banner {
  background: var(--primary-soft);
  border-bottom: 1px solid var(--primary);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--primary);
}
.upgrade-banner strong { font-weight: 700; }
.upgrade-banner a {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: background 0.15s;
}
.upgrade-banner a:hover { background: var(--primary-hover); }

.yt-connect-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.yt-status-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 9999px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
}
.yt-status-tag.ok  { color: var(--success); background: var(--success-soft); border-color: transparent; }
.yt-status-tag.err { color: var(--danger);  background: var(--danger-soft);  border-color: transparent; }

.connect-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.08s;
  box-shadow: var(--shadow-sm);
}
.connect-btn:hover  { background: var(--primary-hover); }
.connect-btn:active { transform: scale(0.98); }
.connect-btn.connected { background: var(--success-soft); color: var(--success); }
.connect-btn.connected:hover { background: var(--success); color: #fff; }

.main {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 20px;
  padding: 20px;
}

.left-panel,
.right-panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.left-panel  { width: 340px; min-width: 340px; gap: 22px; }
.right-panel { flex: 1; }

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color 0.15s, background 0.15s;
}
.drop-zone:hover, .drop-zone.over {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.drop-zone-icon { font-size: 32px; margin-bottom: 8px; color: var(--primary); }
.drop-zone p    { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.drop-zone strong { color: var(--text); font-weight: 600; }

/* Privacy toggle */
.privacy-row { display: flex; gap: 6px; }
.priv-opt {
  flex: 1;
  padding: 9px 0;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.priv-opt:hover { border-color: var(--primary); color: var(--text); }
.priv-opt.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* Track list */
.panel-header { display: flex; align-items: center; justify-content: space-between; }
.track-count-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 9999px;
}

.track-list { display: flex; flex-direction: column; gap: 10px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 20px;
  border: 2px dashed var(--border);
  border-radius: 14px;
  gap: 12px;
  margin-top: 10px;
  background: var(--surface-2);
}
.empty-icon { font-size: 44px; color: var(--text-faint); }
.empty-text { font-size: 13px; color: var(--text-muted); text-align: center; line-height: 1.7; }

.track-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.track-item:hover    { border-color: var(--border); box-shadow: var(--shadow-sm); }
.track-item.uploading{ border-color: var(--primary); background: var(--primary-soft); }
.track-item.done     { border-color: var(--success); background: var(--success-soft); }
.track-item.error    { border-color: var(--danger);  background: var(--danger-soft); }

.track-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.track-art {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1.5px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  transition: border-color 0.15s, opacity 0.15s;
}
.track-art:hover { border-color: var(--primary); opacity: 0.92; }
.track-art img   { width: 100%; height: 100%; object-fit: cover; display: block; }

.track-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.track-name {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  width: 100%;
  padding: 0;
}
.track-name:focus { outline: none; }
.track-desc {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  width: 100%;
  padding: 0;
}
.track-desc:focus   { outline: none; color: var(--text); }
.track-desc::placeholder { color: var(--text-faint); }

.track-progress { margin-top: 8px; }
.track-prog-bar { height: 4px; background: var(--border-soft); border-radius: 9999px; overflow: hidden; }
.track-prog-fill { height: 100%; background: var(--primary); border-radius: 9999px; transition: width 0.3s; width: 0%; }
.track-prog-label { font-size: 11px; color: var(--text-muted); margin-top: 5px; }

.track-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  margin-top: 4px;
}
.track-link:hover { text-decoration: underline; }

.track-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.track-dot.ready     { background: var(--text-faint); }
.track-dot.uploading { background: var(--primary); animation: blink 0.8s infinite; }
.track-dot.done      { background: var(--success); }
.track-dot.error     { background: var(--danger); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.35} }

.remove-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}
.remove-btn:hover { color: var(--danger); background: var(--danger-soft); }

/* Bottom bar */
.bottom-bar {
  padding: 16px 28px;
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  bottom: 0;
}
.progress-wrap { flex: 1; }
.progress-bg { height: 5px; background: var(--border-soft); border-radius: 9999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 9999px; transition: width 0.4s ease; width: 0%; }
.progress-text { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.btn-row { display: flex; gap: 10px; align-items: center; }
.clear-btn {
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.clear-btn:hover { background: var(--border-soft); color: var(--text); }

.upload-btn {
  padding: 11px 28px;
  border-radius: var(--radius);
  background: var(--primary);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.08s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
.upload-btn:hover   { background: var(--primary-hover); box-shadow: var(--shadow); }
.upload-btn:active  { transform: scale(0.98); }
.upload-btn:disabled { background: var(--border); color: var(--text-faint); cursor: not-allowed; box-shadow: none; }

/* Playlist banner */
.playlist-banner {
  background: var(--success-soft);
  border: 1px solid var(--success);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.playlist-banner p { font-size: 13px; font-weight: 600; color: var(--success); }
.playlist-banner a {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--success);
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: opacity 0.15s;
}
.playlist-banner a:hover { opacity: 0.9; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.modal-icon { font-size: 40px; margin-bottom: 16px; }
.modal-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 8px; letter-spacing: -0.5px; }
.modal-body  { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* ============================================================
   SETTINGS / MISC PAGE HEADER
   ============================================================ */
.dashboard-page {
  flex: 1;
  padding: 32px 28px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.page-header {
  padding: 28px 28px 0;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.page-sub { font-size: 14px; color: var(--text-muted); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 28px 60px;
  gap: 24px;
}

.dash-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border-soft);
  margin-bottom: 4px;
}
.dash-tab {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s;
  font-family: inherit;
}
.dash-tab:hover { color: var(--text); }
.dash-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.dash-tab-panel { display: none; }
.dash-tab-panel.active { display: block; }

/* Summary cards */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.15s;
}
.summary-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.summary-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.summary-card-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.summary-card-sub { font-size: 12px; color: var(--text-faint); }
.summary-card.highlight {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.summary-card.highlight .summary-card-value { color: var(--primary); }

/* Tables */
.data-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.data-table-title { font-size: 13px; font-weight: 700; color: var(--text); }

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 10px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
}
table.data-table td {
  font-size: 13px;
  color: var(--text);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--surface-2); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge-live       { background: var(--success-soft); color: var(--success); }
.badge-processing { background: var(--primary-soft); color: var(--primary); }
.badge-scheduled  { background: rgba(124, 58, 237, 0.14); color: #7c3aed; }
[data-theme="dark"] .badge-scheduled { color: #a78bfa; }
.badge-draft      { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-rejected   { background: var(--danger-soft); color: var(--danger); }
.badge-takedown   { background: var(--text); color: var(--bg); }
.badge-done       { background: var(--success-soft); color: var(--success); }
.badge-failed     { background: var(--danger-soft); color: var(--danger); }
.badge-pending    { background: var(--warning-soft); color: var(--warning); }

/* Empty state */
.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
  gap: 12px;
  text-align: center;
}
.dash-empty-icon { font-size: 40px; }
.dash-empty-title { font-size: 16px; font-weight: 700; color: var(--text); }
.dash-empty-sub   { font-size: 13px; color: var(--text-muted); max-width: 360px; line-height: 1.6; }

/* Catalog-first welcome (new users with 0 releases) */
.overview-welcome {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 64px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.overview-welcome-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 640px;
  line-height: 1.15;
}
.overview-welcome-sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 540px;
  line-height: 1.55;
  margin-bottom: 6px;
}
.overview-welcome-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}
.overview-welcome-features {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
}
.overview-welcome-feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.overview-welcome-feature span { font-size: 16px; }
@media (max-width: 540px) {
  .overview-welcome { padding: 40px 18px; }
  .overview-welcome-title { font-size: 24px; }
  .overview-welcome-sub { font-size: 14px; }
}

/* Library tip banner (dismissible, appears once) */
.library-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-soft);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}
.library-tip-icon { font-size: 16px; flex-shrink: 0; }
.library-tip-text { flex: 1; line-height: 1.4; }
.library-tip-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background 0.1s, color 0.1s;
}
.library-tip-close:hover { background: var(--surface); color: var(--text); }

/* Release row */
.release-title-cell { display: flex; align-items: center; gap: 12px; }
.release-cover {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  object-fit: cover;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text-faint);
}
.release-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.release-name { font-size: 13px; font-weight: 700; color: var(--text); }
.release-meta { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* Rejection inline */
.rejection-inline {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--danger);
  line-height: 1.5;
}
.rejection-inline strong { display: block; margin-bottom: 4px; }

/* Track status list */
.track-status-list { display: flex; flex-direction: column; gap: 6px; }
.track-status-row  { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.track-status-name { flex: 1; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Banners */
.payout-failed-banner {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.payout-failed-banner .banner-icon { font-size: 20px; flex-shrink: 0; }
.payout-failed-banner .banner-text { flex: 1; font-size: 13px; color: var(--danger); }
.payout-failed-banner .banner-text strong { display: block; font-size: 14px; margin-bottom: 2px; }

.rename-banner {
  background: var(--warning-soft);
  border: 1px solid var(--warning);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--warning);
}

/* Earnings */
.earnings-total { font-size: 36px; font-weight: 800; letter-spacing: -1px; color: var(--text); }
.earnings-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.source-bar {
  height: 8px;
  border-radius: 9999px;
  background: var(--border-soft);
  overflow: hidden;
  margin: 6px 0;
}
.source-bar-fill { height: 100%; border-radius: 9999px; }
.bar-labelgrid { background: var(--primary); }
.bar-youtube   { background: var(--danger); }

/* Admin locked */
.admin-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
  text-align: center;
}
.admin-locked-icon { font-size: 40px; }
.admin-locked h3 { font-size: 18px; font-weight: 800; }
.admin-locked p { font-size: 14px; color: var(--text-muted); max-width: 360px; line-height: 1.6; }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-layout {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 28px 60px;
}
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.settings-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.connected-account-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.connected-account-row:last-child { border-bottom: none; }
.connected-account-icon { font-size: 22px; width: 32px; text-align: center; flex-shrink: 0; }
.connected-account-info { flex: 1; }
.connected-account-name { font-size: 13px; font-weight: 600; }
.connected-account-status { font-size: 12px; color: var(--text-muted); }
.danger-zone {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.danger-zone .settings-section-title { color: var(--danger); border-color: var(--danger); }

/* ============================================================
   RELEASE DETAIL
   ============================================================ */
.release-detail-layout {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 28px 60px;
}
.release-detail-hero {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.release-detail-cover {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.release-detail-info h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px; }
.release-detail-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}
.release-detail-meta span::before { content: '·'; margin-right: 16px; }
.release-detail-meta span:first-child::before { content: ''; margin-right: 0; }

/* ============================================================
   DISTRIBUTION (release/new)
   ============================================================ */
.dist-layout {
  flex: 1;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 28px 80px;
}

.dist-step-header { margin-bottom: 28px; text-align: center; }
.dist-step-header h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.dist-step-header p { font-size: 14px; color: var(--text-muted); }

.dist-step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}
.dist-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.dist-step-dot.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.dist-step-dot.done   { border-color: var(--success); background: var(--success); color: #fff; }
.dist-step-connector {
  width: 36px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.2s;
}
.dist-step-connector.done { background: var(--success); }

.dist-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.dist-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

.dist-cover-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  background: var(--surface-2);
}
.dist-cover-zone:hover,
.dist-cover-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.dist-cover-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dist-cover-zone .cover-preview {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto 12px;
  display: block;
  box-shadow: var(--shadow);
}
.dist-cover-zone .cover-placeholder {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}
.dist-cover-zone .cover-hint {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.dist-cover-zone .cover-filename {
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  margin-top: 8px;
}

.dist-track-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.dist-track-card {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
}
.dist-track-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  user-select: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}
.dist-track-card-header:hover { background: var(--surface-2); }
.dist-track-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dist-track-card-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.dist-track-card-status { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.dist-track-card-body {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dist-track-card-body .field-group { margin-bottom: 0; }
.dist-track-card-body .full-width { grid-column: 1 / -1; }

.dist-track-audio-drop {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.dist-track-audio-drop:hover { border-color: var(--primary); background: var(--primary-soft); }
.dist-track-audio-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dist-track-audio-drop .audio-icon { font-size: 20px; flex-shrink: 0; }
.dist-track-audio-drop .audio-label { font-size: 13px; color: var(--text-muted); }
.dist-track-audio-drop .audio-filename { font-size: 12px; font-weight: 600; color: var(--success); }

.dist-track-move-btns { display: flex; gap: 4px; flex-shrink: 0; }
.dist-track-move-btns button {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text-muted);
}
.dist-track-move-btns button:hover { border-color: var(--primary); color: var(--primary); }

.dist-add-track-btn {
  width: 100%;
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: transparent;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.dist-add-track-btn:hover { border-color: var(--primary); background: var(--primary-soft); }

.dist-disclaimer-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-muted);
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 16px;
  font-family: inherit;
}

.dist-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.dist-consent-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.dist-consent-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  line-height: 1.5;
}

.dist-progress-list { display: flex; flex-direction: column; gap: 10px; }

.dist-progress-track {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.dist-progress-track-info { flex: 1; min-width: 0; }
.dist-progress-track-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dist-progress-track-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.dist-progress-status { font-size: 12px; font-weight: 600; flex-shrink: 0; }
.dist-progress-status.pending    { color: var(--text-faint); }
.dist-progress-status.processing { color: var(--warning); }
.dist-progress-status.done       { color: var(--success); }
.dist-progress-status.failed     { color: var(--danger); }

.dist-overall-status {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}
.dist-overall-status.done   { color: var(--success); }
.dist-overall-status.failed { color: var(--danger); }

/* ============================================================
   SUBSCRIBE PAGES
   ============================================================ */
.sub-layout {
  flex: 1;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  padding: 48px 28px 80px;
}
.sub-header { text-align: center; margin-bottom: 48px; }
.sub-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.7px;
  margin-bottom: 10px;
}
.sub-header p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}
.sub-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.sub-plan-card {
  background: var(--surface);
  border: 2px solid var(--border-soft);
  border-radius: 20px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.sub-plan-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.sub-plan-card.popular {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.sub-plan-card.current-plan {
  border-color: var(--success);
  background: var(--success-soft);
}
.sub-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.sub-plan-name {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.sub-plan-price {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 4px;
}
.sub-plan-price span {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}
.sub-plan-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.sub-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.sub-plan-features li {
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}
.sub-plan-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}
.sub-plan-btn {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  font-family: inherit;
}
.sub-plan-btn:hover { opacity: 0.88; }
.sub-plan-btn.primary { background: var(--primary); color: #fff; }
.sub-plan-btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.sub-plan-btn.current { background: var(--success-soft); color: var(--success); border: 1px solid var(--success); cursor: default; }
.sub-plan-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.sub-free-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.sub-billing-note {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}
.sub-billing-note strong { color: var(--text); }
.sub-error {
  text-align: center;
  color: var(--danger);
  font-size: 13px;
  margin-top: 16px;
  min-height: 20px;
}

/* ── Downgrade-to-Free confirmation modal ─────────────────── */
.downgrade-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: downgrade-fade-in 0.15s ease-out;
}
@keyframes downgrade-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.downgrade-modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: downgrade-pop 0.18s ease-out;
}
@keyframes downgrade-pop {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.downgrade-modal-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 22px; font-weight: 800;
  display: inline-flex;
  align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.downgrade-modal-card h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
  margin-bottom: 10px;
  color: var(--text);
}
.downgrade-modal-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.downgrade-modal-actions {
  display: flex; gap: 10px;
  justify-content: center;
  margin-top: 22px;
  flex-wrap: wrap;
}
.downgrade-modal-actions .btn { min-width: 120px; }

/* ── Upload page: free-plan upgrade gate ───────────────────── */
.upload-gate {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 28px;
}
.upload-gate-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 44px 32px;
  box-shadow: var(--shadow);
}
.upload-gate-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 28px;
  display: inline-flex;
  align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.upload-gate-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: var(--text);
}
.upload-gate-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 22px;
}
.upload-gate-cta {
  min-width: 180px;
}

/* ── Dashboard: free-plan walls ─────────────────────────────── */
.free-hero {
  text-align: center;
  padding: 56px 28px 40px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
}
.free-hero-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 10px;
  color: var(--text);
  line-height: 1.15;
}
.free-hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.6;
  margin: 0 auto 22px;
}
.free-hero-cta { padding: 12px 26px; font-size: 14px; min-width: 240px; }

.free-feature-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 28px;
  font-size: 13px;
  color: var(--text-muted);
}
.free-feature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.free-feature span { font-size: 18px; }

.free-divider {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 16px 0 14px;
}

.free-locked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.free-locked-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  transition: border-color 0.15s, transform 0.15s;
}
.free-locked-card:hover {
  border-color: var(--border);
  transform: translateY(-1px);
}
.free-locked-icon { font-size: 22px; margin-bottom: 10px; }
.free-locked-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.free-locked-lock { font-size: 11px; opacity: 0.7; cursor: help; }
.free-locked-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}
.free-locked-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 9999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.free-wall {
  text-align: center;
  padding: 64px 28px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  margin: 0 auto;
}
.free-wall-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
  color: var(--text);
}
.free-wall-sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.6;
  margin: 0 auto 22px;
}

/* Centered status pages (subscribe-success, subscribe-cancel) */
.center-status {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 28px;
  text-align: center;
  gap: 16px;
}
.center-status-icon { font-size: 48px; margin-bottom: 4px; }
.center-status-icon.success-check {
  width: 64px; height: 64px;
  font-size: 36px;
  color: #fff;
  background: var(--success, #16a34a);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  box-shadow: 0 6px 20px rgba(22,163,74,0.30);
  font-weight: 800;
  line-height: 1;
}
.center-status h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.center-status p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 400px;
  line-height: 1.7;
  margin: 0 auto;
}
.center-status-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ============================================================
   TERMS PAGE
   ============================================================ */
.terms-page {
  flex: 1;
  padding: 40px 28px 60px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
.terms-page h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.terms-page .meta { font-size: 13px; color: var(--text-faint); margin-bottom: 40px; }
.terms-page h2 { font-size: 18px; font-weight: 700; margin: 32px 0 10px; color: var(--text); }
.terms-page h3 { font-size: 15px; font-weight: 700; margin: 20px 0 8px; color: var(--text-muted); }
.terms-page p  { font-size: 14px; line-height: 1.8; color: var(--text-muted); margin-bottom: 12px; }
.terms-page ul { font-size: 14px; line-height: 1.8; color: var(--text-muted); margin: 0 0 12px 20px; }
.terms-page li { margin-bottom: 4px; }
.terms-page .meta a,
.terms-page p a,
.terms-page ul a { color: var(--primary); }
.terms-divider {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 40px 0;
}
.toc {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 40px;
}
.toc strong {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.toc-list { margin-top: 10px; }
.toc-list a {
  display: block;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 6px;
}
.toc-list a:hover { text-decoration: underline; }

/* ============================================================
   ADMIN ANALYTICS — KPIs, bar charts, sparkline, leaderboards, feed
   ============================================================ */

/* ── Section heading ─────────────────────────────────────────── */
.adm-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.adm-section + .adm-section { margin-top: 28px; }

/* ── KPI grid (compact) ──────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.kpi-card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.kpi-card-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.kpi-card-sub {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.4;
}
.kpi-card.success .kpi-card-value { color: var(--success); }
.kpi-card.danger  .kpi-card-value { color: var(--danger);  }
.kpi-card.warning .kpi-card-value { color: var(--warning); }
.kpi-card.primary .kpi-card-value { color: var(--primary); }

/* ── Two-column / three-column section grid ──────────────────── */
.adm-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.adm-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.adm-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px 18px 18px;
  box-shadow: var(--shadow-sm);
}
.adm-card-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.adm-card-title .adm-card-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0;
}

/* ── Horizontal bar chart row ────────────────────────────────── */
.bar-list { display: flex; flex-direction: column; gap: 9px; }
.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 56px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.bar-row-label {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-row-track {
  height: 8px;
  background: var(--surface-2);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
.bar-row-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width 0.4s ease;
  min-width: 2px;
}
.bar-row-fill.success { background: var(--success); }
.bar-row-fill.danger  { background: var(--danger);  }
.bar-row-fill.warning { background: var(--warning); }
.bar-row-fill.muted   { background: var(--text-faint); }
.bar-row-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── Sparkline / vertical bar timeline ───────────────────────── */
.spark-wrap { padding-top: 4px; }
.spark-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 80px;
  padding: 4px 0 6px;
}
.spark-bar {
  flex: 1;
  background: var(--primary-soft);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: background 0.15s, height 0.4s ease;
  min-height: 2px;
  cursor: default;
}
.spark-bar:hover { background: var(--primary); }
.spark-bar::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--text);
  color: var(--surface);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 5;
}
.spark-bar:hover::after { opacity: 1; }
.spark-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* ── Leaderboard rows ────────────────────────────────────────── */
.lb-list { display: flex; flex-direction: column; gap: 6px; }
.lb-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.lb-row:hover { border-color: var(--primary); background: var(--primary-soft); }
.lb-rank {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.lb-row.top1 .lb-rank { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.lb-row.top2 .lb-rank { background: #e2e8f0; color: #475569; border-color: #cbd5e1; }
.lb-row.top3 .lb-rank { background: #fed7aa; color: #9a3412; border-color: #fdba74; }
.lb-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.lb-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.lb-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.lb-value-sub {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 2px;
  text-align: right;
}

/* ── Feed (release log / track log / signups) ────────────────── */
.feed-list { display: flex; flex-direction: column; gap: 6px; }
.feed-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.15s;
  cursor: pointer;
}
.feed-item:hover { border-color: var(--border); }
.feed-cover {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-faint);
  overflow: hidden;
}
.feed-cover img { width: 100%; height: 100%; object-fit: cover; }
.feed-main { min-width: 0; }
.feed-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-sub a { color: var(--primary); font-weight: 600; }
.feed-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.feed-time {
  font-size: 10px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.feed-toggle-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* ── Profile modal (admin-only big modal) ────────────────────── */
.profile-modal-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 0;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}
.profile-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.profile-modal-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-modal-id {
  flex: 1;
  min-width: 0;
}
.profile-modal-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-modal-email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-modal-close {
  background: var(--surface-2);
  border: 1px solid var(--border);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-family: inherit;
}
.profile-modal-close:hover { background: var(--border-soft); color: var(--text); }
.profile-modal-body {
  padding: 18px 24px 24px;
  overflow-y: auto;
  flex: 1;
}
.profile-section { margin-bottom: 22px; }
.profile-section:last-child { margin-bottom: 0; }
.profile-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.profile-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 16px;
  font-size: 12px;
}
.profile-fact-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.profile-fact-value {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}

.profile-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
  margin-top: 4px;
}
.profile-tag.danger  { background: var(--danger-soft);  color: var(--danger);  border-color: transparent; }
.profile-tag.success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.profile-tag.warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.profile-tag.primary { background: var(--primary-soft); color: var(--primary); border-color: transparent; }

/* Note callout (used for "listener geo" placeholder etc.) */
.adm-note {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.adm-note strong { color: var(--text); }

/* ============================================================
   Phase 9 — Add-on cards (release/new.html step 3)
   ============================================================ */
.addon-list {
  display: flex;
  flex-direction: column;
}
.addon-card {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background .15s;
}
.addon-card:last-child { border-bottom: none; }
.addon-card:hover { background: var(--surface-2); }
.addon-card.addon-checked { background: var(--primary-soft); }
.addon-card.addon-disabled { opacity: 0.55; cursor: not-allowed; }
.addon-card.addon-disabled:hover { background: transparent; }
.addon-card .addon-cb {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
}
.addon-body { flex: 1; min-width: 0; }
.addon-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.addon-name { font-size: 14px; font-weight: 700; color: var(--text); }
.addon-price { font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.addon-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.addon-locked {
  margin-top: 6px;
  font-size: 11px;
  color: var(--warning);
  font-weight: 600;
}
.addon-total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface-2);
  border-top: 1px solid var(--border-soft);
}
.addon-total {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

/* ============================================================
   Phase 10 — Smart link public page (/s/:slug)
   ============================================================ */
.smart-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}
.smart-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.08);
  text-align: center;
}
.smart-art {
  width: 200px;
  height: 200px;
  border-radius: 14px;
  background: var(--surface-2);
  margin: 0 auto 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: var(--text-faint);
}
.smart-art img { width: 100%; height: 100%; object-fit: cover; }
.smart-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.4px; }
.smart-artist { font-size: 14px; color: var(--text-muted); margin-bottom: 22px; }
.smart-dsps { display: flex; flex-direction: column; gap: 8px; }
.smart-dsp-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: all .15s;
}
.smart-dsp-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  transform: translateY(-1px);
}
.smart-dsp-btn .arrow { color: var(--primary); }
.smart-presave {
  margin-top: 18px;
  padding: 16px;
  background: var(--primary-soft);
  border-radius: 12px;
  border: 1px solid var(--primary);
}
.smart-presave-title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.smart-foot {
  margin-top: 22px;
  font-size: 11px;
  color: var(--text-faint);
}
.smart-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 4px 10px;
  background: var(--success-soft);
  color: var(--success);
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
}

/* ============================================================
   Phase 12 — Download gate public page (/g/:slug)
   ============================================================ */
.gate-page { min-height: 100vh; display:flex; align-items:center; justify-content:center; padding:32px 16px; background: var(--surface-2); }
.gate-card { max-width: 440px; width:100%; background: var(--surface); border:1px solid var(--border); border-radius:16px; padding:26px; text-align:center; box-shadow:0 12px 30px rgba(0,0,0,.06); }
.gate-card h1 { font-size:20px; margin-bottom:6px; }
.gate-card p { font-size:13px; color: var(--text-muted); margin-bottom:14px; }
.gate-action-btn {
  display:block; width:100%; padding:13px;
  background: var(--primary); color:#fff; border:none; border-radius:10px;
  font-size:14px; font-weight:700; cursor:pointer; margin-top:10px; text-decoration:none;
}
.gate-action-btn:hover { background: #0660d4; }
.gate-success { padding:20px; background: var(--success-soft); color:var(--success); border-radius:10px; font-weight:700; }

/* ============================================================
   Phase 14 — Royalty splits editor (in track step)
   ============================================================ */
.splits-section { padding:14px; background: var(--surface-2); border-radius:10px; margin-top:14px; border:1px solid var(--border-soft); }
.splits-section h3 { font-size:13px; font-weight:700; margin-bottom:6px; }
.split-row { display:grid; grid-template-columns: 1.4fr 1.4fr 1fr 70px 30px; gap:8px; margin-bottom:8px; align-items:center; }
.split-row input, .split-row select { font-size:12px; padding:7px 10px; }
.split-row .remove-split {
  background:transparent; border:none; color: var(--danger); font-size:18px; cursor:pointer;
}
.split-row .remove-split:hover { color:#a52221; }
.splits-total {
  font-size:12px; font-weight:700; padding:8px 10px;
  border-radius:8px; margin-top:6px;
  background: var(--surface);
}
.splits-total.invalid { background: var(--danger-soft); color: var(--danger); }
.splits-total.valid   { background: var(--success-soft); color: var(--success); }

/* ============================================================
   Phase 16 — Artist Development Score
   ============================================================ */
.score-card {
  background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
  color: #fff; border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 16px;
}
.score-card .score-headline { display:flex; justify-content:space-between; align-items:center; }
.score-card .score-num { font-size: 56px; font-weight: 900; letter-spacing: -2px; line-height:1; }
.score-card .score-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; opacity: 0.85; }
.score-card .score-delta {
  display:inline-flex; align-items:center; gap:4px;
  padding:4px 10px; border-radius:9999px;
  background: rgba(255,255,255,0.18);
  font-size:12px; font-weight:700;
}
.score-card .score-delta.down { background: rgba(255,255,255,0.18); }
.score-card .score-tip { margin-top: 14px; font-size: 13px; opacity: 0.9; }

.score-breakdown { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 18px; }
.score-bd-item { background: rgba(255,255,255,0.12); padding: 10px 12px; border-radius: 8px; font-size: 12px; }
.score-bd-label { opacity: 0.85; }
.score-bd-pts { font-weight:700; font-size:14px; margin-top:2px; }

.score-history-chart {
  height: 130px; display:flex; align-items:flex-end; gap:6px;
  padding: 14px 12px; background: var(--surface-2); border-radius: 12px; border:1px solid var(--border-soft);
  margin-top: 12px;
}
.score-bar { flex: 1; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 4px; transition: height .3s; }
.score-bar:hover { background: var(--primary); opacity: 0.85; }

/* ============================================================
   Phase 16 v2 — Artist Development Score (rewritten)
   ============================================================ */

.score-card-v2 {
  position: relative;
  border-radius: 18px;
  padding: 22px 24px 20px;
  margin-bottom: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,0.18) 0%, transparent 38%),
    radial-gradient(circle at 88% 100%, rgba(7,120,250,0.45) 0%, transparent 50%),
    linear-gradient(135deg, #0a0e1a 0%, #131a2c 60%, #1a2342 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 12px 36px rgba(7, 12, 28, 0.22),
    0 2px 8px rgba(7, 12, 28, 0.10);
  overflow: hidden;
}
.score-card-v2::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.04) 100%);
  pointer-events: none;
}

/* Tier accents — soft halo behind the ring */
.score-card-v2.tier-bronze   { background-image: radial-gradient(circle at 12% 0%, rgba(169,131,88,0.22) 0%, transparent 38%), linear-gradient(135deg, #160e08 0%, #1f1611 60%, #2b1f15 100%); }
.score-card-v2.tier-iron     { background-image: radial-gradient(circle at 12% 0%, rgba(125,133,144,0.22) 0%, transparent 38%), linear-gradient(135deg, #0e131a 0%, #161d27 60%, #1f2a3a 100%); }
.score-card-v2.tier-silver   { background-image: radial-gradient(circle at 12% 0%, rgba(196,202,214,0.22) 0%, transparent 38%), linear-gradient(135deg, #0c1320 0%, #131c2f 60%, #1c2a47 100%); }
.score-card-v2.tier-gold     { background-image: radial-gradient(circle at 12% 0%, rgba(245,197,66,0.30) 0%, transparent 40%), linear-gradient(135deg, #1a1409 0%, #251c0d 50%, #382a13 100%); }
.score-card-v2.tier-platinum { background-image: radial-gradient(circle at 12% 0%, rgba(155,231,255,0.28) 0%, transparent 42%), linear-gradient(135deg, #0a1620 0%, #0f2230 60%, #163245 100%); }
.score-card-v2.tier-diamond  { background-image: radial-gradient(circle at 12% 0%, rgba(124,91,255,0.32) 0%, transparent 44%), linear-gradient(135deg, #110a24 0%, #1d1338 60%, #2c1c52 100%); }

.score-tier-up-banner {
  background: linear-gradient(90deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  text-align: center;
  animation: score-tier-up-pop 600ms ease-out;
}
@keyframes score-tier-up-pop {
  0%   { transform: scale(0.92); opacity: 0; }
  60%  { transform: scale(1.02); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}

.score-card-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: start;
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) {
  .score-card-grid { grid-template-columns: 1fr; gap: 18px; }
  .score-ring-col  { display: flex; flex-direction: column; align-items: center; }
}

/* ── Ring column ───────────────────────────────────── */
.score-ring-col   { display: flex; flex-direction: column; gap: 12px; }
.score-ring-wrap  { position: relative; width: 180px; height: 180px; margin: 0 auto; }
.score-ring-svg   { width: 100%; height: 100%; transform: rotate(0deg); }
.score-ring-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 10; }
.score-ring-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 1s cubic-bezier(.4,0,.2,1), stroke 0.4s;
  filter: drop-shadow(0 0 6px currentColor);
}
.score-ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.score-ring-num {
  font-size: 54px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.30);
}
.score-ring-of  { font-size: 12px; opacity: 0.75; margin-top: 2px; letter-spacing: 0.04em; }

.score-tier-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  justify-content: center;
}
.score-tier-badge {
  --tier-accent: #ccc;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tier-accent) 28%, transparent), color-mix(in srgb, var(--tier-accent) 12%, transparent));
  border: 1px solid color-mix(in srgb, var(--tier-accent) 50%, transparent);
  font-weight: 700; font-size: 13px;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.score-tier-emoji { font-size: 16px; }
.score-tier-name  { color: #fff; }

.score-delta-v2 {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.10);
}
.score-delta-v2.up      { background: rgba(34,197,94,0.18);  border-color: rgba(34,197,94,0.30);  color: #b7f0c8; }
.score-delta-v2.down    { background: rgba(244,63,94,0.18);  border-color: rgba(244,63,94,0.30);  color: #ffc4cf; }
.score-delta-v2.neutral { color: rgba(255,255,255,0.85); }

.score-next-tier {
  margin-top: 4px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}
.score-next-tier-bar {
  height: 6px;
  background: rgba(255,255,255,0.10);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.score-next-tier-fill {
  height: 100%; border-radius: 9999px;
  transition: width 0.8s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 8px currentColor;
}
.score-next-tier-text { font-size: 12px; opacity: 0.92; }
.score-next-tier-text strong { font-size: 14px; font-weight: 800; }

/* ── Detail column ─────────────────────────────────── */
.score-detail-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.score-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 8px;
}
.score-stat {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}
.score-stat-num   { font-size: 18px; font-weight: 800; line-height: 1.1; }
.score-stat-num span { font-size: 11px; font-weight: 600; opacity: 0.7; margin-left: 1px; }
.score-stat-label { font-size: 10px; opacity: 0.72; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* ── Component rows ────────────────────────────────── */
.score-components { display: flex; flex-direction: column; gap: 9px; }
.score-comp {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 9px 12px;
  transition: border-color 0.2s, background 0.2s;
}
.score-comp:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.13); }
.score-comp.maxed {
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.30);
}
.score-comp-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
  font-size: 13px;
}
.score-comp-name { font-weight: 600; opacity: 0.95; }
.score-comp-check { color: #b7f0c8; font-weight: 800; margin-left: 4px; }
.score-comp-pts  { font-weight: 800; font-size: 14px; }
.score-comp-of   { font-size: 11px; font-weight: 600; opacity: 0.6; margin-left: 1px; }
.score-comp-bar  {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 9999px;
  overflow: hidden;
}
.score-comp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 8px rgba(129,140,248,0.5);
}
.score-comp.maxed .score-comp-bar-fill {
  background: linear-gradient(90deg, #34d399, #4ade80);
  box-shadow: 0 0 8px rgba(74,222,128,0.55);
}
.score-comp-hint {
  margin-top: 5px;
  font-size: 11px;
  opacity: 0.62;
  letter-spacing: 0.01em;
}

/* ── Tip block ─────────────────────────────────────── */
.score-tip-v2 {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 12px 14px;
}
.score-tip-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.score-tip-icon  { font-size: 16px; }
.score-tip-focus { font-size: 12px; font-weight: 700; opacity: 0.86; text-transform: uppercase; letter-spacing: 0.06em; }
.score-tip-body  { font-size: 13px; opacity: 0.95; line-height: 1.55; }

/* ── Achievements row ──────────────────────────────── */
.score-achievements { margin-top: 18px; }
.score-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
  margin-bottom: 8px;
}
.score-achievement-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.score-achievement {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  cursor: help;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.score-achievement:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
}
.score-achievement-emoji { font-size: 15px; line-height: 1; }
.score-achievement-name  { letter-spacing: 0.01em; }

/* ── History sparkline (v2) ────────────────────────── */
.score-history-row { margin-top: 16px; }
.score-history-chart-v2 {
  height: 64px;
  display: flex; align-items: flex-end; gap: 4px;
  padding: 8px 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.score-bar-v2 {
  flex: 1;
  position: relative;
  background: linear-gradient(180deg, rgba(129,140,248,0.95), rgba(56,189,248,0.85));
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: opacity 0.2s, transform 0.2s;
  cursor: default;
}
.score-bar-v2:hover { opacity: 0.85; transform: scaleY(1.05); transform-origin: bottom; }
.score-bar-v2 .score-bar-pop {
  position: absolute;
  bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-4px);
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.score-bar-v2:hover .score-bar-pop { opacity: 1; }

/* ── Empty / first-time state ──────────────────────── */
.score-empty-headline {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.score-empty-sub {
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* ============================================================
   Phase 13 — Content ID dashboard
   ============================================================ */
.cid-status { font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: 700; }
.cid-status.registered { background: var(--success-soft); color: var(--success); }
.cid-status.pending    { background: var(--warning-soft); color: var(--warning); }
.cid-status.disputed   { background: var(--danger-soft);  color: var(--danger); }
.cid-status.none       { background: var(--surface-2);    color: var(--text-muted); }

/* ============================================================
   Phase 17 — Geo heatmap legend
   ============================================================ */
.geo-table {
  display:grid; grid-template-columns: 24px 1fr 80px 60px;
  gap:8px; align-items:center;
  font-size:12px;
}
.geo-table > div { padding: 4px 0; }
.geo-bar { background: var(--primary); height: 8px; border-radius: 2px; }

/* ============================================================
   Cash-out balance banner (dashboard overview)
   ============================================================ */
.cashout-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(21, 128, 61, 0.25);
  position: relative;
}
.cashout-amount {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
  white-space: nowrap;
}
.cashout-text { flex: 1; min-width: 0; }
.cashout-text strong { font-size: 14px; font-weight: 700; }
.cashout-btn {
  background: #fff !important;
  color: #15803d !important;
  border: none !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
.cashout-btn:hover { background: #f0fdf4 !important; transform: translateY(-1px); }
.cashout-btn:disabled { opacity: 0.7; }
.cashout-dismiss {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 4px 8px;
}
.cashout-dismiss:hover { opacity: 1; }
@media (max-width: 600px) {
  .cashout-banner { flex-wrap: wrap; }
  .cashout-amount { font-size: 24px; }
}

/* ============================================================
   Library card track-stack (single or multi-track release)
   ============================================================ */
.library-track-stack {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.library-track-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.library-track-line.multi {
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border-soft);
}
.library-track-line-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.library-track-line audio {
  width: 100%;
  max-width: 100%;
  height: 32px;
}
.library-track-err {
  font-size: 11px;
  color: var(--danger);
}
.library-no-preview {
  font-size: 11px;
  color: var(--text-faint);
  font-style: italic;
  padding: 6px 0;
}

/* ============================================================
   Library tab — flat track grid with in-app preview
   ============================================================ */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.library-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.library-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(7, 120, 250, 0.08);
}
.library-cover {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  background: var(--surface-2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--text-faint);
  overflow: hidden;
}
.library-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.library-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.library-track-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.library-release-name {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.library-release-name a {
  color: var(--text-muted);
  text-decoration: none;
}
.library-release-name a:hover {
  color: var(--primary);
}
.library-status-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  flex-wrap: wrap;
}
.library-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   MOBILE — appended 2026-05-02
   Scoped under @media (max-width: 768px) and ≤ 480px so desktop
   layout (≥ 769px) is unchanged. Only overrides the spacing and
   layout values that overflow or cramp on small screens; colors,
   typography scale, components, and behaviour are untouched.
   ============================================================ */
@media (max-width: 768px) {
  /* Prevent horizontal scroll from any stray fixed-width child */
  html, body { max-width: 100%; overflow-x: hidden; }

  /* Nav — reduce padding + gaps so the logo, links and auth buttons fit */
  .nav { padding: 0 14px; gap: 8px; }
  .nav-logo { padding: 5px 6px; }
  .nav-logo .brand-wordmark { height: 22px; }
  .nav-links { gap: 0; margin: 0 4px 0 8px; }
  .nav-link { padding: 6px 8px; font-size: 12px; }
  .nav-actions { gap: 6px; }
  .nav-btn { padding: 6px 10px; font-size: 12px; }

  /* Landing hero — keep the design, just tighten vertical rhythm */
  .hero { padding: 48px 18px 44px; }
  .hero-eyebrow { margin-bottom: 16px; font-size: 11px; padding: 4px 12px; }
  .hero-sub { font-size: 16px; margin-bottom: 28px; }
  .hero-actions { gap: 10px; }

  /* Sections — pull in horizontal padding */
  .features, .pricing { padding: 48px 18px; }
  .pricing-grid { margin-top: 28px; }
  .section-title { font-size: 24px; }
  .section-sub { margin-bottom: 28px; }

  /* Auth + signup cards — reduce internal padding so inputs aren't squeezed */
  .auth-page { padding: 24px 12px; }
  .auth-card { padding: 24px; border-radius: 16px; }
  .signup-wrap { padding: 24px 12px 40px; }
  .signup-card { padding: 24px; border-radius: 16px; }

  /* Two-up grids that don't survive narrow widths */
  .two-col { grid-template-columns: 1fr; }
  .score-breakdown { grid-template-columns: 1fr; }

  /* Settings / dashboard / page header — match nav padding */
  .dashboard-page, .dash-layout, .page-header { padding-left: 16px; padding-right: 16px; }
  .dash-layout { padding-bottom: 40px; gap: 18px; }
  .page-title { font-size: 22px; }

  /* Tab strips — let them scroll horizontally rather than wrap */
  .dash-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .dash-tabs::-webkit-scrollbar { display: none; }
  .dash-tab { white-space: nowrap; padding: 10px 14px; }

  /* KPI grid — tighter minmax so two columns fit on a phone */
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
  .kpi-card { padding: 12px 12px 14px; }
  .kpi-card-value { font-size: 20px; }

  /* 2FA digit boxes — shrink so all six fit on a 360 px screen */
  .code-input { gap: 6px; }
  .code-digit { width: 42px; height: 50px; font-size: 22px; border-radius: 10px; }

  /* iOS auto-zooms inputs whose font-size is < 16px — bump it on touch */
  .field-input, select.field-input, textarea.field-input { font-size: 16px; }

  /* Inline-styled grids in HTML using minmax(>=240px, 1fr) collapse to 1
     column automatically; nothing to do for those. */

  /* Tables that exceed viewport — horizontal scroll instead of overflow */
  .dashboard-page table, .dash-layout table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Footer — stack rather than try to fit one line */
  .footer { flex-direction: column; align-items: flex-start; padding: 18px 16px; gap: 10px; }
  .footer-links { flex-wrap: wrap; gap: 12px; }

  /* Upgrade banner — wrap its inline children */
  .upgrade-banner { flex-wrap: wrap; padding: 10px 14px; }
}

/* Extra-small phones (iPhone SE width and below): drop the marketing nav
   links and make hero buttons full-width so nothing overflows. */
@media (max-width: 480px) {
  .nav-links { display: none; }
  .hero { padding: 36px 14px 36px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-hero-primary, .btn-hero-secondary { width: 100%; justify-content: center; padding: 14px 16px; }
  .auth-card, .signup-card { padding: 20px 18px; }
  .code-digit { width: 38px; height: 46px; font-size: 20px; }
}
