/* ===== BopDen design system v0.2 ===== */
/* Cassette palette · Impact display + Helvetica body · mobile-first · dark/light themes */

:root {
  /* Brand constants — never change between themes (vinyl, logo, footer brand colors) */
  --brand-cream: #F2EAD3;
  --brand-ink: #211F1C;
  --brand-red: #D04B2F;
  --brand-red-bright: #E55A3C;

  /* Theme-aware tokens (light defaults) */
  --bg: #F2EAD3;
  --bg-warm: #ECE2C2;
  --fg: #211F1C;
  --fg-soft: #3a3733;
  --surface: #FBF7EC;
  --surface-2: #ECE2C2;
  --accent: var(--brand-red);
  --accent-strong: #A03A24;
  --border: rgba(33, 31, 28, 0.12);
  --border-strong: rgba(33, 31, 28, 0.22);
  --silver: #B8B8B0;

  /* Aliases — keep legacy var names working (existing CSS uses these) */
  --cream: var(--bg);
  --cream-warm: var(--bg-warm);
  --ink: var(--fg);
  --ink-soft: var(--fg-soft);
  --red: var(--accent);
  --red-dark: var(--accent-strong);
  --paper: var(--surface);

  /* Misc */
  --shadow: 0 2px 0 rgba(33, 31, 28, 0.04);
  --maxw: 1200px;
  --r: 4px;
  --r-lg: 8px;
  --font-display: Impact, 'Helvetica Neue', 'Arial Black', sans-serif;
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', Menlo, Monaco, monospace;
}

/* Dark mode — explicit override via data-theme="dark" */
[data-theme="dark"] {
  --bg: #1B1814;
  --bg-warm: #221E18;
  --fg: #F2EAD3;
  --fg-soft: #BFB7A4;
  --surface: #2A2620;
  --surface-2: #221E18;
  --accent: var(--brand-red-bright);
  --accent-strong: #C44830;
  --border: rgba(242, 234, 211, 0.10);
  --border-strong: rgba(242, 234, 211, 0.20);
}

/* Dark mode — system preference (only if user hasn't explicitly set light) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1B1814;
    --bg-warm: #221E18;
    --fg: #F2EAD3;
    --fg-soft: #BFB7A4;
    --surface: #2A2620;
    --surface-2: #221E18;
    --accent: var(--brand-red-bright);
    --accent-strong: #C44830;
    --border: rgba(242, 234, 211, 0.10);
    --border-strong: rgba(242, 234, 211, 0.20);
  }
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.18s ease, color 0.18s ease;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

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

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

ul { list-style: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Typography ===== */

.display {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; }

.mono { font-family: var(--font-mono); font-size: 0.92em; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.6;
}

/* ===== Nav ===== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--fg);
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--fg); }
.nav-logo::before {
  content: '';
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%23211F1C'/%3E%3Ccircle cx='16' cy='16' r='6' fill='%23D04B2F'/%3E%3Ccircle cx='16' cy='16' r='1' fill='%23F2EAD3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
[data-theme="dark"] .nav-logo::before,
:root:not([data-theme="light"]) .nav-logo::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%23F2EAD3'/%3E%3Ccircle cx='16' cy='16' r='6' fill='%23D04B2F'/%3E%3Ccircle cx='16' cy='16' r='1' fill='%23211F1C'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-logo::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%23F2EAD3'/%3E%3Ccircle cx='16' cy='16' r='6' fill='%23D04B2F'/%3E%3Ccircle cx='16' cy='16' r='1' fill='%23211F1C'/%3E%3C/svg%3E");
  }
}

.nav-links {
  display: none;
  gap: 24px;
  font-size: 15px;
  font-weight: 500;
  align-items: center;
}
.nav-links a { opacity: 0.85; }
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; color: var(--fg); font-weight: 600; }
.nav-cta { display: flex; align-items: center; gap: 8px; }

@media (min-width: 880px) {
  .nav-links { display: flex; }
}

/* Account menu (hybrid user — single account with both buyer + seller surfaces) */
.account-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 4px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
}
.account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-ink);
  color: var(--brand-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.account-menu:hover { border-color: var(--fg); }

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--fg);
  background: transparent;
  border: 1px solid transparent;
  transition: border-color 0.12s ease, transform 0.1s ease;
}
.theme-toggle:hover { border-color: var(--border-strong); }
.theme-toggle::before { content: '☾'; }
[data-theme="dark"] .theme-toggle::before,
:root:not([data-theme="light"]) .theme-toggle::before { content: '☼'; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle::before { content: '☼'; }
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.08s ease, background-color 0.12s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--fg); opacity: 0.88; color: var(--bg); }
.btn-accent { background: var(--brand-red); color: var(--brand-cream); }
.btn-accent:hover { background: var(--accent-strong); color: var(--brand-cream); }
.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--fg);
}
.btn-outline:hover { background: var(--fg); color: var(--bg); }
.btn-text { padding: 11px 8px; font-weight: 500; font-size: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-google {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border-strong);
}
.btn-google:hover { border-color: var(--fg); color: var(--fg); }
.btn-google::before {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%234285F4' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%2334A853' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%23EA4335' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ===== Sections ===== */

.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }
.section-divider {
  width: 60px;
  height: 4px;
  background: var(--brand-red);
  margin: 16px 0 32px;
}

/* ===== Hero ===== */

.hero {
  padding: 100px 0 80px;
  text-align: center;
}
.hero-display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 11vw, 144px);
  letter-spacing: -0.03em;
  line-height: 0.92;
}
.hero-display .accent { color: var(--accent); }
.hero-sub {
  font-size: clamp(17px, 2vw, 22px);
  margin: 28px auto 40px;
  max-width: 640px;
  opacity: 0.8;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ===== Cards / surfaces ===== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card-flat {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card-tight { padding: 18px 20px; }

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 24px; } }

/* ===== Track card ===== */

.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.track-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  cursor: pointer;
  display: block;
  color: inherit;
}
.track-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  color: inherit;
}
.track-thumb {
  aspect-ratio: 1 / 1;
  background: var(--brand-ink);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.track-thumb-vinyl {
  width: 70%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-red) 0% 25%, var(--brand-ink) 25.5% 100%);
  position: relative;
}
.track-thumb-vinyl::before, .track-thumb-vinyl::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(242, 234, 211, 0.15);
}
.track-thumb-vinyl::before { inset: 8%; }
.track-thumb-vinyl::after { inset: 16%; }
.track-thumb-vinyl-hole {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brand-cream);
}
.track-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.track-card-body { padding: 14px 16px 18px; }
.track-title { font-weight: 600; font-size: 16px; margin-bottom: 4px; line-height: 1.25; color: var(--fg); }
.track-artist { font-size: 13px; opacity: 0.65; margin-bottom: 10px; }
.track-meta { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.track-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--surface-2);
  font-weight: 500;
  color: var(--fg);
}
.tag-ai { background: rgba(208, 75, 47, 0.14); color: var(--accent-strong); }
.tag-organic { background: rgba(33, 31, 28, 0.08); }
[data-theme="dark"] .tag-organic, :root:not([data-theme="light"]) .tag-organic {
  background: rgba(242, 234, 211, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tag-organic { background: rgba(242, 234, 211, 0.08); }
}
.tag-ai { color: var(--accent); }
.track-price { font-family: var(--font-mono); font-weight: 600; }

/* ===== Catalog layout ===== */

.catalog-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 960px) { .catalog-layout { grid-template-columns: 240px 1fr; } }
.filter-section { margin-bottom: 28px; }
.filter-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 10px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 99px;
  background: transparent;
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 500;
  margin: 0 4px 6px 0;
  cursor: pointer;
  color: var(--fg);
}
.filter-chip.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.filter-chip:hover:not(.active) { border-color: var(--fg); }

/* ===== Search ===== */

.search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  padding: 4px 4px 4px 16px;
  margin-bottom: 24px;
}
.search-bar input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  padding: 10px 0;
  outline: none;
  color: inherit;
}
.search-bar input::placeholder { color: var(--fg); opacity: 0.45; }

/* ===== Forms ===== */

.form-row { margin-bottom: 24px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.form-help { font-size: 13px; opacity: 0.65; margin-top: 4px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  font: inherit;
  color: inherit;
  outline: none;
  transition: border-color 0.12s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--fg); }
.form-textarea { resize: vertical; min-height: 110px; }

/* Affixed input — for handle (@) and other prefix tokens. Use this so the user never types the @ themselves. */
.form-input-affix {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color 0.12s ease;
}
.form-input-affix:focus-within { border-color: var(--fg); }
.form-input-affix-prefix {
  padding: 11px 14px;
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  font-weight: 600;
  opacity: 0.7;
  font-family: var(--font-mono);
  user-select: none;
}
.form-input-affix .form-input {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  flex: 1;
  min-width: 0;
}
.form-row-2 { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } }

/* ===== Licence cards ===== */

.license-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) { .license-grid { grid-template-columns: 1fr 1fr; } }
.license-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.license-card.featured { border-color: var(--accent); border-width: 2px; }
.license-name { font-family: var(--font-display); font-size: 28px; font-weight: 900; letter-spacing: -0.02em; }
.license-price { font-family: var(--font-display); font-size: 44px; font-weight: 900; margin: 4px 0 14px; }
.license-features { font-size: 14px; margin: 14px 0 24px; flex: 1; }
.license-features li {
  padding: 4px 0 4px 22px;
  position: relative;
}
.license-features li::before {
  content: '·';
  position: absolute;
  left: 0;
  top: -2px;
  color: var(--accent);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

/* ===== Stat cards ===== */

.stat-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
}
.stat-label { font-size: 12px; opacity: 0.6; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.stat-value { font-family: var(--font-display); font-size: 38px; font-weight: 900; letter-spacing: -0.02em; margin-top: 8px; }
.stat-delta { font-size: 12px; margin-top: 4px; }
.stat-delta.up { color: #1d8a5a; }
.stat-delta.down { color: var(--accent); }

/* ===== Table ===== */

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  overflow-x: auto;
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 14px 18px; text-align: left; font-size: 14px; }
.table th {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.65;
  border-bottom: 1px solid var(--border);
}
.table tbody tr { border-bottom: 1px solid var(--border); }
.table tbody tr:last-child { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }

/* ===== Player / waveform ===== */

.player {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.player-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-ink);
  color: var(--brand-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
[data-theme="dark"] .player-play, :root:not([data-theme="light"]) .player-play {
  background: var(--brand-cream); color: var(--brand-ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .player-play { background: var(--brand-cream); color: var(--brand-ink); }
}
.waveform { flex: 1; height: 50px; display: flex; align-items: center; gap: 2px; }
.waveform .bar { flex: 1; background: var(--fg); border-radius: 2px; opacity: 0.45; }
.waveform .bar.active { background: var(--accent); opacity: 1; }

/* ===== Footer (always brand dark) ===== */

.footer {
  background: var(--brand-ink);
  color: var(--brand-cream);
  padding: 64px 0 32px;
  margin-top: 80px;
}
.footer a { color: var(--brand-cream); }
.footer a:hover { color: var(--brand-red-bright); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 48px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .display { font-size: 36px; margin-bottom: 8px; }
.footer h4 { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; opacity: 0.7; margin-bottom: 14px; }
.footer ul li { padding: 4px 0; font-size: 15px; }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid rgba(242, 234, 211, 0.15);
  font-size: 13px;
  opacity: 0.55;
  letter-spacing: 1px;
}

/* ===== Utility ===== */

.text-muted { opacity: 0.7; }
.text-accent { color: var(--accent); }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* Mockup banner — always red bg + brand cream text */
.mockup-banner {
  background: var(--brand-red);
  color: var(--brand-cream);
  text-align: center;
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

/* ===== Modal / overlay (auth, confirmations) ===== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(33, 31, 28, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.modal {
  background: var(--bg);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 440px;
  padding: 36px 32px 28px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--fg);
  opacity: 0.55;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}
.modal-close:hover {
  color: var(--brand-red);
  background: rgba(208, 75, 47, 0.10);
  opacity: 1;
}
.modal-header { text-align: center; margin-bottom: 24px; padding-top: 6px; }
.modal-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1;
}
.modal-sub { margin-top: 8px; font-size: 14px; opacity: 0.7; }
.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.55;
}
.modal-divider::before, .modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.modal-footer-text { text-align: center; margin-top: 18px; font-size: 14px; opacity: 0.75; }
.modal-footer-text a { color: var(--accent); font-weight: 600; }

/* ===== Feed component (homepage) ===== */

.feed { display: flex; flex-direction: column; gap: 16px; }
.feed-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: border-color 0.12s ease;
}
.feed-item:hover { border-color: var(--border-strong); }
.feed-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--r);
  background: var(--brand-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.feed-thumb .track-thumb-vinyl { width: 76%; }
.feed-body { min-width: 0; }
.feed-meta { font-size: 12px; opacity: 0.6; margin-bottom: 4px; }
.feed-title { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.feed-artist { font-size: 13px; opacity: 0.7; }
.feed-action { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.feed-action .track-price { font-size: 15px; }
@media (max-width: 600px) {
  .feed-item { grid-template-columns: 56px 1fr; gap: 12px; padding: 12px; }
  .feed-thumb { width: 56px; height: 56px; }
  .feed-action { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; padding-top: 4px; border-top: 1px solid var(--border); }
}

/* ===== Cover art uploader (upload page) ===== */

.cover-uploader {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 24px;
}
.cover-uploader-thumb {
  aspect-ratio: 1 / 1;
  background: var(--brand-ink);
  border-radius: var(--r);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cover-uploader-thumb .vinyl-fallback {
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-red) 0% 25%, var(--brand-ink) 25.5% 100%);
  position: relative;
}
.cover-uploader-thumb .vinyl-fallback::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 6%; aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brand-cream);
}
.cover-uploader-thumb .overlay {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(33, 31, 28, 0.7);
  color: var(--brand-cream);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 99px;
  letter-spacing: 1px;
}
.cover-uploader-info h4 { font-size: 16px; margin-bottom: 4px; }
.cover-uploader-info p { font-size: 13px; opacity: 0.7; margin-bottom: 12px; }
@media (max-width: 600px) { .cover-uploader { grid-template-columns: 1fr; } }

/* ===== Settings page ===== */

.settings-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 880px) { .settings-layout { grid-template-columns: 220px 1fr; } }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 80px; align-self: start; }
.settings-nav a {
  padding: 10px 14px;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  opacity: 0.7;
}
.settings-nav a.active {
  background: var(--surface-2);
  opacity: 1;
  font-weight: 600;
  border-left: 3px solid var(--accent);
  padding-left: 11px;
  border-radius: 0 var(--r) var(--r) 0;
}
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.settings-section h2 { font-size: 22px; margin-bottom: 6px; }
.settings-section > p:first-of-type { font-size: 14px; opacity: 0.7; margin-bottom: 20px; }
.danger-zone { border-color: rgba(208, 75, 47, 0.4); }
.danger-zone h2 { color: var(--accent); }
.toggle {
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
}
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-slider {
  width: 42px;
  height: 24px;
  background: var(--border-strong);
  border-radius: 99px;
  position: relative;
  transition: background 0.12s ease;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  transition: transform 0.12s ease;
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.settings-row:last-child { border-bottom: 0; }
.settings-row-label { font-weight: 500; font-size: 14px; }
.settings-row-help { font-size: 12px; opacity: 0.65; margin-top: 2px; }

/* ===== Orders / licence history ===== */

.order-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: center;
}
.order-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--r);
  background: var(--brand-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-thumb .mini-vinyl {
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-red) 0% 28%, var(--brand-ink) 28.5% 100%);
}
.order-body { min-width: 0; }
.order-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}
.status-active { background: rgba(29,138,90,0.12); color: #1d8a5a; }
.status-disputed { background: rgba(208, 75, 47, 0.14); color: var(--accent); }
.status-pending { background: var(--surface-2); color: var(--fg); }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) {
  .order-item { grid-template-columns: 56px 1fr; }
  .order-actions { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--border); }
}

/* ===== Admin pages ===== */

.admin-header {
  background: var(--brand-ink);
  color: var(--brand-cream);
  padding: 28px 0;
  margin-bottom: 32px;
}
.admin-header .display { color: var(--brand-cream); }
.admin-eyebrow {
  color: var(--brand-red-bright);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 600;
}
.admin-tabs { display: flex; gap: 24px; margin-top: 18px; font-size: 14px; flex-wrap: wrap; }
.admin-tabs a { color: var(--brand-cream); opacity: 0.65; padding-bottom: 6px; }
.admin-tabs a.active { opacity: 1; border-bottom: 2px solid var(--brand-red-bright); }
.admin-tabs a:hover { opacity: 1; color: var(--brand-cream); }
.queue-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r);
  padding: 16px 20px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: center;
}
.queue-priority {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--brand-cream);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
}
.queue-priority.low { background: var(--surface-2); color: var(--fg); }
.queue-priority.medium { background: rgba(208, 75, 47, 0.6); }
.queue-meta { font-size: 12px; opacity: 0.6; }
.queue-title { font-weight: 600; font-size: 15px; margin: 2px 0; }

/* ===== Public artist profile ===== */

.profile-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}
.profile-hero-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 720px) { .profile-hero-grid { grid-template-columns: 120px 1fr; gap: 20px; } }
.profile-avatar-lg {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--brand-ink);
  color: var(--brand-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 900;
  letter-spacing: -0.04em;
  position: relative;
  overflow: hidden;
}
.profile-avatar-lg::after {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(242, 234, 211, 0.12);
  pointer-events: none;
}
@media (max-width: 720px) { .profile-avatar-lg { width: 120px; height: 120px; font-size: 52px; } }

.profile-info .display { font-size: clamp(40px, 6vw, 64px); margin: 4px 0 12px; line-height: 1; }
.profile-handle-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.profile-bio { font-size: 17px; max-width: 580px; opacity: 0.85; margin-bottom: 18px; }
.profile-meta {
  display: flex;
  gap: 24px;
  font-size: 14px;
  margin: 14px 0 22px;
  flex-wrap: wrap;
}
.profile-meta-item { opacity: 0.7; }
.profile-meta-item strong { opacity: 1; color: var(--fg); }

.profile-social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.profile-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 11px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  transition: border-color 0.12s ease, color 0.12s ease;
}
.profile-social a:hover { border-color: var(--accent); color: var(--accent); }
.profile-social .icon { width: 18px; height: 18px; flex-shrink: 0; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.profile-banner-strip {
  background: var(--brand-ink);
  color: var(--brand-cream);
  padding: 14px 0;
  font-size: 13px;
  letter-spacing: 1.5px;
}
.profile-banner-strip .container {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}
.profile-banner-strip .stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.profile-banner-strip .stat strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.profile-banner-strip .stat span { opacity: 0.7; text-transform: uppercase; letter-spacing: 2px; font-size: 11px; }

.featured-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
@media (min-width: 880px) { .featured-track { grid-template-columns: 260px 1fr; gap: 36px; } }
.featured-art {
  aspect-ratio: 1;
  background: var(--brand-ink);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.featured-art-vinyl {
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-red) 0% 22%, var(--brand-ink) 22.5% 100%);
  position: relative;
}
.featured-art-vinyl::before, .featured-art-vinyl::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(242, 234, 211, 0.15);
}
.featured-art-vinyl::before { inset: 6%; }
.featured-art-vinyl::after { inset: 14%; }
.featured-art-hole {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 5%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brand-cream);
}

/* ===== Email gallery ===== */

.email-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 1024px) { .email-grid { grid-template-columns: 1fr 1fr; } }
.email-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.email-meta-bar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.email-meta-bar .badge {
  background: var(--brand-red);
  color: var(--brand-cream);
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
  letter-spacing: 1px;
}
.email-render {
  background: #ffffff;
  color: #211F1C;
  padding: 32px 28px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
.email-render h1 {
  font-family: Impact, sans-serif;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
  color: #211F1C;
}
.email-render h1 .accent { color: #D04B2F; }
.email-render h2 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; }
.email-render p { margin-bottom: 14px; }
.email-render .email-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Impact, sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}
.email-render .email-brand-mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle, #D04B2F 0% 32%, #211F1C 32.5% 100%);
}
.email-render .email-btn {
  display: inline-block;
  padding: 13px 24px;
  background: #211F1C;
  color: #F2EAD3;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  margin: 12px 0;
}
.email-render .email-btn-accent { background: #D04B2F; }
.email-render .email-receipt {
  background: #F2EAD3;
  border-radius: 4px;
  padding: 16px;
  margin: 16px 0;
  font-size: 14px;
}
.email-render .email-receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}
.email-render .email-receipt-row.total {
  border-top: 1px solid rgba(33,31,28,0.2);
  margin-top: 8px;
  padding-top: 10px;
  font-weight: 700;
}
.email-render .email-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(33,31,28,0.1);
  font-size: 12px;
  color: #666;
}
.email-render .email-footer a { color: #D04B2F; }
.email-render .email-code {
  display: inline-block;
  font-family: 'JetBrains Mono', Menlo, monospace;
  background: #F2EAD3;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 18px;
  letter-spacing: 4px;
  margin: 8px 0;
}

/* ===== Hidden utility ===== */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
