.content:has(.studio){max-width:none;padding:25px}.studio-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.studio-heading h1{font-size:25px;margin:0;display:flex;align-items:center;gap:15px}.studio-heading .eyebrow{margin-bottom:7px}.studio-note{font-size:11px;color:#adb6c3}.studio-toolbar{display:flex;gap:10px;align-items:end;margin-bottom:15px;flex-wrap:wrap}.setup-name-label{margin:0;flex:1;min-width:180px;max-width:300px;font-size:10px}.studio-toolbar input{height:38px;margin-top:4px}.studio select,.node-inspector select{background:#2c3036;border:1px solid #454d58;color:#d8dfe9;border-radius:6px;padding:9px;font:inherit;font-size:11px}.studio-toolbar .button,.studio-toolbar .primary{padding:9px 12px;height:38px}.studio-layout{display:grid;grid-template-columns:170px minmax(280px,1fr) 245px;border:1px solid #3b414a;border-radius:10px;overflow:hidden;min-height:580px}.node-library{padding:20px 13px;background:#25282d;border-right:1px solid #383f48;display:flex;flex-direction:column}.node-library .eyebrow{font-size:9px;letter-spacing:1px}.library-group{font-size:10px;color:#9da7b5;margin:12px 3px}.library-node{display:flex;align-items:center;gap:9px;background:#30343b;border:1px solid #454c57;color:#cbd4e0;border-radius:6px;padding:11px 9px;margin-bottom:9px;text-align:left;font-size:11px;cursor:grab}.library-node:hover{border-color:var(--user-border)}.library-node svg{width:15px;height:15px;color:var(--user-soft)}.drag-dots{margin-left:auto;color:#778291}.library-tip,.library-foot{font-size:10px;color:#8e99a9;line-height:1.7}.library-foot{margin-top:auto;padding-top:20px;border-top:1px solid #3b414a}.canvas-area{min-width:0;display:flex;flex-direction:column;background:#1e2227}.canvas-viewport{flex:1;position:relative;min-height:540px;overflow:hidden;background-image:radial-gradient(#3a424d .7px,transparent .7px);background-size:20px 20px;touch-action:none;cursor:grab}.canvas-world{position:absolute;width:2000px;height:1400px;transform-origin:0 0;pointer-events:none}.canvas-nodes{position:absolute;inset:0;pointer-events:none}.canvas-edges{position:absolute;inset:0;overflow:visible;pointer-events:none}.route-edge{fill:none;stroke:var(--user-accent);stroke-width:3;opacity:.7;pointer-events:stroke;cursor:pointer;outline:none}.route-edge:hover,.selected-edge,.route-edge:focus{opacity:1;stroke-width:5}.preview-edge{stroke-dasharray:7 5;pointer-events:none}.route-node{position:absolute;width:220px;height:144px;background:#2b3037;border:1px solid #495462;border-radius:9px;pointer-events:auto;cursor:grab;box-shadow:0 5px 15px #0002;outline:none}.selected-node,.route-node:focus{border-color:var(--user-accent);box-shadow:0 0 0 1px var(--user-border)}.node-header{height:40px;display:flex;align-items:center;gap:8px;padding:10px 13px}.node-header svg{width:16px;height:16px;color:var(--user-soft)}.node-header strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:550}.node-type-tag{font-size:8px;color:#98a6b9;margin-left:auto;flex-shrink:0}.node-preview{height:65px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:#242930;margin:0 12px;border-radius:5px;color:#8190a4;font-size:9px}.node-preview svg{width:21px;height:21px;opacity:.6}.node-footer{display:flex;justify-content:space-between;padding:10px 13px;font-size:8px;color:#adb7c6}.node-footer span:last-child{color:#8291a4}.node-port{position:absolute;width:15px;height:15px;background:var(--user-accent);border:3px solid #242a32;border-radius:50%;top:64px;cursor:crosshair;padding:0;box-shadow:0 0 0 1px var(--user-border)}.out-port{right:-8px}.in-port{left:-8px}.node-port:hover,.node-port:focus{box-shadow:0 0 0 4px var(--user-border)}.canvas-empty{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;width:90%;max-width:330px;cursor:default}.canvas-empty[hidden]{display:none}.canvas-empty>div{color:var(--user-soft);margin-bottom:18px}.canvas-empty svg{width:42px;height:42px}.canvas-empty h2{font-size:18px}.canvas-empty p{font-size:12px;color:#a1adbd}.canvas-empty small{display:block;font-size:9px;color:#8a97a8;margin-top:15px}.canvas-controls{position:absolute;bottom:16px;left:16px;display:flex;align-items:center;background:#2b3139;border:1px solid #465160;border-radius:7px;overflow:hidden;font-size:10px;cursor:default}.canvas-controls button{border:0;background:none;padding:9px 12px;color:#d0d9e7;font-size:11px}.canvas-controls button:hover{background:#414b59}.canvas-controls span{min-width:35px;text-align:center}.canvas-status{display:flex;justify-content:space-between;gap:10px;border-top:1px solid #3b414b;padding:10px 14px;color:#9eacbe;font-size:9px}.connection-hint{position:absolute;top:15px;left:15px;right:15px;text-align:center;color:var(--user-soft);font-size:10px;pointer-events:none}.connection-hint:not(:empty){background:#2d353e;border:1px solid #485365;padding:10px;border-radius:6px}.node-inspector{padding:20px 17px;background:#282c32;border-left:1px solid #3b414a;font-size:11px}.node-inspector .eyebrow{font-size:9px;letter-spacing:1px;margin-bottom:12px}.node-inspector h2{font-size:17px;margin-bottom:22px}.node-inspector h3{font-size:11px;margin-top:22px}.node-inspector label{font-size:10px;margin-bottom:16px}.node-inspector input{height:36px;font-size:11px}.node-inspector select{width:100%;display:block;margin-top:8px}.inspector-note{color:#a1aebe;font-size:10px;line-height:1.8}.node-connections{margin-bottom:20px}.node-connections p{font-size:10px;color:#91a0b3}.connection-item{display:flex;justify-content:space-between;align-items:center;width:100%;background:#303741;border:1px solid #444f5f;border-radius:5px;color:#becadc;padding:8px;margin-bottom:6px;font-size:10px}.connection-item svg{width:12px;height:12px}.validation-panel{border-top:1px solid #414955;margin-top:25px;padding-top:15px}.validation-panel>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:5px}.validation-panel h3{margin:0}.validation-panel .small-button{font-size:9px;padding:5px}.validation-panel ul{padding-left:15px;color:#c3b18e;font-size:10px}.validation-panel li{margin-bottom:8px}.validation-panel p{font-size:10px;color:#96a4b7;line-height:1.7}.validation-panel .routes-valid{color:var(--user-soft)}.inspector-legend{display:flex;gap:9px;align-items:center;font-size:10px;color:#a6b3c5;margin-top:25px}.inspector-legend span{width:25px;height:2px;background:var(--user-accent)}.studio-help{font-size:10px;color:#8d9aab;margin:14px 0 0}.saving-canvas{pointer-events:none;opacity:.7}@media(max-width:1350px){.studio-layout{grid-template-columns:145px minmax(220px,1fr) 210px}.content:has(.studio){padding:20px 15px}.node-library{padding:18px 10px}.library-node{font-size:10px;gap:6px;padding:10px 7px}.node-inspector{padding:18px 12px}.studio-note{max-width:180px}}@media(max-width:1000px){.studio-layout{grid-template-columns:130px minmax(220px,1fr)}.node-inspector{grid-column:1/-1;border-left:0;border-top:1px solid #3b414a;display:grid;grid-template-columns:1fr 1fr;gap:25px}.validation-panel{border:0;margin:0;padding:0}.canvas-viewport{min-height:440px}.studio-note{display:none}}@media(max-width:600px){.studio-layout{grid-template-columns:1fr}.node-library{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;border-right:0;border-bottom:1px solid #383f48;padding:12px}.node-library .eyebrow,.library-group,.library-tip,.library-foot{display:none}.library-node{margin:0}.drag-dots{display:none}.node-inspector{grid-template-columns:1fr}.studio-toolbar select{max-width:180px}.studio-heading h1{font-size:22px}.studio-heading .badge{font-size:8px}.canvas-viewport{min-height:400px}}

.relay-panel{border-top:1px solid #414955;margin-top:20px;padding-top:8px}.relay-panel p{font-size:10px;color:#a3b0c2;line-height:1.7}.relay-actions{display:flex;gap:8px;margin:12px 0}.relay-panel input{font-size:9px}.relay-panel label{font-size:9px}
.canvas-viewport{overflow:clip}.canvas-world{top:0;left:0}
.node-preview .signal-label{display:flex;align-items:center;gap:5px;color:#bac4cf;font-size:10px}.signal-label i{width:5px;height:5px;border-radius:50%;background:#8793a0}.signal-connected i{background:var(--user-accent)}.signal-stalled i{background:#c8a568}.node-preview .signal-format{font-size:9px;color:#b4bfcc}.node-preview .signal-bitrate{font-size:9px;color:#97a6b7}.test-pattern-preview{background:linear-gradient(90deg,#bdbdbd22 0% 14%,#b7ad5822 14% 28%,#579b9c22 28% 42%,#659b6922 42% 56%,#9d699c22 56% 70%,#9e646322 70% 84%,#64749c22 84%);gap:5px}

.relay-actions[hidden]{display:none}
/* Control Desk routing editor: retain canvas coordinates and all node interactions. */
@media(min-width:1001px){.studio-layout{grid-template-columns:140px minmax(280px,1fr) 255px;min-height:560px}.canvas-viewport{min-height:520px}.node-inspector{padding:16px}.node-library{padding:16px 10px}.studio-heading{margin-bottom:14px}.studio-toolbar{gap:8px}.node-inspector h2{margin-bottom:16px}.node-inspector label{margin-bottom:12px}.output-profile-settings{margin:14px 0;padding:12px 0}.node-inspector .inspector-note{line-height:1.55}}
/* Keep desktop geometry independent of the selected node's settings length. */
@media(min-width:1001px){
  .studio-layout{height:clamp(440px,calc(100dvh - 340px),850px);min-height:0;grid-template-rows:minmax(0,1fr)}
  .studio-layout>.node-inspector{min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
  .studio-layout>.node-library{min-height:0;overflow-y:auto}
  .studio-layout>.canvas-area{min-height:0}
  .studio-layout .canvas-viewport{min-height:0}
}
.studio-layout{overflow-anchor:none}
/* Roomier editor and compact nodes, with geometry shared by studio.js. */
.route-node{width:184px;height:104px;border-radius:6px}.node-header{height:30px;padding:7px 10px;gap:6px}.node-header strong{font-size:11px}.node-header svg{width:13px;height:13px}.node-preview{height:48px;margin:0 8px;gap:3px;font-size:8px}.node-preview .signal-label{font-size:9px}.node-preview .signal-format,.node-preview .signal-bitrate{font-size:8px}.node-footer{padding:6px 9px;font-size:7px}.node-footer span:last-child{display:none}.node-port{width:15px;height:15px}.node-inspector[hidden]{display:none}.canvas-controls button{padding:8px 10px;white-space:nowrap}.studio-help{display:none}.studio:fullscreen{background:var(--bg);padding:16px;overflow:auto}.studio:fullscreen .studio-layout{height:calc(100dvh - 125px);max-height:none}.studio:fullscreen .studio-heading{display:none}
@media(min-width:1001px){.content:has(.studio){padding:12px 18px}.workspace-main:has(.studio)>.topbar{height:36px}.workspace-main:has(.studio)>footer{display:none}.studio-heading{margin-bottom:8px}.studio-heading .eyebrow{display:none}.studio-heading h1{font-size:22px}.studio-toolbar{margin-bottom:10px}.studio-layout{grid-template-columns:126px minmax(280px,1fr) 255px;height:clamp(440px,calc(100dvh - 210px),1100px)}.studio-layout.inspector-collapsed{grid-template-columns:126px minmax(280px,1fr)}.node-library{padding:12px 9px}.library-node{padding:9px 7px;margin-bottom:7px}.library-foot{font-size:9px}.studio-note{font-size:10px}}
@media(max-width:1000px){.studio-layout.inspector-collapsed{grid-template-columns:130px minmax(220px,1fr)}}
@media(max-width:600px){.studio-layout.inspector-collapsed{grid-template-columns:1fr}.canvas-controls{left:8px;bottom:8px}.canvas-controls button{padding:8px 6px;font-size:9px}}
.editor-rehearsal{position:absolute;z-index:8;right:14px;bottom:62px;width:350px;max-width:calc(100% - 28px);background:#20272b;border:1px solid #465354;border-radius:9px;box-shadow:0 8px 24px #0006;overflow:hidden}.rehearsal-toolbar{padding:10px 12px;border-bottom:1px solid #394448}.rehearsal-toolbar h2{font-size:13px;margin:0 0 4px}.rehearsal-toolbar .field-note{font-size:9px}.rehearsal-toolbar>div:last-child{display:flex;gap:6px;margin-top:8px}.rehearsal-toolbar button{font-size:10px;padding:7px 9px}.rehearsal-body{padding:10px}.rehearsal-body[hidden]{display:none}.preview-picture{background:#111719;min-height:130px;display:flex;align-items:center;justify-content:center;color:#a8b8bd;font-size:11px;border-radius:5px;overflow:hidden}.preview-picture img{width:100%;max-height:180px;object-fit:contain}.preview-picture img[hidden],.preview-picture span[hidden]{display:none}.rehearsal-info{padding-top:8px}.rehearsal-info>strong{font-size:11px}.rehearsal-info p{font-size:10px;margin:5px 0}.rehearsal-info .field-note{font-size:9px;line-height:1.4}.rehearsal-info label{display:block;font-size:10px;margin-top:8px}.rehearsal-info input{width:100%;padding:6px 8px;margin:4px 0;font-size:10px}.rehearsal-info .small-button{margin-top:3px;padding:5px 8px}.editor-rehearsal:has(.rehearsal-body[hidden]) .rehearsal-toolbar{border-bottom:0}
.editor-rehearsal{max-height:calc(100% - 80px);overflow:auto;overscroll-behavior:contain}.rehearsal-toolbar{cursor:move;position:sticky;top:0;background:#20272b;z-index:1}.rehearsal-toolbar button{cursor:pointer}
.preview-output-label{display:flex;align-items:center;gap:10px;padding:8px 12px;font-size:10px;border-bottom:1px solid #394448}.preview-output-label select{min-width:0;flex:1;padding:6px;font-size:11px}
.preview-picture video{width:100%;max-height:200px;object-fit:contain}.preview-picture video[hidden]{display:none}[data-preview-sound]{margin-top:6px}

.editor-rehearsal [hidden]{display:none!important}.preview-connection{margin-top:8px;border-top:1px solid #394448;padding-top:8px}.preview-connection summary{cursor:pointer;font-size:10px;color:var(--muted)}

.editor-rehearsal:has(.rehearsal-body[hidden]){width:245px}.editor-rehearsal:has(.rehearsal-body[hidden]) .preview-output-label,.editor-rehearsal:has(.rehearsal-body[hidden]) [data-rehearsal-stop]{display:none}.editor-rehearsal:has(.rehearsal-body[hidden]) .rehearsal-toolbar{padding:8px 10px}

.editor-rehearsal:has(.rehearsal-body[hidden]){width:270px}.editor-rehearsal:has(.rehearsal-body[hidden]) .rehearsal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px}.editor-rehearsal:has(.rehearsal-body[hidden]) .rehearsal-toolbar .field-note{display:none}.editor-rehearsal:has(.rehearsal-body[hidden]) .rehearsal-toolbar>div:last-child{margin-top:0}.editor-rehearsal:has(.rehearsal-body[hidden]) h2{margin:0}
.switch-node .node-preview{position:static;background:none;height:calc(100% - 53px);margin:0;display:block}.switch-port-label{position:absolute;left:14px;right:14px;display:block!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--muted);line-height:16px;text-align:left}.switch-port-label.switch-port-selected{color:var(--text);font-weight:600}.switch-node .node-footer{position:absolute;bottom:0;left:0;right:0}.switch-settings details{margin:12px 0}.switch-settings summary{cursor:pointer;color:var(--muted);font-size:11px}.switch-settings details label{margin-top:10px}.switch-buttons{display:flex;flex-wrap:wrap;gap:6px}.switch-choice{display:flex;align-items:center;gap:7px;font-size:12px;min-height:34px;padding:7px 10px}.switch-choice i{width:6px;height:6px;border-radius:50%;background:var(--muted);flex-shrink:0}.switch-choice i.input-ready{background:var(--user-soft)}.switch-choice[aria-pressed=true]{border-color:var(--user-soft);background:var(--soft);color:var(--text)}.switch-choice small{color:var(--muted);font-size:9px}.switch-heading{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px;font-size:12px}.switch-heading .field-note{margin:0}.switch-control+.switch-control{border-top:1px solid var(--border);margin-top:14px;padding-top:14px}.switch-settings .switch-buttons{flex-direction:column}.switch-settings .switch-choice{width:100%;text-align:left}.switch-settings .switch-choice small{margin-left:auto}
.splitter-node .node-preview{position:static;background:none;height:calc(100% - 53px);margin:0;display:block}.splitter-node .node-footer{position:absolute;bottom:0;left:0;right:0}.splitter-port-label{text-align:right;left:28px}.splitter-settings details{margin:12px 0}.splitter-settings summary{cursor:pointer;color:var(--muted);font-size:11px}.splitter-settings details label{margin-top:10px}
.overlay-settings details{margin:14px 0}.overlay-settings summary{cursor:pointer;color:var(--muted);font-size:11px}.overlay-settings details label{margin-top:10px}.overlay-settings>[data-overlay-refresh]{margin:8px 0 14px}.overlay-position-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}.overlay-position-fields label{min-width:0}.overlay-settings .overlay-url-toggle{margin:8px 0}.overlay-settings form input[name=url]{width:100%}
