:root{--font-ui:-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--mono:"JetBrains Mono", Menlo, Monaco, monospace;--text-small:11px;--text-label:12px;--text-body:13px;--text-heading:15px;--text-title:18px;--line-height:1.5;--weight-medium:600;--bg:#101114;--panel:#121316;--sidebar:var(--bg);--control:#202228;--hover:#292b32;--border:#303138;--border-strong:#454852;--border-subtle:#ffffff12;--text:#c5c7cf;--muted:#999da9;--accent:#c5c9d4;--accent-hover:#e1e4ed;--on-accent:#121316;--selected:#292b32;--selection-border:#c5c9d44d;--success:#a0a5b3;--danger:#ffaaa0;--danger-surface:#422b2b;--canvas-bg:#19191c;--canvas-dot:#38383f;--checker-light:#434650;--checker-dark:#24262d;--black:#000;--shadow-soft-color:#0002;--shadow-color:#0004;--backdrop:#08090cb3;--scrollbar:var(--border-strong);--shadow-panel:0 12px 36px var(--shadow-color), 0 2px 8px var(--shadow-soft-color);--radius:6px;--radius-panel:8px;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--control-height:32px;--control-compact:28px;--control-tool:36px;--icon-size:16px;--icon-tool:20px;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;color:var(--text);background:var(--bg);font:var(--text-body)/var(--line-height) var(--font-ui);font-synthesis:none;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button,.ui-button{min-height:var(--control-height);border:1px solid var(--border);border-radius:var(--radius);background:var(--control);color:var(--text);font-size:var(--text-label);line-height:var(--line-height);white-space:nowrap;cursor:pointer;padding:5px 10px;font-weight:400;transition:background-color .12s,color .12s,border-color .12s}button:hover:not(:disabled){background:var(--hover);border-color:var(--border-strong)}button:disabled,input:disabled,select:disabled,textarea:disabled{opacity:.5;cursor:default}:where(button,input,select,textarea,canvas,a,summary,[tabindex]):focus-visible{outline:2px solid var(--accent);outline-offset:2px}button.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-weight:var(--weight-medium)}button.primary:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover);color:var(--on-accent)}.ui-button-ghost{background:0 0;border-color:#0000}.ui-button-compact{min-height:var(--control-compact);padding:3px 8px}.ui-button-icon{width:var(--control-height);height:var(--control-height);flex-shrink:0;place-items:center;padding:0;display:inline-grid}.ui-button-icon.ui-button-compact{width:var(--control-compact);height:var(--control-compact)}button>svg.lucide,label>svg.lucide{width:var(--icon-size);height:var(--icon-size);vertical-align:middle;stroke-width:1.75px;flex-shrink:0}input,select,textarea,.ui-field{border:1px solid var(--border);border-radius:var(--radius);background:var(--control);min-width:0;color:var(--text);line-height:var(--line-height);font-size:var(--text-label);padding:5px 8px}input:not([type=checkbox]):not([type=radio]):not([type=range]),select{min-height:var(--control-height)}input[type=checkbox],input[type=radio],input[type=range]{accent-color:var(--accent)}input[type=range]{padding:0}label{align-items:center;gap:var(--space-2);color:var(--text);font-size:var(--text-label);display:inline-flex}h2{font-size:var(--text-label);font-weight:var(--weight-medium);line-height:var(--line-height);letter-spacing:0;text-transform:none;margin:0}small{font-size:var(--text-small);color:var(--muted)}.mono{font-family:var(--mono)}*{box-sizing:border-box}body{margin:0}button:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}input[type=checkbox]{accent-color:var(--accent);margin:0 5px 0 0}input[type=color]{width:35px;height:30px;padding:2px}input[type=number]{width:62px}h1,h2,p{margin-top:0}.muted{color:var(--muted);line-height:1.6}.button-row{flex-wrap:wrap;align-items:center;gap:5px;display:flex}.button-row button{font-size:var(--text-label);padding:5px 7px}.app{flex-direction:column;min-width:0;height:100dvh;display:flex;overflow:hidden}.topbar{flex-shrink:0;align-items:center;display:flex}.brand{color:var(--text);white-space:nowrap;align-items:center;font-weight:700;text-decoration:none;display:flex}.brand-icon{color:var(--accent);font-size:29px;line-height:1}.version{font-size:var(--text-label);color:var(--muted);letter-spacing:0;margin-left:3px;font-weight:400}.top-actions{align-items:center;display:flex}.top-actions button{font-size:var(--text-label)}.project-identity select{width:100%;max-width:220px}.project-identity [role=status]{max-width:210px}.version{display:none}.save-status{font-size:var(--text-small);color:var(--success)}.pending-text{color:var(--accent)}.error-text{color:var(--danger)}.error{background:var(--danger-surface);color:var(--danger);padding:10px}aside section{border-bottom:1px solid var(--border);padding:16px 12px}.section-heading{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.section-heading h2 span{color:var(--muted);padding-left:5px;font-weight:400}.section-heading>button{color:var(--text);background:0 0;border:0;padding:0 5px;font-size:20px}.selected,button[aria-pressed=true]{background:var(--selected);border-color:var(--accent)}.thumbnail{object-fit:contain;width:42px;height:42px;image-rendering:pixelated;background:repeating-conic-gradient(var(--checker-light) 0 25%, var(--checker-dark) 0 50%) 0/8px 8px;border-radius:3px}.animation-row{width:100%;font-size:var(--text-label);background:0 0;border-color:#0000;justify-content:space-between;margin-bottom:5px;display:flex}.animation-row.selected{background:var(--selected);border-color:var(--accent)}.center{flex-direction:column;min-height:0;display:flex;position:relative}.drawing-area{flex:1;min-height:0;display:flex}.tools{background:var(--sidebar);border-right:1px solid var(--border);flex-direction:column;flex-shrink:0;align-items:center;gap:6px;min-height:0;padding-top:9px;display:flex;overflow-y:auto}.tools button{background:0 0;border-color:#0000;flex-shrink:0}.tools button[aria-pressed=true]{border-color:var(--accent)}.canvas-host{flex:1;min-width:0;min-height:0;position:relative}.canvas-host>canvas{touch-action:none;width:100%;height:100%;display:block}.swatches{margin-bottom:12px}.swatches button{color:var(--panel);text-shadow:0 1px 3px var(--black);font-family:var(--font-ui);background:repeating-conic-gradient(var(--checker-light) 0 25%, var(--checker-dark) 0 50%) 0/8px 8px}.layer-row{align-items:center;display:flex}.layer-row button{text-align:left;font-size:var(--text-label);background:0 0;border:0;flex:1;padding:5px}.layer-row small{font-size:var(--text-small)}.layer-row+.button-row{margin-top:12px}.dock-tabs{border-bottom:1px solid var(--border);flex-shrink:0;align-items:center;gap:3px;display:flex}.dock-tabs>button,.panel-tabs>button{height:100%;color:var(--muted);font-size:var(--text-label);background:0 0;border:0;border-radius:0;padding:0 11px}.panel-tabs>button[aria-selected=true]{color:var(--accent);border-bottom:2px solid var(--accent)}.source-actions{align-items:center;gap:7px;margin-left:auto;display:flex}.source-actions span{font-size:var(--text-small);color:var(--accent)}.source-actions button{font-size:var(--text-label);padding:4px 9px}.dock-content{flex:1;min-height:0;overflow:auto}.history-list{padding:10px}.history-list table{border-collapse:collapse;text-align:left;width:100%}.history-list th,.history-list td{border-bottom:1px solid var(--border);padding:8px 12px}.history-list th{color:var(--muted);font-size:var(--text-label)}.history-list td:first-child,.history-list td:last-child{white-space:nowrap;width:1%}.source-workspace .source-actions{flex-wrap:wrap;gap:6px;margin-bottom:12px;display:flex}.diagnostics{line-height:1.6;font-size:var(--text-label)}.animation-toolbar{align-items:center;display:flex}.animation-toolbar button{font-size:var(--text-label);padding:5px 10px}.empty-note{color:var(--muted);padding:30px}.welcome{width:680px;max-width:90%;margin:65px auto;overflow:auto}.eyebrow{font-size:var(--text-small);letter-spacing:.17em;color:var(--accent);margin-bottom:22px}.welcome h1{font-size:56px;font-weight:var(--weight-medium);letter-spacing:-2px;margin-bottom:22px;line-height:1.09}.welcome h1 span{color:var(--accent)}.welcome>p{font-size:var(--text-heading);color:var(--muted);margin-bottom:25px;line-height:1.7}.welcome>.button-row button{font-size:var(--text-label);padding:11px 20px}.recent{border-top:1px solid var(--border);margin-top:45px;padding-top:24px}.recent h2{margin-bottom:15px}.recent-row{align-items:center;display:flex}.recent-row>button:first-child{text-align:left;background:0 0;border:0;flex:1;justify-content:space-between;padding:12px 0;display:flex}.recent-row>button:last-child{color:var(--muted);background:0 0;border:0}.modal-backdrop{justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.dialog{background:var(--panel);border:1px solid var(--border);box-shadow:0 24px 100px var(--shadow-soft-color);overflow:auto}.dialog header{justify-content:space-between;align-items:center;display:flex}.dialog header h2{text-transform:none}.dialog header button{min-height:var(--control-compact);border:0;font-size:23px}.dialog form>label{align-items:stretch;gap:var(--space-2);flex-direction:column;margin-bottom:18px;display:flex}.dialog input{width:100%}.dialog form>label.aspect-lock{flex-direction:row;align-items:center}.dialog .aspect-lock input{width:auto}.dialog input[type=color]{height:40px}.dimensions{align-items:center;gap:var(--space-4);margin:20px 0;display:flex}.dimensions label{flex-direction:column;flex:1;align-items:stretch}.dialog-footer{justify-content:flex-end;gap:var(--space-2);display:flex}.dialog p{font-size:var(--text-label);line-height:1.7}.recovery{padding:30px;overflow:auto}.recovery textarea{width:100%;min-height:300px;margin-bottom:15px;display:block}.error button{font-size:var(--text-label)}.dialog input[type=number]{width:100%}.canvas-previews{gap:var(--space-3);display:flex}.canvas-previews figure{flex:1;min-width:0;margin:0}.canvas-previews figcaption{font-size:var(--text-label);margin-bottom:8px}.canvas-preview{background:repeating-conic-gradient(var(--control) 0% 25%, var(--checker-dark) 0% 50%) 0 0 / 16px 16px;place-items:safe center;height:110px;display:grid;overflow:auto}.canvas-preview canvas{image-rendering:pixelated}.dialog:has(.canvas-form){width:min(640px,95vw)}.dialog:has(.canvas-form) header{margin-bottom:12px}.dialog .canvas-form>label{gap:var(--space-1);margin-bottom:8px}.canvas-form .dimensions{margin:12px 0}.canvas-form p{margin:8px 0}.canvas-form .dialog-footer{margin-top:12px}.animation-toolbar{flex-wrap:wrap}.cel-table-scroll{height:100%;min-height:0;overflow:auto}.cel-table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:max-content;font-size:var(--text-small)}.cel-table th,.cel-table td{border-right:1px solid var(--border);border-bottom:1px solid var(--border);background:var(--sidebar);min-width:28px;height:28px;padding:0}.cel-table thead th{z-index:2;font-weight:400;position:sticky;top:0}.cel-table tbody th,.cel-table .timeline-layer-heading{z-index:3;width:220px;min-width:220px;max-width:220px;position:sticky;left:0}.cel-table .timeline-layer-heading{z-index:4;text-align:left}.cel-table .cel-button,.cel-table .step-handle{width:28px;height:27px;min-height:0;font-size:var(--text-small);background:0 0;border:0;border-radius:0;place-items:center;padding:0;display:grid}.cel-dot{border:1px solid var(--muted);border-radius:50%;width:8px;height:8px}.cel-dot.occupied{background:var(--muted)}.cel-table .selected-column,.cel-table .selected-layer{background:var(--selected)}.cel-table .playing-column{background:color-mix(in srgb, var(--accent) 28%, var(--sidebar));box-shadow:inset 0 2px var(--accent)}.cel-table .cel-button[data-selected=true]{box-shadow:inset 0 0 0 2px var(--accent);background:var(--selected)}.cel-table button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.sheet-options{gap:var(--space-2);border:1px solid var(--border);display:grid}.sheet-options label{justify-content:space-between;gap:var(--space-2);display:flex}.sheet-options input,.sheet-options select{max-width:220px}.tool-options{background:var(--panel)}.tool-options strong{font-size:var(--text-label);min-width:55px}.tool-options label{font-size:var(--text-label)}.tool-options input[type=number]{width:50px}.active-options{min-width:0;font-size:var(--text-small);color:var(--accent);text-overflow:ellipsis;overflow:hidden}.canvas-footer{justify-content:space-between;align-items:center;gap:var(--space-2);border-top:1px solid var(--border);font-size:var(--text-small);display:flex}.canvas-footer>span{white-space:nowrap;text-overflow:ellipsis;color:var(--muted);overflow:hidden}.canvas-footer button,.canvas-footer select{padding:3px 6px}.tools{width:48px}.tools svg{width:var(--icon-tool);height:var(--icon-tool);vertical-align:middle}.chevron{color:var(--muted);margin-left:6px}.popover{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);width:max-content;min-width:200px;max-width:min(380px,100vw - 16px);max-height:calc(100dvh - 16px);box-shadow:0 12px 40px var(--shadow-soft-color);flex-direction:column;display:flex;position:fixed;overflow:auto}.popover label{justify-content:space-between;gap:var(--space-3);display:flex}.popover p{max-width:300px;margin:0;line-height:1.6}.popover section{padding:0}.popover .button-row{flex-direction:column;align-items:stretch;display:flex}.command-menu{gap:3px;padding:6px}.command-menu button{text-align:left;background:0 0;border-color:#0000}.command-menu button:hover:not(:disabled){background:var(--selected)}.popover .animation-toolbar{flex-direction:column;align-items:stretch;margin:0}.paste-actions{z-index:5;border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 4px 16px var(--shadow-soft-color);justify-content:center;align-items:center;gap:var(--space-2);background:var(--selected);padding:6px;display:flex;position:absolute;bottom:48px;left:56px}.dock-close{margin-left:auto}.dock .dock-content{min-height:0}.source-editor{height:calc(100% - 38px);min-height:160px}.diagnostics{padding:8px 12px}.diagnostics summary{cursor:pointer}.diagnostics p{margin:8px 0}.animation-panel{padding:8px 12px}.animation-toolbar{gap:var(--space-2);margin-bottom:8px}.animation-toolbar .muted{font-size:var(--text-small)}.dialog{border-radius:var(--radius-panel);width:min(460px,100vw - 32px);max-height:calc(100dvh - 32px)}.dialog input[type=checkbox]{width:auto}.dialog-footer{background:var(--panel);margin-top:16px;padding-block:12px;position:sticky;bottom:-20px}.export-help{color:var(--muted);margin:12px 0}.export-help summary{cursor:pointer}.export-help p{margin:8px 0}.export-context{color:var(--muted)}.sheet-options{margin:12px 0;padding:12px}@media (width<=1199px){.brand{font-size:var(--text-heading)}.brand-icon{font-size:22px}.topbar{gap:10px}.project-identity{flex-wrap:wrap;gap:2px 6px}.project-identity select{max-width:180px}.project-identity [role=status]{font-size:var(--text-small);max-width:180px}}@media (width>=1024px) and (width<=1100px){.layer-row{padding:3px 0}.layer-row .layer-toggle{font-size:var(--text-small);padding-inline:3px}}.shape-options{gap:var(--space-2);flex-shrink:0;display:flex}@media (width<=1023px){.center{grid-column:1}.brand{gap:0;font-size:0}.brand-icon{font-size:24px}.topbar{gap:var(--space-2);padding-inline:8px}.top-actions{gap:var(--space-1)}.top-actions>button,.top-actions>span>button{padding-inline:6px}.tool-options{gap:5px}}.panel-tabs{align-items:stretch;height:100%;display:flex}.tools .palette-toggle{margin-bottom:10px}.frames-panel .animation-panel{padding:0}.lucide{stroke-width:1.75px;vertical-align:middle;flex-shrink:0;width:16px;height:16px}.lucide.brand-icon{width:24px;height:24px}button>.chevron{margin-left:2px}.application-body{flex:1;min-height:0;position:relative}.editor-column,.file-editor{flex-direction:column;flex:1;min-width:0;min-height:0;display:flex}.file-tabbar{min-width:0;display:flex}.file-tabs{min-width:0;display:flex;overflow-x:auto}.file-tab{border-right:1px solid var(--border);border-top:2px solid #0000;display:flex}.file-tab.active{border-top-color:var(--accent)}.file-tab button{background:0 0;border:0;align-items:center;display:flex}.file-tab [role=tab]>span:first-of-type{text-overflow:ellipsis;overflow:hidden}.file-dirty{color:var(--accent);font-size:8px}.document-tabs{z-index:8;background:var(--panel);border-radius:var(--radius-panel);box-shadow:0 1px 4px var(--shadow-soft-color);gap:2px;padding:3px;display:flex;position:absolute;top:54px;left:50%;transform:translate(-50%)}.document-tabs button{color:var(--muted);padding:5px 14px}.document-tabs button[aria-selected=true]{box-shadow:0 1px 2px var(--shadow-soft-color)}.source-pane{background:var(--panel);flex-direction:column;flex:1;min-height:0;padding:58px 12px 12px;display:flex;overflow:hidden}.source-pane .source-editor{flex:1;height:auto;min-height:0;overflow:hidden}.source-pane .diagnostics{flex:none;max-height:28%;overflow:auto}.empty-editor{color:var(--muted);text-align:center;flex-direction:column;flex:1;justify-content:center;align-items:center;padding:24px;display:flex}.empty-editor h1{color:var(--text);font-size:20px}input[type=checkbox],input[type=range]{accent-color:var(--accent)}.topbar{border:0}.project-identity{flex-direction:column;flex:1;min-width:0}.current-filename{text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-size:var(--text-label);overflow:hidden}.top-actions>button{background:0 0}.top-actions>button.primary{background:var(--accent)}.file-quick-actions{border-right:1px solid var(--border);gap:2px;margin-right:4px;padding-right:8px;display:flex}.file-quick-actions button{background:0 0;padding:6px}.center{min-width:0}aside section{border:0}aside section+section{border-top:1px solid var(--border)}.tools button{font-size:var(--text-label)}.tool-options{border-bottom:1px solid var(--border);white-space:normal;flex-wrap:wrap;flex:none;align-items:center;gap:6px;padding:10px 2px;display:flex}.tool-options strong{width:100%}.tool-options>button{background:var(--sidebar);justify-content:space-between;width:100%}.active-options{white-space:normal;line-height:1.5}.shape-options{flex-direction:column;align-items:stretch}.file-tab{margin-right:4px}.file-tab button{border-radius:var(--radius)}.file-tab:not(.active)+.file-tab:not(.active){border-left:1px solid var(--border)}.canvas-footer,.canvas-footer>div{flex-wrap:wrap}.panel-tabs>button{border-radius:var(--radius)}.panel-tabs>button[aria-selected=true]{background:var(--selected);border:0}.layer-row button:first-of-type{flex-basis:80px}.popover{z-index:50;transform-origin:top}.popover.is-open{animation:.14s ease-out menu-in}.popover.is-closing{opacity:0;pointer-events:none;transition:opacity .1s,transform .1s;transform:translateY(-4px)}button[data-active=true]{background:var(--selected);color:var(--accent)}button[data-active=true]:before{content:"";background:var(--selected);border-radius:50%;width:5px;height:5px}.tooltip{pointer-events:none;border-radius:var(--radius);max-width:min(300px,100vw - 16px);font-size:var(--text-label);box-shadow:0 3px 12px var(--shadow-soft-color);padding:6px 9px;line-height:1.4;position:fixed}.modal-backdrop{-webkit-backdrop-filter:none;backdrop-filter:none}.dialog{max-width:calc(100vw - 24px)}.layers-drawer-trigger{display:none}@keyframes menu-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@media (width<=1199px){.file-quick-actions{display:none}}@media (width<=1023px){.center{grid-column:2}.layers-drawer-trigger{display:inline-flex}.brand{font-size:0}.topbar{gap:6px}}@media (pointer:coarse){:root{--control-height:44px}.tools button{min-width:44px;min-height:44px}.swatches button{min-height:44px}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}.current-colour{box-shadow:inset 0 0 0 1px var(--shadow-soft-color);place-items:center;display:grid}.current-colour svg{color:#fff;filter:drop-shadow(0 1px 2px var(--black))}@media (width<=1023px){.top-actions>button.layers-drawer-trigger{display:inline-flex}}.swatches button{box-shadow:inset 0 0 0 1px var(--border-subtle)}.topbar>button[aria-label="Toggle file Explorer"]{background:0 0}.project-identity{grid-template-rows:auto auto;grid-template-columns:minmax(0,1fr) auto;align-items:center}.project-identity>strong{grid-area:1/1}.project-identity>[role=status]{grid-area:2/1}.project-identity>button{grid-area:1/2/3}.popover label:has(>input[type=checkbox]){justify-content:flex-start;gap:var(--space-2)}.dialog .new-project-aspect-lock{align-items:center;gap:var(--space-2);margin-bottom:12px;display:flex}.sprite-size-presets{flex-wrap:wrap;gap:6px;margin-bottom:20px;display:flex}.sprite-size-presets button{font-size:var(--text-label);flex:1 0 auto;padding:6px 8px}.sprite-size-presets button[aria-pressed=true]{color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.dock .dock-content:has(.animation-panel){overflow:hidden}.frames-panel,.frames-panel>div{height:100%;min-height:0}.frames-panel{padding:6px 8px}.frames-panel .animation-panel{gap:var(--space-1);flex-direction:column;height:100%;min-height:0;display:flex}.animation-panel>.animation-toolbar{gap:var(--space-1);flex-wrap:wrap;flex-shrink:0;margin:0}.animation-panel>.animation-toolbar button{padding:4px 7px}.timeline-layers{flex:1;min-height:0}.cel-table .layer-row{border-radius:0;flex-wrap:nowrap;gap:2px;height:27px;min-height:27px;margin:0;padding:0 3px}.cel-table .layer-row button{height:25px;font-size:var(--text-label);min-width:0;padding:2px}.cel-table .layer-row button:first-of-type{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}@media (width<=600px){.cel-table tbody th,.cel-table .timeline-layer-heading{width:164px;min-width:164px;max-width:164px}.animation-panel>.animation-toolbar>.muted{display:none}}.cel-table .timeline-layer-heading{padding-left:8px}.cel-table .layer-row button{width:100%}.animation-toolbar [aria-label=Animation\ settings]{margin-right:auto}.cel-table .cel-button[aria-disabled=true]{opacity:.5}body{overscroll-behavior:none}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--scrollbar);border-radius:99px}.topbar{border-bottom:1px solid var(--border)}.brand{letter-spacing:-.2px;order:0}.brand .brand-icon{flex-shrink:0;width:24px;height:24px}.topbar>button[aria-label="Toggle file Explorer"]{order:-1;width:26px;padding:4px}.topbar>button[aria-label="Toggle file Explorer"] svg{width:var(--icon-size)}.file-tabbar{background:var(--bg);border:0;flex-shrink:0;margin:0}.file-tabs{gap:var(--space-1);scrollbar-width:none;height:30px;overflow-y:hidden}.file-tabs::-webkit-scrollbar{display:none}.file-tab{color:var(--muted);border:0;flex-shrink:0;align-items:stretch;margin:0;position:relative}.file-tab.active{color:var(--accent);border-color:#0000}.file-tabbar>button{background:0 0;align-self:center;margin:0 4px 3px;padding:4px}.empty-editor{background:var(--canvas-bg);position:relative}.empty-state{align-items:center;gap:var(--space-4);text-align:center;max-width:520px;color:var(--muted);flex-direction:column;padding:40px 24px;display:flex}.empty-state>img{margin-bottom:8px}.empty-state h1{font-size:22px;font-weight:var(--weight-medium);color:var(--muted);margin:0;line-height:1.35}.empty-state p{font-size:var(--text-body);color:var(--muted);margin:0;line-height:1.6}.empty-actions{gap:28px;margin-top:8px;display:flex}.empty-actions button,.empty-actions button:hover:not(:disabled){box-shadow:none;color:var(--muted);font-size:var(--text-label);font-weight:var(--weight-medium);background:0 0;border:0;padding:6px 0}.empty-actions .empty-new-file{color:var(--accent)}.empty-actions button:hover:not(:disabled){color:var(--accent);text-underline-offset:4px;text-decoration:underline}.empty-editor>.file-tabbar{position:absolute;inset:0 0 auto}.file-tab button{font-family:var(--font-ui);font-size:var(--text-label);gap:5px;padding:4px 6px}.file-tab>[role=tab]{border-radius:6px 6px 0 0;flex:1;height:100%;min-height:0;padding-right:30px}.file-tab button:hover:not(:disabled){background:0 0}.file-tab>button:last-child{padding:4px;position:absolute;top:50%;right:2px;transform:translateY(-50%)}.file-tab [role=tab]>span:first-of-type{max-width:170px}.file-tab svg{color:var(--muted)}.file-tab>button:last-child:hover svg,.file-tab>button:last-child:focus-visible svg,.file-dirty{color:var(--accent)}.file-tab:not(.active)>button:last-child{opacity:0}.file-tab:hover>button:last-child,.file-tab:focus-within>button:last-child{opacity:1}.file-quick-actions,.current-filename{display:none}.project-identity{z-index:15;pointer-events:none;gap:6px;bottom:5px;right:300px}.project-identity button{pointer-events:auto}.project-identity [role=status]{font-size:var(--text-small)}.top-actions{flex-shrink:0;gap:2px;margin-left:0}.header-action-spacer{flex:1}.top-actions>button{height:27px;min-height:0;font-size:var(--text-label);padding:4px 6px}.top-actions>button svg{width:var(--icon-size);height:var(--icon-size)}.top-actions>.primary{box-shadow:0 1px 2px var(--selection-border);padding:4px 12px}.navigator-tree{flex:1;padding:0 6px;overflow:auto}.tree-children{border-left:1px solid var(--border-subtle);margin-left:10px;padding-left:6px}.tools button{color:var(--muted);place-items:center;padding:0;display:grid}.tools button svg{width:var(--icon-tool);height:var(--icon-tool);stroke-width:1.7px}.tools button[aria-pressed=true]{color:var(--accent);background:var(--selected);border:0}.tools .palette-toggle{margin-top:8px;display:grid}.tools .tool-divider{border:0;border-top:1px solid var(--border);width:100%}.current-colour{border-radius:3px;width:24px;height:24px;position:relative}.current-colour svg{display:none}.rail-background{border:1px solid var(--shadow-color);border-radius:3px;width:14px;height:14px;position:absolute;bottom:-4px;right:-4px}.context-rail>button,.context-rail .selection-tool-actions>button,.context-rail>.context-toggle{width:32px;height:var(--control-height);min-height:var(--control-height);border-radius:var(--radius);color:var(--muted);cursor:pointer;background:0 0;border:0;flex-shrink:0;place-items:center;margin:0;padding:0;display:grid;position:relative}.context-rail svg{width:var(--icon-tool);height:var(--icon-tool)}.context-rail .selection-tool-actions{align-items:center;gap:var(--space-1);flex-direction:column;flex:none;width:100%;display:flex}.context-toggle input{opacity:0;cursor:pointer;width:100%;height:100%;margin:0;position:absolute;inset:0}.context-toggle:hover{background:var(--control)}.context-toggle[data-active]{color:var(--accent);background:var(--selected)}.context-toggle[data-disabled]{opacity:.4;cursor:default}.context-toggle:focus-within{outline:2px solid var(--accent);outline-offset:1px}.context-rail hr{border:0;border-top:1px solid var(--border);width:100%;margin:4px 0}.inspector-content{flex-direction:column;flex:1;min-height:0;display:flex;overflow-y:auto}.inspector-content>section{flex-direction:column;flex-shrink:0;padding:12px;display:flex}.inspector-content>section+section{border-top:1px solid var(--border);flex-grow:1}.section-heading{margin:0 0 8px}.section-heading button{background:0 0;padding:3px}.layer-properties{gap:6px;margin-bottom:8px;display:flex}.layer-properties label{font-size:var(--text-small);background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);flex:1;gap:3px;padding:4px}.layer-properties select,.layer-properties input{font-size:var(--text-small);background:0 0;border:0;padding:0}.layer-properties input{width:34px}.layer-properties select{width:65px}.layer-row{gap:var(--space-1);border-radius:var(--radius);border:1px solid #0000;flex-wrap:nowrap;min-height:34px;margin:1px 0;padding:4px 6px}.layer-row:hover{background:var(--bg)}.layer-row button:first-of-type:hover{background:0 0}.layer-row.selected{border-color:var(--selection-border);background:var(--selected)}.layer-row button:first-of-type{font-size:var(--text-label);font-weight:var(--weight-medium);text-overflow:ellipsis;min-width:0;padding:2px;overflow:hidden}.layer-row .layer-toggle{font-size:var(--text-small);color:var(--muted);flex:0;padding:2px}.layer-row input{width:12px;height:12px}.inspector-content>section>button[aria-haspopup]{font-size:var(--text-label);align-self:flex-start;margin-top:10px}.color-strip{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-panel);align-items:center;gap:10px;margin-bottom:10px;padding:8px;display:flex}.color-strip>div{flex:1;min-width:0}.color-strip small{font:var(--text-small)/var(--line-height) var(--mono);display:block}.color-strip .hex-input{width:100%;font:600 var(--text-small)/var(--line-height) var(--mono);background:0 0;border:0;padding:0}.color-strip>button{background:0 0;padding:2px}.swatches{gap:var(--space-1);border:1px solid var(--border);border-radius:var(--radius-panel);background:var(--bg);grid-template-columns:repeat(8,minmax(0,1fr));padding:6px;display:grid}.swatches button{aspect-ratio:1;border:0;border-radius:2px;width:100%;height:auto;min-height:0;padding:0;font-size:0}.swatches button[aria-pressed=true]{outline:2px solid var(--accent);outline-offset:2px;transform:scale(1.05)}.palette-hint{font-size:var(--text-small);color:var(--muted);margin:8px 0}.shading-ramp{margin-top:4px}.shading-ramp>div:first-child{color:var(--muted);font-size:var(--text-small);justify-content:space-between;align-items:center;display:flex}.shading-ramp>div:first-child button{color:var(--accent);font:var(--text-small)/var(--line-height) var(--mono);background:0 0;padding:4px 0}.ramp-colors{border-radius:var(--radius);display:flex;overflow:hidden}.ramp-colors button{height:22px;font:var(--text-small)/var(--line-height) var(--mono);border-radius:0;flex:1;padding:0}.center{background:var(--canvas-bg);grid-area:1/1;overflow:hidden}.drawing-area{position:relative}.canvas-host>canvas[data-pointer-focus]:focus{outline:none}.canvas-host{background:0 0;border-radius:0;margin:0}.canvas-footer{height:27px;min-height:27px;font:var(--text-small)/var(--line-height) var(--font-ui);background:0 0;border:0;padding:0 12px}.canvas-footer>.canvas-helper{align-items:center;gap:var(--space-3);color:var(--muted);font:var(--text-small)/var(--line-height) var(--font-ui);pointer-events:none;-webkit-user-select:none;user-select:none;display:flex}.canvas-footer>div{margin-left:auto}.canvas-footer button,.canvas-footer select,.canvas-footer label{font-size:var(--text-small);min-height:0;padding:2px 4px}.dock-tabs{background:var(--bg);order:0;height:29px;min-height:29px;padding:0 8px}.panel-tabs>button{height:24px;font-size:var(--text-label);padding:0 8px}@media (width<=1199px){.topbar{gap:var(--space-1)}}@media (width<=1023px){.top-actions>button.layers-drawer-trigger{display:flex}.file-tab [role=tab]>span:first-of-type{max-width:110px}.project-identity{right:12px}}@media (width<=767px){.brand{font-size:0}.top-actions>button{font-size:var(--text-label);padding:3px}.top-actions>button[aria-label=Undo],.top-actions>button[aria-label=Redo]{display:none}.file-tab [role=tab]>span:first-of-type{max-width:80px}}@media (pointer:coarse){.context-rail>button,.context-rail .selection-tool-actions>button,.context-rail>.context-toggle{width:44px;height:44px;min-height:44px}.tools button{min-width:44px;min-height:44px}.swatches{grid-template-columns:repeat(5,minmax(0,1fr))}.swatches button{min-height:44px}}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400 500;font-display:swap;src:url(/fonts/jetbrains-mono-regular.ttf)format("truetype")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:600 700;font-display:swap;src:url(/fonts/jetbrains-mono-semibold.ttf)format("truetype")}.layer-row button{min-height:24px}.layer-visibility{width:16px;height:20px;color:var(--muted);flex-shrink:0;position:relative}.layer-visibility input{opacity:0;cursor:pointer;width:100%;height:100%;position:absolute;inset:0}.layer-visibility:focus-within{outline:2px solid var(--accent);outline-offset:2px}.layer-row.selected .layer-visibility{color:var(--accent)}.layer-row .layer-toggle[aria-pressed=true]{color:var(--accent);background:var(--selected)}.inspector-content section>.section-heading{margin-bottom:8px}@media (pointer:coarse){:root{--control-height:44px}.layer-row button{min-height:44px}.layer-visibility{width:30px;height:44px}}.layer-row.selected button:first-of-type{color:var(--text);font-weight:var(--weight-medium);background:0 0}.count-badge{font:var(--text-small)/var(--line-height) var(--font-ui);color:var(--muted);background:var(--bg);border:1px solid var(--border);border-radius:3px;margin-left:5px;padding:0 4px;display:inline-block}.navigator-tree[data-drop-target=true]{box-shadow:inset 0 0 0 2px var(--accent)}.context-menu{z-index:100;min-width:190px;max-width:min(300px,100vw - 16px);max-height:calc(100vh - 16px);position:fixed;overflow-y:auto}.context-menu>button{justify-content:space-between;gap:var(--space-4);text-align:left;width:100%;display:flex}.context-menu>button.danger-action{color:var(--danger);background:0 0}.context-menu-divider{background:var(--border);height:1px;margin:6px 4px}.context-menu>button.danger-action:hover:not(:disabled),.context-menu>button.danger-action:focus-visible:not(:disabled){color:var(--danger);background:var(--danger-surface)}.brush-outline{pointer-events:none;width:100%;height:100%;position:absolute;inset:0;overflow:hidden}.animated-logo{vertical-align:middle;flex-shrink:0;line-height:0;display:inline-block}.animated-logo>svg{width:100%;height:100%;display:block;overflow:visible}.palette-preview{border-radius:var(--radius);width:100%;height:20px;box-shadow:0 0 0 1px var(--border);display:flex;overflow:hidden}.palette-preview>span{flex:1;min-width:0}.palette-preset-list{gap:var(--space-1);width:min(280px,100vw - 48px);display:grid}.palette-preset-list>button{gap:var(--space-2);text-align:left;height:auto;padding:10px;display:grid}.palette-preset-name{justify-content:space-between;gap:var(--space-4);display:flex}.palette-preset-name>span{color:var(--muted);font:var(--text-small)/var(--line-height) var(--font-ui)}.section-heading>button[aria-label=Palette\ presets]{font-size:var(--text-label);width:auto;padding:3px 6px}.colour-tools{gap:var(--space-2);grid-template-columns:minmax(0,1fr);display:grid}.colour-tools label{font-size:var(--text-small);align-items:center;gap:5px;display:flex}.colour-tools .colour-tool-field{gap:var(--space-1);display:grid}.colour-tools select{width:100%;min-width:0;font-size:var(--text-small)}.colour-tools input[type=range]{width:100%;min-width:0;margin:0;padding:0}.colour-tools input[type=checkbox]{margin:0}.colour-tools-heading,.colour-tools-actions{justify-content:space-between;align-items:center;gap:6px;display:flex}.colour-tools-actions button{font-size:var(--text-label);padding:3px 6px}.colour-tools .palette-hint{margin:0}.colour-tools .ramp-colors{gap:2px;overflow:visible}.colour-tools .ramp-colors button{background:repeating-conic-gradient(var(--text) 0% 25%, var(--panel) 0% 50%) 0 / 8px 8px;min-width:0;height:28px}.colour-tools .ramp-colors button span{width:100%;height:100%;display:block}.layer-resize-overlay,.layer-rotate-overlay{pointer-events:none;position:absolute;inset:0;overflow:hidden}.layer-resize-box,.layer-rotate-box{border:1px dashed var(--accent);position:absolute}.layer-resize-handle{border:2px solid var(--accent);pointer-events:auto;touch-action:none;background:#fff;border-radius:2px;width:12px;height:12px;min-height:0;padding:0;position:absolute;transform:translate(-50%,-50%)}.layer-resize-size,.layer-rotate-angle{background:var(--panel);color:var(--text);font:var(--text-small)/var(--line-height) var(--font-ui);white-space:nowrap;padding:2px 4px;position:absolute}.layer-resize-empty{color:var(--muted);font-size:var(--text-label);pointer-events:none;position:absolute;top:12px;left:12px}.layer-rotate-empty{left:120px}.lasso-outline{pointer-events:none;filter:drop-shadow(0 0 1px #000);width:100%;height:100%;position:absolute;inset:0;overflow:hidden}.lasso-outline path{fill:none;stroke:var(--accent);stroke-width:2px}.lasso-outline .lasso-closing-line{stroke-dasharray:4 4;opacity:.6}.lasso-status{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-panel);font-size:var(--text-label);pointer-events:none;padding:6px 8px;position:absolute;top:16px;left:120px}.layer-rotate-stem{border-left:1px solid var(--accent);height:30px;position:absolute;top:-30px;left:50%}.layer-rotate-center{border:1px solid var(--accent);border-radius:50%;width:6px;height:6px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.layer-rotate-handle{pointer-events:auto;touch-action:none;cursor:grab;background:0 0;border:0;border-radius:50%;width:24px;height:24px;min-height:0;padding:0;position:absolute;transform:translate(-50%,-50%)}.layer-rotate-handle:after{content:"";border:2px solid var(--accent);background:var(--panel);border-radius:2px;position:absolute;inset:6px}.layer-rotate-handle[data-stem]:after{border-radius:50%}.layer-rotate-overlay[data-dragging] .layer-rotate-handle{cursor:grabbing}body:has(.layer-rotate-overlay[data-dragging])>.tooltip{display:none}[hidden]{display:none!important}.tools button[aria-pressed=true]{color:var(--accent);font-weight:var(--weight-medium)}button:focus-visible{outline-color:var(--accent)}.topbar{gap:var(--space-3);background:var(--bg);height:48px;min-height:48px;padding:0 18px}.brand{font-size:var(--text-body);gap:var(--space-2)}.brand .version{color:var(--muted);font-size:var(--text-small);display:inline}.brand-icon{filter:grayscale()}.topbar>button[aria-label=Home]{place-items:center;padding:6px;display:grid}.project-identity{order:5;max-width:260px;margin-left:auto;display:flex;position:static}.is-home .project-identity{display:none}.project-identity [role=status]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.top-actions{flex:0 auto}.top-actions>button.layers-drawer-trigger{display:flex}.file-tabbar{border-bottom:1px solid var(--border);align-items:center;gap:5px;height:38px;min-height:38px;padding:4px 14px}.file-tabs{align-items:center}.file-tab{border-radius:var(--radius-panel);background:0 0;height:28px}.file-tab.active{background:var(--selected);box-shadow:inset 0 -2px var(--accent)}.file-tab.active:after{display:none}.file-tab button{color:var(--muted)}.file-tab.active button{color:var(--accent)}.application-body,.editor-column,.file-editor,.editor-session,.home-container{flex:1;min-width:0;min-height:0}.application-body{display:flex}.file-editor,.editor-session,.home-container{height:100%;display:flex}.editor-session{width:100%}.workspace.floating-workspace{background:var(--canvas-bg);flex:1;width:100%;min-width:0;min-height:0;display:block;position:relative;overflow:hidden}.floating-workspace .center{background:0 0;width:100%;min-width:0;height:100%;display:block;position:static;overflow:visible}.floating-workspace .drawing-area{width:auto;height:auto;padding:0;position:absolute;inset:0}.floating-workspace .canvas-host{background:0 0;width:100%;height:100%}.floating-workspace .document-tabs{z-index:20;border:1px solid var(--border);border-radius:var(--radius-panel);background:var(--panel);box-shadow:0 4px 12px var(--shadow-color);margin:0;position:absolute;inset:auto 14px 14px auto;transform:none}.document-tabs button{border-radius:var(--radius-panel)}.document-tabs button[aria-selected=true]{background:var(--selected);color:var(--accent)}.floating-panel{border:1px solid var(--border-strong);border-radius:var(--radius-panel);background:var(--panel);max-width:calc(100% - 24px);max-height:calc(100% - 24px);box-shadow:0 10px 32px var(--shadow-color), 0 2px 4px var(--shadow-color);pointer-events:auto;flex-direction:column;display:flex;position:absolute;overflow:hidden}.floating-header{border-bottom:1px solid var(--border);background:var(--panel);align-items:center;gap:2px;height:35px;min-height:35px;padding:0 7px;display:flex}.floating-header button{min-width:21px;height:24px;color:var(--muted);background:0 0;border:0;justify-content:center;align-items:center;padding:3px;display:flex}.floating-header .panel-grip{cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;flex:1;justify-content:flex-start;gap:7px;min-width:0}.panel-grip:active{cursor:grabbing}.panel-grip span{font-size:var(--text-small);color:var(--text);text-overflow:ellipsis;overflow:hidden}.floating-header .popover{display:flex}.floating-header .popover-trigger{width:22px}.floating-content{flex:1;min-height:0;padding:10px;overflow:auto}.is-collapsed .floating-header{border-bottom:0}.panel-resize{background:linear-gradient(135deg, transparent 45%, var(--muted) 46%, var(--muted) 51%, transparent 52%, transparent 64%, var(--muted) 65%, var(--muted) 70%, transparent 71%) center / 10px 10px no-repeat;cursor:nwse-resize;touch-action:none;border:0;width:20px;height:20px;min-height:0;padding:0;position:absolute;bottom:2px;right:2px}.snap-guide{z-index:45;pointer-events:none;background:var(--accent);opacity:.8;position:absolute}.snap-guide.vertical{width:1px;top:0;bottom:0}.snap-guide.horizontal{height:1px;left:0;right:0}.floating-panel[data-panel=tools] .floating-header{gap:0;padding:0 4px}.floating-panel[data-panel=tools] .panel-grip span{display:none}.floating-panel[data-panel=tools] .floating-content{padding:8px 5px}.floating-panel .tools{background:0 0;border:0;grid-template-columns:repeat(2,44px);gap:3px;width:auto;padding:0;display:grid}.tools button{border-radius:var(--radius-panel);width:44px;height:44px}.tools .tool-divider{grid-column:1/-1;margin:5px 0}.tools .palette-toggle{margin:0}.floating-panel .context-rail{gap:var(--space-1);background:0 0;border:0;flex-flow:wrap;align-items:center;width:auto;padding:0;display:flex;overflow:visible}.context-rail>button,.context-rail>.context-toggle{border-radius:var(--radius-panel)}.context-rail .context-divider{border-left:1px solid var(--border);width:1px;height:25px}.inspector-content{width:auto;padding:0}.palette-floating .palette{padding:0}.palette-floating .palette-hint{color:var(--muted)}.palette-floating .palette-colors{border-radius:var(--radius-panel)}.floating-panel .canvas-footer{height:auto;min-height:0;font-size:var(--text-small);background:0 0;border:0;flex-direction:column;align-items:stretch;gap:6px;padding:0;display:flex}.canvas-footer>div{align-items:center;gap:var(--space-2);display:flex}.canvas-footer .canvas-helper{gap:var(--space-3);font-size:var(--text-small);display:flex}.timeline-floating .floating-content{flex-direction:column;padding:0 8px 12px;display:flex}.timeline-floating .dock-tabs{background:0 0;border:0;flex-shrink:0;height:30px;padding:3px 0}.timeline-floating .dock-content{flex:1;min-height:0;padding:0;overflow:auto}.timeline-floating .frames-panel{padding:0}.timeline-floating .animation-panel{height:100%}.timeline-floating .timeline-toolbar{padding:3px 0 7px}.timeline-floating button[aria-label=Play]{background:var(--accent);color:var(--on-accent)}.timeline-floating .cel-timeline th,.timeline-floating .cel-timeline td{border-color:var(--border)}.showing-source .floating-panel{display:none}.showing-source .source-workspace{border:1px solid var(--border);border-radius:var(--radius-panel);position:absolute;inset:58px 16px 16px;overflow:hidden}.popover-panel,.context-menu,.modal,[role=dialog]{border-radius:var(--radius-panel)}.popover-panel{z-index:100}.modal-backdrop{z-index:110}.tooltip{z-index:120}.home-container{background:var(--bg);flex-direction:column;overflow:auto}.home-view{width:min(1080px,100%);margin:0 auto;padding:54px 48px 64px}.home-intro{padding-bottom:42px;position:relative}.studio-label{font:var(--text-small)/var(--line-height) var(--font-ui);letter-spacing:.13em;color:var(--accent);align-items:center;gap:10px;margin-bottom:22px;display:flex}.studio-label .animated-logo{filter:grayscale()}.home-intro h1{font-size:clamp(30px,4vw,48px);font-weight:var(--weight-medium);letter-spacing:-1.8px;margin-bottom:18px;line-height:1.12}.home-intro h1 span{color:var(--accent)}.home-intro p{font-size:var(--text-body);color:var(--muted);line-height:1.7}.home-actions{gap:10px;margin-top:24px;display:flex}.home-actions button{border-radius:var(--radius-panel);font-size:var(--text-label);align-items:center;gap:10px;padding:6px 12px;display:flex}.home-section-heading{border-top:1px solid var(--border);justify-content:space-between;align-items:center;padding:25px 0 20px;display:flex}.home-section-heading h2{font-size:var(--text-heading)}.home-section-heading h2 span{color:var(--muted);font:var(--text-small)/var(--line-height) var(--font-ui);margin-left:7px}.home-section-heading>span{font-size:var(--text-small);color:var(--muted)}.project-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:18px;display:grid}.project-card{border-radius:var(--radius-panel);border:1px solid var(--border);background:var(--panel);overflow:hidden}.project-card:hover{border-color:var(--accent)}.project-open{text-align:left;background:0 0;border:0;border-radius:0;width:100%;padding:0;display:block}.project-open:hover:not(:disabled){background:0 0}.project-open:focus-visible{outline-offset:-3px}.project-preview{border-radius:var(--radius-panel);background-color:var(--bg);background-image:radial-gradient(var(--canvas-dot) 1px, transparent 1px);background-size:12px 12px;justify-content:center;align-items:center;height:164px;margin:8px;display:flex;position:relative}.project-preview canvas{object-fit:contain;width:auto;max-width:72%;height:auto;max-height:128px;image-rendering:pixelated;min-width:64px}.project-open strong{font-size:var(--text-body);text-overflow:ellipsis;margin:15px 16px 4px;display:block;overflow:hidden}.project-open-arrow{color:var(--muted);position:absolute;top:10px;right:10px}.project-card-footer{color:var(--muted);font-size:var(--text-small);justify-content:space-between;align-items:center;padding:0 12px 10px 16px;display:flex}.preview-fallback,.home-empty{align-items:center;gap:var(--space-3);color:var(--muted);flex-direction:column;display:flex}.home-empty{border:1px dashed var(--border);border-radius:var(--radius-panel);padding:40px}.home-empty h3,.home-empty p{margin:0}.home-status{color:var(--muted);padding:0 24px 16px}@media (width<=800px){.home-view{padding:32px 24px}.topbar{gap:var(--space-2);padding:0 10px}.brand .version{display:none}}@media (pointer:coarse){.tools button{height:44px}.floating-header{height:36px}.panel-resize{width:30px;height:30px}}.showing-source .document-tabs{top:14px;bottom:auto;right:16px}.canvas-stage{background-color:var(--canvas-bg);background-image:radial-gradient(circle, var(--canvas-dot) 1px, transparent 1px);background-size:20px 20px;display:flex;position:fixed;inset:0;overflow:hidden}.canvas-stage .canvas-host{border-radius:0;width:100%;height:100%;margin:0}.canvas-stage>.floating-workspace{background:0 0}.stage-animation .floating-content{padding:10px 8px 14px}.stage-animation .animation-panel{flex-direction:column;min-height:0;display:flex}.stage-animation .cel-table-scroll{flex:1;min-height:0;overflow:auto}.stage-notice{background:var(--panel);max-width:300px;color:var(--text);border-radius:var(--radius-panel);z-index:50;padding:10px;position:absolute;bottom:12px;right:12px}.stage-timeline{--timeline-layer-width:220px;--timeline-frame-width:42px;z-index:35;border:0;border-top:1px solid var(--border);background:var(--panel);height:260px;box-shadow:0 -8px 28px var(--shadow-color);color:var(--text);font-family:var(--font-ui);border-radius:0;position:absolute;inset:auto 0 0;overflow:hidden}.stage-timeline .animation-panel{flex-direction:column;height:100%;min-height:0;padding:0;display:flex}.timeline-height-handle{z-index:6;cursor:ns-resize;touch-action:none;-webkit-user-select:none;user-select:none;height:8px;position:absolute;top:0;left:0;right:0}.timeline-height-handle:after{content:"";background:var(--border-strong);border-radius:2px;width:40px;height:3px;position:absolute;top:2px;left:calc(50% - 20px)}.timeline-height-handle:hover:after,.timeline-height-handle:focus-visible:after{background:var(--accent)}.timeline-height-handle:focus-visible{outline:2px solid var(--accent);outline-offset:-1px}.stage-timeline .animation-toolbar{border-bottom:1px solid var(--border);background:var(--bg);flex-wrap:nowrap;gap:5px;height:50px;min-height:50px;padding:8px 16px}.stage-timeline .animation-toolbar button{height:var(--control-height);border-radius:var(--radius);min-width:32px;color:var(--muted);font-size:var(--text-label);background:0 0;border:1px solid #0000;padding:5px 9px}.stage-timeline .animation-toolbar button:hover:not(:disabled){background:var(--hover);color:var(--text)}.stage-timeline .animation-toolbar button[aria-label=Play],.stage-timeline .animation-toolbar button[aria-label=Pause]{background:var(--hover);border-color:var(--border);color:var(--text)}.stage-timeline .animation-toolbar .loop-control{text-transform:uppercase;border-color:var(--border);margin-left:8px}.stage-timeline .loop-control[aria-pressed=true]{background:var(--selected);color:var(--accent)}.stage-timeline .animation-toolbar button[aria-label=Add\ layer],.stage-timeline .animation-toolbar button[aria-label=Add\ frame]{background:var(--control);border-color:var(--border);color:var(--text)}.frame-readout{text-align:center;color:var(--muted);font-size:var(--text-small);font-family:var(--mono);font-variant-numeric:tabular-nums;letter-spacing:.04em;white-space:nowrap;flex:1}.frame-readout strong{color:var(--text);font-weight:var(--weight-medium)}.stage-timeline .cel-table-scroll{flex:1;min-height:0;overflow:auto}.stage-timeline .cel-table{width:100%;font-family:var(--font-ui)}.stage-timeline .timeline-layer-column{width:var(--timeline-layer-width)}.stage-timeline .timeline-frame-column{width:var(--timeline-frame-width)}.stage-timeline .cel-table th,.stage-timeline .cel-table td{background:var(--bg);border-color:var(--border);height:42px}.stage-timeline .cel-table thead th{background:var(--bg);height:28px;color:var(--muted)}.stage-timeline .cel-table tbody th,.stage-timeline .cel-table .timeline-layer-heading{width:var(--timeline-layer-width);min-width:var(--timeline-layer-width);max-width:var(--timeline-layer-width);background:var(--bg)}.stage-timeline .cel-table .timeline-layer-heading{color:var(--muted);font-size:var(--text-small);padding-left:18px;font-weight:400}.stage-timeline .cel-table .layer-row{background:0 0;height:41px;min-height:41px}.stage-timeline .cel-table .layer-row button{height:40px;font-size:var(--text-label);text-align:left;color:var(--muted);background:0 0}.stage-timeline .cel-table .step-handle{width:100%;height:27px;color:var(--muted);font-size:var(--text-small);font-family:var(--mono);font-variant-numeric:tabular-nums}.stage-timeline .cel-table .cel-button{background:var(--bg);border-radius:var(--radius);border:1px solid #0000;width:calc(100% - 10px);height:30px;margin:5px}.stage-timeline .cel-dot{border-color:var(--border-strong);width:5px;height:5px}.stage-timeline .cel-dot.occupied{background:var(--border-strong)}.stage-timeline .cel-table .selected-column,.stage-timeline .cel-table .selected-layer{background:var(--selected)}.stage-timeline .cel-table .selected-layer button,.stage-timeline .selected-column .step-handle{color:var(--accent)}.stage-timeline .cel-table .playing-column{background:var(--selected);box-shadow:none}.stage-timeline .cel-table .cel-button[data-selected=true]{background:var(--selected);border-color:var(--accent);box-shadow:none}.stage-timeline .cel-button[data-selected=true] .cel-dot.occupied{background:var(--text);border-color:var(--text)}.stage-timeline .cel-table .timeline-tail{border-right:0;min-width:0}@media (width<=800px){.stage-timeline{--timeline-layer-width:168px}.stage-timeline .animation-toolbar{gap:2px;padding:8px}.stage-timeline .animation-toolbar button{padding:5px 7px}.frame-readout{font-size:var(--text-small)}}@media (width<=580px){.frame-readout{display:none}.stage-timeline .loop-control{margin-right:auto}}.canvas-metadata{z-index:20;border:1px solid var(--border);border-radius:var(--radius-panel);background:var(--bg);height:38px;box-shadow:0 3px 12px var(--shadow-color);color:var(--muted);font:var(--text-small)/var(--line-height) var(--mono);white-space:nowrap;pointer-events:none;align-items:center;gap:14px;padding:0 14px;display:flex;position:absolute}.canvas-metadata>span+span{border-left:1px solid var(--border);padding-left:14px}.canvas-metadata .metadata-frame{align-items:center;gap:var(--space-2);min-width:0;color:var(--text);flex:1;display:flex}.metadata-frame>span{text-overflow:ellipsis;overflow:hidden}.metadata-frame i{background:var(--muted);border-radius:50%;flex-shrink:0;width:7px;height:7px}@media (width<=580px){.canvas-metadata{gap:var(--space-2);font-size:var(--text-small);padding:0 10px}.canvas-metadata>span+span{padding-left:8px}}.stage-palette{top:0;right:0;bottom:var(--stage-timeline-height,260px);z-index:35;border-left:1px solid var(--border);background:var(--panel);box-shadow:-8px 0 28px var(--shadow-soft-color);color:var(--text);font-family:var(--font-ui);border-radius:0;position:absolute;overflow:hidden}.palette-content{scrollbar-color:var(--border-strong) transparent;height:100%;overflow:auto}.palette-content>section{padding:0}.palette-width-handle{z-index:6;cursor:ew-resize;touch-action:none;-webkit-user-select:none;user-select:none;width:8px;position:absolute;inset:0 auto 0 0}.palette-width-handle:after{content:"";background:var(--border-strong);border-radius:2px;width:3px;height:40px;position:absolute;top:calc(50% - 20px);left:2px}.palette-width-handle:hover:after,.palette-width-handle:focus-visible:after{background:var(--accent)}.palette-width-handle:focus-visible{outline:2px solid var(--accent);outline-offset:-1px}.stage-palette .section-heading{z-index:2;min-height:48px;padding:var(--space-3) var(--space-4);border-bottom:1px solid var(--border);background:var(--bg);gap:10px;margin:0;position:sticky;top:0}.stage-palette h2{align-items:baseline;gap:var(--space-2);white-space:nowrap;color:var(--text);font-size:var(--text-label);font-weight:var(--weight-medium);margin-right:auto;display:flex}.stage-palette h2 span{color:var(--muted);font-size:var(--text-small);padding:0}.stage-palette .section-heading button{flex:0 0 var(--control-height);width:var(--control-height);height:var(--control-height);border-radius:var(--radius);border:1px solid var(--border);background:var(--control);color:var(--muted);font-size:var(--text-label);place-items:center;padding:0;display:grid}.stage-palette .section-heading button svg{width:var(--icon-size);height:var(--icon-size)}.stage-palette .section-heading button:hover:not(:disabled){background:var(--hover);color:var(--text)}.stage-palette .swatches{background:0 0;border:0;grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:10px;margin:24px 20px;padding:0;overflow:visible}.stage-palette .swatches button{border-radius:var(--radius-panel);box-shadow:inset 0 0 0 1px var(--border-subtle)}.stage-palette .swatches button[data-transparent],.current-colour[data-transparent],.rail-background[data-transparent]{background:repeating-conic-gradient(var(--checker-light) 0% 25%, var(--control) 0% 50%) 0 / 10px 10px}.stage-palette .swatches button[aria-pressed=true]{outline:2px solid var(--accent);outline-offset:2px;transform:none}.stage-palette .swatches button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.stage-palette .palette-hint{color:var(--muted);font-size:var(--text-small);margin:20px 24px 28px;line-height:1.6}.stage-palette [role=alert]{font-size:var(--text-small);margin:12px}.stage-tools{top:0;left:0;bottom:var(--stage-timeline-height,260px);z-index:35;background:var(--panel);border-right:1px solid var(--border);width:104px;color:var(--text);font-family:var(--font-ui);display:flex;position:absolute}.stage-tools .tools,.stage-tools .context-rail{justify-content:flex-start;align-items:center;gap:var(--space-1);scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent;background:0 0;border:0;border-radius:0;flex-flow:column;flex:0 0 52px;width:52px;min-width:0;height:100%;margin:0;padding:8px 6px;display:flex;overflow:hidden auto}.stage-tools .tools{border-right:1px solid var(--border);background:var(--bg)}.stage-tools .tools button,.stage-tools .context-rail>button,.stage-tools .context-toggle,.stage-tools .selection-tool-actions>button{width:var(--control-tool);height:var(--control-tool);min-height:var(--control-tool);border-radius:var(--radius);color:var(--muted);background:0 0;border:1px solid #0000;flex-shrink:0;place-content:center;place-items:center;padding:0;display:grid}.stage-tools button:hover:not(:disabled),.stage-tools .context-toggle:hover:not([data-disabled]){background:var(--hover);color:var(--text)}.stage-tools .tools button[aria-pressed=true],.stage-tools .tools button[data-active=true],.stage-tools .context-toggle[data-active]{background:var(--selected);border-color:var(--accent);color:var(--accent)}.stage-tools button:focus-visible,.stage-tools .context-toggle:focus-within{outline:2px solid var(--accent);outline-offset:1px}.stage-tools .tool-divider,.stage-tools .context-rail hr{border-color:var(--border);flex-shrink:0}.stage-tools .palette-toggle{margin:8px 0}.stage-tools:not([data-options]){width:52px}.stage-tools:not([data-options]) .tools{border-right:0}.tools button[aria-haspopup=dialog]{position:relative}.tools button[aria-haspopup=dialog]:before{content:none}.tools .tool-picker-chevron{stroke-width:1.8px;width:10px;height:10px;position:absolute;bottom:1px;right:1px}.popover.tool-picker{gap:var(--space-1);background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-panel);flex-direction:row;width:max-content;min-width:0;padding:6px;display:flex}.popover.tool-picker button{width:var(--control-tool);height:var(--control-tool);border-radius:var(--radius);color:var(--muted);background:0 0;border:1px solid #0000;place-items:center;padding:0;display:grid}.popover.tool-picker button:hover{background:var(--hover);border-color:var(--border-strong);color:var(--text)}.popover.tool-picker button[aria-pressed=true]{background:var(--selected);border-color:var(--accent);color:var(--accent)}.popover.tool-picker svg{width:var(--icon-tool);height:var(--icon-tool)}.stage-clipboard-notice,.stage-paste-actions{bottom:calc(var(--stage-timeline-height,260px) + 12px);z-index:50;background:var(--panel);border:1px solid var(--border);color:var(--text);font:var(--text-small)/var(--line-height) var(--font-ui);left:116px;right:auto}.stage-clipboard-notice{pointer-events:none;max-width:min(360px,100vw - 140px);margin:0;line-height:1.5}.stage-paste-actions{padding:6px}.popover,.dialog,.stage-palette .colour-tools,.stage-app-toolbar{color:var(--text);font:var(--text-body)/var(--line-height) var(--font-ui);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}.popover,.dialog{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-panel);box-shadow:var(--shadow-panel);scrollbar-color:var(--border-strong) transparent;scrollbar-width:thin}.popover{gap:10px;padding:12px}.popover.command-menu,.popover.tool-picker{gap:var(--space-1);padding:6px}.popover.command-menu button,.popover.tool-picker button,.stage-app-toolbar>button{color:var(--muted);background:0 0;border-color:#0000}.popover.command-menu button{min-height:var(--control-height)}.popover button:is([aria-pressed=true],[data-active=true]){background:var(--selected);border-color:var(--accent);color:var(--accent)}.popover button[data-active=true]:before{content:none}.popover.context-menu button.danger-action{color:var(--danger)}.popover.context-menu button.danger-action:hover:not(:disabled),.popover.context-menu button.danger-action:focus-visible:not(:disabled){color:var(--danger);background:var(--danger-surface);border-color:#0000}.dialog{padding:20px}.dialog header{border-bottom:1px solid var(--border);margin-bottom:18px;padding-bottom:14px}.dialog header h2{color:var(--text);font-size:var(--text-title);font-weight:var(--weight-medium);letter-spacing:0}.dialog header button{width:28px;height:28px;color:var(--muted);min-height:var(--control-compact);background:0 0;border-color:#0000;place-items:center;padding:0;display:grid}.dialog-footer{border-top:1px solid var(--border);padding-top:14px}.modal-backdrop{background:var(--backdrop)}.tooltip{background:var(--control);border:1px solid var(--border);color:var(--text);font:var(--text-small)/1.5 var(--font-ui)}.stage-palette .colour-tools{padding:var(--space-4);border-top:1px solid var(--border);gap:var(--space-4);font-size:var(--text-body);margin:0}.stage-palette .colour-tools-heading,.stage-palette .colour-tools-actions{flex-wrap:wrap;row-gap:10px}.stage-palette .colour-tools-heading strong{color:var(--text);font-weight:var(--weight-medium)}.stage-palette .colour-tools .palette-hint{margin:0}.stage-palette .colour-tools .ramp-colors button{background:repeating-conic-gradient(var(--checker-light) 0% 25%, var(--control) 0% 50%) 0 / 10px 10px;overflow:hidden}.stage-app-toolbar{z-index:40;background:var(--bg);border-bottom:1px solid var(--border);align-items:center;height:40px;padding:4px 8px;display:flex;position:absolute;inset:0 0 auto}.stage-brand{align-items:center;gap:var(--space-2);border-right:1px solid var(--border);color:var(--text);font-size:var(--text-label);white-space:nowrap;margin-right:8px;padding:0 14px 0 2px;display:inline-flex}.stage-app-toolbar>button[aria-haspopup]{height:var(--control-compact);color:var(--muted);min-height:var(--control-compact);background:0 0;border-color:#0000;align-items:center;gap:6px;padding:4px 8px;display:inline-flex}.stage-app-toolbar>button[aria-expanded=true]{background:var(--selected);color:var(--accent)}.stage-app-toolbar>button .chevron{width:12px;height:12px;margin:0}.stage-tools,.stage-palette{top:40px}.stage-palette .colour-tools .colour-tools-heading{font-size:var(--text-label);margin-bottom:4px}.stage-palette .colour-tools label{font-size:var(--text-label);gap:10px;line-height:1.5}.stage-palette .colour-tools .colour-tool-field{gap:var(--space-3)}.stage-palette .colour-tools select{min-height:var(--control-height);font-size:var(--text-body);border-radius:var(--radius);padding:6px 10px}.stage-palette .colour-tools input[type=checkbox]{flex-shrink:0;width:16px;height:16px}.stage-palette .colour-tools input[type=range]{min-height:32px}.stage-palette .colour-tools-actions{gap:var(--space-3);margin-top:4px}.stage-palette .colour-tools-actions button{min-height:var(--control-height);font-size:var(--text-label);padding:6px 10px}.stage-palette .colour-tools .ramp-colors{gap:6px}.stage-palette .colour-tools .ramp-colors button{border-radius:var(--radius);height:48px}.stage-palette .colour-tools .palette-hint{font-size:var(--text-small);line-height:1.7}.colour-select{min-width:0;display:block;position:relative}.colour-select select{appearance:none;width:100%;padding-right:34px}.colour-select>svg{width:var(--icon-size);height:var(--icon-size);pointer-events:none;color:var(--muted);position:absolute;top:50%;right:12px;transform:translateY(-50%)}.stage-palette .colour-tools .colour-select select{padding-right:34px}.dialog:has(.image-import-options){width:min(500px,100vw - 32px);padding:24px}.dialog:has(.image-import-options) header h2{font-size:var(--text-title)}.image-import-options{gap:var(--space-3);flex-direction:column;display:flex}.image-import-options>p{color:var(--muted);font-size:var(--text-body);margin:0 0 8px}.dialog .image-import-options>button{align-items:center;gap:var(--space-4);border:1px solid var(--border);border-radius:var(--radius-panel);text-align:left;white-space:normal;width:100%;min-height:88px;padding:16px;display:flex}.import-option-icon{width:40px;height:40px;color:var(--accent);flex-shrink:0;place-items:center;display:grid}.import-option-icon svg{width:24px;height:24px}.import-option-copy{flex-direction:column;flex:1;gap:7px;min-width:0;display:flex}.import-option-copy strong{font-size:var(--text-body);font-weight:var(--weight-medium)}.import-option-copy>span{color:var(--muted);font-size:var(--text-label);line-height:1.6}.import-option-arrow{width:16px;height:16px;color:var(--muted);flex-shrink:0}.canvas-view-controls{bottom:calc(var(--stage-timeline-height,260px) + 16px);z-index:36;color:var(--text);font:var(--text-label)/var(--line-height) var(--font-ui);gap:10px;display:flex;position:absolute}.canvas-view-control{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-panel);box-shadow:0 4px 16px var(--shadow-color);padding:4px;display:flex}.canvas-view-control>button{align-items:center;gap:var(--space-2);height:var(--control-height);border-radius:var(--radius);color:var(--muted);background:0 0;border:1px solid #0000;padding:6px 10px;display:inline-flex}.canvas-view-control>button:hover{background:var(--hover);color:var(--text);border-color:var(--border-strong)}.canvas-view-control>button[aria-pressed=true],.canvas-view-control>button[aria-expanded=true]{background:var(--selected);color:var(--accent);border-color:var(--accent)}.canvas-view-control>button[aria-haspopup]{justify-content:center;width:30px;padding:6px}.canvas-view-control svg{width:var(--icon-size);height:var(--icon-size)}.popover.canvas-view-settings{width:280px;font-size:var(--text-label);gap:14px;padding:18px}.canvas-view-settings input[type=number]{min-height:var(--control-height)}.canvas-view-control button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.project-workspace{background:var(--bg);color:var(--text);--project-header-height:84px;position:fixed;inset:0}.project-workspace>.file-tabbar{z-index:39;gap:var(--space-2);border-bottom:1px solid var(--border);background:var(--bg);align-items:center;height:44px;min-height:44px;padding:5px 10px;display:flex;position:absolute;inset:40px 0 auto}.project-workspace .file-tabs{flex:0 auto;gap:6px;min-width:0;height:34px;overflow:auto hidden}.project-workspace .file-tab{border-radius:var(--radius);height:34px;box-shadow:none;background:0 0;border:1px solid #0000}.project-workspace .file-tab.active{background:var(--selected);border-color:var(--accent)}.project-workspace .file-tab>[role=tab]{min-width:0;font:var(--text-label)/var(--line-height) var(--font-ui);color:var(--muted);gap:9px;padding:0 5px 0 12px}.project-workspace .file-tab.active>[role=tab]{color:var(--accent)}.project-workspace .file-tab [role=tab]>span:first-of-type{max-width:none}.project-workspace .tab-filename{text-overflow:ellipsis;white-space:nowrap;max-width:230px;overflow:hidden}.project-workspace .file-tab>button:last-child{opacity:1;width:30px;color:var(--muted);flex:0 0 30px;padding:0 8px;position:static;transform:none}.project-workspace .file-tab>button:last-child:hover{color:var(--text)}.project-workspace .file-tabbar>button{height:var(--control-height);border-radius:var(--radius);color:var(--muted);font-size:var(--text-label);flex:none;justify-content:center;align-items:center;gap:6px;margin:0;padding:5px 8px;display:inline-flex}.project-workspace .file-tabbar>button[aria-pressed=true]{background:var(--selected);color:var(--accent)}.tab-save-indicator{flex:0 0 12px;justify-content:center;align-items:center;display:inline-flex}.tab-saved-dot{background:var(--success);border-radius:50%;width:6px;height:6px}.tab-save-indicator.saving{color:var(--accent)}.tab-save-indicator.saving svg{animation:1s linear infinite tab-saving}.tab-save-indicator.error{color:var(--danger)}.project-workspace .file-dirty{color:var(--accent)}@keyframes tab-saving{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.tab-save-indicator.saving svg{animation:none}}.project-workspace-body{inset:var(--project-header-height) 0 0;position:absolute;overflow:auto}.project-workspace-body>.canvas-stage{position:absolute;inset:0}.project-workspace .stage-tools,.project-workspace .stage-palette{top:0}.project-workspace .home-view{min-height:100%}.project-save-notice{z-index:60;align-items:center;gap:var(--space-2);background:var(--control);border:1px solid var(--accent);border-radius:var(--radius);max-width:min(640px,100vw - 24px);max-height:calc(100dvh - 108px);box-shadow:0 8px 30px var(--shadow-color);font-size:var(--text-label);flex-wrap:wrap;padding:12px;display:flex;position:fixed;bottom:12px;right:12px;overflow:auto}.project-save-notice>span{flex:100%}.project-save-notice button{padding:6px 9px}.project-source-diagnostics{max-height:100px;font-size:var(--text-label);overflow:auto}.project-workspace .modal-backdrop{z-index:100}@media (width<=600px){.project-workspace .tab-filename{max-width:132px}.project-workspace .home-view{padding:28px 20px}.project-workspace .home-actions{flex-wrap:wrap}.project-workspace .home-section-heading{gap:10px}}.project-workspace .file-tab:not(.active)+.file-tab:not(.active){border-left-color:#0000}.project-workspace .tab-save-indicator svg{color:inherit}.canvas-focus-control{z-index:38;font:var(--text-label)/var(--line-height) var(--font-ui);position:absolute;top:16px}.project-workspace.is-focused{--project-header-height:0px}.project-workspace.is-focused>.stage-app-toolbar,.project-workspace.is-focused>.file-tabbar,.project-workspace.is-focused .stage-palette,.project-workspace.is-focused .stage-timeline,.project-workspace.is-focused .canvas-view-controls,.project-workspace.is-focused .canvas-metadata{display:none}@media (width<=600px){.canvas-focus-control{left:112px;right:auto!important}.project-workspace.is-focused .canvas-focus-control{left:auto;right:16px!important}}.stage-palette{flex-direction:column;display:flex}.inspector-tabs{border-bottom:1px solid var(--border);flex:0 0 44px;display:flex}.inspector-tabs button{min-width:0;color:var(--muted);font:var(--text-label)/var(--line-height) var(--font-ui);background:0 0;border:0;border-radius:0;flex:1;padding:0 8px}.inspector-tabs button[aria-selected=true]{color:var(--accent);background:var(--selected);box-shadow:inset 0 -2px var(--accent)}.inspector-tabs button:focus-visible{outline:2px solid var(--accent);outline-offset:-4px}.stage-palette .palette-content{flex:1;height:auto;min-height:0}.inspector-source{display:flex;overflow:hidden}.project-source-editor{gap:var(--space-3);flex-direction:column;flex:1;min-width:0;min-height:0;padding:12px;display:flex}.project-source-editor .source-actions{flex-wrap:wrap;gap:6px;display:flex}.project-source-editor button,.inspector-history button{font:var(--text-label)/var(--line-height) var(--font-ui);background:var(--control);color:var(--text);border:1px solid var(--border);border-radius:var(--radius);padding:6px 10px}textarea.source-editor{resize:none;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg);width:100%;height:100%;min-height:100px;color:var(--text);font:var(--text-label)/20px var(--mono);tab-size:2;white-space:pre;padding:10px;display:block;overflow:auto}.project-source-editor .source-editor{flex:1;min-height:0}.project-source-editor .source-editor:focus{outline:2px solid var(--accent);outline-offset:-1px}.project-source-diagnostics:empty{display:none}.project-source-diagnostics{color:var(--accent);flex-shrink:0}.inspector-history{font-size:var(--text-label);padding:12px}.inspector-history ol{margin:12px 0;padding:0;list-style:none}.inspector-history li{justify-content:space-between;align-items:center;gap:var(--space-2);border-bottom:1px solid var(--border);padding:12px 0;display:flex}.inspector-history li>div{overflow-wrap:anywhere;min-width:0}.inspector-history time{color:var(--muted);font-size:var(--text-small);margin-top:6px;display:block}@media (width<=600px){.project-workspace:not(.is-focused) .canvas-focus-control button{gap:0;padding:10px}.project-workspace:not(.is-focused) .canvas-focus-control button span{display:none}}.canvas-zoom-control>button[aria-haspopup]{gap:6px;width:auto;padding:6px 8px}.canvas-zoom-control>button:not([aria-haspopup]){padding:6px}.canvas-zoom-control>button[aria-haspopup] span{text-align:center;min-width:42px;font-family:var(--mono);font-variant-numeric:tabular-nums}.canvas-zoom-settings .zoom-presets{gap:var(--space-1);grid-template-columns:repeat(4,1fr);display:grid}.canvas-zoom-settings .zoom-presets button{text-align:center;font:var(--text-small)/var(--line-height) var(--mono);padding:8px 4px}.canvas-zoom-settings .zoom-presets button[aria-pressed=true]{background:var(--selected);color:var(--accent)}@media (width<=800px){.canvas-view-controls{flex-wrap:wrap;justify-content:flex-end;left:112px;right:16px!important}}.stage-timeline .cel-table .layer-row{gap:var(--space-1);padding:0 8px 0 14px}.cel-table .layer-row .layer-name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.layer-quick-actions{flex:none;gap:2px;display:flex}.stage-timeline .cel-table .layer-quick-actions button{border-radius:var(--radius);border:0;place-items:center;width:26px;height:28px;padding:4px;display:grid}.layer-quick-actions svg{width:var(--icon-size);height:var(--icon-size)}.stage-timeline .cel-table .layer-quick-actions button:hover{background:var(--hover)}.stage-timeline .cel-table .layer-quick-actions button[aria-pressed=true]{color:var(--accent)}.cel-table .layer-name,.cel-table .step-handle{cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none}.layer-name[data-pointer-focus]:focus,.step-handle[data-pointer-focus]:focus,.palette-width-handle[data-pointer-focus]:focus,.timeline-height-handle[data-pointer-focus]:focus{outline:none}.cel-table.is-reordering{cursor:grabbing;-webkit-user-select:none;user-select:none}.cel-table th.drop-frame-before{box-shadow:inset 3px 0 var(--accent)}.cel-table th.drop-frame-after{box-shadow:inset -3px 0 var(--accent)}.cel-table tr.drop-layer-before>*{box-shadow:inset 0 3px var(--accent)}.cel-table tr.drop-layer-after>*{box-shadow:inset 0 -3px var(--accent)}@media (pointer:coarse){:root{--control-height:44px;--control-compact:44px;--control-tool:44px}.project-workspace{--project-header-height:104px}.stage-app-toolbar{height:52px}.project-workspace>.file-tabbar{height:52px;top:52px}.project-workspace .file-tabs,.project-workspace .file-tab{height:44px}.project-workspace .file-tab>button:last-child,.project-workspace .file-tabbar>button,.canvas-view-control>button,.stage-palette .section-heading button,.dialog header button{min-width:44px;min-height:44px}.stage-tools .tools,.stage-tools .context-rail{padding-inline:4px}.stage-tools .tools button,.stage-tools .context-rail>button,.stage-tools .context-toggle,.stage-tools .selection-tool-actions>button{width:44px;height:44px;min-height:44px}.stage-timeline .animation-toolbar{height:64px;min-height:64px;overflow-x:auto}.stage-timeline .animation-toolbar button{flex-shrink:0;min-width:44px}}.dialog:has(.recovery-dialog){width:min(680px,100vw - 32px);max-height:calc(100dvh - 32px)}.recovery-dialog,.recovery-dialog form{gap:12px;display:grid}.recovery-dialog p,.recovery-dialog h3{margin:0}.recovery-dialog form label{gap:6px;display:grid}.recovery-actions,.checkpoint-notice{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.checkpoint-list{gap:12px;margin:0;padding:0;list-style:none;display:grid}.checkpoint-list li{border:1px solid var(--border);overflow-wrap:anywhere;border-radius:6px;gap:10px;padding:12px;display:grid}.checkpoint-list time,.checkpoint-list span{color:var(--muted)}.checkpoint-notice{background:var(--panel);border-bottom:1px solid var(--border);padding:8px 12px}.recovery-dialog [role=alert],.checkpoint-notice>span{color:var(--danger)}.project-notices{z-index:60;gap:8px;max-width:min(640px,100vw - 24px);max-height:calc(100dvh - 108px);display:grid;position:fixed;bottom:12px;right:12px;overflow:auto}.project-notices>.project-save-notice{max-height:none;position:static}.project-notices>.checkpoint-notice{border:1px solid var(--danger);border-radius:var(--radius);box-shadow:0 8px 30px var(--shadow-color);font-size:var(--text-label)}.timeline-actions{border-bottom:1px solid var(--border);flex-shrink:0;align-items:center;gap:8px;padding:4px 10px;display:flex}.timeline-actions button{font-size:11px}.timeline-selection-summary{color:var(--muted);font-size:11px}.timeline-error{color:var(--danger,#e87b7b);margin:4px 10px;font-size:12px}.cel-table .timeline-tags th{height:28px;padding:0}.cel-table .timeline-tags>th:first-child{z-index:4;background:var(--panel);padding:0 10px;font-size:10px;position:sticky;left:0}.timeline-tag{min-width:0;height:26px;display:flex}.cel-table .timeline-tag button{border:0;border-radius:0;min-height:24px;padding:0 3px;font-size:10px}.tag-label{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.tag-handle{cursor:ew-resize;touch-action:none;flex:0 0 12px}.cel-table td{position:relative}.cel-table .cel-button{touch-action:none}.cel-link{color:var(--accent);font-size:10px;position:absolute;top:1px;left:2px}.cel-drop-target{outline:2px solid var(--accent);outline-offset:-2px}@media (width<=640px){.timeline-actions{gap:4px;padding:3px 6px}.timeline-selection-summary{display:none}}.export-form .dialog-footer{flex-wrap:wrap}.atlas-member{border-bottom:1px solid var(--border);padding:12px 0}.atlas-member label{align-items:center;gap:8px;margin:8px 0;display:flex}.atlas-member input:not([type=checkbox]),.atlas-member select{flex:1;min-width:0}.export-form .dialog-footer>p{flex:1 0 100%;margin:0}.brush-manager{gap:10px;width:min(320px,80vw);max-height:70vh;display:grid;overflow:auto}.brush-manager label{gap:4px;display:grid}.brush-library{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;max-height:220px;display:grid;overflow:auto}.brush-library button{overflow-wrap:anywhere;justify-items:center;font-size:11px;display:grid}.custom-brush-preview{width:48px;height:48px;image-rendering:pixelated;background:repeating-conic-gradient(var(--checker-light) 0% 25%, var(--checker-dark) 0% 50%) 0 / 12px 12px}.ramp-editor{flex-wrap:wrap;gap:4px;display:flex}.ramp-editor>div{grid-template-columns:1fr 1fr;gap:2px;display:grid}.ramp-editor span{width:28px;height:28px;display:block}.swatches button[data-drop]{outline:3px solid var(--accent,#68a4ff);outline-offset:2px}.colour-wheel-tools{gap:8px;padding:8px 0;display:grid}.colour-wheel-tools label{grid-template-columns:76px 1fr 50px;align-items:center;gap:4px;display:grid}.colour-wheel-tools input{width:100%;min-width:0}.colour-wheel{touch-action:none;cursor:crosshair;background:conic-gradient(red,#ff0,#0f0,#0ff,#00f,#f0f,red);border-radius:50%;width:180px;height:180px;margin:4px auto;position:relative}.wheel-centre{border:4px solid var(--panel,#202124);border-radius:50%;position:absolute;inset:22%}.wheel-marker{pointer-events:none;border:2px solid #fff;border-radius:50%;width:12px;height:12px;position:absolute;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #000}.palette-actions{align-items:center;gap:3px;margin:8px 16px 14px;display:flex}.palette-actions .palette-hint{margin:0 auto 0 0;font-size:11px}.palette-actions button{background:0 0;border-color:#0000;flex:0 0 28px;width:28px;height:28px;padding:5px}.palette-actions button:hover{background:var(--hover,#292c33)}.palette-actions svg{width:16px;height:16px}.empty-selection-notice{background:var(--panel,#202124);color:var(--muted,#a4a9b4);pointer-events:none;border-radius:4px;padding:4px 8px;font-size:11px;position:absolute;bottom:12px;left:50%;transform:translate(-50%)}
