:root {
  /* Merphi Orange product design tokens (Phase 2.7) */
  --brand-orange: #F96302;
  --brand-orange-hover: #E65300;
  --brand-orange-pressed: #CC4C00;
  --brand-orange-soft: #FFF1E8;
  --brand-orange-focus: rgba(249, 99, 2, 0.24);
  --focus: var(--brand-orange);
  --focus-ring: var(--brand-orange-focus);

  --ink: #090A0D;
  --ink-primary: #121318;
  --ink-soft: #14161B;
  --ink-secondary: #667085;
  --surface-dark: #191C22;
  --canvas: #F3F4F6;
  --surface: #FFFFFF;
  --surface-secondary: #F8F9FB;
  --text-primary: #121318;
  --text-secondary: #69717D;
  --border: #DDE1E7;
  --border-strong: #C7CED8;

  /* Semantic only — never use for ordinary selection/chrome */
  --success: #18845B;
  --success-soft: #E1F1E8;
  --warning: #B46B00;
  --warning-soft: #FBEFCF;
  --danger: #C33D43;
  --danger-soft: #FAE5E5;
  --info: #356EC2;
  --info-soft: #E4EEFC;

  /* Legacy aliases */
  --ink-2: #2F343D;
  --muted: var(--text-secondary);
  --muted-2: #9198A3;
  --surface-muted: var(--surface-secondary);
  --surface-2: var(--surface-secondary);
  --surface-3: #E7EAEE;
  --line: var(--border);
  --line-strong: var(--border-strong);
  --black: var(--ink);
  --black-2: var(--ink-soft);
  /* Deprecated interaction teal → orange (non-semantic chrome) */
  --teal: var(--brand-orange);
  --teal-soft: var(--brand-orange-soft);
  --coral: var(--brand-orange);
  --coral-soft: var(--brand-orange-soft);
  --blue: var(--info);
  --blue-soft: var(--info-soft);
  --gold: #986614;
  --gold-soft: var(--warning-soft);
  --violet: #6A55A4;
  --violet-soft: #EEE9FA;
  --green: var(--success);
  --green-soft: var(--success-soft);
  --red: var(--danger);
  --red-soft: var(--danger-soft);

  --radius: 12px;
  --radius-card: 16px;
  --radius-control: 12px;
  --control-height: 44px;
  --section-gap: 28px;
  --field-gap: 18px;
  --shadow: 0 14px 40px rgba(17, 19, 24, 0.12);
  --shadow-overlay: 0 18px 48px rgba(17, 19, 24, 0.14);
  --header-height: 56px;
  --font-size-body: 14px;
  --font-size-meta: 12px;
  --touch-min: 44px;
  --motion-fast: 140ms;
  --motion-base: 220ms;
  --motion-slow: 420ms;
  --ease-standard: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text-primary);
  font-family: "Segoe UI", "IBM Plex Sans", system-ui, sans-serif;
  font-size: var(--font-size-body);
  line-height: 1.5;
  letter-spacing: 0;
}
button, input, select, textarea,
.control, [contenteditable="true"] {
  font: inherit;
  font-family: inherit;
  letter-spacing: inherit;
}
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .global-nav-item:focus-visible, .icon-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent);
  outline-offset: 2px;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.2; }
/* Route changes move screen-reader focus to the page title.  Headings are not
   interactive controls, so suppress the browser's heavy default rectangle
   while keeping focus movement and visible rings on every real control. */
main h1[tabindex="-1"]:focus { outline: none; }
a { color: inherit; }
.hidden, [hidden] { display: none !important; }
.mono { font-family: var(--font-mono, Consolas, "SFMono-Regular", monospace); }
.muted { color: var(--muted); }
.danger-text { color: var(--red); }

.overline {
  margin: 0 0 7px;
  color: var(--text-secondary);
  font-size: var(--font-size-meta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.brand-lockup { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-wordmark-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  flex: 0 1 auto;
}
.auth-brand-wordmark { width: 180px; height: 37px; }
.brand-wordmark-header { width: 107px; height: 22px; }
.brand-symbol {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--brand-orange);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}
/* Temporary mobile fallback until a designer compact mark is supplied */
.brand-symbol-mobile-fallback { display: none; }
.brand-lockup strong, .brand-lockup small { display: block; white-space: nowrap; }
.brand-lockup strong { font-size: 14px; line-height: 1; }
.brand-lockup small { margin-top: 4px; color: var(--muted-2); font-size: var(--font-size-meta); text-transform: uppercase; }
.brand-lockup-light strong { color: #fff; }
.agreement-brand-mark { width: 160px; height: 33px; margin-bottom: 12px; }

.button {
  min-height: var(--touch-min);
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font-weight: 650;
  font-size: var(--font-size-body);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 130ms ease, border-color 130ms ease, transform 130ms ease;
}
.button:hover { background: var(--surface-2); border-color: #aeb5bf; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.button svg { width: 16px; height: 16px; flex: 0 0 auto; }
.button-primary { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
.button-primary:hover { background: var(--brand-orange-hover); border-color: var(--brand-orange-hover); }
.button-accent { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
.button-accent:hover { background: var(--brand-orange-hover); border-color: var(--brand-orange-hover); }
.button-secondary { background: var(--surface); }
.button-quiet { border-color: transparent; background: transparent; }
.button-quiet:hover { background: var(--surface-3); border-color: transparent; }
.button-danger { color: var(--danger); border-color: #e3b7b7; }
.button-block { width: 100%; }
.button-small { min-height: 40px; padding: 0 10px; font-size: var(--font-size-meta); }

.icon-button {
  width: var(--touch-min);
  height: var(--touch-min);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: inline-grid;
  place-items: center;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
}
.icon-button:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-button svg { width: 17px; height: 17px; }
.icon-button-dark { border-color: transparent; background: transparent; color: #989da7; }
.icon-button-dark:hover { border-color: #383b42; background: #282a30; color: #fff; }

.control {
  width: 100%;
  min-height: var(--control-height, 44px);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control, 12px);
  background: var(--surface);
  color: var(--text-primary);
}
textarea.control { resize: vertical; }
.control:hover { border-color: var(--border-strong); }
.control:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-orange-focus); border-color: var(--brand-orange); }
.control::placeholder { color: #9ca3ad; }
.control[disabled] { background: var(--surface-2); color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.address-suggest-field { position: relative; }
.address-suggest-list {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line, #ddd);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 16, 12, 0.12);
  max-height: 220px;
  overflow: auto;
}
.address-suggest-list[hidden] { display: none !important; }
.address-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.address-suggest-item:hover,
.address-suggest-item:focus-visible {
  background: color-mix(in srgb, #f97316 10%, white);
  outline: none;
}
.field > span:first-child, .field-label { color: var(--ink-2); font-size: 11px; font-weight: 700; }
.field-help { color: var(--muted); font-size: 11px; }
.form-grid { display: grid; gap: 16px; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.form-error { margin: 12px 0 0; color: var(--red); font-size: 12px; }
.control-invalid, .control-invalid:hover { border-color: var(--red); }
.control-invalid:focus { outline: 2px solid rgba(199, 63, 63, 0.18); outline-offset: 1px; }
.field-error { color: var(--red); font-size: 11px; line-height: 1.35; }
.field-error.check-error { margin: -10px 0 0 25px; }
.check-line { display: flex; align-items: flex-start; gap: 9px; color: var(--ink-2); font-size: 12px; cursor: pointer; }
.check-line input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--brand-orange); }
.switch-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { width: 34px; height: 19px; appearance: none; border-radius: 12px; background: #cbd0d7; position: relative; cursor: pointer; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; width: 15px; height: 15px; top: 2px; left: 2px; border-radius: 50%; background: #fff; transition: transform 130ms ease; }
.switch:checked { background: var(--brand-orange); }
.switch:checked::after { transform: translateX(15px); }

.auth-screen { min-height: 100vh; min-height: 100dvh; height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(360px, 0.9fr) minmax(500px, 1.1fr); background: var(--surface); overflow: hidden; }
.auth-brand { min-height: 0; height: 100%; padding: 38px 44px; display: flex; flex-direction: column; justify-content: space-between; background: var(--black); color: #fff; border-right: 1px solid #050506; }
.auth-brand-copy { max-width: 560px; }
.auth-brand-copy .overline { color: #8c919b; }
.auth-brand-copy h1 { max-width: 520px; margin: 0 0 18px; color: #fff; font-size: 42px; font-weight: 650; }
.auth-brand-description { margin: 0; max-width: 480px; color: #adb1ba; font-size: 15px; line-height: 1.55; }
.auth-brand-foot { margin: 0; color: #737883; font-size: 11px; }
.auth-workspace { min-height: 0; height: 100%; padding: 48px; display: grid; place-items: center; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.auth-pane { width: min(360px, 100%); }
.auth-pane-wide { width: min(760px, 100%); padding: 20px 0; }
.auth-pane h2 { margin: 0 0 24px; font-size: 27px; }
.auth-pane-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.auth-form, .registration-form { display: flex; flex-direction: column; gap: 16px; }
.registration-success { display: flex; align-items: flex-start; gap: 16px; padding: 22px; border: 1px solid #a8d9c2; border-radius: var(--radius); background: #f2fbf6; }
.registration-success-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #d7f2e4; color: #17744a; }
.registration-success-icon svg { width: 20px; height: 20px; }
.registration-success h3 { margin: 1px 0 6px; font-size: 18px; }
.registration-success p { margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.password-control { position: relative; display: block; }
.password-control .control { padding-right: 46px; }
.password-control .icon-button { position: absolute; right: 2px; top: 2px; border-color: transparent; }
.auth-separator { margin: 24px 0; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.auth-separator::before, .auth-separator::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.app-shell { min-height: 100vh; }
.global-header {
  height: var(--header-height);
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) auto;
  align-items: stretch;
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--black);
  border-bottom: 1px solid #050506;
  color: #fff;
}
.global-brand { padding: 0 18px; display: flex; align-items: center; border-right: 1px solid #2a2c31; }
.global-nav { min-width: 0; display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.global-nav::-webkit-scrollbar { display: none; }
.global-nav-item { min-width: max-content; padding: 0 14px; border: 0; border-right: 1px solid #282a30; display: inline-flex; align-items: center; gap: 7px; background: transparent; color: #aeb2bb; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; }
.global-nav-item:hover { background: #1d1f24; color: #fff; }
.global-nav-item.active { background: #24272d; color: #fff; box-shadow: inset 0 -3px 0 var(--brand-orange); }
.global-nav-item svg { width: 15px; height: 15px; }
.nav-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; background: #d65751; color: #fff; font-size: 9px; }
.global-actions { padding: 0 12px; display: flex; align-items: center; gap: 12px; border-left: 1px solid #2a2c31; }
.global-actions .button { min-height: 32px; }
.account-block { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #3d72c4; color: #fff; font-size: 9px; font-weight: 800; }
.account-copy { min-width: 0; max-width: 145px; }
.account-copy strong, .account-copy small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-copy strong { color: #fff; font-size: 11px; }
.account-copy small { color: #818792; font-size: 9px; text-transform: capitalize; }

.workspace { min-height: calc(100vh - var(--header-height)); }
.page-shell { width: min(1680px, 100%); margin: 0 auto; padding: 28px 30px 56px; }
.page-header { min-height: 62px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.page-header h1 { margin: 0 0 6px; font-size: 24px; font-weight: 680; }
.page-header p:not(.overline) { margin: 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; align-items: center; gap: 9px; }

.metric-strip { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.metric { min-width: 0; min-height: 78px; padding: 15px 18px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.metric strong { display: block; margin-top: 7px; font-size: 21px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric em { margin-left: 5px; color: var(--muted); font-size: 10px; font-style: normal; }

.toolbar { min-height: 52px; padding: 8px; border: 1px solid var(--line); border-bottom: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: var(--surface); }
.search-control { min-width: 260px; flex: 1; position: relative; }
.search-control svg { width: 16px; height: 16px; position: absolute; left: 11px; top: 12px; color: var(--muted); }
.search-control .control { padding-left: 34px; }
.toolbar .control { min-height: 36px; }
.toolbar select.control { width: auto; min-width: 150px; }

.data-surface { border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th { height: 39px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 750; text-align: left; text-transform: uppercase; }
.data-table td { height: 62px; padding: 8px 12px; border-bottom: 1px solid #e7e9ed; color: var(--ink-2); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr.clickable { cursor: pointer; }
.data-table tbody tr.clickable:hover td { background: #f5f8f8; }
.data-table tbody tr.active { background: color-mix(in srgb, var(--brand-orange) 8%, transparent); }
.data-table .cell-primary { color: var(--ink); font-weight: 650; }
.data-table .cell-secondary { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.release-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cover-thumb { width: 42px; height: 42px; flex: 0 0 auto; object-fit: cover; border: 1px solid #cfd3d9; border-radius: 3px; background: #e36c61; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.cover-thumb.tone-1 { background: #3b72be; }
.cover-thumb.tone-2 { background: #bd6b2a; }
.cover-thumb.tone-3 { background: var(--brand-orange); }
.cover-thumb.tone-4 { background: #7a5ba7; }
.cover-thumb.tone-5 { background: #c64e64; }
.cover-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  user-select: none;
}
.editor-cover .cover-fallback {
  width: 100%;
  height: 100%;
  font-size: 22px;
}
.release-cell-copy { min-width: 0; }
.release-cell-copy strong, .release-cell-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-cell-copy strong { color: var(--ink); font-size: 12px; }
.release-cell-copy small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.status-chip, .language-chip, .tag {
  max-width: 100%;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.status-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-draft { color: #5e6570; background: #eceef1; }
.status-review, .status-submitted, .status-preflight_passed { color: var(--blue); background: var(--blue-soft); }
.status-changes, .status-preflight_failed { color: var(--gold); background: var(--gold-soft); }
.status-approved, .status-ready, .status-active, .status-signed, .status-paid, .status-prepared, .status-handoff_ready, .status-accepted, .status-provider_accepted, .status-delivered { color: var(--green); background: var(--green-soft); }
.status-entered_in_onerpm, .status-submitted_to_onerpm, .status-provider_entry, .status-provider_submitted { color: #176075; background: #e5f4f8; }
.status-handoff_changes_requested { color: #8a5a00; background: #fff2cf; }
.status-rejected { color: var(--red); background: var(--red-soft); }
.status-handoff_rejected { color: var(--red); background: var(--red-soft); }
.status-delivered, .status-validated, .status-live, .status-provider_review, .status-accepted { color: var(--violet); background: var(--violet-soft); }
.status-provider_submitted { color: var(--blue); background: var(--blue-soft); }
.status-pending { color: var(--gold); background: var(--gold-soft); }
.status-blocked { color: var(--red); background: var(--red-soft); }
.status-resolved { color: var(--green); background: var(--green-soft); }
.language-chip { color: #2f5f9f; background: #e2edfb; }
.language-chip.tone-coral { color: #a3463f; background: #fbe1dd; }
.language-chip.tone-pink { color: #a83c67; background: #f9dfea; }
.language-chip.tone-violet { color: #654a93; background: #ebe4f7; }
.language-chip.tone-red { color: #a03838; background: #f7dddd; }
.language-chip.tone-gold { color: #845a14; background: #f8ebc9; }
.language-chip.tone-mint { color: var(--ink-secondary); background: var(--surface-secondary); border: 1px solid var(--border); }
.language-chip.tone-slate { color: #4d5968; background: #e7ebef; }
.tag { color: var(--ink-2); background: #edf0f3; font-weight: 600; }

.empty-state { min-height: 240px; padding: 48px 24px; display: grid; place-items: center; align-content: center; text-align: center; color: var(--muted); }
.empty-state svg { width: 28px; height: 28px; margin-bottom: 12px; }
.empty-state h3 { margin: 0 0 6px; color: var(--ink); font-size: 15px; }
.empty-state p { max-width: 420px; margin: 0; font-size: 12px; }

.editor-page { min-height: calc(100vh - var(--header-height)); background: #e7e9ed; }
.editor-topbar { min-height: 66px; padding: 11px 22px; border-bottom: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); }
.editor-title { min-width: 0; display: flex; align-items: center; gap: 12px; }
.editor-title-copy { min-width: 0; }
.editor-title-copy h1 { margin: 0; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.editor-title-meta { margin-top: 4px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.editor-title-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-actions { min-width: 0; display: flex; align-items: center; gap: 8px; }
.editor-action-reason { max-width: 210px; color: var(--muted); font-size: 10px; line-height: 1.3; text-align: right; }
.editor-layout { min-height: calc(100vh - var(--header-height) - 66px); display: grid; grid-template-columns: 220px 280px minmax(520px, 820px) minmax(220px, 1fr); align-items: stretch; }
.project-rail, .track-rail, .inspector, .editor-context-panel { min-width: 0; background: var(--surface); }
.project-rail { border-right: 1px solid var(--line-strong); }
.track-rail { border-right: 1px solid var(--line-strong); background: #f6f7f9; }
.track-rail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 12px 8px;
  border-bottom: 1px solid var(--line);
}
.track-rail-head h2 { margin: 0; flex: 1 1 auto; font-size: 13px; }
.track-rail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.track-rail-actions .button-small { white-space: nowrap; }
.track-list-empty { min-height: 120px; padding: 20px 12px; }
.track-list-empty p { max-width: 220px; }
.inspector { background: var(--surface); }
.rail-section { padding: 16px; border-bottom: 1px solid var(--line); }
.rail-section-title { margin: 0 0 10px; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.editor-cover { width: 100%; aspect-ratio: 1; border: 1px solid var(--line-strong); border-radius: 3px; display: grid; place-items: center; overflow: hidden; background: #d65c58; color: #fff; cursor: pointer; position: relative; }
.editor-cover img { width: 100%; height: 100%; object-fit: cover; }
.editor-cover-placeholder { display: grid; place-items: center; gap: 7px; font-size: 11px; }
.editor-cover-placeholder svg { width: 24px; height: 24px; }
.editor-cover input { display: none; }
.project-summary { margin-top: 12px; }
.project-summary strong, .project-summary small { display: block; }
.project-summary strong { font-size: 13px; overflow-wrap: anywhere; }
.project-summary small { margin-top: 4px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.rail-nav { padding: 8px; }
.rail-nav-button { width: 100%; min-height: 39px; padding: 0 9px; border: 0; border-radius: 4px; display: flex; align-items: center; gap: 9px; background: transparent; color: var(--ink-2); font-size: 11px; font-weight: 600; cursor: pointer; text-align: left; }
.rail-nav-button:hover { background: #f0f2f4; }
.rail-nav-button.active { background: var(--brand-orange-soft); color: var(--brand-orange-pressed); }
.rail-nav-button svg { width: 15px; height: 15px; }
.rail-nav-button .rail-count { margin-left: auto; min-width: 20px; color: var(--muted); text-align: right; }
.step-index { width: 19px; height: 19px; border: 1px solid #c8cdd4; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); font-size: 9px; flex: 0 0 auto; }
.rail-nav-button.active .step-index { border-color: var(--brand-orange); background: var(--brand-orange); color: #fff; }
.completion-block { padding: 14px 16px; }
.completion-line { height: 5px; border-radius: 3px; overflow: hidden; background: #e3e6ea; }
.completion-line span { height: 100%; display: block; background: var(--brand-orange); }
.completion-copy { margin-top: 7px; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.completion-blockers { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.completion-compact { display: grid; grid-template-columns: minmax(44px, 1fr) auto; align-items: center; gap: 8px; }
.completion-compact > div { height: 5px; overflow: hidden; border-radius: 3px; background: #e2e6ea; }
.completion-compact > div span { height: 100%; display: block; background: var(--brand-orange); }
.completion-compact strong { color: var(--ink-2); font-size: 10px; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.row-actions .icon-button { width: 31px; height: 31px; }
.icon-button.attention { color: var(--gold); border-color: #dcc78f; background: #fffaf0; }
.attention-text { color: var(--gold) !important; }

.track-rail .audio-multi-drop-section { margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.track-rail .audio-multi-drop-section .section-title-row { margin-bottom: 8px; }
.track-rail .audio-multi-drop { padding: 12px; gap: 6px; }
.track-rail .audio-multi-drop strong { font-size: 12px; }
.track-rail .audio-multi-drop span { font-size: 11px; color: var(--muted); max-width: 220px; }
.track-list { padding: 7px; }
.track-item { width: 100%; min-height: 58px; padding: 8px 9px; border: 1px solid transparent; border-radius: 4px; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; background: transparent; cursor: pointer; text-align: left; }
.track-item:hover { background: #fff; border-color: var(--line); }
.track-item.active { background: #fff4ea; border-color: transparent; box-shadow: inset 3px 0 0 var(--brand-orange); }
.track-number { color: var(--muted); font-size: 10px; text-align: center; }
.track-item-copy { min-width: 0; }
.track-item-copy strong { font-size: 11px; }
.track-item-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.audio-dot { width: 8px; height: 8px; border-radius: 50%; background: #c7ccd3; }
.audio-dot.ready { background: #36a777; }

.inspector-head { min-height: 72px; padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: var(--header-height); z-index: 20; background: rgba(255, 255, 255, 0.98); }
.inspector-head h2 { margin: 0; font-size: 16px; }
.inspector-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.inspector-body { width: 100%; max-width: 820px; }
.inspector-section { padding: 23px 24px; border-bottom: 1px solid var(--line); }
.inspector-section:last-child { border-bottom: 0; }
.section-title-row { margin-bottom: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-title-row h3 { margin: 0 0 5px; font-size: 14px; font-weight: 700; }
.section-title-row p { margin: 0; max-width: 620px; color: var(--muted); font-size: 10px; }

.preview-snippet { display: grid; gap: 12px; }
.preview-snippet.is-disabled { padding: 12px 0 2px; }
.preview-snippet-empty {
  margin: 0;
  align-items: flex-start;
}
.preview-snippet-toolbar {
  display: grid;
  grid-template-columns: auto 1fr minmax(140px, 180px);
  gap: 12px;
  align-items: end;
}
.preview-snippet-times {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: end;
  min-height: 42px;
}
.preview-snippet-times span { display: grid; gap: 2px; }
.preview-snippet-times small { color: var(--muted); font-size: 10px; }
.preview-snippet-times strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.preview-snippet-number { margin: 0; }
.preview-snippet-wave {
  position: relative;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 247, 249, 0.98)),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(22, 24, 29, 0.04) 47px 48px);
  touch-action: none;
  cursor: ew-resize;
}
.preview-snippet-wave:focus-visible {
  outline: 2px solid var(--accent, #e87722);
  outline-offset: 2px;
}
.preview-snippet-wave canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.preview-snippet-selection {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(232, 119, 34, 0.22);
  border-left: 2px solid #e87722;
  border-right: 2px solid #e87722;
  pointer-events: none;
}
.preview-snippet-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #16181d;
  pointer-events: none;
}
@media (max-width: 820px) {
  .preview-snippet-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .preview-snippet-wave {
    height: 112px;
    border-radius: 12px;
  }
  .preview-snippet-times { min-height: 0; }
  .preview-snippet-number .control { font-size: 16px; } /* avoid iOS zoom on focus */
}
.inspector-footer { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface); }
.autosave-state { min-width: 150px; color: var(--muted); font-size: 10px; text-align: right; }
.autosave-state.saving { color: var(--blue); }
.autosave-state.saved { color: var(--green); }
.autosave-state.dirty { color: var(--gold); }
.autosave-state.error { color: var(--red); }
.field-invalid { border-color: var(--red) !important; box-shadow: 0 0 0 1px var(--red-soft); }
.staff-portal-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: #eef4fb;
  border-bottom: 1px solid #c9d7ea;
  color: #243552;
}
.staff-portal-banner.hidden { display: none; }
.staff-portal-banner-copy { min-width: 0; }
.staff-portal-banner-copy strong,
.staff-portal-banner-copy span { display: block; }
.staff-portal-banner-copy span { margin-top: 2px; font-size: 12px; color: var(--muted); }
.editor-error-banner { min-height: 54px; padding: 10px 22px; border-bottom: 1px solid #dfb1b1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; background: #fff1f1; color: #743535; }
.editor-error-banner > svg { width: 18px; height: 18px; }
.editor-error-banner strong, .editor-error-banner span { display: block; }
.editor-error-banner span { margin-top: 2px; font-size: 10px; }
.editor-error-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.catalog-upc-row { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; }
.catalog-upc-row-empty .catalog-upc-empty { opacity: 0.72; }
.technical-details { margin-top: 5px; color: var(--muted); font-size: 9px; }
.technical-details summary { cursor: pointer; }
.technical-details code { display: block; margin-top: 4px; overflow-wrap: anywhere; white-space: normal; }
.editor-feedback-banner, .editor-lock-banner { min-height: 48px; padding: 9px 22px; border-bottom: 1px solid; display: flex; align-items: center; gap: 11px; }
.editor-feedback-banner { border-color: #e6d29c; background: #fff9e9; color: #6f511c; }
.editor-lock-banner { border-color: #cbd7e8; background: #eef4fb; color: #355578; }
.editor-feedback-banner svg, .editor-lock-banner svg { width: 18px; height: 18px; flex: 0 0 auto; }
.editor-feedback-banner > div { min-width: 0; flex: 1; }
.editor-feedback-banner strong, .editor-feedback-banner span { display: block; }
.editor-feedback-banner span { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.editor-lock-banner span { font-size: 11px; }
.editor-page[data-editable="false"] .editor-cover,
.editor-page[data-editable="false"] .inspector input,
.editor-page[data-editable="false"] .inspector select,
.editor-page[data-editable="false"] .inspector textarea,
.editor-page[data-editable="false"] .inspector-footer button { pointer-events: none; opacity: 0.62; }
.segmented { min-height: 34px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); display: inline-flex; align-items: center; background: var(--surface-2); }
.segmented button, .segmented label { min-height: 27px; padding: 0 10px; border: 0; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.segmented button.active, .segmented label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 24, 30, 0.12); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.language-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.audio-upload { min-height: 84px; padding: 13px; border: 1px dashed #aeb6c0; border-radius: var(--radius); display: flex; align-items: center; gap: 14px; background: #fafbfc; cursor: pointer; }
.audio-upload:hover { border-color: var(--brand-orange); background: var(--brand-orange-soft); }
.audio-upload input { display: none; }
.audio-upload-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 4px; background: var(--brand-orange-soft); color: var(--brand-orange); }
.audio-upload-icon svg { width: 20px; height: 20px; }
.audio-upload-copy { min-width: 0; }
.audio-upload-copy strong, .audio-upload-copy small { display: block; }
.audio-upload-copy strong { font-size: 11px; overflow-wrap: anywhere; }
.audio-upload-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.technical-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.compact-body { max-width: none; }
.rights-confirmation { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fff9ec; }
.rights-confirmation.confirmed { background: #edf8f3; }
.rights-confirmation .check-line { max-width: 700px; }
.rights-confirmation .check-line strong, .rights-confirmation .check-line small { display: block; }
.rights-confirmation .check-line small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.rights-track-head { min-height: 52px; padding: 10px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; background: var(--surface-2); }
.rights-track-head strong, .rights-track-head small { display: block; }
.rights-track-head small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.file-list { display: grid; gap: 8px; }
.file-record { min-height: 68px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; background: #fbfcfd; cursor: pointer; position: relative; }
.file-record:hover { border-color: #aeb6bf; background: #f5faf9; }
.file-record.dragging { border-color: var(--brand-orange); background: var(--brand-orange-soft); box-shadow: inset 0 0 0 1px var(--brand-orange); }
.file-record input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-record-icon { width: 36px; height: 36px; border-radius: 4px; display: grid; place-items: center; background: var(--brand-orange-soft); color: var(--brand-orange); }
.file-record-icon svg { width: 18px; height: 18px; }
.file-record-copy { min-width: 0; }
.file-record-copy > strong, .file-record-copy > small { display: block; overflow-wrap: anywhere; }
.file-record-copy > strong { font-size: 11px; }
.file-record-copy > small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.asset-status { min-height: 24px; padding: 3px 7px; border-radius: 4px; display: inline-flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.asset-status svg { width: 13px; height: 13px; }
.asset-status-ready { color: var(--green); background: var(--green-soft); }
.asset-status-uploaded { color: var(--blue); background: var(--blue-soft); }
.asset-status-missing { color: var(--muted); background: var(--surface-3); }
.asset-status-error { color: var(--red); background: var(--red-soft); }
.upload-meter { min-height: 48px; margin-top: 6px; padding: 7px 160px 7px 10px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: #f2f4f6; }
.upload-meter > span { width: 0; height: 3px; position: absolute; left: 0; bottom: 0; display: block; background: var(--brand-orange); transition: width 120ms linear; }
.upload-meter > strong, .upload-meter > small { display: block; position: relative; }
.upload-meter > strong { color: var(--ink); font-size: 10px; }
.upload-meter > small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.upload-meter-actions { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; }
.upload-progress {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}
.upload-progress.hidden { display: none; }
.upload-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.upload-progress-copy { min-width: 0; flex: 1; }
.upload-progress-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.upload-progress-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.upload-progress-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8edf2;
}
.upload-progress-track > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand-orange);
  transition: width 120ms linear;
}
.upload-progress-actions { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.upload-progress.is-done .upload-progress-track > span { background: var(--green, #26a069); }
.upload-progress.is-failed .upload-progress-track > span { background: var(--red, #c0392b); }
.upload-progress.is-failed .upload-progress-copy strong { color: var(--red, #c0392b); }
.audio-queue-row .upload-progress { margin-top: 4px; }

.repeat-list { display: flex; flex-direction: column; gap: 8px; }
.repeat-row { padding: 10px; border: 1px solid var(--line); border-radius: 4px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; background: #fbfcfd; }
.repeat-row .field { grid-column: span 3; }
.repeat-row .field.wide { grid-column: span 4; }
.repeat-row .field.narrow { grid-column: span 2; }
.repeat-row .row-remove { grid-column: span 1; justify-self: end; }
.repeat-actions { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.split-total { display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; }
.split-meter { width: 120px; height: 6px; border-radius: 3px; overflow: hidden; background: #e1e4e8; }
.split-meter span { height: 100%; display: block; background: var(--gold); }
.split-total.complete .split-meter span { background: var(--green); }
.split-total.over .split-meter span { background: var(--red); }

.identifier-mode-stack { min-width: 0; grid-column: 1 / -1; display: grid; gap: 12px; }
.identifier-mode-stack > .field { max-width: 440px; }
.identifier-mode-panel { min-width: 0; padding: 13px 14px; border-left: 3px solid var(--line-strong); background: var(--surface-2); }
.identifier-mode-panel > .field { max-width: 440px; }
.identifier-help { margin: 10px 0 0; display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 10px; }
.identifier-help svg { width: 15px; height: 15px; flex: 0 0 auto; }
.identifier-help.blocking { color: var(--red); }
.identifier-assignment-state { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 5px 10px; }
.identifier-assignment-state .status-chip { align-self: center; }
.identifier-assignment-state strong { font-size: 11px; }
.identifier-context { min-width: 0; grid-column: 1 / -1; padding: 14px; border: 1px solid color-mix(in srgb, var(--brand-orange) 28%, var(--border)); border-left: 3px solid var(--brand-orange); border-radius: 4px; background: var(--brand-orange-soft); }
.identifier-context-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.identifier-context-head small, .identifier-context-head strong { display: block; }
.identifier-context-head small { color: var(--muted); font-size: 9px; }
.identifier-context-head strong { margin-top: 4px; overflow-wrap: anywhere; font-size: 13px; }
.identifier-context-meta { margin: 13px 0 0; display: flex; flex-wrap: wrap; gap: 18px; }
.identifier-context-meta div { display: grid; gap: 2px; }
.identifier-context-meta dt { color: var(--muted); font-size: 9px; }
.identifier-context-meta dd { margin: 0; font-size: 10px; font-weight: 700; }
.identifier-context > p { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #d4e5e1; display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 10px; }
.identifier-context > p svg { width: 14px; height: 14px; flex: 0 0 auto; }

.dsp-list { display: flex; flex-direction: column; border: 1px solid var(--line); }
.dsp-row { padding: 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; }
.dsp-row:last-child { border-bottom: 0; }
.dsp-identity { display: flex; align-items: flex-start; gap: 10px; }
.dsp-mark { width: 34px; height: 34px; border-radius: 4px; display: grid; place-items: center; background: var(--black); color: #fff; font-size: 10px; font-weight: 800; }
.dsp-mark.soundcloud { background: #e36532; }
.dsp-identity strong, .dsp-identity small { display: block; }
.dsp-identity strong { font-size: 11px; }
.dsp-identity small { margin-top: 3px; color: var(--muted); font-size: 9px; }

.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; }
.checklist { border: 1px solid var(--line); }
.checklist-row { min-height: 45px; padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
.checklist-row:last-child { border-bottom: 0; }
.checklist-row svg { width: 16px; height: 16px; color: var(--red); }
.checklist-row.complete svg { color: var(--green); }
.checklist-row > span { min-width: 0; flex: 1; font-size: 11px; }
.checklist-row > span > strong { display: block; font-size: 11px; }
.check-context { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 5px; color: var(--muted); }
.check-context span { padding: 2px 5px; border-radius: 3px; background: #edf0f3; font-size: 8px; }
.review-summary { padding: 16px; border: 1px solid var(--line); background: var(--surface-2); }
.review-summary h3 { margin: 0 0 12px; font-size: 13px; }
.review-summary dl { margin: 0; display: grid; gap: 10px; }
.review-summary div { display: flex; justify-content: space-between; gap: 12px; }
.review-summary dt { color: var(--muted); font-size: 10px; }
.review-summary dd { margin: 0; font-size: 10px; font-weight: 700; text-align: right; }
.structured-checks { border-top: 1px solid var(--line); }
.structured-check { min-height: 55px; padding: 9px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.structured-check > svg { width: 17px; height: 17px; color: var(--red); }
.structured-check.ok > svg { color: var(--green); }
.structured-check.warning > svg { color: var(--gold); }
.structured-check strong { display: block; font-size: 10px; font-weight: 650; }
.feedback-list { display: grid; gap: 10px; }
.feedback-item { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; }
.feedback-item:last-child { border-bottom: 0; }
.feedback-item > div, .feedback-item > p { min-width: 0; }
.feedback-item p { grid-column: 1; margin: 0; font-size: 11px; }
.feedback-item > .button { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.preflight-summary { color: var(--green); font-size: 11px; font-weight: 700; }
.preflight-summary.blocked { color: var(--red); }

.editor-context-panel { border-left: 1px solid var(--line-strong); background: #f4f5f7; }
.context-section { padding: 20px 18px; border-bottom: 1px solid var(--line); }
.context-section h2 { margin: 0; font-size: 12px; }
.context-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.context-heading > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.context-heading > strong { font-size: 18px; }
.context-readiness .completion-line { margin-top: 11px; }
.context-section > p { margin: 9px 0 0; color: var(--muted); font-size: 10px; }
.context-status-list { margin: 13px 0 0; display: grid; gap: 10px; }
.context-status-list > div { min-width: 0; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 9px; }
.context-status-list dt { color: var(--muted); font-size: 9px; }
.context-status-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: 10px; font-weight: 650; }
.blocker-list { margin-top: 10px; border-top: 1px solid var(--line); }
.blocker-row { width: 100%; min-height: 42px; padding: 7px 0; border: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; background: transparent; color: var(--ink-2); cursor: pointer; text-align: left; }
.blocker-row:hover { color: var(--brand-orange); }
.blocker-row span { min-width: 0; font-size: 10px; }
.blocker-row svg { width: 14px; height: 14px; }
.success-copy { display: flex; align-items: center; gap: 7px; color: var(--green) !important; }
.success-copy svg { width: 15px; height: 15px; }

.two-pane { display: grid; grid-template-columns: minmax(320px, 0.8fr) minmax(480px, 1.2fr); border: 1px solid var(--line); background: var(--surface); min-height: 560px; }
.pane-list { border-right: 1px solid var(--line); min-width: 0; }
.pane-detail { min-width: 0; }
.pane-head { min-height: 55px; padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.pane-head h2 { margin: 0; font-size: 13px; }
.list-record { width: 100%; min-height: 68px; padding: 10px 13px; border: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); cursor: pointer; text-align: left; }
.list-record:hover { background: #f6f8f9; }
.list-record.active { background: var(--brand-orange-soft); box-shadow: inset 3px 0 0 var(--brand-orange); }
.list-record-copy { min-width: 0; }
.list-record-copy strong, .list-record-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-record-copy strong { font-size: 11px; }
.list-record-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.detail-block { padding: 20px; border-bottom: 1px solid var(--line); }
.detail-block:last-child { border-bottom: 0; }
.detail-block h3 { margin: 0 0 14px; font-size: 13px; }
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.detail-header h2 { margin: 0 0 5px; font-size: 18px; }
.key-value-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.key-value small, .key-value strong { display: block; }
.key-value small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.key-value strong { margin-top: 5px; font-size: 11px; overflow-wrap: anywhere; }
.storefront-preview-card { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2, #f7f8fa); }
.storefront-preview-card > span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 0.04em; }
.storefront-preview-value { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.storefront-preview-card .title-artists-hint { margin: 2px 0 0; }
.storefront-preview-card .title-artists-hint[hidden] { display: none !important; }
.member-row { min-height: 52px; padding: 7px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(160px, 1fr) 150px 1fr; align-items: center; gap: 12px; }
.member-row:last-child { border-bottom: 0; }
.member-identity strong, .member-identity small { display: block; }
.member-identity strong { font-size: 11px; }
.member-identity small { color: var(--muted); font-size: 9px; }
.permission-list { display: flex; flex-wrap: wrap; gap: 4px; }
.form-stack { display: grid; gap: 14px; }
.notice-line { padding: 10px 12px; border: 1px solid #cbd7e8; border-radius: 4px; display: flex; align-items: flex-start; gap: 9px; background: #f1f6fc; color: #3d5877; font-size: 10px; }
.notice-line svg { width: 16px; height: 16px; flex: 0 0 auto; }
.feedback-editor-list { display: grid; gap: 9px; }
.feedback-editor-row { padding: 10px; border: 1px solid var(--line); border-radius: 4px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 8px; background: var(--surface-2); }
.feedback-editor-row .feedback-message-field { min-width: 0; grid-column: 1 / -1; }
.feedback-editor-row .feedback-remove { justify-self: end; }
.feedback-editor-row .compact-check { min-height: 40px; align-items: center; }
.feedback-history { border: 1px solid var(--line); }
.feedback-history-row { min-height: 62px; padding: 10px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 12px; }
.feedback-history-row:last-child { border-bottom: 0; }
.feedback-history-row.resolved { opacity: 0.62; background: #f5f7f8; }
.feedback-history-row strong, .feedback-history-row p, .feedback-history-row small { display: block; }
.feedback-history-row p { margin: 3px 0; font-size: 11px; }
.feedback-history-row small { color: var(--muted); font-size: 9px; }
.feedback-visibility { align-self: start; padding: 3px 6px; border-radius: 3px; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-weight: 700; text-align: center; }
.feedback-visibility.internal { background: var(--violet-soft); color: var(--violet); }
.empty-inline { padding: 13px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 10px; text-align: center; }
.staff-note { margin-top: 14px; padding: 11px; border-left: 3px solid var(--violet); background: #f4f1fa; }
.staff-note strong { font-size: 10px; }
.staff-note p { margin: 4px 0 0; color: var(--ink-2); font-size: 10px; white-space: pre-wrap; }

.tabs { margin-bottom: 14px; border-bottom: 1px solid var(--line-strong); display: flex; gap: 4px; }
.tab-button { min-height: 39px; padding: 0 13px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.tab-button:hover { color: var(--ink); }
.tab-button.active { color: var(--ink); border-bottom-color: var(--brand-orange); }
.document-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
.form-surface, .side-surface { border: 1px solid var(--line); background: var(--surface); }
.surface-head { min-height: 55px; padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.surface-head h2 { margin: 0; font-size: 13px; }
.surface-body { padding: 18px; }
.surface-actions { display: inline-flex; align-items: center; gap: 8px; }
.document-filters { margin-bottom: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.identifier-decision { border-left: 3px solid var(--brand-orange); }
.identifier-filters { display: grid; grid-template-columns: 170px 190px; gap: 8px; }
.identifier-queue { display: grid; }
.identifier-queue-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.identifier-queue-row:first-child { padding-top: 0; }
.identifier-queue-row:last-child { padding-bottom: 0; border-bottom: 0; }
.identifier-queue-row > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.identifier-release-copy { min-width: 0; }
.identifier-release-copy strong, .identifier-release-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identifier-release-copy strong { font-size: 13px; }
.identifier-release-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.identifier-summary-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.identifier-summary-grid > div { min-width: 0; padding-left: 9px; border-left: 2px solid var(--line-strong); }
.identifier-summary-grid small, .identifier-summary-grid strong { display: block; }
.identifier-summary-grid small { color: var(--muted); font-size: 9px; }
.identifier-summary-grid strong { margin-top: 4px; overflow-wrap: anywhere; font-size: 10px; }
.identifier-release-actions { margin-top: 13px; display: flex; align-items: center; gap: 8px; }
.identifier-track-list { margin-top: 13px; border-top: 1px solid var(--line); }
.identifier-track-row { min-height: 47px; padding: 7px 0; display: flex; align-items: center; gap: 10px; }
.identifier-track-row + .identifier-track-row { border-top: 1px solid var(--line); }
.identifier-track-row.missing { background: #fff9e9; }
.identifier-track-copy { min-width: 0; flex: 1; }
.identifier-track-copy strong, .identifier-track-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identifier-track-copy strong { font-size: 10px; }
.identifier-track-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.identifier-history-surface { margin-top: 16px; }
.identifier-mirror-surface { margin-top: 16px; }
.identifier-mirror-surface .surface-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.identifier-mirror-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.identifier-mirror-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.identifier-mirror-surface .data-table { min-width: 860px; }
.identifier-history { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.identifier-history .mono { display: block; margin-top: 4px; font-size: 9px; }
.gs46-release-select { width: min(420px, 100%); }
.gs46-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); gap: 16px; align-items: start; }
.gs46-layout .surface-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.gs46-overview { grid-column: 1 / -1; }
.gs46-flags { margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 7px; }
.gs46-hash { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 5px; }
.gs46-hash span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.gs46-hash code { overflow-wrap: anywhere; font-size: 10px; }
.gs46-fields { min-width: 620px; }
.gs46-dictionaries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: 1px solid var(--line); }
.gs46-dictionaries div { padding-left: 10px; border-left: 2px solid var(--line-strong); }
.gs46-dictionaries strong, .gs46-dictionaries small { display: block; }
.gs46-dictionaries strong { font-size: 10px; }
.gs46-dictionaries small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.gs46-missing { margin: 0; padding: 0; display: grid; gap: 9px; list-style: none; }
.gs46-missing li { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2); font-size: 10px; }
.gs46-missing svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--amber); }
.gs46-actions { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; }
.empty-state.compact { min-height: 140px; padding: 24px 16px; }
.success-text { color: var(--green); }
.danger-text { color: var(--red); }
.status-timeline { display: grid; gap: 0; }
.timeline-item { min-height: 48px; padding-left: 27px; position: relative; }
.timeline-item::before { content: ""; width: 9px; height: 9px; border: 2px solid #b8bec7; border-radius: 50%; background: #fff; position: absolute; left: 3px; top: 3px; z-index: 2; }
.timeline-item::after { content: ""; width: 1px; height: 100%; background: #d9dde2; position: absolute; left: 8px; top: 13px; }
.timeline-item:last-child::after { display: none; }
.timeline-item.done::before { border-color: var(--brand-orange); background: var(--brand-orange); }
.timeline-item strong, .timeline-item small { display: block; }
.timeline-item strong { font-size: 10px; }
.timeline-item small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.contract-row { min-height: 62px; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.contract-row:last-child { border-bottom: 0; }
.contract-copy { min-width: 0; flex: 1 1 auto; }
.contract-copy strong, .contract-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contract-copy strong { font-size: 11px; }
.contract-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.contract-copy .contract-next-action { color: var(--ink-2); font-weight: 700; }
.contract-actions { display: flex; align-items: center; gap: 6px; }
.staff-contract-actions { padding: 4px 6px; border: 1px dashed var(--line-strong); display: inline-flex; align-items: center; gap: 6px; background: var(--surface-muted); }
.staff-contract-actions .staff-only-tag { margin-left: 0; }
.contract-staff-details { padding-left: 8px; border-left: 2px solid var(--line-strong); }
.contract-staff-details summary { color: var(--muted); font-size: 9px; font-weight: 700; cursor: pointer; }
.contract-staff-details small { white-space: normal; }
.agreement-staff-details, .contract-lifecycle-staff { margin-top: 16px; padding: 12px; border: 1px dashed var(--line-strong); background: var(--surface-muted); }
.agreement-staff-details > summary, .contract-lifecycle-staff > summary { color: var(--ink-2); font-size: 10px; font-weight: 800; cursor: pointer; }
.artist-picker { align-self: stretch; }
.artist-chip-list { min-height: 56px; padding: 8px; border: 1px solid var(--line); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; background: #fff; }
.artist-chip { min-height: 52px; padding: 6px 8px 6px 6px; border: 1px solid #d7dde2; border-radius: 14px; display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); }
.artist-chip strong { font-size: 14px; font-weight: 650; }
.artist-chip .icon-button { width: 28px; height: 28px; border: 0; background: transparent; }
.artist-chip .icon-button svg { width: 14px; height: 14px; }
.artist-roster { display: grid; gap: 10px; }
.roster-artist { width: 100%; min-height: 64px; padding: 8px 10px; border: 1px solid var(--line); display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; align-items: center; gap: 12px; background: #fff; text-align: left; cursor: pointer; }
.roster-artist.selected { border-color: var(--brand-orange); background: var(--brand-orange-soft); }
.roster-artist strong, .roster-artist small { display: block; }
.roster-artist small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.artist-chip-avatar,
.artist-avatar,
.artist-identity-avatar,
.dsp-hit-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  flex: none;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
}
.artist-identity-avatar { width: 72px; height: 72px; font-size: 22px; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12), 0 8px 20px rgba(15, 23, 42, 0.12); }
.dsp-hit-avatar { width: 48px; height: 48px; font-size: 15px; }
.artist-chip-avatar img,
.artist-avatar img,
.artist-identity-avatar img,
.dsp-hit-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.bulk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bulk-grid fieldset { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); }
.bulk-grid legend { padding: 0 5px; font-size: 10px; font-weight: 700; }
.bulk-preview { min-height: 64px; margin-top: 12px; padding: 10px; border: 1px solid var(--line); background: #f6f7f8; }
.bulk-preview p { margin: 3px 0; font-size: 10px; }
.signing-shell { display: grid; gap: 12px; }
.signing-frame { width: 100%; height: min(68vh, 720px); min-height: 480px; border: 1px solid var(--line); background: #fff; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.royalty-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.royalty-fx-pair { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.royalty-fx-pair:last-child { border-bottom: 0; }
.royalty-close-net { background: #fff6c2; }
.royalty-close-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.royalty-split-track { display: grid; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
.text-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.plain-list { margin: 0; padding-left: 18px; }
.royalty-main { min-width: 0; display: grid; gap: 16px; }
.royalty-staff-aside { position: sticky; top: 12px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; }
.royalty-pipeline { margin-bottom: 4px; }
.royalty-pipeline-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line, rgba(0,0,0,.08));
}
.royalty-pipeline-step {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-right: 1px solid var(--line, rgba(0,0,0,.08));
  min-height: 72px;
  align-content: start;
}
.royalty-pipeline-step:last-child { border-right: 0; }
.royalty-pipeline-step small { color: var(--text-secondary, #667); font-size: 11px; line-height: 1.3; }
.royalty-pipeline-step strong { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--text-muted, #9aa); }
.royalty-pipeline-step.has-items strong { color: var(--text-primary, #111); }
.royalty-statement-row { cursor: pointer; }
.royalty-statement-row:hover { background: color-mix(in srgb, var(--brand-orange, #e85d04) 6%, transparent); }
.royalty-statement-expand { transition: transform .15s ease; }
.royalty-statement-expand.is-open { transform: rotate(90deg); }
.royalty-statement-detail > td { padding: 0 !important; background: var(--surface-muted, #f6f6f4); }
.royalty-statement-detail-body { padding: 12px 16px 16px; display: grid; gap: 10px; }
.royalty-dsp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.royalty-lines-table { font-size: 12px; }
.royalty-lines-table .mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.royalty-payee-rollup { margin-bottom: 4px; }
[data-royalty-partner="label"] .page-header h1,
[data-royalty-partner="artist"] .page-header h1 { letter-spacing: -0.02em; }
.page-shell.page-enter { animation: royalty-page-enter .28s ease-out; }
@keyframes royalty-page-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 900px) {
  .royalty-pipeline-strip { grid-template-columns: 1fr 1fr; }
  .royalty-pipeline-step { border-bottom: 1px solid var(--line, rgba(0,0,0,.08)); }
  .royalty-pipeline-step:nth-child(2n) { border-right: 0; }
  .royalty-staff-aside { position: static; max-height: none; }
}
.import-panel { border: 1px solid var(--line); background: var(--surface); }
.royalty-custom-range summary {
  cursor: pointer;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}
.currency-total { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.currency-pill { min-height: 27px; padding: 4px 8px; border-radius: 4px; background: #edf1f4; color: var(--ink-2); font-size: 11px; font-weight: 700; }

.delivery-console { border: 1px solid var(--line); display: grid; grid-template-columns: 360px minmax(0, 1fr); background: var(--surface); }
.delivery-controls { padding: 18px; border-right: 1px solid var(--line); display: grid; gap: 14px; align-content: start; }
.delivery-button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.delivery-log { min-height: 320px; margin: 0; padding: 18px; overflow: auto; background: #17191e; color: #d7dbe1; font: 11px/1.65 Consolas, monospace; white-space: pre-wrap; }
.connection-row { min-height: 58px; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.connection-row:last-child { border-bottom: 0; }
.connection-copy strong, .connection-copy small { display: block; }
.connection-copy strong { font-size: 11px; }
.connection-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 24px; display: grid; place-items: center; background: rgba(10, 12, 16, 0.58); }
.modal { width: min(680px, 100%); max-height: calc(100vh - 48px); border: 1px solid #9ba1aa; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow); }
.modal.modal-wide { width: min(1120px, 100%); }
.modal-header { flex-shrink: 0; min-height: 64px; padding: 13px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-header h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 8px; }

.onerpm-workspace { min-height: 540px; }
.onerpm-summary { min-height: 68px; padding-bottom: 14px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.onerpm-summary h2, .onerpm-summary p { margin: 0; }
.onerpm-summary h2 { font-size: 20px; }
.onerpm-summary p:last-child { margin-top: 5px; color: var(--muted); font-size: 10px; }
.onerpm-tabs { margin: 16px 0; display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--line-strong); }
.onerpm-tabs button { min-height: 38px; padding: 8px 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); white-space: nowrap; cursor: pointer; }
.onerpm-tabs button.active { border-bottom-color: var(--brand-orange); color: var(--ink); font-weight: 700; }
.onerpm-copy-row { min-height: 49px; display: grid; grid-template-columns: 190px minmax(0, 1fr) 34px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.onerpm-copy-row > span { color: var(--muted); font-size: 10px; }
.onerpm-copy-row > strong { overflow-wrap: anywhere; font-size: 13px; }
.onerpm-copy-row .copied { color: var(--green); background: var(--green-soft); }
.onerpm-record { padding: 0 14px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.onerpm-record h3 { margin: 14px 0 6px; font-size: 12px; }
.onerpm-file-row { min-height: 52px; padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.onerpm-file-row span, .onerpm-file-row strong, .onerpm-file-row small { display: block; }
.onerpm-file-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }

.toast-region { position: fixed; right: 18px; top: 70px; z-index: 200; width: min(360px, calc(100vw - 36px)); display: grid; gap: 8px; }
.toast { padding: 12px 13px; border: 1px solid #aeb4bc; border-radius: var(--radius); display: flex; align-items: flex-start; gap: 9px; background: #fff; box-shadow: 0 9px 28px rgba(18, 21, 26, 0.18); color: var(--ink-2); font-size: 11px; }
.toast svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--brand-orange); }
.toast.error svg { color: var(--red); }
.toast strong { display: block; margin-bottom: 2px; color: var(--ink); }

.loading { min-height: 340px; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.spinner { width: 22px; height: 22px; margin-bottom: 9px; border: 2px solid #d8dce2; border-top-color: var(--brand-orange); border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .global-header { grid-template-columns: 170px minmax(0, 1fr) auto; }
  .global-nav-item { padding: 0 11px; }
  .global-nav-item span:not(.nav-badge) { display: none; }
  .editor-layout {
    grid-template-columns: var(--editor-rail-width) minmax(0, 1fr);
    --editor-rail-width: 220px;
  }
  .editor-context-panel { display: none; }
  .editor-layout.readiness-drawer-mode,
  .editor-layout.readiness-collapsed {
    grid-template-columns: var(--editor-rail-width) minmax(0, 1fr);
  }
  .document-grid, .royalty-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; height: auto; min-height: 100dvh; overflow: auto; }
  .auth-brand { min-height: 260px; height: auto; padding: 28px; }
  .auth-brand-copy h1 { font-size: 31px; }
  .auth-workspace { min-height: auto; height: auto; padding: 38px 24px; }
  .global-header { height: auto; min-height: var(--header-height); grid-template-columns: 160px 1fr; }
  .global-nav { grid-column: 1 / -1; grid-row: 2; min-height: 44px; border-top: 1px solid #2a2c31; }
  .global-nav-item { flex: 1; justify-content: center; }
  .global-nav-item span:not(.nav-badge) { display: inline; }
  .global-actions { justify-content: flex-end; }
  .workspace { min-height: calc(100vh - 100px); }
  .editor-layout {
    grid-template-columns: var(--editor-rail-width) minmax(0, 1fr);
    --editor-rail-width: 200px;
  }
  .track-rail { border-right: 0; }
  .inspector { grid-column: 1 / -1; border-top: 1px solid var(--line-strong); }
  .inspector-head { top: 100px; }
  .two-pane, .review-grid, .delivery-console { grid-template-columns: 1fr; }
  .pane-list, .delivery-controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .repeat-row .field { grid-column: span 6; }
  .repeat-row .field.wide { grid-column: span 6; }
  .repeat-row .field.narrow { grid-column: span 4; }
  .identifier-summary-grid { grid-template-columns: 1fr 1fr; }
  .identifier-history { grid-template-columns: 1fr; }
  .gs46-layout { grid-template-columns: 1fr; }
  .gs46-overview { grid-column: auto; }
  .gs46-dictionaries { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .auth-brand { min-height: 220px; }
  .auth-brand-copy h1 { font-size: 26px; }
  .auth-workspace { padding: 30px 18px; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .global-header { grid-template-columns: 118px 1fr; }
  .global-brand { padding: 0 10px; }
  .brand-wordmark-header { display: none; }
  .brand-symbol-mobile-fallback { display: grid; }
  .auth-brand-wordmark { width: 150px; height: 31px; }
  .account-copy, .global-actions .button span { display: none; }
  .global-nav-item span:not(.nav-badge) { display: none; }
  .page-shell { padding: 20px 12px 40px; }
  .page-header { flex-direction: column; }
  .page-actions { width: 100%; overflow-x: auto; }
  .metric-strip { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .toolbar { align-items: stretch; }
  .search-control { min-width: 100%; }
  .toolbar select.control { width: 100%; }
  .document-filters { grid-template-columns: 1fr; }
  .data-surface { min-width: 0; }
  .surface-head { align-items: stretch; flex-direction: column; }
  .surface-head > * { min-width: 0; max-width: 100%; }
  .identifier-filters, .identifier-summary-grid { width: 100%; min-width: 0; grid-template-columns: 1fr; }
  .identifier-filters .control { width: 100%; min-width: 0; }
  .identifier-queue-row > header { align-items: flex-start; flex-direction: column; }
  .identifier-queue-row > header .status-chip { align-self: flex-start; }
  .identifier-release-actions { flex-wrap: wrap; }
  .identifier-track-row { flex-wrap: wrap; }
  .identifier-track-copy { flex: 1 1 calc(100% - 54px); }
  .identifier-track-row .button { max-width: 100%; }
  .identifier-history .timeline-item { min-width: 0; }
  .identifier-history .timeline-item small { overflow-wrap: anywhere; }
  .contract-row { align-items: flex-start; flex-wrap: wrap; }
  .contract-copy { flex: 1 1 100%; }
  .contract-actions { width: 100%; flex-wrap: wrap; }
  .signing-frame { height: 62vh; min-height: 420px; }
  .editor-topbar { padding: 10px 12px; align-items: stretch; flex-direction: column; }
  .editor-title { width: 100%; }
  .editor-actions { width: 100%; flex-wrap: wrap; justify-content: flex-end; }
  .editor-actions .button span { display: inline; }
  .autosave-state { min-width: 0; margin-right: auto; display: inline; text-align: left; }
  .editor-action-reason { max-width: 190px; text-align: left; }
  .editor-layout {
    grid-template-columns: 1fr;
    padding: 0 0 80px;
    gap: 0;
  }
  .editor-contextual-rail,
  .project-rail {
    position: static;
    max-height: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .project-rail, .track-rail, .editor-contextual-rail { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .project-rail, .editor-contextual-rail[data-rail-mode="steps"] { display: grid; grid-template-columns: 130px 1fr; }
  .project-rail .rail-section,
  .editor-contextual-rail .rail-section { grid-row: span 2; }
  .editor-cover { width: 100px; }
  .rail-nav { display: grid; grid-template-columns: 1fr 1fr; }
  .inspector-head { top: 100px; }
  .inspector-section { padding: 19px 14px; }
  .inspector-footer { padding: 11px 14px; }
  .identifier-assignment-state { grid-template-columns: 1fr; }
  .identifier-assignment-state .status-chip { grid-row: auto; justify-self: start; }
  .file-record { grid-template-columns: auto minmax(0, 1fr); }
  .file-record .asset-status { grid-column: 2; justify-self: start; }
  .structured-check { grid-template-columns: auto minmax(0, 1fr); }
  .structured-check > .button { grid-column: 2; justify-self: start; }
  .editor-error-banner { padding: 10px 12px; grid-template-columns: auto minmax(0, 1fr); }
  .editor-error-banner > .button { grid-column: 2; justify-self: start; }
  .repeat-row .field, .repeat-row .field.wide, .repeat-row .field.narrow { grid-column: span 12; }
  .repeat-row .row-remove { grid-column: span 12; justify-self: start; }
  .feedback-editor-row { grid-template-columns: 1fr; }
  .feedback-editor-row .feedback-message-field { grid-column: auto; }
  .dsp-row { grid-template-columns: 1fr; }
  .key-value-grid { grid-template-columns: 1fr 1fr; }
  .member-row { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 10px; }
  .bulk-grid { grid-template-columns: 1fr; }
  .upload-meter { padding-right: 10px; padding-bottom: 42px; }
  .upload-meter-actions { top: auto; bottom: 6px; left: 6px; right: auto; }
}
.submission-success {
  display: grid;
  gap: 18px;
}

.submission-success-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.submission-success-head > svg {
  width: 32px;
  height: 32px;
  color: var(--success);
}

.submission-success-head h3,
.submission-success-head p {
  margin: 0;
}

.identifier-result-list {
  display: grid;
  gap: 0;
}

.identifier-result-row {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.identifier-result-row > span:first-child {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.identifier-result-row small {
  flex-basis: 100%;
  color: var(--muted);
}

.identifier-timeline {
  display: grid;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.identifier-timeline > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) minmax(100px, auto);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.identifier-timeline span,
.identifier-timeline small {
  color: var(--muted);
}

@media (max-width: 720px) {
  .identifier-result-row {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .identifier-timeline > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 20px;
}

.onboarding-progress .step-pill {
  display: grid;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--border));
  border: 1px solid var(--border);
  font-size: 11px;
  text-align: center;
  color: var(--muted);
}

.onboarding-progress .step-pill.active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.onboarding-progress .step-pill.done {
  color: var(--text);
  opacity: 0.9;
}

.invite-step-body {
  display: grid;
  gap: 16px;
}

.invite-step-body .latin-preview {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, #dfe8f5);
}

.invite-step-body .latin-preview strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.recovery-codes-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: var(--surface);
}

.partners-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.partners-tabs .button.active {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

@media (max-width: 900px) {
  .onboarding-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* assisted-ui-v1 */
.partners-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  align-items: center;
}
.partners-subnav .button.active,
.settings-tabs .button.active {
  background: color-mix(in srgb, var(--brand-orange) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--brand-orange) 35%, var(--line));
}
.partners-preview-btn { margin-left: auto; }

.invitations-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.invitation-detail-panel {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: var(--surface);
  padding: 18px 20px;
}
.invitation-detail-panel.hidden { display: none; }
.invitations-table .clickable.active { background: var(--surface-2); }

.invite-wizard-shell {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: var(--surface);
  padding: 20px 22px 24px;
}
.invite-wizard-form { display: grid; gap: 18px; }
.wizard-type-card-secondary { opacity: 0.94; }
.wizard-progress { margin-bottom: 8px; }
.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.wizard-actions-right { display: flex; gap: 8px; flex-wrap: wrap; }
.wizard-type-grid,
.wizard-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.wizard-type-card,
.wizard-mode-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
}
.wizard-type-card input,
.wizard-mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.wizard-type-card.selected,
.wizard-mode-card.selected {
  border-color: color-mix(in srgb, var(--brand-orange) 45%, var(--line));
  background: var(--brand-orange-soft);
}
.wizard-release-table { max-height: 320px; margin-top: 12px; }
.review-grid { display: grid; gap: 14px; }

.latin-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
}
.latin-panel {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  min-width: 0;
}
.latin-panel .control {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.latin-panel strong { display: block; font-size: 1.02rem; margin-top: 4px; }
.latin-suggested {
  border-style: dashed;
  background: color-mix(in srgb, var(--gold-soft) 55%, var(--surface));
}
.latin-confirmed {
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
  background: var(--green-soft);
}
.latin-pending {
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
  background: var(--blue-soft);
}
.latin-disclaimer { display: block; margin-top: 8px; }

.email-warning {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line));
  background: var(--gold-soft);
  margin-bottom: 14px;
}
.email-warning i { width: 18px; height: 18px; margin-top: 2px; color: var(--gold); }

.security-page .security-notice { margin-bottom: 14px; }
.security-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.security-setup-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.totp-qr {
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.security-events { display: grid; gap: 8px; }

.onboarding-preview .preview-screens {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.preview-screen {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface-2);
}
.preview-mock {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px dashed var(--line);
}

.legal-identity-block .nested { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.auth-locale-slot {
  margin: 0 0 14px;
}
.locale-selector span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}
.locale-selector select {
  max-width: 220px;
}

.email-preview-gallery .surface-body {
  display: grid;
  gap: 16px;
}
.email-preview-missing {
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, #c45c26 40%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, #c45c26 8%, var(--surface));
  color: var(--text);
  font-size: 0.9rem;
}
.email-preview-frame {
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f7f5;
}
.email-preview-frame.mobile {
  width: min(390px, 100%);
  margin: 0 auto;
  min-height: 640px;
}
.email-preview-frame.dark {
  background: #1f2937;
  padding: 16px;
}
.email-preview-text {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}
.profile-locale-block {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.agreement-locale-note {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .wizard-type-grid,
  .wizard-mode-grid,
  .latin-compare-grid,
  .security-setup-grid,
  .onboarding-preview .preview-screens {
    grid-template-columns: 1fr;
  }
  .partners-preview-btn { margin-left: 0; width: 100%; justify-content: center; }
}

/* Release Editor UX v2 */
.visually-hidden-file { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.editor-ux-v2 .editor-draft-header .readiness-pill,
.editor-ux-v2 .editor-draft-header .blocker-pill { padding: 2px 7px; border-radius: 999px; background: #edf0f3; color: var(--ink-2); font-weight: 700; }
.editor-mobile-stepper { display: none; gap: 6px; padding: 8px 12px; overflow-x: auto; background: var(--surface); border-bottom: 1px solid var(--line); }
.mobile-step { min-width: 72px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: grid; gap: 4px; place-items: center; cursor: pointer; }
.mobile-step span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #edf0f3; font-size: 11px; font-weight: 700; }
.mobile-step.active { border-color: var(--brand-orange); background: var(--brand-orange-soft); }
.mobile-step.active span { background: var(--brand-orange); color: #fff; }
.mobile-step small { font-size: 9px; color: var(--muted); }
.artwork-drop-zone, .audio-multi-drop { border: 1.5px dashed #b7c0c8; border-radius: 10px; background: #f7f9fa; padding: 16px; display: grid; gap: 10px; place-items: center; text-align: center; cursor: pointer; position: relative; }
.artwork-drop-zone:focus-visible, .audio-multi-drop:focus-visible, .artist-chip:focus-visible, .blocker-row:focus-visible, .rail-nav-button:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
.artwork-drop-zone.drag-over, .audio-multi-drop.drag-over { border-color: var(--brand-orange); background: var(--brand-orange-soft); }
.artwork-drop-zone.missing { min-height: 180px; }
.artwork-drop-zone.artwork-drop-compact {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  place-items: stretch;
  text-align: left;
  align-items: center;
  padding: 18px;
  min-height: 0;
}
.artwork-drop-preview {
  width: 240px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, #d9dee3 0%, #c5ccd4 100%);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.artwork-drop-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artwork-drop-placeholder { color: var(--muted); }
.artwork-drop-side { display: grid; gap: 12px; align-content: center; min-width: 0; }
.artwork-drop-copy { display: grid; gap: 4px; }
.artwork-drop-copy strong, .audio-multi-drop strong { font-size: 14px; }
.artwork-drop-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.artwork-drop-reqs { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.cover-card { display: grid; gap: 12px; }
@media (max-width: 900px) {
  .artwork-drop-zone.artwork-drop-compact {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .artwork-drop-preview { width: min(200px, 70vw); margin: 0 auto; }
  .artwork-drop-side { justify-items: center; }
  .artwork-drop-actions { justify-content: center; }
}
.identifier-background { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f6f8f9; }
.identifier-background-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.identifier-background-row small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.credit-person-card { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: grid; gap: 8px; }
.credit-person-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.credit-name-policy { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.credit-name-policy i { width: 14px; height: 14px; color: var(--accent); }
.contributor-profile-picker { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-subtle, #f8fafc); }
.contributor-profile-results { display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.contributor-profile-option { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); text-align: left; cursor: pointer; }
.contributor-profile-option:hover { border-color: var(--accent); background: #fff8f2; }
.contributor-profile-option span { display: grid; gap: 2px; min-width: 0; }
.contributor-profile-option small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contributor-profile-option i { width: 16px; height: 16px; flex: 0 0 auto; }
.credit-name-preview { display: grid; gap: 4px; padding: 11px 13px; border-radius: 11px; background: #fff7ed; color: #7c2d12; }
.credit-name-preview strong { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.credit-name-preview span { font-size: 13px; line-height: 1.45; }
.artwork-credit-form { display: grid; gap: 12px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg, #fff, #fff9f3); }
.artwork-credit-heading { display: flex; align-items: center; gap: 10px; }
.artwork-credit-heading > div { display: grid; gap: 2px; }
.artwork-credit-heading small { color: var(--muted); }
.artwork-credit-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #c2410c; background: #ffedd5; }
.artwork-credit-icon i { width: 18px; height: 18px; }
.artwork-credit-suggestions { display: grid; gap: 6px; }
.artwork-credit-option { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); cursor: pointer; }
.artwork-credit-option small { color: var(--muted); }
.credit-role-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.join-phrase-select select { max-width: 72px; height: 24px; font-size: 10px; }
.advanced-settings { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fafbfc; }
.advanced-settings-body { margin-top: 10px; display: grid; gap: 8px; }
.audio-upload-queue { display: grid; gap: 8px; margin-top: 10px; }
.audio-file-list { display: grid; gap: 8px; }
.audio-file-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: grid;
  gap: 8px;
  min-width: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.audio-file-card:hover { border-color: color-mix(in srgb, var(--brand-orange) 35%, var(--line)); }
.audio-file-card-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.audio-file-card-icon {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--brand-orange-soft);
  color: var(--brand-orange);
  border: 1px solid color-mix(in srgb, var(--brand-orange) 18%, transparent);
}
.audio-file-card-icon svg { width: 20px; height: 20px; }
.audio-file-card-body { flex: 1; min-width: 0; display: grid; gap: 6px; }
.audio-file-card-head { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.audio-file-card-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.audio-file-card-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.35;
}
.audio-file-card-meta { color: var(--muted); font-size: 11px; }
.audio-file-card-detail { color: var(--muted); font-size: 11px; line-height: 1.35; }
.audio-file-card-remove {
  flex: none;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: none; border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.audio-file-card-remove:hover { color: #c0392b; background: #fff0f0; }
.audio-file-card-remove svg { width: 16px; height: 16px; }
.upload-progress-compact { gap: 4px; }
.upload-progress-compact .upload-progress-head { display: none; }
.upload-progress-compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.upload-progress-compact-pct { font-size: 12px; min-width: 2.5rem; text-align: right; }
.upload-progress-compact-detail { display: block; font-size: 10px; color: var(--muted); }
.upload-progress-compact .upload-progress-track { height: 8px; border-radius: 999px; }
.upload-progress-compact .upload-progress-actions { gap: 4px; }
.audio-multi-drop-visual {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--brand-orange-soft);
  color: var(--brand-orange);
}
.audio-multi-drop-visual svg { width: 22px; height: 22px; }
.audio-multi-drop.drag-over {
  border-color: var(--brand-orange);
  background: color-mix(in srgb, var(--brand-orange) 10%, #f7f9fa);
  transform: scale(1.005);
}
.audio-multi-drop.drag-over .audio-multi-drop-visual {
  background: color-mix(in srgb, var(--brand-orange) 22%, white);
  color: var(--brand-orange);
}
.audio-multi-drop-browse { font-size: 12px; color: var(--muted); }
.artwork-drop-browse { font-size: 12px; color: var(--muted); display: block; margin-top: 4px; }
.artwork-drop-fileline { font-size: 12px; color: var(--ink-secondary, var(--muted)); }
.artwork-drop-placeholder svg { width: 28px; height: 28px; }
#product-form .release-artists-block { display: grid; gap: 14px; max-width: 100%; }
#product-form .artist-picker > span { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
#product-form .artist-chip-list {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
  gap: 8px;
}
#product-form .artist-chip { max-width: 100%; }
#product-form .identifier-decision .merphi-choice-grid,
#product-form .identifier-mode-stack .merphi-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: min(100%, 560px);
}
#product-form .identifier-mode-stack { max-width: min(100%, 640px); }
#product-form .field.span-2 .control { max-width: 100%; }
#product-form .section-card .form-grid { max-width: 100%; }
.audio-multi-drop-primary { min-height: 168px; padding: 24px 20px; }
.audio-queue-row { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: grid; gap: 6px; min-width: 0; }
.audio-queue-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; min-width: 0; }
.audio-queue-head strong {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.35;
}
.audio-queue-error { display: grid; gap: 8px; padding-top: 4px; }
.audio-queue-error > strong { color: #9b1c1c; font-size: 12px; }
.audio-queue-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.audio-queue-failed { border-color: #e8b4b4; background: #fff8f8; }
.audio-queue-ready { border-color: #b7d7c7; background: #f7fcf9; }
.editor-bottom-bar { display: none; }
.rail-mobile-actions { display: none; gap: 8px; padding: 0 12px 12px; }
.editor-mobile-drawer-backdrop { display: none; }
.editor-readiness-drawer { display: none; }
.editor-layout.no-track-rail { grid-template-columns: var(--editor-rail-width) minmax(0, 1fr); }
.editor-layout.no-track-rail .track-rail { display: none; }
.editor-layout.readiness-drawer-mode.no-track-rail,
.editor-layout.readiness-collapsed.no-track-rail {
  grid-template-columns: var(--editor-rail-width) minmax(0, 1fr);
}

/* Release Studio v4 — contextual rail helpers */
.editor-contextual-rail .rail-back-steps {
  width: 100%;
  margin-bottom: 8px;
  justify-content: flex-start;
}
.editor-contextual-rail .track-rail-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px 8px;
  flex-wrap: wrap;
}
.editor-contextual-rail .track-rail-head h2 { margin: 0; flex: 1 1 auto; font-size: 14px; }
.editor-contextual-rail .track-rail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.editor-contextual-rail .track-rail-actions .button-small { white-space: normal; text-align: center; line-height: 1.25; }
.editor-contextual-rail .audio-multi-drop-section { margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.editor-contextual-rail .audio-multi-drop { padding: 12px; gap: 6px; }
.editor-contextual-rail .audio-multi-drop strong { font-size: 12px; }
.editor-contextual-rail .audio-multi-drop > span { font-size: 11px; color: var(--muted); }
.editor-contextual-rail .audio-multi-drop .button,
.editor-contextual-rail .audio-multi-drop .button span {
  color: inherit;
}
.editor-contextual-rail .audio-multi-drop .button-primary,
.editor-contextual-rail .audio-multi-drop .button-primary span {
  color: #fff;
}
.editor-contextual-rail .audio-multi-drop-section.is-compact { padding: 8px 10px; }
.editor-contextual-rail .audio-multi-drop-section.is-compact .audio-multi-drop { padding: 10px 8px; gap: 4px; }
.editor-contextual-rail .track-list { padding: 7px; }
.editor-contextual-rail .track-list-empty { padding: 12px; }
.editor-contextual-rail .track-list-empty-copy { margin: 0; font-size: 12px; }
.editor-contextual-rail .rail-intake-queue { padding: 8px 10px; border-bottom: 1px solid var(--line); max-height: 160px; overflow-y: auto; }
.rail-org-meta { margin-top: 6px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.readiness-state-block { display: grid; gap: 8px; }
.readiness-state-block[data-state="error"] { color: #9b1c1c; }
.readiness-state-block[data-state="loading"] .spinner {
  width: 18px; height: 18px; border: 2px solid #d0d5db; border-top-color: var(--brand-orange);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.inspector-body { width: 100%; max-width: none; }
.section-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin: 0 0 14px; }
.section-card > .section-title-row { padding: 16px 18px 0; }
.section-card .form-grid,
.section-card .audio-upload,
.section-card .artwork-drop-zone,
.section-card > .cover-card { padding: 0 18px 18px; }
.inspector-section.section-card { padding: 0; border-bottom: 0; }
.tracks-empty-workspace { padding: 32px 24px 40px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.tracks-empty-workspace .button { margin-top: 8px; }
.tracks-intake-primary { max-width: 720px; margin: 0 auto; width: 100%; }
.tracks-intake-primary .audio-multi-drop-primary {
  width: 100%;
  min-height: 220px;
  padding: 28px 24px;
  gap: 12px;
}
.tracks-intake-primary .audio-multi-drop-primary strong { font-size: 16px; }
.tracks-intake-primary .audio-upload-queue { width: 100%; text-align: left; }
.editor-layout.tracks-intake-focus > .inspector { min-width: 0; }

@media (max-width: 1439px) and (min-width: 901px) {
  .editor-layout:not(.readiness-force-open) {
    grid-template-columns: var(--editor-rail-width) minmax(0, 1fr);
  }
  .editor-layout:not(.readiness-force-open) .editor-context-panel { display: none; }
}

@media (max-width: 1180px) {
  .editor-ux-v2 .editor-context-panel { display: none; }
  .rail-mobile-actions { display: flex; }
}

@media (max-width: 900px) {
  .editor-mobile-stepper { display: flex; }
  .editor-ux-v2 .project-rail .rail-nav,
  .editor-ux-v2 .editor-contextual-rail[data-rail-mode="steps"] .rail-nav { display: none; }
  .editor-ux-v2 .editor-contextual-rail[data-rail-mode="tracks"] {
    position: fixed; inset: auto 0 64px 0; max-height: 55vh; z-index: 40;
    transform: translateY(110%); transition: transform .2s ease;
    border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.12);
    display: block !important;
  }
  .editor-ux-v2 .editor-contextual-rail[data-rail-mode="tracks"].drawer-open { transform: translateY(0); }
  .editor-readiness-drawer {
    display: block; position: fixed; inset: auto 0 64px 0; max-height: 60vh; overflow: auto;
    background: #fff; z-index: 41; transform: translateY(110%); transition: transform .2s ease;
    border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.12);
    padding-bottom: env(safe-area-inset-bottom);
    overscroll-behavior: contain;
  }
  .editor-readiness-drawer.open { transform: translateY(0); }
  .editor-readiness-drawer > header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border-bottom: 1px solid var(--line);
  }
  .editor-mobile-drawer-backdrop { display: block; position: fixed; inset: 0; background: rgba(20,24,28,.35); z-index: 35; }
  .editor-mobile-drawer-backdrop.hidden { display: none; }
  .editor-bottom-bar {
    position: sticky; bottom: 0; z-index: 30; display: flex; gap: 8px; align-items: center;
    justify-content: space-between; padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  }
  .editor-bottom-bar .button { min-height: 44px; }
  .editor-ux-v2 .modal-backdrop, .modal-backdrop { padding: 0; }
  .editor-ux-v2 .modal, .modal { width: 100%; max-width: 100%; min-height: 92vh; border-radius: 16px 16px 0 0; }
  .mobile-only { display: inline-grid !important; }
  .inspector { border-radius: 0; border-left: 0; border-right: 0; }
}

@media (min-width: 901px) {
  .mobile-only { display: none !important; }
  .editor-bottom-bar { display: none !important; }
}

/* === Product Polish v1 === */
.status-chip { font-size: var(--font-size-meta); min-height: 24px; padding: 2px 8px; line-height: 1.3; }
.ops-route-hidden { display: none !important; }
.operations-subnav, .partners-subnav, .settings-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.operations-subnav .button.active, .partners-subnav .button.active, .settings-tabs .button.active,
.artist-chip.selected, .credit-role-chips .tag.active, .segmented label:has(input:checked) {
  border-color: var(--brand-orange);
  box-shadow: inset 0 0 0 1px var(--brand-orange);
  color: var(--text-primary);
}
.operations-hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.operations-card, .ops-batch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 10px;
  min-height: 140px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.operations-card h3, .ops-batch-card h3 { margin: 0; font-size: 16px; }
.operations-card p, .ops-batch-card p { margin: 0; color: var(--text-secondary); font-size: var(--font-size-body); line-height: 1.45; }
.ops-batch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.ops-batch-card .progress-meter { height: 8px; background: var(--surface-muted); border-radius: 999px; overflow: hidden; }
.ops-batch-card .progress-meter > span { display: block; height: 100%; background: var(--brand-orange); }
.ops-tech-details { margin-top: 8px; font-size: var(--font-size-meta); color: var(--text-secondary); }
.synthetic-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: var(--touch-min);
  padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); font-size: var(--font-size-meta); color: var(--text-secondary);
}
.synthetic-toggle input { width: 16px; height: 16px; accent-color: var(--brand-orange); }
.golden-path-shell { max-width: 720px; margin: 0 auto; }
.invite-welcome-points {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}
.invite-welcome-points > span {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}
.invite-step-intro {
  display: grid;
  gap: 6px;
  margin: 18px 0 14px;
}
.invite-step-intro strong,
.invite-step-intro span { display: block; }
.invite-contract-actions { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
.golden-path-progress { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.golden-path-progress .step-pill {
  min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px; background: var(--surface); font-size: var(--font-size-meta);
}
.golden-path-progress .step-pill.active { border-color: var(--brand-orange); box-shadow: inset 0 0 0 1px var(--brand-orange); }
.golden-path-progress .step-pill.done { background: color-mix(in srgb, var(--brand-orange) 12%, white); }
.golden-path-cta { min-height: var(--touch-min); }
.agreement-preview-card {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 16px; display: grid; gap: 10px; margin: 12px 0;
}
.agreement-preview-card .key-value-grid { gap: 10px; }
.error-summary {
  border: 1px solid color-mix(in srgb, var(--danger) 35%, white);
  background: var(--red-soft); color: var(--text-primary);
  border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px;
}
.error-summary a { color: var(--danger); font-weight: 650; }
.field-error { color: var(--danger); font-size: var(--font-size-meta); margin-top: 4px; }
.upload-progress-card, .editor-empty-state {
  border: 1px dashed var(--border); border-radius: var(--radius); padding: 18px; background: var(--surface-muted);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
[aria-live] { /* status region contract */ }
.form-surface, .data-surface, .side-surface { padding: 16px; }
.credit-role-chips, .artist-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.artist-chip, .credit-role-chips .tag { min-height: 40px; }

@media (max-width: 900px) {
  .page-shell, .workspace, .auth-card, .modal-body, .toolbar { max-width: 100%; overflow-x: hidden; }
  .golden-path-progress { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .golden-path-progress .step-pill { justify-content: flex-start; min-width: 0; }
  .operations-hub, .ops-batch-grid { grid-template-columns: 1fr; }
  .editor-bottom-bar { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .control, textarea.control { font-size: 16px; } /* avoid iOS zoom */
}

@media (max-width: 390px) {
  .global-nav-item span:not(.nav-badge) { display: none; }
  .brand-wordmark-header { display: none; }
  .brand-symbol-mobile-fallback { display: grid; }
  .auth-brand-wordmark { width: 140px; height: 29px; }
}

/* Client catalog archive */
.archive-page-header { align-items: flex-start; }
.archive-export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.archive-surface-head {
  align-items: flex-start;
  gap: 12px;
}
.archive-surface-head .field-help { margin: 4px 0 0; }
.archive-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--border-soft, var(--line, #e4e6ea));
  border-radius: var(--radius-ui, 12px);
  background: var(--surface-2, #f7f7f8);
}
.archive-filter-field { margin: 0; min-width: 0; }
.archive-filter-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted, #667);
}
.archive-release-list { display: grid; gap: 10px; }
.archive-release {
  border: 1px solid var(--border-soft, var(--line, #e4e6ea));
  border-radius: var(--radius-ui, 12px);
  background: var(--surface, #fff);
  overflow: hidden;
  box-shadow: var(--shadow-soft, none);
}
.archive-release[open] {
  border-color: color-mix(in srgb, var(--accent, #c45c26) 28%, var(--border-soft, #e4e6ea));
}
.archive-release-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
}
.archive-release-summary::-webkit-details-marker { display: none; }
.archive-release-lead {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}
.archive-release-cover { flex: 0 0 auto; }
.archive-cover-art,
.archive-release-cover .cover-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}
.archive-release-copy { display: grid; gap: 2px; min-width: 0; }
.archive-release-copy strong {
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.archive-release-artist {
  color: var(--text-secondary, var(--muted, #667));
  font-size: 13px;
}
.archive-release-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted, #667);
  font-size: 12px;
}
.archive-release-aside {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.archive-release-chevron {
  width: 18px;
  height: 18px;
  color: var(--muted, #667);
  transition: transform .18s ease;
}
.archive-release[open] .archive-release-chevron { transform: rotate(180deg); }
.archive-release-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--border-soft, #eef0f3);
}
.archive-release-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
}
.archive-tracks-panel {
  border: 1px solid var(--border-soft, #eef0f3);
  border-radius: 10px;
  background: var(--surface-2, #fafafa);
  overflow: hidden;
}
.archive-tracks-head {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted, #667);
  padding: 10px 12px 8px;
}
.archive-track-list { list-style: none; margin: 0; padding: 0 4px 4px; display: grid; gap: 0; }
.archive-track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
}
.archive-track-row:hover { background: color-mix(in srgb, #fff 70%, transparent); }
.archive-track-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.archive-track-num {
  color: var(--muted, #667);
  font-variant-numeric: tabular-nums;
  min-width: 1.75em;
  font-size: 12px;
}
.archive-track-copy { display: grid; gap: 2px; min-width: 0; }
.archive-track-title { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.archive-track-duration {
  color: var(--muted, #667);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.archive-track-actions { flex: 0 0 auto; }
.archive-track-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.archive-track-download small {
  color: var(--muted, #667);
  font-weight: 400;
}
.archive-empty { padding: 36px 16px; }

/* Archive filters must not inherit catalog .filter-bar flex (ui-v3.css loads later). */
html.ui-v2 .archive-page .archive-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  min-height: 0;
  overflow: visible;
  overflow-x: visible;
  flex-wrap: unset;
}
html.ui-v2 .archive-page .archive-filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
html.ui-v2 .archive-page .archive-filter-field .merphi-combobox,
html.ui-v2 .archive-page .archive-filter-field .merphi-combobox-trigger {
  width: 100%;
  min-width: 0;
}
html.ui-v2 .archive-page .archive-surface-head {
  display: flex;
  justify-content: space-between;
}
/* archive-ui-v2-grid */

@media (max-width: 900px) {
  .archive-filters { grid-template-columns: 1fr; }
  .archive-release-summary { align-items: flex-start; }
  .archive-release-aside { padding-top: 4px; }
  .archive-track-row { align-items: flex-start; flex-direction: column; }
}

/* Selective frontend closure recovered from the reviewed Git source. */
/* Publishing module (integrated Merphi Distribution shell) */
.publishing-page .publishing-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.publishing-page .publishing-tabs .button.active { box-shadow: inset 0 -2px 0 var(--brand-orange, #e85d04); }
.publishing-split { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 16px; }
.publishing-onboarding-card, .publishing-blocker-card, .publishing-work-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 10px 0; background: var(--surface-muted);
}
.publishing-blocker-grid { display: grid; gap: 8px; }
.publishing-exclusion-banner {
  border: 1px solid #b45309; background: #fff7ed; color: #9a3412; padding: 10px 12px; border-radius: var(--radius); margin: 10px 0;
}
.publishing-checklist { margin: 8px 0 0 18px; }
.publishing-packet-json {
  max-height: 320px; overflow: auto; font-size: 12px; background: #111; color: #e5e7eb; padding: 12px; border-radius: 8px;
}
.publishing-stepper { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.publishing-identity-planes { margin-top: 16px; }
@media (max-width: 900px) {
  .publishing-split { grid-template-columns: 1fr; }
  .publishing-master-detail { grid-template-columns: 1fr; }
  .publishing-page:not(.publishing-mobile-detail) .publishing-detail-wrap { display: none; }
  .publishing-page.publishing-mobile-detail .publishing-list-pane { display: none; }
}

/* Publishing master-detail, timeline, release summary */
.publishing-master-detail {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 16px;
  align-items: start;
}
.publishing-op-cards .publishing-op-card {
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.publishing-op-cards .publishing-op-card.active {
  border-color: var(--brand-orange, #e85d04);
  box-shadow: inset 0 -2px 0 var(--brand-orange, #e85d04);
}
.publishing-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.publishing-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.publishing-timeline-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.publishing-timeline-step.is-complete { color: var(--text); }
.publishing-timeline-step.is-current { font-weight: 600; color: var(--brand-orange, #e85d04); }
.publishing-timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.publishing-timeline-step.is-complete .publishing-timeline-dot { background: var(--brand-orange, #e85d04); }
.publishing-tech-drawer { margin-top: 12px; }
.publishing-tech-body { display: grid; gap: 8px; margin-top: 8px; }
.publishing-tech-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.publishing-tech-value { font-family: ui-monospace, monospace; font-size: 11px; }
.publishing-canary-notice {
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1e40af;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin: 12px 0;
  font-size: 13px;
}
.publishing-release-summary { overflow-x: hidden; }
.publishing-release-card {
  display: grid;
  gap: 10px;
  max-width: 100%;
  overflow-x: hidden;
}
.publishing-release-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.publishing-release-metric {
  min-width: 0;
  padding: 6px 4px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
}
.publishing-release-metric small {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.publishing-release-metric strong { display: block; font-size: 15px; }
.publishing-release-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.publishing-candidate-preview .publishing-candidate-list {
  max-height: 360px;
  overflow-y: auto;
  margin: 12px 0;
  padding-left: 18px;
}
.modal.modal-wide { max-width: min(960px, 96vw); width: 96vw; }
@media (max-width: 720px) {
  .publishing-overview-grid { grid-template-columns: 1fr; }
  .publishing-release-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Track overflow and staff tooling closure. */
.track-overflow-menu {
  position: absolute;
  right: 8px;
  top: 36px;
  z-index: 5;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  display: grid;
  gap: 2px;
}
.track-overflow-menu button {
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.track-overflow-menu button:hover:not(:disabled) { background: #f5f6f8; }
.track-overflow-menu button:disabled { opacity: 0.4; cursor: default; }
.track-overflow-sep {
  height: 1px;
  margin: 4px 0;
  background: var(--line);
}
.inspector-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.staff-tools-panel,
.staff-tools-context details {
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 8px 10px;
}
.staff-tools-panel summary { cursor: pointer; font-weight: 600; }
.staff-tools-body { display: grid; gap: 12px; margin-top: 10px; }
.staff-tools-body h4 {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.merphi-copy-row {
  display: grid;
  grid-template-columns: minmax(90px, 140px) minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin: 0 0 6px;
}
.merphi-copy-label { color: var(--muted); font-size: 12px; }
.merphi-copy-value { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-tools-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-release-copy-wrap { position: relative; }
.staff-release-copy-menu { position: absolute; z-index: 40; min-width: 220px; right: 0; top: 100%; }
.staff-clone-actions { position: sticky; bottom: 0; background: var(--surface); padding-top: 8px; }
.clone-preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.clone-preview-table th,
.clone-preview-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.clone-preview-card {
  border: 1px solid var(--line);
  padding: 10px;
  margin: 0 0 8px;
  background: #fff;
}
.clone-preview-summary { font-weight: 600; }
.staff-review-drawer section { margin: 0 0 14px; }
.staff-review-warnings li { color: var(--danger, #b42318); }
@media (max-width: 900px) {
  .merphi-copy-row { grid-template-columns: minmax(0, 1fr) auto; }
  .merphi-copy-label { grid-column: 1 / -1; }
  .clone-preview-table { display: none; }
  .staff-clone-actions { position: sticky; bottom: 0; z-index: 5; }
  .inspector-header-actions .button span { display: none; }
}

/* Publishing provider identities. */
.publishing-brand-rows { display: grid; gap: 12px; }
.publishing-brand-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

/* Creative aliases desk: searchable identity review, not a raw admin form. */
.artist-merge-page { max-width: 1280px; }
.artist-identity-desk { display: grid; gap: 18px; }
.artist-identity-search {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff 0%, #fffaf6 100%);
  box-shadow: 0 12px 34px rgba(35, 28, 22, 0.055);
}
.artist-desk-searchbox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 16px; align-items: end; }
.artist-desk-search-field { margin: 0; }
.artist-desk-search-field .artist-picker-search-field { position: relative; }
.artist-desk-search-field .artist-picker-search-field > i { position: absolute; z-index: 2; left: 14px; top: 50%; width: 19px; transform: translateY(-50%); color: #717985; pointer-events: none; }
.artist-desk-search-field .control { min-height: 48px; padding-left: 44px; padding-right: 46px; border-radius: 14px; font-size: 14px; }
.artist-desk-search-hint { margin-top: 7px; }
.artist-identity-selection-bar {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #f0c9a5;
  border-radius: 16px;
  background: #fff8f1;
}
.artist-identity-selection-bar.is-empty { border-style: dashed; border-color: var(--line); background: rgba(255,255,255,.55); }
.artist-identity-selection-empty { margin: 0; color: var(--muted); }
.artist-identity-selection-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.artist-identity-selection-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.artist-identity-selection-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.artist-identity-selection-chip > i { width: 16px; }
.artist-identity-selection-chip small { color: var(--muted); }
.artist-identity-selection-chip.is-live { border-color: #a9ddc5; color: #176b4d; background: #f2fbf7; }
.artist-identity-selection-chip.is-duplicate { border-color: #f0c5a0; color: #9c430c; }
.artist-identity-pending,
.artist-identity-similar,
.artist-merge-preview { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(15,23,42,.045); }
.artist-identity-pending .surface-head,
.artist-identity-similar .surface-head,
.artist-merge-preview .surface-head { padding: 17px 18px; border-bottom: 1px solid var(--line); }
.artist-identity-pending .surface-body,
.artist-identity-similar .surface-body,
.artist-merge-preview .surface-body { padding: 18px; }
.artist-identity-results { display: grid; gap: 14px; }
.artist-identity-cluster { display: grid; gap: 13px; }
.artist-identity-cluster + .artist-identity-cluster { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.artist-identity-cluster-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.artist-identity-cluster-title { display: grid; gap: 3px; margin: 0; }
.artist-identity-cluster-title strong { font-size: 15px; }
.artist-identity-cluster-title small { color: var(--muted); }
.artist-identity-cluster-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.artist-identity-tile { overflow: hidden; border: 1px solid #e2e6eb; border-radius: 16px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.artist-identity-tile:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(15,23,42,.075); }
.artist-identity-tile.is-live { border-color: #83cfad; box-shadow: inset 0 0 0 1px #83cfad; }
.artist-identity-tile.is-duplicate { border-color: #eea466; box-shadow: inset 0 0 0 1px #eea466; }
.artist-identity-tile-open { width: 100%; padding: 15px; display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 12px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.artist-identity-tile-open .artist-chip-avatar { width: 48px; height: 48px; }
.artist-identity-tile-copy { display: grid; gap: 3px; min-width: 0; }
.artist-identity-tile-copy > strong { overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.artist-identity-tile-copy small { color: var(--muted); line-height: 1.35; }
.artist-identity-tile-status { width: fit-content; padding: 3px 7px; border-radius: 999px; background: #f1f3f5; }
.artist-identity-tile-actions { display: flex; gap: 8px; padding: 11px 14px 14px; border-top: 1px solid #edf0f2; }
.artist-identity-tile-actions .button { flex: 1; }
.artist-identity-other { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.72); }
.artist-merge-loading { min-height: 92px; display: grid; place-items: center; padding: 24px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); background: rgba(255,255,255,.55); }
.artist-merge-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
.artist-merge-counts > div { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-secondary); }
.artist-merge-counts span { color: var(--muted); font-size: 11px; }
.artist-merge-counts strong { font-size: 20px; }
.artist-merge-safe { display: flex; gap: 12px; margin-top: 14px; padding: 14px; border: 1px solid #b9dfcf; border-radius: 14px; background: #f2fbf7; }
.artist-merge-safe > i { color: #147a51; }
.artist-merge-apply-gate { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 12px; margin-top: 16px; }
.artist-merge-apply-gate > small { grid-column: 1 / -1; color: var(--muted); }

@media (max-width: 800px) {
  .artist-desk-searchbox { grid-template-columns: 1fr; }
  .artist-identity-cluster-head { align-items: stretch; flex-direction: column; }
  .artist-identity-cluster-cards { grid-template-columns: 1fr; }
  .artist-merge-apply-gate { grid-template-columns: 1fr; }
}
.audio-multi-capacity {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
  max-width: 560px;
}

[data-splits-save].is-confirmed {
  background: #e8f7ef;
  border-color: #a8ddc0;
  color: #147849;
}

.artist-merge-error,
.artist-merge-loading.is-error {
  color: #a83b36;
}
