:root{--bg:#f6f6f9;--surface:#fff;--surface-2:#f0f0f5;--line:#e4e4ec;--text:#15151c;--muted:#6b6b7b;--accent:#6d4aff;--accent-2:#8b6dff;--accent-soft:#efebff;--danger:#e5484d;--radius:14px;--shadow:0 1px 2px #1414280d, 0 8px 24px #1414280f;--font:"Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root{--bg:#0e0e13;--surface:#17171f;--surface-2:#1f1f29;--line:#2a2a36;--text:#ececf3;--muted:#9a9aae;--accent:#8466ff;--accent-2:#9d85ff;--accent-soft:#241e45;--shadow:0 1px 2px #0000004d, 0 8px 24px #00000040;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}*{box-sizing:border-box}html,body{height:100%}body{font-family:var(--font);background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;flex-direction:column;margin:0;display:flex}button{font:inherit;color:inherit}svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;width:18px;height:18px}[hidden]{display:none!important}kbd{border:1px solid var(--line);background:var(--surface-2);border-radius:5px;padding:1px 6px;font-family:inherit;font-size:12px}.mono{font-variant-numeric:tabular-nums}.topbar{background:var(--surface);border-bottom:1px solid var(--line);z-index:20;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:12px 20px;display:grid;position:sticky;top:0}.brand{color:var(--text);align-items:center;gap:10px;text-decoration:none;display:flex}.logo{color:var(--accent);display:grid}.logo svg{stroke:none;width:30px;height:30px}.brand-name{letter-spacing:-.02em;font-size:18px;font-weight:700}.tabs{background:var(--surface-2);border-radius:12px;gap:4px;padding:4px;display:flex}.tab{cursor:pointer;color:var(--muted);background:0 0;border:0;border-radius:9px;align-items:center;gap:8px;padding:8px 16px;font-size:14px;font-weight:600;transition:background .15s,color .15s,box-shadow .15s;display:flex}.tab:hover{color:var(--text)}.tab.is-active{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.tab.is-active svg{color:var(--accent)}.privacy{color:var(--muted);justify-self:end;align-items:center;gap:6px;font-size:13px;display:flex}.privacy svg{color:#22a06b}main{flex-direction:column;flex:1;min-height:0;display:flex}.upload{flex-direction:column;flex:1;justify-content:center;align-items:center;gap:24px;padding:48px 20px 64px;display:flex}.hero{text-align:center;max-width:640px}.hero h1{letter-spacing:-.03em;margin:0 0 12px;font-size:clamp(28px,4vw,44px);line-height:1.1}.hero p{color:var(--muted);margin:0;font-size:17px}.dropzone{background:var(--surface);border:2px dashed var(--line);cursor:pointer;width:min(640px,100%);box-shadow:var(--shadow);border-radius:20px;outline:none;flex-direction:column;align-items:center;gap:8px;padding:48px 24px;transition:border-color .15s,background .15s,transform .15s;display:flex}.dropzone:hover,.dropzone:focus-visible{border-color:var(--accent)}.dropzone.is-over{border-color:var(--accent);background:var(--accent-soft);transform:scale(1.01)}.dz-icon{background:var(--accent);color:#fff;width:56px;height:56px;box-shadow:0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent);border-radius:16px;place-items:center;margin-bottom:6px;display:grid}.dz-icon svg{stroke-width:2px;width:26px;height:26px}.dz-title{font-size:18px;font-weight:700}.dz-sub{color:var(--muted);text-align:center;font-size:14px}.dz-formats{color:var(--muted);letter-spacing:.08em;margin-top:4px;font-size:12px}.samples{color:var(--muted);flex-wrap:wrap;justify-content:center;align-items:center;gap:10px;font-size:14px;display:flex}.sample{border:1px solid var(--line);background:var(--surface);cursor:pointer;border-radius:999px;padding:6px 12px;font-size:13px;font-weight:500}.sample:hover{border-color:var(--accent);color:var(--accent)}.features{flex-wrap:wrap;justify-content:center;gap:32px;margin:8px 0 0;padding:0;list-style:none;display:flex}.features li{flex-direction:column;align-items:center;gap:2px;font-size:13px;display:flex}.features b{font-size:14px}.features span{color:var(--muted)}.editor{flex-direction:column;flex:1;min-height:0;display:flex}.toolbar{background:var(--surface);border-bottom:1px solid var(--line);flex-wrap:wrap;align-items:center;gap:12px;padding:10px 16px;display:flex}.group{align-items:center;gap:6px;display:flex}.spacer{flex:1}.label,.size-group label{color:var(--muted);margin-right:4px;font-size:13px;font-weight:500}.tool{border:1px solid var(--line);background:var(--surface);cursor:pointer;border-radius:10px;align-items:center;gap:6px;padding:7px 12px;font-size:13px;font-weight:600;display:flex}.tool:hover{border-color:var(--accent)}.tool.is-active{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}.size-group input[type=range]{width:130px;accent-color:var(--accent)}.size-group .mono{width:28px;color:var(--muted);font-size:13px}.icon-btn{border:1px solid var(--line);background:var(--surface);cursor:pointer;border-radius:10px;place-items:center;width:36px;height:36px;display:grid}.icon-btn:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}.icon-btn:disabled{opacity:.4;cursor:default}.btn{cursor:pointer;-webkit-user-select:none;user-select:none;border:1px solid #0000;border-radius:10px;align-items:center;gap:7px;padding:8px 14px;font-size:14px;font-weight:600;transition:background .15s,border-color .15s,opacity .15s,transform .1s;display:inline-flex}.btn:active:not(:disabled){transform:translateY(1px)}.btn:disabled{opacity:.45;cursor:default}.btn.primary{background:var(--accent);color:#fff;box-shadow:0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent)}.btn.primary:hover:not(:disabled){background:var(--accent-2)}.btn.secondary{background:var(--text);color:var(--surface)}.btn.ghost{border-color:var(--line);background:0 0}.btn.ghost:hover:not(:disabled){border-color:var(--accent);color:var(--accent)}.stage{background-color:var(--bg);background-image:radial-gradient(var(--line) 1px, transparent 1px);background-size:18px 18px;flex:1;place-items:center;min-height:0;padding:24px;display:grid;position:relative;overflow:hidden}.canvas-wrap{box-shadow:var(--shadow);touch-action:none;border-radius:6px;line-height:0;position:relative;overflow:hidden}.canvas-wrap canvas{display:block}#wmImage{max-width:100%}#wmMask,#wmOriginal{width:100%;height:100%;position:absolute;inset:0}#wmMask{opacity:.55;cursor:none}.original-layer{opacity:0;pointer-events:none;transition:opacity .12s}.original-layer.is-visible{opacity:1}.canvas-wrap.rect-mode #wmMask{cursor:crosshair}.rect-preview{pointer-events:none;border:2px dashed var(--accent);background:color-mix(in srgb, var(--accent) 25%, transparent);position:absolute}.brush-cursor{pointer-events:none;z-index:10;border:2px solid #fff;border-radius:50%;position:fixed;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #00000080,inset 0 0 0 1px #00000059}.stage-hint{background:color-mix(in srgb, var(--text) 85%, transparent);color:var(--surface);pointer-events:none;white-space:nowrap;border-radius:999px;padding:8px 14px;font-size:13px;font-weight:500;transition:opacity .3s;position:absolute;bottom:18px;left:50%;transform:translate(-50%)}.stage-hint.is-hidden{opacity:0}.checker,.compare{background-color:#fff;background-image:linear-gradient(45deg,#e6e6ec 25%,#0000 25%),linear-gradient(-45deg,#e6e6ec 25%,#0000 25%),linear-gradient(45deg,#0000 75%,#e6e6ec 75%),linear-gradient(-45deg,#0000 75%,#e6e6ec 75%);background-position:0 0,0 8px,8px -8px,-8px 0;background-size:16px 16px}.compare{box-shadow:var(--shadow);-webkit-user-select:none;user-select:none;touch-action:none;border-radius:6px;line-height:0;position:relative;overflow:hidden}.compare img{max-width:100%;max-height:calc(100vh - 190px);display:block}.after-layer{clip-path:inset(0 0 0 var(--pos,50%));position:absolute;inset:0}.after-layer img{object-fit:contain;width:100%;height:100%;max-height:none}.compare.processing .after-layer{display:none}.compare.processing #bgBefore{filter:saturate(.6)brightness(.95)}.handle{top:0;bottom:0;left:var(--pos,50%);cursor:ew-resize;background:#fff;width:2px;position:absolute;transform:translate(-1px);box-shadow:0 0 0 1px #00000026}.handle-knob{color:#222;background:#fff;border-radius:50%;place-items:center;width:38px;height:38px;display:grid;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 2px 10px #00000040}.tag{color:#fff;pointer-events:none;background:#0000008c;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:600;line-height:1;position:absolute;top:12px}.tag-l{left:12px}.tag-r{right:12px}.bg-swatches{gap:8px}.swatch{border:2px solid var(--surface);cursor:pointer;background:var(--c);width:28px;height:28px;box-shadow:0 0 0 1px var(--line);border-radius:50%;padding:0;position:relative;overflow:hidden}.swatch.checker{background-color:#fff;background-image:linear-gradient(45deg,#cfcfd8 25%,#0000 25%),linear-gradient(-45deg,#cfcfd8 25%,#0000 25%),linear-gradient(45deg,#0000 75%,#cfcfd8 75%),linear-gradient(-45deg,#0000 75%,#cfcfd8 75%);background-position:0 0,0 4px,4px -4px,-4px 0;background-size:8px 8px}.swatch.is-active{box-shadow:0 0 0 2px var(--accent)}.swatch.picker{background:conic-gradient(red,#ff0,#0f0,#0ff,#00f,#f0f,red);display:block}.swatch.picker input{opacity:0;cursor:pointer;border:0;width:100%;height:100%;padding:0}.busy{z-index:50;background:color-mix(in srgb, var(--bg) 55%, transparent);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);place-items:center;display:grid;position:fixed;inset:0}.busy-card{background:var(--surface);border:1px solid var(--line);width:min(360px,100% - 40px);box-shadow:var(--shadow);text-align:center;border-radius:18px;flex-direction:column;align-items:center;gap:10px;padding:28px 24px;display:flex}.spinner{border:3px solid var(--accent-soft);border-top-color:var(--accent);border-radius:50%;width:40px;height:40px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.busy-title{font-weight:700}.busy-sub{color:var(--muted);min-height:1em;font-size:13px}.progress{background:var(--surface-2);border-radius:99px;width:100%;height:6px;margin-top:6px;overflow:hidden}.progress-bar{background:var(--accent);border-radius:99px;width:0;height:100%;transition:width .2s}.toast{z-index:60;opacity:0;background:var(--text);color:var(--surface);box-shadow:var(--shadow);pointer-events:none;border-radius:12px;max-width:calc(100% - 32px);padding:10px 16px;font-size:14px;font-weight:500;transition:opacity .2s,transform .2s;position:fixed;bottom:24px;left:50%;transform:translate(-50%,20px)}.toast.is-visible{opacity:1;transform:translate(-50%)}.toast.is-error{background:var(--danger);color:#fff}@media (max-width:860px){.topbar{grid-template-columns:1fr auto}.privacy,.tool span,.btn.ghost span{display:none}}@media (max-width:560px){.topbar{grid-template-columns:1fr;justify-items:center}.brand{display:none}.tab{padding:8px 12px;font-size:13px}.size-group input[type=range]{width:90px}.stage{padding:12px}}
