:root{--bg:#212329;--panel:#282b32f0;--line:#ffffff24;--text:#eceef2;--dim:#9aa0ab;--accent:#4c9dff;--top:52px;--bottom:84px;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{overscroll-behavior:none;background:var(--bg);width:100%;height:100%;color:var(--text);touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;margin:0;font:15px/1.3 system-ui,-apple-system,sans-serif;overflow:hidden}button{font:inherit;color:inherit;cursor:pointer}#stage{touch-action:none;cursor:crosshair;width:100%;height:100%;display:block;position:fixed;inset:0}body.playing #chrome{display:none}body.playing #stage{cursor:pointer}.icon,.labelled{background:0 0;border:0;border-radius:11px;place-items:center;padding:0;display:grid}.icon{width:44px;height:44px}.labelled{min-width:52px;height:56px;color:var(--dim);gap:2px;padding:4px 6px;font-size:11px}.icon svg,.labelled svg{width:24px;height:24px;fill:var(--text)}.icon:active,.labelled:active{background:#ffffff1f}.icon[aria-pressed=true]{background:var(--accent)}.icon[aria-expanded=true]{background:#ffffff24}button:disabled{opacity:.35;cursor:default}#topbar{top:env(safe-area-inset-top,0px);left:env(safe-area-inset-left,0px);right:env(safe-area-inset-right,0px);height:var(--top);pointer-events:none;align-items:center;gap:4px;padding:0 8px;display:flex;position:fixed}#topbar>*{pointer-events:auto}.spacer{flex:1;pointer-events:none!important}#save-status{color:#ffd98a;background:#5a4410;border-radius:999px;margin-left:4px;padding:6px 10px;font-size:13px}#tools{left:calc(env(safe-area-inset-left,0px) + 10px);background:var(--panel);border:1px solid var(--line);border-radius:16px;flex-direction:column;align-items:center;gap:4px;padding:6px;display:flex;position:fixed;top:50%;transform:translateY(-50%);box-shadow:0 6px 24px #00000059}.sep{background:var(--line);width:28px;height:1px;margin:4px 0}#thickness{touch-action:none;overflow:hidden}#size-dot{background:var(--text);border-radius:50%;display:block}#color-box{border:2px solid #ffffffb3;border-radius:8px;width:28px;height:28px;display:block}#bottombar{height:calc(var(--bottom) + env(safe-area-inset-bottom,0px));padding:0 calc(env(safe-area-inset-right,0px) + 10px) env(safe-area-inset-bottom,0px) calc(env(safe-area-inset-left,0px) + 10px);background:var(--panel);border-top:1px solid var(--line);align-items:center;gap:10px;display:flex;position:fixed;bottom:0;left:0;right:0}.group{align-items:center;gap:4px;display:flex}#frame-counter{text-align:right;min-width:58px;color:var(--dim);font-variant-numeric:tabular-nums;font-size:13px}#timeline{touch-action:none;cursor:grab;flex:1;height:64px;position:relative;overflow:hidden;-webkit-mask-image:linear-gradient(90deg,#0000,#000 12% 88%,#0000);mask-image:linear-gradient(90deg,#0000,#000 12% 88%,#0000)}.frame{opacity:.75;background:#fff;border-radius:6px;outline:1px solid #ffffff2e;width:64px;height:36px;position:absolute;top:12px}.frame canvas{pointer-events:none;border-radius:6px;width:100%;height:100%;display:block}.frame[aria-current=true]{opacity:1;outline:3px solid var(--accent)}.badge{background:var(--accent);color:#fff;text-align:center;pointer-events:none;border-radius:10px;min-width:20px;height:20px;padding:0 5px;font-size:12px;font-weight:600;line-height:20px;position:absolute;top:-9px;right:-9px}.add-frame{width:36px;height:36px;color:var(--text);border:1.5px dashed #ffffff73;border-radius:8px;place-items:center;font-size:22px;line-height:1;display:grid;position:absolute;top:12px}.popover{background:var(--panel);border:1px solid var(--line);border-radius:14px;flex-direction:column;gap:2px;min-width:220px;padding:8px;display:flex;position:fixed;box-shadow:0 10px 32px #00000073}.popover>button{text-align:left;background:0 0;border:0;border-radius:9px;justify-content:space-between;align-items:center;gap:16px;min-height:44px;padding:0 12px;display:flex}.popover>button:active{background:#ffffff1f}.popover h2{margin:4px 8px 8px;font-size:15px;font-weight:600}.popover label{color:var(--dim);justify-content:space-between;margin:4px 8px 0;font-size:13px;display:flex}.popover output{color:var(--text);font-variant-numeric:tabular-nums}.popover input[type=range]{width:calc(100% - 16px);height:44px;accent-color:var(--accent);touch-action:none;margin:0 8px}.switch{background:#ffffff38;border-radius:12px;width:40px;height:24px;transition:background .12s;position:relative}.switch:after{content:"";background:#fff;border-radius:50%;width:18px;height:18px;transition:transform .12s;position:absolute;top:3px;left:3px}[aria-checked=true]>.switch{background:var(--accent)}[aria-checked=true]>.switch:after{transform:translate(16px)}#menu,#settings{top:calc(env(safe-area-inset-top,0px) + var(--top) + 2px);right:calc(env(safe-area-inset-right,0px) + 8px)}#settings{width:280px}#thickness-pop,#color-pop{left:calc(env(safe-area-inset-left,0px) + 76px);width:260px}#frame-menu{left:50%;bottom:calc(var(--bottom) + env(safe-area-inset-bottom,0px) + 8px);transform:translate(-50%)}.stepper{align-items:center;gap:8px;min-height:48px;padding:0 4px 0 12px;display:flex}.stepper span{flex:1}.stepper output{text-align:center;min-width:74px}.stepper button{border:1px solid var(--line);background:#ffffff0f;border-radius:10px;width:40px;height:40px;font-size:20px;line-height:1}#swatches{grid-template-columns:repeat(4,1fr);gap:4px;padding:4px;display:grid}.swatch{background:0 0;border:0;place-items:center;height:48px;padding:0;display:grid}.swatch span{border:1px solid #ffffff59;border-radius:50%;width:34px;height:34px}.swatch[aria-checked=true] span{box-shadow:0 0 0 2px var(--bg), 0 0 0 4px var(--accent)}#hud{right:calc(env(safe-area-inset-right,0px) + 10px);bottom:calc(var(--bottom) + env(safe-area-inset-bottom,0px) + 10px);background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px 12px;position:fixed}#hud-text{white-space:pre;pointer-events:none;margin:0 0 8px;font:12px/1.45 ui-monospace,Menlo,monospace}.hud-buttons{gap:6px;display:flex}.hud-buttons button{border:1px solid var(--line);background:#ffffff0f;border-radius:9px;min-height:36px;padding:0 10px;font-size:13px}#play-hint{left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 14px);color:#fff;pointer-events:none;background:#0000008c;border-radius:999px;padding:6px 12px;font-size:13px;position:fixed;transform:translate(-50%)}#fatal{text-align:center;background:var(--bg);place-items:center;padding:24px;font-size:18px;display:grid;position:fixed;inset:0}[hidden]{display:none!important}.text-button{border:1px solid var(--line);white-space:nowrap;background:#ffffff0f;border-radius:10px;min-height:40px;padding:0 14px}.text-button:active{background:#ffffff29}.text-button.primary{background:var(--accent);color:#fff;border-color:#0000;font-weight:600}.text-button.danger{background:#d43c3c}.row{flex-wrap:wrap;align-items:center;gap:8px;margin:6px 8px;display:flex}.row.end{justify-content:flex-end;margin-top:16px}label.inline{flex:1;margin:0}input[type=text]{border:1px solid var(--line);min-height:40px;color:var(--text);font:inherit;-webkit-user-select:text;user-select:text;background:#00000040;border-radius:9px;margin:4px 8px;padding:0 10px}input[type=color]{border:1px solid var(--line);background:0 0;border-radius:8px;width:52px;height:36px;padding:0}.swatch-row{flex-wrap:wrap;gap:2px;padding:0 4px;display:flex}.swatch-row .swatch{width:40px;height:44px}.swatch-row .swatch span{width:28px;height:28px}#layer-chip{border:1px solid var(--line);background:#ffffff0f;border-radius:11px;align-items:center;gap:6px;max-width:130px;height:44px;padding:0 10px;font-size:13px;display:flex}#layer-chip svg{width:20px;height:20px;fill:var(--text);flex:none}#layer-chip-name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#layers{bottom:calc(var(--bottom) + env(safe-area-inset-bottom,0px) + 8px);width:292px}#layer-list{touch-action:pan-y;flex-direction:column;gap:2px;max-height:232px;margin-bottom:6px;display:flex;overflow-y:auto}.layer-row{cursor:pointer;border-left:4px solid #0000;border-radius:9px;align-items:center;gap:8px;min-height:44px;padding:0 10px 0 4px;display:flex}.layer-row[aria-selected=true]{border-left-color:var(--accent);background:#4c9dff33}.layer-row .eye{background:0 0;border:0;width:40px;height:40px;font-size:18px}.layer-row .name{text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.layer-row .pct{color:var(--dim);font-variant-numeric:tabular-nums;font-size:13px}#layers .row{flex-wrap:nowrap;gap:6px}#layers .row .text-button{flex:1;padding:0 4px;font-size:13px}#color-pop{width:276px}#sv-box{touch-action:none;border-radius:10px;height:150px;margin:8px;position:relative;overflow:hidden}#sv{cursor:crosshair;width:100%;height:100%;display:block}#sv-knob{pointer-events:none;border:2px solid #fff;border-radius:50%;width:18px;height:18px;margin:-9px 0 0 -9px;position:absolute;box-shadow:0 0 0 1px #0009}#hue{appearance:none;background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red);border-radius:11px;height:22px!important;margin:6px 8px!important}#hue::-webkit-slider-thumb{-webkit-appearance:none;background:#fff;border:2px solid #00000080;border-radius:50%;width:22px;height:22px}#hue::-moz-range-thumb{background:#fff;border:2px solid #00000080;border-radius:50%;width:18px;height:18px}#hex{width:96px;margin:0;font-family:ui-monospace,Menlo,monospace}#overlay{pointer-events:none;width:100%;height:100%;position:fixed;inset:0}.lasso-path,.selection-box{fill:none;stroke:var(--accent);stroke-width:2px;stroke-dasharray:7 5}.handle{fill:#fff;stroke:var(--accent);stroke-width:2.5px;pointer-events:auto;touch-action:none;cursor:pointer}#selection-bar{top:calc(env(safe-area-inset-top,0px) + 6px);background:var(--panel);border:1px solid var(--line);border-radius:14px;gap:6px;padding:6px;display:flex;position:fixed;left:50%;transform:translate(-50%);box-shadow:0 6px 24px #00000059}body.playing #overlay,body.playing #selection-bar{display:none}#stage[data-tool=fill],#stage[data-tool=eyedropper]{cursor:cell}.sheet{background:var(--bg);padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);flex-direction:column;display:flex;position:fixed;inset:0}.sheet header{border-bottom:1px solid var(--line);align-items:center;gap:10px;padding:14px 20px;display:flex}.sheet h1{flex:1;margin:0;font-size:22px}#gallery-grid{touch-action:pan-y;flex:1;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));align-content:start;gap:18px;padding:20px;display:grid;overflow-y:auto}.card{border:1px solid var(--line);background:#ffffff0a;border-radius:14px;flex-direction:column;gap:4px;padding:10px;display:flex}.card[aria-current=true]{border-color:var(--accent)}.card.new{border-style:dashed;justify-content:center;align-items:center;min-height:200px;font-size:17px}.card .open{aspect-ratio:16/9;background:#fff;border:0;border-radius:8px;padding:0;overflow:hidden}.card .open img{object-fit:cover;width:100%;height:100%;display:block}.card .name{text-overflow:ellipsis;white-space:nowrap;margin-top:4px;font-weight:600;overflow:hidden}.card .date{color:var(--dim);font-size:13px}.card .actions{gap:6px;margin-top:4px;display:flex}.card .actions button{border:1px solid var(--line);background:0 0;border-radius:9px;flex:1;min-height:36px;font-size:13px}.help-body{touch-action:pan-y;-webkit-user-select:text;user-select:text;flex:1;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:6px 32px;padding:10px 24px 30px;display:grid;overflow-y:auto}.help-body h2{color:var(--accent);margin:18px 0 6px;font-size:17px}.help-body ul{margin:0;padding-left:20px}.help-body li{margin:6px 0;line-height:1.4}.dialog,#busy{background:#0000008c;place-items:center;display:grid;position:fixed;inset:0}.dialog-box{border:1px solid var(--line);background:#2b2e35;border-radius:16px;flex-direction:column;width:min(380px,100vw - 32px);padding:14px 10px;display:flex;box-shadow:0 16px 48px #00000080}.dialog-box h2{margin:4px 8px 10px;font-size:17px}.dialog-box label{color:var(--dim);justify-content:space-between;margin:8px 8px 0;font-size:13px;display:flex}.dialog-box label.choice{min-height:40px;color:var(--text);justify-content:flex-start;align-items:center;gap:8px;margin:0 12px 0 0;font-size:15px}.dialog-box input[type=range]{width:calc(100% - 16px);height:40px;accent-color:var(--accent);margin:0 8px}.dialog-box p{color:var(--dim);margin:8px;font-size:13px}#busy p{color:var(--text);font-size:15px}#busy progress{width:calc(100% - 16px);accent-color:var(--accent);margin:4px 8px 8px}#toast{left:50%;bottom:calc(var(--bottom) + env(safe-area-inset-bottom,0px) + 16px);border:1px solid var(--line);text-align:center;pointer-events:none;background:#0f1013eb;border-radius:20px;width:max-content;max-width:min(560px,100vw - 32px);padding:10px 16px;line-height:1.35;position:fixed;transform:translate(-50%)}#tooltip{border:1px solid var(--line);pointer-events:none;z-index:10;background:#0f1013;border-radius:8px;max-width:260px;padding:6px 10px;font-size:13px;line-height:1.3;position:fixed}.ill-defs{position:absolute}.ill{border:1px solid var(--line);background:#17191d;border-radius:12px;width:100%;max-width:440px;height:auto;margin:2px 0 8px;display:block}.ill text{fill:var(--dim);font:600 10px system-ui,-apple-system,sans-serif}.ill text.w,.ill .w{fill:#fff}.ill text.dk{fill:#201a00}.ill .a{fill:#d9655b}.ill .b{fill:#4fa873}.ill .c{fill:#6a8fe8}.ill .ly{fill:#5b8def}.ill .tx{fill:#e6b422}.ill .au{fill:#1fa890}.ill .bk{fill:#000}.ill .pg{fill:#fff}.ill .pn{fill:#33373f}.ill .k{fill:var(--accent)}.ill .ok{fill:#2f9e5b}.ill .key{fill:#2b2e35;stroke:#ffffff59}.ill .grip{fill:#ffd23f}.ill .sel{fill:none;stroke:#ffd23f;stroke-width:3px}.ill .jn{fill:var(--accent);stroke:#fff}.ill .ph{fill:none;stroke:#ff4d4d;stroke-width:2px}.ill .ph-top{fill:#ff4d4d}.ill .wv{fill:none;stroke:#ffffffa6;stroke-width:2px}.ill .g{fill:none;stroke:#fff;stroke-width:2px;stroke-linecap:round;marker-end:url(#ill-arrow)}.ill .d,.ill .d2{fill:none;stroke:var(--dim);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ill .d2{stroke:#ffffff4d}.ill .dash{fill:none;stroke:#fff;stroke-width:1.5px;stroke-dasharray:4 3}.ill .no{fill:none;stroke:#ff4d4d;stroke-width:3px;stroke-linecap:round}.ill .ink,.ill .blue{fill:none;stroke:#1b1b1f;stroke-width:3px;stroke-linecap:round}.ill .blue{stroke:#2f7de1;stroke-width:5px}.ill .sl{fill:none;stroke:#2f7de1;stroke-width:1.5px;stroke-dasharray:4 3}.ill .hd{fill:#fff;stroke:#2f7de1;stroke-width:2px}.ill .gd,.ill .lead{fill:none;stroke:#5a606b;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round}.ill .gd{marker-end:url(#ill-arrow-dark)}.ill .lead{stroke-width:1.5px}#movie-info.blocked{color:#ff8a80}
