:root{--theme-color:#1c1a99;--bg:#f6f6fb;--card:#fff;--text:#1d1d2b;--muted:#666}
*{box-sizing:border-box}[hidden]{display:none!important}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text)}
.top{padding:12px 20px;background:var(--theme-color);color:#fff;font-weight:600}.top a{color:#fff;text-decoration:none}.top .sep{opacity:.6;margin:0 8px}
.wrap{max-width:980px;margin:0 auto;padding:20px 16px 40px}
.hero{background:var(--card);border:2px dashed #c9c8ef;border-radius:16px;padding:40px 20px;text-align:center;transition:.2s}
.hero.over{border-color:var(--theme-color);background:#eeeefd}
.hero.compact{padding:16px}.hero.compact h1{font-size:1.2rem;margin:0 0 4px}.hero.compact .sub{display:none}
.hero h1{margin:0 0 10px;font-size:2rem}.sub{color:var(--muted);margin:0 0 20px}.hint{color:var(--muted);font-size:.9rem}
.upload-btn{display:inline-block;background:var(--theme-color);color:#fff;padding:14px 30px;border-radius:999px;font-weight:600;cursor:pointer;font-size:1.05rem}
#workspace{margin-top:16px;background:var(--card);border-radius:16px;padding:16px;box-shadow:0 2px 10px rgba(0,0,0,.05)}
.toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:12px}
button{font:inherit;border:1px solid #d6d6e4;background:#fff;border-radius:8px;padding:8px 14px;cursor:pointer;color:var(--text)}
button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:var(--theme-color);color:#fff;border-color:var(--theme-color)}
.seg{display:inline-flex}.seg button{border-radius:0}.seg button:first-child{border-radius:8px 0 0 8px}.seg button:last-child{border-radius:0 8px 8px 0}
.seg button.active,.bgs button.active{background:var(--theme-color);color:#fff;border-color:var(--theme-color)}
.brush{display:flex;align-items:center;gap:8px}.ghost{background:transparent}
.queue{display:flex;gap:6px;overflow-x:auto;margin-bottom:10px}.q-item{white-space:nowrap;font-size:.85rem;padding:6px 10px}.q-item.active{border-color:var(--theme-color);color:var(--theme-color);font-weight:600}
.stage{position:relative;display:flex;justify-content:center;border-radius:10px;overflow:hidden;background:#eee;min-height:200px;touch-action:none}
.checker{background-color:#fff;background-image:linear-gradient(45deg,#ddd 25%,transparent 25%),linear-gradient(-45deg,#ddd 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ddd 75%),linear-gradient(-45deg,transparent 75%,#ddd 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0}
#view{display:block;max-width:100%;height:auto;cursor:ew-resize;touch-action:none}
.cursor{position:absolute;border:2px solid #fff;box-shadow:0 0 0 1px #000;border-radius:50%;pointer-events:none;display:none}
.progress{margin:10px 0}.track{height:6px;background:#e5e5f2;border-radius:3px;overflow:hidden}.bar{height:100%;width:0;background:var(--theme-color);transition:width .2s}
.bar.indet{animation:ind 1.2s linear infinite;background:linear-gradient(90deg,#e5e5f2,var(--theme-color),#e5e5f2);background-size:200% 100%}@keyframes ind{to{background-position:-200% 0}}
.status{font-size:.9rem;color:var(--muted);margin-top:6px}
.panel{margin-top:14px}.label{font-weight:600;margin-bottom:6px}.bgs{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.bgs button{display:inline-flex;align-items:center;gap:6px}.sw{width:16px;height:16px;border-radius:4px;border:1px solid #bbb;display:inline-block}
.sw.checker{background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0}.sw.blur{background:linear-gradient(135deg,#9bb,#ccd,#cba);filter:blur(1px)}.sw.img{background:linear-gradient(135deg,#7ad,#fc6)}
.hidden-input{width:0;height:0;opacity:0;padding:0;border:0;position:absolute}
.actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.model-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:14px;font-size:.9rem}.model-row select{padding:6px;border-radius:6px;max-width:100%}.muted{color:var(--muted)}
.content{margin-top:30px;line-height:1.6}.content h2{font-size:1.25rem;margin-top:26px}details{background:var(--card);border-radius:8px;padding:10px 14px;margin:8px 0}summary{cursor:pointer;font-weight:600}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#222;color:#fff;padding:10px 16px;border-radius:8px;opacity:0;transition:.3s;pointer-events:none;z-index:9}
@media(max-width:600px){.hero h1{font-size:1.5rem}.toolbar{gap:8px}}
