:root{--bg:#1F2023;--panel:#2B2D31;--line:#3a3d43;--text:#E8E8E6;--mint:#8ED9B0;--green:#1E8A4C}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font:13px/1.3 -apple-system,system-ui,sans-serif;overflow:hidden;overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}#app{display:block}#top{grid-area:top;display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:6px 8px;background:var(--panel);border-bottom:1px solid var(--line)}.brand{color:var(--mint);margin-right:6px}.sep{width:8px}#status{margin-left:auto;opacity:.7;font-variant-numeric:tabular-nums}button{background:#3a3d43;color:var(--text);border:1px solid #4a4d55;border-radius:7px;padding:7px 9px;font:inherit;min-height:34px;touch-action:manipulation}button:active{background:#4a4d55}button.on{background:var(--green);border-color:var(--mint)}button.accent{background:#25643f}input,select{font:inherit;background:#1a1b1e;color:var(--text);border:1px solid var(--line);border-radius:6px;padding:5px}input[type=number]{width:58px}label{display:inline-flex;gap:4px;align-items:center}.chk input{width:18px;height:18px}#tools{grid-area:tools;display:flex;flex-direction:column;gap:4px;padding:6px;background:var(--panel);border-right:1px solid var(--line);overflow-y:auto}#tools button{padding:8px 2px;font-size:12px}#tools hr{width:100%;border:0;border-top:1px solid var(--line);margin:2px 0}#stage{grid-area:stage;position:relative;overflow:hidden;background:#18191b;touch-action:none}body.bw #view,body.bw #pv{filter:grayscale(1)}#view{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;touch-action:none;display:block}#toast{position:absolute;left:50%;bottom:16px;transform:translate(-50%);background:#000c;padding:8px 14px;border-radius:8px;opacity:0;transition:opacity .2s;pointer-events:none}#toast.show{opacity:1}.fwb h3{margin:2px 0 6px;font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--mint);display:flex;justify-content:space-between;align-items:center}.mini button{min-height:26px;padding:2px 7px;font-size:12px;margin-left:2px}.colourrow{display:flex;gap:6px;align-items:center;margin-bottom:6px}#wheel{display:block;touch-action:none}#palette{display:grid;grid-template-columns:repeat(8,1fr);gap:3px}#palette div{aspect-ratio:1;border-radius:4px;border:2px solid transparent}#palette div.sel{border-color:#fff}#layers{display:flex;flex-direction:column-reverse;gap:3px;margin-bottom:6px}.layer{display:flex;align-items:center;gap:3px;padding:5px;border-radius:6px;background:#232428;border:1px solid transparent}.layer.sel{border-color:var(--mint);background:#25332c}.layer .eye{min-height:28px;padding:2px 5px}.layer .name{min-width:3em}.layer .name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layer .kind{font-size:10px;opacity:.7}.btnrow{display:flex;gap:4px;flex-wrap:wrap;margin:5px 0}.btnrow button{flex:1}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:4px}.hint{font-size:11px;opacity:.65;margin:4px 0 0}#timeline{grid-area:tl;display:flex;flex-wrap:wrap;gap:5px;align-items:center;padding:6px 8px;background:var(--panel);border-top:1px solid var(--line);overflow-x:auto}#frames{display:flex;gap:3px;margin-left:8px}#frames button{min-width:34px}dialog{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:10px;min-width:320px}dialog::backdrop{background:#0008}dialog form{display:flex;flex-direction:column;gap:8px}dialog textarea{width:100%;height:140px;background:#1a1b1e;color:var(--text);border:1px solid var(--line);border-radius:6px;font:12px monospace}.layer.grouped{margin-left:10px;border-left:3px solid #E9B23C}#frames{flex-wrap:wrap}#frames button{display:flex;flex-direction:column;align-items:center;padding:2px 3px;gap:1px;font-size:11px}#frames button canvas{width:28px;height:28px;object-fit:contain;image-rendering:pixelated;background:#d9d9d9}#frameMs{width:64px}#onionOp{width:70px}.btnrow.seg button.on,.layer .eye.on2{background:var(--green, #1E8A4C);color:#fff}#pv{position:absolute;right:8px;top:8px;max-width:180px;max-height:180px;image-rendering:pixelated;background:#d9d9d9;border:2px solid #2b2c30;border-radius:4px;pointer-events:none}.glist{max-height:55vh;overflow:auto;display:flex;flex-direction:column;gap:6px;min-width:min(560px,80vw)}.gitem{display:flex;gap:8px;align-items:center;padding:6px;border:1px solid var(--line);border-radius:8px}.gitem.cur{border-color:var(--green, #1E8A4C)}.gitem img{width:56px;height:56px;object-fit:contain;image-rendering:pixelated;background:repeating-conic-gradient(#555 0,#555 25%,#777 0,#777 50%) 0 0/12px 12px;border-radius:4px}.gmeta{flex:1;display:flex;flex-direction:column;font-size:12px;min-width:0}.gmeta b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gmeta span{opacity:.65}.gbtns{display:flex;gap:4px;flex-wrap:wrap}#frames button{touch-action:none}#frames button.dropAt{outline:2px solid #29adff;outline-offset:1px}#frames button.linked:after{content:"🔗";font-size:9px;line-height:1}.layer.clipped{border-left:3px solid #29ADFF}.tagsw{width:14px;height:28px;border-radius:3px;flex:none}.badge{font-size:10px;background:#29adff;color:#000;border-radius:4px;padding:1px 4px;vertical-align:middle}#palette div.slot{outline:2px solid #29ADFF;outline-offset:1px}.gbtns select{font-size:12px;max-width:110px}.gfolder:empty{display:none}#brushes{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0}#brushes canvas{width:32px;height:32px;image-rendering:pixelated;object-fit:contain;background:repeating-conic-gradient(#555 0,#555 25%,#777 0,#777 50%) 0 0/8px 8px;border:2px solid transparent;border-radius:4px}#brushes canvas.on{border-color:var(--green, #1E8A4C)}#palette{touch-action:none}#palette div.dropAt{outline:2px dashed #FFEC27;outline-offset:1px}.ramp{display:flex;height:28px;border-radius:6px;overflow:hidden;margin:6px 0}.ramp i{flex:1}:root{--bg:#1F2023;--head:#18191C;--panel:#2B2D31;--panel2:#34373C;--line:#3E4147;--line2:#4C5057;--text:#F4F5F6;--muted:#A9ADB3;--green:#1E8A4C;--green-h:#22A05A;--green-d:#1E5A39;--mint:#8ED9B0;--tap:32px;accent-color:#1E8A4C}html,body{font-size:14px;-webkit-font-smoothing:antialiased}#top{background:var(--head);border-bottom:2px solid var(--green);gap:6px;padding:6px 10px}#timeline{background:var(--head);border-top:1px solid var(--line);gap:6px}#status{color:var(--muted);opacity:1}.brand{color:var(--mint);font-weight:700}button{min-height:var(--tap);min-width:var(--tap);padding:8px 11px;background:var(--panel2);color:var(--text);border:1px solid var(--line2);border-radius:8px;font-weight:600;transition:background .12s,border-color .12s}button:hover{background:var(--line);border-color:var(--line2)}button:active{background:var(--line2)}button.on,.btnrow.seg button.on,.layer .eye.on2{background:var(--green);border-color:var(--green-h);color:#fff;box-shadow:inset 0 0 0 1px var(--mint)}button.accent{background:var(--green);border-color:var(--green);color:#fff}button.accent:hover{background:var(--green-h)}button:disabled{opacity:.45}:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--mint);outline-offset:2px}#tools button{min-height:var(--tap);padding:6px 2px;font-size:13px}.mini button,.fwb h3 .mini button{min-height:var(--tap);min-width:var(--tap);padding:4px 8px;font-size:13px;margin-left:3px}.fwb h3{color:var(--mint);flex-wrap:wrap;gap:4px;font-size:12px;letter-spacing:.07em}.fwb section{border-bottom:1px solid var(--line)}input,select,textarea{background:var(--head);color:var(--text);border:1px solid var(--line2);border-radius:8px;min-height:var(--tap);padding:6px 8px}input[type=number]{width:64px}input[type=checkbox]{min-height:0;width:22px;height:22px;accent-color:var(--green)}.chk input{width:22px;height:22px}label.chk,#top label,#timeline label{min-height:var(--tap)}input[type=range]{min-height:var(--tap);padding:0;background:transparent;border:0;accent-color:var(--green)}.grid2{gap:6px}.grid2 label{min-width:0;display:flex;justify-content:space-between}.grid2 label input,.grid2 label select{flex:1;min-width:0;width:auto;max-width:100%}.hint{color:var(--muted);opacity:1}#palette{grid-template-columns:repeat(auto-fill,minmax(var(--tap),1fr));gap:4px}#palette div{min-height:var(--tap);border-radius:6px;border:2px solid var(--line)}#palette div.sel{border-color:#fff;box-shadow:0 0 0 2px var(--green)}#palette div.slot{outline:2px solid var(--mint)}#palette div.dropAt{outline:2px dashed var(--mint)}.layer{background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:4px;min-height:52px}.layer.sel{border-color:var(--mint);background:var(--green-d)}.layer .eye{min-height:var(--tap);min-width:var(--tap);padding:2px 6px}.layer .kind{color:var(--muted);opacity:1}#frames{gap:4px}#frames button{min-width:var(--tap);min-height:52px;background:var(--panel2)}#frames button.on{background:var(--green)}#frames button.dropAt{outline:2px dashed var(--mint);outline-offset:2px}#frames button canvas{width:30px;height:30px}dialog{background:var(--panel);color:var(--text);border:1px solid var(--line2);border-top:3px solid var(--green);border-radius:12px;box-shadow:0 18px 50px #000a}dialog h2,dialog h3,dialog b:first-child{color:var(--mint)}dialog::backdrop{background:#0009}#toast{background:var(--head);border:1px solid var(--green);color:var(--text)}.gitem{border-color:var(--line);background:var(--bg)}.gitem.cur{border-color:var(--mint)}#brushes canvas{width:var(--tap);height:var(--tap);border-color:var(--line)}#brushes canvas.on{border-color:var(--mint)}#pv{border-color:var(--line2)}input[type=checkbox],.chk input{width:28px;height:28px}.grid2 label:has(input[type=range]){grid-column:1 / -1}.grid2 label input[type=range],.fwb label input[type=range]{flex:1;min-width:120px}.refwin{position:fixed;z-index:40;background:#1f2023;border:1px solid #3E4147;border-radius:8px;box-shadow:0 6px 24px #00000080;max-width:min(70vw,640px);max-height:70vh;display:flex;flex-direction:column;overflow:hidden}.refwin .rwbar{display:flex;align-items:center;gap:4px;padding:0 4px 0 10px;min-height:var(--tap);background:#2b2d31;cursor:move;touch-action:none;-webkit-user-select:none;user-select:none}.refwin .rwname{flex:1;color:#a9adb3;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:40px}.refwin .rwbar button{min-width:var(--tap);min-height:var(--tap)}.refwin .rwbody{overflow:auto;padding:6px;touch-action:pan-x pan-y}.refwin canvas{display:block;image-rendering:pixelated;cursor:crosshair}#tileGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--tap),1fr));gap:4px;max-height:200px;overflow-y:auto;margin:4px 0}#tileGrid button.tile{min-height:var(--tap);min-width:var(--tap);padding:2px;font-size:11px;display:flex;align-items:center;justify-content:center;background:repeating-conic-gradient(#3a4250 0,#3a4250 25%,#2c333e 0,#2c333e 50%) 0 0/10px 10px}#tileGrid button.tile canvas{width:36px;height:36px;image-rendering:pixelated;object-fit:contain}#tileGrid button.tile.on{outline:2px solid var(--mint);background-color:var(--green)}.hrow{display:flex;align-items:center;gap:6px;margin:6px 0;flex-wrap:wrap}.hrow .hname{flex:0 0 140px;font-size:13px}.hrow .hsws{display:flex;gap:4px;flex:1;flex-wrap:wrap}.hsw{min-width:var(--tap, var(--tap));min-height:var(--tap, var(--tap));width:var(--tap);height:var(--tap);padding:0;border:2px solid #0006;border-radius:6px}.hsw.on{border-color:var(--mint, #7ee2a8);box-shadow:0 0 0 2px var(--green, #1E8A4C)}#sizeMarks button{min-height:var(--tap, var(--tap))}.pgi{width:12px;height:12px;display:block;flex:none;pointer-events:none;color:#f4f5f6;overflow:visible}.pgi *{vector-effect:non-scaling-stroke}.pgi{stroke-width:1.5px}.pgi-off{opacity:.45}.icb .lbl{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}button.icb{display:inline-flex;align-items:center;justify-content:center;padding:0;min-width:var(--tap);min-height:var(--tap);width:var(--tap);height:var(--tap)}#tools button.icb{width:auto;padding:0}button.on .pgi,.ictog:has(input:checked) .pgi,#menuBtn[aria-expanded=true] .pgi,#top .mbtn[aria-expanded=true] .pgi,.layer .eye.on2 .pgi{color:#fff}label.ictog{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--tap);height:var(--tap);min-height:var(--tap);padding:0;gap:0;background:var(--panel2);border:1px solid var(--line2);border-radius:8px}label.ictog input,label.ictog input[type=checkbox]{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;z-index:1}label.ictog:has(input:checked){background:var(--green);border-color:var(--green-h);box-shadow:inset 0 0 0 1px var(--mint)}label.ictog:has(input:focus-visible){outline:2px solid var(--mint);outline-offset:2px}#top{gap:4px}#top .sep{width:6px}#status{flex:1 1 120px;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:right}#icTip{position:fixed;z-index:60;pointer-events:none;background:var(--head);color:var(--text);border:1px solid var(--green);border-radius:6px;padding:6px 10px;font-size:13px;font-weight:600;white-space:nowrap;box-shadow:0 4px 14px #0008}#top .brand{flex:none;width:82px;white-space:nowrap}#status{line-height:20px}.pop{position:fixed;z-index:60;width:316px;max-width:calc(100vw - 16px);display:flex;flex-direction:column;background:var(--panel);color:var(--text);border:1px solid var(--line2);border-top:3px solid var(--green);border-radius:12px;box-shadow:0 18px 50px #000a;overscroll-behavior:contain}.pop[hidden]{display:none}.pop:before{content:"";position:absolute;top:calc(var(--nub, 22px) - 7px);width:12px;height:12px;background:var(--panel);border:1px solid var(--line2);transform:rotate(45deg)}.pop[data-side=right]:before{left:-7px;border-top:0;border-right:0}.pop[data-side=left]:before{right:-7px;border-bottom:0;border-left:0}.pop[data-side=below]:before{display:none}.popHead{display:flex;align-items:center;gap:8px;padding:4px 4px 4px 12px;background:var(--head);border-radius:9px 9px 0 0;border-bottom:1px solid var(--line);position:relative;z-index:1}.popHead b{flex:1;color:var(--mint);font-size:12px;text-transform:uppercase;letter-spacing:.07em}.popIcon .pgi{width:11px;height:11px}.popX{min-width:var(--tap);min-height:var(--tap);padding:0;font-size:22px;line-height:1;background:transparent;border-color:transparent}.popBody{overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:4px 12px 10px;position:relative;z-index:1;touch-action:pan-y}.pop section{border-bottom:1px solid var(--line);padding:8px 0 10px}.pop section:last-child,.pop section.lastvis{border-bottom:0}.pop section.notool{display:none}.pop h3{margin:2px 0 6px;font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--mint);display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:4px}.pop h4{margin:10px 0 4px;font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}.pop label{display:flex;align-items:center;gap:6px;margin:4px 0}.pop .grid2 label{flex-direction:column;align-items:stretch;gap:2px;font-size:12px;color:var(--muted)}.pop label input[type=range]{flex:1;min-width:120px}.pop input:not([type=checkbox]):not([type=range]),.pop select{font-size:16px}.pop .btnrow.seg{flex-wrap:wrap}.pop .btnrow.seg button{flex:1 1 0;min-width:var(--tap);display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px 2px;font-size:10px}.pop .btnrow.seg button .pgi{width:11px;height:11px}.mpop{width:300px}.mpop .btnrow{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding-top:6px}.mpop button.icb,.mpop label.ictog{width:auto;justify-content:flex-start;gap:8px;padding:0 10px;margin:0}.mpop .icb .lbl{position:static;width:auto;height:auto;overflow:visible;clip:auto;clip-path:none;font-size:13px}.mpop label.ictog input{z-index:1}#top .mbtn{min-height:var(--tap);padding:0 12px}#top .mbtn[aria-expanded=true],#colPal.on{background:var(--green);border-color:var(--green-h);color:#0e2a1a}#colInner button.cpart{display:flex;align-items:center;justify-content:center}#colInner .cpart .pgi{width:min(18px,calc(12px / var(--k)));height:min(18px,calc(12px / var(--k)))}#colInner .cpart.fwx,#colMove{font-size:min(40px,calc(20px / var(--k)))}#tools button[aria-expanded=true]{outline:2px solid var(--mint);outline-offset:1px}#stage{position:fixed;top:0;right:0;bottom:0;left:0}#wins{position:fixed;top:0;right:0;bottom:0;left:0;z-index:45;pointer-events:none;visibility:hidden}body.ui-on #wins{visibility:visible}.fw{position:absolute;left:0;top:0;pointer-events:auto;display:flex;flex-direction:column;min-width:0;background:var(--panel);color:var(--text);border:1px solid var(--line2);border-top:3px solid var(--green);border-radius:12px;box-shadow:0 10px 30px #0009;contain:layout style;will-change:transform}.fw[hidden]{display:none!important}.fwh{flex:none;display:flex;align-items:center;gap:8px;min-height:var(--tap);padding:0 2px 0 12px;background:var(--head);border-radius:9px 9px 0 0;border-bottom:1px solid var(--line);cursor:move;touch-action:none;-webkit-user-select:none;user-select:none}.fwh b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--mint);font-size:12px;text-transform:uppercase;letter-spacing:.07em}.fwi .pgi{width:10px;height:10px;color:var(--mint)}.fwx .pgi{width:11px;height:11px}.fwx{flex:none;min-width:var(--tap);min-height:var(--tap);padding:0;font-size:22px;line-height:1;background:transparent;border-color:transparent}.fwb{flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-x pan-y;padding:4px 10px 10px;border-radius:0 0 11px 11px}.fw.drag{box-shadow:0 14px 40px #000b}.fw.drag .fwb{pointer-events:none}.fwr{position:absolute;display:block;touch-action:none;z-index:2}.fwr[data-r=e]{top:var(--tap);bottom:22px;right:-12px;width:20px;cursor:ew-resize}.fwr[data-r=w]{top:var(--tap);bottom:22px;left:-12px;width:20px;cursor:ew-resize}.fwr[data-r=s]{left:22px;right:22px;bottom:-12px;height:20px;cursor:ns-resize}.fwr[data-r=se],.fwr[data-r=sw]{bottom:-14px;width:var(--tap);height:var(--tap)}.fwr[data-r=se]{right:-14px;cursor:nwse-resize}.fwr[data-r=sw]{left:-14px;cursor:nesw-resize}.fwr[data-r=se]:after,.fwr[data-r=sw]:after{content:"";position:absolute;bottom:18px;width:10px;height:10px;border-bottom:3px solid var(--line2)}.fwr[data-r=se]:after{right:18px;border-right:3px solid var(--line2);border-bottom-right-radius:3px}.fwr[data-r=sw]:after{left:18px;border-left:3px solid var(--line2);border-bottom-left-radius:3px}.fw:hover .fwr:after,.fw.drag .fwr:after{border-color:var(--mint)}.fwb section{border-bottom:1px solid var(--line);padding:6px 0 8px}.fwb section:last-of-type{border-bottom:0}.fwb .whenEmpty{display:none}.fwb:not(:has(>section:not([hidden])))>.whenEmpty{display:block;margin:8px 0}.fw input:not([type=checkbox]):not([type=range]),.fw select{font-size:16px}.fwb #top{display:flex;flex-wrap:wrap;gap:4px;padding:4px 0;background:transparent;border:0}.fwb #status{flex:1 1 100%;text-align:left;order:99}.fwb #tools{display:grid;grid-template-columns:repeat(auto-fill,var(--tap));justify-content:center;justify-content:start;align-content:start;gap:4px;padding:6px 0;background:transparent;border:0;overflow:visible}.fwb #tools button.icb{width:var(--tap);height:var(--tap);min-width:var(--tap)}.fwb #timeline{display:flex;flex-wrap:nowrap;gap:2px;padding:2px 0;align-items:center;background:transparent;border:0;overflow-x:auto}.fwb #timeline>button,.fwb #timeline button.icg{width:28px;height:28px;min-width:28px;min-height:28px;padding:0}.fwb #timeline button.icg .pgi{width:14px;height:14px}.fwb #frames{gap:2px;flex:none}.fwb #frames button{min-width:28px;min-height:34px;padding:1px;gap:0}.fwb #frames button span{font-size:9px;line-height:1}.fwb #frames button canvas{width:22px;height:22px}.fwb #timeline label,.fwb #timeline .tlNum{min-height:28px;gap:0;font-size:0}.fwb #timeline label.tlNum.whide{display:none}.fwb #timeline input[type=number]{width:40px;min-height:28px;height:28px;padding:0 2px;font-size:12px}.fwb #timeline input[type=range]{width:52px;min-width:52px;min-height:22px;height:22px}.fwb #timeline select{min-height:28px;height:28px;max-width:92px;padding:0 2px;font-size:11px}.fwb #timeline label.chk{width:28px;min-width:28px;padding:0;justify-content:center}#w-tools .fwb{padding:4px 8px 8px}.refwin{z-index:44}.fw.cbox{display:block}#colInner{position:absolute;left:0;top:0;width:100%;height:100%;transform-origin:0 0;--k:1}#colInner>*{position:absolute;left:0;top:0}#colBg{top:0;right:0;bottom:0;left:0;width:100%;height:100%;touch-action:none;cursor:move}#colHead{box-sizing:border-box;overflow:hidden;white-space:nowrap;display:flex;align-items:center;justify-content:center;background:var(--head);border-bottom:1px solid var(--line);border-radius:9px 9px 0 0;touch-action:none;cursor:move;-webkit-user-select:none;user-select:none}#colHead b{color:var(--mint);font-size:12px;text-transform:uppercase;letter-spacing:.07em}#w-colour .gone{visibility:hidden;pointer-events:none!important}#colSV,#colHue,#colAlpha{display:block;touch-action:none;cursor:crosshair;z-index:1}#colSV{border-radius:6px;box-shadow:0 0 0 1px var(--line2)}#colHue,#colAlpha{cursor:ew-resize}#recent{top:0;right:0;bottom:0;left:0;width:0;height:0}.cb,#recent .rc{position:absolute;left:0;top:0;min-width:0;min-height:0;padding:0;touch-action:none}#recent .rc{border:2px solid var(--line2);border-radius:6px;cursor:pointer;background:linear-gradient(var(--c),var(--c)),repeating-conic-gradient(#555 0,#555 25%,#777 0,#777 50%) 0 0/12px 12px}#recent .rc:active{border-color:var(--mint)}#recent .rc.empty{background:transparent;border:2px dashed var(--line2);cursor:default}.sw.cb{overflow:hidden;border:3px solid var(--line2);border-radius:8px;background:repeating-conic-gradient(#555 0,#555 25%,#777 0,#777 50%) 0 0/12px 12px}.sw.cb:hover{background:repeating-conic-gradient(#555 0,#555 25%,#777 0,#777 50%) 0 0/12px 12px;border-color:var(--muted)}.sw i{position:absolute;top:0;right:0;bottom:0;left:0}.sw.on{border-color:var(--mint);box-shadow:0 0 0 3px var(--green)}#swapCol{font-size:18px;border-radius:50%}.cgrip{font-size:18px;color:var(--muted);background:transparent;border-color:transparent;cursor:move;z-index:2}.cgrip:after{content:"";position:absolute;left:50%;top:50%;width:max(100%,calc(var(--tap) / var(--k)));height:max(100%,calc(var(--tap) / var(--k)));transform:translate(-50%,-50%);border-radius:50%}#colSize{cursor:nwse-resize;background:var(--head);border-color:var(--line2);border-radius:8px}.sw.cb,#swapCol{z-index:3}#w-colour .fwx{z-index:2}#hexBtn{border-radius:8px;font-family:ui-monospace,Menlo,monospace;font-size:15px;letter-spacing:.04em;text-align:left;padding:0 12px}#hexPop{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);z-index:4;display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--panel);border:1px solid var(--line2);border-top:3px solid var(--green);border-radius:12px;box-shadow:0 10px 30px #000a}#hexPop[hidden]{display:none}#hexPop label{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;font-size:12px;color:var(--muted)}#hexPop input{width:120px;height:var(--tap);font-family:ui-monospace,Menlo,monospace;text-transform:uppercase;font-size:16px}.vh{position:absolute!important;width:1px;height:1px;opacity:0;overflow:hidden;clip-path:inset(50%);pointer-events:none!important}#tools button[data-group].icb{width:var(--tap);height:var(--tap);min-width:var(--tap)}#popTools{margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid var(--line)}#popTools[hidden]{display:none}#toolPop{transition:opacity .15s ease-out}#toolPop.fading{opacity:0;pointer-events:none}#colPick.on{background:var(--green);border-color:var(--green-h)}#w-tiles .btnrow{margin-bottom:8px}.layer .eye.icb{width:var(--tap);height:var(--tap);padding:0}.layer .eye.vis{background:transparent}#w-layers .btnrow button.icb,#w-layers h3 .mini button.icb{width:var(--tap);height:var(--tap);min-width:var(--tap);padding:0;margin-left:0}#w-layers h3 .mini{display:inline-flex;gap:4px}#selLaunch{position:fixed;left:0;top:0;z-index:55;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:2px;padding:3px;max-width:calc(100vw - 16px);background:var(--panel);border:1px solid var(--line2);border-radius:12px;box-shadow:0 8px 24px #0008;touch-action:none;user-select:none;-webkit-user-select:none}#selLaunch[hidden]{display:none}#selLaunch .slActs{display:flex;flex-wrap:wrap;justify-content:center;gap:2px}#selLaunch button.icb{width:var(--tap);height:var(--tap);min-width:var(--tap);min-height:var(--tap)}#selLaunch .pgi{width:12px;height:12px}#selLaunch .slGrip{cursor:grab;border-right:1px solid var(--line2);border-radius:8px 0 0 8px}#selLaunch .slGrip .pgi{width:11px;height:11px;color:#a9adb3}#selLaunch button:disabled{opacity:.35}.slPop{z-index:61;max-height:calc(100vh - 16px);overflow-y:auto;padding:0 10px}.slPop h3 button{min-height:var(--tap);min-width:64px}.slPop .slRow{display:flex;align-items:center;gap:4px}.slPop .slRow label{flex:1;margin:0;min-height:var(--tap)}.slPop .slRow button{min-width:var(--tap);min-height:var(--tap);font-size:11px;padding:0 4px}.slPop .slRow button:disabled{opacity:.3}.slPop .slIc .pgi{width:11px;height:11px;display:block}.slPop .btnrow button{flex:1;min-height:var(--tap)}#hsbBack{position:fixed;top:0;right:0;bottom:0;left:0;z-index:58;background:transparent;touch-action:none}#hsbBack[hidden]{display:none}#hsbPop{z-index:62;width:340px;padding:0 12px}#hsbPop .hsbRow{display:grid;grid-template-columns:84px 1fr 40px;align-items:center;gap:8px;min-height:var(--tap);margin:2px 0}#hsbPop .hsbRow input[type=range]{min-width:0;height:var(--tap)}#hsbPop output{text-align:right;font-variant-numeric:tabular-nums}#hsbPop .btnrow button{flex:1;min-height:var(--tap)}#selLaunch button.icb.on{background:var(--green)}#hsbPop:before{display:none}#menuPop{width:min(460px,calc(100vw - 16px))}#menuPop #top{display:flex;flex-wrap:wrap;gap:4px;padding:4px 0;background:transparent;border:0}#menuPop #status{flex:1 1 100%;text-align:left;order:99}#w-stage .stBody{display:flex;flex-direction:column;gap:6px;overflow:auto}#w-stage .stView{flex:1 1 auto;min-height:120px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#1b1f27;border-radius:6px}#stageCv{display:block;image-rendering:pixelated;image-rendering:crisp-edges;touch-action:none;outline:none}#stageCv:focus-visible{box-shadow:0 0 0 2px #8ed9b0}#w-stage .stCtl{display:flex;gap:6px;justify-content:space-between;flex:none}#w-stage .stBtn{min-width:var(--tap);min-height:var(--tap);flex:1 1 0;touch-action:none;user-select:none;-webkit-user-select:none;display:inline-flex;align-items:center;justify-content:center}#w-stage .stSet{flex:none;font-size:13px}#w-stage .stSet summary{min-height:var(--tap);display:flex;align-items:center;cursor:pointer}#w-stage .stRow{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:4px 0}#w-stage .stRow>span{width:52px}#w-stage .stRow select{min-height:var(--tap);flex:1 1 120px}#w-stage .stRange{display:none}#w-stage .stRow.range .stRange{display:inline-flex;align-items:center;gap:4px}#w-stage .stRange input,#w-stage .stNum input{width:64px;min-height:var(--tap)}#w-stage .stNums{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:4px 10px;margin-top:6px}#w-stage .stNum{display:flex;align-items:center;justify-content:space-between;gap:6px}#w-stage .stChecks{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:4px}#w-stage .stChecks label{min-height:var(--tap);display:inline-flex;align-items:center;gap:6px}.fwx,button.icg{display:inline-flex;align-items:center;justify-content:center}button.icg .pgi{width:11px;height:11px}#colInner button.icg .pgi{width:min(18px,calc(12px / var(--k)));height:min(18px,calc(12px / var(--k)))}.fw[data-wk]>.fwh,.fw[data-wk]>.fwb{zoom:var(--wk, 1)}.fw[data-tight] .whide{display:none!important}#w-layers .lyBar{display:flex;flex-wrap:wrap;gap:2px;margin:2px 0 6px}#w-layers .lyBar button.icb,.layer button.icb.eye,.layer .lyRowMore{width:32px;height:32px;min-width:32px;min-height:32px;padding:0;flex:none}#w-layers .lyBar .lyMore{margin-left:auto}#layers{gap:2px}#layers .layer{min-height:40px;padding:3px 4px;gap:4px}.layer .lyThumb{width:32px;height:32px;flex:none;border-radius:4px;border:1px solid var(--line);image-rendering:pixelated;background:repeating-conic-gradient(#555 0,#555 25%,#777 0,#777 50%) 0 0/8px 8px}.layer .info{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2}.layer .info .name{flex:none}.layer .lyRowMore{background:transparent;border-color:transparent}#layerPop .lyRow{display:flex;align-items:center;gap:8px;min-height:var(--tap);margin:2px 0}#layerPop .lyRow input[type=range],#layerPop .lyRow select{flex:1;min-width:0}#layerPop #lyToggles{grid-template-columns:1fr 1fr}#layerPop #lyToggles button.icb{width:auto;height:var(--tap);justify-content:flex-start;gap:8px;padding:0 10px}#layerPop{width:330px}#layerPop [hidden]{display:none!important}#pgBar{position:fixed;left:0;top:0;z-index:58;display:flex;align-items:center;gap:2px;padding:3px;background:var(--head);border:1px solid var(--line2);border-radius:12px;box-shadow:0 8px 24px #0009;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;will-change:transform}#pgBar button{width:36px;height:36px;min-width:36px;min-height:36px;padding:0;display:flex;align-items:center;justify-content:center;background:transparent;border-color:transparent}#pgBar button .pgi{width:14px;height:14px}#pgBar button.on{background:var(--green);border-color:var(--green-h)}#pgBar .pbGrip{width:22px;min-width:22px;cursor:grab;border-right:1px solid var(--line2);border-radius:8px 0 0 8px}#pgBar .pbGrip .pgi{width:11px;height:11px;color:#a9adb3}#pgBar.moving{box-shadow:0 14px 40px #000b}.fw.docked .fwh{cursor:default;min-height:28px}.fw.docked .fwh .fwx{min-height:28px}html.pg-stroke #pgBar,html.pg-stroke #wins .fw.docked,html.pg-stroke #toolPop,html.pg-stroke #menuPop{visibility:hidden}#pgBar.pg-fade{pointer-events:auto}#menuBtn{position:fixed;left:8px;top:8px;z-index:58;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;display:flex;align-items:center;justify-content:center;background:var(--head);border:1px solid var(--line2);border-radius:10px;box-shadow:0 6px 18px #0008}#menuBtn .pgi{width:14px;height:14px}#menuBtn[aria-expanded=true]{background:var(--green);border-color:var(--green-h)}#winReset{background:transparent}#toolPop{width:max-content;min-width:0;max-width:min(232px,calc(100vw - 16px))}#toolPop .popBody{display:flex;flex-direction:column}#toolPop #popTools{order:99;margin:4px 0 0;padding:4px 0 0;border-bottom:0;border-top:1px solid var(--line)}.pop[data-side=above]:before{top:auto;bottom:-7px;left:calc(var(--nubx, 50%) - 6px);border-top:0;border-left:0}.pop section{padding:6px 0 8px}#w-layers .lyBar{margin:6px 0 2px}#w-layers .lyBar button.icb,.layer button.icb.eye,.layer .lyRowMore{width:28px;height:28px;min-width:28px;min-height:28px}#w-tiles .btnrow{margin:8px 0 0}.fwPin{flex:none;width:28px;height:28px;min-width:28px;min-height:28px;padding:0;background:transparent;border-color:transparent}.fwPin .pgi{width:11px;height:11px}.fwPin.on{background:var(--green);border-color:var(--green-h)}.fw.detached .fwh{cursor:move}#pgBar button.det{box-shadow:inset 0 -3px 0 var(--mint)}#pgBar{flex-direction:column;align-items:center;gap:2px}#pgBar #tools{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;gap:2px;overflow-y:visible;padding:0 0 2px;margin:0;background:transparent;border:0;border-bottom:1px solid var(--line2);overflow:visible}#pgBar #tools button.icb{width:36px;height:36px;min-width:36px;min-height:36px}#pgBar #tools button[aria-expanded=true]{outline:2px solid var(--mint);outline-offset:-2px}#pgBar .pbRow{display:flex;align-items:center;justify-content:center;gap:2px}#pgBar .pbRow button{width:32px;height:32px;min-width:32px;min-height:32px}#w-layers .fwb{display:flex;flex-direction:column}#w-layers .fwb>section{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}#w-layers .lyBar{margin-top:auto}body:not(.ui-on) #pgBar{visibility:hidden}#view{cursor:crosshair}body.erasing #view{cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M15 4l5 5-9 9H6v-5z' fill='none' stroke='%23F4F5F6' stroke-width='2' stroke-linejoin='round'/><path d='M5 19h8' stroke='%23E7A0A0' stroke-width='2' stroke-linecap='round'/></svg>") 4 20,cell}#pgBar #tools button.erasing.on{background:#8f3d3d;border-color:#e7a0a0}#pgBar .pbDraw{display:flex;align-items:center;justify-content:center;gap:3px;margin-bottom:2px;padding:2px 4px;border:1px solid var(--line2);border-radius:8px;background:var(--panel)}#pgBar .pbDraw[hidden]{display:none}#pgBar .pbDraw .stripTools{display:flex;align-items:center;gap:3px}#pgBar .pbDraw .stripTools[hidden]{display:none}#pgBar .pbDraw button{width:28px;height:28px;min-width:28px;min-height:28px}#pgBar .stripSw{width:22px;height:22px;min-width:22px;min-height:22px;padding:0;border-radius:4px;background:var(--panel2)}#pgBar .stripSw i{display:block;width:16px;height:16px;border-radius:2px;border:1px solid #0008;pointer-events:none}#pgBar .stripSw.on{outline:2px solid var(--mint);outline-offset:1px}#pgBar #eraseToggle.on,#pgBar #stripContig.on,#toolPop #eraseMode.on{background:#8f3d3d;border-color:#e7a0a0}#pgBar #stripContig.on{background:var(--green);border-color:var(--green-h)}#pgBar .pbSlide{position:relative;display:flex;align-items:center;gap:2px}#pgBar .pbSlide .pbIc{display:flex}#pgBar .pbSlide .pbIc .pgi{width:12px;height:12px}#pgBar .pbTrack{position:relative;width:52px;height:22px;border-radius:6px;background:var(--panel2);border:1px solid var(--line2);touch-action:none}#pgBar .pbTrack i{position:absolute;left:2px;top:2px;bottom:2px;width:0;border-radius:4px;background:var(--green);pointer-events:none}#pgBar .pbSlide.hot .pbTrack{border-color:var(--mint)}#pgBar .pbSlide output{display:none!important}#toolPop .popHead{min-height:28px;padding:0 2px 0 8px;gap:4px}#toolPop .popHead b{font-size:11px;letter-spacing:0;text-transform:none;white-space:nowrap}#toolPop .popHead .popX{min-width:28px;min-height:28px;width:28px;height:28px}#toolPop .popBody{padding:2px 6px 4px}#toolPop .pop section{padding:0;border-bottom:0;margin:0}#toolPop button.icb,#toolPop label.ictog,#toolPop .trow>button{width:28px;height:28px;min-width:28px;min-height:28px}#toolPop .popX{min-width:28px;min-height:28px}#toolPop h3,#toolPop .hint{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#toolPop .trow{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;margin:2px 0}#toolPop .trow>button,#toolPop .trow>label.ictog{flex:none}#toolPop label.tnum{display:inline-flex;align-items:center;gap:2px;margin:0}#toolPop input[type=number]{width:52px;min-height:32px;height:32px;padding:0 4px;font-size:16px}#toolPop select{min-height:32px;height:32px;max-width:112px;padding:0 4px;font-size:16px}#toolPop input[type=range]{min-height:32px;height:32px;min-width:72px;width:72px}#toolPop output{font-size:12px;font-variant-numeric:tabular-nums;min-width:2ch}#toolPop .tmore{margin:2px 0 0}#toolPop .tmore summary{min-height:28px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--muted);font-size:11px;list-style:none}#toolPop .tmore summary::-webkit-details-marker{display:none}#toolPop .tmore[open] summary{color:var(--mint)}#xfHud{position:fixed;z-index:56;display:flex;align-items:center;justify-content:center;gap:2px;padding:3px;background:var(--panel);border:1px solid var(--line2);border-radius:12px;box-shadow:0 8px 24px #0008;touch-action:none}#xfHud[hidden]{display:none}#xfHud button{width:32px;height:32px;min-width:32px;min-height:32px;padding:0}#xfHud .pgi{width:14px;height:14px}#xfHud button.accent{background:var(--green);border-color:var(--green)}#hostBar{display:none}body.pg-embed #menuBtn{display:none!important}body.pg-embed #hostBar{display:flex;position:fixed;top:8px;left:50%;transform:translate(-50%);z-index:70;align-items:center;gap:8px;max-width:calc(100vw - 16px);padding:4px 6px 4px 12px;background:var(--head);color:var(--text);border:1px solid var(--host-accent, var(--line2));border-radius:10px;box-shadow:0 6px 18px #0008}#hostName{font-weight:700;max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#hostState{color:var(--muted);font-size:12px;white-space:nowrap}#hostBar button{min-height:32px;height:32px;padding:0 10px}#hostBar button:disabled{opacity:.45}#editorHome{display:none}body.pg-library #editorHome{display:inline-flex;position:fixed;left:52px;top:8px;z-index:58;height:44px;min-height:44px;padding:0 14px;align-items:center}body.pg-embed #editorHome,body.pg-home #editorHome{display:none!important}html.pg-boot-home:before{content:"";position:fixed;top:0;right:0;bottom:0;left:0;background:#1f2023;z-index:74}body.pg-embed #home{display:none!important}#home{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;display:flex;flex-direction:column;background:var(--bg);color:var(--text);padding:calc(12px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom))}#home[hidden]{display:none!important}.hmBar{display:flex;align-items:flex-start;gap:12px}.hmTitles{min-width:0}#homeTitle{margin:0;font-size:28px;line-height:1.15}#homeHint{margin:4px 0 0;color:var(--muted);max-width:62ch}#homeBack{min-height:44px;min-width:72px}#homeCrumbs{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:10px 0;color:var(--muted)}#homeCrumbs button{min-height:44px;background:transparent}.hmSep{opacity:.5}#homeActions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}#homeActions button{min-height:44px;padding:0 16px}#homeScroll{flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch}#homeGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:12px;align-content:start}.hmCard{position:relative;background:var(--panel);border:1px solid var(--line);border-radius:14px;min-height:168px}.hmOpen{width:100%;min-height:168px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:transparent;border:0;padding:16px 12px 12px}.hmMore,.hmVars{position:absolute;top:6px;min-width:44px;min-height:44px;padding:0 8px}.hmMore{right:6px}.hmVars{left:6px;max-width:calc(100% - 64px)}.hmThumb{width:72px;height:72px;display:flex;align-items:center;justify-content:center;background:repeating-conic-gradient(#3a3d43 0,#3a3d43 25%,#2a2c31 0,#2a2c31 50%) 0 0/12px 12px;border-radius:8px}.hmThumb img{max-width:72px;max-height:72px;image-rendering:pixelated}.hmMark{width:72px;height:52px;margin-top:10px;border-radius:8px;background:#3e4147;position:relative}.hmMark:before{content:"";position:absolute;left:8px;top:-10px;width:28px;height:14px;border-radius:6px 6px 0 0;background:#4c5057}.hmMark.project{background:#1e5a39}.hmMark.project:before{background:#1e8a4c}.hmName{font-weight:700;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hmMeta{color:var(--muted);font-size:12px;text-align:center}#homeEmpty{color:var(--muted);margin:8px 0 16px}#homeMore{min-height:44px;margin:8px 0 20px}#homeSheet,#homeMenu{position:fixed;top:0;right:0;bottom:0;left:0;z-index:90;background:#0008;display:flex;align-items:flex-end;justify-content:center}#homeSheet[hidden],#homeMenu[hidden]{display:none!important}.hmSheetCard{width:min(560px,100%);max-height:min(88vh,900px);overflow:auto;background:var(--panel);color:var(--text);border-radius:16px 16px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px}.hmSheetCard h2,.hmSheetCard h3{margin:0}.hmSheetCard input,.hmSheetCard select{font-size:16px;width:100%;user-select:text;-webkit-user-select:text}.hmSheetCard label{display:flex;flex-direction:column;align-items:stretch;gap:4px}.hmSheetBtns,.hmSizes,.hmChoice,.hmSizeRow{display:flex;flex-wrap:wrap;gap:8px}.hmSheetBtns button,.hmSizes button,.hmChoice label,#homePickNow{min-height:44px}.hmSheetCard label.hmDest,.hmSheetCard .hmChoice label{flex-direction:row;align-items:center}.hmChoice label{min-height:44px;padding:0 10px;background:var(--panel2);border:1px solid var(--line2);border-radius:8px}.hmDests{display:flex;flex-direction:column;gap:4px;max-height:40vh;overflow:auto}.hmDest{flex-direction:row;align-items:center;min-height:44px}.hmSizeRow label{flex:1}#homeNewFields{display:flex;flex-direction:column;gap:8px}#homeNewFields[hidden]{display:none!important}#blocksPanel h3{margin:8px 0 4px}#blocksPanel .btnrow.seg{flex-wrap:wrap}#blocksPanel .btnrow.seg button{flex:none;flex-direction:row;min-height:44px;min-width:44px;width:44px;height:44px;padding:0;font-size:13px}#blocksPanel .btnrow.seg button.icb{width:44px;height:44px;min-width:44px;min-height:44px}#blocksPanel .trow>button{width:auto;height:auto;min-width:44px;min-height:44px;padding:6px 10px;flex:1 1 auto;font-size:13px}#blocksPanel .blkLine{display:flex;align-items:center;gap:6px;min-height:44px}#blocksPanel .blkLine input[type=range]{flex:1;min-height:44px}#blocksPanel .blkLine output{min-width:2.2em;text-align:right;font-variant-numeric:tabular-nums;color:var(--text)}#blocksPanel .grid2 label,#blocksPanel label.chk,#blocksPanel select,#blocksPanel input[type=number]{min-height:44px}
