/* FORM authoring: calm hierarchy, direct manipulation, progressive detail. */
.form-studio{--form-key-height:240px}
.form-studio .editorbody{grid-template-columns:256px minmax(180px,1fr) 318px}
.form-studio .studio-library{padding:16px 12px 0;display:flex;flex-direction:column;overflow:hidden}
.studio-layers{flex:none;max-height:34vh;overflow:auto;scrollbar-width:thin}.studio-layer-tools{flex:none;margin-bottom:12px;padding-bottom:12px}
.studio-layer-select{gap:6px}.studio-layer-select img{width:32px;height:36px}.studio-layer>.studio-button{width:24px;min-width:24px;padding:4px}.studio-layer.is-locked .studio-layer-titles{opacity:.65}
.form-catalog{overflow:auto;min-height:0;scrollbar-width:thin;padding:0 1px 18px}.form-catalog .studio-panel-heading{margin-bottom:8px}.form-catalog .studio-panel-heading>.studio-button{display:flex;margin-left:0}.form-catalog .studio-panel-heading>strong{margin-right:auto}
.form-library-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;margin-bottom:10px}.form-library-tabs .studio-button{padding:4px 2px;font-size:11px;min-width:0;height:29px;white-space:nowrap}.form-library-tabs [aria-pressed=true]{color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--bg))}
.form-catalog-search,.form-catalog select,.form-inspector-tools input,.form-inspector-tools select,.form-output-panel select,.studio-key-toolbar select,.studio-timing-mode{width:100%;color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:5px;height:32px;padding:5px 8px;font:12px Inter,sans-serif;min-width:0}
.form-catalog-search{margin-bottom:8px}.form-chips{display:flex;flex-wrap:wrap;gap:5px}.form-chips .studio-button{background:var(--soft);height:27px;font-size:11px;padding:4px 8px;min-width:0}.form-chips .studio-button[aria-pressed=true]{color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,var(--bg))}
.form-categories{margin-bottom:8px}.form-library-filters{margin:6px 0 8px;border:0}.form-library-filters summary{cursor:pointer;font:11px Inter,sans-serif;color:var(--muted);padding:5px 0}.form-library-filters select{margin-bottom:5px}.form-retain{display:flex;gap:10px;margin:8px 0}.form-retain label,.form-checks label{display:flex;align-items:center;gap:6px;font:11px Inter,sans-serif;color:var(--muted);cursor:pointer}.form-retain input,.form-checks input{accent-color:var(--accent);width:13px;height:13px}.form-catalog-count{display:block;font:11px Inter,sans-serif;color:var(--muted);margin:10px 0}.form-catalog .studio-presets{padding-bottom:10px}.form-preset-wrap{position:relative;min-width:0}.form-preset-wrap>.studio-preset{width:100%}.form-preset-favorite{position:absolute;top:5px;right:5px;z-index:2;background:color-mix(in srgb,var(--bg) 85%,transparent);border:1px solid var(--line);min-width:25px;width:25px;height:25px;padding:4px}.form-preset-favorite[aria-pressed=true]{color:var(--accent)}.form-restore-preset{font-size:11px;max-width:100%}
.form-library-collapsed .form-catalog>:not(.studio-panel-heading){display:none}.form-library-collapsed .form-catalog{overflow:visible;flex:none}.form-library-collapsed .form-catalog .studio-panel-heading{margin-bottom:0}
.form-discovery-actions{display:flex;gap:5px;margin:8px 0 2px}.form-discovery-actions .studio-button{flex:1;background:var(--soft);height:29px;font-size:11px;gap:5px}.form-discovery-actions .studio-icon{width:14px;height:14px;min-width:14px}
.form-inspector-tools{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:6px;margin-top:12px}.form-inspector-tools input{font-size:11px}.form-inspector-tools select{font-size:10px;padding:4px}.form-studio .inspector[data-scope=canvas] .form-inspector-tools,.form-studio .inspector[data-scope=canvas] .form-discovery-actions{display:none}
.form-filtered{display:none!important}.form-pin{width:22px;min-width:22px;height:22px;padding:4px;opacity:0}.form-pin .studio-icon{width:12px;height:12px;min-width:12px}.parameter-control:hover .form-pin,.form-pin:focus-visible,.form-pinned-row .form-pin{opacity:1}.form-pinned-row .form-pin{color:var(--accent)}.form-scrub-label{cursor:ew-resize;touch-action:none;user-select:none}.parameter-control[data-source=music] .control-row>label::after{content:' ♪';color:var(--accent)}.form-pinned-group:empty{display:none}
.form-studio .scene-rotation[open]{display:block}.form-studio .scene-rotation .parameter-head{display:flex}.form-studio .scene-rotation .parameter-track{display:grid;grid-template-columns:28px minmax(0,1fr) 28px;flex-wrap:nowrap;gap:7px}.form-studio .scene-rotation .parameter-reset{margin:0}.form-studio .scene-rotation .scene-control{margin-bottom:12px}
.form-section-caption{display:block;font:500 11px Inter,sans-serif;color:var(--muted);margin-bottom:9px}.form-motion-recipes{padding:14px 0;border-bottom:1px solid var(--line)}.form-audio-quick{padding-top:12px}.form-motion-recipes .form-chips .studio-button{height:29px}.form-macros .form-range{margin-top:14px}.form-range{display:grid;gap:7px;font:12px Inter,sans-serif}.form-range-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.form-range input[type=number]{width:64px;min-width:0;border:1px solid var(--line);border-radius:4px;background:var(--bg);color:var(--text);height:28px;padding:4px;font:12px Inter,sans-serif}.form-range input[type=range]{width:100%;accent-color:var(--accent)}
.form-output-panel{display:grid;gap:12px;padding:8px 0 20px;border-bottom:1px solid var(--line);margin-bottom:16px;font:12px Inter,sans-serif}.form-output-panel>strong{font-weight:550}.form-aspect-presets{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.form-aspect-presets .studio-button{height:56px;flex-direction:column;gap:6px;font-size:10px;border:1px solid var(--line);padding:7px 3px}.form-aspect-presets i{display:block;height:19px;max-width:35px;border:1px solid currentColor;border-radius:1px}.form-palette{display:flex;gap:8px;padding:14px 0;border-bottom:1px solid var(--line)}.form-palette .studio-button{background:var(--swatch-paper);border:1px solid var(--line);width:38px;min-width:38px;height:28px}.form-palette .studio-button::before{content:'';width:15px;height:15px;border:2px solid var(--swatch);border-radius:50%}
.form-viewport-tools{position:absolute;z-index:9;bottom:13px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:2px;padding:4px;border:1px solid var(--line);border-radius:8px;background:color-mix(in srgb,var(--bg) 92%,transparent);box-shadow:0 4px 16px #00000010;white-space:nowrap}.form-viewport-tools .studio-button{width:29px;min-width:29px;height:30px;padding:5px}.form-viewport-tools .studio-button[aria-pressed=true]{color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--bg))}.form-viewport-tools .studio-button:has(span+span){width:auto;min-width:62px;font-size:10px}.form-studio .studio-stage-actions{left:10px;bottom:55px;gap:2px}.studio-viewport-hint{display:none!important}#formCanvasFormat{display:flex;margin-left:auto}.studio-stage-title small{max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stage[data-tool=move],.stage[data-tool=select] #paper{cursor:move}.stage[data-tool=rotate] #paper{cursor:grab}.stage[data-tool=scale] #paper{cursor:nwse-resize}.stage[data-tool=view]{cursor:grab}.form-selection-frame{position:absolute;z-index:6;border:1px solid color-mix(in srgb,var(--accent) 60%,transparent);pointer-events:none}.form-selection-frame[hidden]{display:none}.form-selection-frame>.studio-button{position:absolute;min-width:10px;width:10px;height:10px;padding:0;border:1px solid var(--accent);border-radius:2px;background:var(--bg);pointer-events:auto;cursor:nwse-resize}.form-selection-frame [data-corner=nw]{left:-5px;top:-5px}.form-selection-frame [data-corner=ne]{right:-5px;top:-5px;cursor:nesw-resize}.form-selection-frame [data-corner=se]{right:-5px;bottom:-5px}.form-selection-frame [data-corner=sw]{left:-5px;bottom:-5px;cursor:nesw-resize}.form-selection-frame>.form-rotate-handle{width:23px;min-width:23px;height:23px;top:-30px;left:calc(50% - 12px);border-radius:50%;cursor:grab}.form-rotate-handle .studio-icon{width:12px;height:12px;min-width:12px}.form-selection-frame[data-tool=view],.form-selection-frame[data-tool=rotate]{border-color:transparent}.form-selection-frame[data-tool=view]>*,.form-selection-frame[data-tool=rotate]>*{visibility:hidden}
.form-guides{display:none;position:absolute;inset:0;pointer-events:none;z-index:5}.form-show-guides .form-guides{display:block}.form-guides i{position:absolute;left:50%;top:0;bottom:0;border-left:1px dashed color-mix(in srgb,var(--accent) 30%,transparent)}.form-guides i+i{top:50%;left:0;right:0;bottom:auto;border:0;border-top:1px dashed color-mix(in srgb,var(--accent) 30%,transparent)}.form-canvas-text{position:absolute;z-index:20;width:min(75%,540px);min-height:120px;max-height:65%;padding:15px;border:1px solid var(--accent);border-radius:5px;color:var(--text);background:var(--bg);font:24px/1.3 Inter,sans-serif;resize:vertical;box-shadow:0 8px 50px #0004}
.form-timeline-resize{position:absolute;left:0;right:0;top:-4px;height:8px;z-index:10;cursor:ns-resize;touch-action:none}.form-timeline-resize:hover::after,.form-timeline-resize:focus-visible::after{content:'';position:absolute;left:calc(50% - 22px);width:44px;top:3px;height:2px;border-radius:2px;background:var(--accent)}.form-studio .studio-timeline.curves-open .curve-editor{height:var(--form-key-height);max-height:58dvh;min-height:180px;grid-template-columns:176px minmax(0,1fr)}.form-studio .studio-timeline.studio-no-key.curves-open .curve-editor{height:96px;min-height:96px}.studio-key-toolbar select{width:140px;height:27px;font-size:11px;flex:none}.studio-key-channels>.muted{opacity:.55}.studio-timing-mode{margin-bottom:14px}.studio-output-fields>label:has(#size){display:none}.studio-output-fields{grid-template-columns:90px}.studio-key-graph-wrap{isolation:isolate}
.form-dialog,.studio-name-dialog{color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:12px;box-shadow:0 30px 100px #0008;padding:22px;width:min(670px,calc(100vw - 28px));max-height:85dvh;overflow:auto;font:13px/1.5 Inter,sans-serif}.form-dialog::backdrop,.studio-name-dialog::backdrop{background:#0007;backdrop-filter:blur(5px)}.form-dialog h2,.studio-name-dialog h2{font:550 20px Inter,sans-serif;letter-spacing:-.02em;margin:0}.form-dialog h3{font-size:13px;font-weight:550;margin:18px 0 10px}.form-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.form-dialog-note{color:var(--muted);font-size:12px;line-height:1.6;margin:12px 0}.form-dialog-actions,.studio-dialog-actions{display:flex;align-items:center;gap:7px}.form-checks{display:flex;flex-wrap:wrap;gap:12px}.form-checks label{font-size:12px}.form-variation-controls{display:grid;gap:15px;margin-bottom:18px}.form-variation-controls>.studio-button{justify-self:start;background:var(--soft)}.form-variation-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.form-variation-card{display:flex;flex-direction:column;gap:8px;color:var(--text);background:none;border:1px solid var(--line);border-radius:7px;padding:8px;min-width:0;cursor:pointer;font:12px Inter,sans-serif}.form-variation-card:hover{border-color:var(--accent)}.form-variation-card img{width:100%;aspect-ratio:1;object-fit:contain;background:var(--soft)}.form-project-list{display:grid;gap:8px}.form-project-card{display:flex;align-items:center;gap:5px;border:1px solid var(--line);border-radius:7px;padding:6px}.form-project-card>.studio-button:first-child{flex:1;justify-content:flex-start;height:auto;text-align:left;min-width:0;color:var(--text)}.form-project-card img{width:65px;height:54px;object-fit:contain;background:var(--soft);border-radius:4px}.form-project-card span{display:grid;gap:5px}.form-project-card strong{font-size:13px;font-weight:500}.form-project-card small{font-size:11px;color:var(--muted)}.form-version-row{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:10px 0}.studio-name-dialog{width:min(360px,calc(100vw - 28px))}.studio-name-dialog form{display:grid;gap:20px}.studio-name-dialog label{display:grid;gap:7px;color:var(--muted);font-size:12px}.studio-name-dialog input{width:100%;font:14px Inter,sans-serif;background:var(--soft);color:var(--text);border:1px solid var(--line);padding:10px;border-radius:5px}.studio-dialog-actions{justify-content:flex-end}.studio-dialog-actions button:last-child{background:var(--text);color:var(--bg);padding:7px 14px}
.form-context-menu{position:fixed;z-index:500;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:7px;box-shadow:0 10px 35px #0005;padding:5px;display:grid;min-width:185px}.form-context-menu .studio-button{justify-content:flex-start;font-size:12px;height:31px}.form-export-tools{display:flex;align-items:center;gap:6px;margin:0 0 16px}.form-export-tools select{flex:1;min-width:0;background:var(--bg);color:var(--text);border:1px solid var(--line);padding:7px;border-radius:5px;font:12px Inter,sans-serif}.form-export-tools .studio-button{font-size:11px}.form-batch>.studio-button{margin-right:8px}.form-studio #formRepeatExport{height:32px}
@media(min-width:1600px){.form-studio .editorbody{grid-template-columns:280px minmax(200px,1fr) 338px}.form-studio .scene-control .control-row>label,.form-studio .scene-control .parameter-number{font-size:13px}}
@media(max-width:1200px){.form-studio .editorbody{grid-template-columns:224px minmax(160px,1fr) 296px}.form-viewport-tools{left:14px;transform:none;gap:0}.form-viewport-tools .studio-button{width:27px;min-width:27px}.form-viewport-tools .studio-button:nth-child(7){display:none}.form-library-tabs .studio-button{font-size:10px}.form-retain{gap:5px;font-size:10px}}
@media(max-width:1000px){.form-studio .editorbody{grid-template-columns:minmax(180px,1fr) 300px}.form-studio .studio-library{display:none}.form-studio.studio-library-open .studio-library{display:flex;width:270px;z-index:41}.studio-layers{max-height:35vh}.form-viewport-tools{left:50%;transform:translateX(-50%)}.form-studio .viewport-gizmo{bottom:58px}.form-studio .studio-stage-actions{bottom:58px}.form-studio .studio-timeline.curves-open .curve-editor{grid-template-columns:155px minmax(0,1fr)}}
@media(max-width:700px){.form-studio .editorbody{display:grid}.form-studio .stage{height:100%;padding:55px 16px 74px}.form-studio .topbar{padding:0 10px;gap:7px}.form-studio .topbar .brand-name{font-size:21px!important}.studio-file-actions{padding-right:4px;margin-right:0;gap:0}.studio-file-actions .studio-button{min-width:29px;width:29px;padding:5px}.form-studio #formRepeatExport,.form-studio #studioOpen,.form-studio #studioRedo{display:none}.form-studio #exportOpen{padding:5px 8px;margin-left:3px;gap:4px}.form-studio .topbar .header-icon{min-width:29px;width:29px}.form-studio .studio-timeline.curves-open .curve-editor{grid-template-columns:112px minmax(0,1fr);height:var(--form-key-height);max-height:60dvh;min-height:180px}.form-studio .inspector{padding-bottom:40px}.form-selection-frame>.studio-button{min-width:14px;width:14px;height:14px}.form-selection-frame>.form-rotate-handle{width:26px;height:26px}.form-viewport-tools{bottom:14px;gap:1px;max-width:calc(100% - 16px)}.form-viewport-tools .studio-button{min-width:30px;width:30px;height:32px}.form-viewport-tools .studio-button:nth-child(6),.form-viewport-tools .studio-button:nth-child(7),.form-viewport-tools .studio-button:last-child{display:none}.form-studio .viewport-gizmo{bottom:65px;right:8px}.form-studio .studio-stage-actions{bottom:66px;left:8px;flex-direction:column;align-items:flex-start}.form-studio .studio-stage-actions>.btn{height:27px;min-height:27px}.form-dialog{padding:16px}.form-variation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.form-pin{opacity:.55}.form-inspector-tools select{font-size:11px}.form-library-tabs .studio-button{font-size:11px}}
@media(prefers-reduced-motion:reduce){.form-studio *{scroll-behavior:auto!important;transition:none!important}}
.form-categories{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding-bottom:3px;gap:4px}.form-categories .studio-button{flex:none}.form-library-filters .form-retain{margin:9px 0}.form-studio .studio-key-channels>.is-muted{opacity:.5}.form-studio .stage:focus{outline:none}.form-studio .stage:focus-visible{outline:1px solid var(--accent);outline-offset:-1px}
.form-studio.scene-workspace .scene-rotation .control-row{display:flex}.form-studio .scene-rotation .control-row>label{display:block}.form-studio .scene-rotation .parameter-head{justify-content:flex-end}
@media(max-width:700px){.form-studio .editorbody{grid-template-columns:minmax(0,1fr)}.form-studio .stage,.form-studio .inspector{grid-column:1}.form-studio .inspector{min-height:0;max-height:100%;overflow:auto}.form-studio .studio-inspector-head{position:relative}}
.form-studio #random{display:none!important}.inspector[data-tab=MOTION] .studio-construction-row,.inspector[data-tab=MOTION] .form-discovery-actions,.inspector[data-tab=STYLE] .studio-construction-row,.inspector[data-tab=STYLE] .form-discovery-actions{display:none}.form-categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible;gap:4px}.form-categories .studio-button{padding:4px 3px;font-size:10px}

/* Composition tools sit alongside Layer, with independent scrolling and real pattern previews. */
.form-studio .inspector:not([data-scope="layer"])>.inspector-tabs,
.form-studio .inspector:not([data-scope="layer"])>#controls,
.form-studio .inspector:not([data-scope="layer"]) .studio-layer-name,
.form-studio .inspector:not([data-scope="layer"]) .studio-construction-row,
.form-studio .inspector:not([data-scope="layer"]) .form-inspector-tools,
.form-studio .inspector:not([data-scope="layer"]) .form-discovery-actions{display:none!important}
.studio-effects-panel[hidden],.studio-pattern-panel[hidden],.studio-canvas-panel[hidden]{display:none!important}
.form-studio .studio-scope{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px}
.form-studio .studio-scope .studio-button{padding:5px 3px;font-size:12px;min-width:0;height:34px}
.studio-pattern-panel .finish-section,.studio-effects-panel .finish-section{border-top:0}
.finish-pattern-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:10px 0 18px}
.finish-pattern-tile{appearance:none;display:flex;flex-direction:column;gap:5px;padding:5px 5px 8px;border:1px solid var(--line);border-radius:5px;background:var(--bg);color:var(--text);min-width:0;cursor:pointer;font:12px Inter,sans-serif}
.finish-pattern-tile svg{width:100%;height:53px;background:var(--soft);color:var(--text);border-radius:2px}
.finish-pattern-tile[aria-pressed="true"]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);color:var(--accent)}
.finish-pattern-tile:hover{border-color:var(--text)}
.finish-pattern-tile:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.finish-effect-head .finish-switch span{font-size:14px}
.music-impact-actions{display:flex;gap:6px;flex-wrap:wrap;margin:9px 0}
.music-impact-actions button{font:12px Inter,sans-serif;padding:7px 9px;border:1px solid var(--line);border-radius:4px;background:var(--bg);color:var(--text);cursor:pointer}
.music-impact-actions button:first-child{color:var(--accent)}
@media(max-width:700px){.studio-mobile-tabs{overflow-x:auto;justify-content:flex-start}.studio-mobile-tabs .studio-button{flex:0 0 auto;min-width:51px;padding:4px 6px}.finish-pattern-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

.finish-flat{padding:0;border:0;margin:0}
.finish-flat>.finish-pattern-grid{margin-top:4px}
.finish-effect-tile>span{min-height:28px;display:flex;align-items:center;justify-content:center;line-height:14px}
.finish-effect-title{font:500 14px Inter,sans-serif;margin:20px 0 14px}
.finish-raster-note{font:12px/1.5 Inter,sans-serif;color:var(--muted);margin:-4px 0 16px}
.finish-flat .finish-common{padding-top:16px;border-top:1px solid var(--line)}

/* All global actions share one settings menu in the upper-right corner. */
.form-studio .topbar .top-right{position:relative}
.form-studio .topbar #formSettings{width:40px;height:40px;min-width:40px;min-height:40px;max-width:40px;max-height:40px}
.form-studio .topbar #formSettings[aria-expanded="true"]{color:var(--text);background:var(--soft);border-color:var(--line)}
#formHeaderActions[hidden],#formSettingsMenu[hidden]{display:none!important}
.form-settings-menu{position:absolute;right:0;top:calc(100% + 10px);z-index:110;width:292px;max-width:calc(100vw - 24px);max-height:calc(100dvh - var(--header) - 18px);overflow-y:auto;padding:6px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--text);box-shadow:0 12px 35px #0003}
.form-studio .topbar #formSettingsMenu>.form-settings-item{appearance:none;display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;min-width:0;max-width:none;height:auto;min-height:39px;padding:9px 10px;margin:0;border:0;border-radius:4px;background:transparent;color:var(--text);text-align:left;font:400 14px/1.4 Inter,sans-serif;letter-spacing:0;text-transform:none;cursor:pointer;box-shadow:none;transform:none}
.form-studio .topbar #formSettingsMenu>.form-settings-item:hover,.form-studio .topbar #formSettingsMenu>.form-settings-item:focus-visible{background:var(--soft);outline:none;color:var(--accent)}
.form-studio .topbar #formSettingsMenu>.form-settings-item:disabled{opacity:.35;cursor:default;color:var(--muted);background:transparent}
.form-settings-item>.studio-icon{flex:none;color:var(--muted)}
.form-settings-item:hover>.studio-icon,.form-settings-item:focus-visible>.studio-icon{color:currentColor}
.form-settings-label{flex:1;min-width:0}
.form-settings-item kbd{flex:none;color:var(--muted);font:11px Inter,sans-serif;white-space:nowrap}
.form-settings-appearance{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 4px 5px;padding:6px 6px 11px;border-bottom:1px solid var(--line)}
.form-settings-theme-label{font:400 14px/1.4 Inter,sans-serif;color:var(--muted)}
.form-studio .topbar #themeToggle.form-settings-theme{position:relative;isolation:isolate;display:grid;grid-template-columns:1fr 1fr;place-items:center;gap:0;width:80px;min-width:80px;max-width:80px;height:38px;min-height:38px;max-height:38px;margin:0;padding:3px;border:1px solid var(--line);border-radius:20px;background:var(--soft);color:var(--muted);cursor:pointer;transform:none}
.form-settings-theme::before{content:'';position:absolute;z-index:-1;left:6px;top:3px;width:30px;height:30px;border-radius:50%;background:var(--text);transform:translateX(0);transition:transform 160ms ease}
.form-settings-theme[aria-checked="true"]::before{transform:translateX(36px)}
.form-settings-theme>.studio-icon{width:17px;height:17px;min-width:17px}
.form-settings-theme[aria-checked="false"]>.studio-icon:first-child,.form-settings-theme[aria-checked="true"]>.studio-icon:last-child{color:var(--bg)}
.form-studio .topbar #themeToggle.form-settings-theme:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(prefers-reduced-motion:reduce){.form-settings-theme::before{transition:none}}
.form-settings-divider{height:1px;background:var(--line);margin:5px 4px}
@media(max-width:700px){.form-studio .topbar #formSettingsMenu>.form-settings-item{min-height:44px}}

/* The DS mark links out; FORM remains a plain wordmark. */
.form-studio .topbar .brand{display:flex;align-items:center;gap:14px}
.form-studio .topbar .brand-home{display:flex;width:auto;flex:none;text-decoration:none}
.form-studio .topbar .brand-logo{display:block}
.form-studio .topbar .brand-name{cursor:default}
.form-studio .topbar .brand-home:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
/* Library takes the upper scroll area; layers stay together below it. */
.form-studio .form-catalog{flex:1 1 auto;padding-bottom:12px}
.form-studio .studio-layers-heading{flex:none;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.form-studio .studio-layer-tools{margin-bottom:0;padding-bottom:12px;border-bottom:0}
.form-studio.form-library-collapsed .form-catalog{flex:none;padding-bottom:0}
/* Reset, copy and canvas format share the same compact Lucide toolbar. */
.form-studio .studio-stage-actions{left:12px;bottom:12px;z-index:9;flex-direction:row;align-items:center;gap:2px;padding:4px;border:1px solid var(--line);border-radius:8px;background:color-mix(in srgb,var(--bg) 92%,transparent)}
.form-studio .studio-stage-actions>.studio-button{display:inline-flex;width:30px;min-width:30px;height:30px;min-height:30px;padding:5px;margin:0;border:1px solid transparent;color:var(--muted);background:transparent}
.form-studio .studio-stage-actions>.studio-button:hover{background:var(--soft);color:var(--text)}
.form-studio .studio-stage-actions .studio-icon{width:18px;height:18px;min-width:18px}
@media(max-width:1200px){.form-studio .form-viewport-tools{left:12px;bottom:58px;transform:none;max-width:calc(100% - 112px);overflow-x:auto}}
/* Explicit scope, keyboard focus and predictable modal navigation. */
dialog.export-dialog{margin:0;width:100%;height:100%;max-width:none;max-height:none;border:0;color:var(--text);background:transparent;box-sizing:border-box}
dialog.export-dialog:not([open]){display:none!important}dialog.export-dialog::backdrop{background:transparent}
.form-studio :is(button,a,input,select,textarea,[tabindex]):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.form-studio .form-scrub-label:focus-visible{border-radius:3px}.form-scope-note{font-size:11px;line-height:1.5;color:var(--muted);margin:3px 0 13px}
.form-preset-behavior{display:block;color:var(--muted);font-size:10px;line-height:1.5;padding:4px 0 8px}.form-retain{display:flex;gap:10px;margin:8px 0 0;flex-wrap:wrap}.form-retain label{font-size:11px;display:flex;gap:5px;align-items:center}
@media(pointer:coarse){.form-studio :is(.studio-button,.form-context-menu button,.form-scrub-label,.form-retain label){min-height:40px}.form-context-menu button{width:100%}.form-studio .studio-stage-toolbar{right:108px}}
.form-preview-quality{display:grid;gap:9px;border-top:1px solid var(--line);padding:16px 0}.form-preview-quality>strong{font-size:12px}.form-preview-quality select{width:100%;height:34px;border:1px solid var(--line);border-radius:5px;background:var(--bg);color:var(--text);padding:5px 8px}.form-preview-quality .form-dialog-note{margin:0;font-size:11px}.form-preview-badge{font-size:10px!important;color:var(--muted)}.form-preview-badge.is-draft{color:var(--accent)}
.music-route-meter{position:relative;min-height:25px;padding-top:10px;font-size:10px;font-variant-numeric:tabular-nums;line-height:1.5;color:var(--muted)}.music-route-meter::before,.music-route-meter>i{content:'';position:absolute;top:1px;left:0;height:3px;border-radius:3px;background:var(--line);width:100%}.music-route-meter>i{width:calc(var(--level,0)*100%);background:var(--accent)}.music-route-meter.is-limited>output{color:var(--accent)}
.form-preflight{border:1px solid var(--line);border-radius:8px;padding:12px;margin:16px 0;font-size:11px;line-height:1.5}.form-preflight>strong{font-size:12px}.form-preflight-facts{display:flex;flex-wrap:wrap;gap:6px;margin:9px 0}.form-preflight-facts span{border-radius:4px;background:var(--soft);padding:3px 7px}.form-preflight p{color:var(--muted);margin:6px 0 0}.form-preflight .form-preflight-warning{color:var(--accent)}
