:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e8ebf0;
  background: #101216;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #101216;
  --panel: #171a20;
  --panel-raised: #1c2028;
  --line: #2a2f39;
  --line-soft: #222630;
  --text: #e8ebf0;
  --muted: #8d95a3;
  --dim: #697180;
  --lime: #b6f36b;
  --lime-dark: #19220f;
  --wave: #8ee3cf;
  --danger: #f27b7b;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.studio {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 760px;
  grid-template-rows: 66px 62px minmax(0, 1fr) 28px;
  background: var(--bg);
}

.topbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #15181e;
}

.brand { display: flex; min-width: 190px; align-items: center; gap: 11px; }
.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 11px;
  color: #13170e;
  background: var(--lime);
  font-size: 15px;
  font-weight: 900;
}

.brand-name { font-size: 14px; font-weight: 750; letter-spacing: -.3px; }
.brand-name span {
  margin-left: 4px;
  color: var(--lime);
  font-size: 9px;
  letter-spacing: .13em;
}
.project-name { margin-top: 3px; color: var(--muted); font-size: 10px; }

.project-state, .top-actions, .transport, .transport-actions, .master-output, .timeline-toolbar, .timeline-tools, .statusbar {
  display: flex;
  align-items: center;
}

.project-state { min-width: 0; gap: 8px; color: #a5acb8; font-size: 11px; }
.live-dot, .status-indicator, .master-led {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px #b6f36b66;
}
.divider { width: 1px; height: 16px; margin: 0 4px; background: var(--line); }
.top-actions { gap: 9px; }

.quiet-button {
  padding: 8px 7px;
  color: var(--muted);
  font-size: 10px;
  text-decoration: none;
}
.quiet-button:hover { color: var(--text); }

.button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.button:disabled { cursor: not-allowed; opacity: .42; transform: none; }
.button:not(:disabled):active { transform: translateY(1px); }
.button-quiet { border-color: #363c48; background: #20242c; }
.button-quiet:hover:not(:disabled) { border-color: #4a5260; background: #282d37; }
.button-accent { color: #14180f; background: var(--lime); }
.button-accent:hover:not(:disabled) { background: #c9ff83; }

.transport {
  gap: 20px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #191c23;
}
.transport-actions { gap: 7px; }
.transport-button, .icon-button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid #343a45;
  border-radius: 8px;
  color: #c5cad3;
  background: #222630;
  cursor: pointer;
}
.transport-button:hover:not(:disabled), .icon-button:hover:not(:disabled) {
  border-color: #565f6e;
  color: white;
  background: #2a303b;
}
.transport-button:disabled, .icon-button:disabled { cursor: not-allowed; opacity: .38; }
.play-button { color: #11160b; border-color: var(--lime); background: var(--lime); }
.play-button:hover:not(:disabled) { color: #11160b; background: #c9ff83; }
.time-display {
  display: grid;
  min-width: 118px;
  gap: 2px;
  padding-left: 19px;
  border-left: 1px solid var(--line);
}
.time-label, .eyebrow {
  color: var(--dim);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .14em;
}
#time-readout { font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 650; letter-spacing: .04em; }
.transport-hint { display: flex; align-items: center; gap: 7px; color: var(--dim); font-size: 9px; }
.shortcut, kbd {
  padding: 3px 5px;
  border: 1px solid #3a404b;
  border-radius: 4px;
  color: #aeb5c0;
  background: #222630;
  font-size: 8px;
  font-weight: 700;
}
.master-output { gap: 9px; margin-left: auto; }
.master-output label { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.master-output input { width: 91px; }
#master-gain-value { min-width: 34px; color: #c6ccd6; font-size: 9px; font-variant-numeric: tabular-nums; }
.meter {
  width: 68px;
  height: 6px;
  overflow: hidden;
  border-radius: 10px;
  background: #333944;
}
.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7dca74, var(--lime) 78%, #f7c45e);
  transition: width .12s linear;
}

.workbench {
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  grid-template-columns: 248px minmax(260px, 1fr) 300px;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}
.panel { min-width: 0; min-height: 0; background: var(--panel); }
.tracks-panel, .effects-panel { display: flex; flex-direction: column; overflow: hidden; }
.panel-heading {
  display: flex;
  min-height: 61px;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-heading h2 { margin: 4px 0 0; font-size: 14px; letter-spacing: -.2px; }
.icon-button { width: 28px; height: 28px; border-radius: 7px; font-size: 16px; }

.track-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding-top: 32px;
  scrollbar-color: #424957 transparent;
  scrollbar-width: thin;
}
.track-empty[hidden], .timeline-empty[hidden] { display: none; }
.track-card {
  position: relative;
  display: grid;
  height: 110px;
  min-height: 110px;
  flex: 0 0 110px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 12px 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  border-left: 2px solid transparent;
  cursor: pointer;
}
.track-card.selected { border-left-color: var(--lime); background: #1d2229; }
.track-main { display: flex; min-width: 0; align-items: flex-start; gap: 9px; }
.track-color { width: 8px; height: 30px; flex: 0 0 4px; border-radius: 4px; background: var(--wave); }
.track-name {
  width: 100%;
  overflow: hidden;
  color: #e2e6ed;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-meta { margin-top: 4px; color: var(--dim); font-size: 8px; }
.track-buttons { display: flex; gap: 4px; }
.small-toggle {
  min-width: 23px;
  height: 21px;
  padding: 0 5px;
  border: 1px solid #3a404c;
  border-radius: 5px;
  color: #939ba8;
  background: #222630;
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}
.small-toggle.active { border-color: #c7a6ff; color: #241a35; background: #c7a6ff; }
.track-delete { color: #8b93a1; }
.track-delete:hover { border-color: #703b42; color: #ff9a9a; background: #392127; }
.track-control {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 23px 1fr 30px;
  align-items: center;
  gap: 7px;
  color: var(--dim);
  font-size: 8px;
}
input[type="range"] {
  height: 4px;
  accent-color: var(--lime);
  cursor: pointer;
}
.track-control output { color: #b8bfca; text-align: right; font-variant-numeric: tabular-nums; }
.track-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 25px 19px;
  color: var(--muted);
  text-align: center;
}
.empty-icon, .drop-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #38404b;
  border-radius: 11px;
  color: var(--lime);
  background: #20252d;
  font-size: 15px;
}
.track-empty strong { color: #dce1e8; font-size: 11px; }
.track-empty p { max-width: 190px; margin: 0; font-size: 9px; line-height: 1.55; }
.text-button {
  padding: 5px;
  border: 0;
  color: var(--lime);
  background: transparent;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}
.text-button:hover { color: #d3ff9f; }
.master-card {
  display: flex;
  min-height: 55px;
  align-items: center;
  gap: 9px;
  margin: 10px;
  padding: 8px 10px;
  border: 1px solid #394034;
  border-radius: 9px;
  background: #1c2218;
}
.master-card-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: var(--lime);
  background: #b6f36b18;
  font-size: 10px;
  font-weight: 850;
}
.master-card strong, .master-card span { display: block; }
.master-card strong { color: #e1e7da; font-size: 9px; }
.master-card div:nth-child(2) span { margin-top: 3px; color: #859078; font-size: 8px; }
.master-card .master-led { margin-left: auto; }

.timeline-panel { display: flex; flex-direction: column; overflow: hidden; }
.timeline-toolbar {
  min-height: 61px;
  justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid var(--line-soft);
}
.timeline-title { display: grid; gap: 4px; }
.timeline-title strong { font-size: 12px; }
.timeline-tools { gap: 8px; color: var(--dim); font-size: 8px; font-variant-numeric: tabular-nums; }
.timeline-tools .icon-button { width: 24px; height: 24px; }
.timeline-scroll {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: auto;
  background-color: #14171c;
  scrollbar-color: #424957 #1b1e25;
  scrollbar-width: thin;
}
.timeline-spacer { pointer-events: none; visibility: hidden; }
#timeline {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  display: block;
}
.timeline-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 9px;
  transform: translate(-50%, -50%);
  z-index: 2;
  color: var(--muted);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}
.timeline-empty strong { color: #dce1e8; font-size: 12px; }
.timeline-empty span { font-size: 9px; }
.drop-icon { width: 40px; height: 40px; font-size: 17px; }
.timeline-foot {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 8px;
}
#session-duration { color: #c1c8d3; font-variant-numeric: tabular-nums; }
#selection-readout { color: #c4dba3; font-variant-numeric: tabular-nums; }

.effects-heading { min-height: 61px; }
.effect-total {
  padding: 5px 7px;
  border: 1px solid #394034;
  border-radius: 5px;
  color: var(--lime);
  background: #20271a;
  font-size: 8px;
  font-weight: 800;
}
.effect-target { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 13px 0; }
.effect-target label { color: var(--muted); font-size: 8px; font-weight: 700; }
.effect-target select {
  width: 100%;
  height: 31px;
  padding: 0 9px;
  border: 1px solid #363c47;
  border-radius: 7px;
  color: #dce1e8;
  background: #20242c;
  font-size: 9px;
}
.noise-tools {
  flex: 0 0 auto;
  margin: 8px 13px 0;
  padding: 8px;
  border: 1px solid #343a45;
  border-radius: 7px;
  background: #1b1f26;
}
.noise-tools summary { color: #d6deca; font-size: 9px; font-weight: 700; cursor: pointer; }
.noise-tools p { margin: 7px 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.noise-tools > .button { width: 100%; min-height: 27px; font-size: 8px; }
#noise-profile-state { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; }
.noise-strength { display: grid; gap: 5px; margin-top: 8px; color: var(--muted); font-size: 8px; }
.noise-strength span { display: flex; justify-content: space-between; }
#noise-strength-value { color: var(--lime); font-variant-numeric: tabular-nums; }
.noise-strength input { width: 100%; }
.noise-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.noise-actions .button { min-height: 28px; font-size: 8px; }
.effect-tabs { display: grid; flex: 0 0 auto; grid-template-columns: 1fr 1.25fr; gap: 5px; padding: 8px 13px 0; }
.effect-tab {
  min-width: 0;
  min-height: 29px;
  border: 1px solid #353b46;
  border-radius: 6px 6px 0 0;
  color: #9aa2af;
  background: #1b1f26;
  font-size: 8px;
  cursor: pointer;
}
.effect-tab.active { border-color: #687d4d; color: var(--lime); background: #252d1e; }
.effects-browser, .effect-properties-panel { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; }
.effects-browser, .effect-properties-panel { flex: 1 1 100px; }
.effect-properties-panel[hidden], .effects-browser[hidden] { display: none; }
.search-box {
  display: flex;
  flex: 0 0 32px;
  height: 32px;
  align-items: center;
  gap: 7px;
  margin: 10px 13px 8px;
  padding: 0 9px;
  border: 1px solid #343a45;
  border-radius: 7px;
  color: var(--dim);
  background: #20242c;
}
.search-box span { font-size: 16px; }
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 9px;
}
.search-box input::placeholder { color: #737b89; }
.category-list {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  padding: 0 13px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-button {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid #353b46;
  border-radius: 5px;
  color: #9aa2af;
  background: #20242c;
  font-size: 8px;
  cursor: pointer;
}
.category-button.active { border-color: #687d4d; color: var(--lime); background: #252d1e; }
.effect-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  scrollbar-color: #424957 transparent;
  scrollbar-width: thin;
}
.effect-option {
  display: flex;
  width: 100%;
  min-height: 29px;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  border: 0;
  border-left: 2px solid transparent;
  color: #b8bfca;
  background: transparent;
  font-size: 9px;
  text-align: left;
  cursor: pointer;
}
.effect-option:hover { color: white; background: #20242c; }
.effect-option.selected { border-left-color: var(--lime); color: var(--lime); background: #22281d; }
.effect-option small { color: #78818f; font-size: 7px; }
.rack-heading { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 7px; }
.rack-heading > div { display: grid; gap: 3px; }
.rack-heading strong { color: #e4e9ef; font-size: 9px; }
.rack-count { color: var(--muted); font-size: 8px; }
.effect-rack { display: grid; max-height: 34%; flex: 0 0 auto; gap: 4px; overflow: auto; padding: 0 10px 8px; }
.rack-empty { padding: 9px 7px; border: 1px dashed #343b46; border-radius: 6px; color: var(--dim); font-size: 8px; line-height: 1.45; }
.rack-device { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 5px 6px; border: 1px solid #343b46; border-radius: 6px; background: #1c2027; }
.rack-device.selected { border-color: #687d4d; background: #22281d; }
.rack-bypass { width: 25px; height: 22px; border: 1px solid #414a56; border-radius: 5px; color: #818a97; background: #20242c; font-size: 8px; font-weight: 800; cursor: pointer; }
.rack-bypass.active { border-color: #687d4d; color: var(--lime); background: #252d1e; }
.rack-select { min-width: 0; padding: 2px 0; border: 0; color: #cbd2dc; background: transparent; font-size: 8px; text-align: left; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; cursor: pointer; }
.rack-device.selected .rack-select { color: var(--lime); }
.rack-actions { display: flex; gap: 3px; }
.rack-action { width: 22px; height: 22px; padding: 0; border: 1px solid #343b46; border-radius: 4px; color: #9aa2af; background: #20242c; font-size: 9px; cursor: pointer; }
.rack-action:disabled { opacity: .35; cursor: default; }
.rack-action.remove { color: #f27b7b; }
.effect-editor {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 9px 10px;
  scrollbar-color: #424957 transparent;
  scrollbar-width: thin;
}
.effect-editor-empty { padding: 8px 0; color: var(--dim); font-size: 9px; line-height: 1.5; }
.effect-device { display: grid; gap: 8px; }
.effect-device-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.effect-device-heading > div { display: flex; min-width: 0; align-items: center; gap: 7px; }
.effect-device-heading h3 { overflow: hidden; margin: 0; color: #edf1f6; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.effect-device-heading span, .effect-device-heading small { color: var(--device-accent); font-size: 7px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.effect-device-heading small { color: var(--dim); white-space: nowrap; }
.effect-visual { position: relative; overflow: hidden; border: 1px solid #29313a; border-radius: 6px; background: #10151c; }
.effect-visual-title { position: absolute; z-index: 1; top: 5px; left: 7px; color: #a0a9b5; font-size: 6px; font-weight: 800; letter-spacing: .1em; }
.effect-visual-canvas { display: block; width: 100%; height: 68px; }
.effect-knob-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 3px; justify-items: center; }
.effect-knob-control { display: grid; min-width: 0; justify-items: center; gap: 3px; }
.effect-knob-label { max-width: 100%; overflow: hidden; margin: 0; color: #b7c0cc; font-size: 7px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.rotary-knob {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid #596271;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #3b424d, #20252d 68%);
  box-shadow: inset 0 0 0 3px #171b21, 0 3px 8px #0007;
  cursor: ns-resize;
  touch-action: none;
  outline: none;
}
.rotary-knob::before { position: absolute; inset: -4px; border: 1px solid #343b46; border-radius: 50%; content: ""; }
.rotary-knob span { position: absolute; top: 4px; left: calc(50% - 1px); width: 2px; height: 9px; border-radius: 2px; background: var(--device-accent); box-shadow: 0 0 5px var(--device-accent); transform: rotate(var(--knob-angle, -135deg)); transform-origin: 50% 15px; }
.rotary-knob:focus-visible { border-color: var(--device-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--device-accent) 28%, transparent), inset 0 0 0 3px #171b21; }
.rotary-knob:active { filter: brightness(1.2); }
.effect-knob-value { color: var(--device-accent); font-size: 7px; font-variant-numeric: tabular-nums; }
.effect-mode-select { width: 100%; min-width: 0; height: 28px; padding: 0 5px; border: 1px solid #414a56; border-radius: 5px; color: #e0e6ed; background: #20252d; font-size: 7px; }
.effect-mode-select:focus-visible { border-color: var(--device-accent); outline: 2px solid color-mix(in srgb, var(--device-accent) 28%, transparent); }
.effect-graph-interactive { cursor: crosshair; }
.effect-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 13px 13px; }
.effect-actions { flex: 0 0 auto; }
.effect-actions .button { width: 100%; }

.statusbar {
  gap: 8px;
  padding: 0 13px;
  border-top: 1px solid var(--line);
  color: #9aa2af;
  background: #15181e;
  font-size: 8px;
}
.status-indicator { width: 6px; height: 6px; flex-basis: 6px; }
.status-right { margin-left: auto; color: #758071; font-size: 7px; font-weight: 800; letter-spacing: .08em; }
.status-divider { padding: 0 4px; color: var(--lime); }

.processing-toast {
  position: fixed;
  z-index: 20;
  right: 18px;
  bottom: 40px;
  display: grid;
  width: min(340px, calc(100vw - 28px));
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px 10px;
  padding: 12px;
  border: 1px solid #48533e;
  border-radius: 10px;
  background: #1b2018;
  box-shadow: 0 12px 35px #0009;
}
.processing-toast[hidden] { display: none; }
.processing-spinner {
  width: 17px;
  height: 17px;
  align-self: center;
  border: 2px solid #48523c;
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: processing-spin .8s linear infinite;
}
.processing-summary { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.processing-summary strong { overflow: hidden; color: #e7eddc; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.processing-summary span { flex: 0 0 auto; color: var(--lime); font-size: 9px; font-variant-numeric: tabular-nums; }
.processing-meter { height: 5px; overflow: hidden; border-radius: 5px; background: #333a2e; }
.processing-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lime); transition: width .12s linear; }
.processing-meter.indeterminate span { width: 35%; animation: processing-sweep 1.1s ease-in-out infinite; }
@keyframes processing-spin { to { transform: rotate(360deg); } }
@keyframes processing-sweep { from { transform: translateX(-110%); } to { transform: translateX(310%); } }

@media (max-width: 1050px) {
  .workbench { grid-template-columns: 215px minmax(240px, 1fr) 270px; }
  .project-state { display: none; }
  .topbar { justify-content: flex-start; }
  .top-actions { margin-left: auto; }
}

@media (max-width: 820px) {
  html, body { overflow: auto; }
  .studio { min-width: 0; min-height: 100%; height: auto; grid-template-rows: auto auto minmax(620px, 1fr) 28px; }
  .topbar { min-height: 62px; flex-wrap: wrap; padding: 9px 12px; }
  .brand { min-width: 0; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .top-actions { gap: 5px; }
  .quiet-button { display: none; }
  .button { min-height: 31px; padding: 0 9px; font-size: 9px; }
  .transport { min-height: 57px; gap: 10px; padding: 0 12px; }
  .transport-hint { display: none; }
  .master-output { gap: 6px; }
  .master-output input { width: 62px; }
  .meter { width: 36px; }
  .workbench { grid-template-columns: 180px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 390px; }
  .tracks-panel { grid-row: 1 / 3; }
  .effects-panel { grid-column: 2; grid-row: 2; }
  .timeline-panel { grid-column: 2; grid-row: 1; }
  .timeline-foot span:last-child { display: none; }
  .effect-editor { display: block; }
}

@media (max-width: 560px) {
  .studio { grid-template-rows: auto auto minmax(960px, 1fr) 28px; }
  .topbar { gap: 8px; }
  .brand-name { font-size: 12px; }
  .top-actions { width: 100%; justify-content: flex-end; }
  .top-actions::before { content: "Offline mix session"; margin-right: auto; color: var(--muted); font-size: 8px; }
  .transport { flex-wrap: wrap; gap: 8px; padding: 7px 10px; }
  .time-display { min-width: 92px; padding-left: 9px; }
  #time-readout { font-size: 12px; }
  .master-output { margin-left: auto; }
  .master-output label, #master-gain-value, .meter { display: none; }
  .workbench { display: flex; flex-direction: column; min-height: 960px; }
  .tracks-panel { min-height: 190px; flex: 0 0 190px; }
  .track-list { display: flex; min-height: 0; overflow-x: auto; overflow-y: hidden; }
  .track-list { padding-top: 32px; }
  .track-card { width: 210px; min-width: 210px; min-height: 112px; border-right: 1px solid var(--line-soft); }
  .track-empty { min-width: 210px; padding: 10px; }
  .master-card { display: none; }
  .timeline-panel { min-height: 310px; flex: 1 1 310px; }
  .effects-panel { min-height: 460px; flex: 0 0 460px; }
  .effect-editor { display: block; }
  .statusbar { font-size: 7px; }
  .status-right { font-size: 6px; }
  .processing-toast { right: 10px; bottom: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .processing-spinner, .processing-meter.indeterminate span { animation-duration: 2.5s; }
}
