/* Mix Room — dense two-deck booth layout (Federal Sound, not a copy of any brand marks) */
body.has-mix-room { background: #0b0b0d; }
body.has-mix-room .footer { display: none; }
#mix-room {
  --room-bg: #0b0b0d;
  --room-line: rgba(255,255,255,.08);
  background: #0b0b0d;
  color: #e8e6df;
  padding: 0 0 12px;
  min-height: calc(100vh - 64px);
}
.room-top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--room-line);
  background: #101014;
}
.room-top h1 { font-size: 16px; margin: 0; letter-spacing: -.02em; }
.room-top .mix-time { margin: 0; font-size: 12px; }
.room-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.room-actions .btn { height: 30px; padding: 0 10px; font-size: 12px; }
.room-timeline {
  position: relative; height: 22px; flex: 1 1 180px; min-width: 140px;
  background: #1a1a1e; border-radius: 4px; overflow: hidden;
}
.room-timeline i { position: absolute; top: 0; bottom: 0; opacity: .9; }
.room-timeline .tl-play { width: 2px; background: #fff; z-index: 2; }
.rotate-hint {
  display: none; margin: 0; padding: 6px 12px; font-size: 12px;
  color: #111; background: #d6ff3e; text-align: center; font-weight: 700;
}
.room-waves { display: grid; gap: 2px; padding: 6px 8px 4px; background: #08080a; }
.room-wave-row { position: relative; height: 52px; background: #07070a; border: 1px solid var(--room-line); border-radius: 2px; }
.room-wave-row.zoom { height: 64px; }
.room-wave-row canvas { width: 100%; height: 100%; display: block; }
.room-wave-row .lbl {
  position: absolute; left: 6px; top: 3px; z-index: 2;
  font: 700 9px/1 var(--font-mono, monospace); letter-spacing: .08em; color: #9b98a4;
}
.room-wave-row .fs-wave { height: 100%; }
.room-wave-row .fs-wave canvas { height: 100%; }

.room-booth {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 8px;
}
.room-col { display: grid; gap: 8px; min-width: 0; }
.room-fx-bank { display: flex; flex-wrap: wrap; gap: 4px; }
.room-fx-bank button {
  appearance: none; height: 22px; padding: 0 8px; font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; border: 1px solid var(--room-line); background: #16161a; color: #d8d6d0;
  border-radius: 3px; cursor: pointer;
}
.room-fx-bank button.is-on { background: #d6ff3e; color: #111; }
.room-deck-tools { display: grid; gap: 6px; }
.hot-pads { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.hot-pads button, .loop-row button {
  appearance: none; height: 28px; border: 1px solid var(--room-line); background: #1a1a1e;
  color: #f2f0ea; border-radius: 3px; font: 700 11px/1 var(--font-mono, monospace); cursor: pointer;
}
.hot-pads button.is-set { background: #d43d5c; color: #fff; border-color: #d43d5c; }
.hot-pads button:nth-child(2).is-set { background: #d6ff3e; color: #111; border-color: #d6ff3e; }
.hot-pads button:nth-child(3).is-set { background: #4de8ff; color: #111; border-color: #4de8ff; }
.hot-pads button:nth-child(4).is-set { background: #ffb020; color: #111; border-color: #ffb020; }
.loop-row { display: flex; flex-wrap: wrap; gap: 4px; }
.loop-row button { padding: 0 8px; height: 24px; }
.loop-row button.is-on { background: #d6ff3e; color: #111; }
.fs-tt.is-focus { outline: 1px solid #d6ff3e; outline-offset: 2px; }
#mix-room .fs-tt-plinth { width: min(100%, 102px); }
#mix-room .fs-mixer-col { min-width: 0; }
#mix-room .fs2-soft { padding: 6px 8px; }
#mix-room .fs2-note { display: none; }

.room-browser {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 0;
  margin: 0 8px;
  border: 1px solid var(--room-line);
  background: #101014;
  min-height: 220px;
  max-height: 320px;
}
.room-side { border-right: 1px solid var(--room-line); padding: 8px 0; overflow: auto; }
.room-side button {
  appearance: none; display: block; width: 100%; text-align: left; padding: 7px 12px;
  border: 0; background: transparent; color: #c8c6c0; font-size: 12px; cursor: pointer;
}
.room-side button.is-on { background: #1c1c14; color: #d6ff3e; }
.room-list { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.room-list-hd {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 6px 8px; border-bottom: 1px solid var(--room-line);
}
.room-list-hd input[type="search"] {
  flex: 1 1 140px; min-width: 100px; background: #1a1a1e; border: 1px solid var(--room-line);
  color: #f2f0ea; border-radius: 6px; padding: 6px 8px; font: inherit;
}
.room-table-wrap { overflow-x: auto; max-width: 100%; min-width: 0; overflow: auto; }
#fs-crate-table { width: 100%; border-collapse: collapse; font-size: 12px; }
#fs-crate-table th { position: sticky; top: 0; background: #16161a; text-align: left; padding: 6px 8px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #9b98a4; cursor: pointer; }
#fs-crate-table td { padding: 5px 8px; border-top: 1px solid var(--room-line); white-space: nowrap; }
#fs-crate-table tr[data-track] { cursor: pointer; }
#fs-crate-table tr.is-sel { background: rgba(214,255,62,.12); }
#fs-crate-table tr.is-on td:first-child { box-shadow: inset 3px 0 #d6ff3e; }
.rights-badge { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #9b98a4; }
.rights-badge.free { color: #d6ff3e; }
.rights-badge.paid { color: #ffb020; }

.room-export { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; align-items: center; }
.room-export [hidden], #mix-room [hidden] { display: none !important; }

.mix-settings {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  flex: 0 0 auto;
  padding: 6px 12px;
  border-bottom: 1px solid var(--room-line);
  background: #101014;
  position: relative;
  z-index: 2;
}
.mix-auto-pick {
  display: flex; align-items: center; gap: 6px; margin: 0;
  font-size: 12px; color: #e8e6df; cursor: pointer;
}
.mix-auto-pick input { margin: 0; accent-color: #d6ff3e; }
.mix-review {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-bottom: 1px solid var(--room-line);
  background: #16161c;
}
.mix-review-hd { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; }
.mix-review-hd .kicker { margin: 0; color: #d6ff3e; }
.mix-review-hd .subtle { margin: 0; }
.mix-review .mix-track-list { margin: 8px 0 0; max-height: none; overflow: visible; }
.mix-review .mix-track-list ol { margin: 0; padding-left: 1.2em; }
.mix-review .mix-track-list li {
  margin: 6px 0; font-size: 13px;
  display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center;
}
.mix-review .mix-track-list .btn { height: 28px; padding: 0 10px; font-size: 12px; margin-left: 0; }
#lib-pick { display: none; } /* kept for tests; the crate is the visible list */

.browser-fab {
  display: none; position: fixed; right: 12px; bottom: 16px; z-index: 30;
}
#mix-room .fs-phone-tabs { display: none; }

@media (min-width: 1100px) {
  body.has-mix-room { overflow: hidden; }
  #mix-room {
    display: flex; flex-direction: column;
    min-height: 0; overflow: hidden; padding-bottom: 0;
  }
  .room-top {
    flex-wrap: nowrap;
    align-items: center;
    padding: 4px 10px;
    gap: 8px 10px;
    min-height: 44px;
  }
  .room-top .kicker,
  .room-top .mix-meta { display: none; }
  .room-top h1 { font-size: 15px; line-height: 1.2; margin: 0; }
  .room-actions { flex: 1 1 auto; justify-content: flex-end; }
  .room-actions .btn { height: 28px; padding: 0 8px; font-size: 11px; }
  .room-booth {
    grid-template-columns: minmax(180px, 1fr) minmax(240px, 320px) minmax(180px, 1fr);
    align-items: stretch;
    flex: 0 0 auto;
    min-height: 0;
    max-height: 250px;
    overflow: hidden;
  }
  /* taller waves — platters are now header-sized */
  .room-wave-row { height: 56px; }
  .room-wave-row.zoom { height: 72px; }
  #mix-room .fs-tt { padding: 4px 6px 6px; gap: 3px; }
  #mix-room .fs-tt-plinth,
  #mix-room .dd1 .fs-tt-plinth { width: min(100%, 125px); }
  #mix-room .fs-tt-head { padding: 5px 7px 4px; }
  #mix-room .fs-tt-head .ttl { font-size: 12px; }
  #mix-room .fs-tt-brand { display: none; }
  #mix-room .fs-pitch .fs2-fader-track { height: 48px; width: 12px; }
  #mix-room .room-col,
  #mix-room .fs-mixer-col { min-height: 0; max-height: 100%; overflow: auto; }
  #mix-room .fs2-timeline { display: none; }
  #mix-room .fs2 .fs2-fader-track,
  #mix-room .fs2 .fs2-vu { height: 88px; }
  #mix-room .fs2 .fs2-deck-bottom { min-height: 88px; }
  #mix-room .fs2 { padding: 8px 8px 6px; }
  #mix-room .fs2-knob-cap { width: 28px; height: 28px; }
  #mix-room .fs2-knob.lg .fs2-knob-cap { width: 32px; height: 32px; }
  .room-browser {
    flex: 1 1 auto;
    min-height: 220px;
    max-height: none;
    margin-bottom: 0;
  }
  .room-export {
    padding-top: 2px; padding-bottom: 2px;
    flex-wrap: nowrap;
    max-height: 40px;
    overflow: hidden;
    align-items: center;
  }
  .room-export .btn { height: 28px; padding: 0 8px; font-size: 11px; }
  .room-export .mix-track-list { display: none; }
  .room-export .subtle { margin: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 900px) {
  .room-top { padding: 6px 8px; gap: 6px; }
  .room-top .kicker { display: none; }
  .room-top h1 { font-size: 14px; }
  .room-top .mix-meta { display: none; }
  .room-actions { width: 100%; }
  .room-actions .btn { height: 26px; padding: 0 8px; font-size: 11px; }
  .room-wave-row { height: 48px; }
  .room-wave-row.zoom { height: 60px; }
  #mix-room .fs-phone-tabs { display: flex; }
  #mix-room[data-tab="a"] .room-col-b, #mix-room[data-tab="a"] .fs-mixer-col { display: none; }
  #mix-room[data-tab="b"] .room-col-a, #mix-room[data-tab="b"] .fs-mixer-col { display: none; }
  #mix-room[data-tab="mix"] .room-col-a, #mix-room[data-tab="mix"] .room-col-b { display: none; }
  .room-browser {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    grid-template-columns: 1fr; max-height: 62vh;
    transform: translateY(110%); transition: transform .25s ease;
    margin: 0; border-radius: 16px 16px 0 0;
  }
  .room-browser.is-open { transform: translateY(0); }
  .room-side { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--room-line); padding: 0; }
  .room-side button { flex: 0 0 auto; }
  .browser-fab { display: block; }
  .room-top h1 { font-size: 14px; }
}
@media (max-width: 900px) and (orientation: portrait) {
  .rotate-hint { display: block; }
}
@media (max-width: 900px) and (orientation: landscape) {
  .rotate-hint { display: none; }
  #mix-room .fs-phone-tabs { display: none; }
  #mix-room[data-tab] .room-col-a, #mix-room[data-tab] .room-col-b, #mix-room[data-tab] .fs-mixer-col { display: grid; }
  .room-booth { grid-template-columns: 1fr 0.9fr 1fr; gap: 4px; padding: 4px; }
  #mix-room .fs-tt-plinth { width: min(100%, 102px); }
  .room-wave-row { height: 44px; }
  .room-wave-row.zoom { height: 56px; }
  .room-browser { position: static; transform: none; max-height: 180px; grid-template-columns: 120px 1fr; margin: 0 4px; }
  .hot-pads button, .loop-row button { height: 22px; font-size: 10px; }
  .browser-fab { display: none; }
}

@media (max-width: 900px) and (orientation: landscape) {
  #mix-room #fs-booth[data-tab="a"] .fs-tt-b,
  #mix-room #fs-booth[data-tab="a"] #fs2,
  #mix-room #fs-booth[data-tab="b"] .fs-tt-a,
  #mix-room #fs-booth[data-tab="b"] #fs2,
  #mix-room #fs-booth[data-tab="mix"] .fs-tt,
  #mix-room #fs-booth[data-tab] .room-col-a,
  #mix-room #fs-booth[data-tab] .room-col-b,
  #mix-room #fs-booth[data-tab] .fs-mixer-col { display: block !important; }
  #mix-room #fs-booth { display: grid !important; grid-template-columns: 1fr 0.8fr 1fr; }
}

.room-browser-bar { display: none; }
.browser-backdrop { display: none; }
@media (max-width: 900px) and (orientation: portrait) {
  .room-browser-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-bottom: 1px solid var(--room-line, rgba(255,255,255,.08));
  }
  .browser-backdrop {
    display: none; position: fixed; inset: 0; z-index: 39;
    border: 0; background: rgba(0,0,0,.55); cursor: pointer;
  }
  body.browser-open .browser-backdrop { display: block; }
}

/* Compact deck chrome so the smaller platters don't leave empty padding */
#mix-room .fs-tt { gap: 4px; }
#mix-room .hot-pads button, #mix-room .loop-row button { height: 24px; }
#mix-room .room-deck-tools { gap: 4px; }


/* ---- FS DD-1 media-player deck (compact, photoreal, no brand copies) ---- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0; white-space: nowrap;
}
#mix-room .dd1 {
  background:
    linear-gradient(180deg, #2a2c31 0%, #16171c 18%, #101114 100%);
  border: 1px solid #3a3d44;
  border-radius: 8px;
  box-shadow:
    0 10px 28px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -2px 6px rgba(0,0,0,.35);
  padding: 6px 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 0;
}
#mix-room .dd1-screen {
  background: #07080c;
  border: 1px solid #1c1e26;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(80,90,120,.25), inset 0 0 18px rgba(0,0,0,.65);
  padding: 4px 6px 5px;
  min-height: 96px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
#mix-room .dd1-lcd-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
#mix-room .dd1 .fs-tt-head {
  background: transparent; border: 0; padding: 0; cursor: pointer; text-align: left; min-width: 0; flex: 1;
}
#mix-room .dd1 .fs-tt-head .ttl {
  font: 700 12px/1.2 ui-sans-serif, system-ui, sans-serif;
  color: #f3f1ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#mix-room .dd1 .fs-tt-head .sub { font-size: 10px; color: #9aa0b0; }
#mix-room .dd1-readouts {
  display: grid; grid-template-columns: auto auto; gap: 1px 10px;
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, monospace;
  color: #d6ff3e; text-align: right; flex: 0 0 auto;
}
#mix-room .dd1-readouts .dd1-time { color: #f3f1ea; }
#mix-room .dd1-readouts .dd1-key { color: #4de8ff; }
#mix-room .dd1-wave-full, #mix-room .dd1-wave-zoom {
  position: relative; background: #050508; border-radius: 2px; overflow: hidden;
}
#mix-room .dd1-wave-full { height: 36px; min-height: 28px; flex: 0 0 auto; }
#mix-room .dd1-wave-zoom { height: 48px; min-height: 40px; flex: 1 1 auto; }
#mix-room .dd1-wave-full canvas, #mix-room .dd1-wave-zoom canvas,
#mix-room .dd1-wave-zoom .fs-wave { width: 100%; height: 100%; display: block; }
#mix-room .dd1-wave-full .lbl, #mix-room .dd1-wave-zoom .lbl {
  position: absolute; left: 4px; top: 2px; z-index: 2;
  font: 700 8px/1 ui-monospace, monospace; letter-spacing: .08em; color: rgba(155,152,164,.8);
  pointer-events: none;
}
#mix-room .dd1 .hot-pads { order: 0; }
#mix-room .dd1 .hot-pads button {
  height: 22px;
  border-radius: 3px;
  background: #16181e;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
#mix-room .dd1 .hot-pads button.is-set {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), 0 0 10px currentColor;
  filter: none;
}
/* Steady pad colours — no flash */
#mix-room .dd1 .hot-pads button:nth-child(1).is-set { background: #d43d5c; color: #fff; }
#mix-room .dd1 .hot-pads button:nth-child(2).is-set { background: #e8c34a; color: #111; }
#mix-room .dd1 .hot-pads button:nth-child(3).is-set { background: #3ddc97; color: #111; }
#mix-room .dd1 .hot-pads button:nth-child(4).is-set { background: #4de8ff; color: #111; }
#mix-room .dd1 .hot-pads button:nth-child(5).is-set { background: #ff8a3d; color: #111; }
#mix-room .dd1 .hot-pads button:nth-child(6).is-set { background: #c084fc; color: #111; }
#mix-room .dd1 .hot-pads button:nth-child(7).is-set { background: #60a5fa; color: #111; }
#mix-room .dd1 .hot-pads button:nth-child(8).is-set { background: #f472b6; color: #111; }

#mix-room .dd1 .room-deck-tools { display: contents; }
#mix-room .fs-tt-controls {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 0;
}
#mix-room .dd1 .fs-pitch { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#mix-room .dd1 .fs-pitch .fs2-fader-track { height: 88px; width: 14px; }
#mix-room .dd1 .fs-tt-plinth {
  position: relative;
  margin: 0 auto;
}
#mix-room .dd1-led-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 0 3px #c4453a, 0 0 10px rgba(196,69,58,.4);
}
#mix-room .fs-tt-b .dd1-led-ring {
  box-shadow: inset 0 0 0 3px #3a7ac4, 0 0 10px rgba(58,122,196,.4);
}
#mix-room .dd1-jog-face {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.28), transparent 28%),
    repeating-radial-gradient(circle at 50% 50%, #2a2c32 0 2px, #1a1b20 2px 4px);
  box-shadow:
    inset 0 0 0 8px #3a3d44,
    inset 0 0 0 9px #8a8d94,
    inset 0 0 0 14px #2e3138,
    0 0 0 1px #111;
}
#mix-room .dd1-jog-face::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 28%; height: 28%;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #d8d6d0, #6a6d74 45%, #2a2c32 70%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 2px 4px rgba(0,0,0,.5);
}
#mix-room .dd1.vinyl-on .dd1-jog-face { display: none; }
#mix-room .dd1:not(.vinyl-on) .fs-record,
#mix-room .dd1:not(.vinyl-on) .fs-arm,
#mix-room .dd1:not(.vinyl-on) .fs-arm-rest,
#mix-room .dd1:not(.vinyl-on) .fs-arm-base,
#mix-room .dd1:not(.vinyl-on) .fs-light,
#mix-room .dd1:not(.vinyl-on) .vinyl-only { display: none; }
#mix-room .dd1 [data-vinyl-mode].is-on {
  background: #d6ff3e; color: #111;
}

#mix-room .dd1-transport { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; max-width: 168px; }
#mix-room .dd1-transport button {
  appearance: none;
  height: 28px; padding: 0 8px;
  font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid #3a3d44;
  background: #1a1c22;
  color: #e8e6df;
  border-radius: 14px;
  cursor: pointer;
}
#mix-room .dd1-play {
  background: #102416; color: #8dff9a; border-color: #2f6a3a; min-width: 58px;
  box-shadow: inset 0 0 0 1px rgba(80,200,100,.25);
}
#mix-room .dd1-play .led, #mix-room .dd1-cue .led {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px;
  background: #3a3a3a; vertical-align: middle;
}
#mix-room .dd1-play.is-on, #mix-room .dd1-play.is-on .led {
  background: #19c45a; color: #04150a;
}
#mix-room .dd1-play.is-on .led { box-shadow: 0 0 8px #19c45a; background: #7dff9a; }
#mix-room .dd1-cue {
  background: #2a1a0c; color: #ffb020; border-color: #7a4a12; min-width: 52px;
}
#mix-room .dd1-cue .led { background: #5a3a10; }
#mix-room .dd1 .loop-row { flex: 1 1 100%; }
#mix-room .dd1 .loop-row button { height: 22px; border-radius: 3px; }

#mix-room .fs-mixer-col {
  background:
    linear-gradient(90deg, rgba(255,255,255,.05), transparent 12%, transparent 88%, rgba(0,0,0,.3)),
    repeating-linear-gradient(180deg, #2c2e34 0 1px, #24262c 1px 3px);
  border: 1px solid #4a4e56;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.12);
  min-width: 0;
}
#mix-room .fs2-fx-power.is-on,
#mix-room .fs2-fx-power[aria-pressed="true"] {
  box-shadow: 0 0 12px rgba(232,195,74,.45);
}
#mix-room .fs2-fx-power .led {
  background: #5a4a10;
}
#mix-room .fs2-fx-power.is-on .led {
  background: #e8c34a;
  box-shadow: 0 0 8px #e8c34a;
}

/* Desktop: fit 1440×900 / 1600×900 without clipping PLAY or the export row */
@media (min-width: 1100px) {
  html, body.has-mix-room { height: 100%; }
  body.has-mix-room {
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body.has-mix-room .nav { min-height: 0; flex: 0 0 auto; }
  body.has-mix-room .footer { display: none !important; }
  #mix-room {
    display: flex; flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow: hidden;
  }
  #mix-room .room-booth {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(220px, 280px) minmax(280px, 1fr);
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    align-items: stretch;
  }
  #mix-room .room-col,
  #mix-room .fs-mixer-col {
    max-height: none;
    overflow: visible;
    min-height: 0;
  }
  #mix-room .dd1-wave-full { height: 42px; }
  #mix-room .dd1-wave-zoom { height: 56px; }
  #mix-room .fs-tt-plinth { width: min(100%, 125px); }
  #mix-room .dd1 .fs-pitch .fs2-fader-track { height: 96px; }
  #mix-room .room-browser {
    flex: 0 0 auto;
    min-height: 140px;
    max-height: 180px;
    height: 170px;
  }
  #mix-room .room-export {
    max-height: none;
    overflow: visible;
    flex-wrap: wrap;
    min-height: 36px;
  }
  #mix-room .fs2-soft { display: none; } /* keep room for the hardware mixer */
  #mix-room .fs2-timeline { display: none; }
  #mix-room .fs-tt-brand { font-size: 9px; letter-spacing: .08em; text-align: center; color: #9aa0b0; }
  body.has-mix-room.is-live-room #mix-room {
    padding-right: 0;
  }
  body.has-mix-room.is-live-room #mix-room.has-live-side {
    display: flex !important;
    flex-direction: column;
    padding-right: 280px;
  }
}

@media (max-width: 900px) {
  #mix-room .fs-tt-controls { grid-template-columns: 24px minmax(0,1fr) auto; }
  #mix-room .dd1 .fs-pitch .fs2-fader-track { height: 72px; }
  #mix-room .dd1-wave-full { height: 32px; }
  #mix-room .dd1-wave-zoom { height: 44px; }
  #mix-room .fs-tt-plinth { width: min(100%, 102px); }
}


@media (min-width: 1100px) {
  body.has-mix-room #main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #mix-room {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    overflow: hidden;
  }
  #mix-room .room-booth {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }
  #mix-room .dd1,
  #mix-room .room-col,
  #mix-room .fs-mixer-col {
    min-height: 0;
    overflow: hidden;
  }
}


#mix-room .dd1 .fs-tt-plinth { width: min(100%, 102px); }
@media (min-width: 1100px) {
  #mix-room .fs-tt-plinth,
  #mix-room .dd1 .fs-tt-plinth { width: min(100%, 125px); }
}
@media (max-width: 900px) {
  #mix-room .fs-tt-plinth,
  #mix-room .dd1 .fs-tt-plinth { width: min(100%, 102px); }
}

/* ---- v2 hardware grid: no overlaps, real deck/mixer chrome ---- */
#mix-room .dd1 {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 6px;
  padding: 10px 10px 8px;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08) 0%, transparent 14%, transparent 86%, rgba(0,0,0,.35) 100%),
    linear-gradient(90deg, rgba(0,0,0,.28), transparent 8%, transparent 92%, rgba(0,0,0,.28)),
    #16171c;
  border: 1px solid #4a4e56;
  border-radius: 10px;
  box-shadow:
    0 12px 28px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.14),
    inset 0 -2px 6px rgba(0,0,0,.4);
}
#mix-room .dd1-screw {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9a9aa0, #3a3a40 55%, #121214);
  box-shadow: 0 1px 2px rgba(0,0,0,.7), inset 0 1px 1px rgba(255,255,255,.35);
  z-index: 3;
}
#mix-room .dd1-screw.tl { top: 6px; left: 6px; }
#mix-room .dd1-screw.tr { top: 6px; right: 6px; }
#mix-room .dd1-screw.bl { bottom: 6px; left: 6px; }
#mix-room .dd1-screw.br { bottom: 6px; right: 6px; }
#mix-room .dd1-chrome {
  display: flex; align-items: center; gap: 8px;
  min-width: 0; padding: 0 6px;
}
#mix-room .dd1-badge {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  font: 700 12px/1 ui-monospace, monospace;
  background: #c4453a; color: #fff;
  box-shadow: 0 0 8px rgba(196,69,58,.35);
}
#mix-room .fs-tt-b .dd1-badge { background: #3a7ac4; box-shadow: 0 0 8px rgba(58,122,196,.35); }
#mix-room .dd1-model {
  font: 600 10px/1.2 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .04em; color: #9aa0b0; white-space: nowrap;
}
#mix-room .dd1-model b { color: #e8e6df; font-weight: 700; }
#mix-room .dd1-header-toggles {
  margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px;
  justify-content: flex-end; min-width: 0;
}
#mix-room .dd1-header-toggles button {
  appearance: none; height: 22px; padding: 0 7px;
  border: 1px solid #3a3d44; background: #1a1c22; color: #c8c6c0;
  border-radius: 4px; font: 700 9px/1 ui-monospace, monospace;
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
}
#mix-room .dd1-header-toggles button.is-on { background: #d6ff3e; color: #111; border-color: #d6ff3e; }

/* Colour LCD */
#mix-room .dd1-screen {
  min-height: 148px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: flex;
}
#mix-room .dd1-bezel {
  flex: 1; min-height: 0;
  padding: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, #2a2c32, #121318);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 0 0 1px #050506, 0 4px 10px rgba(0,0,0,.4);
}
#mix-room .dd1-lcd {
  position: relative;
  height: 100%; min-height: 136px;
  display: flex; flex-direction: column; gap: 3px;
  padding: 6px 8px 7px;
  border-radius: 3px;
  background: #07080d;
  box-shadow: inset 0 0 0 1px rgba(80,100,140,.22), inset 0 0 22px rgba(40,80,140,.12), inset 0 0 40px rgba(0,0,0,.55);
}
#mix-room .dd1-lcd-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
#mix-room .dd1 .fs-tt-head { flex: 1; min-width: 0; }
#mix-room .dd1 .fs-tt-head .ttl { font-size: 13px; }
#mix-room .dd1-readouts {
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  grid-template-columns: none;
}
#mix-room .dd1-bpm { color: #d6ff3e; }
#mix-room .dd1-bpm b { font-size: 22px; letter-spacing: -.03em; }
#mix-room .dd1-bpm small { margin-left: 4px; font-size: 9px; color: #9aa0b0; }
#mix-room .dd1-timebar {
  display: grid; grid-template-columns: 36px 1fr 40px; gap: 6px; align-items: center;
  font: 700 10px/1 ui-monospace, monospace; color: #d8d6d0;
}
#mix-room .dd1-timebar-track {
  height: 4px; border-radius: 2px; background: #1a1c24; overflow: hidden;
}
#mix-room .dd1-timebar-track i {
  display: block; height: 100%; width: 0%; background: #d6ff3e;
}
#mix-room .dd1-waves {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; gap: 3px;
}
#mix-room .dd1-wave-full { height: 28px; flex: 0 0 28px; min-height: 24px; }
#mix-room .dd1-wave-zoom { height: auto; flex: 1 1 auto; min-height: 64px; }
#mix-room .dd1-idle {
  display: none;
  position: absolute; left: 8px; right: 8px; top: 58px; bottom: 8px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, rgba(214,255,62,.06) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(180deg, rgba(77,232,255,.05) 0 1px, transparent 1px 14px);
  align-items: center; justify-content: center;
  pointer-events: none;
  z-index: 2;
}
#mix-room .dd1-idle p {
  margin: 0; padding: 6px 10px; border-radius: 999px;
  background: rgba(8,9,12,.72); color: #d6ff3e;
  font: 700 12px/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .04em;
}
#mix-room .dd1-screen.is-empty .dd1-idle { display: flex; }
#mix-room .dd1-screen.is-empty .dd1-waves { opacity: .18; }

#mix-room .dd1 .hot-pads {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px; padding: 0 2px;
}
#mix-room .dd1 .hot-pads button { height: 24px; min-width: 0; }

#mix-room .dd1-body {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 44px;
  gap: 6px 8px;
  align-items: stretch;
  min-height: 150px;
  min-width: 0;
}
#mix-room .dd1-left {
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 8px; min-width: 0;
}
#mix-room .dd1-loop-sync { display: flex; flex-direction: column; gap: 4px; }
#mix-room .dd1-loop-sync [data-tt-sync] {
  appearance: none; height: 22px; width: 100%;
  border: 1px solid #3a3d44; background: #1a1c22; color: #e8e6df;
  border-radius: 3px; font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: .08em; cursor: pointer;
}
#mix-room .dd1-loop-sync [data-tt-sync].is-on { background: #d6ff3e; color: #111; }
#mix-room .dd1 .loop-row {
  display: flex; flex-wrap: wrap; gap: 3px; flex: 0 0 auto;
}
#mix-room .dd1 .loop-row button { height: 20px; padding: 0 5px; font-size: 9px; }
#mix-room .dd1-transport {
  display: flex; flex-direction: column; gap: 6px; max-width: none;
  align-items: flex-start;
}
#mix-room .dd1-play, #mix-room .dd1-cue {
  width: 58px; height: 58px; min-width: 58px; border-radius: 50%;
  padding: 0; display: inline-flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 2px; font-size: 9px;
}
#mix-room .dd1-jog {
  display: flex; align-items: center; justify-content: center;
  min-width: 0;
}
#mix-room .dd1-pitch-col {
  display: flex; justify-content: center; min-width: 0;
}
#mix-room .dd1 .fs-pitch {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 14px 16px;
  gap: 2px 4px;
  height: 100%;
  align-items: stretch;
}
#mix-room .dd1 .fs-pitch-lbl { grid-column: 1 / -1; font-size: 8px; letter-spacing: .08em; text-align: center; color: #9aa0b0; }
#mix-room .dd1 .fs-pitch-scale {
  display: flex; flex-direction: column; justify-content: space-between;
  font: 700 8px/1 ui-monospace, monospace; color: #8a8882; text-align: right;
}
#mix-room .dd1 .fs-pitch .fs2-fader-track { height: auto; min-height: 88px; width: 14px; align-self: stretch; }
#mix-room .dd1 .fs-pitch-val { grid-column: 1 / -1; font-size: 9px; text-align: center; }

/* Mixer logo and even strips — must fit inside the mixer column */
#mix-room .fs-mixer-col {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
#mix-room .fs2 {
  flex: 1 1 auto; min-height: 0; height: 100%; max-height: 100%;
  overflow: hidden; display: flex; flex-direction: column;
  padding: 8px 8px 6px;
}
#mix-room .fs2-top-mx2 {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 2px 2px 6px; flex: 0 0 auto;
}
#mix-room .fs2-brand { flex: 0 0 auto; min-width: 0; display: flex; align-items: center; gap: 8px; }
#mix-room .fs2-seal { width: 28px; height: 28px; }
#mix-room .fs2-wordmark { min-width: 0; }
#mix-room .fs2-wordmark strong {
  font-size: 11px; letter-spacing: .08em; white-space: nowrap;
  overflow: visible; display: block; line-height: 1.15;
}
#mix-room .fs2-wordmark em { font-size: 9px; letter-spacing: .14em; }
#mix-room .fs2-master { flex-wrap: nowrap; justify-content: space-between; width: 100%; gap: 2px; }
#mix-room .fs2-master .fs2-knob, #mix-room .fs2-top .fs2-knob { width: 42px; }
#mix-room .fs2-vu.master { height: 36px; }
#mix-room .fs2-body {
  flex: 1 1 auto; min-height: 0;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) auto auto !important;
  gap: 4px 8px;
  overflow: hidden;
}
#mix-room .fs2 { padding-left: 4px; padding-right: 4px; }
#mix-room .fs2-body { column-gap: 6px; }
#mix-room .fs2-deck {
  min-width: 0; min-height: 0; overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) 70px;
  gap: 4px;
  align-content: stretch;
}
#mix-room .fs2-deck[data-deck="a"] { grid-column: 1 !important; grid-row: 1 !important; }
#mix-room .fs2-deck[data-deck="b"] { grid-column: 2 !important; grid-row: 1 !important; }
#mix-room .fs2-deck-hd { grid-row: 1; grid-column: 1; min-width: 0; }
#mix-room .fs2-col-knobs {
  grid-row: 2; grid-column: 1; align-self: stretch;
  min-height: 0; height: 100%; max-height: 100%; overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
  padding: 0;
}
#mix-room .fs2-col-knobs > .fs2-knob:first-of-type,
#mix-room .fs2-col-knobs > .fs2-knob:last-of-type { grid-column: auto; }
#mix-room .fs2-eq-col {
  display: flex; flex-direction: column; align-items: center;
  gap: 0; max-width: 100%; flex: 0 0 auto;
}
#mix-room .fs2-kill { display: none; }
#mix-room .fs2-deck .fs2-knob { width: 32px; gap: 0; flex: 0 0 auto; }
#mix-room .fs2-eq-col .fs2-knob, #mix-room .fs2-col-knobs .fs2-eq-col { width: 32px; }
#mix-room .fs2-deck .fs2-knob-val { display: none; }
#mix-room .fs2-knob { width: 40px; gap: 1px; }
#mix-room .fs2-knob-cap { width: 22px; height: 22px; }
#mix-room .fs2-knob.lg .fs2-knob-cap { width: 24px; height: 24px; }
#mix-room .fs2-knob.sm .fs2-knob-cap { width: 20px; height: 20px; }
#mix-room .fs2-eq-col .fs2-knob-lbl, #mix-room .fs2-col-knobs .fs2-knob-lbl {
  font-size: 7px; letter-spacing: .04em;
}
#mix-room .fs2-deck-bottom {
  grid-row: 3; grid-column: 1; height: 70px; min-height: 70px; max-height: 70px;
  margin-top: 0; flex: none; align-items: flex-end; justify-content: center;
}
#mix-room .fs2-cue { display: none; } /* PFL is available via the phones / cue-mix knobs; hide to keep strips clear */
#mix-room .fs2 .fs2-deck .fs2-fader-track, #mix-room .fs2 .fs2-deck .fs2-vu {
  height: 62px !important; min-height: 62px; max-height: 62px;
}
#mix-room .fs2-xf-wrap { grid-column: 1 / -1 !important; grid-row: 2 !important; padding: 2px 4px; }
#mix-room .fs2-fx {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px 6px;
  padding: 5px 6px;
  flex: 0 0 auto;
  max-height: 96px;
  overflow: hidden;
}
#mix-room .fs2-fx-name { display: none; }
#mix-room .fs2-lcd { grid-column: 1; grid-row: 1; padding: 3px 6px; min-width: 72px; }
#mix-room .fs2-lcd-line { font-size: 10px; }
#mix-room .fs2-fx-btns { grid-column: 2 / -1; grid-row: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
#mix-room .fs2-fx .fs2-btn { height: 22px; padding: 0 4px; font-size: 7px; }
#mix-room .fs2-assign { grid-column: 1; grid-row: 2; gap: 3px; }
#mix-room .fs2-beats { display: none; } /* beat value already shown on the FX LCD */
#mix-room .fs2-fx-knobs { grid-column: 2; grid-row: 2; display: flex; justify-content: space-around; gap: 2px; }
#mix-room .fs2-fx-power { grid-column: 3; grid-row: 2; margin: 0; }
#mix-room .fs2-knob-lbl { font-size: 8px; letter-spacing: .08em; color: #c8c6c0; }
#mix-room .fs2-deck-hd h3 { font-size: 11px; }
#mix-room .fs2-deck-hd span { max-width: 70%; font-size: 9px; }
#mix-room .room-top h1, #mix-room #mix-title {
  border: 0; background: transparent; box-shadow: none; padding: 0;
}

@media (min-width: 1100px) {
  #mix-room .dd1-screen { min-height: 168px; }
  #mix-room .dd1-lcd { min-height: 156px; }
  #mix-room .dd1-wave-zoom { min-height: 72px; }
  #mix-room .dd1-body { min-height: 168px; }
}
@media (max-width: 900px) {
  #mix-room .dd1-body { grid-template-columns: 72px minmax(0, 1fr) 36px; min-height: 132px; }
  #mix-room .dd1-play, #mix-room .dd1-cue { width: 48px; height: 48px; min-width: 48px; }
  #mix-room .dd1-screen { min-height: 128px; }
  #mix-room .dd1-bpm b { font-size: 18px; }
  #mix-room .dd1-model { display: none; }
}


/* Reserve the jog / PLAY row so the screen cannot push it under the library */
#mix-room .dd1 {
  display: grid !important;
  grid-template-rows: auto minmax(120px, 1fr) auto 168px;
  gap: 6px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
#mix-room .dd1-chrome { grid-row: 1; }
#mix-room .dd1-screen { grid-row: 2; flex: none; min-height: 120px; overflow: hidden; }
#mix-room .dd1 .hot-pads, #mix-room .dd1-pads { grid-row: 3; }
#mix-room .dd1-body { grid-row: 4; min-height: 0; height: 100%; overflow: hidden; }
@media (max-width: 900px) {
  #mix-room .dd1 { grid-template-rows: auto minmax(110px, 1fr) auto 148px; }
}

/* Big round PLAY / CUE; specificity beats #mix-room .dd1-transport button */
#mix-room .dd1-body {
  grid-template-columns: 124px minmax(0, 1fr) 44px;
}
#mix-room .dd1-transport {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}
#mix-room .dd1-transport .dd1-play,
#mix-room .dd1-transport .dd1-cue,
#mix-room .dd1-play,
#mix-room .dd1-cue {
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  min-height: 54px !important;
  border-radius: 50% !important;
  padding: 0 !important;
}
@media (max-width: 900px) {
  #mix-room .dd1-body { grid-template-columns: 108px minmax(0, 1fr) 36px; }
  #mix-room .dd1-transport .dd1-play,
  #mix-room .dd1-transport .dd1-cue,
  #mix-room .dd1-play,
  #mix-room .dd1-cue {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
  }
  .has-mix-room .browser-fab, #mix-room .browser-fab { display: none !important; }
}

/* Always hide the automation rack in the Mix Room so the FS MX-2 can use the height, including the phone mixer tab. */
#mix-room .fs2-soft,
#mix-room .fs2-timeline { display: none !important; }
@media (max-width: 900px) {
  #mix-room[data-tab="mix"] .fs-mixer-col,
  #mix-room[data-tab="mix"] .fs2 {
    overflow: hidden;
    max-height: 100%;
  }
  #mix-room[data-tab="mix"] .fs2-top-mx2 { gap: 2px; padding: 2px 2px 4px; }
  #mix-room[data-tab="mix"] .fs2-fx { max-height: 84px; padding: 4px; }
}
