/* ==========================================================================
   COMPONENTS — Music
   Built entirely on tokens.css. No raw colour values appear below, so every
   rule follows the active theme without knowing which theme that is.
   Mirrors the Figma component set.
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface-canvas);
  color: var(--content-primary);
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Respect a stated preference for reduced motion rather than merely easing. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- typography */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: var(--font-size-2xl); line-height: 1.2; }
h2 { font-size: var(--font-size-lg); line-height: 1.3; margin-block: var(--space-8) var(--space-4); }
h3 { font-size: var(--font-size-md); line-height: 1.35; }
h4 {
  font-size: var(--font-size-2xs); line-height: 1.3;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--content-tertiary);
  margin-block: var(--space-6) var(--space-3);
}
p { margin: 0 0 var(--space-4); }

a { color: var(--accent-content); text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }

.sub { color: var(--content-secondary); margin: 0 0 var(--space-7); }
.hint { color: var(--content-tertiary); font-size: var(--font-size-xs); margin: var(--space-2) 0 0; }
.mono { font-family: var(--font-mono); font-size: var(--font-size-sm); }
.muted { color: var(--content-secondary); }
.danger-text { color: var(--status-danger-content); }

/* -------------------------------------------------------------------- layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: var(--space-9) var(--space-6) var(--space-13); }
.wrap.narrow { max-width: 460px; }
.wrap.wide { max-width: 1400px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-5); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

.row { display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap; }
.row-end { margin-left: auto; }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }

/* --------------------------------------------------------------- app shell */
.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--space-5);
  padding: var(--space-4) var(--space-6);
  background: color-mix(in srgb, var(--surface-raised) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.appbar .brand {
  display: flex; align-items: center; gap: var(--space-3);
  font-weight: 650; letter-spacing: -0.02em; color: var(--content-primary);
  text-decoration: none;
}
.appbar .brand-mark {
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  background: linear-gradient(140deg, var(--accent-default), var(--accent-pressed));
  display: grid; place-items: center;
  color: var(--content-on-accent); font-size: var(--font-size-sm); font-weight: 700;
}
.appbar nav { display: flex; gap: var(--space-2); align-items: center; margin-left: var(--space-6); }
.appbar nav a {
  color: var(--content-secondary); text-decoration: none;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  font-size: var(--font-size-sm); font-weight: 500;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.appbar nav a:hover { background: var(--surface-hover); color: var(--content-primary); }
.appbar nav a[aria-current="page"] { background: var(--accent-subtle); color: var(--accent-content); }
.appbar .spacer { margin-left: auto; }

/*
 * Below 720px the appbar's single non-wrapping row overflowed the viewport:
 * the nav, theme picker, role label and the sign-out control were all pushed
 * past the right edge. Measured at 375px, "Sign out" was entirely off-screen,
 * so a signed-in user on a phone had no way to end their session — and because
 * the row widened the document rather than clipping, the failure looked like a
 * stray horizontal scroll rather than a missing control.
 *
 * Two rows, with sign-out kept on the first. The nav is the thing that grows
 * as sections are added, so the nav is the thing that moves.
 */
/*
 * 900px, not the 720px used for the content grids. Measured in Chrome, the
 * full single row — brand, three nav links, theme picker, role label and
 * sign-out — needs 816px. A 720px breakpoint therefore left a dead band from
 * 721px to 816px, tablet portrait included, where the bar still overflowed and
 * sign-out was still off-screen. The number comes from the measurement, not
 * from a conventional breakpoint list.
 */
@media (max-width: 900px) {
  .appbar {
    flex-wrap: wrap;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
  }
  .appbar nav {
    order: 5;
    flex: 1 0 100%;
    margin-left: 0;
    /* Scrolls rather than wrapping again, so header height stays fixed however
       many sections a role can see. */
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .appbar nav::-webkit-scrollbar { display: none; }
  .appbar nav a { white-space: nowrap; }
}

/*
 * The role/vendor label is the only purely informational item in the bar — it
 * is repeated on the dashboard — so it is what gives way when the first row
 * genuinely cannot fit. The controls stay.
 */
@media (max-width: 560px) {
  .appbar > .tag { display: none; }
}

/* ------------------------------------------------------------------- panel */
.panel {
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}
.panel + .panel { margin-top: var(--space-5); }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-5) var(--space-7);
  border-bottom: 1px solid var(--border-subtle);
}
.panel-head h3 { font-size: var(--font-size-base); }

/* ------------------------------------------------------------------ button */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--accent-default);
  color: var(--content-on-accent);
  font: inherit; font-size: var(--font-size-sm); font-weight: 500;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--transition-fast), border-color var(--transition-fast),
              transform var(--transition-fast);
}
button:hover, .btn:hover { background: var(--accent-hover); }
button:active, .btn:active { background: var(--accent-pressed); transform: translateY(1px); }
button:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: var(--surface-raised);
  color: var(--content-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--border-strong); }

.btn-subtle { background: var(--accent-subtle); color: var(--accent-content); }
.btn-subtle:hover { background: var(--accent-subtle); border-color: var(--accent-default); }

.btn-danger { background: var(--status-danger); color: var(--content-on-accent); }
.btn-danger:hover { background: var(--status-danger); filter: brightness(1.1); }

.btn-ghost { background: transparent; color: var(--content-secondary); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--content-primary); }

.btn-sm { min-height: 32px; padding: var(--space-2) var(--space-4); font-size: var(--font-size-xs); }
.btn-lg { min-height: 48px; padding: var(--space-4) var(--space-6); font-size: var(--font-size-base); }

/* A link that behaves as a button inside a table row. */
.link-btn {
  background: none; border: 0; min-height: auto; padding: var(--space-2) var(--space-3);
  color: var(--accent-content); font-size: var(--font-size-xs);
}
.link-btn:hover { background: var(--surface-hover); }
.link-btn.danger { color: var(--status-danger-content); }

/* -------------------------------------------------------------------- form */
.field { margin-bottom: var(--space-5); }
label { display: block; font-weight: 500; font-size: var(--font-size-sm); margin: 0 0 var(--space-2); }
.check label { font-weight: 400; margin: 0; }

input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="number"], input[type="url"], input[type="search"], select, textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  min-height: 40px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface-canvas);
  color: var(--content-primary);
  font: inherit; font-size: var(--font-size-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--content-tertiary); }

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--border-focus) 25%, transparent);
}
/* Keyboard users must always see where they are, including on dark themes. */
a:focus-visible, button:focus-visible, .btn:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--status-danger); }

.check { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-5); }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent-default); flex: none; }

.field-mono input { font-family: var(--font-mono); letter-spacing: 0.02em; }

/* ------------------------------------------------------------------- alert */
.alert {
  display: flex; gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  font-size: var(--font-size-sm);
}
/* A left rule gives a non-colour cue, so meaning survives greyscale and the
   High Contrast theme. */
.alert::before { content: ""; width: 3px; border-radius: 2px; background: currentColor; flex: none; align-self: stretch; }
.alert-ok { background: var(--status-success-subtle); border-color: var(--status-success); color: var(--status-success-content); }
.alert-warn { background: var(--status-warning-subtle); border-color: var(--status-warning); color: var(--status-warning-content); }
.alert-error { background: var(--status-danger-subtle); border-color: var(--status-danger); color: var(--status-danger-content); }
.alert-info { background: var(--status-info-subtle); border-color: var(--status-info); color: var(--status-info-content); }
.alert ul { margin: var(--space-2) 0 0; padding-left: var(--space-5); }
.alert strong { font-weight: 600; }

/* --------------------------------------------------------------------- tag */
.tag {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  background: var(--surface-sunken);
  color: var(--content-secondary);
  font-size: var(--font-size-xs); font-weight: 500;
  white-space: nowrap;
}
.tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: none;
}
.tag-plain::before { display: none; }
.tag-accent { background: var(--accent-subtle); border-color: var(--accent-default); color: var(--accent-content); }
.tag-success { background: var(--status-success-subtle); border-color: var(--status-success); color: var(--status-success-content); }
.tag-warning { background: var(--status-warning-subtle); border-color: var(--status-warning); color: var(--status-warning-content); }
.tag-danger { background: var(--status-danger-subtle); border-color: var(--status-danger); color: var(--status-danger-content); }
.tag-info { background: var(--status-info-subtle); border-color: var(--status-info); color: var(--status-info-content); }

/* Track and invitation statuses map onto tones rather than inventing colours,
   so "approved" and "success" can never drift apart. */
.status-approved, .status-accepted, .status-active { background: var(--status-success-subtle); border-color: var(--status-success); color: var(--status-success-content); }
.status-pending_review, .status-sent, .status-opened, .status-processing,
.status-uploading, .status-pending_verification { background: var(--status-warning-subtle); border-color: var(--status-warning); color: var(--status-warning-content); }
.status-rejected, .status-failed, .status-revoked, .status-expired,
.status-bounced, .status-muted, .status-suspended { background: var(--status-danger-subtle); border-color: var(--status-danger); color: var(--status-danger-content); }
.status-draft, .status-withdrawn, .status-pending { background: var(--surface-sunken); border-color: var(--border-default); color: var(--content-secondary); }

/* ------------------------------------------------------------------- table */
.scroll-x { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
th, td { text-align: left; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border-subtle); }
th {
  color: var(--content-tertiary); font-weight: 500;
  font-size: var(--font-size-2xs); text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--surface-sunken);
  position: sticky; top: 0;
}
tbody tr { transition: background var(--transition-fast); }
tbody tr:hover { background: var(--surface-hover); }
tbody tr:last-child td { border-bottom: 0; }
td.numeric { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
tr.flagged td { background: var(--status-danger-subtle); }

/* -------------------------------------------------------------- stat tiles */
.stats { display: flex; gap: var(--space-8); flex-wrap: wrap; margin-bottom: var(--space-7); }
.stat { min-width: 96px; }
.stat .n {
  display: block; font-size: var(--font-size-2xl); font-weight: 650;
  letter-spacing: -0.03em; color: var(--content-primary);
  font-variant-numeric: tabular-nums;
}
.stat .k { font-size: var(--font-size-xs); color: var(--content-secondary); }
.stat.accent .n { color: var(--accent-content); }
.stat.warn .n { color: var(--status-warning-content); }
.stat.danger .n { color: var(--status-danger-content); }

/* ------------------------------------------------------------ empty states */
.empty {
  text-align: center; padding: var(--space-12) var(--space-6);
  color: var(--content-secondary);
}
.empty-title { color: var(--content-primary); font-weight: 550; margin-bottom: var(--space-2); }

/* ---------------------------------------------------------------- progress */
.progress {
  height: 6px; border-radius: var(--radius-full);
  background: var(--surface-sunken); overflow: hidden;
}
.progress > span {
  display: block; height: 100%; border-radius: var(--radius-full);
  background: var(--accent-default);
  transition: width var(--transition-base);
}
.progress.success > span { background: var(--status-success); }
.progress.danger > span { background: var(--status-danger); }

/* ---------------------------------------------------------------- waveform */
/* The clip selector. Peaks are rendered as bars so the selected range is
   legible without decoding an image. */
.waveform {
  display: flex; align-items: center; gap: 2px;
  height: 72px; padding: var(--space-4);
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.waveform i {
  display: block; flex: 1 1 auto; min-width: 1px;
  border-radius: 1px;
  background: var(--viz-wave-remaining);
}
.waveform i.in-clip { background: var(--viz-wave-played); }

/* -------------------------------------------------------- rights gate card */
/* L2: both sides or reject. The card states which side is missing rather than
   reporting a generic "incomplete". */
.rights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
@media (max-width: 720px) { .rights-grid { grid-template-columns: 1fr; } }
.rights-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  background: var(--surface-raised);
}
.rights-card.confirmed { border-color: var(--status-success); background: var(--status-success-subtle); }
.rights-card.missing { border-color: var(--status-warning); background: var(--status-warning-subtle); }
.rights-card h3 { font-size: var(--font-size-sm); margin-bottom: var(--space-2); }
.rights-card .desc { font-size: var(--font-size-xs); color: var(--content-secondary); }

/* A statutory note carries more weight than a hint, and must not be styled
   as decoration. */
.statute {
  border-left: 3px solid var(--status-warning);
  background: var(--status-warning-subtle);
  padding: var(--space-4) var(--space-5);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--font-size-xs);
  color: var(--status-warning-content);
  margin: var(--space-4) 0 0;
}
.conflict {
  border: 2px solid var(--status-danger);
  background: var(--status-danger-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-7);
  margin-bottom: var(--space-7);
  color: var(--status-danger-content);
}
.conflict h2 { color: var(--status-danger-content); margin-top: 0; font-size: var(--font-size-md); }

/* ------------------------------------------------------------ track cards */
.track-grid {
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.track-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.track-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.track-art {
  aspect-ratio: 1; width: 100%;
  background: linear-gradient(140deg, var(--accent-default), var(--accent-pressed));
  display: grid; place-items: center;
  color: var(--content-on-accent); font-size: var(--font-size-2xl); font-weight: 700;
}
.track-body { padding: var(--space-5); }
.track-title { font-weight: 550; margin-bottom: var(--space-1); }
.track-artist { font-size: var(--font-size-xs); color: var(--content-secondary); margin-bottom: var(--space-4); }

/* --------------------------------------------------------- definition list */
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) var(--space-7); margin: 0; }
@media (max-width: 720px) { .pairs { grid-template-columns: 1fr; } }
.pairs dt { font-size: var(--font-size-2xs); color: var(--content-tertiary); text-transform: uppercase; letter-spacing: 0.05em; }
.pairs dd { margin: var(--space-1) 0 0; font-weight: 500; }

/* ------------------------------------------------------------ theme picker */
.theme-picker { position: relative; }
.theme-picker select {
  min-height: 32px; padding: var(--space-2) var(--space-6) var(--space-2) var(--space-4);
  font-size: var(--font-size-xs); width: auto;
  background: var(--surface-raised); cursor: pointer;
}

/* ----------------------------------------------------------------- upload */
.dropzone {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  background: var(--surface-sunken);
  transition: border-color var(--transition-fast), background var(--transition-fast);
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent-default); background: var(--accent-subtle); }
.dropzone .icon { font-size: var(--font-size-3xl); margin-bottom: var(--space-4); opacity: 0.5; }

.file-row {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}
.file-row:last-child { border-bottom: 0; }
.file-row .name { flex: 1; font-size: var(--font-size-sm); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .progress { width: 120px; flex: none; }

/* ------------------------------------------------------------- pagination */
.pagination { display: flex; gap: var(--space-2); justify-content: center; margin-top: var(--space-7); }
.pagination a, .pagination span {
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
  font-size: var(--font-size-sm); text-decoration: none;
  color: var(--content-secondary);
}
.pagination a:hover { background: var(--surface-hover); color: var(--content-primary); }
.pagination [aria-current] { background: var(--accent-subtle); color: var(--accent-content); }

/* ------------------------------------------------------------------ misc */
hr { border: 0; border-top: 1px solid var(--border-subtle); margin: var(--space-8) 0; }
code { font-family: var(--font-mono); font-size: 0.92em; background: var(--surface-sunken); padding: 1px var(--space-2); border-radius: var(--radius-xs); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Two controls, one for each theme axis. */
.theme-picker { display: flex; gap: var(--space-2); }
.theme-picker select { min-width: 0; }

/* Catalogue clip selector — waveform bars + selected-window overlay (T10). */
.waveform {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 1px;
  height: 72px;
  margin: .5rem 0 1rem;
  padding: 2px;
  border-radius: var(--radius, 8px);
  background: var(--surface-2, rgba(127,127,127,.08));
  overflow: hidden;
}
.waveform .wave-bar {
  flex: 1 1 auto;
  min-width: 1px;
  background: var(--text-muted, #8a8a8a);
  opacity: .55;
}
.waveform::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: var(--sel-start, 0%);
  right: calc(100% - var(--sel-end, 0%));
  background: var(--accent, #7c5cff);
  opacity: .22;
  pointer-events: none;
}

/* T14 — cover art rendering. */
.track-art { overflow: hidden; }
.track-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.track-detail-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.track-detail-head .cover-lg {
  width: 120px; height: 120px; border-radius: var(--radius, 10px);
  object-fit: cover; flex: 0 0 auto; box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.track-thumb {
  width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
  flex: 0 0 auto; background: var(--surface-2, rgba(127,127,127,.08));
}
@media (max-width: 560px) {
  .track-detail-head { flex-direction: column; align-items: flex-start; }
}

/* T15 — super-admin data tables. A real tabular layout (the base <table> is
   fine; the bug was applying .pairs, a grid, to <table>). This adds polish:
   sticky header, zebra rows, tabular numerics, tidy cells. */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--font-size-sm);
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2, rgba(127,127,127,.06));
  font-size: var(--font-size-2xs, .7rem);
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--content-tertiary, #8a8a8a);
  white-space: nowrap;
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--border-subtle, rgba(127,127,127,.2));
}
.data-table tbody td {
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--border-subtle, rgba(127,127,127,.12));
  vertical-align: middle;
}
.data-table tbody tr:nth-child(even) { background: var(--surface-2, rgba(127,127,127,.03)); }
.data-table tbody tr:hover { background: var(--surface-hover, rgba(127,127,127,.09)); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.mono { font-family: var(--font-mono, monospace); font-size: var(--font-size-2xs, .72rem); }
.data-table td a { font-weight: 600; }
.data-table .track-thumb { width: 36px; height: 36px; border-radius: 6px; }
/* Wrap tables so wide content scrolls inside its own box, never the page. */
.table-wrap {
  border: 1px solid var(--border-subtle, rgba(127,127,127,.15));
  border-radius: var(--radius, 10px);
  overflow: auto;
  max-height: 70vh;
}

/* ── Upload wizard (adapted from the DittoMusic reference board) ─────────── */
.wizard-steps { display: flex; gap: .5rem; margin: 0 0 1.5rem; }
.wizard-step { flex: 1; display: flex; align-items: baseline; gap: .5rem;
  padding-bottom: .5rem; border-bottom: 3px solid var(--border-subtle, rgba(127,127,127,.25)); }
.wizard-step-n { font-size: 1.35rem; font-weight: 700; line-height: 1; }
.wizard-step-label { font-size: var(--font-size-sm, .9rem); }
.wizard-step.is-current { border-bottom-color: var(--accent, #7c5cff); }
.wizard-step.is-current .wizard-step-n,
.wizard-step.is-current .wizard-step-label { color: var(--accent, #7c5cff); font-weight: 600; }
.wizard-step.is-done { border-bottom-color: var(--content-primary, #333); }
.wizard-step.is-ahead { opacity: .45; }
@media (max-width: 700px) { .wizard-step-label { display: none; } }

.wizard-body { max-width: 1100px; margin: 0 auto; }
.wizard-title { font-size: 2rem; margin: 0 0 .35rem; }
.wizard-lede { color: var(--content-secondary, #666); max-width: 60ch; margin: 0 0 1.5rem; }
.wizard-split { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .wizard-split { grid-template-columns: 1fr; } }
.wizard-actions { display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle, rgba(127,127,127,.15)); }
.wizard-actions .is-disabled { opacity: .45; pointer-events: none; }

/* Dropzone — the reference's dashed square with a music-file glyph. */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .6rem; padding: 3rem 1rem; border: 2px dashed var(--border-subtle, rgba(127,127,127,.35));
  border-radius: var(--radius, 12px); cursor: pointer; text-align: center;
  transition: background .15s ease, border-color .15s ease; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent, #7c5cff); background: var(--surface-2, rgba(124,92,255,.06)); }
.dropzone-icon { width: 72px; height: 72px; color: var(--content-tertiary, #9a9a9a); }
.dropzone-title { font-size: 1.15rem; }
.dropzone-sub { color: var(--content-secondary, #666); font-size: var(--font-size-sm, .9rem); }

/* Tracklist rows */
.track-row { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem;
  border: 1px solid var(--border-subtle, rgba(127,127,127,.18)); border-radius: var(--radius, 10px);
  background: var(--surface-1, transparent); }
.track-row.is-editable { align-items: flex-start; }
.track-row-n { width: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; color: var(--content-tertiary, #999); }
.track-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Preview card — the reference's "Your Preview" panel. */
.preview-card { position: sticky; top: 1rem; }
.preview-cover { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius, 10px); margin-bottom: .6rem; }

/* Yes/No pill choices and the territory grid */
.pill-choice { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .9rem;
  border: 1px solid var(--border-subtle, rgba(127,127,127,.3)); border-radius: 999px; cursor: pointer; }
.pill-choice input { accent-color: var(--accent, #7c5cff); }
.pill-choice:has(input:checked) { border-color: var(--accent, #7c5cff); background: var(--surface-2, rgba(124,92,255,.08)); }
.territory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .4rem .75rem; }

/* Pre-flow note on the upload start screen. */
.bot-note { max-width: 68ch; }
.bot-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem;
  padding-bottom: .75rem; border-bottom: 1px solid var(--border-subtle, rgba(127,127,127,.15)); }
.bot-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent, #7c5cff); color: #fff; font-weight: 700; }
.rules-list { margin: 1rem 0; padding-left: 1.2rem; }
.rules-list li { margin-bottom: .7rem; line-height: 1.5; }

/* Wizard field/button proportions matched to the reference: pill actions,
   generous underline-style inputs. Scoped to the wizard so the rest of the app
   keeps its existing form language. Colours stay on our own brand tokens —
   the reference's #5f1fff is effectively our violet already. */
.wizard-body .field input[type="text"],
.wizard-body .field input[type="url"],
.wizard-body .field input[type="date"],
.wizard-body .field input[type="search"],
.wizard-body .field input[type="number"],
.wizard-body .field select {
  font-size: 1.05rem;
  padding: .5rem 0;
  border: 0;
  border-bottom: 1px solid var(--border-subtle, #d2d2e3);
  border-radius: 0;
  background: transparent;
  width: 100%;
}
.wizard-body .field input:focus,
.wizard-body .field select:focus {
  outline: none;
  border-bottom-color: var(--accent, #7c5cff);
  border-bottom-width: 2px;
}
.wizard-body .field label {
  font-size: var(--font-size-2xs, .72rem);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--content-tertiary, #626984);
}
.wizard-actions .btn-secondary,
.wizard-actions .btn-ghost,
.wizard-body form .btn-secondary {
  border-radius: 2rem;
  padding-inline: 1.75rem;
}
.wizard-title { letter-spacing: -0.01em; }

/* ── Release-builder light theme ──────────────────────────────────────────
   Palette and proportions taken from the reference builder so the wizard
   reads the same: violet primary, deep-navy text, soft grey borders, white
   cards on a near-white page, pill buttons. Scoped to .wizard-body so the
   rest of the app keeps the themed token system. */
.wizard-body {
  --w-primary: #5f1fff;
  --w-primary-hover: #8640f4;
  --w-ink: #101f3c;
  --w-ink-soft: #626984;
  --w-line: #d2d2e3;
  --w-surface: #ffffff;
  --w-value: #b8791f;      /* the amber the reference uses for read-back values */
  color: var(--w-ink);
  font-family: Inter, -apple-system, "Segoe UI", sans-serif;
}
.wizard-body h1, .wizard-body h2 { color: var(--w-ink); font-weight: 700; }
.wizard-title { font-size: 2.1rem; }
.wizard-lede, .wizard-body .sub { color: var(--w-ink-soft); }
.wizard-body .panel {
  background: var(--w-surface);
  border: 1px solid var(--w-line);
  border-radius: 14px;
  padding: 1.25rem;
}
.wizard-body .field label { color: var(--w-ink-soft); }
.wizard-body .field input, .wizard-body .field select { color: var(--w-ink); border-bottom-color: var(--w-line); }
.wizard-body .field input:focus, .wizard-body .field select:focus { border-bottom-color: var(--w-primary); }
.wizard-body .btn-secondary {
  background: var(--w-primary); color: #fff; border: 0;
  border-radius: 2rem; padding: .6rem 1.9rem; font-weight: 600;
}
.wizard-body .btn-secondary:hover:not(:disabled) { background: var(--w-primary-hover); }
.wizard-body .btn-secondary:disabled { background: #b9a5ff; cursor: not-allowed; }
.wizard-body .btn-ghost {
  background: #eeecfa; color: var(--w-ink); border: 0;
  border-radius: 2rem; padding: .6rem 1.9rem; font-weight: 600;
}
.wizard-body .pill-choice:has(input:checked) { border-color: var(--w-primary); background: #f2eeff; }
.wizard-body .dropzone:hover, .wizard-body .dropzone.is-over { border-color: var(--w-primary); background: #f7f5ff; }
.wizard-body .track-row { border-color: var(--w-line); border-radius: 12px; background: var(--w-surface); }

/* Stepper — numerals lead, the active rule is violet. */
.wizard-steps { border-bottom: 0; }
.wizard-step { border-bottom-width: 3px; border-bottom-color: var(--w-ink, #101f3c); }
.wizard-step.is-current { border-bottom-color: #f5a623; }
.wizard-step.is-current .wizard-step-n, .wizard-step.is-current .wizard-step-label { color: #5f1fff; }
.wizard-step.is-ahead { border-bottom-color: #d2d2e3; opacity: .55; }

/* Review layout: art card beside a two-column fact sheet. */
.review-grid { display: grid; grid-template-columns: 380px minmax(0,1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .review-grid { grid-template-columns: 1fr; } }
.review-art img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.review-facts h2 { font-size: 1.6rem; margin: 0 0 .15rem; }
.review-artist { color: #7b5cff; margin: 0 0 1.25rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .55rem .5rem; margin: 0; }
.facts dt { font-weight: 600; color: var(--w-ink); font-size: var(--font-size-sm, .9rem); }
.facts dd { margin: 0; color: var(--w-value); font-size: var(--font-size-sm, .9rem); }
.review-tracklist { margin-top: 1.25rem; }
.review-track { display: flex; align-items: center; gap: 1rem; padding: .85rem .25rem;
  border-top: 1px solid var(--w-line); }
.review-track:first-child { border-top: 0; }
.review-track .track-row-main { flex: 1; }
.err-dot { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: #f5a623; color: #fff; font-size: 11px; font-weight: 700; margin-left: .35rem; }
.repair-banner { background: #f5a623; color: #101f3c; font-weight: 600; text-align: center;
  padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1.5rem; }
.btn-complete { min-width: 210px; }
.track-duration { font-size: var(--font-size-2xs, .72rem); }

/* Licence action + modal on the upload step. */
.licence-link { background: none; border: 1px solid var(--w-line, #d2d2e3); border-radius: 2rem;
  padding: .45rem 1rem; cursor: pointer; color: var(--w-ink, #101f3c); font: inherit; white-space: nowrap; }
.licence-link:hover { border-color: var(--w-primary, #5f1fff); }
.icon-danger { background: none; border: 0; cursor: pointer; font-size: 1.1rem; color: #e2483d; padding: .3rem; }
.add-more { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 0;
  cursor: pointer; font: inherit; color: var(--w-ink, #101f3c); margin-top: .9rem; padding: 0; }
.add-more-plus { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: #101f3c; color: #fff; font-weight: 700; line-height: 1; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(16,31,60,.55); display: grid;
  place-items: center; z-index: 50; padding: 1rem; }
.modal-backdrop[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 16px; padding: 2rem; max-width: 470px; width: 100%;
  text-align: center; position: relative; box-shadow: 0 20px 60px rgba(16,31,60,.25); }
.modal-card h2 { margin: .5rem 0 1rem; font-size: 1.5rem; }
.modal-card p { color: var(--w-ink-soft, #626984); font-size: var(--font-size-sm, .9rem); }
.modal-card .field { text-align: left; }
.modal-close { position: absolute; top: .75rem; right: 1rem; background: none; border: 0;
  font-size: 1.5rem; cursor: pointer; color: var(--w-ink-soft, #626984); line-height: 1; }
.modal-icon { font-size: 2rem; color: #101f3c; }
.btn-dark { background: #101f3c; color: #fff; border: 0; border-radius: 2rem;
  padding: .7rem 2.2rem; font-weight: 600; cursor: pointer; }
.btn-dark:hover { background: #1c3b6a; }

/* ---------------------------------------------------------------------------
   Upload wizard — artwork step (node 63:5) and the expanded per-track metadata
   panel (nodes 63:3 / 63:9). Light theme throughout, matching the reference.
   --------------------------------------------------------------------------- */

.wizard-narrow { max-width: 720px; margin-inline: auto; }
.section-h { font-size: 1.25rem; margin: 1.5rem 0 .75rem; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5, 1rem); }
@media (max-width: 900px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid4 { grid-template-columns: 1fr; } }

/* Artwork step */
.artwork-pane { display: flex; flex-direction: column; align-items: center; gap: .9rem; margin-bottom: 1.75rem; }
.artwork-preview { position: relative; width: min(340px, 100%); aspect-ratio: 1; border-radius: 12px;
  overflow: hidden; background: #f3f2fa; border: 1px solid var(--w-line, #d2d2e3); }
.artwork-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artwork-badge { position: absolute; left: .6rem; bottom: .6rem; background: rgba(16,31,60,.75); color: #fff;
  font-size: var(--font-size-2xs, .72rem); padding: .2rem .55rem; border-radius: 2rem; }
.artwork-replace { cursor: pointer; }
.artwork-rules h2 { font-size: 1.05rem; margin: 0 0 .85rem; }
.rule-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .55rem; }
.rule-list li { display: flex; align-items: center; gap: .6rem; font-size: var(--font-size-sm, .9rem); }
.rule-no { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: #fdeceb; color: #e2483d; font-size: 11px; font-weight: 700; flex: none; }
.rule-warn { font-size: var(--font-size-sm, .9rem); color: var(--w-ink-soft, #626984); margin: 0 0 1rem; }

/* Metadata accordion */
.meta-card { border: 1px solid var(--w-line, #d2d2e3); border-radius: 12px; background: var(--w-surface, #fff);
  overflow: hidden; }
.meta-card.is-open { border-color: var(--w-primary, #5f1fff); }
.meta-head { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; }
.meta-grip { color: #b6b6c8; cursor: grab; }
.meta-play { background: none; border: 0; cursor: pointer; color: var(--w-primary, #5f1fff);
  font-size: 1rem; padding: .25rem; line-height: 1; }
.meta-title-text { display: block; }
.meta-body { padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--w-line, #d2d2e3); background: #fbfbfe; }
.meta-body[hidden] { display: none; }

/* Track preview window selector */
.preview-bar { position: relative; }
.preview-bar.is-disabled { background: #f1f1f6; border-radius: 6px; padding: .7rem .9rem;
  font-size: var(--font-size-sm, .9rem); }
.preview-bar input[type=range] { width: 100%; accent-color: var(--w-primary, #5f1fff); }
.preview-window { display: inline-block; margin-top: .3rem; font-size: var(--font-size-2xs, .72rem);
  background: var(--w-primary, #5f1fff); color: #fff; border-radius: 2rem; padding: .15rem .7rem;
  font-variant-numeric: tabular-nums; }

/* Artist chips */
.artist-chips { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.artist-chip { display: flex; flex-direction: column; align-items: center; gap: .35rem; width: 74px;
  text-align: center; font-size: var(--font-size-2xs, .72rem); text-decoration: none;
  color: var(--w-ink, #101f3c); }
.artist-chip img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.artist-chip-add { color: var(--w-primary, #5f1fff); }
.artist-chip-plus { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: #eef1ff; color: var(--w-primary, #5f1fff); font-size: 1.2rem; font-weight: 700; }

/* Toggle rows */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 0; border-top: 1px solid var(--w-line, #d2d2e3); font-size: var(--font-size-sm, .9rem); }
.toggle-grid .toggle-row { border-top: 1px solid var(--w-line, #d2d2e3); }
.switch { display: inline-flex; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 38px; height: 21px; border-radius: 2rem; background: #d6d6e2; position: relative;
  transition: background .15s ease; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch input:checked + .switch-track { background: var(--w-primary, #5f1fff); }
.switch input:checked + .switch-track::after { transform: translateX(17px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--w-primary, #5f1fff); outline-offset: 2px; }
.reveal[hidden] { display: none; }
.reveal { padding: .25rem 0 .75rem; }

.audio-file { display: flex; gap: .5rem; align-items: baseline; margin: 0; overflow: hidden; }
.audio-file .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--font-size-2xs, .72rem); color: var(--w-primary, #5f1fff); }

.preview-card { position: relative; }
.preview-edit { position: absolute; top: 2.1rem; right: 1.1rem; z-index: 1; background: #fff;
  border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center;
  text-decoration: none; color: var(--w-ink, #101f3c); box-shadow: 0 1px 4px rgba(16,31,60,.2); }

/* Avatar picker — artist photo upload on the roster screen. */
.avatar-picker { display: flex; gap: .9rem; align-items: flex-start; }
.avatar-preview { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none;
  border: 1px solid var(--border-default); background: var(--surface-sunken); }
.avatar-picker input[type=file] { font-size: var(--font-size-sm, .9rem); }

/* Artwork modal on the Details step (the reference edits art in place). */
.modal-wide { max-width: 560px; text-align: left; }
.modal-wide h2 { text-align: center; }
.modal-wide > p { text-align: center; }
.modal-wide .artwork-preview { width: min(240px, 100%); }
.modal-wide .artwork-rules h3 { font-size: 1rem; margin: 0 0 .75rem; }

/* ==========================================================================
   Ditto-style Details page — scoped to .ditto-* classes so nothing outside
   the wizard is touched. Colours from spec: primary #5f1fff, bg #f5f6fa,
   border #d6d9df, text #16181d, muted #6c7280.
   ========================================================================== */

/* ── Page wrapper ─────────────────────────────────────────────────────────── */
.ditto-page {
    --dp: #5f1fff;
    --dp-hover: #4a17cc;
    --dp-bg: #f5f6fa;
    --dp-border: #d6d9df;
    --dp-ink: #16181d;
    --dp-muted: #6c7280;
    --dp-green: #22c55e;
    --dp-red: #ef4444;
    --dp-amber: #f5a623;
    background: var(--dp-bg);
    min-height: 100vh;
    padding: 0 1.5rem 3rem;
    color: var(--dp-ink);
    font-family: Inter, -apple-system, "Segoe UI", sans-serif;
}

/* ── Sticky stepper overrides for Ditto style ─────────────────────────────── */
.ditto-stepper {
    position: sticky;
    top: 57px; /* sits flush below the appbar (~57px tall at default spacing) */
    z-index: 19; /* one below the appbar (z-index:20) so it slides under, not over */
    background: #fff;
    border-bottom: 1px solid #e8e9ee;
    padding: .75rem 1.5rem;
    margin: 0 0 2rem;
    display: flex;
    gap: 0;
    /* stretch to full content width without the negative-margin bleed */
    width: 100%;
    box-sizing: border-box;
}

/* On the narrow-appbar breakpoint (≤900px) the bar wraps to two rows
   and grows to ~90px; bump the offset so the stepper still clears it. */
@media (max-width: 900px) {
    .ditto-stepper { top: 90px; }
}
@media (max-width: 560px) {
    .ditto-stepper { top: 78px; }
}

.ditto-step {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: .45rem;
    padding-bottom: .7rem;
    border-bottom-width: 3px;
    border-bottom-style: solid;
    border-bottom-color: #d2d2e3;
    margin-right: .5rem;
}

.ditto-step-n {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    color: #6c7280;
}

.ditto-step-label {
    font-size: .875rem;
    color: #6c7280;
}

.ditto-step.is-done {
    border-bottom-color: var(--dp-amber, #f5a623);
}
.ditto-step.is-done .ditto-step-n,
.ditto-step.is-done .ditto-step-label {
    color: #6c7280;
    font-weight: 500;
}

.ditto-step.is-current {
    border-bottom-color: var(--dp, #5f1fff);
    border-bottom-width: 4px;
}
.ditto-step.is-current .ditto-step-n,
.ditto-step.is-current .ditto-step-label {
    color: var(--dp, #5f1fff);
    font-weight: 700;
}
.ditto-step.is-current .ditto-step-n {
    font-size: 1.55rem;
}

.ditto-step.is-ahead {
    border-bottom-color: #d2d2e3;
    opacity: .5;
}

@media (max-width: 600px) {
    .ditto-step-label { display: none; }
}

/* ── Two-column layout ────────────────────────────────────────────────────── */
.ditto-two-col {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
}

@media (max-width: 860px) {
    .ditto-two-col {
        grid-template-columns: 1fr;
    }
    .ditto-right {
        order: -1;
    }
}

.ditto-left { min-width: 0; }
.ditto-right { min-width: 0; }

/* ── Form field inputs ────────────────────────────────────────────────────── */
.ditto-field label {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--dp-muted, #6c7280);
    margin-bottom: .35rem;
    font-weight: 600;
}

.ditto-input {
    width: 100%;
    height: 40px;
    padding: 0 .75rem;
    border: 1px solid var(--dp-border, #d6d9df);
    border-radius: 6px;
    font-size: .95rem;
    color: var(--dp-ink, #16181d);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.ditto-input:focus {
    outline: none;
    border-color: var(--dp, #5f1fff);
    box-shadow: 0 0 0 3px rgba(95, 31, 255, .12);
}

.ditto-textarea {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid var(--dp-border, #d6d9df);
    border-radius: 6px;
    font-size: .95rem;
    color: var(--dp-ink, #16181d);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    font-family: inherit;
    box-sizing: border-box;
    resize: vertical;
}
.ditto-textarea:focus {
    outline: none;
    border-color: var(--dp, #5f1fff);
    box-shadow: 0 0 0 3px rgba(95, 31, 255, .12);
}

/* ── Custom select ────────────────────────────────────────────────────────── */
.ditto-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ditto-select {
    width: 100%;
    height: 40px;
    padding: 0 2.25rem 0 .75rem;
    border: 1px solid var(--dp-border, #d6d9df);
    border-radius: 6px;
    font-size: .95rem;
    color: var(--dp-ink, #16181d);
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ditto-select:focus {
    outline: none;
    border-color: var(--dp, #5f1fff);
    box-shadow: 0 0 0 3px rgba(95, 31, 255, .12);
}
.ditto-select-caret {
    position: absolute;
    right: .6rem;
    width: 16px;
    height: 16px;
    color: var(--dp-muted, #6c7280);
    pointer-events: none;
    flex: none;
}

/* ── Label row (label input + "Add New Label" pill) ──────────────────────── */
.ditto-label-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ── Preview card (right sticky column) ──────────────────────────────────── */
.ditto-preview-card {
    position: sticky;
    top: 96px;
    background: var(--dp-bg, #f5f6fa);
    border: 1px solid var(--dp-border, #d6d9df);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(16, 24, 29, .08);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .6rem;
}

.ditto-preview-caption {
    font-size: .72rem;
    color: var(--dp-muted, #6c7280);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0;
    align-self: flex-start;
}

/* Artwork when cover exists */
.ditto-artwork-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: none;
    padding: 0;
    background: #e0e2ea;
    display: block;
    flex: none;
}
.ditto-artwork-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ditto-artwork-overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 29, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s ease;
}
.ditto-artwork-wrap:hover .ditto-artwork-overlay,
.ditto-artwork-wrap:focus .ditto-artwork-overlay { opacity: 1; }

/* Artwork placeholder when no cover */
.ditto-artwork-placeholder {
    width: 200px;
    height: 200px;
    border: 2px dashed var(--dp-border, #d6d9df);
    border-radius: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    cursor: pointer;
    padding: 0;
    flex: none;
    transition: border-color .15s ease, background .15s ease;
}
.ditto-artwork-placeholder:hover {
    border-color: var(--dp, #5f1fff);
    background: #f7f4ff;
}
.ditto-artwork-placeholder-label {
    font-size: .8rem;
    color: var(--dp, #5f1fff);
    font-weight: 600;
}

.ditto-preview-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--dp-ink, #16181d);
    margin: .25rem 0 0;
}

.ditto-preview-meta {
    font-size: .78rem;
    color: var(--dp-muted, #6c7280);
    margin: 0;
}

/* ── Artist type pills ────────────────────────────────────────────────────── */
.ditto-section-label {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--dp-muted, #6c7280);
    margin-bottom: .5rem;
    font-weight: 600;
}

.ditto-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.ditto-pill-choice {
    font-size: .9rem;
    border-color: var(--dp-border, #d6d9df);
}
.ditto-pill-choice:has(input:checked) {
    border-color: var(--dp, #5f1fff);
    background: #f2eeff;
    color: var(--dp, #5f1fff);
}

/* ── Artist chips ─────────────────────────────────────────────────────────── */
.ditto-chips {
    margin-bottom: .25rem;
}

.ditto-chip-add {
    color: var(--dp, #5f1fff);
}

/* When the +Add Artists chip is a <button> (opens the picker modal) rather
   than an <a> (opens the roster page), strip the browser's default control
   styling and turn on a visible hover state so the affordance is obvious. */
button.artist-chip-add {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: transform .12s ease, opacity .12s ease;
}
button.artist-chip-add:hover .ditto-chip-plus,
button.artist-chip-add:focus-visible .ditto-chip-plus {
    background: var(--dp, #5f1fff);
    color: #ffffff;
    box-shadow: 0 6px 14px -6px rgba(95, 31, 255, .55);
}
button.artist-chip-add:hover span:last-child { color: var(--dp, #5f1fff); }
button.artist-chip-add:focus-visible {
    outline: 2px solid var(--dp, #5f1fff);
    outline-offset: 4px;
    border-radius: 8px;
}
button.artist-chip-add:active { transform: scale(.97); }

.ditto-chip-plus {
    background: #eef1ff;
    color: var(--dp, #5f1fff);
    border: 1.5px dashed transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.artist-chip-add .ditto-chip-plus {
    border-color: rgba(95, 31, 255, .35);
    background: #ffffff;
}

/* ── Headings ─────────────────────────────────────────────────────────────── */
.ditto-h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dp-ink, #16181d);
    margin: 1.5rem 0 .75rem;
}

.ditto-h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dp-ink, #16181d);
    margin: 1.25rem 0 .6rem;
}

/* ── Toggle switch — green when on ───────────────────────────────────────── */
.ditto-page .switch input:checked + .switch-track {
    background: var(--dp-green, #22c55e);
}

/* ── Tracklist header ─────────────────────────────────────────────────────── */
.ditto-tracklist-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.ditto-tracklist-meta {
    display: flex;
    align-items: center;
    gap: .35rem;
    color: var(--dp-muted, #6c7280);
    font-size: .88rem;
    flex: 1;
}

.ditto-clock { color: var(--dp-muted, #6c7280); }

.ditto-add-tracks-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem 1rem;
    border: 1.5px solid var(--dp-ink, #16181d);
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--dp-ink, #16181d);
    text-decoration: none;
    background: transparent;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}
.ditto-add-tracks-btn:hover {
    background: var(--dp-ink, #16181d);
    color: #fff;
}

/* ── Track card ───────────────────────────────────────────────────────────── */
.ditto-track-card {
    border: 1px solid var(--dp-border, #d6d9df);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.ditto-track-card.is-open {
    border-color: var(--dp, #5f1fff);
}

.ditto-track-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .8rem 1rem;
}

.ditto-grip {
    color: #b6b6c8;
    cursor: grab;
    flex: none;
}

.ditto-track-n {
    font-size: 1rem;
    font-weight: 700;
    color: #6c7280;
    min-width: 1.25rem;
    text-align: center;
}

/* Circular purple play button */
.ditto-play-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    background: var(--dp, #5f1fff);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    padding: 0;
    line-height: 0;
    box-sizing: border-box;
    transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
    overflow: hidden;
}
.ditto-play-btn > * { line-height: 0; }
/* Optical nudge — the triangle glyph is heavier on the left, so the
   geometric centre is not the perceived centre. Applied only to the play
   icon so the pause icon (symmetric) stays true-centered. */
.ditto-play-btn .tpb-icon-play { transform: translateX(1px); }
.ditto-play-btn:hover { background: var(--dp-hover, #4a17cc); transform: scale(1.05); box-shadow: 0 4px 12px -4px rgba(95, 31, 255, .5); }
.ditto-play-btn:active { transform: scale(.95); }

/* ═══ Shared production track-player button ═══════════════════════════════
   Any element with .track-play-btn becomes a play/pause toggle. Global
   controller in /js/track-player.js manages state; CSS swaps icons based on
   .is-playing / .is-loading / .is-error classes.

   Two visual variants:
   • Default sits on top of an existing purple circle (.ditto-play-btn or
     .ditto-slider-play), so no extra shell needed.
   • .track-play-btn-md is a stand-alone medium (38px) variant for pages
     that don't already provide a shell (moderation, catalogue). */
.track-play-btn { position: relative; }
.track-play-btn .tpb-icon-play,
.track-play-btn .tpb-icon-pause,
.track-play-btn .tpb-spinner { pointer-events: none; }
.track-play-btn .tpb-icon-pause { display: none; }
.track-play-btn .tpb-spinner { display: none; }
.track-play-btn.is-playing .tpb-icon-play { display: none; }
.track-play-btn.is-playing .tpb-icon-pause { display: inline-block; }
.track-play-btn.is-loading .tpb-icon-play,
.track-play-btn.is-loading .tpb-icon-pause { visibility: hidden; }
.track-play-btn.is-loading .tpb-spinner {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 60%;
    margin: -30% 0 0 -30%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #ffffff;
    animation: tpb-spin .7s linear infinite;
}
.track-play-btn.is-error { background: #dc2626 !important; }
.track-play-btn.is-error::after {
    content: "!";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 700;
    font-size: .82rem;
}
.track-play-btn.is-error .tpb-icon-play,
.track-play-btn.is-error .tpb-icon-pause { display: none; }

@keyframes tpb-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ═══ Moderation audio panel — wraps a Plyr instance ══════════════════
   The player itself (controls, scrubber, volume, speed) is Plyr's; we
   only add a labeled panel around it and re-tint Plyr's main color so
   it matches the app's accent. Plyr's own dark theme is opt-in via the
   `plyr--full-ui` class it manages, so we don't override its structure. */
.mod-audio-panel {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: .85rem 1rem;
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}
.mod-audio-head {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    flex-wrap: wrap;
}
.mod-audio-head strong { color: var(--content-primary); font-size: .92rem; }
.mod-audio-sub {
    font-size: .78rem;
    color: var(--content-secondary);
}
.mod-audio-sub em { font-style: normal; color: var(--content-tertiary); }
.mod-audio-panel .plyr {
    --plyr-color-main: var(--accent-default);
    --plyr-audio-controls-background: var(--surface-raised);
    --plyr-audio-control-color: var(--content-secondary);
    --plyr-audio-control-color-hover: var(--content-on-accent);
    --plyr-audio-control-background-hover: var(--accent-default);
    --plyr-tab-focus-color: var(--accent-default);
    --plyr-menu-background: var(--surface-overlay, var(--surface-raised));
    --plyr-menu-color: var(--content-primary);
    border-radius: 8px;
    border: 1px solid var(--border-default);
    overflow: hidden;
}

/* Stand-alone medium variant — same style contract as .ditto-play-btn but
   usable without the wizard shell markup. */
.track-play-btn-md {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    background: var(--dp, #5f1fff);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    padding: 0;
    line-height: 0;
    box-sizing: border-box;
    overflow: hidden;
    transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.track-play-btn-md > * { line-height: 0; }
.track-play-btn-md .tpb-icon-play { transform: translateX(1px); }
.track-play-btn-md:hover {
    background: var(--dp-hover, #4a17cc);
    transform: scale(1.05);
    box-shadow: 0 4px 12px -4px rgba(95, 31, 255, .5);
}
.track-play-btn-md:active { transform: scale(.95); }
.track-play-btn-md:focus-visible {
    outline: 2px solid var(--dp, #5f1fff);
    outline-offset: 3px;
}

.ditto-track-main {
    flex: 1;
    min-width: 0;
}

.ditto-track-sub {
    display: block;
    font-size: .78rem;
    color: var(--dp-muted, #6c7280);
    margin-top: .1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Edit Metadata pill */
.ditto-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .85rem;
    border: 1.5px solid var(--dp-border, #d6d9df);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--dp-ink, #16181d);
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s ease, background .15s ease;
    font-family: inherit;
    flex: none;
}
.ditto-edit-btn:hover {
    border-color: var(--dp, #5f1fff);
    background: #f7f4ff;
}

/* Delete button */
.ditto-delete-btn {
    color: var(--dp-red, #ef4444);
    background: none;
    border: none;
    cursor: pointer;
    padding: .3rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    flex: none;
    transition: color .15s ease;
}
.ditto-delete-btn:hover { color: #c0392b; }

/* ── Expanded metadata body ───────────────────────────────────────────────── */
.ditto-meta-body {
    padding: 0 1.25rem 1.5rem;
    border-top: 1px solid var(--dp-border, #d6d9df);
    background: #fbfbfe;
}
.ditto-meta-body[hidden] { display: none; }

/* ── Preview slider ───────────────────────────────────────────────────────── */
.ditto-slider-wrap {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .5rem;
}

.ditto-slider-play {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    background: var(--dp, #5f1fff);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    padding: 0;
    line-height: 0;
    box-sizing: border-box;
    overflow: hidden;
    transition: background .15s ease, transform .12s ease;
}
.ditto-slider-play > * { line-height: 0; }
.ditto-slider-play .tpb-icon-play { transform: translateX(1px); }
.ditto-slider-play:hover { background: var(--dp-hover, #4a17cc); }
.ditto-slider-play:active { transform: scale(.95); }

.ditto-slider-track-wrap {
    flex: 1;
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
}

.ditto-range {
    width: 100%;
    accent-color: var(--dp, #5f1fff);
    position: relative;
    z-index: 2;
    margin: 0;
    cursor: pointer;
}

/* Highlighted 30-sec window overlay */
.ditto-range-window {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: rgba(95, 31, 255, .35);
    border-radius: 3px;
    pointer-events: none;
    z-index: 1;
    left: 0;
    width: 0;
}

/* Tooltip dots for start/end handles */
.ditto-range-tooltip {
    position: absolute;
    bottom: calc(100% + 4px);
    font-size: .68rem;
    font-weight: 600;
    background: var(--dp-ink, #16181d);
    color: #fff;
    border-radius: 4px;
    padding: .15rem .4rem;
    white-space: nowrap;
    pointer-events: none;
    z-index: 3;
    transform: translateX(-50%);
}
.ditto-tooltip-start { left: 0; transform: translateX(0); }
.ditto-tooltip-end { left: auto; right: 0; transform: translateX(0); }

/* ── Track title with lock icon ───────────────────────────────────────────── */
.ditto-input-locked {
    position: relative;
    display: flex;
    align-items: center;
}
.ditto-input-locked .ditto-input {
    padding-right: 2rem;
}
.ditto-lock-icon {
    position: absolute;
    right: .6rem;
    color: var(--dp-muted, #6c7280);
    pointer-events: none;
    flex: none;
}

/* ── Audio file line ──────────────────────────────────────────────────────── */
.ditto-audio-file {
    display: flex;
    gap: .5rem;
    align-items: baseline;
    margin: 0;
    overflow: hidden;
    font-size: .85rem;
}
.ditto-audio-file .mono {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--dp, #5f1fff);
    font-size: .78rem;
}
.ditto-replace-link {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    color: var(--dp-muted, #6c7280);
    font-size: .78rem;
    text-decoration: none;
    white-space: nowrap;
}
.ditto-replace-link:hover { color: var(--dp, #5f1fff); }

/* ── Tooltip icon + authentic badge ──────────────────────────────────────── */
.ditto-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.ditto-tooltip-wrap {
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.ditto-authentic-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: #dcfce7;
    color: #15803d;
    border-radius: 999px;
    padding: .2rem .6rem;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Muted text ───────────────────────────────────────────────────────────── */
.ditto-muted {
    color: var(--dp-muted, #6c7280);
    font-size: .85rem;
}

/* ── Credits footer row ───────────────────────────────────────────────────── */
.ditto-credits-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--dp-border, #d6d9df);
    flex-wrap: wrap;
}

.ditto-save-meta-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    border: 1.5px solid var(--dp-border, #d6d9df);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--dp-muted, #6c7280);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.ditto-save-meta-btn:hover {
    border-color: var(--dp, #5f1fff);
    color: var(--dp, #5f1fff);
    background: #f7f4ff;
}

/* ── Wizard preview divider (test anchor — invisible) ─────────────────────── */
.wizard-preview-divider {
    height: 0;
    border: none;
    margin: 0;
    padding: 0;
}

/* ── Back / Next buttons ──────────────────────────────────────────────────── */
.ditto-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dp-border, #d6d9df);
}

.ditto-btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 48px;
    padding: 0 2rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    background: #eeecfa;
    color: var(--dp-ink, #16181d);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease;
}
.ditto-btn-back:hover { background: #ddd9f5; }

.ditto-btn-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 48px;
    padding: 0 2rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--dp, #5f1fff);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background .15s ease;
}
.ditto-btn-next:hover { background: var(--dp-hover, #4a17cc); }
.ditto-btn-next:disabled { background: #b9a5ff; cursor: not-allowed; }

/* ── Responsive tweaks ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ditto-page { padding: 0 .75rem 2rem; }
    .ditto-stepper { padding: .75rem .75rem; margin: 0 -.75rem 1.5rem; }
    .ditto-track-head { flex-wrap: wrap; gap: .5rem; }
    .ditto-edit-btn { font-size: .75rem; padding: .35rem .65rem; }
    .ditto-actions { flex-direction: column; }
    .ditto-btn-back, .ditto-btn-next { min-width: 0; width: 100%; }
}

/* ==========================================================================
   Upload step — scoped to .up-* so nothing else is touched.
   Uses --dp-* tokens already set on .ditto-page.
   ========================================================================== */

/* ── Page container override: white canvas, max-width centred ─────────────── */
.ditto-page.wizard-body {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

/* ── Title row ────────────────────────────────────────────────────────────── */
.up-title-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .5rem;
}
.up-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--dp-ink, #16181d);
    line-height: 1.15;
}
.up-title-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    color: inherit;
    cursor: pointer;
    line-height: inherit;
}
.up-title-btn:hover { opacity: .75; }
.up-help-btn {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--dp-muted, #6c7280);
    transition: background .15s ease, color .15s ease;
    flex: none;
}
.up-help-btn:hover {
    background: var(--dp-bg, #f5f6fa);
    color: var(--dp-ink, #16181d);
}

/* ── Lede + hints ─────────────────────────────────────────────────────────── */
.up-lede {
    color: var(--dp-muted, #6c7280);
    font-size: .95rem;
    margin: 0 0 .75rem;
    max-width: 60ch;
}
.up-hints {
    color: var(--dp-muted, #6c7280);
    font-size: .82rem;
    margin: 0 0 1.5rem;
    padding-left: 1.1rem;
    line-height: 1.65;
}
.up-hints li { margin-bottom: .2rem; }

/* ── Upload status line ───────────────────────────────────────────────────── */
.up-status {
    font-size: .85rem;
    color: var(--dp-muted, #6c7280);
    min-height: 1.25rem;
    margin-bottom: .25rem;
}
.up-status.danger-text { color: var(--dp-red, #ef4444); }

/* ── Track stack ──────────────────────────────────────────────────────────── */
.up-track-stack {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin-top: .75rem;
}

/* Bold track title inside the upload card */
.up-track-title {
    display: block;
    font-size: .95rem;
    font-weight: 700;
    color: var(--dp-ink, #16181d);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Empty state ──────────────────────────────────────────────────────────── */
.up-empty {
    text-align: center;
    padding: 3rem 1rem;
    border: 2px dashed var(--dp-border, #d6d9df);
    border-radius: 12px;
    background: var(--dp-bg, #f5f6fa);
}
.up-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dp-ink, #16181d);
    margin: 0 0 .35rem;
}
.up-empty-sub {
    font-size: .88rem;
    color: var(--dp-muted, #6c7280);
    margin: 0;
}

/* ── "Add more tracks" ghost link ─────────────────────────────────────────── */
.up-add-more-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: none;
    border: 0;
    padding: .5rem 0;
    margin-top: .5rem;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    color: var(--dp-ink, #16181d);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .15s ease;
}
.up-add-more-btn:hover { color: var(--dp, #5f1fff); }

/* ── Next button row ──────────────────────────────────────────────────────── */
.up-actions {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dp-border, #d6d9df);
}
/* ditto-btn-next already styled; just override the is-disabled affordance */
.up-actions .ditto-btn-next.is-disabled {
    background: #c4b5fd;
    pointer-events: none;
    cursor: not-allowed;
    opacity: .55;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .up-title { font-size: 1.5rem; }
    .ditto-page.wizard-body { padding-top: 1.25rem; }
    .up-actions { margin-top: 1.75rem; }
    .up-actions .ditto-btn-next { width: 100%; }
}

/* ── Rights step — flat confirmation checkboxes ──────────────────────────── */
.rights-checks {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin: 1.5rem 0 0;
    padding: 1.25rem 0 0;
    border-top: 1px solid var(--dp-border, #d6d9df);
}
.rights-check-row {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    cursor: pointer;
    font-size: .95rem;
    color: var(--dp-ink, #16181d);
    line-height: 1.5;
}
.rights-check-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: .18rem;
    accent-color: var(--dp, #5f1fff);
    flex: none;
    cursor: pointer;
}

/* ==========================================================================
   Rights & Schedule step — rs-* component styles
   Scoped to .ditto-page.wizard-body. Tokens from .ditto-page vars.
   ========================================================================== */

/* ── Section wrapper ─────────────────────────────────────────────────────── */
.rs-section {
    background: #fff;
    border: 1px solid var(--dp-border, #d6d9df);
    border-radius: 14px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
}

/* ── Section header (icon + title + lede) ────────────────────────────────── */
.rs-section-header {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    margin-bottom: 1.5rem;
}

.rs-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f0eeff;
    color: var(--dp, #5f1fff);
    flex: none;
    margin-top: .1rem;
}

.rs-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--dp-ink, #16181d);
    margin: 0 0 .2rem;
    line-height: 1.2;
}

.rs-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.015em;
    color: var(--dp-ink, #16181d);
    margin: 0 0 .2rem;
    line-height: 1.2;
}

/* ── Two-column field row ────────────────────────────────────────────────── */
.rs-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 620px) {
    .rs-field-row { grid-template-columns: 1fr; }
}

.rs-field { margin: 0 !important; }

.rs-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--dp-muted, #6c7280);
    margin-bottom: .35rem;
    display: block;
}

.rs-label-muted {
    font-weight: 400;
    color: var(--dp-muted, #6c7280);
}

/* ── Inline checkbox (society member) ────────────────────────────────────── */
.rs-checkbox-inline {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--dp-ink, #16181d);
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
}

.rs-checkbox {
    width: 15px;
    height: 15px;
    flex: none;
    accent-color: var(--dp, #5f1fff);
    cursor: pointer;
    margin: 0;
}

/* ── Confirmation block ──────────────────────────────────────────────────── */
.rs-confirm-block {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--dp-border, #d6d9df);
}

.rs-confirm-heading {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--dp-muted, #6c7280);
    margin: 0 0 .75rem;
}

/* override base rights-check-row inside the confirm block for richer layout */
.rs-confirm-block .rights-check-row {
    border: 1px solid var(--dp-border, #d6d9df);
    border-radius: 10px;
    padding: .9rem 1rem;
    transition: border-color .15s ease, background .15s ease;
}
.rs-confirm-block .rights-check-row:hover {
    border-color: var(--dp, #5f1fff);
    background: #f9f8ff;
}
.rs-confirm-block .rights-check-row:has(input:checked) {
    border-color: var(--dp, #5f1fff);
    background: #f2eeff;
}

.rs-check-content {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.rs-check-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--dp-ink, #16181d);
    display: block;
}

/* ── Release date ────────────────────────────────────────────────────────── */
.rs-date-block {
    margin-bottom: 1.25rem;
}

.rs-field-error {
    font-size: .8rem;
    color: var(--dp-red, #ef4444);
    margin: .25rem 0;
}

.rs-date-input {
    max-width: 220px;
}

/* ── Distro selection cards ──────────────────────────────────────────────── */
.rs-distro-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 600px) {
    .rs-distro-row { grid-template-columns: 1fr; }
}

.rs-distro-card {
    position: relative;
    display: block;
    border: 1.5px solid var(--dp-border, #d6d9df);
    border-radius: 12px;
    padding: 1.1rem 1.1rem 1rem;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
    overflow: hidden;
}
.rs-distro-card:hover {
    border-color: #b9a5ff;
    box-shadow: 0 2px 8px rgba(95,31,255,.08);
}

.rs-distro-card--active {
    border-color: var(--dp, #5f1fff);
    background: #f9f8ff;
    box-shadow: 0 0 0 3px rgba(95,31,255,.10);
}

.rs-distro-card--coming-soon {
    opacity: .65;
    cursor: not-allowed;
}
.rs-distro-card--coming-soon:hover {
    border-color: var(--dp-border, #d6d9df);
    box-shadow: none;
}

.rs-distro-card-inner {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.rs-distro-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
}

.rs-distro-icon--standard {
    background: #e8f5e9;
    color: #22c55e;
}

.rs-distro-icon--priority {
    background: #fff8e6;
    color: #f59e0b;
}

.rs-distro-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--dp-ink, #16181d);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.rs-distro-days {
    font-size: .82rem;
    font-weight: 600;
    color: var(--dp, #5f1fff);
}

.rs-distro-desc {
    font-size: .82rem;
    color: var(--dp-muted, #6c7280);
    line-height: 1.5;
}

.rs-distro-price {
    font-size: .9rem;
    font-weight: 700;
    color: var(--dp-ink, #16181d);
    margin-top: .25rem;
}

.rs-distro-price--free {
    color: #22c55e;
}

.rs-distro-selected-badge {
    position: absolute;
    top: .65rem;
    right: .65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--dp, #5f1fff);
    color: #fff;
}

.rs-coming-soon-badge {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: #fef3c7;
    color: #92400e;
    padding: .15rem .45rem;
    border-radius: 999px;
}

/* ── Toggle stack (pill Yes/No rows) ─────────────────────────────────────── */
.rs-toggle-stack {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-top: .25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dp-border, #d6d9df);
}

.rs-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem 0;
}
.rs-toggle-row + .rs-toggle-row {
    border-top: 1px solid var(--dp-border, #d6d9df);
}

.rs-toggle-text { flex: 1; }

.rs-toggle-label {
    font-size: .9rem;
    color: var(--dp-ink, #16181d);
}

.rs-pill-group {
    display: flex;
    gap: .35rem;
    flex: none;
}

.rs-pill {
    display: inline-flex;
    align-items: center;
    padding: .3rem .9rem;
    border-radius: 999px;
    border: 1.5px solid var(--dp-border, #d6d9df);
    font-size: .85rem;
    font-weight: 600;
    color: var(--dp-muted, #6c7280);
    cursor: pointer;
    user-select: none;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.rs-pill input { position: absolute; opacity: 0; pointer-events: none; }
.rs-pill:hover {
    border-color: #b9a5ff;
    color: var(--dp, #5f1fff);
}
.rs-pill--active {
    border-color: var(--dp, #5f1fff);
    background: #f2eeff;
    color: var(--dp, #5f1fff);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .rs-section { padding: 1.25rem 1rem; }
    .rs-toggle-row { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .rs-date-input { max-width: 100%; }
}


/* ============================================================
   Upload progress cards — per-file XHR progress with ring
   ============================================================ */
.upload-progress { display: flex; flex-direction: column; gap: .5rem;
  margin: 1rem 0 0; }
.upload-progress:empty { display: none; }

.up-card { display: flex; align-items: center; gap: 1rem;
  padding: .875rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: .75rem;
  background: #ffffff;
  transition: border-color .2s ease, background .2s ease;
}
.up-card.up-done { border-color: #86efac; background: #f0fdf4; }
.up-card.up-fail { border-color: #fca5a5; background: #fef2f2; }

.up-ring-wrap { position: relative; width: 44px; height: 44px;
  flex-shrink: 0; }
.up-ring { transform: rotate(-90deg); display: block; }
.up-ring-track { stroke: #e5e7eb; }
.up-ring-bar   { stroke: #5f1fff;
  transition: stroke-dashoffset .3s linear, stroke .2s ease; }
.up-card.up-done .up-ring-bar { stroke: #16a34a; }
.up-card.up-fail .up-ring-bar { stroke: #dc2626; }

.up-ring-pct { position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 600; color: #16181d;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.up-card.up-done .up-ring-pct { color: #16a34a; }
.up-card.up-fail .up-ring-pct { color: #dc2626; }

.up-card-body { display: flex; flex-direction: column;
  min-width: 0; flex: 1; gap: .15rem; }
.up-name { font-size: .9rem; font-weight: 600; color: #16181d;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-state { font-size: .78rem; color: #6c7280; }
.up-card.up-done .up-state { color: #16a34a; font-weight: 500; }
.up-card.up-fail .up-state { color: #dc2626; font-weight: 500; }

/* Licence document panel — bordered container that groups attached evidence
   files under a track row, so the chips are anchored rather than floating
   loose. Small header shows count + doc icon; chip strip below. */
.lic-panel {
  margin: .75rem 0 0 2.25rem;
  padding: .625rem .75rem .75rem;
  background: #fafaff;
  border: 1px solid #ece7ff;
  border-radius: 10px;
}
.lic-panel-head {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  margin-bottom: .55rem;
  color: #5f1fff;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
/* Licence document chips — pill affordance: rounded, subtle bg, doc icon,
   filename truncated, close × on the right. Multiple wrap in a flex row. */
.lic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0;
  padding: 0;
}
.lic-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  max-width: 260px;
  padding: .3rem .5rem .3rem .6rem;
  background: #f4f1ff;
  border: 1px solid #e4dbff;
  border-radius: 999px;
  color: #3f2ea8;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease;
}
.lic-chip:hover { background: #ece5ff; border-color: #d3c4ff; }
.lic-chip::before {
  content: "";
  flex: none;
  width: 12px;
  height: 14px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f1fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><polyline points='14 2 14 8 20 8'/></svg>");
}
.lic-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.lic-chip-form { display: inline-flex; margin: 0; padding: 0; background: none; border: 0; }
.lic-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6c53d7;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.lic-chip-x:hover { background: #dc2626; color: #ffffff; }
.lic-chip-x:focus-visible {
  outline: 2px solid #5f1fff;
  outline-offset: 1px;
}

/* Moderation evidence list — filename opens the document in a new tab so a
   moderator can eyeball a licence PDF or a JPG of a signed sheet without
   leaving the review page. */
.files { list-style: none; padding: 0; margin: 0; }
.files > li {
  padding: .625rem 0;
  border-bottom: 1px solid #eef0f2;
}
.files > li:last-child { border-bottom: 0; }
.files .row {
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-wrap: wrap;
}
.evidence-link {
  color: #3f2ea8;
  text-decoration: none;
}
.evidence-link:hover { text-decoration: underline; color: #2a1c7f; }
.evidence-link strong { font-weight: 600; }
.evidence-open-btn { margin-left: auto; }

/* Artist picker modal — opens from any Primary/Featured/Remixer chip on
   Details. Lists every artist from the vendor's roster with live search. */
.artist-picker {
  max-width: 540px;
  width: 100%;
  padding: 1.75rem 1.75rem 1.5rem;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 25px 65px -22px rgba(16, 24, 40, .38);
  border: 1px solid var(--w-line, #e5e7eb);
}
.artist-picker h2 {
  margin: 0 0 .35rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--w-ink, #101f3c);
  letter-spacing: -.01em;
  padding-right: 2rem;
}
.artist-picker > .hint {
  margin: 0 0 1.1rem;
  font-size: .84rem;
  color: #6c7280;
  line-height: 1.4;
}
.artist-picker-search {
  position: relative;
  margin-bottom: .875rem;
}
.artist-picker-search::before {
  content: "";
  position: absolute;
  left: .875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  pointer-events: none;
}
.artist-picker-search input {
  width: 100%;
  padding: .7rem .85rem .7rem 2.35rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: .92rem;
  background: #f9fafb;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.artist-picker-search input:focus {
  outline: none;
  background: #ffffff;
  border-color: #5f1fff;
  box-shadow: 0 0 0 4px rgba(95, 31, 255, .12);
}
.artist-picker-list {
  list-style: none;
  margin: 0;
  padding: .25rem;
  max-height: 360px;
  overflow-y: auto;
  border: 1.5px solid #eef0f2;
  border-radius: 10px;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.artist-picker-list::-webkit-scrollbar { width: 8px; }
.artist-picker-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.artist-picker-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .75rem;
  border-radius: 8px;
  transition: background .12s ease;
}
.artist-picker-item + .artist-picker-item { margin-top: 2px; }
.artist-picker-item:hover { background: #f4f1ff; }
.artist-picker-item img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid #eef0f2;
}
.artist-picker-name {
  flex: 1;
  font-size: .92rem;
  font-weight: 500;
  color: #16181d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artist-picker-add {
  padding: .38rem .95rem;
  border: 1.5px solid #5f1fff;
  background: #ffffff;
  color: #5f1fff;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .1s ease;
}
.artist-picker-add:hover {
  background: #5f1fff;
  color: #ffffff;
  transform: translateY(-1px);
}
.artist-picker-add:active { transform: translateY(0); }
.artist-picker-add.is-added,
.artist-picker-add:disabled {
  background: #f4f1ff;
  border-color: #d3c4ff;
  color: #6c53d7;
  cursor: default;
  transform: none;
}
.artist-picker-add.is-added::before {
  content: "\2713 ";
  font-weight: 700;
  margin-right: .15rem;
}
.artist-picker-empty {
  text-align: center;
  padding: 1.5rem .5rem .25rem;
  color: #6c7280;
}
.artist-picker-empty a { color: #5f1fff; font-weight: 600; }

/* Remove-× on a Primary/Featured/Remixer chip: overlay in the top-right
   corner of the avatar, revealed on hover so the resting chip looks clean.
   The chip itself is a vertical column (avatar + label), so anything inline
   after the name would sit BELOW the name and break the grid — this must be
   positioned absolute. */
.artist-chip { position: relative; }
.chip-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #16181d;
  color: #ffffff;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  z-index: 2;
}
.artist-chip:hover .chip-remove,
.artist-chip:focus-within .chip-remove {
  opacity: 1;
  transform: scale(1);
}
.chip-remove:hover { background: #dc2626; }
.chip-remove:focus-visible { outline: 2px solid var(--w-primary, #5f1fff); outline-offset: 2px; opacity: 1; transform: scale(1); }

/* Status line above the progress list */
.up-status { font-size: .82rem; color: #6c7280;
  min-height: 1.2em; margin: .25rem 0 0; }
.up-status.danger-text { color: #dc2626; font-weight: 500; }

/* Indeterminate pulse when the ring sits at 95% during
   server-side FFmpeg processing (probe/scan/decode/HLS/waveform). */
.up-card:not(.up-done):not(.up-fail) .up-ring-bar {
  animation: up-ring-pulse 1.4s ease-in-out infinite;
}
@keyframes up-ring-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}

/* ══ Admin vendors list ═════════════════════════════════════════════════ */
.vendors-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.vendors-title { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; color: var(--content-primary); }
.vendors-total {
    display: inline-block;
    margin-left: .35rem;
    padding: .1rem .55rem;
    background: var(--accent-subtle);
    color: var(--accent-content);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
}
.vendors-lede { margin: .35rem 0 0; max-width: 60ch; color: var(--content-secondary); font-size: .88rem; }
.vendors-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .85rem;
    background: color-mix(in oklab, #f97316 14%, var(--surface-raised));
    border: 1px solid color-mix(in oklab, #f97316 30%, transparent);
    color: color-mix(in oklab, #9a3412 60%, var(--content-primary));
    border-radius: 10px;
    font-size: .85rem;
}
[data-theme="dark"] .vendors-badge,
[data-theme="midnight"] .vendors-badge { color: #fdba74; }
.vendors-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f97316;
    animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.4); opacity: .55; }
}

/* Filter bar */
.vendors-filterbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    background: var(--surface-raised);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.vendors-search {
    position: relative;
    flex: 1;
    min-width: 240px;
}
.vendors-search svg {
    position: absolute;
    left: .8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--content-secondary);
    pointer-events: none;
}
.vendors-search input {
    width: 100%;
    padding: .55rem .85rem .55rem 2.35rem;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: var(--surface-sunken);
    color: var(--content-primary);
    font-size: .9rem;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.vendors-search input::placeholder { color: var(--content-tertiary); }
.vendors-search input:focus {
    outline: none;
    background: var(--surface-raised);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--border-focus) 20%, transparent);
}
.vendors-filter-pills { display: inline-flex; gap: .35rem; flex-wrap: wrap; }
.vendors-pill {
    padding: .38rem .85rem;
    border-radius: 999px;
    background: transparent;
    color: var(--content-secondary);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.vendors-pill:hover { background: var(--accent-subtle); color: var(--accent-content); }
.vendors-pill.is-active {
    background: var(--accent-default);
    color: var(--content-on-accent);
    border-color: var(--accent-default);
}
.vendors-apply { align-self: center; }

/* Empty state */
.vendors-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: var(--surface-raised);
    border: 1px dashed var(--border-default);
    border-radius: 12px;
    color: var(--content-secondary);
    gap: .75rem;
}
.vendors-empty svg { color: var(--border-strong); }
.vendors-empty-title { margin: 0; font-weight: 600; color: var(--content-primary); }

/* Vendor cards grid */
.vendors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 1rem;
}
/* ═══════════════════════════════════════════════════════════════════════
   Artist roster cards — /vendor/artists. Token-driven so light + dark
   flip cleanly. Grid layout, each card shows avatar + identity + bio +
   meta pairs + social links + edit action.
   ═══════════════════════════════════════════════════════════════════════ */
.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}
.artist-card {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1rem 1.1rem;
    background: var(--surface-raised);
    color: var(--content-primary);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: box-shadow .15s ease, transform .12s ease, border-color .15s ease;
}
.artist-card:hover {
    box-shadow: 0 8px 22px -12px rgba(16, 24, 40, .28);
    transform: translateY(-1px);
    border-color: var(--border-strong);
}
[data-theme="dark"] .artist-card,
[data-theme="midnight"] .artist-card { box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
[data-theme="dark"] .artist-card:hover,
[data-theme="midnight"] .artist-card:hover { box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .55); }

.artist-card-head {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}
.artist-avatar {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-default);
}
.artist-identity { flex: 1; min-width: 0; }
.artist-name {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--content-primary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.artist-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: .35rem;
}
.artist-edit-btn { flex: none; }

.artist-bio {
    margin: 0;
    font-size: .82rem;
    color: var(--content-secondary);
    line-height: 1.45;
    padding: .5rem .65rem;
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.artist-meta {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem .75rem;
    padding: .6rem .7rem;
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}
.artist-meta-item { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.artist-meta-item dt {
    font-size: .66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--content-secondary);
    margin: 0;
}
.artist-meta-item dd {
    margin: 0;
    font-size: .82rem;
    color: var(--content-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artist-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .55rem;
    padding-top: .5rem;
    border-top: 1px dashed var(--border-default);
}
.artist-social {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .6rem;
    background: var(--accent-subtle);
    color: var(--accent-content);
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.artist-social:hover {
    background: var(--accent-default);
    color: var(--content-on-accent);
}
.artist-social-empty {
    font-size: .74rem;
    color: var(--content-tertiary);
    font-style: italic;
}

.chip-neutral {
    background: var(--surface-hover);
    color: var(--content-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════
   Vendor cards — driven by semantic tokens (tokens.css) so light + dark
   flip automatically via [data-theme]. Hard-coded hex is used only for
   status/chip accent color families that must stay meaningful across
   themes (green/amber/red/grey) — those are lifted into token-aware
   `color-mix` pairs so the tinted background reads on either canvas.
   ═══════════════════════════════════════════════════════════════════════ */
.vendor-card {
    display: flex;
    flex-direction: column;
    gap: .875rem;
    padding: 1.1rem 1.15rem 1rem;
    background: var(--surface-raised);
    color: var(--content-primary);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    border-left: 4px solid var(--border-strong);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: box-shadow .15s ease, transform .12s ease, border-color .15s ease;
}
.vendor-card:hover {
    box-shadow: 0 8px 22px -12px rgba(16, 24, 40, .32);
    transform: translateY(-1px);
    border-color: var(--border-strong);
}
[data-theme="dark"] .vendor-card,
[data-theme="midnight"] .vendor-card {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
[data-theme="dark"] .vendor-card:hover,
[data-theme="midnight"] .vendor-card:hover {
    box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .55);
}
.vendor-card.is-active    { border-left-color: #22c55e; }
.vendor-card.is-pending   { border-left-color: #f59e0b; }
.vendor-card.is-suspended { border-left-color: #ef4444; }
.vendor-card.is-neutral   { border-left-color: var(--border-strong); }

.vendor-card-head {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
}
.vendor-avatar {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--accent-subtle);
    color: var(--accent-content);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .02em;
    border: 1px solid color-mix(in oklab, var(--accent-default) 25%, transparent);
}
.vendor-identity { flex: 1; min-width: 0; }
.vendor-name {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--content-primary);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vendor-sub {
    margin: .2rem 0 0;
    font-size: .8rem;
    color: var(--content-secondary);
}
.vendor-status-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .3rem;
    flex: none;
}
.vendor-status {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
/* Status pills — color-mix keeps the tinted bg readable on both light
   and dark canvases. On light: green 12% tint over white ≈ #e6f8ec. On
   dark: green 22% tint over neutral-900 ≈ readable emerald wash. */
.vendor-status.is-active    { background: color-mix(in oklab, #22c55e 16%, var(--surface-raised)); color: color-mix(in oklab, #16a34a 60%, var(--content-primary)); }
.vendor-status.is-pending   { background: color-mix(in oklab, #f59e0b 18%, var(--surface-raised)); color: color-mix(in oklab, #b45309 60%, var(--content-primary)); }
.vendor-status.is-suspended { background: color-mix(in oklab, #ef4444 18%, var(--surface-raised)); color: color-mix(in oklab, #b91c1c 60%, var(--content-primary)); }
.vendor-status.is-neutral   { background: var(--surface-hover); color: var(--content-secondary); }
[data-theme="dark"] .vendor-status.is-active,
[data-theme="midnight"] .vendor-status.is-active     { background: color-mix(in oklab, #22c55e 22%, var(--surface-raised)); color: #4ade80; }
[data-theme="dark"] .vendor-status.is-pending,
[data-theme="midnight"] .vendor-status.is-pending    { background: color-mix(in oklab, #f59e0b 24%, var(--surface-raised)); color: #fbbf24; }
[data-theme="dark"] .vendor-status.is-suspended,
[data-theme="midnight"] .vendor-status.is-suspended  { background: color-mix(in oklab, #ef4444 24%, var(--surface-raised)); color: #f87171; }
.vendor-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.vendor-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .7rem;
    color: var(--content-tertiary);
}

/* Meta grid — sunken surface reads as an inset panel in both themes. */
.vendor-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem .85rem;
    padding: .75rem;
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
}
.vendor-meta-item { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.vendor-meta-k {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--content-secondary);
}
.vendor-meta-v {
    font-size: .85rem;
    color: var(--content-primary);
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
    word-break: break-word;
}
.vendor-meta-sub {
    font-size: .72rem;
    color: var(--content-secondary);
    display: block;
    width: 100%;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.4;
}
.chip-ok     { background: color-mix(in oklab, #22c55e 16%, var(--surface-raised)); color: color-mix(in oklab, #16a34a 60%, var(--content-primary)); }
.chip-warn   { background: color-mix(in oklab, #f59e0b 20%, var(--surface-raised)); color: color-mix(in oklab, #b45309 60%, var(--content-primary)); }
.chip-danger { background: color-mix(in oklab, #ef4444 18%, var(--surface-raised)); color: color-mix(in oklab, #b91c1c 60%, var(--content-primary)); }
.chip-muted  { background: var(--surface-hover); color: var(--content-secondary); }
[data-theme="dark"] .chip-ok,
[data-theme="midnight"] .chip-ok     { color: #4ade80; }
[data-theme="dark"] .chip-warn,
[data-theme="midnight"] .chip-warn   { color: #fbbf24; }
[data-theme="dark"] .chip-danger,
[data-theme="midnight"] .chip-danger { color: #f87171; }

/* Actions footer */
.vendor-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding-top: .5rem;
    border-top: 1px dashed var(--border-default);
    flex-wrap: wrap;
}
.vendor-can-upload { flex: 0 0 auto; }
.vendor-action-form {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.vendor-check {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    color: var(--content-secondary);
    cursor: pointer;
}
.vendor-note-input {
    padding: .35rem .55rem;
    border: 1px solid var(--border-default);
    border-radius: 6px;
    font-size: .82rem;
    min-width: 160px;
    background: var(--surface-raised);
    color: var(--content-primary);
}
.vendor-note-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--border-focus) 20%, transparent);
}
.vendor-block-note {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: 0;
    padding: .5rem .7rem;
    background: color-mix(in oklab, #ef4444 12%, var(--surface-raised));
    border: 1px solid color-mix(in oklab, #ef4444 30%, transparent);
    border-radius: 8px;
    font-size: .78rem;
    color: color-mix(in oklab, #b91c1c 60%, var(--content-primary));
}
[data-theme="dark"] .vendor-block-note,
[data-theme="midnight"] .vendor-block-note {
    color: #fca5a5;
    background: color-mix(in oklab, #ef4444 16%, var(--surface-raised));
}

/* Suspend modal */
.suspend-modal {
    max-width: 520px;
    width: 100%;
    padding: 1.75rem 1.75rem 1.5rem;
    border-radius: 16px;
    background: var(--surface-overlay, var(--surface-raised));
    color: var(--content-primary);
    border: 1px solid var(--border-default);
}
.suspend-lede { margin: 0 0 1rem; font-size: .92rem; color: var(--content-secondary); }
.suspend-undo-note {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .7rem .85rem;
    background: color-mix(in oklab, #3b82f6 14%, var(--surface-raised));
    border: 1px solid color-mix(in oklab, #3b82f6 30%, transparent);
    color: color-mix(in oklab, #1e40af 60%, var(--content-primary));
    border-radius: 10px;
    font-size: .82rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}
[data-theme="dark"] .suspend-undo-note,
[data-theme="midnight"] .suspend-undo-note { color: #93c5fd; }
.suspend-undo-note svg { flex: none; margin-top: 1px; }
.suspend-reason-input {
    width: 100%;
    padding: .65rem .8rem;
    border: 1.5px solid var(--border-default);
    border-radius: 8px;
    background: var(--surface-sunken);
    color: var(--content-primary);
    font: inherit;
    font-size: .9rem;
    resize: vertical;
    min-height: 84px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.suspend-reason-input::placeholder { color: var(--content-tertiary); }
.suspend-reason-input:focus {
    outline: none;
    background: var(--surface-raised);
    border-color: #ef4444;
    box-shadow: 0 0 0 3px color-mix(in oklab, #ef4444 20%, transparent);
}
.suspend-hint { margin: .35rem 0 0; text-align: right; font-size: .72rem; color: var(--content-tertiary); }

/* ══ Show-once credentials modal (API tokens + webhook secrets) ═══════ */
.secret-modal {
    max-width: 620px;
    width: 100%;
    padding: 1.75rem 1.75rem 1.5rem;
    border-radius: 16px;
    border: 1px solid #fee2e2;
    box-shadow: 0 25px 65px -22px rgba(220, 38, 38, .3);
}
.secret-modal h2 {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .35rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #b91c1c;
}
.secret-lede {
    margin: 0 0 1.1rem;
    font-size: .85rem;
    color: #4b5563;
    line-height: 1.45;
}
.secret-row {
    margin-bottom: 1rem;
    padding: .875rem;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
}
.secret-row:last-of-type { margin-bottom: 0; }
.secret-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .5rem;
}
.secret-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9a3412;
}
.secret-copy {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #ffffff;
    color: #b45309;
    border: 1px solid #fcd34d;
    padding: .3rem .7rem;
    border-radius: 6px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.secret-copy:hover { background: #fef3c7; }
.secret-copy.is-copied {
    background: #d1fae5;
    color: #047857;
    border-color: #6ee7b7;
}
.secret-value {
    margin: 0;
    padding: .65rem .8rem;
    background: #16181d;
    color: #e5e7eb;
    border-radius: 8px;
    font-size: .82rem;
    word-break: break-all;
    white-space: pre-wrap;
    user-select: all;
}
.secret-hint {
    margin: .5rem 0 0;
    font-size: .72rem;
    color: #78716c;
}
