/* At 1440: 1328px canvas = 440px setup + 24px gutter + 864px workspace.
   Sound becomes distinct horizontal output lanes. One amber data accent. */
body.separation-page {
  --sep-ground: #080808;
  --sep-surface: #151515;
  --sep-raised: #242424;
  --sep-text: #f4f4f4;
  --sep-muted: #b4b4b4;
  --sep-data: #e5b866;
  background: var(--sep-ground);
  color: var(--sep-text);
}
.separation-page .shell {
  max-width: 1440px;
  padding: 24px 32px;
}
.separation-page .topbar,
.separation-page .resource-strip {
  background: var(--sep-ground);
  border-color: #242424;
}
.separation-page .muted,
.separation-page .small,
.separation-page .field-hint {
  color: var(--sep-muted);
}
.separation-page button,
.separation-page .button {
  background: #242424;
  border-color: #444;
  color: var(--sep-text);
  min-height: 36px;
  padding: 7px 14px;
}
.separation-page button.quiet,
.separation-page .button.quiet {
  background: transparent;
}
.separation-page button.primary {
  background: #f4f4f4;
  color: #111;
  border-color: #f4f4f4;
  border-radius: 999px;
}
.separation-page button:disabled {
  opacity: 1;
  color: #aaa;
  background: #242424;
  border-color: #333;
  cursor: not-allowed;
}
.separation-page input,
.separation-page select {
  background: var(--sep-raised);
  border-color: #555;
  color: var(--sep-text);
}
.separation-page :focus-visible {
  outline: 2px solid var(--sep-data);
  outline-offset: 3px;
}
.separation-page h1 {
  font-size: 28px;
  margin: 0 0 4px;
  line-height: 1.3;
}
.separation-page h2 {
  font-size: 16px;
  margin: 0;
  line-height: 1.5;
}
.sep-heading,
.sep-section-heading,
.sep-result-heading,
.sep-result-toolbar,
.sep-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sep-heading {
  margin-bottom: 24px;
}
.sep-heading p {
  margin: 0;
}
.sep-layout {
  display: grid;
  grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.sep-setup,
.sep-results,
.sep-history-panel {
  min-width: 0;
  padding: 24px;
  border-radius: 8px;
  background: var(--sep-surface);
}
.sep-setup > h2 {
  margin-bottom: 12px;
}
.sep-drop {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  padding: 16px;
  border: 1px dashed #666;
  border-radius: 6px;
  cursor: pointer;
}
.sep-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.sep-drop:focus-within {
  outline: 2px solid var(--sep-data);
  outline-offset: 3px;
}
.sep-drop.dragging {
  background: #303030;
}
.sep-setup p {
  margin: 10px 0;
}
#sep-file-info:not(:empty) {
  margin: 14px 0 20px;
  display: grid;
  gap: 6px;
  overflow-wrap: anywhere;
}
#sep-file-info audio {
  width: 100%;
  height: 36px;
}
.sep-section-heading {
  margin: 22px 0 12px;
}
.sep-presets {
  display: flex;
  gap: 4px;
}
.separation-page .sep-presets button {
  font-size: 12px;
  padding: 4px 7px;
}
#sep-sources {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.sep-source {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  background: #242424;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.sep-source.selected {
  background: #363636;
}
.sep-source input {
  width: 15px;
  height: 15px;
  accent-color: #eee;
  margin: 0;
}
.sep-source:last-child {
  grid-column: span 2;
}
#sep-models {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 2px;
  scrollbar-color: #555 #151515;
}
.sep-model {
  background: #242424;
  border-radius: 6px;
  padding: 12px;
}
.sep-model.selected {
  outline: 1px solid #888;
}
.sep-model-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}
.sep-model-choice input {
  width: 16px;
  height: 16px;
  margin: 3px 0;
  accent-color: #eee;
  flex-shrink: 0;
}
.sep-model-choice span span {
  display: block;
  margin-top: 3px;
}
.sep-model-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 0 26px;
}
.separation-page .sep-download {
  min-height: 30px;
  font-size: 12px;
  padding: 3px 10px;
}
.sep-cached {
  font-size: 12px;
  color: var(--sep-data);
}
.sep-submit-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-top: 20px;
}
.sep-submit-row label {
  display: grid;
  gap: 6px;
}
.sep-submit-row select {
  width: 146px;
  height: 38px;
  padding: 5px 10px;
}
#sep-upload-progress {
  width: 100%;
  height: 6px;
  accent-color: var(--sep-data);
  margin-top: 14px;
}
.sep-workspace {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.sep-results > p {
  margin: 12px 0;
}
.sep-output-plan {
  display: grid;
  margin: 12px 0;
}
.sep-plan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 50px;
  border-bottom: 1px solid #2a2a2a;
}
.sep-plan-row:last-child {
  border-bottom: 0;
}
.sep-result-heading {
  align-items: flex-start;
}
.sep-result-heading h2 {
  overflow-wrap: anywhere;
}
.sep-result-heading button {
  flex-shrink: 0;
}
.sep-stage {
  font-size: 14px;
}
.sep-stage.working {
  color: var(--sep-data);
}
.sep-stage.working::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 8px;
  animation: sep-pulse 1.5s ease-in-out infinite;
}
@keyframes sep-pulse {
  50% {
    opacity: 0.3;
  }
}
.sep-result-toolbar {
  margin: 20px 0 4px;
}
.sep-track {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #2a2a2a;
}
.sep-track:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.sep-track-label {
  display: grid;
  gap: 5px;
}
.sep-track-player {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 4px 12px;
}
.sep-track-player input[type="range"] {
  width: 100%;
  padding: 0;
  height: 20px;
  accent-color: var(--sep-data);
  border: 0;
}
.sep-time {
  grid-column: 2;
  color: var(--sep-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.separation-page .sep-play {
  padding: 4px 8px;
}
.sep-history-panel .sep-section-heading {
  margin-top: 0;
}
#sep-history {
  max-height: 360px;
  overflow: auto;
}
.separation-page .sep-history-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  padding: 12px;
  min-height: 62px;
}
.separation-page .sep-history-row.selected {
  background: #2a2a2a;
}
.sep-history-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.sep-history-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.sep-history-row > span:last-child {
  flex-shrink: 0;
}
.sep-bottom {
  margin: 24px 0 0;
}
@media (max-width: 1100px) {
  .sep-layout {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 16px;
  }
  .sep-setup,
  .sep-results,
  .sep-history-panel {
    padding: 18px;
  }
  .sep-track {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .sep-track-player {
    grid-column: 1/-1;
    grid-row: 2;
  }
}
@media (max-width: 800px) {
  .separation-page .shell {
    padding: 20px 16px;
  }
  .sep-layout {
    grid-template-columns: 1fr;
  }
  .sep-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .sep-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .separation-page button,
  .separation-page .button {
    min-height: 44px;
  }
  #sep-models {
    max-height: 260px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sep-stage.working::before {
    animation: none;
  }
}

.sep-heading .sep-submit-row {
  margin: 0;
  flex-shrink: 0;
}
.separation-page .skip:not(:focus) {
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
}
@media (max-width: 800px) {
  .sep-heading .sep-submit-row {
    width: 100%;
  }
}
.sep-model-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.sep-model-filters input[type="search"],
.sep-model-filters select {
  min-width: 0;
  width: 100%;
  font: inherit;
  font-size: 13px;
  padding: 10px;
  background: #242424;
  color: #f2f2f2;
  border: 1px solid #555;
  border-radius: 6px;
}
.sep-model-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1/-1;
  font-size: 13px;
}
.sep-model-filters input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #ddd;
}
#sep-models {
  max-height: 520px;
  overflow: auto;
  scrollbar-width: thin;
  padding: 3px;
}
.sep-model-choice span span {
  display: block;
  line-height: 1.6;
  margin-top: 4px;
}
.separation-page .sep-model-choice {
  min-width: 0;
}
.separation-page .sep-model-choice strong {
  overflow-wrap: anywhere;
}
