#modal:has(.chart-studio){
 width:min(1220px,calc(100vw - 24px));
 max-width:none;
}
#modal:has(.chart-studio):not(:has(.settings-shell))>#modalContent{
 padding:0;
 scrollbar-gutter:stable;
}
.chart-studio{
 --studio-accent:#a7ead6;
 --studio-muted:#bacdd7;
 --studio-line:#374b54;
 background:#131d27;
 color:#f0f8fc;
}
.studio-header{
 display:flex;justify-content:space-between;align-items:end;gap:12px;flex-wrap:wrap;
 min-height:0;padding:19px 62px 17px 20px;border-bottom:1px solid var(--studio-line);
 background:radial-gradient(ellipse at 2% 0%,#284640 0,transparent 58%),#16222c;
}
.chart-studio .studio-header h2{margin:4px 0 5px;font-size:clamp(26px,4vw,36px);line-height:1.04;letter-spacing:-.02em}
.chart-studio .studio-header p{margin:0;color:#ceddeb;font-size:.86rem;overflow-wrap:anywhere}
.studio-header>div:first-child{flex:1 1 190px;min-width:0}
.studio-metrics{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:.77rem}
.studio-metrics>span{display:inline-flex;padding:5px 8px;border:1px solid #405d64;border-radius:20px;color:#dcf7ee;white-space:nowrap;background:#13242d}
.studio-seeds,.studio-tools,.studio-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.chart-studio button{white-space:nowrap;min-height:36px;padding:6px 11px;font-size:.81rem}
.chart-studio button.primary{width:auto}
.chart-studio button[aria-pressed=true]{border:1px solid var(--studio-accent);background:#25464c;color:#e2fff7}
.chart-studio :is(button,input,canvas,summary):focus-visible{outline:2px solid #a7ead6;outline-offset:2px}
.chart-studio button:disabled{opacity:.52}
.studio-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,280px);gap:14px;padding:14px 18px;align-items:start}
.studio-timeline,.studio-panel{border:1px solid var(--studio-line);border-radius:11px;background:#18242e;min-width:0}
.studio-timeline{padding:12px;display:grid;align-content:start;gap:9px}
.studio-toolbar,.studio-transport{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.studio-toolbar{justify-content:space-between}
.studio-toolbar>.studio-tools:first-child{padding:2px;background:#111b23;border:1px solid #314653;border-radius:8px;gap:3px}
.studio-zoom-tools{margin-inline-start:auto}
#studioTime,#studioZoomLabel{font:650 .78rem ui-monospace,monospace;color:#e0edf5;white-space:nowrap}
#studioZoomLabel{min-width:37px;text-align:center}
.studio-zoom-tools button{min-width:34px;padding-inline:5px}
.studio-canvas-wrap{overflow:hidden;border:1px solid #536872;border-radius:8px;background:#111b2b}
#studioCanvas{display:block;width:100%;height:clamp(236px,31vh,335px);touch-action:none;cursor:crosshair}
#studioCanvas:focus-visible{outline-offset:-2px}
.studio-slider{display:flex;align-items:center;gap:8px;font-size:.77rem;min-width:0;color:var(--studio-muted);white-space:nowrap}
.studio-slider input{width:100%;min-width:50px;min-height:25px;accent-color:var(--studio-accent)}
.chart-studio .studio-hint,.chart-studio .studio-panel p{margin:0;color:var(--studio-muted);font-size:.77rem;line-height:1.5}
.studio-inspector{display:grid;align-content:start;gap:8px;min-width:0}
.studio-panel{padding:10px 12px}
.studio-panel>summary{cursor:pointer;color:#e1f1f7;font-size:.85rem;font-weight:720;line-height:1.75}
.studio-panel[open]>summary{margin-bottom:10px}
.studio-panel[open]>*+*:not(summary){margin-block-start:8px}
.studio-panel .studio-selection{padding:0 0 5px}
#studioGridBadge{float:inline-end;font-size:.72rem;color:var(--studio-muted);font-weight:550}
.studio-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.studio-fields label,.studio-footer label{display:grid;gap:3px;min-width:0;font-size:.76rem;color:#d0dfe8}
.studio-fields input,.studio-fields select,#studioName{
 box-sizing:border-box;min-width:0;width:100%;min-height:36px;padding:6px 7px;border:1px solid #4e6573;border-radius:7px;
 background:#10202a;color:#f2f7fd;font:inherit;
}
.studio-fields .pf-select{width:100%}
.studio-fields .pf-select-trigger{min-block-size:36px;padding-inline:5px}
.studio-grid>.studio-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.studio-grid>.studio-fields>label:last-child{grid-column:1/-1}
.studio-note-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.studio-note-actions button{padding-inline:4px}
.studio-panel #studioApply{width:100%;border-color:#64948b}
.studio-shortcuts dl{display:grid;gap:6px;margin:0;font-size:.73rem;color:var(--studio-muted)}
.studio-shortcuts dl div{display:flex;justify-content:space-between;align-items:baseline;gap:4px;flex-wrap:wrap}
.studio-shortcuts dd{margin:0;color:#ddf0f7}
.studio-shortcuts kbd{padding:0 3px;border:1px solid #4f6571;border-radius:3px;font-size:.7rem;white-space:nowrap}
.studio-footer{position:sticky;bottom:0;display:grid;grid-template-columns:minmax(100px,235px) minmax(0,1fr) auto;gap:10px;align-items:end;padding:12px 18px;border-top:1px solid var(--studio-line);background:#15222c;z-index:1}
.chart-studio .studio-footer p{margin:0;align-self:center;font-size:.79rem;color:#e1edf4;line-height:1.4;overflow-wrap:anywhere}
.studio-actions{justify-content:end}
.studio-discard:not([hidden]){display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:0 18px 10px;padding:9px 10px;border:1px solid #b78e58;border-radius:8px;background:#3c3240;color:#fff4db;font-size:.83rem}
@media(max-width:859px){
 .studio-workspace{grid-template-columns:minmax(0,1fr);padding:11px}
 .studio-inspector{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
 .studio-footer{padding:10px;grid-template-columns:minmax(0,1fr) auto}
 .studio-footer>p:not(:empty){grid-area:2/1/3/-1}
 .studio-footer>p:empty{display:none}
}
@media(max-width:510px){
 #modal:has(.chart-studio){width:calc(100vw - 14px)}
 .studio-header{padding:14px 45px 13px 11px}
 .studio-timeline,.studio-panel{padding:8px}
 .studio-inspector,.studio-footer{grid-template-columns:minmax(0,1fr)}
 .studio-footer{gap:7px;padding:8px 11px}
 .studio-footer label{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:8px}
 .studio-footer>p:not(:empty){grid-area:auto}
 .studio-actions{justify-content:end}
 .studio-toolbar{gap:5px}
 .chart-studio button{font-size:.77rem;padding-inline:7px}
 #studioDuration{display:none}
 .studio-zoom-tools{gap:3px}
 .studio-zoom-tools button{min-width:27px}
}

@media(max-width:510px) and (max-height:510px){.studio-footer{position:static}}
