/* Only modal geometry and the new charts/menu; existing editor styling is inherited. */
.studio-dialog{width:calc(100vw - 24px);max-width:none;height:calc(100dvh - 24px);max-height:none;margin:auto;padding:0;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:12px;box-shadow:0 18px 60px #0006;overflow:hidden}
.studio-dialog::backdrop{background:#080d14b8}
.studio-dialog #studio-host{height:100%;min-height:0}
.studio-dialog .studio{height:100%;min-height:0;display:grid;grid-template-rows:auto auto auto minmax(0,1fr);padding:12px}
.studio-dialog .studio-heading{margin-bottom:4px}
.studio-dialog .studio-toolbar{margin-bottom:6px;flex-wrap:wrap}
.studio-dialog .studio-layout{height:auto;min-height:0;max-height:none;grid-template-rows:minmax(0,1fr)}
.studio-dialog .studio-layout>.node-library,.studio-dialog .studio-layout>.node-inspector{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.studio-dialog .canvas-area,.studio-dialog .canvas-viewport{min-height:0}
.studio-actions-toggle svg{width:14px;height:14px}
.studio-actions-menu{position:fixed;inset:auto;margin:0;width:240px;max-width:calc(100vw - 24px);padding:6px;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:6px;box-shadow:0 8px 24px #0004;box-sizing:border-box}
.studio-actions-menu .button{display:block;width:100%;text-align:left;border:0;background:transparent;border-radius:4px}
.studio-actions-menu .button:hover,.studio-actions-menu .button:focus-visible{background:var(--soft)}
.studio-dialog .stream-unit-budget{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:4px 28px;padding-block:10px}
.budget-chart{min-width:0;display:grid;gap:6px}
.budget-chart-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.budget-chart-heading h2{font-size:14px;font-weight:650;letter-spacing:normal;margin:0}
.studio-dialog #stream-unit-used{font-size:12px;font-weight:400;color:var(--muted)}
.su-breakdown{display:flex;gap:1px;height:6px;border-radius:3px;overflow:hidden;background:var(--border)}
.su-breakdown span{min-width:0;height:100%}
.su-breakdown [data-su-kind=input],.su-swatch-input{background:var(--user-accent)}
.su-breakdown [data-su-kind=processor],.su-swatch-processor{background:#8cabc4}
.su-breakdown [data-su-kind=output],.su-swatch-output{background:#bda786}
.su-breakdown.is-empty{opacity:.5}
.su-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:var(--muted)}
.su-legend span{display:inline-flex;align-items:center;gap:5px}
.su-legend i{width:6px;height:6px;border-radius:2px}
.su-legend strong{font-weight:400;color:var(--text)}
.budget-scale{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted)}
.budget-scale a{color:var(--muted);text-underline-offset:3px}
.studio-dialog #studio-test-estimate{grid-column:1/-1;font-size:12px;color:var(--muted)}
.studio-dialog .studio:fullscreen{height:100dvh}
@media(max-width:1000px){.studio-dialog{overflow-y:auto}.studio-dialog .studio{height:auto;min-height:100%}.studio-dialog .studio-layout{min-height:520px;grid-template-rows:minmax(360px,1fr) auto}.studio-dialog .canvas-viewport{min-height:360px}.studio-dialog .node-inspector{max-height:360px}}
@media(max-width:600px){.studio-dialog{width:100vw;height:100dvh;border:0;border-radius:0}.studio-dialog .studio-toolbar .setup-name-label{flex:1 0 100%;max-width:none}.studio-dialog .studio-toolbar select{flex:1;min-width:0}.studio-dialog .stream-unit-budget{grid-template-columns:1fr;gap:10px}.studio-dialog .budget-chart{grid-column:1;grid-row:auto}.studio-dialog #stream-unit-total{grid-column:auto;grid-row:auto}.studio-dialog #studio-test-estimate{grid-column:1}.studio-dialog .studio-layout{grid-template-rows:auto minmax(360px,1fr) auto}.studio-dialog .studio-layout.inspector-collapsed{grid-template-rows:auto minmax(360px,1fr)}}
