/* Media Release Studio — monochrome UI in the style of shadcn/ui.
   Tokens follow shadcn "neutral". No framework, no build step. See docs/UI_DESIGN.md. */

/* ---------- Tokens ---------- */
:root {
  --background: hsl(0 0% 100%);
  --foreground: hsl(0 0% 3.9%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(0 0% 3.9%);
  --popover: hsl(0 0% 100%);
  --popover-foreground: hsl(0 0% 3.9%);
  --primary: hsl(0 0% 9%);
  --primary-foreground: hsl(0 0% 98%);
  --secondary: hsl(0 0% 96.1%);
  --secondary-foreground: hsl(0 0% 9%);
  --muted: hsl(0 0% 96.1%);
  --muted-foreground: hsl(0 0% 45.1%);
  --accent: hsl(0 0% 96.1%);
  --accent-foreground: hsl(0 0% 9%);
  --destructive: hsl(0 72% 45%);
  --border: hsl(0 0% 89.8%);
  --input: hsl(0 0% 89.8%);
  --ring: hsl(0 0% 3.9%);
  --radius: 0.5rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.12);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: hsl(0 0% 3.9%);
    --foreground: hsl(0 0% 98%);
    --card: hsl(0 0% 6%);
    --card-foreground: hsl(0 0% 98%);
    --popover: hsl(0 0% 6%);
    --popover-foreground: hsl(0 0% 98%);
    --primary: hsl(0 0% 98%);
    --primary-foreground: hsl(0 0% 9%);
    --secondary: hsl(0 0% 14.9%);
    --secondary-foreground: hsl(0 0% 98%);
    --muted: hsl(0 0% 14.9%);
    --muted-foreground: hsl(0 0% 63.9%);
    --accent: hsl(0 0% 14.9%);
    --accent-foreground: hsl(0 0% 98%);
    --destructive: hsl(0 72% 65%);
    --border: hsl(0 0% 16%);
    --input: hsl(0 0% 20%);
    --ring: hsl(0 0% 83.1%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 16px -2px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --background: hsl(0 0% 3.9%);
  --foreground: hsl(0 0% 98%);
  --card: hsl(0 0% 6%);
  --card-foreground: hsl(0 0% 98%);
  --popover: hsl(0 0% 6%);
  --popover-foreground: hsl(0 0% 98%);
  --primary: hsl(0 0% 98%);
  --primary-foreground: hsl(0 0% 9%);
  --secondary: hsl(0 0% 14.9%);
  --secondary-foreground: hsl(0 0% 98%);
  --muted: hsl(0 0% 14.9%);
  --muted-foreground: hsl(0 0% 63.9%);
  --accent: hsl(0 0% 14.9%);
  --accent-foreground: hsl(0 0% 98%);
  --destructive: hsl(0 72% 65%);
  --border: hsl(0 0% 16%);
  --input: hsl(0 0% 20%);
  --ring: hsl(0 0% 83.1%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 16px -2px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.015em; }
h1 { font-size: 1.5rem; font-weight: 600; }
h2 { font-size: 1.125rem; font-weight: 600; }
h3 { font-size: 0.9375rem; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
code, kbd { font-family: var(--mono); font-size: 0.85em; }
code { background: var(--muted); padding: 0.1em 0.35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted-foreground); }
.small { font-size: 0.8125rem; }
.mono { font-family: var(--mono); }
.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 20px; height: 20px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--border);
  padding: 1rem 0.75rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; padding: 0.25rem 0.5rem; }
.brand-mark { width: 24px; height: 24px; border-radius: 6px; background: var(--primary); color: var(--primary-foreground); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 0.75rem; color: var(--muted-foreground); padding: 0 0.5rem 0.25rem; font-weight: 500; }
.nav-link {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.5rem; border-radius: calc(var(--radius) - 2px);
  text-decoration: none; color: var(--muted-foreground); font-weight: 500;
}
.nav-link:hover { background: var(--accent); color: var(--accent-foreground); }
.nav-link[aria-current="page"] { background: var(--secondary); color: var(--foreground); }
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.75rem; padding: 0 1.5rem;
  position: sticky; top: 0; background: var(--background); z-index: 10;
}
.breadcrumb { display: flex; align-items: center; gap: 0.375rem; color: var(--muted-foreground); font-size: 0.875rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--foreground); }
.breadcrumb [aria-current] { color: var(--foreground); font-weight: 500; }
.topbar-actions { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }
.content { padding: 1.5rem; max-width: 1080px; width: 100%; display: flex; flex-direction: column; gap: 1.5rem; }
.content-narrow { max-width: 760px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-header p { color: var(--muted-foreground); margin-top: 0.25rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.topbar .menu-toggle { display: none; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; background: var(--background); z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-md); }
  .app[data-nav="open"] .sidebar { transform: none; }
  .topbar .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 1rem; }
  .content { padding: 1rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Card ---------- */
.card { background: var(--card); color: var(--card-foreground); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow-sm); }
.card-header { padding: 1.25rem 1.25rem 0; display: flex; flex-direction: column; gap: 0.25rem; }
.card-header .row { justify-content: space-between; }
.card-description { color: var(--muted-foreground); font-size: 0.875rem; }
.card-content { padding: 1.25rem; }
.card-footer { padding: 0 1.25rem 1.25rem; display: flex; gap: 0.5rem; align-items: center; }
.card-footer.split { justify-content: space-between; }
.card-highlight { border-color: var(--foreground); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 36px; padding: 0 1rem; border-radius: calc(var(--radius) - 2px);
  font: inherit; font-weight: 500; font-size: 0.875rem; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  background: var(--primary); color: var(--primary-foreground);
  transition: background-color .15s, opacity .15s;
}
.btn:hover { opacity: 0.9; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover { opacity: 1; background: var(--accent); }
.btn-outline { background: var(--background); color: var(--foreground); border-color: var(--input); box-shadow: var(--shadow-sm); }
.btn-outline:hover { opacity: 1; background: var(--accent); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { opacity: 1; background: var(--accent); }
.btn-link { background: none; color: var(--foreground); text-decoration: underline; padding: 0; height: auto; }
.btn-sm { height: 32px; padding: 0 0.75rem; font-size: 0.8125rem; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  height: 22px; padding: 0 0.5rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 500; white-space: nowrap;
  border: 1px solid var(--border); color: var(--foreground); background: var(--background);
}
.badge-solid { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.badge-muted { background: var(--secondary); border-color: transparent; color: var(--secondary-foreground); }
.badge-dest { border-style: dashed; color: var(--muted-foreground); font-family: var(--mono); font-size: 0.6875rem; }
.badge-danger { color: var(--destructive); border-color: currentColor; }

/* Level badges: required = solid, recommended = outline, optional = muted */
.level-required { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.level-recommended { border-color: var(--foreground); }
.level-optional { background: var(--secondary); border-color: transparent; color: var(--muted-foreground); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field-head { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.label { font-weight: 500; font-size: 0.875rem; }
.field-meta { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; margin-left: auto; }
.input, .select, .textarea {
  width: 100%; font: inherit; font-size: 0.875rem; color: var(--foreground);
  background: var(--background); border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px); box-shadow: var(--shadow-sm);
  padding: 0 0.75rem; height: 36px;
}
.textarea { height: auto; min-height: 120px; padding: 0.5rem 0.75rem; resize: vertical; line-height: 1.6; }
.textarea.mono { font-family: var(--mono); font-size: 0.8125rem; }
.input::placeholder, .textarea::placeholder { color: var(--muted-foreground); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--destructive); }
.select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
.help { color: var(--muted-foreground); font-size: 0.8125rem; }
.example { color: var(--muted-foreground); font-size: 0.8125rem; }
.example code { color: var(--foreground); }
.field-foot { display: flex; justify-content: space-between; gap: 0.5rem; align-items: flex-start; }
.counter { color: var(--muted-foreground); font-size: 0.75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.error { color: var(--destructive); font-size: 0.8125rem; display: flex; gap: 0.375rem; align-items: flex-start; }
.error .icon { margin-top: 2px; }

/* Choice cards (radio) with recommended option */
.choices { display: grid; gap: 0.5rem; }
.choice {
  display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; align-items: start;
  padding: 0.875rem 1rem; border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; background: var(--background);
}
.choice:hover { background: var(--accent); }
.choice:has(input:checked) { border-color: var(--foreground); box-shadow: 0 0 0 1px var(--foreground); }
.choice input { margin: 3px 0 0; accent-color: var(--primary); width: 16px; height: 16px; }
.choice-title { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; flex-wrap: wrap; }
.choice-body { grid-column: 2; color: var(--muted-foreground); font-size: 0.8125rem; }
.pros-cons { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 1rem; font-size: 0.8125rem; color: var(--muted-foreground); margin-top: 0.25rem; }
.pros-cons span::before { content: "+ "; color: var(--foreground); }
.pros-cons span.con::before { content: "− "; }
@media (max-width: 560px) { .pros-cons { grid-template-columns: 1fr; } }

.checkbox { display: flex; gap: 0.625rem; align-items: flex-start; cursor: pointer; }
.checkbox input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--primary); }

/* ---------- Popover (native HTML popover, no JS) ---------- */
.info-btn {
  display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0;
  border-radius: 999px; border: 0; background: transparent; color: var(--muted-foreground); cursor: pointer;
}
.info-btn:hover, .info-btn:focus-visible { color: var(--foreground); background: var(--accent); }
.info-btn .icon { width: 15px; height: 15px; }
[popover].pop {
  margin: 0; inset: auto; position: fixed;
  width: min(360px, calc(100vw - 32px));
  padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--popover); color: var(--popover-foreground); box-shadow: var(--shadow-md);
  font-size: 0.8125rem; line-height: 1.55;
}
[popover].pop:popover-open { display: flex; flex-direction: column; gap: 0.75rem; }
.pop dl { margin: 0; display: flex; flex-direction: column; gap: 0.625rem; }
.pop dt { font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-foreground); }
.pop dd { margin: 0.125rem 0 0; }
.pop-close { position: absolute; top: 0.5rem; right: 0.5rem; }
@media (max-width: 560px) { [popover].pop { left: 16px !important; right: 16px; bottom: 16px; top: auto !important; width: auto; } }

/* Glossary term */
.term { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; background: none; border: 0; padding: 0; font: inherit; color: inherit; }

/* ---------- Step panel ---------- */
.step-panel { border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); background: var(--muted); }
.step-panel > summary {
  list-style: none; cursor: pointer; padding: 0.875rem 1rem;
  display: flex; align-items: center; gap: 0.625rem; font-weight: 500;
}
.step-panel > summary::-webkit-details-marker { display: none; }
.step-panel > summary .chev { margin-left: auto; transition: transform .15s; }
.step-panel[open] > summary .chev { transform: rotate(180deg); }
.step-panel-body { padding: 0 1rem 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.875rem 1.5rem; }
.step-panel-body h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted-foreground); margin-bottom: 0.125rem; font-weight: 600; }
.step-panel-body .wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .step-panel-body { grid-template-columns: 1fr; } }

/* ---------- Progress, steps ---------- */
progress {
  appearance: none; width: 100%; height: 6px; border: 0; border-radius: 999px;
  background: var(--secondary); overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--secondary); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--primary); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--primary); border-radius: 999px; }

.phases { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.75rem; }
.phase { display: flex; flex-direction: column; gap: 0.375rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; }
.phase:hover { background: var(--accent); }
.phase[aria-current="step"] { border-color: var(--foreground); }
.phase-name { font-weight: 500; font-size: 0.8125rem; }
.phase-meta { color: var(--muted-foreground); font-size: 0.75rem; }
@media (max-width: 860px) { .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: flex; gap: 0.75rem; align-items: center; padding: 0.625rem 0; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: 0; }
.steps a { text-decoration: none; }
.steps a:hover { text-decoration: underline; }
.dot { width: 20px; height: 20px; border-radius: 999px; border: 1.5px solid var(--border); display: grid; place-items: center; flex: none; }
.dot .icon { width: 12px; height: 12px; stroke-width: 3; }
.dot-done { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.dot-current { border-color: var(--foreground); box-shadow: inset 0 0 0 4px var(--background), inset 0 0 0 10px var(--foreground); }
.dot-wait { border-style: dashed; border-color: var(--muted-foreground); }
.step-right { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }

/* ---------- Status items (readiness board) ---------- */
.items { display: flex; flex-direction: column; }
.item { display: grid; grid-template-columns: 24px 1fr auto; gap: 0.75rem; align-items: center; padding: 0.75rem 1.25rem; border-top: 1px solid var(--border); }
.item-title { font-weight: 500; }
.item-desc { color: var(--muted-foreground); font-size: 0.8125rem; }
.item-actions { display: flex; gap: 0.5rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.status { width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; }
.status .icon { width: 12px; height: 12px; stroke-width: 3; }
.status-ok { background: var(--primary); color: var(--primary-foreground); }
.status-block { background: var(--destructive); color: #fff; }
.status-warn { border: 1.5px solid var(--foreground); color: var(--foreground); }
.status-todo { border: 1.5px dashed var(--muted-foreground); }
@media (max-width: 560px) { .item { grid-template-columns: 24px 1fr; } .item-actions { grid-column: 2; justify-content: flex-start; } }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { text-align: left; font-weight: 500; color: var(--muted-foreground); padding: 0.625rem 1.25rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--muted); }

/* ---------- Alerts, kbd ---------- */
.alert { display: grid; grid-template-columns: 20px 1fr; gap: 0.25rem 0.75rem; padding: 0.875rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--background); }
.alert .icon { margin-top: 2px; }
.alert-title { font-weight: 500; }
.alert-body { grid-column: 2; color: var(--muted-foreground); font-size: 0.8125rem; }
.alert-danger { border-color: var(--destructive); color: var(--destructive); }
.alert-danger .alert-body { color: var(--destructive); }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.3em; background: var(--muted); }

/* ---------- Theme toggle ---------- */
.theme-toggle { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px); gap: 2px; }
.theme-toggle button { border: 0; background: transparent; color: var(--muted-foreground); height: 26px; width: 30px; border-radius: 4px; display: grid; place-items: center; cursor: pointer; }
.theme-toggle button[aria-pressed="true"] { background: var(--secondary); color: var(--foreground); }

/* ---------- Copy row (packets) ---------- */
.copy-row { display: grid; grid-template-columns: 180px 1fr auto; gap: 0.75rem; align-items: center; padding: 0.625rem 1.25rem; border-top: 1px solid var(--border); }
.copy-row .value { font-family: var(--mono); font-size: 0.8125rem; overflow-wrap: anywhere; }
.copy-row .value-multiline { white-space: pre-wrap; max-height: 16rem; overflow-y: auto; }
.packet-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.375rem; }
.packet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
@media (max-width: 560px) { .copy-row { grid-template-columns: 1fr auto; } .copy-row .label, .copy-row > :first-child { grid-column: 1 / -1; } }

/* ---------- Utilities ---------- */
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.card-flush { margin-top: 1rem; }
.card-footer-sep { padding-top: 1.25rem; border-top: 1px solid var(--border); }

@media (max-width: 560px) {
  .topbar-actions { display: none; }
  .breadcrumb { min-width: 0; white-space: nowrap; overflow: hidden; }
  .breadcrumb > :not(:last-child) { display: none; }
  .breadcrumb [aria-current] { overflow: hidden; text-overflow: ellipsis; }
}
.counter.over { color: var(--destructive); }
code { overflow-wrap: anywhere; }
.help, .error, .field-foot > * { min-width: 0; overflow-wrap: anywhere; }
.card-footer { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.drag { cursor: grab; touch-action: none; user-select: none; padding: 0 0.25rem; }
.steps li form { margin: 0; }
.field-foot { flex-wrap: wrap; } .counter { white-space: normal; } .field { min-width: 0; } .card-content { min-width: 0; }

/* Per-track audio status and upload under each track row */
.steps li:has(.track-audio) { flex-wrap: wrap; }
.track-audio { flex-basis: 100%; display: flex; flex-direction: column; gap: 0.5rem; padding-left: 2.25rem; min-width: 0; }
.track-audio p { margin: 0; overflow-wrap: anywhere; }
.track-audio .row { flex-wrap: wrap; }
.track-audio .input[type="file"] { flex: 1 1 14rem; min-width: 0; }
.track-audio progress { flex: 1 1 8rem; }
@media (max-width: 560px) { .track-audio { padding-left: 0; } }

/* Lyrics and credits (WP17) */
.track-tabs { margin-bottom: 1rem; }
#track-lyrics, #track-lyrics_raw { min-height: 18rem; font-family: var(--mono); font-size: 0.8125rem; }
.lyrics-diff { margin: 0; padding: 0.75rem; max-height: 28rem; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--mono); font-size: 0.8125rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.lyrics-diff span { display: block; }
.listen-track { display: grid; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.listen-track:last-child { border-bottom: 0; }
.listen-track audio { width: 100%; }
.listen-lyrics { max-height: 22rem; font-family: inherit; font-size: 0.875rem; }
.diff-add { background: color-mix(in srgb, var(--success, #16a34a) 14%, transparent); }
.diff-del { background: color-mix(in srgb, var(--destructive) 12%, transparent); text-decoration: line-through; color: var(--muted-foreground); }

/* Rights and AI (WP18) */
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.element-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, 12rem); gap: 0.5rem 1rem; align-items: center; margin-top: 0.5rem; }
@media (max-width: 480px) { .element-grid { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; } .element-grid select { margin-bottom: 0.5rem; } }
#attestation blockquote { margin: 0; padding: 0.75rem 1rem; border-left: 3px solid var(--border); color: var(--muted-foreground); }
/* Readiness board: passed automatic checks fold away under one row. */
.item-passed > summary { cursor: pointer; list-style: none; }
.item-passed > summary::-webkit-details-marker { display: none; }
.item-passed > summary .status { width: 20px; height: 20px; }

/* ---------- Artist kit ---------- */
.kit-destinations { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.kit-destination { display: flex; flex-direction: column; gap: 0.375rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); }
.kit-image img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.kit-image-avatar img { width: 150px; aspect-ratio: 1; object-fit: cover; }
.kit-image-header img { width: 100%; max-width: 420px; }
