/* Live Studio: compact production console. No display-only chrome. */
:root {
  color-scheme: dark;
  --bg: #151618;
  --panel: #202124;
  --panel-2: #252629;
  --raised: #2b2d30;
  --input: #191a1c;
  --line: #35373b;
  --line-soft: #2c2e32;
  --text: #e5e5e5;
  --muted: #a4a7ad;
  --dim: #82868c;
  --selected: #759fe7;
  --selected-bg: #2b394b;
  --live: #d84b52;
  --healthy: #68b88d;
  --warning: #edb85f;
  --sans: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; background: var(--bg); color: var(--text);
  font: 13px/1.4 var(--sans); }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--selected); outline-offset: 1px; }
svg { display: block; width: 17px; height: 17px; fill: none;
  stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
.svg-library, [hidden] { display: none !important; }
.studio-app { display: grid; grid-template-rows: 50px minmax(0,1fr) 64px;
  height: 100%; min-height: 0; }

/* Application menu strip */
.app-header { display: grid; grid-template-columns: 230px minmax(0,1fr) auto;
  min-width: 0; background: #202124; border-bottom: 1px solid var(--line); }
.brand { min-width: 0; display: flex; align-items: center;
  padding: 0 16px; border-right: 1px solid var(--line); }
.brand-title { font-size: 15px; font-weight: 690; letter-spacing: -.2px;
  color: #f2f2f2; white-space: nowrap; }
.project-display { display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 0 15px; }
.project-meta { min-width: 0; flex: 1; }
.project-meta input { display: block; width: min(360px,100%); border: 1px solid transparent;
  background: transparent; color: var(--text); padding: 6px 7px; margin: 0 0 0 -7px;
  border-radius: 3px; font-size: 13px; font-weight: 550; }
.project-meta input:hover { background: #2b2c30; }
.project-meta input:focus { background: var(--input); border-color: var(--selected); }
.api-dot { width: 6px; height: 6px; flex: none;
  background: var(--healthy); border-radius: 50%; }
.header-actions { display: flex; align-items: center; gap: 17px;
  padding: 0 17px; white-space: nowrap; }
.header-api { display: flex; align-items: center; gap: 8px; font-size: 11px;
  color: var(--muted); }
.header-clock { color: var(--dim); font: 11px/1 var(--mono); }
.top-settings-button { display: none; align-items: center; gap: 8px;
  background: var(--raised); border: 1px solid var(--line);
  border-radius: 3px; padding: 8px 11px; }
.top-settings-button svg { width: 15px; height: 15px; }

/* Primary workspace panes */
.workspace { display: grid; grid-template-columns: 230px minmax(0,1fr) 310px;
  min-height: 0; min-width: 0; }
.left-panel { display: grid; grid-template-rows: minmax(150px,36%) minmax(210px,1fr);
  min-width: 0; min-height: 0; background: var(--panel);
  border-right: 1px solid var(--line); }
.left-panel > section { min-width: 0; min-height: 0;
  display: flex; flex-direction: column; position: relative; }
.scenes-panel { border-bottom: 1px solid var(--line); }
.panel-heading { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; min-height: 42px; height: 42px; flex: none;
  padding: 0 12px; border-bottom: 1px solid var(--line-soft); }
.panel-heading h2 { margin: 0; font-weight: 620; font-size: 13px; }
.heading-group { display: flex; align-items: center; min-width: 0; gap: 7px; }
.count { color: var(--dim); font: 11px/1 var(--mono); }
.heading-buttons { display: flex; align-items: center; gap: 1px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; border-radius: 3px;
  color: #a8adb2; width: 28px; height: 27px; padding: 0; }
.icon-button:hover:not(:disabled), .subtle-button:hover { background: var(--raised);
  color: #f1f1f1; }
.icon-button svg { width: 16px; height: 16px; }
.add-source-button, #add-scene { color: var(--text); }
.add-source-button:hover, #add-scene:hover { background: #3c434c; }
.collection-list { flex: 1; min-height: 0; padding: 7px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #46484e transparent; }
.collection-list:empty:after { content: "No sources"; display: block;
  padding: 17px 8px; font-size: 12px; color: var(--dim); }
.scene-list:empty:after { content: "No scenes"; }
.collection-item { display: flex; align-items: center; gap: 8px; position: relative;
  width: 100%; min-height: 43px; border: 1px solid transparent; border-radius: 3px;
  background: transparent; text-align: left; padding: 5px 7px 5px 10px;
  margin: 0 0 2px; color: var(--text); }
.collection-item:hover { background: #2a2c2f; }
.collection-item.active { background: var(--selected-bg); border-color: #456083; }
.collection-item.active:before { content: ""; width: 2px; position: absolute;
  inset: 0 auto 0 0; background: var(--selected); }
.collection-item > svg { width: 15px; height: 15px; color: #90b6ef; }
.collection-item .item-icon { color: var(--muted); flex: none; }
.collection-item .item-icon svg { width: 17px; height: 17px; }
.item-text { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 1px; }
.item-text strong { font-size: 12px; font-weight: 590; color: #e8e9ea;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.item-text small { font-size: 11px; color: var(--dim); font-weight: 400;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.item-tool { display: inline-flex; align-items: center; justify-content: center;
  flex: none; background: transparent; color: #8d929a;
  width: 23px; height: 27px; padding: 3px; border: 0; border-radius: 3px; }
.item-tool svg { width: 15px; height: 15px; }
.item-tool:hover { color: var(--text); background: #41454b; }
.source-bottom { display: flex; align-items: center; justify-content: space-between;
  height: 37px; padding: 0 10px; flex: none; border-top: 1px solid var(--line-soft);
  font-size: 11px; color: var(--dim); }
.subtle-button { border: 0; border-radius: 3px; background: transparent;
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 5px;
  font-size: 11px; color: var(--muted); }
.subtle-button svg { width: 14px; height: 14px; }
.scene-rename-input { border: 1px solid var(--selected); border-radius: 2px;
  background: var(--input); color: var(--text); padding: 7px;
  width: 100%; min-width: 0; }
.source-menu { position: absolute; top: 39px; left: 6px; right: 6px;
  z-index: 90; padding: 5px; background: #2b2d31; border: 1px solid #52565e;
  border-radius: 3px; box-shadow: 0 10px 24px #0008; }
.menu-label { padding: 7px 9px; font-size: 12px; font-weight: 600; color: var(--muted); }
.source-menu button { display: flex; gap: 11px; align-items: center; width: 100%;
  min-height: 45px; padding: 6px 9px; border: 0; border-radius: 2px;
  background: transparent; text-align: left; }
.source-menu button:hover { background: #3b3f44; }
.source-menu button svg { width: 18px; height: 18px; color: var(--muted); }
.source-menu button span { display: flex; flex-direction: column; gap: 1px; }
.source-menu button strong { font-weight: 570; font-size: 12px; }
.source-menu button small { color: var(--dim); font-size: 11px; }
.menu-separator { height: 1px; margin: 4px 8px; background: var(--line); }

/* Video output */
.center-panel { min-width: 0; min-height: 0; display: grid;
  grid-template-rows: 43px minmax(160px,1fr) 40px 34px 128px;
  background: #121314; }
.center-panel:not(.streaming) {
  grid-template-rows: 43px minmax(160px,1fr) 40px 128px;
}
.center-panel:not(.streaming) .delivery-strip { display: none; }
.monitor-header { display: flex; align-items: center; justify-content: space-between;
  gap: 15px; min-width: 0; padding: 0 14px; background: var(--panel);
  border-bottom: 1px solid var(--line); }
.monitor-name { display: flex; align-items: center; min-width: 0; gap: 9px; }
.monitor-name strong { font-size: 13px; font-weight: 660; }
.monitor-indicator { display: block; width: 7px; height: 7px; flex: none;
  background: #81868d; border-radius: 50%; }
.monitor-indicator.live { background: var(--live); }
.monitor-subtitle { padding-left: 11px; border-left: 1px solid #44464c;
  font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.resolution-readout { font: 11px/1 var(--mono); color: var(--muted);
  white-space: nowrap; }
.monitor-stage { display: flex; position: relative; align-items: center;
  justify-content: center; min-width: 0; min-height: 0; padding: 16px;
  overflow: hidden; background: #111214; }
.stage-canvas-wrap { position: relative; flex: none; height: 100%; width: auto;
  max-width: 100%; max-height: 100%; aspect-ratio: 16 / 9; background: black;
  box-shadow: 0 0 0 1px #4b4e54; }
#program-canvas { display: block; width: 100%; height: 100%; background: black; }
.empty-stage { position: absolute; inset: 0; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none; background: #151617e8; padding: 20px; }
.empty-stage h1 { font-size: 16px; font-weight: 550; margin: 0; }
.empty-stage p { font-size: 12px; margin: 6px 0 15px; color: var(--dim); }
.stage-cta { pointer-events: auto; display: flex; align-items: center;
  justify-content: center; gap: 7px; border: 1px solid #60646d;
  background: #33373b; padding: 7px 14px; border-radius: 3px;
  font-size: 12px; }
.stage-cta:hover { background: #454a50; }
.stage-cta svg { width: 14px; height: 14px; }
.selection-frame { position: absolute; border: 1px solid #87b5f1;
  box-shadow: 0 0 0 1px #101719aa; cursor: move; touch-action: none; }
.selection-label { position: absolute; top: -23px; left: -1px;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: #85b0ed; color: #0a1526; padding: 3px 8px;
  font-size: 11px; font-weight: 600; }
.resize-knob { position: absolute; right: -6px; bottom: -6px;
  width: 11px; height: 11px; border: 2px solid #111214; background: #9cc4f4;
  cursor: nwse-resize; }
.monitor-footer { display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 0 13px;
  background: var(--panel); border-top: 1px solid var(--line); min-width: 0; }
.monitor-status { display: flex; align-items: center; gap: 8px; min-width: 0; }
.status-led { display: block; width: 6px; height: 6px;
  flex: none; background: #7c8187; border-radius: 50%; }
.status-led.live { background: var(--live); }
.monitor-status strong { font-size: 12px; font-weight: 620;
  white-space: nowrap; }
.monitor-status > span:last-child { font-size: 11px; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.monitor-metrics { display: flex; gap: 15px; align-items: center; flex: none; }
.monitor-metrics span { white-space: nowrap; font-size: 11px; color: var(--dim); }
.monitor-metrics b { font: 12px/1 var(--mono); color: #d9dcdf; margin: 0 3px; }
#output-info { display: none; }
.delivery-strip { display: flex; align-items: center; gap: 9px; padding: 0 13px;
  background: #1b1c1f; border-top: 1px solid var(--line-soft);
  font-size: 11px; color: var(--muted); min-width: 0; }
.delivery-light { width: 6px; height: 6px; flex: none; border-radius: 50%;
  background: #7b8087; }
.delivery-strip.healthy .delivery-light { background: var(--healthy); }
.delivery-strip.warn .delivery-light { background: var(--warning); }
.delivery-strip.retry .delivery-light { background: var(--live); }
.delivery-strip strong { font-weight: 610; white-space: nowrap; color: #cfd1d4; }
#delivery-description { flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-counter { white-space: nowrap; font: 11px/1 var(--mono); color: var(--dim); }

/* Two-channel audio desk */
.mixer-panel { display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border-top: 1px solid var(--line); }
.mixer-heading { display: flex; align-items: center; justify-content: space-between;
  flex: none; height: 34px; padding: 0 13px; border-bottom: 1px solid var(--line-soft); }
.mixer-heading h2 { font-weight: 620; font-size: 12px; margin: 0; }
.mixer-heading p { display: none; }
.audio-tag { font: 10px/1 var(--mono); color: var(--dim); }
.mixer-channels { display: grid; grid-template-columns: 1fr 1fr; min-height: 0; flex: 1; }
.mixer-channel { display: flex; gap: 8px; padding: 12px 12px 7px;
  align-items: flex-start; min-width: 0; position: relative; }
.mixer-channel + .mixer-channel { border-left: 1px solid var(--line); }
.channel-icon { display: none; }
.channel-body { min-width: 0; flex: 1; }
.channel-header { display: flex; justify-content: space-between;
  padding-right: 30px; gap: 8px; margin-bottom: 9px; }
.channel-header strong { font-size: 12px; font-weight: 580; }
.channel-header span { font: 10px/1.5 var(--mono); color: var(--muted); }
.meter-track { position: relative; background: #0c0d0f; border: 1px solid #393c40;
  height: 8px; border-radius: 1px; overflow: hidden; }
.meter-fill { position: absolute; inset: 0 auto 0 0; width: 0;
  background: linear-gradient(90deg, #50a478 0%, #74b77c 60%, #d0ba60 84%, #d56b54 100%);
  transition: width .12s linear; }
.meter-lines { position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg,
    transparent 0,transparent calc(10% - 1px),
    #08090baa calc(10% - 1px),#08090baa 10%); }
.channel-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.channel-controls input[type=range] { width: 100%; flex: 1; min-width: 0;
  height: 16px; accent-color: #b0b4b9; cursor: pointer; }
.channel-controls span { width: 34px; text-align: right;
  font: 10px/1 var(--mono); color: var(--muted); }
.channel-mute { position: absolute; top: 9px; right: 8px; width: 26px; height: 26px; }
.channel-mute.enabled { background: #65363b; color: #ffe3e3; }

/* Stream / source inspector */
.right-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: var(--panel); border-left: 1px solid var(--line);
  overflow-y: auto; scrollbar-width: thin; scrollbar-color: #51545b transparent; }
.right-tabs { display: flex; height: 43px; min-height: 43px; position: sticky;
  top: 0; z-index: 2; background: var(--panel); border-bottom: 1px solid var(--line); }
.editor-tab { flex: 1; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--muted); font-size: 12px; font-weight: 560;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.editor-tab:hover { color: #fff; background: #2a2c2f; }
.editor-tab.selected { color: #f4f4f4; border-bottom-color: var(--selected); }
#source-tab-label { max-width: 72px; font-size: 10px; color: var(--dim);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.output-panel { display: flex; flex-direction: column; flex: 1; min-height: 0;
  overflow-y: auto; scrollbar-width: thin; }
.output-heading { display: flex; align-items: center; justify-content: space-between;
  min-height: 45px; padding: 0 14px; }
.output-heading h2 { font-size: 13px; font-weight: 650; margin: 0; }
.output-heading p { display: none; }
.close-output { display: none; }
.settings-form { padding: 5px 14px 2px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.form-field > span { display: flex; justify-content: space-between;
  gap: 7px; font-size: 12px; font-weight: 520; color: #d1d3d6; }
.form-field > span small { font-size: 11px; font-weight: 400; color: var(--dim); }
.form-field input, .form-field select { width: 100%; height: 35px; min-width: 0;
  border: 1px solid #484b51; border-radius: 3px;
  background: var(--input); color: #e9e9eb; padding: 0 9px; font-size: 12px; }
.form-field select { padding-right: 2px; }
.form-field input:disabled, .form-field select:disabled { opacity: .6; }
.field-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  column-gap: 9px; }
.bitrate-field input { font-family: var(--mono); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 37px; }
.eye-button { position: absolute; top: 4px; right: 4px; width: 29px; height: 27px;
  border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; border-radius: 3px; }
.eye-button:hover { color: #fff; background: var(--raised); }
.eye-button svg { width: 15px; height: 15px; }
.encoder-capability { display: flex; align-items: flex-start;
  gap: 8px; margin: 2px 14px 0; padding: 10px 0;
  font-size: 11px; line-height: 1.5; color: var(--muted);
  border-top: 1px solid var(--line-soft); }
.capability-status { width: 7px; height: 7px; border-radius: 50%;
  background: #767c82; flex: none; margin-top: 5px; }
.capability-status.supported { background: var(--healthy); }
.capability-status.unsupported { background: var(--live); }
.output-hint { display: flex; align-items: flex-start; gap: 8px;
  margin: 0 14px 7px; color: var(--dim); font-size: 11px; line-height: 1.55; }
.output-hint svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.diagnostics { border-top: 1px solid var(--line-soft); margin-top: 10px; }
.diagnostics summary { cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 7px; padding: 12px 14px;
  font-size: 12px; font-weight: 540; }
.diagnostics summary:hover { background: var(--raised); }
.diagnostics summary > span { font-size: 11px; font-weight: 400; color: var(--dim); }
.connection-log { max-height: 180px; overflow: auto; padding: 11px 14px;
  background: #18191b; font: 11px/1.55 var(--mono); color: var(--muted); }
.connection-log p { margin: 0 0 7px; overflow-wrap: anywhere; }
.connection-log time { margin-right: 9px; color: #99b7e0; }
.diagnostics-actions { display: flex; justify-content: flex-end; padding: 8px 13px; }
.diagnostics-actions button { background: #303339; border: 1px solid #555962;
  border-radius: 3px; font-size: 11px; padding: 5px 10px; }
.diagnostics-actions button:hover { background: #41454c; }
.inspector-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.inspector-panel .panel-heading { flex: none; min-height: 44px; }
.tiny-label { font-size: 11px; color: var(--dim); }
.inspector-empty { display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: 1; min-height: 160px; padding: 22px 16px;
  text-align: center; }
.inspector-empty strong { font-size: 13px; font-weight: 580; }
.inspector-empty p { max-width: 200px; margin: 8px 0 0;
  font-size: 12px; color: var(--dim); }
.inspector-fields { min-height: 0; overflow-y: auto; padding: 14px;
  scrollbar-width: thin; }
.inspector-section-label { margin: 4px 0 10px; font-size: 12px; font-weight: 650;
  color: #d4d7db; text-transform: capitalize; }
.inspector-row { display: flex; gap: 9px; margin-bottom: 11px; align-items: center; }
.inspector-row > label { display: flex; flex-direction: column; flex: 1; min-width: 0;
  gap: 5px; font-size: 11px; color: var(--muted); }
.inspector-row input:not([type=checkbox]), .inspector-row select {
  width: 100%; height: 34px; min-width: 0; padding: 0 8px;
  background: var(--input); color: var(--text);
  border: 1px solid #494c52; border-radius: 3px; font-size: 12px; }
.inspector-row input[type=color] { padding: 2px; }
.inspector-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--selected); }
.inspector-divider { height: 1px; background: var(--line-soft); margin: 15px 0; }
.inspector-note { font-size: 11px; color: var(--dim); line-height: 1.5; }
.capture-source-controls { display: flex; flex-direction: column; gap: 9px;
  padding: 10px 0 14px; margin-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.capture-source-name { font-size: 11px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capture-change-button { align-self: flex-start; padding: 7px 12px;
  border: 1px solid #606775; border-radius: 3px;
  background: #353b44; color: var(--text); font-size: 12px; }
.capture-change-button:hover:not(:disabled) { background: #444d59; }

/* Permanent transport bar */
.action-bar { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; min-width: 0; background: #202124;
  border-top: 1px solid #45474b; padding: 0 15px; }
.action-status { display: flex; align-items: center; min-width: 0; gap: 9px; }
.action-indicator { width: 7px; height: 7px; flex: none; background: #777c82;
  border-radius: 50%; }
.action-indicator.live { background: var(--live); }
.action-indicator.uploading { background: var(--warning); }
#action-text { font-size: 12px; color: #c5c8cc; font-weight: 570;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-divider { width: 1px; height: 16px; background: var(--line); margin: 0 5px; }
#elapsed { font: 12px/1 var(--mono); color: var(--muted); white-space: nowrap; }
.action-buttons { display: flex; align-items: center; gap: 9px; flex: none; }
.action-buttons { margin-left: auto; }
.action-button { display: flex; align-items: center; justify-content: center;
  gap: 9px; height: 36px; min-width: 100px; padding: 0 15px;
  border-radius: 3px; font-size: 12px; font-weight: 610; }
.action-button svg { width: 15px; height: 15px; }
.record-button { background: #303237; border: 1px solid #5b5e66; }
.record-button:hover { background: #3e4148; }
.record-button.active { background: #523035; border-color: #af6066; }
.live-button { min-width: 142px; background: #5b83bc; color: #fff;
  border: 1px solid #729bd4; }
.live-button:hover { background: #6b95cf; }
.live-button.active { background: #813a41; border-color: #b6535e; }
.live-button.active:hover { background: #9d4650; }
.toast { position: fixed; z-index: 200; bottom: 75px; right: 15px;
  max-width: min(400px, calc(100vw - 30px)); padding: 10px 14px;
  font-size: 12px; background: #32353a; color: #f1f1f1;
  border: 1px solid #676b73; border-left: 3px solid #7fa4db;
  border-radius: 3px; box-shadow: 0 7px 18px #0008; }
.toast.error { border-left-color: var(--live); }

/* Compact desktop and tablet */
@media (max-width: 1400px) {
  .app-header { grid-template-columns: 214px minmax(0,1fr) auto; }
  .workspace { grid-template-columns: 214px minmax(0,1fr) 290px; }
  .header-actions { gap: 11px; padding: 0 12px; }
  .monitor-metrics { gap: 9px; }
}
@media (max-width: 1080px) {
  .app-header { grid-template-columns: 215px minmax(0,1fr) auto; }
  .workspace { grid-template-columns: 215px minmax(0,1fr); }
  .right-panel { position: fixed; z-index: 50; top: 50px; bottom: 64px; right: 0;
    width: min(370px,92vw); transform: translateX(105%);
    transition: transform .18s ease; border-left: 1px solid #656b73;
    box-shadow: -12px 0 26px #0007; }
  body.output-open .right-panel { transform: translateX(0); }
  body.output-open:before { content: ""; position: fixed; z-index: 49;
    inset: 50px 0 64px; background: #0009; }
  .top-settings-button { display: inline-flex; }
  .close-output { display: inline-flex; transform: rotate(90deg); }
  .monitor-metrics > span:nth-child(2) { display: none; }
}
@media (max-width: 720px) {
  html, body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  .studio-app { display: flex; flex-direction: column; height: auto;
    min-height: 100vh; padding-bottom: 64px; }
  .app-header { display: grid; height: 82px; min-height: 82px;
    grid-template-columns: 1fr auto; grid-template-rows: 43px 39px;
    padding: 0 12px; }
  .brand { grid-row: 1; grid-column: 1; padding: 0; border: 0; }
  .brand-title { font-size: 14px; }
  .header-actions { grid-row: 1; grid-column: 2; padding: 0; }
  .header-api, .header-clock { display: none; }
  .top-settings-button { display: inline-flex; font-size: 11px;
    padding: 6px 9px; }
  .project-display { grid-row: 2; grid-column: 1/-1;
    border-top: 1px solid var(--line-soft); padding: 0; }
  .project-meta input { font-size: 12px; }
  .workspace { display: flex; flex-direction: column; }
  .center-panel { order: 0; grid-template-rows: 40px auto 38px 34px auto; }
  .center-panel:not(.streaming) {
    grid-template-rows: 40px auto 38px auto;
  }
  .monitor-header { padding: 0 11px; }
  .monitor-stage { min-height: 240px; padding: 12px; }
  .stage-canvas-wrap { width: 100%; height: auto; aspect-ratio: 16/9; }
  .monitor-footer, .delivery-strip { padding: 0 11px; }
  .monitor-status > span:last-child { display: none; }
  .monitor-metrics span:nth-child(1) { display: none; }
  .delivery-counter { display: none; }
  .mixer-panel { min-height: 195px; }
  .mixer-channels { grid-template-columns: 1fr; }
  .mixer-channel { min-height: 72px; padding: 10px 12px; }
  .mixer-channel + .mixer-channel { border-left: 0; border-top: 1px solid var(--line-soft); }
  .left-panel { order: 1; display: grid; grid-template-rows: minmax(210px,auto);
    grid-template-columns: 1fr 1fr; min-height: 245px; }
  .left-panel > section { min-height: 245px; }
  .scenes-panel { border-bottom: 0; border-right: 1px solid var(--line); }
  .right-panel { order: 2; position: static; transform: none;
    width: 100%; min-height: 450px; max-height: none; border-left: 0;
    border-top: 1px solid var(--line); box-shadow: none; overflow-y: visible; }
  .right-tabs { position: static; }
  .output-panel { flex: none; overflow-y: visible; min-height: 0; }
  .close-output, body.output-open:before { display: none; }
  .inspector-panel { min-height: 210px; }
  .action-bar { position: fixed; inset: auto 0 0; z-index: 80;
    height: 64px; gap: 7px; padding: 0 10px; }
  .action-divider, #elapsed { display: none; }
  #action-text { max-width: 92px; font-size: 11px; }
  .action-buttons { gap: 7px; }
  .action-button { min-width: 80px; height: 36px; padding: 0 10px; font-size: 11px; }
  .live-button { min-width: 112px; }
}
@media (max-width: 440px) {
  .left-panel { grid-template-columns: 1fr; grid-template-rows: 190px 260px; }
  .left-panel > section { min-height: 0; }
  .scenes-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .monitor-metrics { display: none; }
}
