#themeToggle{font-size:13px;white-space:nowrap;flex-shrink:0}
html[data-theme=dark]{color-scheme:dark;background:#000;color:#eee}
html[data-theme=dark] body,html[data-theme=dark] header,html[data-theme=dark] .workspace,html[data-theme=dark] aside{background:#000;color:#eee}
html[data-theme=dark] :is(button,label,h2,#sourceName,.open-file,.transport button,.number-control input,.preset-label input){color:#eee}
html[data-theme=dark] :is(select,textarea,input[type=text],#labPresetName,#imageCollection .image-text textarea){background-color:#000;color:#eee;border-color:#444}
html[data-theme=dark] select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23aaa'/%3E%3C/svg%3E")}
html[data-theme=dark] :is(.export,.lab-preset,#presetPanel,#motionLab,#imageCollection .image-row,.number-control input){border-color:#383838}
html[data-theme=dark] :is(.filters button,.experiment-link>span,.gallery-page footer,.lab-note,.font-upload,.export-grid label,#status,#presetStatus,.motion-note,.transport,.number-control,#imageCollection .image-text summary){color:#aaa}
html[data-theme=dark] :is(.filters button[aria-pressed=true],#imageCollection .image-actions button){color:#fff}
html[data-theme=dark] input[type=range]{background:#444}
html[data-theme=dark] input[type=range]::-webkit-slider-thumb{background:#eee}
html[data-theme=dark] input[type=range]::-moz-range-thumb{background:#eee}
html[data-theme=dark] input[type=checkbox]{accent-color:#eee!important}
html[data-theme=dark] .track{background:#444}html[data-theme=dark] .track div{background:#eee}
html[data-theme=dark] :is(button,input,select,textarea):focus-visible{outline-color:#eee}
html[data-theme=dark] .motion-switch input{background:#222;border-color:#888}
html[data-theme=dark] .motion-switch input:checked{background:#eee}html[data-theme=dark] .motion-switch input:checked:before{background:#111}
html[data-theme=dark] :is(button,a):hover{color:#aaa}
@media(max-width:650px){header{flex-wrap:wrap;height:auto!important;min-height:88px}#themeToggle{font-size:12px}}
html[data-theme=dark] .curve-editor svg{filter:invert(1)}html[data-theme=dark] .curve-editor p{color:#aaa}

.return-bar{display:flex;align-items:center;justify-content:center;min-height:34px;padding:8px 20px;background:#111;color:#fff;font-size:12px;line-height:18px;text-decoration:none;text-align:center}.return-bar:hover{background:#292929;color:#fff}html[data-theme=dark] .return-bar{background:#eee;color:#111}html[data-theme=dark] .return-bar:hover{background:#ccc;color:#111}.gallery-header h1 .creator{white-space:nowrap}body:not(.gallery-page)>main{height:calc(100dvh - 134px)}@media(max-width:650px){body:not(.gallery-page)>main{height:auto}.gallery-header h1{line-height:1.2}.gallery-header h1 .creator{display:block;font-size:14px;letter-spacing:-.3px;margin-top:6px}}
/* Flexible editor chrome: extra actions and browser zoom must never overflow. */
body:not(.gallery-page){display:flex;flex-direction:column;height:100dvh}
body:not(.gallery-page)>header{display:flex;flex-wrap:wrap;align-items:center;gap:14px 24px;height:auto;min-height:100px;flex-shrink:0;max-width:100%;padding-block:20px}
body:not(.gallery-page)>header #sourceName{flex:1 1 180px;min-width:0;white-space:normal;overflow:visible;line-height:1.4}
body:not(.gallery-page)>header button{flex:0 0 auto;line-height:1.5;min-height:32px;max-width:100%;white-space:normal}
body:not(.gallery-page)>main{flex:1;min-height:0;height:auto}
.return-bar{flex-shrink:0}select{line-height:1.5;min-height:40px;padding-top:10px;padding-bottom:10px}.open-file{line-height:1.4}
@media(max-width:650px){body:not(.gallery-page){height:auto;min-height:100dvh}body:not(.gallery-page)>main{flex:none}body:not(.gallery-page)>header #sourceName{display:block;flex-basis:50%}body:not(.gallery-page)>header{gap:10px 18px}.transport{gap:10px}.transport #dimensions{font-size:11px}.transport .track{min-width:40px}}
