:root{color-scheme:dark;--bg:#101216;--panel:#181b21;--panel-2:#1e2229;--field:#11151b;--line:#303640;--line-soft:#292e36;--text:#f2f3f5;--muted:#afb6c2;--accent:#f0b481;--accent-ink:#24180e;--green:#8edbbc;--danger:#ff9d9d;--radius:8px;--sans:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR","Malgun Gothic",sans-serif;--mono:"SFMono-Regular",Consolas,"Liberation Mono",monospace}
*{box-sizing:border-box}html,body{margin:0;min-width:320px;width:100%;height:100%;background:var(--bg);color:var(--text);font:14px/1.6 var(--sans)}body{display:flex;flex-direction:column;overflow:hidden}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{touch-action:manipulation}button{display:inline-flex;gap:7px;align-items:center;justify-content:center;min-height:37px;background:var(--panel-2);border:1px solid var(--line);border-radius:6px;padding:7px 12px;cursor:pointer;white-space:nowrap;font-weight:550;transition:background .15s,border-color .15s}button:hover{background:#2b303a;border-color:#596271}button:disabled{opacity:.4;cursor:not-allowed}button svg,svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}input,select{background:var(--field);border:1px solid #3b4350;border-radius:5px;min-height:37px;padding:6px 9px;max-width:100%}input[type=range]{appearance:none;height:18px;min-height:18px;padding:0;border:0;background:transparent;accent-color:var(--accent);width:100%;cursor:pointer}input[type=range]::-webkit-slider-runnable-track{height:3px;background:#46505c;border-radius:3px}input[type=range]::-webkit-slider-thumb{appearance:none;width:12px;height:12px;margin-top:-4.5px;border-radius:50%;background:var(--accent);border:2px solid #1c1c23}input[type=range]::-moz-range-track{height:3px;background:#46505c}input[type=range]::-moz-range-thumb{width:11px;height:11px;background:var(--accent);border:2px solid #1c1c23;border-radius:50%}input[type=checkbox]{min-height:17px;width:17px;height:17px;accent-color:var(--accent);margin:3px 0 0}select{cursor:pointer}a{color:var(--accent)}h1,h2,h3,p{margin:0}h2{font-size:20px;font-weight:600;letter-spacing:-.5px}h3{font-size:15px;font-weight:600}p{line-height:1.75}button.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent);font-weight:650}button.primary:hover{background:#ffcb9d;border-color:#ffcb9d}.quiet{border-color:transparent;background:transparent}.secondary{background:var(--panel-2)}.small{font-size:13px;min-height:32px;padding:5px 9px}.icon-button{width:35px;min-height:35px;padding:5px;flex-shrink:0}.text-button{background:transparent;border-color:transparent;padding:3px 0;min-height:30px;color:var(--accent);font-size:13px}.text-button:hover{background:transparent;border-color:transparent;color:#ffcfaa}.wide{width:100%}.muted{color:var(--muted)}.mono,code,kbd{font-family:var(--mono)}.eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:1.8px;color:var(--muted);line-height:1.5}.sr-only{position:absolute!important;clip:rect(0,0,0,0);width:1px;height:1px;padding:0!important;overflow:hidden}.skip-link{position:absolute;top:-60px;z-index:100;background:var(--accent);color:#111;padding:10px}.skip-link:focus{top:0}[hidden]{display:none!important}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-thumb{background:#434b57;border-radius:8px}::-webkit-scrollbar-track{background:transparent}
.topbar{height:66px;min-height:66px;display:flex;align-items:center;gap:30px;padding:0 22px;border-bottom:1px solid var(--line);background:#171a20}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text);min-width:194px}.brand>span{font-size:22px;font-weight:650;letter-spacing:-.7px;line-height:1.15}.brand small{display:block;font-size:9px;letter-spacing:4px;font-weight:550;color:var(--muted);margin-top:3px}.mode-switch{display:flex;gap:2px;border:1px solid var(--line);padding:3px;border-radius:7px}.mode-switch button{border:0;background:transparent;min-height:31px;padding:4px 14px;color:var(--muted)}.mode-switch button.active{color:var(--text);background:#343943}.header-actions{display:flex;align-items:center;gap:8px;margin-left:auto}.header-actions .quiet{color:var(--muted)}#libraryToggle,.mobile-only{display:none}.workspace{display:grid;grid-template-columns:224px minmax(300px,1fr) 300px;flex:1;min-height:0}.library{background:var(--panel);border-right:1px solid var(--line);padding:20px 14px 0;display:flex;flex-direction:column;min-height:0}.section-heading{display:flex;align-items:center;gap:8px}.section-heading h2,.section-heading h3{font-size:14px;font-weight:600;letter-spacing:0}.section-heading>span{font-size:12px;color:var(--muted)}.section-heading>button:last-child{margin-left:auto}.library-intro{font-size:12px;color:var(--muted);margin:7px 0 16px}.search-box{display:flex;align-items:center;background:var(--field);border:1px solid var(--line);border-radius:5px;padding:0 9px;gap:7px}.search-box svg{width:15px;color:var(--muted)}.search-box input{background:transparent;border:0;width:100%;padding-left:0;font-size:13px;min-width:0}.category-select{width:100%;margin:9px 0 15px;font-size:13px;background:transparent;border-color:var(--line);min-height:33px}.preset-list{overflow-y:auto;min-height:0;display:flex;flex-direction:column;gap:7px;padding:1px 2px 20px}.preset-card{border:1px solid transparent;min-height:76px;width:100%;padding:7px;display:flex;align-items:center;gap:11px;text-align:left;justify-content:flex-start;background:transparent;border-radius:7px}.preset-card:hover{background:#252a33;border-color:var(--line)}.preset-card.active{border-color:#89715d;background:#302a27}.preset-thumb{width:62px;height:58px;object-fit:cover;border-radius:4px;background:#11131b;flex-shrink:0}.preset-card strong{font-size:13px;font-weight:550;display:block;white-space:normal;line-height:1.45}.preset-card small{display:block;color:var(--muted);font-size:11px;font-weight:400;white-space:normal;line-height:1.4;margin-top:3px}.library-foot{padding:16px 4px 13px;border-top:1px solid var(--line);font-size:12px;color:#d1d6de;margin-top:auto}.library-foot>span:last-of-type{display:block;color:var(--muted);font-size:11px;margin:3px 0 8px}.local-dot,.live-dot{width:6px;height:6px;display:inline-block;border-radius:50%;background:var(--green);margin-right:5px}.stage-column{display:flex;flex-direction:column;min-width:0;min-height:0;padding:23px 24px 18px;overflow-y:auto}.stage-heading{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:20px}.project-title .eyebrow{display:block;margin-bottom:4px}.project-title input{border:1px solid transparent;padding:0 2px;margin-left:-2px;background:transparent;min-height:30px;height:32px;max-width:100%;width:280px;font-size:23px;letter-spacing:-.6px;font-weight:560}.project-title input:hover{border-bottom-color:var(--line)}.stage-indicators{display:flex;align-items:center;gap:13px;font-size:12px}.pill{font:11px var(--mono);border:1px solid #384740;color:#b9e7d2;border-radius:4px;padding:5px 7px;white-space:nowrap}.preview-shell{position:relative;min-height:180px;flex:1;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:9px;background:#07090d;padding:26px 20px 38px;overflow:hidden}.canvas-surround{max-width:100%;max-height:100%;display:flex;align-items:center;justify-content:center;line-height:0}canvas#preview{display:block;object-fit:contain;max-width:100%;max-height:100%;box-shadow:0 15px 55px #0008;touch-action:none;cursor:grab}canvas#preview:active{cursor:grabbing}.preview-caption{position:absolute;bottom:10px;left:16px;right:16px;display:flex;justify-content:space-between;font-size:11px;line-height:1.4;color:#929ba9;pointer-events:none}.canvas-error{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px;text-align:center;background:#10151f;z-index:2;gap:14px}.canvas-error svg{width:32px;height:32px;color:var(--accent)}.canvas-error p{max-width:480px;color:var(--muted)}.preview-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0 8px}.inline-label{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);white-space:nowrap}.inline-label select{min-height:29px;padding:3px 6px;font-size:12px;background:transparent;border-color:var(--line)}.tool-group{display:flex;align-items:center;gap:1px}.tool-group button{font-size:12px;min-height:31px;padding:5px 7px}.tool-group svg{width:16px;height:16px}.transport{display:flex;align-items:center;gap:10px;padding:17px 0 21px;flex-shrink:0}.play-button{background:var(--text);color:#20252e;border-color:var(--text);min-height:36px;width:36px;padding:8px}.play-button:hover{background:#fff}.timecode{color:#d5dae2;font-size:12px;min-width:47px}.timeline{flex:1;min-width:30px;position:relative;line-height:1}.timeline input{display:block}.timeline-ticks{position:absolute;top:22px;width:100%;display:flex;justify-content:space-between;color:#8793a3;font:10px var(--mono);pointer-events:none}.loop-duration{font-size:12px;color:var(--muted);white-space:nowrap;margin-left:8px}.layer-panel{border-top:1px solid var(--line);padding-top:17px;margin-top:8px;flex-shrink:0}.layer-order-hint{margin-left:auto}.layer-list{display:flex;gap:8px;margin:11px 0 8px;overflow-x:auto;padding-bottom:2px}.layer-tile{display:flex;align-items:center;border:1px solid var(--line);border-radius:7px;background:var(--panel);min-width:154px;max-width:235px;flex:1;overflow:hidden}.layer-tile.selected{border-color:var(--accent);background:#292520}.layer-tile.disabled{opacity:.5}.layer-select{justify-content:flex-start;border:0;background:transparent;padding:10px;min-width:0;flex:1;font-size:13px;white-space:normal;text-align:left}.layer-select>span:first-child{font:11px var(--mono);color:var(--accent);border-right:1px solid var(--line);padding-right:9px}.layer-select strong{font-size:12px;font-weight:500;line-height:1.4}.layer-select small{font-size:10px;color:var(--muted);display:block}.layer-tile .visibility{border:0;background:transparent;min-height:35px;min-width:30px;padding:6px}.layer-actions{display:flex;gap:0;align-items:center}.layer-actions>span{font-size:11px;margin-left:auto}.layer-actions .small{font-size:11px;min-height:27px}.inspector{background:var(--panel);border-left:1px solid var(--line);min-width:0;min-height:0;display:flex;flex-direction:column}.inspector-tabs{display:flex;border-bottom:1px solid var(--line);padding:0 16px;flex-shrink:0;height:54px}.inspector-tabs button{flex:1;border:0;background:transparent;border-radius:0;font-size:14px;color:var(--muted);position:relative}.inspector-tabs button.active{color:var(--text)}.inspector-tabs button.active:after{content:"";position:absolute;bottom:-1px;height:2px;background:var(--accent);left:8px;right:8px}.inspector-content{overflow-y:auto;min-height:0;padding:2px 18px 20px;flex:1}.inspector-section{padding:20px 0;border-bottom:1px solid var(--line-soft)}.inspector-section:last-child{border-bottom:0}.inspector-section>.eyebrow{font-size:10px;color:var(--accent);letter-spacing:1.2px;margin-bottom:7px}.inspector-section h2{font-size:21px}.inspector-section>p{font-size:12px;margin-top:8px}.inspector-section h3{margin-bottom:12px}.inspector-section .section-heading{margin-bottom:12px}.inspector-section .section-heading h3{margin:0}.inspector-section .section-heading>span{font-size:11px;margin-left:auto}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}.two-fields label,.field{display:flex;flex-direction:column;gap:6px;color:#d0d6df;font-size:12px}.two-fields select,.two-fields input,.field select,.field input{width:100%;font-size:13px}.field{margin-top:16px}.control{margin-top:12px}.control-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:3px;font-size:12px;color:#d8dde5}.control-value{min-height:25px;height:25px;width:65px;text-align:right;border-color:var(--line);font:12px var(--mono);padding:3px 5px;background:#12161c}.control-value::-webkit-inner-spin-button{opacity:.4}.control input[type=range]{height:21px;min-height:21px}.palette-list{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;margin:4px 0 15px}.palette-chip{display:flex;gap:0;min-height:30px;padding:3px;border-radius:5px;overflow:hidden}.palette-chip span{width:33.33%;height:20px;display:block}.palette-chip.active{outline:1px solid var(--accent);outline-offset:2px}.color-inputs{display:flex;gap:12px}.color-inputs label{flex:1;text-align:center;font-size:11px;color:var(--muted)}.color-inputs input{padding:0;min-height:30px;height:30px;display:block;width:100%;border-color:#59606c;cursor:pointer}.color-inputs input::-webkit-color-swatch-wrapper{padding:3px}.color-inputs input::-webkit-color-swatch{border:0;border-radius:2px}.color-inputs span{display:block;margin-top:6px}.mini-note{font-size:11px!important;line-height:1.75;color:var(--muted);margin-top:12px!important}.subtle-help{display:flex;align-items:flex-start;gap:13px}.subtle-help>svg{margin-top:4px;color:var(--accent)}.subtle-help p{font-size:12px;margin:0}.output-card{margin-top:22px;border:1px solid #4d453d;border-radius:7px;background:#22201f;padding:15px}.output-card strong{font-size:19px;font-weight:550;color:var(--accent)}.output-card>div>span{display:block;font-size:11px;color:#c2bab3;margin-top:4px}.output-card dl{margin:14px 0 0;padding-top:10px;border-top:1px solid #413b36}.output-card dl div{display:flex;justify-content:space-between;font-size:12px;line-height:2}.output-card dt{color:var(--muted)}.output-card dd{margin:0;font-family:var(--mono)}.check-field{display:flex;gap:10px;margin-top:20px;font-size:12px;cursor:pointer}.check-field small{display:block;color:var(--muted);font-size:11px;line-height:1.7;margin-top:4px}.capability-box{font-size:12px;color:var(--muted);padding:14px 0;display:flex;flex-direction:column;align-items:flex-start;gap:2px}.capability-box .text-button{font-size:12px}.export-action{width:100%;min-height:45px;font-size:14px}.warning-note{color:#ffc390;font-size:12px;background:#35271e;padding:10px;border-radius:5px}.statusbar{min-height:28px;height:28px;border-top:1px solid var(--line);background:#14171c;padding:4px 20px;display:flex;align-items:center;gap:24px;font-size:10px;color:#abb4c2}.footer-version{margin-left:auto;font-family:var(--mono);font-size:10px}
.editor-panel{margin:6px 0 12px;border:1px solid var(--line);border-radius:7px;overflow:hidden;flex-shrink:0;background:#12151c}.editor-heading{padding:7px 10px;display:flex;justify-content:space-between;gap:8px;align-items:center;border-bottom:1px solid var(--line);font-size:12px;background:#1b1f26}.editor-heading>div{display:flex;align-items:center;gap:9px}.editor-heading button{font-size:11px;min-height:29px;padding:4px 7px}.file-dot{width:7px;height:7px;background:var(--accent);border-radius:2px}#codeStatus{font-size:11px}kbd{font-size:10px;opacity:.7}.code-area{height:270px;display:flex;font:13px/1.7 var(--mono);position:relative}.line-numbers{width:46px;min-width:46px;text-align:right;padding:14px 10px 14px 0;color:#778294;background:#151921;overflow:hidden;white-space:pre;user-select:none;line-height:1.7}.code-stack{position:relative;flex:1;min-width:0;overflow:hidden}.code-stack textarea,.code-stack pre{position:absolute;inset:0;width:100%;height:100%;margin:0;border:0;padding:14px 16px;white-space:pre;font:inherit;line-height:inherit;tab-size:2;letter-spacing:0;overflow:auto;resize:none;background:transparent;border-radius:0}.code-stack textarea{color:transparent;caret-color:#fff;-webkit-text-fill-color:transparent;z-index:1}.code-stack textarea:focus-visible{outline:none}.code-stack textarea::selection{background:#53648285}.code-stack pre{pointer-events:none;overflow:hidden;color:#dde6f4}.code-stack code{font:inherit}.token-comment{color:#94a69d}.token-type{color:#9ab7ff}.token-number{color:#edbe8e}.token-function{color:#83ded5}.compile-error{padding:12px;margin:0;border-top:1px solid #815050;background:#342022;color:#ffc5c5;white-space:pre-wrap;font:12px/1.6 var(--mono);max-height:140px;overflow:auto}.code-hint{padding:8px 12px;color:var(--muted);font-size:11px;display:flex;gap:5px;align-items:center;flex-wrap:wrap}.code-hint code{color:#d8c4b0}.code-hint button{margin-left:auto;min-height:24px;font-size:11px}.workspace.code-mode .preview-shell{flex:1;min-height:190px}.workspace.code-mode .stage-column{padding-top:17px}.workspace.code-mode .stage-heading{margin-bottom:12px}.workspace.code-mode .transport{padding:10px 0 17px}.workspace.code-mode .layer-panel{padding-top:10px}
.fatal-notice{padding:14px 20px;color:#ffdbca;background:#552d26;flex-shrink:0}.toast{position:fixed;bottom:46px;left:50%;transform:translateX(-50%);max-width:min(640px,90vw);padding:13px 20px;z-index:100;background:#e3e8ef;color:#111923;border-radius:7px;box-shadow:0 10px 35px #0008;font-size:14px;line-height:1.6}.toast.error{background:#ffc0b6}.toast.warning{background:#ffdab4}dialog{color:var(--text);background:#191d25;border:1px solid #49515e;border-radius:13px;padding:27px;max-width:calc(100vw - 36px);max-height:calc(100vh - 50px);box-shadow:0 30px 90px #000b}dialog::backdrop{background:#05070db5;backdrop-filter:blur(6px)}.dialog-heading{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:22px}.dialog-heading .eyebrow{font-size:10px;color:var(--accent)}.dialog-heading h2{margin-top:6px;font-size:24px}.dialog-heading .icon-button{font-size:25px;background:transparent;border-color:transparent;min-width:34px}.help-dialog{width:780px;overflow:hidden}.dialog-scroll{max-height:calc(100vh - 208px);overflow-y:auto;padding-right:13px}.dialog-scroll>h3{margin-top:27px;font-size:16px}.dialog-scroll>p{font-size:14px;color:#c4cbd7;margin-top:12px;line-height:1.85}.guide-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;padding-bottom:24px;border-bottom:1px solid var(--line)}.guide-steps section>span{font:14px var(--mono);color:var(--accent)}.guide-steps h3{margin-top:9px;font-size:15px}.guide-steps p{margin-top:9px;font-size:13px;color:var(--muted)}.example-code{padding:17px;background:#10151d;border:1px solid var(--line);border-radius:7px;font:13px/1.8 var(--mono);white-space:pre-wrap;color:#acd9d6;margin:16px 0}.export-dialog,.loop-dialog{width:570px}.export-dialog progress{appearance:none;width:100%;height:7px;border:0;border-radius:5px;background:#3d4450}.export-dialog progress::-webkit-progress-bar{background:#3d4450;border-radius:5px}.export-dialog progress::-webkit-progress-value{background:var(--accent);border-radius:5px}.export-dialog progress::-moz-progress-bar{background:var(--accent)}.export-orbit{height:100px;display:flex;justify-content:center;align-items:center;color:var(--accent);font:100px var(--sans);line-height:1}.progress-stats{display:flex;justify-content:space-between;align-items:center;margin:10px 0 12px}.progress-stats strong{font:27px var(--mono);color:var(--accent)}.progress-stats>span{font-size:13px;color:var(--muted)}#exportMessage{font-size:13px;line-height:1.8;margin:8px 0 24px}#cancelExport{margin-top:15px}#resultVideo{width:100%;max-height:340px;background:#050609;border-radius:7px;margin-bottom:18px}#exportResult{font-size:14px;color:#d8e0eb;padding-bottom:18px;line-height:1.9}#downloadVideo{margin-bottom:6px}.loop-score{font-size:18px;font-weight:600;padding:18px;border-radius:7px;background:#1c352c;color:#acedd2;margin-bottom:18px}.loop-score.warn{background:#3b2c21;color:#ffd0a2}.loop-data{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0}.loop-data>div{background:#222833;padding:12px;border-radius:5px}.loop-data small{display:block;color:var(--muted);font-size:12px}.loop-data strong{font:17px var(--mono)}#loopResults p{color:var(--muted);font-size:13px}.loop-dialog>.wide{margin-top:22px}.preview-shell:fullscreen{border-radius:0;background:#000;width:100vw;height:100vh;padding:40px}.preview-shell:fullscreen .canvas-surround{width:100%;height:100%}.preview-shell:fullscreen canvas{width:100%!important;height:100%!important;object-fit:contain}.preview-shell:fullscreen .preview-caption{font-size:14px}.empty-state{padding:24px 8px;color:var(--muted);font-size:13px}
/* Keep prose readable: small metadata above is raised on high density desktop displays. */
@media(min-width:1500px){.workspace{grid-template-columns:250px minmax(400px,1fr) 334px}.stage-column{padding:28px 32px 22px}.inspector-content{padding:2px 22px 20px}.library{padding-left:18px;padding-right:18px}.preset-thumb{width:67px;height:63px}.preset-card{min-height:82px}.preset-card strong{font-size:14px}.inspector-section>p,.control-head,.two-fields label,.field,.capability-box,.check-field{font-size:13px}.mini-note{font-size:12px!important}.code-area{font-size:14px;height:295px}}
@media(max-width:1220px){.topbar{padding:0 16px;gap:16px}.brand{min-width:180px}.header-actions{gap:5px}.header-actions #helpButton span{display:none}.workspace{grid-template-columns:198px minmax(290px,1fr) 280px}.library{padding-left:10px;padding-right:10px}.stage-column{padding:18px 18px 14px}.preview-tools .tool-group #resetView span{display:none}.stage-indicators #previewInfo{display:none}.layer-actions>span,.layer-order-hint{display:none!important}.preset-card{gap:8px;padding:6px}.preset-thumb{width:52px;height:52px}.preset-card strong{font-size:12px}.loop-duration{display:none}.editor-heading kbd{display:none}}
@media(max-width:1050px){.workspace{grid-template-columns:minmax(320px,1fr) 290px}.library{display:none}.library.is-open{display:flex;position:fixed;top:66px;bottom:28px;width:254px;left:0;z-index:20;box-shadow:15px 0 40px #0009}.mobile-only,#libraryToggle{display:inline-flex}.header-actions #saveProject span{display:none}.header-actions #helpButton{display:none}.brand{min-width:unset}.topbar{gap:20px}.stage-column{padding:20px}.stage-heading{margin-bottom:17px}.project-title input{font-size:21px;width:245px}.stage-indicators{gap:6px}.inspector-content{padding-left:16px;padding-right:16px}.preview-shell{padding:20px 12px 35px}.layer-list{flex-wrap:nowrap}.layer-tile{min-width:155px}.preview-tools .inline-label{font-size:0}.preview-tools .inline-label select{font-size:12px}}
@media(max-width:760px){html,body{height:auto;min-height:100%;overflow:auto;font-size:14px}.topbar{height:auto;min-height:66px;flex-wrap:wrap;padding:12px 14px;gap:12px}.brand{margin-right:auto}.brand>span{font-size:21px}.brand img{width:32px;height:32px}.mode-switch{order:2;margin-right:auto}.header-actions{display:contents}.header-actions>button{order:2}.header-actions #openProject,.header-actions #saveProject{width:35px;padding:6px}.header-actions #openProject span,.header-actions #libraryToggle span{display:none}.header-actions #openExport{order:0;font-size:12px;padding:7px 10px;min-height:35px}.header-actions #libraryToggle{width:35px;padding:6px;order:2}.mode-switch button{font-size:13px;padding:3px 13px}.workspace{display:flex;flex-direction:column;min-height:unset}.stage-column{min-height:unset;overflow:visible;padding:20px 14px 23px}.stage-heading{margin-bottom:15px}.project-title input{font-size:22px;width:240px}.stage-indicators{font-size:11px}.stage-heading .eyebrow{font-size:10px}.preview-shell{height:300px;min-height:200px;flex:none;padding:22px 8px 32px}.preview-caption{left:12px;right:12px;font-size:10px}.preview-tools{padding-top:12px;gap:4px}.preview-tools button{padding:4px 5px}.preview-tools #checkLoop{font-size:11px}.preview-tools .inline-label select{max-width:132px;font-size:11px}.transport{gap:7px;padding:14px 0 23px}.timecode{font-size:11px;min-width:42px}.play-button{width:34px;min-height:34px}.layer-panel{padding-top:15px}.layer-list{overflow-x:auto;padding-bottom:5px}.layer-tile{min-width:170px}.layer-select strong{font-size:13px}.layer-select small{font-size:11px}.layer-actions button{font-size:12px;min-height:32px}.inspector{border-left:0;border-top:1px solid var(--line);min-height:0}.inspector-tabs{height:52px;position:sticky;top:0;background:var(--panel);z-index:2}.inspector-content{overflow:visible;padding:0 21px 24px}.inspector-section{padding:23px 0}.inspector-section>p,.control-head,.two-fields label,.field,.capability-box,.check-field{font-size:14px}.mini-note{font-size:13px!important}.inspector-section .eyebrow{font-size:11px}.inspector-section h3{font-size:16px}.control{margin-top:17px}.control-value{font-size:14px;width:72px;height:30px}.control input[type=range]{height:26px}.control input[type=range]::-webkit-slider-thumb{width:16px;height:16px;margin-top:-6.5px}.two-fields input,.two-fields select,.field select{font-size:14px;min-height:42px}.color-inputs{gap:18px}.color-inputs input{height:38px}.color-inputs label,.inspector-section .section-heading>span{font-size:12px}.palette-chip{min-height:37px}.palette-chip span{height:26px}.output-card dl div{font-size:13px}.statusbar{position:relative;min-height:46px;gap:7px;padding:7px 13px;flex-wrap:wrap;font-size:11px}.statusbar>span:nth-child(2){margin-left:auto}.footer-version{width:100%;font-size:10px}.library.is-open{top:0;bottom:0;width:280px;padding-top:22px}.library .mobile-only{margin-left:auto}.preset-card strong{font-size:14px}.preset-card small{font-size:12px}.preset-thumb{width:68px;height:63px}.library-intro,.library-foot{font-size:13px}.library-foot>span:last-of-type{font-size:12px}.category-select,.search-box input{font-size:14px;min-height:40px}.workspace.code-mode .preview-shell{min-height:200px;flex:none}.editor-heading{flex-wrap:wrap;font-size:12px}.editor-heading button{font-size:12px;min-height:33px}.code-area{font-size:13px;height:330px}.code-stack pre,.code-stack textarea{padding-left:11px}.line-numbers{width:36px;min-width:36px;padding-right:8px}.code-hint{font-size:11px;padding:9px}.guide-steps{grid-template-columns:1fr;gap:18px}.guide-steps section{display:grid;grid-template-columns:29px 1fr;gap:0 7px}.guide-steps h3{margin:0}.guide-steps p{grid-column:2;margin-top:6px;font-size:14px}dialog{padding:21px;max-width:calc(100vw - 24px)}.dialog-heading{gap:8px}.dialog-heading h2{font-size:22px}.example-code{font-size:12px}.dialog-scroll{max-height:calc(100dvh - 200px)}.loop-data{grid-template-columns:1fr 1fr}.toast{bottom:25px;width:calc(100% - 32px);max-width:500px;font-size:13px}.export-dialog video{max-height:240px}.footer-version .muted{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Readability overrides: decorative labels are small; actionable text is not. */
.advanced-controls{margin-top:15px;border-top:1px solid var(--line-soft);padding-top:8px}
.advanced-controls summary{color:var(--muted);font-size:13px;cursor:pointer;min-height:34px;line-height:34px}
.advanced-controls summary:hover{color:var(--text)}
.preset-card strong{font-size:14px}.preset-card small{font-size:12px}.library-intro{font-size:13px}.library-foot{font-size:13px}.library-foot>span:last-of-type{font-size:12px}
.control-head,.two-fields label,.field,.inspector-section>p,.capability-box,.check-field{font-size:13px}.control-value{font-size:13px}
.inspector-section .section-heading>span,.color-inputs label,.check-field small,.output-card>div>span{font-size:12px}
.mini-note{font-size:12px!important}.layer-select strong{font-size:13px}.layer-select small{font-size:11px}.layer-actions .small{font-size:12px}
.preview-caption,.timeline-ticks{font-size:11px}.statusbar{font-size:11px}.footer-version{font-size:11px}
.library .search-box input,.library .category-select{font-size:13px}.editor-heading button{font-size:12px}.code-area{font-size:14px}
@media(max-width:760px){.control-head,.two-fields label,.field,.inspector-section>p,.capability-box,.check-field{font-size:14px}.mini-note{font-size:13px!important}.code-area{font-size:13px}.preview-caption{font-size:10px}.footer-version{font-size:10px}}

/* v1.1: the frame, not spare viewport height, determines the canvas box. */
select,select option,select optgroup{color-scheme:dark;background-color:#151a22;color:#f2f3f5}
select option:disabled{color:#929ca9}select option:checked{background-color:#35404f;color:#fff}
.preview-column{min-width:0;display:flex;flex-direction:column;gap:0;flex:0 0 auto}
.preview-shell,.workspace.code-mode .preview-shell{flex:0 0 auto;width:100%;height:auto;aspect-ratio:var(--output-aspect,16 / 9);min-height:0;padding:0;border-radius:8px}
.preview-shell[data-aspect="portrait"]{width:min(100%,46vh);align-self:center}
.preview-shell[data-aspect="square"]{width:min(100%,72vh);align-self:center}
.canvas-surround{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none}
canvas#preview{box-shadow:none;width:100%;height:100%;max-width:none;max-height:none}
.preview-caption{bottom:0;left:0;right:0;padding:14px 12px 8px;color:#e0e5ed;background:linear-gradient(transparent,#06080bbd);opacity:0;transition:opacity .15s}
.preview-shell:hover .preview-caption,.preview-shell:focus-within .preview-caption{opacity:1}
.quick-output{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:3px 0 0;padding:9px 0;border-top:1px solid var(--line-soft);color:var(--muted);font-size:12px}
.quick-output-label{font-weight:600;color:var(--text)}.resolution-buttons{display:flex;gap:4px;flex-wrap:wrap}
.resolution-buttons button{font-size:12px;padding:4px 9px;min-height:30px;background:transparent}
.resolution-buttons button[aria-pressed="true"]{border-color:var(--accent);color:var(--accent);background:#2b2520}
#quickDimensions{margin-left:auto;font-size:12px;color:#d0d7e2}
.category-picker{position:relative;margin:9px 0 15px;flex-shrink:0}
.category-picker .category-select{margin:0;background:#151a22;justify-content:space-between;font-weight:450;width:100%;min-height:37px}
.category-menu{position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:40;max-height:340px;overflow-y:auto;padding:5px;background:#202630;border:1px solid #576170;border-radius:7px;box-shadow:0 14px 32px #0009}
.category-option{display:flex;justify-content:space-between;text-align:left;width:100%;border:0;border-radius:4px;background:#202630;color:#f2f3f5;font-size:13px;min-height:39px;padding:8px 10px;font-weight:450}
.category-option:hover,.category-option:focus-visible{background:#384555;color:#fff}
.category-option[aria-selected="true"]{background:#3a3129;color:#ffcfaa}
.category-option small{font:12px var(--mono);color:inherit}.preset-list{flex:1;min-height:100px}.library-foot{flex-shrink:0}
#inspectorToggle,.inspector-drawer-heading{display:none}
.snapshot-dialog{width:480px}.snapshot-dimensions{font-size:25px;color:var(--accent);margin:18px 0 8px}
.snapshot-dialog .wide{margin-top:20px}.snapshot-dialog .field{margin-top:17px}.snapshot-dialog>p{font-size:13px}
/* Code mode is a two-pane workspace. Secondary panels are drawers, not a third fixed column. */
.workspace.code-mode{grid-template-columns:minmax(0,1fr)}
.workspace.code-mode .stage-column{display:grid;grid-template-columns:minmax(0,var(--preview-share,56%)) 8px minmax(0,1fr);gap:0;padding:20px 22px;overflow:hidden;min-height:0}
.workspace.code-mode .preview-column{overflow-y:auto;padding-right:16px;min-height:0;min-width:0}
.workspace.code-mode .editor-panel{display:flex;flex-direction:column;margin:0 0 0 14px;min-height:0;min-width:0;height:100%}
.workspace.code-mode .code-area{flex:1;height:auto;min-height:200px}.workspace.code-mode .editor-heading{flex-wrap:wrap;row-gap:9px}
.workspace.code-mode .code-hint{flex-shrink:0;display:flex;flex-wrap:wrap;gap:3px 7px}
.splitter{align-self:stretch;background:transparent;position:relative;cursor:col-resize;touch-action:none;border-radius:4px}
.splitter::after{content:"";position:absolute;top:0;bottom:0;left:3px;width:2px;background:var(--line)}
.splitter:hover::after,.splitter:focus-visible::after{background:var(--accent)}
.splitter:focus-visible{outline:2px solid var(--accent);outline-offset:2px}body.is-resizing{cursor:col-resize;user-select:none}
body.code-layout #libraryToggle,body.code-layout #inspectorToggle{display:inline-flex}
.workspace.code-mode .library,.workspace.code-mode .inspector{display:none}
.workspace.code-mode .library.is-open{display:flex;position:fixed;left:0;top:66px;bottom:28px;width:268px;z-index:30;box-shadow:16px 0 40px #000b}
.workspace.code-mode .library .mobile-only{display:inline-flex}
.workspace.code-mode .inspector.is-open{display:flex;position:fixed;right:0;top:66px;bottom:28px;width:330px;z-index:30;box-shadow:-16px 0 40px #000b}
.workspace.code-mode .inspector-drawer-heading{display:flex;justify-content:space-between;align-items:center;padding:10px 15px;border-bottom:1px solid var(--line)}
.preview-shell:fullscreen{aspect-ratio:auto;width:100vw!important;height:100vh!important;max-width:none;padding:0}
.preview-shell:fullscreen .canvas-surround{inset:0;width:100%;height:100%}
@media(min-width:1500px){.stage-column{padding:22px 26px 20px}.workspace.code-mode .stage-column{padding:24px 26px}.workspace.code-mode .code-area{font-size:14px}}
@media(max-width:1220px){.workspace.code-mode .project-title input{width:220px}.workspace.code-mode .preview-tools #resetView span{display:none}.workspace.code-mode .stage-indicators #previewInfo{display:none}}
@media(max-width:760px){
 .preview-shell,.workspace.code-mode .preview-shell{height:auto;min-height:0;padding:0;flex:0 0 auto}.preview-caption{font-size:10px}
 .quick-output{font-size:12px;gap:7px}.resolution-buttons button{font-size:11px;padding:4px 7px}#quickDimensions{margin-left:0;width:100%}
 .workspace.code-mode{display:flex}.workspace.code-mode .stage-column{display:flex;flex-direction:column;overflow:visible;padding:20px 14px 24px;gap:18px}
 .workspace.code-mode .preview-column{overflow:visible;padding:0}.workspace.code-mode .editor-panel{margin:0;height:480px;min-height:400px;flex-shrink:0}
 .workspace.code-mode .splitter{display:none}.workspace.code-mode .library.is-open{top:0;bottom:0;width:280px}
 .workspace.code-mode .inspector.is-open{top:0;bottom:0;width:min(360px,100vw);overflow-y:auto}
 .workspace.code-mode .inspector-tabs{position:static}.header-actions #inspectorToggle{width:35px;padding:6px}.header-actions #inspectorToggle span{display:none}
 .category-option{font-size:14px;min-height:44px}.preview-column{width:100%}.preview-tools .inline-label select{max-width:128px}
}
/* Compact controls must not force the split wider than a small laptop viewport. */
.workspace.code-mode .project-title{min-width:0;flex:1}
.workspace.code-mode .project-title input{width:100%;min-width:0}
.workspace.code-mode .stage-indicators{flex-shrink:0}
.workspace.code-mode .preview-tools{flex-wrap:wrap}
.workspace.code-mode .editor-heading>div{min-width:0;flex-wrap:wrap}
.workspace.code-mode .editor-heading>div:last-child{display:flex;gap:4px}
@media(max-width:1050px) and (min-width:761px){
 .header-actions #inspectorToggle span,.header-actions #libraryToggle span,.header-actions #openProject span{display:none}
 .header-actions #inspectorToggle,.header-actions #libraryToggle,.header-actions #openProject{width:35px;padding:6px}
 .topbar{gap:14px}.header-actions #openExport{font-size:12px;padding:7px 10px}
 .workspace.code-mode .stage-column{padding:16px}.workspace.code-mode .preview-column{padding-right:10px}
 .workspace.code-mode .editor-panel{margin-left:10px}
}

/* Orbit mark: shared by the brand, favicon and export progress. */
.language-toggle{min-width:40px;font-weight:700;letter-spacing:.06em;color:#a5fff0}
.export-orbit{position:relative;height:116px;width:116px;margin:0 auto 12px;font-size:inherit}
.export-orbit>img{width:76px;height:76px;animation:field-pulse 2.8s ease-in-out infinite}
.export-orbit>.orbit-tracer{position:absolute;inset:7px;border:1px solid #818cf840;border-top:2px solid #80ffee;border-radius:50%;animation:field-orbit 2.8s linear infinite}
@keyframes field-orbit{to{transform:rotate(360deg)}}
@keyframes field-pulse{50%{filter:drop-shadow(0 0 9px #80ffee50)}}
@media(prefers-reduced-motion:reduce){.export-orbit>img,.export-orbit>.orbit-tracer{animation:none}}
@media(max-width:1250px){html[lang=en] .header-actions #saveProject span{display:none}}
@media(max-width:760px){.header-actions .language-toggle{display:inline-flex;min-width:34px;padding:5px}}

/* Equal side columns keep the repository link centered in the footer. */
.statusbar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);height:auto;column-gap:16px}
.footer-status{display:flex;align-items:center;flex-wrap:wrap;gap:2px 24px;min-width:0}
.statusbar .footer-version{width:auto;margin-left:0;text-align:right;justify-self:end}
.footer-github{color:inherit;font-family:var(--sans);font-size:12px;font-weight:600;text-decoration:none;padding:2px 4px}
.footer-github:hover,.footer-github:focus-visible{color:#B7F0B1}
.footer-github:focus-visible{outline:1px solid currentColor;outline-offset:3px;border-radius:2px}
@media(max-width:760px){.statusbar{column-gap:10px}.footer-status{flex-direction:column;align-items:flex-start;overflow-wrap:anywhere}}
