/* ============================================================================
   MIGHTY MEDIA STUDIO | AUDIO LAB | CANONICAL STYLESHEET
   One authoritative cascade. No inline CSS. No retired stage overrides.
   Geometry: landscape = viewport-width / 1280 in both directions; portrait keeps its approved independent family.
   ============================================================================ */

/*============================================================================
   AUDIO LAB | CUSTOM AUDIO PLAYER | CONTROLS AND GEOMETRY
   Uses --stem-reference-unit from Stem-Engine.css. No native control chrome.
   ============================================================================*/

#stemEngineMount .stem-audio-core {
  display: none;
}

#stemEngineMount .stem-player {
  width: min(100%, calc(1040 * var(--stem-reference-unit)));
  min-width: 0;
  margin: calc(44 * var(--stem-reference-unit)) auto 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
}

#stemEngineMount .stem-player-controls {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--stem-reference-unit));
  width: 100%;
  min-width: 0;
}

#stemEngineMount .stem-player-toggle,
#stemEngineMount .stem-player-mute {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  cursor: pointer;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#stemEngineMount .stem-player-toggle {
  width: calc(64 * var(--stem-reference-unit));
  height: calc(64 * var(--stem-reference-unit));
  color: #ff7300;
}

#stemEngineMount .stem-player-toggle svg {
  width: calc(48 * var(--stem-reference-unit));
  height: calc(48 * var(--stem-reference-unit));
}

#stemEngineMount .stem-player-mute {
  width: calc(34 * var(--stem-reference-unit));
  height: calc(34 * var(--stem-reference-unit));
  color: #ffffff;
}

#stemEngineMount .stem-player-mute svg {
  width: 65%;
  height: 65%;
}

#stemEngineMount .stem-player-playing .stem-play-shape,
#stemEngineMount .stem-player-muted .stem-speaker-wave {
  display: none;
}

#stemEngineMount .stem-pause-shape {
  display: none;
}

#stemEngineMount .stem-player-playing .stem-pause-shape {
  display: block;
}

#stemEngineMount .stem-player-toggle:disabled {
  opacity: .45;
  cursor: default;
}

#stemEngineMount .stem-player-toggle:focus-visible,
#stemEngineMount .stem-player-mute:focus-visible,
#stemEngineMount .stem-player-seek:focus-visible {
  outline: calc(2 * var(--stem-reference-unit)) solid #ff7300;
  outline-offset: calc(3 * var(--stem-reference-unit));
}

#stemEngineMount .stem-player-timeline {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: calc(36 * var(--stem-reference-unit));
  display: flex;
  align-items: center;
}

#stemEngineMount .stem-player-progress,
#stemEngineMount .stem-player-seek {
  width: 100%;
  min-width: 0;
  height: calc(7 * var(--stem-reference-unit));
  margin: 0;
}

#stemEngineMount .stem-player-progress {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  border: 0;
  border-radius: calc(8 * var(--stem-reference-unit));
  overflow: hidden;
  background: #292b30;
  pointer-events: none;
}

#stemEngineMount .stem-player-progress::-webkit-progress-bar {
  background: #292b30;
  border-radius: calc(8 * var(--stem-reference-unit));
}

#stemEngineMount .stem-player-progress::-webkit-progress-value {
  background: #ff7300;
  border-radius: calc(8 * var(--stem-reference-unit));
}

#stemEngineMount .stem-player-progress::-moz-progress-bar {
  background: #ff7300;
  border-radius: calc(8 * var(--stem-reference-unit));
}

#stemEngineMount .stem-player-seek {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  inset: 0;
  height: 100%;
  cursor: pointer;
  background: transparent;
}

#stemEngineMount .stem-player-seek::-webkit-slider-runnable-track {
  height: calc(7 * var(--stem-reference-unit));
  background: transparent;
  border: 0;
}

#stemEngineMount .stem-player-seek::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: calc(16 * var(--stem-reference-unit));
  height: calc(16 * var(--stem-reference-unit));
  margin-top: calc(-4.5 * var(--stem-reference-unit));
  background: #ff7300;
  border: 0;
  border-radius: 50%;
}

#stemEngineMount .stem-player-seek::-moz-range-track {
  height: calc(7 * var(--stem-reference-unit));
  border: 0;
  background: transparent;
}

#stemEngineMount .stem-player-seek::-moz-range-thumb {
  width: calc(16 * var(--stem-reference-unit));
  height: calc(16 * var(--stem-reference-unit));
  border: 0;
  border-radius: 50%;
  background: #ff7300;
}

#stemEngineMount .stem-player-time {
  flex: 0 0 auto;
  color: #c4c6cb;
  font-size: calc(13 * var(--stem-reference-unit));
  font-variant-numeric: tabular-nums;
}

#stemEngineMount .stem-player-message {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/*============================================================================
   AUDIO LAB | CUSTOM AUDIO PLAYER | PHONE RESPONSIVE FAMILY
   Retains the established 760px breakpoint; no new responsive family.
   ============================================================================*/

@media (max-width:760px){
  #stemEngineMount .stem-player {
    margin-top: calc(42 * var(--stem-reference-unit));
  }

  #stemEngineMount .stem-player-controls {
    gap: calc(7 * var(--stem-reference-unit));
  }

  #stemEngineMount .stem-player-toggle {
    width: calc(52 * var(--stem-reference-unit));
    height: calc(52 * var(--stem-reference-unit));
  }

  #stemEngineMount .stem-player-toggle svg {
    width: calc(40 * var(--stem-reference-unit));
    height: calc(40 * var(--stem-reference-unit));
  }
}

/*============================================================================
   AUDIO LAB | OPENING CARD | PHONE PORTRAIT HEADING
   Keep the established heading on all other orientations and devices.
   ============================================================================*/

.audio-portrait-ellipsis {
  display: none;
}

@media (max-width:819px){
  #audio-lab-heading .audio-portrait-second-line {
    display: block;
  }

  #audio-lab-heading .audio-portrait-ellipsis {
    display: inline;
    color: #fff;
  }
}

/*============================================================================
   AUDIO LAB | DAW CORE + STEM SPLIT MODAL
   Visual authority: approved MIGHTY Audio Lab blueprint.
   Golden geometry: 1280px reference, proportional above 1280, responsive below.
   MIGHTY palette only: black, charcoal, white and canonical #ff7300 orange.
   ============================================================================*/

.audio-daw-stage {
  --daw-u: clamp(.78px,.078125vw,1px);
  --daw-line-u: 1px;
  --daw-bg: #080a0e;
  --daw-panel: #0d1015;
  --daw-panel-2: #12151b;
  --daw-panel-3: #17191f;
  --daw-line: #242831;
  --daw-line-soft: #1b1e25;
  --daw-text: #f4f2ed;
  --daw-muted: #a7abb3;
  --daw-orange: #ff7300;
  background: #000;
}

.audio-daw-workspace,
.audio-daw-mixer {
  overflow: hidden;
  border-radius: calc(9 * var(--daw-u));
  background: var(--daw-bg);
}

.audio-daw-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(18 * var(--daw-u));
  min-height: calc(44 * var(--daw-u));
  padding: 0 calc(16 * var(--daw-u));
  border-bottom: calc(1 * var(--daw-line-u)) solid var(--daw-line-soft);
  background: linear-gradient(180deg,#16191f 0%,#11141a 100%);
}

.audio-daw-workspace-head>div {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--daw-u));
  min-width: 0;
}

.audio-daw-workspace-head strong {
  font-weight: 500;
  font-size: calc(12 * var(--daw-u));
  letter-spacing: .02em;
}

.audio-daw-workspace-head small {
  color: #b8bbc2;
  font-size: calc(10 * var(--daw-u));
  white-space: nowrap;
}

/* Project identity: source-song title plus lightweight inline rename control. */
.audio-daw-project-identity {
  min-width: 0;
}

.audio-daw-project-titleline {
  display: flex;
  align-items: center;
  gap: calc(5 * var(--daw-u));
  min-width: 0;
}

.audio-daw-project-titleline strong {
  display: block;
  max-width: calc(260 * var(--daw-u));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-daw-project-rename {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: calc(22 * var(--daw-u));
  height: calc(22 * var(--daw-u));
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: .82;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.audio-daw-project-rename svg {
  width: calc(14 * var(--daw-u));
  height: calc(14 * var(--daw-u));
}

.audio-daw-project-rename:hover,
.audio-daw-project-rename:focus-visible {
  color: var(--daw-orange);
  opacity: 1;
  outline: 0;
}

.audio-daw-project-name-input {
  box-sizing: border-box;
  width: min(calc(260 * var(--daw-u)),42vw);
  min-width: calc(120 * var(--daw-u));
  height: calc(28 * var(--daw-u));
  padding: 0 calc(8 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid rgba(255,115,0,.82);
  border-radius: calc(4 * var(--daw-u));
  background: #0b0d11;
  color: #fff;
  font: inherit;
  font-size: calc(12 * var(--daw-u));
  font-weight: 500;
  outline: 0;
}

.audio-daw-workspace-head>span {
  color: #d7d9dd;
  font-size: calc(10 * var(--daw-u));
  font-variant-numeric: tabular-nums;
}

.audio-daw-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: calc(330 * var(--daw-u));
  padding: calc(42 * var(--daw-u));
  text-align: center;
  color: var(--daw-muted);
}

.audio-daw-empty[hidden] {
  display: none;
}

.audio-daw-empty-wave {
  display: grid;
  place-items: center;
  width: calc(64 * var(--daw-u));
  height: calc(64 * var(--daw-u));
  margin-bottom: calc(15 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #30353e;
  border-radius: 50%;
  color: var(--daw-orange);
  font-size: calc(38 * var(--daw-u));
  line-height: 1;
}

.audio-daw-empty strong {
  font-weight: 500;
  margin-bottom: calc(7 * var(--daw-u));
  color: #fff;
  font-size: calc(15 * var(--daw-u));
  letter-spacing: .04em;
}

.audio-daw-empty p {
  margin: 0;
  font-size: calc(12 * var(--daw-u));
}

.audio-daw-timeline[hidden],
.audio-daw-mixer[hidden] {
  display: none;
}

.audio-daw-timeline-ruler {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  align-items: end;
  min-height: calc(29 * var(--daw-u));
  padding: calc(6 * var(--daw-u)) calc(12 * var(--daw-u)) calc(4 * var(--daw-u)) calc(260 * var(--daw-u));
  color: #b4b8bf;
  font-variant-numeric: tabular-nums;
}

.audio-daw-timeline-ruler span {
  text-align: right;
}

.audio-daw-timeline-ruler span:first-child {
  text-align: left;
}

.audio-daw-track-list {
  padding: 0 calc(8 * var(--daw-u)) calc(9 * var(--daw-u));
}

.audio-daw-track {
  display: grid;
  grid-template-columns: calc(250 * var(--daw-u)) minmax(0,1fr);
  gap: calc(7 * var(--daw-u));
  margin-bottom: calc(7 * var(--daw-u));
}

.audio-daw-track:last-child {
  margin-bottom: 0;
}

.audio-daw-track-controls {
  position: relative;
  min-height: calc(74 * var(--daw-u));
  padding: calc(10 * var(--daw-u)) calc(12 * var(--daw-u)) calc(10 * var(--daw-u)) calc(38 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid var(--daw-line-soft);
  border-radius: calc(5 * var(--daw-u));
  background: #15181e;
}

.audio-daw-track-controls strong {
  display: block;
  font-weight: 500;
  max-width: calc(145 * var(--daw-u));
  margin-bottom: calc(10 * var(--daw-u));
  overflow: hidden;
  color: #fff;
  letter-spacing: .02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-daw-track-number {
  position: absolute;
  left: calc(12 * var(--daw-u));
  top: calc(13 * var(--daw-u));
  color: #c5c8ce;
}

.audio-daw-track-tools {
  grid-template-columns: calc(24 * var(--daw-u)) calc(24 * var(--daw-u)) minmax(calc(60 * var(--daw-u)),.7fr) minmax(calc(80 * var(--daw-u)),1fr);
}

.audio-daw-track-tools button {
  width: calc(23 * var(--daw-u));
  height: calc(23 * var(--daw-u));
  padding: 0;
  border: calc(1 * var(--daw-line-u)) solid #353a43;
  border-radius: calc(4 * var(--daw-u));
  background: #111319;
  color: #d8dbe0;
  font-size: calc(10 * var(--daw-u));
  font-weight: 500;
}

.audio-daw-track-tools button.is-on {
  border-color: var(--daw-orange);
  background: var(--daw-orange);
  color: #111;
}

.daw-track-pan,
.daw-track-volume,
.audio-daw-seek,
.audio-daw-master {
  width: 100%;
  height: calc(16 * var(--daw-u));
  margin: 0;
  accent-color: var(--daw-orange);
}

.audio-daw-wave {
  position: relative;
  min-width: 0;
  min-height: calc(74 * var(--daw-u));
  overflow: hidden;
  border: calc(1 * var(--daw-line-u)) solid #20242b;
  border-radius: calc(5 * var(--daw-u));
  background: linear-gradient(rgba(255,255,255,.022) calc(1 * var(--daw-line-u)),transparent calc(1 * var(--daw-line-u))),linear-gradient(90deg,rgba(255,255,255,.022) calc(1 * var(--daw-line-u)),transparent calc(1 * var(--daw-line-u))),#12151a;
  background-size: calc(26 * var(--daw-u)) calc(20 * var(--daw-u));
}

.audio-daw-wave-canvas {
  position: absolute;
  inset: calc(6 * var(--daw-u));
  z-index: 1;
  width: calc(100% - calc(12 * var(--daw-u)));
  height: calc(100% - calc(12 * var(--daw-u)));
}

/* White playhead by design: it remains legible over the canonical orange waveform. */

.audio-daw-playhead {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(1.5 * var(--daw-u));
  background: #fff;
  box-shadow: 0 0 calc(4 * var(--daw-u)) rgba(255,255,255,.42);
  pointer-events: none;
}

.audio-daw-playhead::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: calc(8 * var(--daw-u));
  height: calc(8 * var(--daw-u));
  border-radius: 50%;
  transform: translate(-50%,-35%);
}

.audio-daw-mixer {
  padding: calc(10 * var(--daw-u));
}

.audio-daw-mixer>h3 {
  margin: 0 0 calc(10 * var(--daw-u));
  font-size: calc(22 * var(--daw-u));
  line-height: 1;
  font-weight: 500;
}

.audio-daw-mixer>h3 span {
  color: var(--daw-orange);
}

.audio-daw-effects {
  min-width: 0;
}

.audio-daw-effect-tabs {
  display: flex;
  min-width: 0;
  border-bottom: calc(1 * var(--daw-line-u)) solid #1e2229;
  background: #15181e;
}

.audio-daw-effect-tabs button {
  border: 0;
  border-right: calc(1 * var(--daw-line-u)) solid #242831;
  background: #15181e;
  color: #e0e2e6;
  font-weight: 500;
}

.audio-daw-effect-tabs button.is-active {
  background: var(--daw-orange);
  color: #fff;
}

.audio-daw-eq-panel {
  display: grid;
}

.audio-daw-eq-graph {
  position: relative;
  padding: calc(8 * var(--daw-u)) calc(8 * var(--daw-u)) calc(24 * var(--daw-u)) calc(28 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #252a32;
  background: linear-gradient(rgba(255,255,255,.055) calc(1 * var(--daw-line-u)),transparent calc(1 * var(--daw-line-u))),linear-gradient(90deg,rgba(255,255,255,.04) calc(1 * var(--daw-line-u)),transparent calc(1 * var(--daw-line-u))),#0a0d11;
  background-size: calc(28 * var(--daw-u)) calc(28 * var(--daw-u));
}

.audio-daw-eq-graph svg {
  width: 100%;
  overflow: visible;
}

.audio-daw-eq-line {
  fill: none;
  stroke: var(--daw-orange);
}

.audio-daw-eq-fill {
  fill: url(#eqFill);
  stroke: none;
}

.audio-daw-eq-graph circle {
  stroke-width: 2;
}

.audio-daw-eq-y {
  position: absolute;
  left: calc(4 * var(--daw-u));
  top: calc(9 * var(--daw-u));
  bottom: calc(27 * var(--daw-u));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #a9adb4;
}

.audio-daw-eq-y i {
  font-style: normal;
}

.audio-daw-eq-x {
  position: absolute;
  bottom: calc(5 * var(--daw-u));
  display: flex;
  justify-content: space-between;
  color: #a9adb4;
}

.audio-daw-eq-settings {
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--daw-u));
  color: #d5d7dc;
  font-size: calc(10 * var(--daw-u));
}

.audio-daw-eq-settings label {
  display: grid;
  gap: calc(5 * var(--daw-u));
  font-size: calc(9 * var(--daw-u));
}

.audio-daw-eq-settings select {
  width: 100%;
  min-height: calc(31 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #2b3039;
  border-radius: calc(5 * var(--daw-u));
  background: #15191f;
  color: #fff;
  padding: 0 calc(8 * var(--daw-u));
}

.audio-daw-eq-settings dl {
  display: grid;
  gap: calc(8 * var(--daw-u));
  margin: 0;
}

.audio-daw-eq-settings dl div {
  display: flex;
  justify-content: space-between;
  gap: calc(10 * var(--daw-u));
}

.audio-daw-eq-settings dt {
  color: #b0b4bb;
}

.audio-daw-eq-settings dd {
  margin: 0;
  color: #f5f5f2;
}

.audio-daw-eq-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(8 * var(--daw-u));
  margin-top: auto;
}

.audio-daw-eq-actions button {
  min-height: calc(31 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #343943;
  border-radius: calc(4 * var(--daw-u));
  background: #101318;
  color: #fff;
  font-size: calc(9 * var(--daw-u));
  font-weight: 500;
}

.audio-daw-eq-actions button.is-primary {
  border-color: var(--daw-orange);
  background: var(--daw-orange);
}

.audio-daw-transport {
  display: grid;
  grid-template-columns: auto auto minmax(calc(120 * var(--daw-u)),1fr) auto minmax(calc(80 * var(--daw-u)),calc(140 * var(--daw-u)));
  align-items: center;
  gap: calc(12 * var(--daw-u));
  padding: calc(8 * var(--daw-u)) calc(13 * var(--daw-u));
  border-top: calc(1 * var(--daw-line-u)) solid #1e2229;
  background: #15181e;
}

.audio-daw-transport-buttons {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--daw-u));
}

.audio-daw-transport-buttons button {
  min-width: calc(26 * var(--daw-u));
  height: calc(28 * var(--daw-u));
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: calc(13 * var(--daw-u));
}

.audio-daw-transport-buttons .audio-daw-play {
  width: calc(40 * var(--daw-u));
  height: calc(40 * var(--daw-u));
  border-radius: 50%;
  background: var(--daw-orange);
  font-size: calc(16 * var(--daw-u));
}

.audio-daw-transport output {
  color: #d1d4d9;
  font-size: calc(10 * var(--daw-u));
  font-variant-numeric: tabular-nums;
}

.audio-daw-seek,
.audio-daw-master {
  accent-color: var(--daw-orange);
}

.audio-daw-speaker {
  color: #fff;
  font-size: calc(13 * var(--daw-u));
  white-space: nowrap;
}

/*============================================================
   AUDIO LAB | STEM SPLIT MODAL
   Project Lab modal language, narrowed for the Audio Lab workflow.
   1280 reference width: 620px. Internal scroll remains touch-safe.
   Existing SCNet processing is mounted unchanged; Audio Lab owns only
   this compact presentation and the Studio handoff controls.
   ============================================================*/

/*============================================================================
   AUDIO LAB | SPLIT STEMS MODAL — PROJECT LAB GEOMETRY
   Exact Project Lab modal/button language: 620x760 reference envelope,
   8px x 10px actions, 10px radius, 26px transparent X, 1280 golden scale.
   ============================================================================*/

.audio-stem-modal {
  --daw-modal-u: .078125vw;
  --daw-orange: #ff7300;
  position: fixed;
  z-index: 1600;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(20 * var(--daw-modal-u));
  background: rgba(0,0,0,.82);
  overflow: hidden;
}

.audio-stem-modal[hidden] {
  display: none;
}

.audio-stem-modal-shell {
  position: relative;
  isolation: isolate;
  width: min(92vw,calc(620 * var(--daw-modal-u)));
  height: auto;
  max-height: min(86dvh,calc(760 * var(--daw-modal-u)));
  padding: calc(28 * var(--daw-modal-u));
  border: 0;
  outline: 0;
  border-radius: calc(16 * var(--daw-modal-u));
  background: #000;
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: #565b64 transparent;
}

.audio-stem-modal:not(.stem-lab-embedded) .audio-stem-modal-shell {
  background: #080A0E;
  box-shadow: 0 calc(24 * var(--daw-modal-u)) calc(58 * var(--daw-modal-u)) rgba(0,0,0,.68),
    inset 0 0 0 calc(1 * var(--daw-modal-u)) rgba(255,255,255,.05),
    inset 0 calc(1 * var(--daw-modal-u)) 0 rgba(255,255,255,.11),
    inset 0 calc(-1 * var(--daw-modal-u)) 0 rgba(255,255,255,.045);
}

.audio-stem-modal:not(.stem-lab-embedded) .audio-stem-modal-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 68% at 50% 0%,rgba(255,255,255,.12),transparent 56%),
    radial-gradient(100% 84% at 50% 100%,rgba(255,255,255,.08),transparent 60%);
  opacity: .32;
}

.audio-stem-modal-shell::-webkit-scrollbar {
  width: calc(5 * var(--daw-modal-u));
}

.audio-stem-modal-shell::-webkit-scrollbar-track {
  background: transparent;
}

.audio-stem-modal-shell::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #565b64;
}

.audio-stem-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(18 * var(--daw-modal-u));
  margin-bottom: calc(10 * var(--daw-modal-u));
  padding-right: calc(28 * var(--daw-modal-u));
}

.audio-stem-modal-title {
  display: flex;
  align-items: center;
  gap: calc(14 * var(--daw-modal-u));
  min-width: 0;
}

.audio-stem-modal-title h2 {
  margin: 0;
  color: #fff;
  font-size: calc(28 * var(--daw-modal-u));
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
}

.audio-stem-modal-mark,
.audio-stem-combine-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(3 * var(--daw-modal-u));
  color: var(--daw-orange);
  flex: 0 0 auto;
}

.audio-stem-modal-mark i,
.audio-stem-combine-mark i {
  display: block;
  width: calc(4 * var(--daw-modal-u));
  border-radius: 999px;
  background: currentColor;
}

.audio-stem-modal-mark i:nth-child(1),
.audio-stem-modal-mark i:nth-child(5) {
  height: calc(18 * var(--daw-modal-u));
}

.audio-stem-modal-mark i:nth-child(2),
.audio-stem-modal-mark i:nth-child(4) {
  height: calc(30 * var(--daw-modal-u));
}

.audio-stem-modal-mark i:nth-child(3) {
  height: calc(42 * var(--daw-modal-u));
}

.audio-stem-combine-mark i:nth-child(1),
.audio-stem-combine-mark i:nth-child(5) {
  height: calc(13 * var(--daw-modal-u));
}

.audio-stem-combine-mark i:nth-child(2),
.audio-stem-combine-mark i:nth-child(4) {
  height: calc(21 * var(--daw-modal-u));
}

.audio-stem-combine-mark i:nth-child(3) {
  height: calc(29 * var(--daw-modal-u));
}

.audio-stem-modal-close {
  position: absolute;
  z-index: 3;
  top: calc(4 * var(--daw-modal-u));
  right: calc(5 * var(--daw-modal-u));
  display: grid;
  place-items: center;
  width: calc(26 * var(--daw-modal-u));
  height: calc(26 * var(--daw-modal-u));
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
  color: #fff;
  font: 500 calc(25 * var(--daw-modal-u))/1 Arial,sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

.audio-stem-modal-close:focus,
.audio-stem-modal-close:active {
  background: transparent;
  outline: 0;
  box-shadow: none;
}

.audio-stem-modal-close:focus-visible {
  box-shadow: 0 0 0 calc(2 * var(--daw-modal-u)) rgba(255,115,0,.75);
}

.audio-stem-modal-intro {
  margin: calc(10 * var(--daw-modal-u)) 0 calc(16 * var(--daw-modal-u));
  color: #b7bbc2;
  font-size: calc(16 * var(--daw-modal-u));
  line-height: calc(24 * var(--daw-modal-u));
}

.audio-stem-engine-host {
  --stem-reference-unit: var(--daw-modal-u);
}

.audio-stem-modal #stemEngineMount .floating {
  display: none !important;
}

.audio-lab-page>#app>#floatingStatus {
  display: none !important;
}

.audio-stem-modal #stemEngineMount .stemEngineRoot {
  padding: 0 !important;
}

.audio-stem-modal #stemEngineMount .stemEngineRoot>h2,
.audio-stem-modal #stemEngineMount .stemEngineRoot>p {
  display: none !important;
}

.audio-stem-modal #stemEngineMount main {
  padding: 0 !important;
  margin: 0 !important;
}

.audio-stem-modal #stemEngineMount .stemEngineRoot>main>.panel:nth-child(2) {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.audio-stem-modal #stemEngineMount .stemEngineRoot>main>.panel:nth-child(n/**/+3) {
  display: none !important;
}

.audio-stem-modal #stemEngineMount #fileState {
  display: none !important;
}

/* Project Lab modal control language, reused exactly for the Audio Lab stem source controls. */

.audio-stem-modal #stemEngineMount .stem-source-toolbar {
  width: 100%;
  max-width: none;
  gap: calc(14 * var(--daw-modal-u));
  margin: 0;
}

.audio-stem-modal #stemEngineMount .stem-import-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) max-content;
  column-gap: calc(8 * var(--daw-modal-u));
  row-gap: calc(7 * var(--daw-modal-u));
  align-items: center;
}

.audio-stem-modal #stemEngineMount .stem-import-row::before {
  content: "IMPORT FROM SUNO";
  grid-column: 1/-1;
  justify-self: stretch;
  color: #aaaeb6;
  font-size: var(--ui-label-font,calc(13 * var(--daw-modal-u)));
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
}

.audio-stem-modal #stemEngineMount .stem-file-row {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: calc(8 * var(--daw-modal-u));
  align-items: center;
}

.audio-stem-modal #stemEngineMount .stem-link-input {
  width: 100%;
  height: calc(42 * var(--daw-modal-u));
  padding: 0 calc(10 * var(--daw-modal-u));
  border: 0 !important;
  border-radius: calc(7 * var(--daw-modal-u));
  outline: 0;
  box-shadow: none;
  background: #15171B !important;
  color: #eee;
  font-family: "Poppins",system-ui,sans-serif;
  font-size: calc(16 * var(--daw-modal-u));
  font-weight: 400;
  line-height: 1.2;
}

.audio-stem-modal #stemEngineMount .stem-link-input::placeholder {
  color: #aaaeb6;
}

.audio-stem-modal #stemEngineMount .stem-link-input:focus-visible {
  box-shadow: 0 0 0 calc(2 * var(--daw-modal-u)) rgba(255,115,0,.75) !important;
}

.audio-stem-modal #stemEngineMount .stem-import-action,
.audio-stem-modal #stemEngineMount .stem-choose-action,
.audio-stem-modal #stemEngineMount .stem-start-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 0;
  padding: calc(8 * var(--daw-modal-u)) calc(10 * var(--daw-modal-u));
  border: 0 !important;
  border-radius: calc(10 * var(--daw-modal-u));
  outline: 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: "Poppins",system-ui,sans-serif;
  font-size: var(--ui-rail-font,calc(16 * var(--daw-modal-u)));
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.audio-stem-modal #stemEngineMount .stem-import-action {
  background: #181B21 !important;
  color: #fff !important;
  opacity: 1 !important;
}

.audio-stem-modal #stemEngineMount .stem-start-action {
  background: #ff7300 !important;
  color: #fff !important;
  opacity: 1 !important;
}

.audio-stem-modal #stemEngineMount .stem-choose-action {
  width: 100%;
  background: #181B21 !important;
  color: #fff !important;
}

.audio-stem-modal #stemEngineMount .stem-start-action {
  width: 100%;
}

.audio-stem-modal #stemEngineMount :is(.stem-import-action,.stem-choose-action,.stem-start-action):focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}

.audio-stem-modal #stemEngineMount #progress {
  margin: calc(8 * var(--daw-modal-u)) 0 calc(17 * var(--daw-modal-u)) !important;
  color: #c6c9cf;
  font-size: calc(13.65 * var(--daw-modal-u)) !important;
  text-align: center !important;
  line-height: 1.35 !important;
}

.audio-stem-modal #stemEngineMount .stem-import-state {
  font-size: calc(11 * var(--daw-modal-u));
  text-align: left;
}

.audio-stem-progress-row {
  display: flex;
  min-height: calc(24 * var(--daw-modal-u));
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--daw-modal-u));
  margin: calc(8 * var(--daw-modal-u)) 0 calc(17 * var(--daw-modal-u));
}

.audio-stem-progress-row #progress {
  min-width: 0;
  margin: 0 !important;
  text-align: left !important;
}

/*============================================================================
   AUDIO LAB | FINISHED STEMS — PROJECT LAB CONTROL LANGUAGE
   Uses the same field surfaces, action geometry and focus treatment as the
   Project Lab audio modal. The result area remains compact and scroll-safe.
   ============================================================================*/

.audio-stem-results {
  margin-top: calc(24 * var(--daw-modal-u));
  padding-top: 0;
  border-top: 0;
}

.audio-stem-results[hidden] {
  display: none;
}

.audio-stem-result-list {
  display: grid;
  gap: calc(8 * var(--daw-modal-u));
}

.audio-stem-result {
  display: grid;
  grid-template-columns: minmax(calc(112 * var(--daw-modal-u)),auto) minmax(0,1fr) auto auto;
  align-items: center;
  gap: calc(8 * var(--daw-modal-u));
  min-height: calc(42 * var(--daw-modal-u));
  padding: calc(6 * var(--daw-modal-u)) calc(10 * var(--daw-modal-u));
  border: 0;
  border-radius: calc(7 * var(--daw-modal-u));
  background: #15171B;
  color: #fff;
  box-shadow: none;
}

.audio-stem-select {
  display: grid;
  grid-template-columns: calc(20 * var(--daw-modal-u)) minmax(calc(72 * var(--daw-modal-u)),auto);
  align-items: center;
  gap: calc(8 * var(--daw-modal-u));
  min-width: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.audio-stem-select>input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.audio-stem-check {
  display: grid;
  place-items: center;
  width: calc(20 * var(--daw-modal-u));
  height: calc(20 * var(--daw-modal-u));
  border: calc(1.5 * var(--daw-modal-u)) solid var(--daw-orange);
  border-radius: calc(5 * var(--daw-modal-u));
  background: transparent;
  color: #fff;
}

.audio-stem-select>input:checked+.audio-stem-check {
  background: var(--daw-orange);
}

.audio-stem-select>input:checked+.audio-stem-check::after {
  content: "✓";
  font-size: calc(13 * var(--daw-modal-u));
  font-weight: 500;
  line-height: 1;
}

.audio-stem-select>input:focus-visible+.audio-stem-check {
  box-shadow: 0 0 0 calc(2 * var(--daw-modal-u)) rgba(255,115,0,.75);
}

.audio-stem-select strong {
  font-size: calc(13 * var(--daw-modal-u));
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .02em;
}

.audio-stem-mini-wave {
  display: block;
  width: 100%;
  height: calc(24 * var(--daw-modal-u));
}

.audio-stem-duration {
  color: #aaaeb6;
  font-size: calc(11 * var(--daw-modal-u));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.audio-stem-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 0;
  padding: calc(8 * var(--daw-modal-u)) calc(10 * var(--daw-modal-u));
  border: 0;
  border-radius: calc(10 * var(--daw-modal-u));
  outline: 0;
  box-shadow: none;
  background: #181B21;
  color: #fff;
  font-family: "Poppins",system-ui,sans-serif;
  font-size: calc(16 * var(--daw-modal-u));
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.audio-stem-preview:focus-visible {
  outline: 0;
  box-shadow: none;
}

.audio-stem-combine {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: calc(10 * var(--daw-modal-u));
  margin-top: calc(14 * var(--daw-modal-u));
  padding: calc(10 * var(--daw-modal-u));
  border: 0;
  border-radius: calc(7 * var(--daw-modal-u));
  background: #15171B;
  color: #fff;
  box-shadow: none;
}

.audio-stem-combine>div:nth-child(2) {
  display: grid;
  gap: calc(2 * var(--daw-modal-u));
}

.audio-stem-combine strong {
  font-size: calc(14.95 * var(--daw-modal-u));
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .02em;
}

.audio-stem-combine span {
  color: #aaaeb6;
  font-size: calc(12.08 * var(--daw-modal-u));
  line-height: 1.3;
}

.audio-stem-studio-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: calc(8 * var(--daw-modal-u));
  margin-top: calc(14 * var(--daw-modal-u));
}

.audio-stem-studio-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: calc(8 * var(--daw-modal-u)) calc(10 * var(--daw-modal-u));
  border: 0;
  border-radius: calc(10 * var(--daw-modal-u));
  outline: 0;
  box-shadow: none;
  background: #181B21;
  color: #fff;
  font-family: "Poppins",system-ui,sans-serif;
  font-size: calc(16 * var(--daw-modal-u));
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: normal;
  text-align: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.audio-stem-studio-actions button.is-primary {
  background: var(--daw-orange);
}

.audio-stem-studio-actions button:focus-visible {
  outline: 0;
  box-shadow: none;
}

.audio-stem-studio-status {
  min-height: calc(18 * var(--daw-modal-u));
  margin: calc(10 * var(--daw-modal-u)) 0 0;
  color: var(--daw-orange);
  font-size: calc(12 * var(--daw-modal-u));
  line-height: 1.35;
  text-align: left;
}

.audio-stem-studio-status.is-error {
  color: #ffa45a;
}

.audio-stem-studio-status:empty {
  display: none;
}

html.audio-modal-open,
body.audio-modal-open {
  overflow: hidden;
}

/* BIDIRECTIONAL 1280 GOLDEN GEOMETRY | landscape only.
   1 reference px = 0.078125vw at every landscape width:
   667=.5211x, 844=.6594x, 1024=.8x, 1280=1x, 1600=1.25x, 3840=3x. */
@media (orientation: landscape) and (min-width:820px){
  .audio-daw-stage {
    --daw-u: .078125vw;
    --daw-line-u: var(--daw-u);
    font-size: calc(16 * var(--daw-u));
  }

  /* Own the complete 1280 container spacing in landscape. This prevents the
     generic public-section padding family from contaminating the reference
     geometry at 1280 while 4K/8K use a different section owner. */
  #top > .audio-daw-stage > .container {
    padding-top: calc(51 * var(--labs-studio-u));
    padding-right: calc(22 * var(--labs-studio-u));
    padding-bottom: calc(20 * var(--labs-studio-u));
    padding-left: calc(22 * var(--labs-studio-u));
  }

  .audio-daw-level-note {
    font-size: calc(18 * var(--daw-u));
  }

  /* The shared entrance shell must remain the 1280 reference composition on
     every landscape width. Portrait alone owns the stacked usability family. */
  .audio-daw-head {
    grid-template-columns: minmax(0,1fr) max-content;
  }

  .audio-daw-actions {
    grid-template-columns: repeat(3,calc(166 * var(--labs-studio-u)));
    width: auto;
  }

  .mighty-content .audio-daw-action {
    width: calc(166 * var(--labs-studio-u));
  }

  /* Preserve the approved 17.28px-at-1280 import-action type scale without
     inheriting tablet readability clamps from the shared shell. */
  .audio-stem-modal #stemEngineMount :is(.stem-import-action,.stem-choose-action,.stem-start-action) {
    font-size: 1.35vw;
  }
}

/* TABLET ROTATION SCALE INVARIANT | match landscape geometry on the same tablet. */

@media (orientation:portrait) and (min-width:820px){
  .audio-daw-stage {
    --daw-u: .112423780487805vw;
    font-size:calc(16 * var(--labs-portrait-u));
  }
  body.audio-lab-page .audio-stem-modal #stemEngineMount .stem-link-input {
    height:calc(42 * var(--daw-modal-u));
    padding:0 calc(10 * var(--daw-modal-u));
    border-radius:calc(7 * var(--daw-modal-u));
    font-size:calc(16 * var(--daw-modal-u));
  }
}

@media (max-width:860px){
  .audio-stem-modal-shell {
    width: min(92vw,calc(620 * var(--daw-modal-u)));
    max-height: min(86dvh,calc(760 * var(--daw-modal-u)));
    padding: calc(28 * var(--daw-modal-u));
  }
}

@media (max-width:819px){
  .audio-stem-modal #stemEngineMount :is(.stem-import-action,.stem-choose-action,.stem-start-action),
.audio-stem-studio-actions button,
.audio-stem-preview {
    height: auto;
    min-height: 0;
    padding: 5px 6.25px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.2;
  }

  .audio-stem-modal #stemEngineMount .stem-import-row::before {
    font-size: max(10px,calc(12 * var(--daw-modal-u)));
  }
}

@media (max-width:819px){
  .audio-daw-stage {
    --daw-u: .78px;
  }

  .audio-daw-workspace-head {
    padding: 0 10px;
  }

  .audio-daw-empty {
    min-height: 250px;
    padding: 30px 18px;
  }

  .audio-daw-eq-panel {
    grid-template-columns: 1fr;
  }

  .audio-daw-eq-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }

  .audio-daw-eq-settings dl,
.audio-daw-eq-actions {
    grid-column: 1/-1;
  }

  .audio-daw-transport {
    grid-template-columns: 1fr auto;
  }

  .audio-daw-seek,
.audio-daw-speaker,
.audio-daw-master {
    display: none;
  }

  .audio-stem-modal {
    --daw-modal-u: min(1px,.2564102564vw);
    padding: calc(12 * var(--daw-modal-u));
  }

  .audio-stem-modal-shell {
    width: 100%;
    max-width: calc(420 * var(--daw-modal-u));
    max-height: calc(100dvh - calc(24 * var(--daw-modal-u)));
    padding: calc(18 * var(--daw-modal-u));
    border-radius: calc(14 * var(--daw-modal-u));
  }

  .audio-stem-modal-title h2 {
    font-size: max(22px,calc(28 * var(--daw-modal-u)));
  }

  .audio-stem-modal-intro {
    margin: calc(10 * var(--daw-modal-u)) 0 calc(16 * var(--daw-modal-u));
    font-size: max(12px,calc(14 * var(--daw-modal-u)));
    line-height: max(18px,calc(20 * var(--daw-modal-u)));
  }

}

/*============================================================================
   AUDIO LAB | SHARED OPERATION SPINNER
   Exact geometry borrowed from the approved Project Lab/MIGHTY spinner.
   1280px reference geometry with established portrait/landscape reductions
   and proportional scaling above the 1280 golden width.
   ============================================================================*/

.audio-operation-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.audio-operation-status > :not(.audio-operation-spinner) {
  min-width: 0;
}

.audio-operation-spinner {
  width: 23.4px;
  height: 23.4px;
  flex: 0 0 23.4px;
  align-self: center;
  box-sizing: border-box;
  border: 2.6px solid rgba(255,255,255,.14);
  border-top-color: #ff7300;
  border-radius: 50%;
  background: transparent;
  animation: audio-operation-spin .65s linear infinite;
}

.audio-operation-spinner[hidden] {
  display: none;
}

@keyframes audio-operation-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce){
  .audio-operation-spinner {
    animation-duration: 1.4s;
  }
}

@media (max-width:819px){
  .audio-operation-spinner {
    width: 20.8px;
    height: 20.8px;
    flex-basis: 20.8px;
    border-width: 2.6px;
  }
}

@media (orientation: landscape) and (min-width:820px){
  .audio-operation-status {
    gap: .78125vw;
  }

  .audio-operation-spinner {
    width: 1.828125vw;
    height: 1.828125vw;
    flex-basis: 1.828125vw;
    border-width: .203125vw;
  }
}

/* SUNO DOWNLOADER | WAV PREPARATION STATUS ALIGNMENT Keep the shared Audio Lab spinner geometry unchanged; only the Downloader status row is left-aligned. Stem Lab retains its existing centered layout. */

.suno-downloader .suno-downloader-status.audio-operation-status {
  justify-content: flex-start;
  text-align: left;
}

/*============================================================================
   AUDIO LAB | SPLIT STEMS MODAL | DEVICE + PREVIEW REFINEMENT | 11041730
   Phone envelope narrows; tablet portrait returns to the 1280 modal scale.
   Compact stem previews own play/pause, orange progress and touch seeking.
   ============================================================================*/

.audio-stem-modal #stemEngineMount #stemImportState {
  display: none !important;
}

.audio-stem-mini-wave {
  cursor: pointer;
}

.audio-stem-combine {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.audio-stem-combine:focus-visible {
  outline: 0;
  box-shadow: none;
}

@media (orientation:portrait) and (min-width:820px){
  .audio-stem-modal {
    --daw-modal-u: .121951219512195vw;
    padding: calc(24 * var(--daw-modal-u));
  }
  body.audio-lab-page .audio-stem-modal{font-size:calc(16 * var(--daw-modal-u))}

  .audio-stem-modal-shell {
    width: min(82vw,calc(620 * var(--daw-modal-u)));
    max-width: calc(620 * var(--daw-modal-u));
    max-height: min(86dvh,calc(760 * var(--daw-modal-u)));
    padding: calc(28 * var(--daw-modal-u));
    border-radius: calc(16 * var(--daw-modal-u));
  }
}

@media (max-width:819px){
  .audio-stem-modal {
    --daw-modal-u: 1px;
    padding: 16px;
  }

  .audio-stem-modal-shell {
    width: min(86vw,340px);
    max-width: 340px;
    max-height: calc(100dvh - 32px);
    padding: 20px;
    border-radius: 14px;
  }

  .audio-stem-modal-title h2 {
    font-size: 26px;
  }

  .audio-stem-modal-title {
    gap: 12px;
  }

  .audio-stem-modal-intro {
    font-size: 15px;
    line-height: 22px;
    margin: 10px 0 18px;
  }

  .audio-stem-modal-close {
    top: 4px;
    right: 5px;
    width: 26px;
    height: 26px;
    font-size: 25px;
  }

  .audio-stem-modal #stemEngineMount .stem-link-input {
    height: 42px;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 16px;
  }

  .audio-stem-modal #stemEngineMount .stem-import-row::before {
    font-size: 12px;
  }

  .audio-stem-result {
    grid-template-columns: minmax(92px,auto) minmax(0,1fr) auto;
    gap: 7px;
    padding: 7px 9px;
  }

  .audio-stem-duration {
    display: none;
  }

  .audio-stem-preview {
    font-size: 13px;
    padding: 6px 8px;
  }

  .audio-stem-studio-actions {
    grid-template-columns: 1fr;
  }
}

/* AUDIO LAB | SPLIT STEMS | FLAT CONTROL POLISH */

.audio-stem-modal #stemEngineMount .stem-link-input:focus,
.audio-stem-modal #stemEngineMount .stem-link-input:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.audio-stem-modal button:focus,
.audio-stem-modal button:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}

/*============================================================================
   AUDIO LAB | STEM PREVIEW CONTINUOUS SCRUB | 11041809
   The compact waveform captures one pointer so a single finger drag can seek
   continuously across the full stem from start to finish and back again.
   ============================================================================*/

.audio-stem-mini-wave {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/*============================================================================
   AUDIO LAB | FLAT WORKSPACE SHELL | 11071620
   Removes the outer canvas/mixer outline while preserving the internal header
   dividers and the approved 1280 geometry.
   ============================================================================*/

.audio-daw-workspace,
.audio-daw-mixer {
  border: 0;
  box-shadow: none;
}

/*============================================================================
   AUDIO LAB | CONTROL SURFACE + RANGE LANGUAGE
   Enlarges the studio typography while preserving the native Web Audio engine,
   removes native white slider rails, uses MIGHTY orange focus, and lets the
   mixer channel rail fit its actual track count instead of leaving dead space.
   ============================================================================*/

.audio-daw-wave[role="slider"] {
  outline: 0;
}

/* Unified DAW range language: orange active rail, charcoal remainder, no white rail. */

.audio-daw-stage input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: calc(20 * var(--daw-u));
  margin: 0;
  background: transparent;
  outline: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.audio-daw-stage input[type="range"]::-webkit-slider-runnable-track {
  height: calc(3 * var(--daw-u));
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg,var(--daw-orange) 0 var(--range-pct,50%),#343943 var(--range-pct,50%) 100%);
  box-shadow: none;
}

.audio-daw-stage input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: calc(15 * var(--daw-u));
  height: calc(15 * var(--daw-u));
  margin-top: calc(-6 * var(--daw-u));
  border: 0;
  border-radius: 50%;
  background: #f5f5f2;
  box-shadow: 0 0 0 calc(1 * var(--daw-u)) rgba(0,0,0,.35);
}

.audio-daw-stage input[type="range"]::-moz-range-track {
  height: calc(3 * var(--daw-u));
  border: 0;
  border-radius: 999px;
  background: #343943;
}

.audio-daw-stage input[type="range"]::-moz-range-progress {
  height: calc(3 * var(--daw-u));
  border: 0;
  border-radius: 999px;
  background: var(--daw-orange);
}

.audio-daw-stage input[type="range"]::-moz-range-thumb {
  width: calc(15 * var(--daw-u));
  height: calc(15 * var(--daw-u));
  border: 0;
  border-radius: 50%;
  background: #f5f5f2;
  box-shadow: 0 0 0 calc(1 * var(--daw-u)) rgba(0,0,0,.35);
}

.audio-daw-stage input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 calc(2 * var(--daw-u)) var(--daw-orange);
}

.audio-daw-stage input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 calc(2 * var(--daw-u)) var(--daw-orange);
}

.audio-daw-effects {
  border-color: #272c34;
}

.audio-daw-fx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(47 * var(--daw-u));
  padding: calc(8 * var(--daw-u)) calc(12 * var(--daw-u));
  border-bottom: calc(1 * var(--daw-line-u)) solid #272c34;
  background: #101319;
}

.audio-daw-fx-head>div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: calc(10 * var(--daw-u));
}

.audio-daw-fx-head span {
  color: #9ca1aa;
  letter-spacing: .12em;
}

.audio-daw-fx-head strong {
  max-width: calc(260 * var(--daw-u));
  overflow: hidden;
  color: #fff;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-daw-fx-head button {
  min-height: calc(31 * var(--daw-u));
  padding: 0 calc(12 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid rgba(255,115,0,.8);
  border-radius: calc(5 * var(--daw-u));
  color: #fff;
  font-weight: 600;
  letter-spacing: .05em;
}

.audio-daw-fx-head button.is-bypassed {
  border-color: #3b4049;
  background: #171a20;
  color: #a5aab2;
}

.audio-daw-fx-head button:disabled {
  opacity: .45;
}

.audio-daw-effect-tabs-shell {
  position: relative;
  min-width: 0;
}

.audio-daw-effect-tabs {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.audio-daw-tab-edge {
  display: none;
}

.audio-daw-effect-tabs::-webkit-scrollbar {
  display: none;
}

.audio-daw-effect-tabs button {
  flex: 0 0 auto;
  min-height: calc(39 * var(--daw-u));
  padding: 0 calc(19 * var(--daw-u));
  cursor: pointer;
}

.audio-daw-effect-tabs button:focus,
.audio-daw-effect-tabs button:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 calc(1 * var(--daw-line-u)) rgba(255,115,0,.6);
}

.audio-daw-fx-panel {
  min-height: calc(270 * var(--daw-u));
  background: #0d1015;
}

.audio-daw-fx-empty {
  display: grid;
  min-height: calc(270 * var(--daw-u));
  place-items: center;
  align-content: center;
  padding: calc(28 * var(--daw-u));
  text-align: center;
  color: #a3a8b0;
}

.audio-daw-fx-empty span {
  margin-bottom: calc(8 * var(--daw-u));
  color: var(--daw-orange);
  font-size: calc(30 * var(--daw-u));
}

.audio-daw-fx-empty strong {
  margin-bottom: calc(6 * var(--daw-u));
  color: #fff;
  font-size: calc(13 * var(--daw-u));
  font-weight: 500;
  letter-spacing: .05em;
}

.audio-daw-fx-empty p {
  max-width: calc(330 * var(--daw-u));
  margin: 0;
  font-size: calc(11 * var(--daw-u));
  line-height: 1.55;
}

.audio-daw-fx-pane {
  min-height: calc(270 * var(--daw-u));
}

.audio-daw-eq-panel {
  grid-template-columns: minmax(0,1fr) calc(205 * var(--daw-u));
  align-items: stretch;
  gap: calc(14 * var(--daw-u));
  padding: calc(12 * var(--daw-u));
}

.audio-daw-eq-main {
  min-width: 0;
}

.audio-daw-eq-graph {
  min-height: calc(160 * var(--daw-u));
  padding-bottom: calc(22 * var(--daw-u));
}

.audio-daw-eq-graph svg {
  height: calc(136 * var(--daw-u));
}

.audio-daw-eq-y {
  font-size: calc(9.5 * var(--daw-u));
}

.audio-daw-eq-x {
  left: calc(29 * var(--daw-u));
  right: calc(7 * var(--daw-u));
  gap: calc(4 * var(--daw-u));
  font-size: calc(9.5 * var(--daw-u));
}

.audio-daw-eq-x span {
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.audio-daw-eq-bands {
  display: grid;
  grid-template-columns: repeat(4,minmax(calc(82 * var(--daw-u)),1fr));
  gap: calc(7 * var(--daw-u));
  margin-top: calc(8 * var(--daw-u));
}

.audio-daw-fx-control {
  display: grid;
  grid-template-columns: minmax(calc(58 * var(--daw-u)),auto) minmax(calc(82 * var(--daw-u)),1fr) calc(64 * var(--daw-u));
  align-items: center;
  gap: calc(9 * var(--daw-u));
  min-height: calc(37 * var(--daw-u));
  padding: calc(6 * var(--daw-u)) calc(9 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #252a32;
  border-radius: calc(5 * var(--daw-u));
  background: #11151a;
  color: #d2d5db;
}

.audio-daw-fx-control>span {
  letter-spacing: .025em;
}

.audio-daw-fx-control input[type="range"] {
  width: 100%;
  min-width: 0;
}

.audio-daw-fx-control output {
  text-align: right;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.audio-daw-fx-settings {
  display: flex;
  flex-direction: column;
  gap: calc(11 * var(--daw-u));
  padding: calc(11 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #252a32;
  border-radius: calc(5 * var(--daw-u));
  background: #101319;
  color: #d0d3d9;
  font-size: calc(10 * var(--daw-u));
}

.audio-daw-fx-settings>label:not(.audio-daw-fx-switch) {
  display: grid;
  gap: calc(6 * var(--daw-u));
  font-size: calc(10 * var(--daw-u));
  letter-spacing: .04em;
}

.audio-daw-fx-settings select {
  width: 100%;
  border: calc(1 * var(--daw-line-u)) solid #3a404a;
  border-radius: calc(5 * var(--daw-u));
  outline: 0;
  background: #171a20;
  color: #fff;
}

.audio-daw-fx-settings select:focus,
.audio-daw-fx-settings select:focus-visible {
  border-color: var(--daw-orange);
  outline: 0;
  box-shadow: 0 0 0 calc(1 * var(--daw-u)) rgba(255,115,0,.35);
}

.audio-daw-fx-settings p {
  margin: 0;
  color: #a3a8b0;
  font-size: calc(10 * var(--daw-u));
  line-height: 1.55;
}

.audio-daw-fx-switch {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--daw-u));
  min-height: calc(31 * var(--daw-u));
  color: #fff;
  font-size: calc(10 * var(--daw-u));
  letter-spacing: .05em;
  cursor: pointer;
}

.audio-daw-fx-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.audio-daw-fx-switch span {
  position: relative;
  width: calc(34 * var(--daw-u));
  height: calc(18 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #454b55;
  border-radius: 999px;
  transition: .16s ease;
}

.audio-daw-fx-switch span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(2 * var(--daw-u));
  width: calc(12 * var(--daw-u));
  height: calc(12 * var(--daw-u));
  border-radius: 50%;
  background: #969ba4;
  transform: translateY(-50%);
  transition: .16s ease;
}

.audio-daw-fx-switch input:checked+span::after {
  left: calc(18 * var(--daw-u));
  background: var(--daw-orange);
}

.audio-daw-fx-reset {
  min-height: calc(35 * var(--daw-u));
  margin-top: auto;
  padding: 0 calc(11 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #3b414b;
  border-radius: calc(5 * var(--daw-u));
  background: #15181e;
  color: #fff;
  font-weight: 500;
  letter-spacing: .04em;
}

.audio-daw-fx-reset:focus,
.audio-daw-fx-reset:focus-visible {
  outline: 0;
  border-color: var(--daw-orange);
  box-shadow: 0 0 0 calc(1 * var(--daw-u)) rgba(255,115,0,.3);
}

.audio-daw-fx-rack {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: calc(12 * var(--daw-u));
  padding: calc(12 * var(--daw-u));
}

.audio-daw-fx-rack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(14 * var(--daw-u));
  padding-bottom: calc(10 * var(--daw-u));
  border-bottom: calc(1 * var(--daw-line-u)) solid #292e36;
}

.audio-daw-fx-rack-head>div {
  display: grid;
  gap: calc(4 * var(--daw-u));
}

.audio-daw-fx-rack-head strong {
  color: #fff;
  font-weight: 500;
  letter-spacing: .04em;
}

.audio-daw-fx-rack-head span {
  color: #a4a9b1;
  line-height: 1.4;
}

.audio-daw-fx-controls {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: calc(8 * var(--daw-u));
  align-content: start;
}

.audio-daw-fx-hero-value {
  display: flex;
  align-items: baseline;
  gap: calc(11 * var(--daw-u));
  padding: calc(12 * var(--daw-u)) calc(14 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #252a32;
  border-radius: calc(5 * var(--daw-u));
  background: radial-gradient(circle at 12% 50%,rgba(255,115,0,.16),transparent 38%),#101319;
}

.audio-daw-fx-hero-value span {
  color: #9ca1aa;
  font-size: calc(10 * var(--daw-u));
  letter-spacing: .11em;
}

.audio-daw-fx-hero-value strong {
  color: #fff;
  font-size: calc(20 * var(--daw-u));
  font-weight: 500;
}

.audio-daw-limiter-orb {
  display: grid;
  place-items: center;
  align-content: center;
  width: calc(128 * var(--daw-u));
  height: calc(128 * var(--daw-u));
  margin: 0 auto;
  border: calc(1 * var(--daw-line-u)) solid rgba(255,115,0,.55);
  border-radius: 50%;
  background: radial-gradient(circle,rgba(255,115,0,.14),rgba(255,115,0,.03) 56%,transparent 57%),#0b0e12;
  box-shadow: inset 0 0 calc(30 * var(--daw-u)) rgba(255,115,0,.08);
}

.audio-daw-limiter-orb span {
  color: #a2a7af;
  font-size: calc(9 * var(--daw-u));
  letter-spacing: .1em;
}

.audio-daw-limiter-orb strong {
  margin: calc(4 * var(--daw-u)) 0;
  color: #fff;
  font-size: calc(21 * var(--daw-u));
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.audio-daw-limiter-orb small {
  color: var(--daw-orange);
  font-size: calc(10 * var(--daw-u));
}

@media (max-width:819px), (orientation:portrait) and (min-width:820px) and (max-width:860px){
  .audio-daw-eq-panel {
    grid-template-columns: 1fr;
  }

  .audio-daw-fx-settings {
    min-height: auto;
  }

  .audio-daw-eq-bands {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width:819px){
  .audio-daw-fx-head strong {
    max-width: 150px;
  }

  .audio-daw-effect-tabs button {
    padding: 0 13px;
    font-size: 11px;
  }

  .audio-daw-fx-panel {
    min-height: 290px;
  }

  .audio-daw-fx-rack {
    padding: 10px;
  }

  .audio-daw-fx-controls {
    grid-template-columns: 1fr;
  }

  .audio-daw-fx-control {
    grid-template-columns: 78px minmax(90px,1fr) 64px;
    font-size: 10px;
  }

  .audio-daw-eq-bands {
    grid-template-columns: 1fr;
  }
}

/*============================================================================
   AUDIO LAB | PROJECT TRANSPORT + TOUCH SCRUB + LIVE METER
   A second synchronized transport sits directly below the project stems.
   Waveforms support continuous pointer drag. Mixer fader rails show live signal
   level in orange while the white thumb continues to represent gain.
   ============================================================================*/

.audio-daw-transport--project {
  /* Canonical project transport: one physical row at every viewport.
     Responsive rules may hide/reorder children, but must never change the
     transport into a multi-row composition. */
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  border-radius: 0 0 calc(5 * var(--daw-u)) calc(5 * var(--daw-u));
}

.audio-daw-transport--project .audio-daw-transport-buttons {
  flex: 0 0 auto;
  min-width: 0;
}

.audio-daw-transport--project output {
  flex: 0 0 auto;
  white-space: nowrap;
}

.audio-daw-transport--project .audio-daw-seek {
  flex: 1 1 0;
  width: auto;
  min-width: calc(120 * var(--daw-u));
}

.audio-daw-transport--project .audio-daw-speaker {
  flex: 0 0 auto;
}

.audio-daw-transport--project .audio-daw-master {
  flex: 0 1 calc(140 * var(--daw-u));
  width: calc(140 * var(--daw-u));
  min-width: calc(80 * var(--daw-u));
}

.audio-daw-wave[role="slider"] {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
}

/*============================================================================
   AUDIO LAB | TOP STRIP CONTROL STATES
   Strong latched M/S states, reliable options menu, neutral waveform bed,
   and a white playhead cap to reduce orange visual load.
   ============================================================================*/

.audio-daw-track {
  position: relative;
}

.audio-daw-track-controls {
  overflow: visible;
}

.audio-daw-track-tools button.is-on,
.audio-daw-track-tools button[aria-pressed="true"] {
  border-color: var(--daw-orange);
  background: var(--daw-orange);
  color: #fff;
  box-shadow: 0 0 0 calc(1 * var(--daw-u)) rgba(255,115,0,.16);
}

.audio-daw-track-tools button:active {
  transform: translateY(calc(1 * var(--daw-u)));
}

.audio-daw-playhead::before {
  background: #fff;
  border: 0;
  box-shadow: 0 0 calc(4 * var(--daw-u)) rgba(255,255,255,.42);
}

/*============================================================================
   AUDIO LAB | FLAT TRACKS + PROJECT HEADER + UNITY GAIN
   Removes the remaining outer card outlines, keeps internal studio structure,
   replaces text delete action with a compact white Lucide-style trash glyph,
   and places unity gain (0 dB) at the visual midpoint of track volume controls.
   ============================================================================*/

.audio-daw-workspace-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(10 * var(--daw-u));
  flex: 0 0 auto;
}

.audio-daw-workspace-head-actions>span {
  color: #d7d9dd;
  font-size: calc(10 * var(--daw-u));
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Flat project tracks: no default or selected perimeter outlines. */

.audio-daw-track-controls,
.audio-daw-wave {
  border: 0;
  box-shadow: none;
}

.audio-daw-track.is-selected .audio-daw-track-controls,
.audio-daw-track.is-selected .audio-daw-wave {
  border-color: transparent;
}

.audio-daw-wave[role="slider"]:focus-visible {
  box-shadow: none;
}

/* Flat mixer channels and flat FX outer shell. Internal dividers remain. */

.audio-daw-effects {
  box-shadow: none;
}

@media (max-width:819px){
  .audio-daw-workspace-head-actions {
    gap: 8px;
  }
}

/*============================================================================
   AUDIO LAB | SINGLE WORKSPACE + MASTER TARGET
   One selected target drives one full-width studio panel. Track strip keeps only
   Mute/Solo/options; Level & Pan lives with EQ/Comp/Reverb/Delay/Limiter.
   ============================================================================*/

/* Top stem rows become selection + M/S only. */

.audio-daw-track-controls strong {
  transition: color .14s ease;
}

/* One full-width studio panel, no side mixer column. */

.audio-daw-mixer {
  border: 0;
  box-shadow: none;
  background: #090b0f;
}

.audio-daw-effects {
  width: 100%;
  border: 0;
  border-radius: calc(5 * var(--daw-u));
  overflow: hidden;
  background: #0d1015;
}

.audio-daw-fx-head {
  gap: calc(16 * var(--daw-u));
}

.audio-daw-fx-target {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: calc(10 * var(--daw-u));
}

.audio-daw-fx-head-actions {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--daw-u));
  flex: 0 0 auto;
}

.audio-daw-fx-head .audio-daw-master-target {
  border: calc(1 * var(--daw-line-u)) solid #3b414b;
}

/* Level & Pan is now the first-class mixer surface for the selected target. */

.audio-daw-level-panel {
  display: grid;
  gap: calc(14 * var(--daw-u));
  padding: calc(14 * var(--daw-u));
}

.audio-daw-level-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(14 * var(--daw-u));
  padding-bottom: calc(10 * var(--daw-u));
  border-bottom: calc(1 * var(--daw-line-u)) solid #292e36;
}

.audio-daw-level-head>div {
  display: grid;
  gap: calc(4 * var(--daw-u));
}

.audio-daw-level-head strong {
  color: #fff;
  font-size: calc(14 * var(--daw-u));
  font-weight: 500;
  letter-spacing: .04em;
}

.audio-daw-level-head span {
  color: #a4a9b1;
  font-size: calc(10 * var(--daw-u));
  line-height: 1.45;
}

.audio-daw-level-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: calc(10 * var(--daw-u));
}

.audio-daw-level-grid .audio-daw-fx-control {
  min-height: calc(48 * var(--daw-u));
}

.audio-daw-level-meter {
  grid-column: 1/-1;
  display: grid;
  gap: calc(8 * var(--daw-u));
  padding: calc(11 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #252a32;
  border-radius: calc(5 * var(--daw-u));
  background: #101319;
}

.audio-daw-level-meter-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(12 * var(--daw-u));
  color: #b9bdc5;
  font-size: calc(10 * var(--daw-u));
  letter-spacing: .04em;
}

.audio-daw-level-meter-copy output {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.audio-daw-level-meter-rail {
  position: relative;
  height: calc(8 * var(--daw-u));
  overflow: hidden;
  border-radius: 999px;
  background: #30353e;
}

.audio-daw-level-meter-rail i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--daw-orange);
  transition: width 65ms linear;
}

.audio-daw-level-meter-rail i.is-hot {
  background: linear-gradient(90deg,var(--daw-orange) 0%,#ffa255 78%,#fff 100%);
}

.audio-daw-limiter-meter-rail {
  overflow: visible;
}

.audio-daw-limiter-threshold-marker {
  position: absolute;
  top: calc(-3 * var(--daw-u));
  bottom: calc(-3 * var(--daw-u));
  width: calc(1 * var(--daw-line-u));
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 calc(4 * var(--daw-u)) rgba(255,255,255,.38);
  pointer-events: none;
}

.audio-daw-limiter-meter-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(12 * var(--daw-u));
  color: #8f949d;
  font-size: calc(9 * var(--daw-u));
  letter-spacing: .04em;
}

.audio-daw-limiter-meter-meta output {
  color: #d8dbe0;
  font-variant-numeric: tabular-nums;
}

.audio-daw-level-note {
  margin: 0;
  color: #9da2aa;
  line-height: 1.55;
}

@media (max-width:819px){
  .audio-daw-fx-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .audio-daw-fx-head-actions {
    margin-left: auto;
  }

  .audio-daw-level-grid {
    grid-template-columns: 1fr;
  }

  .audio-daw-level-meter {
    grid-column: auto;
  }
}

/*============================================================================
   AUDIO LAB | TOP STRIP + SPACING
   Equalizer-first workflow, inline trash control, white track names and
   breathing room around project transport / mixer surfaces.
   ============================================================================*/

/* Keep track/stem names white even when selected. Selection is communicated by the TRACK FX target label in the single workspace below. */

.audio-daw-track.is-selected .audio-daw-track-controls strong,
.audio-daw-track-controls strong {
  color: #fff;
}

/* Inline delete now sits beside M/S in the same compact control language. */

.audio-daw-track-tools .audio-daw-remove-track {
  display: grid;
  place-items: center;
  width: calc(23 * var(--daw-u));
  height: calc(23 * var(--daw-u));
  padding: 0;
  border: calc(1 * var(--daw-line-u)) solid #353a43;
  border-radius: calc(4 * var(--daw-u));
  background: #111319;
  color: #e9ebef;
  cursor: pointer;
  touch-action: manipulation;
}

.audio-daw-track-tools .audio-daw-remove-track svg {
  width: calc(13 * var(--daw-u));
  height: calc(13 * var(--daw-u));
}

.audio-daw-track-tools .audio-daw-remove-track:hover,
.audio-daw-track-tools .audio-daw-remove-track:focus-visible {
  border-color: #565d68;
  background: #171a20;
  color: #fff;
  outline: 0;
}

.audio-daw-track-tools .audio-daw-remove-track:active {
  transform: translateY(calc(1 * var(--daw-u)));
}

/* Breathing room: tracks -> transport -> mixer, plus a clean lower margin. */

.audio-daw-track-list {
  padding-bottom: calc(15 * var(--daw-u));
}

.audio-daw-transport--project {
  margin-top: calc(4 * var(--daw-u));
  border-top: calc(1 * var(--daw-line-u)) solid var(--daw-line-soft);
}

.audio-daw-mixer {
  margin-top: calc(16 * var(--daw-u));
  margin-bottom: calc(18 * var(--daw-u));
  padding-top: calc(12 * var(--daw-u));
  padding-bottom: calc(14 * var(--daw-u));
}

.audio-daw-mixer>h3 {
  margin-bottom: calc(14 * var(--daw-u));
}

/* EQ is the visual/default first stop; LEVEL & PAN follows it. */

.audio-daw-effect-tabs button:first-child {
  min-width: calc(100 * var(--daw-u));
}

@media (max-width:819px){
  .audio-daw-track-list {
    padding-bottom: 12px;
  }

  .audio-daw-mixer {
    margin-top: 14px;
    margin-bottom: 16px;
    padding-top: 10px;
    padding-bottom: 12px;
  }
}

/*============================================================================
   AUDIO LAB | EDIT GROUP + INLINE RENAME
   Checkbox defines the active edit group; M/S remain monitoring controls.
   Track buttons are flat, rename is inline, and only the project transport
   remains visible.
   ============================================================================*/

.audio-daw-track-tools {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--daw-u));
}

.audio-daw-track-tools button,
.audio-daw-track-tools .audio-daw-remove-track,
.audio-daw-track-tools .audio-daw-rename-track,
.audio-daw-track-tools .audio-daw-edit-check {
  display: grid;
  place-items: center;
  width: calc(23 * var(--daw-u));
  height: calc(23 * var(--daw-u));
  padding: 0;
  border: 0;
  border-radius: calc(4 * var(--daw-u));
  background: #15181e;
  color: #e9ebef;
  box-shadow: none;
  outline: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.audio-daw-track-tools .daw-track-mute,
.audio-daw-track-tools .daw-track-solo {
  font-weight: 500;
}

.audio-daw-track-tools button.is-on,
.audio-daw-track-tools button[aria-pressed="true"],
.audio-daw-track-tools .audio-daw-edit-check[aria-checked="true"] {
  border: 0;
  background: var(--daw-orange);
  color: #fff;
  box-shadow: none;
}

.audio-daw-track-tools .audio-daw-rename-track,
.audio-daw-track-tools .audio-daw-remove-track {
  background: transparent;
  color: #f1f2f4;
}

.audio-daw-track-tools .audio-daw-rename-track:hover,
.audio-daw-track-tools .audio-daw-rename-track:focus-visible,
.audio-daw-track-tools .audio-daw-remove-track:hover,
.audio-daw-track-tools .audio-daw-remove-track:focus-visible {
  border: 0;
  background: rgba(255,255,255,.055);
  color: #fff;
  outline: 0;
}

.audio-daw-track-rename {
  display: block;
  width: min(calc(150 * var(--daw-u)),100%);
  min-height: calc(24 * var(--daw-u));
  margin: 0 0 calc(8 * var(--daw-u));
  padding: 0 calc(7 * var(--daw-u));
  border: 0;
  border-radius: calc(4 * var(--daw-u));
  background: #20242b;
  color: #fff;
  font: inherit;
  font-size: calc(11 * var(--daw-u));
  outline: 0;
  box-shadow: inset 0 calc(-1 * var(--daw-line-u)) 0 var(--daw-orange);
}

.audio-daw-track-rename::selection {
  background: rgba(255,115,0,.42);
}

/* Edit-group state is communicated by the checkbox, not another perimeter. */

.audio-daw-track.is-selected .audio-daw-track-controls,
.audio-daw-track.is-selected .audio-daw-wave {
  border: 0;
  box-shadow: none;
}

@media (max-width:819px){
  .audio-daw-timeline-ruler {
    padding-left: 150px;
  }

  .audio-daw-track-list {
    overflow-x: hidden;
  }

  .audio-daw-track {
    grid-template-columns: 150px minmax(0,1fr);
    min-width: 0;
    gap: 8px;
    margin-bottom: 5px;
    align-items: center;
  }

  .audio-daw-track-controls {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    grid-template-rows: auto auto;
    column-gap: 4px;
    row-gap: 5px;
    min-height: 58px;
    padding: 5px 7px;
    align-content: center;
  }

  .audio-daw-track-number {
    position: static;
    grid-column: 1;
    grid-row: 1;
    align-self: baseline;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
  }

  .audio-daw-track-number::after {
    content: ".";
  }

  .audio-daw-track-controls strong {
    grid-column: 2;
    grid-row: 1;
    align-self: baseline;
    max-width: none;
    margin: 0;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
  }

  .audio-daw-track-tools {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 3px;
    margin-left: 0;
    min-width: 0;
  }

  .audio-daw-track-tools button,
  .audio-daw-track-tools .audio-daw-remove-track,
  .audio-daw-track-tools .audio-daw-rename-track,
  .audio-daw-track-tools .audio-daw-edit-check {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 5px;
  }

  .audio-daw-wave {
    min-height: 42px;
    height: 42px;
    align-self: center;
  }

  .audio-daw-wave-canvas {
    inset: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    transform: scaleY(.72);
    transform-origin: center;
  }
}

/*============================================================================
   AUDIO LAB | MASTER GROUP TOGGLE + LEGIBILITY
   MASTER toggles all track edit-checkboxes together. Selection boxes remain
   visible as orange outlines even when unchecked. Typography/icons get a small
   readability lift without changing the control geometry.
   ============================================================================*/

.audio-daw-track-tools .audio-daw-edit-check,
.audio-daw-track-tools .audio-daw-edit-check[aria-checked="true"] {
  border: calc(1 * var(--daw-line-u)) solid var(--daw-orange);
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.audio-daw-track-tools .audio-daw-edit-check:hover,
.audio-daw-track-tools .audio-daw-edit-check:focus-visible {
  border-color: var(--daw-orange);
  background: rgba(255,115,0,.06);
  outline: 0;
}

.audio-daw-track-tools .audio-daw-edit-check svg {
  opacity: 0;
  color: #fff;
}

.audio-daw-track-tools .audio-daw-edit-check[aria-checked="true"] svg {
  opacity: 1;
}

/* Approximately +5% type/icon lift only. */

.audio-daw-track-controls strong {
  font-size: calc(12.6 * var(--daw-u));
}

.audio-daw-track-number {
  font-size: calc(10.5 * var(--daw-u));
}

.audio-daw-track-tools .daw-track-mute,
.audio-daw-track-tools .daw-track-solo {
  font-size: calc(10.5 * var(--daw-u));
}

.audio-daw-track-tools .audio-daw-edit-check svg,
.audio-daw-track-tools .audio-daw-rename-track svg,
.audio-daw-track-tools .audio-daw-remove-track svg {
  width: calc(13.65 * var(--daw-u));
  height: calc(13.65 * var(--daw-u));
}

.audio-daw-workspace-head,
.audio-daw-timeline-ruler {
  font-size: 105%;
}

.audio-daw-fx-head span {
  font-size: calc(10.5 * var(--daw-u));
}

.audio-daw-fx-head strong {
  font-size: calc(12.6 * var(--daw-u));
}

.audio-daw-fx-head button {
  font-size: calc(10.5 * var(--daw-u));
}

.audio-daw-effect-tabs button {
  font-size: calc(12.075 * var(--daw-u));
}

.audio-daw-eq-y,
.audio-daw-eq-x {
  font-size: calc(9.975 * var(--daw-u));
}

.audio-daw-fx-control {
  font-size: calc(10.5 * var(--daw-u));
}

.audio-daw-fx-control output {
  font-size: calc(10.5 * var(--daw-u));
}

.audio-daw-fx-settings,
.audio-daw-fx-settings>label:not(.audio-daw-fx-switch),
.audio-daw-fx-settings p,
.audio-daw-fx-switch {
  font-size: calc(10.5 * var(--daw-u));
}

.audio-daw-fx-settings select {
  font-size: calc(11.55 * var(--daw-u));
}

.audio-daw-fx-reset {
  font-size: calc(10.5 * var(--daw-u));
}

.audio-daw-fx-rack-head strong {
  font-size: calc(14.7 * var(--daw-u));
}

.audio-daw-fx-rack-head span {
  font-size: calc(10.5 * var(--daw-u));
}

.audio-daw-level-note {
  font-size: 105%;
}

/* Keep EQ value readouts contained inside each band card. */

.audio-daw-eq-bands .audio-daw-fx-control {
  min-width: 0;
  box-sizing: border-box;
  grid-template-columns: minmax(calc(48 * var(--daw-u)),auto) minmax(calc(42 * var(--daw-u)),1fr) minmax(calc(58 * var(--daw-u)),auto);
  gap: calc(6 * var(--daw-u));
  overflow: hidden;
}

.audio-daw-eq-bands .audio-daw-fx-control>span,
.audio-daw-eq-bands .audio-daw-fx-control input,
.audio-daw-eq-bands .audio-daw-fx-control output {
  min-width: 0;
}

.audio-daw-eq-bands .audio-daw-fx-control output {
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
}

/*============================================================================
   AUDIO LAB | CONTROL STATES + PRESET FIELDS
   Restores compact timeline labels, gives MASTER/FX/ACTIVE clean outline-only
   states, and forces Safari preset selects to match RESET control height.
   ============================================================================*/

/* Keep timeline ruler labels compact after the global legibility lift. */

.audio-daw-timeline-ruler {
  font-size: calc(9 * var(--daw-u));
}

/* MASTER and FX states: outline language only, never tinted/shaded fills. */

.audio-daw-fx-head button {
  background: transparent;
}

.audio-daw-fx-head .audio-daw-master-target {
  border-color: #3b414b;
  background: transparent;
  color: #d7d9de;
}

.audio-daw-fx-head .audio-daw-master-target.is-active,
.audio-daw-fx-head .audio-daw-master-target[aria-pressed="true"] {
  border-color: var(--daw-orange);
  background: transparent;
  color: #fff;
}

#audioDawMixer #dawFxBypass {
  border-color: var(--daw-orange);
  background: transparent;
  color: #fff;
}

#audioDawMixer #dawFxBypass.is-bypassed {
  border-color: #3b4049;
  background: transparent;
  color: #d7d9de;
}

/* ACTIVE toggles: transparent capsule in both states, orange outline/knob when on. */

.audio-daw-fx-switch span {
  background: transparent;
}

.audio-daw-fx-switch input:checked+span {
  border-color: var(--daw-orange);
  background: transparent;
}

/* Safari/iPad: force preset controls to be full-size peers of RESET. */

.audio-daw-fx-settings select {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  height: calc(35 * var(--daw-u));
  min-height: calc(35 * var(--daw-u));
  padding: 0 calc(30 * var(--daw-u)) 0 calc(10 * var(--daw-u));
  line-height: calc(35 * var(--daw-u));
  background-color: #171a20;
  background-image: linear-gradient(45deg,transparent 50%,#8f949d 50%),
    linear-gradient(135deg,#8f949d 50%,transparent 50%);
  background-position: calc(100% - calc(14 * var(--daw-u))) 50%,
    calc(100% - calc(10 * var(--daw-u))) 50%;
  background-size: calc(4 * var(--daw-u)) calc(4 * var(--daw-u)),calc(4 * var(--daw-u)) calc(4 * var(--daw-u));
  background-repeat: no-repeat;
}

/*============================================================================
   AUDIO LAB | RESPONSIVE FX CONTROL CARDS
   Compressor/Reverb/Delay/Limiter now share EQ's side-settings architecture.
   OPEN becomes pure black. Waveform performance is handled in DAW-Engine.js.
   ============================================================================*/

/* General FX panels now use the same visual grammar as the EQ panel: controls on the left, state/preset/help/reset card on the right. */

.audio-daw-standard-panel {
  display: grid;
  grid-template-columns: minmax(0,1fr) calc(205 * var(--daw-u));
  align-items: stretch;
  gap: calc(14 * var(--daw-u));
  padding: calc(12 * var(--daw-u));
}

.audio-daw-standard-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: calc(12 * var(--daw-u));
}

.audio-daw-standard-main .audio-daw-fx-rack-head {
  min-height: calc(44 * var(--daw-u));
}

.audio-daw-standard-panel>.audio-daw-fx-settings {
  min-height: 100%;
}

.audio-daw-standard-panel>.audio-daw-fx-settings .audio-daw-fx-switch {
  justify-content: flex-start;
}

.audio-daw-standard-panel>.audio-daw-fx-settings .audio-daw-fx-reset {
  width: 100%;
}

@media (max-width:819px), (orientation:portrait) and (min-width:820px) and (max-width:860px){
  .audio-daw-standard-panel {
    grid-template-columns: 1fr;
  }

  .audio-daw-standard-panel>.audio-daw-fx-settings {
    min-height: auto;
  }
}

/*============================================================================
   AUDIO LAB | INTERACTIVE EQ CURVE
   White touch-friendly handles stay perfectly circular while the SVG response
   curve bends smoothly underneath them. The range controls remain synchronized.
   ============================================================================*/

.audio-daw-eq-graph {
  overflow: hidden;
}

.audio-daw-eq-plot {
  position: relative;
  width: 100%;
  height: calc(136 * var(--daw-u));
  min-height: calc(136 * var(--daw-u));
}

.audio-daw-eq-plot>svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.audio-daw-eq-handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.audio-daw-eq-handle {
  position: absolute;
  z-index: 3;
  width: calc(30 * var(--daw-u));
  height: calc(30 * var(--daw-u));
  min-width: calc(24 * var(--daw-u));
  min-height: calc(24 * var(--daw-u));
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%,-50%);
  cursor: ns-resize;
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.audio-daw-eq-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(12 * var(--daw-u));
  height: calc(12 * var(--daw-u));
  min-width: calc(10 * var(--daw-u));
  min-height: calc(10 * var(--daw-u));
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 calc(1 * var(--daw-line-u)) rgba(0,0,0,.22);
  transform: translate(-50%,-50%);
}

.audio-daw-eq-handle:focus-visible {
  outline: 0;
}

@media (orientation:portrait), (max-width:819px){
  .audio-daw-eq-handle {
    min-width: 24px;
    min-height: 24px;
  }

  .audio-daw-eq-handle::after {
    min-width: 10px;
    min-height: 10px;
  }
}

.audio-daw-eq-handle:focus-visible::after,
.audio-daw-eq-handle.is-dragging::after {
  box-shadow: 0 0 0 calc(2 * var(--daw-line-u)) rgba(255,255,255,.24),0 0 0 calc(4 * var(--daw-line-u)) rgba(255,115,0,.55);
}

.audio-daw-eq-graph circle {
  fill: #fff;
  stroke: none;
}

.audio-daw-eq-line {
  stroke-width: calc(2.2 * var(--daw-u));
  vector-effect: non-scaling-stroke;
}

.audio-daw-eq-fill {
  opacity: .8;
}

/*============================================================================
   AUDIO LAB | PROJECT ACTIONS
   OPEN / SAVE / DOWNLOAD now use the exact compact outline language of
   MASTER / FX ON: transparent fill, orange perimeter, same geometry.
   ============================================================================*/

.audio-daw-workspace-head-actions .audio-daw-project-action {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  -webkit-touch-callout: none;
  min-height: calc(31 * var(--daw-u));
  padding: 0 calc(12 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid rgba(255,115,0,.8);
  border-radius: calc(5 * var(--daw-u));
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-size: calc(10.5 * var(--daw-u));
  font-weight: 600;
  line-height: 1;
  letter-spacing: .05em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.audio-daw-workspace-head-actions .audio-daw-project-action:hover,
.audio-daw-workspace-head-actions .audio-daw-project-action:focus,
.audio-daw-workspace-head-actions .audio-daw-project-action:focus-visible {
  border-color: var(--daw-orange);
  background: transparent;
  box-shadow: none;
  color: #fff;
  outline: 0;
}

.audio-daw-workspace-head-actions .audio-daw-project-action:active {
  transform: translateY(calc(1 * var(--daw-u)));
}

@media (hover: none), (pointer: coarse){
  .audio-daw-workspace-head-actions .audio-daw-project-action:hover {
    border-color: rgba(255,115,0,.8);
    background: transparent;
    color: #fff;
  }
}

/*============================================================================
   AUDIO LAB | PHONE PORTRAIT PROJECT ACTIONS
   Keep OPEN / SAVE / DOWNLOAD horizontal on narrow portrait screens.
   Preserve the established MASTER / FX and FX-tab portrait behavior.
   Desktop/tablet geometry remains untouched.
   ============================================================================*/

@media (max-width:819px){
  .audio-daw-workspace-head {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    align-items: stretch;
    gap: 0;
    padding: 0 10px 8px;
  }

  .audio-daw-workspace-head>div:first-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    padding: 8px 0 6px;
  }

  .audio-daw-project-titleline strong {
    max-width: 210px;
  }

  .audio-daw-project-rename {
    width: 24px;
    height: 24px;
  }

  .audio-daw-project-rename svg {
    width: 14px;
    height: 14px;
  }

  .audio-daw-project-name-input {
    width: min(210px,62vw);
    min-width: 120px;
    height: 28px;
    padding: 0 7px;
    border-width: 1px;
    border-radius: 4px;
    font-size: 11px;
  }

  .audio-daw-workspace-head-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 5px;
    width: 100%;
    min-width: 0;
    padding: 0;
  }

  .audio-daw-workspace-head-actions .audio-daw-project-action {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 26px;
    padding: 0 7px;
    font-size: 9.5px;
    letter-spacing: .035em;
    white-space: nowrap;
  }

  .audio-daw-workspace-head-actions #dawProjectDuration {
    flex: 0 0 auto;
    margin-left: 2px;
    font-size: 9px;
    white-space: nowrap;
  }
}

@media (max-width:390px){
  .audio-daw-workspace-head-actions {
    gap: 4px !important;
  }

  .audio-daw-workspace-head-actions .audio-daw-project-action {
    padding: 0 6px;
    font-size: 9px;
  }

  .audio-daw-workspace-head-actions #dawProjectDuration {
    margin-left: 0;
    font-size: 8.5px;
  }
}

/*============================================================================
   AUDIO LAB | PHONE PORTRAIT MIXER READABILITY
   Larger readable type/icons without enlarging the core processing controls.
   FX tab edge arrows mirror the shared bottom-dock overflow affordance.
   ============================================================================*/

@media (max-width:819px){
  .audio-daw-project-titleline strong {
    font-size: 12px;
  }

  .audio-daw-track-controls strong,
  .audio-daw-track-number {
    font-size: 12px;
  }

  .audio-daw-track-tools .audio-daw-edit-check,
  .audio-daw-track-tools .audio-daw-edit-check[aria-checked="true"] {
    border: 2px solid var(--daw-orange);
    border-radius: 5px;
  }

  .audio-daw-track-tools .daw-track-mute,
  .audio-daw-track-tools .daw-track-solo {
    font-size: 10.5px;
  }

  .audio-daw-track-tools .audio-daw-edit-check svg,
  .audio-daw-track-tools .audio-daw-rename-track svg,
  .audio-daw-track-tools .audio-daw-remove-track svg {
    width: 13px;
    height: 13px;
  }

  .audio-daw-mixer>h3 {
    font-size: 19px;
  }

  .audio-daw-fx-head span {
    font-size: 9.5px;
  }

  .audio-daw-fx-head strong {
    font-size: 11px;
  }

  .audio-daw-fx-head button {
    font-size: 9.5px;
  }

  .audio-daw-effect-tabs-shell {
    position: relative;
    overflow: hidden;
  }

  .audio-daw-effect-tabs {
    padding-right: 30px;
    scroll-padding-inline: 8px 34px;
  }

  .audio-daw-effect-tabs button {
    font-size: 10.5px;
  }

  .audio-daw-tab-edge {
    display: grid;
    place-items: center;
    position: absolute;
    z-index: 8;
    top: 0;
    bottom: 0;
    width: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--daw-orange);
    font-size: 25px;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    touch-action: manipulation;
  }

  .audio-daw-tab-edge.show {
    opacity: 1;
    pointer-events: auto;
  }

  .audio-daw-tab-prev {
    left: 0;
    background: linear-gradient(90deg,#101319 42%,rgba(16,19,25,.9) 70%,transparent);
  }

  .audio-daw-tab-next {
    right: 0;
    background: linear-gradient(270deg,#101319 42%,rgba(16,19,25,.9) 70%,transparent);
  }

  .audio-daw-fx-rack-head strong {
    font-size: 12.5px;
  }

  .audio-daw-fx-rack-head span,
  .audio-daw-fx-control,
  .audio-daw-fx-control output,
  .audio-daw-fx-settings,
  .audio-daw-fx-settings>label:not(.audio-daw-fx-switch),
  .audio-daw-fx-settings p,
  .audio-daw-fx-switch,
  .audio-daw-fx-reset {
    font-size: 9.5px;
  }

  .audio-daw-fx-settings select {
    font-size: 10.5px;
  }

  .audio-daw-eq-y,
  .audio-daw-eq-x {
    font-size: 9px;
  }

  .audio-daw-level-note {
    font-size: 111%;
  }
}

/*============================================================================
   AUDIO LAB | PHONE PORTRAIT INLINE TRANSPORT
   Keep controls, scrub line and time on one shared vertical centerline.
   ============================================================================*/

@media (max-width:819px){
  .audio-daw-transport--project {
    gap: 8px;
    padding: 8px 10px;
  }

  .audio-daw-transport--project .audio-daw-transport-buttons {
    order: 1;
    flex: 0 0 auto;
    min-width: 0;
  }

  .audio-daw-transport--project #dawProjectStop {
    display: none;
  }

  .audio-daw-transport--project .audio-daw-seek {
    order: 2;
    display: block;
    flex: 1 1 auto;
    width: auto;
    min-width: 56px;
    margin: 0;
    align-self: center;
  }

  .audio-daw-transport--project output {
    order: 3;
    flex: 0 0 auto;
    justify-self: auto;
    white-space: nowrap;
    align-self: center;
  }

  .audio-daw-transport--project .audio-daw-speaker,
.audio-daw-transport--project .audio-daw-master {
    display: none;
  }
}

@media (max-width:390px){
  .audio-daw-transport--project {
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .audio-daw-transport--project .audio-daw-transport-buttons {
    gap: 4px;
  }

  .audio-daw-transport--project .audio-daw-transport-buttons button {
    min-width: 22px;
  }

  .audio-daw-transport--project .audio-daw-seek {
    min-width: 44px;
  }

  .audio-daw-transport--project output {
    font-size: 9px;
  }
}

/*============================================================================
   AUDIO LAB | LOUDNESS MASTERING
   Full-mix BS.1770-5 measurement and target matching. Every dimension uses the
   existing --daw-u 1280 reference unit, so landscape remains bidirectional.
   ============================================================================*/

.audio-daw-loudness-panel {
  display: grid;
  gap: calc(14 * var(--daw-u));
  padding: calc(14 * var(--daw-u));
}

.audio-daw-loudness-head,
.audio-daw-loudness-target-head,
.audio-daw-loudness-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(14 * var(--daw-u));
}

.audio-daw-loudness-head {
  align-items: flex-start;
  padding-bottom: calc(10 * var(--daw-u));
  border-bottom: calc(1 * var(--daw-line-u)) solid #292e36;
}

.audio-daw-loudness-head>div {
  display: grid;
  gap: calc(4 * var(--daw-u));
}

.audio-daw-loudness-head strong,
.audio-daw-loudness-target-head strong {
  color: #fff;
  font-size: calc(14 * var(--daw-u));
  font-weight: 500;
  letter-spacing: .04em;
}

.audio-daw-loudness-head span,
.audio-daw-loudness-target-head span {
  color: #a4a9b1;
  font-size: calc(10 * var(--daw-u));
  line-height: 1.45;
}

.audio-daw-loudness-standard {
  flex: 0 0 auto;
  padding: calc(5 * var(--daw-u)) calc(8 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #30353e;
  border-radius: calc(4 * var(--daw-u));
  color: #d8dbe0 !important;
  background: #101319;
  white-space: nowrap;
}

.audio-daw-loudness-results {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: calc(10 * var(--daw-u));
}

.audio-daw-loudness-card,
.audio-daw-loudness-target {
  border: calc(1 * var(--daw-line-u)) solid #252a32;
  border-radius: calc(5 * var(--daw-u));
  background: #101319;
}

.audio-daw-loudness-card {
  display: grid;
  gap: calc(11 * var(--daw-u));
  padding: calc(12 * var(--daw-u));
}

.audio-daw-loudness-card-head span,
.audio-daw-loudness-target-head>div>span {
  color: #b9bdc5;
  font-size: calc(10 * var(--daw-u));
  letter-spacing: .06em;
}

.audio-daw-loudness-card-head small {
  color: #8f949d;
  font-size: calc(8 * var(--daw-u));
  letter-spacing: .05em;
}

.audio-daw-loudness-primary {
  display: grid;
  gap: calc(3 * var(--daw-u));
  padding: calc(10 * var(--daw-u)) 0;
  border-top: calc(1 * var(--daw-line-u)) solid #252a32;
  border-bottom: calc(1 * var(--daw-line-u)) solid #252a32;
}

.audio-daw-loudness-primary strong {
  color: #fff;
  font-size: calc(28 * var(--daw-u));
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.audio-daw-loudness-primary span,
.audio-daw-loudness-stats span {
  color: #8f949d;
  font-size: calc(8 * var(--daw-u));
  letter-spacing: .05em;
}

.audio-daw-loudness-stats {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: calc(10 * var(--daw-u));
}

.audio-daw-loudness-stats>div {
  display: grid;
  gap: calc(3 * var(--daw-u));
}

.audio-daw-loudness-stats strong,
.audio-daw-loudness-target-head output {
  color: #f4f2ed;
  font-size: calc(11 * var(--daw-u));
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.audio-daw-loudness-target {
  display: grid;
  gap: calc(11 * var(--daw-u));
  padding: calc(12 * var(--daw-u));
}

.audio-daw-loudness-target-head>div {
  display: grid;
  gap: calc(3 * var(--daw-u));
}

.audio-daw-loudness-controls {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: calc(10 * var(--daw-u));
}

.audio-daw-loudness-actions {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: calc(8 * var(--daw-u));
}

.audio-daw-loudness-actions button {
  min-height: calc(34 * var(--daw-u));
  padding: 0 calc(10 * var(--daw-u));
  border: calc(1 * var(--daw-line-u)) solid #3a4049;
  border-radius: calc(4 * var(--daw-u));
  color: #f4f2ed;
  background: #151920;
  font: inherit;
  font-size: calc(9 * var(--daw-u));
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  touch-action: manipulation;
}

.audio-daw-loudness-actions button.is-primary {
  border-color: var(--daw-orange);
  background: var(--daw-orange);
  color: #fff;
}

.audio-daw-loudness-actions button:disabled {
  cursor: default;
  opacity: .48;
}

.audio-daw-loudness-status {
  min-height: calc(18 * var(--daw-u));
  margin: 0;
  color: #9da2aa;
  font-size: calc(9 * var(--daw-u));
  line-height: 1.5;
}

.audio-daw-loudness-status.audio-operation-status {
  justify-content: flex-start;
  text-align: left;
}

@media (max-width:819px){
  .audio-daw-loudness-head {
    display: grid;
  }

  .audio-daw-loudness-standard {
    justify-self: start;
  }

  .audio-daw-loudness-results,
  .audio-daw-loudness-controls,
  .audio-daw-loudness-actions,
  .audio-daw-loudness-stats {
    grid-template-columns: 1fr;
  }
}
