@charset "UTF-8";
:root{color-scheme:dark;--bg:#181a18;--panel:#20231f;--panel2:#252822;--ink:#f0eee6;--muted:#a6aba0;--line:#393d35;--lime:#d2ef83;--black:#20251a;--danger:#ffb9a5;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-size:14px;line-height:1.5}button,input,select{font:inherit}button,a,select,input{touch-action:manipulation}button,select{min-height:44px}button{cursor:pointer;border:1px solid var(--line);padding:10px 15px;color:var(--ink);border-radius:5px;background:transparent;font-weight:550}button:hover:not(:disabled){background:#33392c;border-color:#677156}button:disabled,select:disabled,input:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible,.dropzone:focus-within{outline:2px solid var(--lime);outline-offset:4px}.primary{background:var(--lime);border-color:var(--lime);color:var(--black)}.primary:hover:not(:disabled){background:#e2f8ae;color:var(--black)}.secondary{background:var(--panel2)}.quiet{border:0;color:var(--muted);font-size:12px;padding:5px 9px;min-height:44px}.wide{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left}.topbar{height:76px;padding:0 32px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;gap:10px;align-items:center;color:var(--ink);text-decoration:none;font-size:24px;letter-spacing:-1px;font-weight:650}.brandmark{color:var(--lime);font-size:35px;line-height:1}.edition{font-size:12px;color:var(--muted);font-weight:400;letter-spacing:0;margin-left:14px}.private{font-size:12px;color:var(--muted);display:flex;gap:9px;align-items:center}.dot{width:6px;height:6px;border-radius:50%;background:var(--lime)}.shell{display:grid;grid-template-columns:304px minmax(0,1fr);min-height:calc(100vh - 76px)}.sidebar{border-right:1px solid var(--line);padding:20px 24px 30px;background:#1d201b}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.eyebrow{font:10px/1.5 "SFMono-Regular",Consolas,monospace;letter-spacing:1.4px;color:var(--muted)}h1{font-size:33px;letter-spacing:-1.2px;line-height:1.12;font-weight:500;margin:12px 0 16px}h2{font-size:20px;line-height:1.2;font-weight:500;letter-spacing:-.5px;margin:8px 0}h3{font-size:24px;letter-spacing:-.7px;font-weight:400;margin:20px 0 8px}.intro{color:var(--muted);font-size:13px;margin-bottom:24px;line-height:1.6}.dropzone{border:1px dashed #657050;border-radius:6px;display:flex;align-items:center;flex-direction:column;padding:18px 10px;cursor:pointer;background:#252b1f;position:relative;font-size:12px;color:var(--muted);gap:1px}.dropzone:hover,.dropzone.dragover{border-color:var(--lime);background:#303a24}.dropzone strong{font-size:14px;color:var(--ink);font-weight:500}.upload-symbol{font-size:25px;color:var(--lime);line-height:1.3}.dropzone input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.micro{font-size:11px;line-height:1.6;color:var(--muted)}.micro strong{font-weight:500;color:var(--ink)}.control-section{margin-top:26px;padding-top:22px;border-top:1px solid var(--line)}.control-section label{display:block;font-size:12px;margin:16px 0 8px}.control-section label:first-of-type{margin-top:18px}.muted{color:var(--muted);font-size:10px}select{width:100%;border:1px solid #464d3f;background:#272c23;color:var(--ink);border-radius:5px;padding:10px;max-width:100%;text-overflow:ellipsis;font-size:12px}.action-section{margin-top:20px;padding-top:20px}.action-section button+button{margin-top:8px}progress{width:100%;height:5px;accent-color:var(--lime);margin-top:14px}details{border-top:1px solid var(--line);padding-top:17px;margin-top:22px;font-size:11px;color:var(--muted)}summary{cursor:pointer;min-height:30px;color:var(--ink)}details p{line-height:1.7}.errors{padding:12px;margin-top:15px;border:1px solid #8d5545;border-radius:4px;color:var(--danger);font-size:12px;white-space:pre-line;overflow-wrap:anywhere}
main{padding:31px 34px 20px;min-width:0}.workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:23px}.workspace-heading h2{font-size:24px;max-width:55vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chip{border:1px solid var(--line);border-radius:4px;padding:5px 9px;color:var(--muted);font:10px Consolas,monospace;white-space:nowrap}.stage{background:#121410;border:1px solid var(--line);border-radius:8px;overflow:hidden}.empty{min-height:420px;padding:48px 20px;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center}.empty p{color:var(--muted);font-size:13px;line-height:1.7;margin-bottom:24px}.empty>.micro{margin-top:16px}.pixel-icon{font-size:68px;line-height:1;color:var(--lime);letter-spacing:5px}.pixel-icon span{color:#69735c;font-size:32px;vertical-align:middle}.preview{display:grid;grid-template-columns:minmax(100px,1fr) minmax(200px,2.6fr) minmax(100px,1fr);gap:20px;align-items:center;padding:26px 24px;min-height:420px}figure{margin:0;min-width:0}figcaption{display:flex;gap:8px;justify-content:space-between;margin-bottom:12px;font-size:10px;color:var(--muted);align-items:center;min-height:18px}#source-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:55%}.small-canvas,.main-canvas{background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:2px}.small-canvas{background:#fff}.small-canvas canvas{max-height:200px}.main-canvas canvas{max-height:430px}canvas{display:block;width:100%;height:auto;object-fit:contain;image-rendering:pixelated}.motion-figure .micro{text-align:center}#motion-percent{color:var(--lime);font:11px Consolas,monospace}.transport{display:flex;gap:10px;align-items:center;padding:17px 20px;background:var(--panel);border-top:1px solid var(--line)}.transport button{font-size:12px;white-space:nowrap}.scrubber{flex:1;min-width:70px;padding:0 10px}.scrubber input{width:100%;accent-color:var(--lime);margin:0;cursor:pointer;min-height:26px}.scrubber .micro{display:flex;justify-content:space-between;font:8px Consolas,monospace;letter-spacing:1px}.duration{display:flex;flex-direction:column;gap:2px}.duration label{font-size:9px;color:var(--muted)}.duration select{font-size:11px;min-height:30px;padding:3px 6px;width:76px}.preview-explainer{font-size:11px;line-height:1.7;color:var(--muted);max-width:780px;margin:13px 0 27px}.library{margin-top:28px}.library h2{font-size:15px;letter-spacing:0}.asset-grid,.result-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin-top:14px}.asset{position:relative;min-width:0;display:flex;flex-direction:column;border:1px solid var(--line);background:var(--panel);border-radius:6px;overflow:hidden}.asset.is-target{border-color:#a5bd69}.asset-image{width:100%;height:112px;object-fit:cover;background:white;image-rendering:auto}.asset-info{padding:10px 12px 0}.asset-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.asset-info p{margin:3px 0 0;font-size:10px;color:var(--muted)}.asset-actions{display:flex;justify-content:space-between;gap:5px;padding:4px 7px}.asset-actions button{font-size:10px;border:0;padding:6px 7px;color:var(--muted)}.asset.is-target .target-button{color:var(--lime)}.badge{position:absolute;top:8px;left:8px;background:#20261b;color:var(--lime);font:9px Consolas,monospace;letter-spacing:1px;padding:4px 6px;border-radius:2px}.tray-empty{font-size:12px;color:var(--muted);grid-column:1/-1;border:1px dashed var(--line);border-radius:5px;padding:23px;text-align:center;margin:0}.result-card{background:var(--panel);border:1px solid var(--line);border-radius:6px;overflow:hidden;min-width:0}.result-card.selected{border-color:var(--lime)}.result-select{display:block;width:100%;border:0;border-radius:0;padding:0;text-align:left;min-width:0}.result-select img{width:100%;height:130px;object-fit:contain;display:block;background:white;image-rendering:pixelated}.result-select span{display:block;padding:12px;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.result-download{display:block;border:0;border-top:1px solid var(--line);width:100%;font-size:11px;text-align:left;color:var(--muted);border-radius:0}footer{display:flex;justify-content:space-between;gap:20px;border-top:1px solid var(--line);margin-top:36px;padding-top:17px;font:9px/1.5 Consolas,monospace;color:var(--muted);letter-spacing:.6px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:1600px){main{padding-left:55px;padding-right:55px}.preview{gap:35px;padding:35px}.main-canvas canvas{max-height:540px}.empty{min-height:500px}}
@media(max-width:1150px){.preview{grid-template-columns:1fr 2.5fr;gap:18px}.target-figure{grid-column:1;grid-row:2}.motion-figure{grid-column:2;grid-row:1/3}.small-canvas canvas{max-height:140px}.transport{flex-wrap:wrap}.scrubber{min-width:120px}.transport #download{margin-left:auto}.topbar{padding:0 24px}main{padding:26px 24px}.chip{display:none}}
@media(max-width:760px){.topbar{height:64px;padding:0 18px}.brand{font-size:22px}.edition{display:none}.private{font-size:10px}.shell{grid-template-columns:1fr}.sidebar{border-right:0;border-bottom:1px solid var(--line);padding:20px}.sidebar h1{font-size:31px}.intro{max-width:420px}.dropzone{padding:16px}.control-section{margin-top:20px}.sidebar details{margin-top:15px}.sidebar .control-section label{margin-top:14px}.sidebar .action-section{padding-top:18px}.sidebar h1 br{display:none}.sidebar h1 br:after{content:' '}.sidebar h1{line-height:1.25}main{padding:25px 16px 20px}.workspace-heading h2{max-width:85vw;font-size:22px}.preview{padding:18px 14px;gap:14px;grid-template-columns:1fr 1fr;min-height:0}.motion-figure{grid-column:1/-1;grid-row:1}.source-figure{grid-column:1;grid-row:2}.target-figure{grid-column:2;grid-row:2}.small-canvas canvas{height:100px;width:auto;max-width:100%}.small-canvas{height:100px}.main-canvas canvas{max-height:360px}.source-figure .micro,.target-figure .micro{margin-bottom:0}.transport{padding:14px 12px;gap:8px}.transport #play{min-width:70px}.transport #replay{min-width:90px}.scrubber{order:-1;flex-basis:100%;padding:0;margin-bottom:9px}.duration{margin-left:auto}.transport #download{flex-basis:100%;margin-top:4px}.asset-grid,.result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.asset-image{height:110px}footer{flex-direction:column;gap:9px}.empty{min-height:370px;padding:35px 15px}.pixel-icon{font-size:55px}.section-heading{flex-wrap:wrap}.preview-explainer{font-size:10px}.duration select{min-height:44px}.workspace-heading{margin-bottom:18px}}
.topbar{height:58px}.shell{grid-template-columns:240px minmax(0,1fr);min-height:calc(100vh - 58px)}.sidebar{padding:20px}.sidebar h2{font-size:15px}.dropzone{margin:14px 0;padding:20px 12px}.control-section{margin-top:20px}main{padding:18px 24px}.workspace-heading{margin-bottom:12px}.workspace-heading h1{font-size:19px;line-height:1.4;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:65vw}.preview{grid-template-columns:72px minmax(0,1fr) 72px;min-height:420px;padding:10px 18px 20px;gap:18px}.source-figure,.target-figure{grid-column:auto;grid-row:auto}.motion-figure{grid-column:2;grid-row:1}.main-canvas canvas{max-height:calc(100dvh - 350px)}.small-canvas canvas{max-height:90px}.library{margin-top:22px}.empty{min-height:390px;gap:22px}.empty h2{font-size:18px}
@media(max-width:760px){.shell{display:flex;flex-direction:column}.shell main{order:-1;padding:12px}.sidebar{border-top:1px solid var(--line);padding:18px}.workspace-heading h1{font-size:17px}.preview{grid-template-columns:1fr 1fr;padding:8px 12px;gap:10px;min-height:0}.motion-figure{grid-column:1/-1;grid-row:1}.source-figure{grid-column:1;grid-row:2}.target-figure{grid-column:2;grid-row:2}.small-canvas{height:40px;background:transparent}.small-canvas canvas{height:40px;width:auto}.source-figure figcaption,.target-figure figcaption{margin-bottom:4px}.main-canvas canvas{max-height:calc(100dvh - 370px);min-height:120px}.empty{min-height:300px}.transport #download{flex-basis:auto;margin:0}.transport{padding:10px}.duration{margin-left:auto}.topbar{padding:0 15px}}
/* Animation-first studio; fullscreen uses the same transport, never clones it. */
.stage-tools{display:flex;justify-content:flex-end;padding:8px 12px;flex:none}.stage-tools button{font-size:12px}.immersive-open{overflow:hidden}
.stage.immersive{position:fixed;inset:0;z-index:1000;width:100%;height:100vh;height:100dvh;border:0;border-radius:0;display:flex;flex-direction:column;background:#0a0e0b;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.stage.immersive .preview{flex:1;min-height:0;display:flex;padding:0 20px 12px;justify-content:center;overflow:hidden}
.stage.immersive .source-figure,.stage.immersive .target-figure{display:none}
.stage.immersive .motion-figure{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;min-height:0}
.stage.immersive figcaption{width:100%;max-width:1000px;flex:none}
.stage.immersive .main-canvas{flex:1;min-height:0;width:100%;background:transparent}
.stage.immersive .main-canvas canvas{height:100%;width:100%;max-height:none;object-fit:contain}
.stage.immersive .transport{flex:none}.stage.immersive .motion-figure .micro{display:none}
@media(max-width:760px){.stage.immersive .transport #download{flex-basis:auto;margin:0}.stage.immersive .preview{padding:0 8px 8px}.stage.immersive .transport{padding:8px}.stage.immersive .scrubber{margin-bottom:0}.stage.immersive .duration{margin-left:auto}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
/* Drawing retains the same canvas and controls in fullscreen. */
[hidden]{display:none!important}.mode-switch{display:flex;gap:4px;margin-right:auto}.mode-switch button[aria-pressed="true"]{color:var(--black);background:var(--lime);border-color:var(--lime)}.stage-tools{gap:8px}
#drawing-view{padding:10px 18px;display:flex;flex-direction:column;align-items:center;gap:6px}.drawing-surface{width:100%;display:flex;justify-content:center;align-items:center;min-height:0}#drawing-canvas{width:100%;height:auto;max-height:calc(100dvh - 350px);object-fit:contain;touch-action:none;cursor:crosshair;background:transparent}.draw-tools{display:flex;gap:14px;align-items:center;padding:14px 18px;background:var(--panel);border-top:1px solid var(--line);flex-wrap:wrap}.draw-tools label{display:flex;align-items:center;gap:8px;font-size:12px}.draw-tools input{width:100px;accent-color:var(--lime)}.draw-tools button{font-size:12px}.draw-tools #draw-download{margin-left:auto}
.stage.immersive #drawing-view{flex:1;min-height:0}.stage.immersive .drawing-surface{flex:1;min-height:0}.stage.immersive #drawing-canvas{height:100%;max-height:none}.stage.immersive .draw-tools{flex:none}
#drawing-canvas{max-height:none;min-height:0;flex:none}.drawing-surface{height:max(120px,calc(100dvh - 350px))}.stage.immersive .drawing-surface{height:0}.stage.immersive #drawing-canvas{height:auto}
@media(max-width:760px){.draw-tools{gap:8px;padding:10px}.draw-tools input{width:80px}.draw-tools>.micro{display:none}.mode-switch button{padding:8px 10px}}

.draw-tools #brush-color{width:44px;height:36px;padding:2px;border:1px solid var(--line);background:transparent}#drawing-canvas{background:#090c0a}
