:root{--bg: #1b1b1f;--panel: #26262c;--ink: #e8e6e1;--muted: #9a978f;--accent: #ff7a1a;--line: #3a3a42;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:13px;color:var(--ink);background:var(--bg)}*{box-sizing:border-box}html{touch-action:manipulation}body{margin:0;height:100vh;height:100dvh;overflow:hidden}#app{display:flex;height:100vh;height:100dvh;overflow:hidden}#side{position:fixed;top:0;bottom:0;left:0;z-index:25;width:min(300px,85vw);overflow-y:auto;padding:10px 12px 24px;background:var(--panel);border-right:1px solid var(--line);transform:translate(-100%);transition:transform .2s ease}#app.menu-open #side{transform:none;box-shadow:4px 0 16px #0006}#side h1{padding-left:54px;min-height:44px;margin-top:-4px;align-items:center}main{flex:1;display:flex;flex-direction:column;min-width:0;container-type:size}.views{flex:1;display:flex;padding:8px;min-height:0;min-width:0}.divider{flex:0 0 8px;position:relative;cursor:col-resize;touch-action:none}.divider:before{content:"";position:absolute;top:0;right:-6px;bottom:0;left:-6px;z-index:5}.divider:after{content:"";position:absolute;left:3px;top:50%;width:2px;height:36px;margin-top:-18px;border-radius:1px;background:var(--line)}@container (max-aspect-ratio: 1/1){.views{flex-direction:column}.divider{cursor:row-resize}.divider:before{top:-6px;right:0;bottom:-6px;left:0}.divider:after{left:50%;top:3px;width:36px;height:2px;margin:0 0 0 -18px}}.divider:hover:after,.divider.drag:after{background:var(--accent)}.view{flex:1 1 0;display:flex;flex-direction:column;min-width:0;min-height:0}.hud{position:absolute;top:6px;right:6px;z-index:2;display:flex;flex-direction:column;align-items:flex-end;gap:6px;max-width:min(240px,calc(100% - 12px));pointer-events:none}.hud .seg{display:flex;flex-direction:column;pointer-events:auto;box-shadow:0 1px 4px #00000059;border-radius:4px}.hud .seg button{width:44px;padding:0;font-size:11px;line-height:22px;border-radius:0;background:#33333beb}.hud .seg button.on{background:var(--accent)}.hud .seg button:first-child{border-radius:4px 4px 0 0}.hud .seg button:last-child{border-radius:0 0 4px 4px}.hud .seg button+button{margin-top:-1px}.hud .seg button:hover,.hud .seg button.on{position:relative;z-index:1}.hud .modes{pointer-events:auto;margin-top:8px;display:flex;flex-direction:column;box-shadow:0 1px 4px #00000059;border-radius:4px}.hud .modes button{padding:0;font-size:11px;line-height:22px;border-radius:0;background:#33333beb}.hud .modes button.on{background:var(--accent)}.hud .modes button:first-child{border-radius:4px 4px 0 0}.hud .modes button:last-child{border-radius:0 0 4px 4px}.hud .modes button+button{margin-top:-1px}.hud .modes button:hover,.hud .modes button.on{position:relative;z-index:1}.hud .seg button,.hud .modes button{width:52px}.hud .cur-swatch{pointer-events:auto;margin-top:8px;width:52px;height:26px;border:1px solid rgba(255,255,255,.55);box-shadow:0 1px 4px #00000059}#status{position:absolute;right:6px;bottom:6px;z-index:2;max-width:min(240px,calc(100% - 12px));pointer-events:none;padding:4px 7px;border-radius:4px;background:#1b1b1fb8;color:var(--muted);font-family:ui-monospace,monospace;font-size:11px;line-height:1.35;white-space:pre-wrap;overflow-wrap:anywhere}#status:empty{display:none}.stack{position:relative;flex:1;min-height:0}.stack canvas{position:absolute;top:0;right:0;bottom:0;left:0}.stack.three #folded{background:transparent}canvas{flex:1;width:100%;height:100%;min-height:0;background:#2f2f36;border-radius:4px;display:block;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;-webkit-touch-callout:none}a.gh{color:var(--muted);display:inline-flex;align-items:center;gap:5px;margin-left:auto;font-size:12px;font-weight:400;letter-spacing:0;text-decoration:none}h1{display:flex;align-items:baseline}h1 a.gh{font-size:0;align-self:center;margin-left:auto}h1 .help-btn{margin-left:10px;align-self:center;padding:3px 10px;font-size:13px;font-weight:400;letter-spacing:0}.native h1 .help-btn{margin-left:auto}a.gh:hover{color:var(--accent)}.native a.gh{display:none}h1{font-size:16px;margin:0 0 10px;letter-spacing:.04em}details{border-top:1px solid var(--line);padding:6px 0}summary{cursor:pointer;font-weight:600;padding:4px 0;-webkit-user-select:none;user-select:none}.row{display:flex;align-items:center;gap:6px;margin:4px 0;flex-wrap:wrap}.row label{color:var(--muted);min-width:64px}.row input[type=number]{width:62px}.row input[type=range]{flex:1;min-width:80px}.row .val{width:44px;text-align:right;color:var(--muted);font-family:ui-monospace,monospace;font-size:11px}.row.slide{display:grid;grid-template-columns:104px minmax(0,1fr) 46px;flex-wrap:nowrap}.row.slide label{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.row.slide input[type=range]{min-width:0;width:100%;margin:0}.row.slide .val{width:auto;white-space:nowrap}button,select,input{font:inherit;color:var(--ink);background:#33333b;border:1px solid #45454f;border-radius:4px;padding:3px 7px}button{cursor:pointer}button:hover{border-color:var(--accent)}button.on{background:var(--accent);color:#111;border-color:var(--accent)}button.small{padding:1px 6px;font-size:12px}.tools button{flex:1}.swatches{display:flex;gap:6px}.swatch{width:34px;height:28px;border-radius:4px;border:2px solid transparent;cursor:pointer;padding:0;overflow:hidden;position:relative}.swatch.on{border-color:#fff}.swatch.bleach{background:repeating-linear-gradient(135deg,#f6f6f4 0,#f6f6f4 5px,#c9d6dc 5px,#c9d6dc 10px);display:flex;align-items:center;justify-content:center;color:#4a5a63;font-size:11px;font-weight:600}.swatch.base{width:26px;height:22px}.swatch.white{background:#f6f6f4}.swatch input[type=color]{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;padding:0;border:0;opacity:0;pointer-events:none}.swatch.on input[type=color]{pointer-events:auto;cursor:pointer}details.sub{border-top:0;padding:2px 0}details.sub summary{font-weight:400;color:var(--muted);padding:2px 0}ol.folds{margin:4px 0;padding-left:18px;color:var(--muted);max-height:120px;overflow-y:auto;font-family:ui-monospace,monospace;font-size:11px}.note{color:var(--muted);font-size:12px;margin:4px 0;line-height:1.35}kbd{background:#111;border:1px solid #444;border-radius:3px;padding:0 4px;font-size:11px}#help{--help-top: calc(16px + env(safe-area-inset-top)) ;--help-bottom: calc(16px + env(safe-area-inset-bottom)) ;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);padding:0;margin:var(--help-top) auto var(--help-bottom);width:min(640px,calc(100vw - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)));max-height:calc(100vh - var(--help-top) - var(--help-bottom));max-height:calc(100dvh - var(--help-top) - var(--help-bottom));box-shadow:0 12px 40px #00000080}#help::backdrop{background:#0000008c}#help .help-body{padding:14px 20px 20px;overflow-y:auto;max-height:calc(100vh - var(--help-top) - var(--help-bottom) - 2px);max-height:calc(100dvh - var(--help-top) - var(--help-bottom) - 2px);font-size:13px;line-height:1.45}#help header{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:var(--panel);padding:4px 0 8px;border-bottom:1px solid var(--line);margin-bottom:8px}#help h2{margin:0;font-size:16px}#help h3{margin:16px 0 4px;font-size:13px;color:var(--accent)}#help p,#help ul{margin:4px 0}#help ul{padding-left:18px}#help li{margin:4px 0}#help b{color:var(--ink);font-weight:600}#help dl.ref{margin:4px 0}#help dl.ref dt{margin-top:8px;font-weight:600;color:var(--ink)}#help dl.ref dd{margin:2px 0 0}#menu-btn{position:fixed;top:6px;left:6px;z-index:30;width:44px;height:44px;padding:0;font-size:24px;line-height:1;border-radius:6px;background:#26262ce6}#backdrop{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:20;background:#00000073}@media(max-width:800px){#app.menu-open #backdrop{display:block}}@media(max-width:800px),(max-height:500px){.views{padding:0}canvas{border-radius:0}.hud .seg button,.hud .modes button{line-height:30px}.hud .seg button,.hud .modes button{width:56px}.hud .cur-swatch{width:56px;height:30px}#status{font-size:10px;max-width:min(200px,calc(100% - 12px))}}main{padding-top:env(safe-area-inset-top)}.hud{right:calc(6px + env(safe-area-inset-right))}#status{bottom:calc(6px + env(safe-area-inset-bottom));right:calc(6px + env(safe-area-inset-right))}#side{padding-top:calc(10px + env(safe-area-inset-top));padding-left:calc(12px + env(safe-area-inset-left));padding-bottom:calc(24px + env(safe-area-inset-bottom))}#menu-btn{top:calc(6px + env(safe-area-inset-top));left:calc(6px + env(safe-area-inset-left))}#side{width:calc(min(300px,85vw) + env(safe-area-inset-left))}
