:root{color-scheme:light;--navy:#102b42;--ink:#142536;--muted:#6c7989;--bg:#f3f6f8;--line:#e1e7ed;--brand:#0c76ba;--brand-hover:#075d96;--pale:#eaf6fd;--success:#067647;--danger:#b42318;--card:#fff;--radius:17px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;font-size:14px;line-height:1.45}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.48;cursor:not-allowed}a{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,canvas:focus-visible,[role=button]:focus-visible{outline:3px solid #83caff;outline-offset:3px}[hidden]{display:none!important}
.app-shell{max-width:1480px;margin:0 auto;padding:27px 28px 20px}.header{display:flex;align-items:center;gap:15px;padding:10px 0 25px}.brand-mark{height:48px;width:48px;flex:0 0 48px;display:grid;place-items:center;background:var(--navy);color:#fff;border-radius:13px}.brand-mark svg{width:29px}.brand-title h1{font-size:clamp(22px,2.1vw,28px);letter-spacing:-.04em;margin:1px 0;font-weight:790}.brand-title p:not(.eyebrow){margin:2px 0 0;color:var(--muted)}.eyebrow{color:var(--brand);font-weight:800;letter-spacing:.12em;font-size:10px;margin:0;text-transform:uppercase}.version{margin-left:auto;background:#e9edf1;border:1px solid #dce3e9;border-radius:50px;padding:7px 11px;color:#536476;white-space:nowrap;font-size:12px;font-weight:700}
.workspace{display:grid;grid-template-columns:minmax(340px,390px) minmax(0,1fr);gap:18px;align-items:start}.panel{background:var(--card);border:1px solid var(--line);box-shadow:0 4px 24px #2038530b;border-radius:var(--radius)}.settings{padding:19px 21px 21px}.uploader{padding:22px;min-height:620px}.panel-heading{display:flex;align-items:center;gap:11px;margin:0 0 20px}.panel-heading h2{font-size:18px;letter-spacing:-.025em;line-height:1.1;margin:0;font-weight:800}.panel-heading p{margin:5px 0 0;font-size:12px;color:var(--muted)}.heading-number{width:36px;height:36px;border-radius:11px;flex:none;display:grid;place-items:center;background:var(--pale);color:var(--brand);font-size:13px;font-weight:850}.step-stat{margin-left:auto;background:#eef4f9;color:#396482;padding:6px 10px;border-radius:100px;font-size:12px;font-weight:800;white-space:nowrap}.field-block{border-top:1px solid #eef1f4;padding-top:18px;margin-top:17px}.settings>.field-block:nth-child(2){margin-top:0;border-top:0;padding-top:0}.field-label,label:not(.checkbox-row){display:block;color:#283d50;font-size:12px;font-weight:750;margin-bottom:8px}.fields-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.field-inline{margin-top:13px}.help{font-size:11.5px;color:var(--muted);line-height:1.5;margin:7px 0 0}.seg{display:grid;grid-template-columns:1fr 1fr;background:#eff3f7;border-radius:10px;padding:4px;gap:4px}.seg button{min-height:39px;border:0;background:transparent;border-radius:7px;color:#516578;font-size:12px;font-weight:760;white-space:nowrap}.seg button.active{background:#fff;color:var(--brand);box-shadow:0 1px 5px #152f481a}.choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.choice{min-height:63px;border:1px solid #d4dde5;background:#fff;border-radius:10px;padding:9px;text-align:left}.choice strong{display:block;font-weight:790;font-size:12px}.choice small{display:block;color:var(--muted);font-size:10.5px;margin-top:3px}.choice.active,.fill-choice.active,.preset.active{border-color:#359dd8;background:#eef8ff;color:#086ba9}.choice.active small{color:#447895}.presets{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 11px}.preset{border:1px solid #d5dfe8;border-radius:7px;background:#fff;font-size:11.5px;font-weight:750;padding:7px 9px;transition:.15s}.preset:hover{background:#eff6fb}input[type=number],input[type=text],select{width:100%;min-width:0;min-height:42px;padding:9px 10px;border:1px solid #d1dce5;border-radius:9px;background:#fff;color:var(--ink);font-size:13px}input[type=number]::-webkit-inner-spin-button{opacity:.4}input[type=range]{width:100%;accent-color:var(--brand);cursor:pointer;margin:2px 0 6px}.range-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-top:15px}.range-head:first-child{margin-top:0}.range-head output{font-size:12px;color:var(--brand);font-weight:800}.range-head label{margin:0}.fill-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.fill-choice{display:flex;gap:6px;align-items:center;justify-content:center;min-height:42px;border:1px solid #d4dce5;border-radius:9px;background:#fff;font-size:11.5px;font-weight:750}.swatch{width:16px;height:16px;display:inline-block;flex:none;border:1px solid #cbd5e1;border-radius:5px}.swatch.white{background:#fff}.swatch.colored{background:linear-gradient(130deg,#d3e6f4,#c78a8c)}.swatch.checker{background:conic-gradient(#fff 25%,#d6dde6 0 50%,#fff 0 75%,#d6dde6 0) 0 0/8px 8px}.color-wrap{display:flex;align-items:center;gap:10px;margin-top:12px}.color-wrap label{margin:0;flex:1}.color-wrap input{width:44px;height:34px;background:#fff;border:1px solid #d6dfe7;border-radius:7px;cursor:pointer}.color-wrap output{font:700 11px ui-monospace,monospace;color:var(--muted)}.advanced{border-top:1px solid #edf1f4;margin-top:18px;padding-top:16px}.advanced summary{font-weight:750;font-size:12.5px;color:#345169;cursor:pointer;padding:4px 0;list-style:disclosure-closed}.advanced[open] summary{margin-bottom:15px}.checkbox-row{display:flex;align-items:center;gap:9px;margin-top:14px;font-size:12px;font-weight:650;color:#45596b;cursor:pointer}.checkbox-row input{accent-color:var(--brand);width:17px;height:17px}.server-status{margin-top:19px;background:#f4f7f9;border-radius:9px;padding:10px 12px;font-size:11.5px;line-height:1.7;color:#586b7a}.dot{display:inline-block;width:8px;height:8px;border-radius:100%;background:#c3cbd5;margin-right:4px}.dot.ok{background:#169b61}.dot.bad{background:#df3a39}.server-item{display:inline-block;margin-right:13px}
.drop{border:2px dashed #b9d4e5;border-radius:15px;min-height:238px;background:linear-gradient(180deg,#f8fcff,#f6f9fc);display:flex;align-items:center;justify-content:center;text-align:center;flex-direction:column;cursor:pointer;transition:background .15s,border-color .15s;padding:25px 12px}.drop:hover,.drop.drag{background:#ebf7ff;border-color:#2991d6}.drop h3{font-size:17px;margin:10px 0 3px;letter-spacing:-.02em}.drop p{font-size:13px;color:var(--muted);margin:0}.drop p span{color:var(--brand);text-decoration:underline;text-underline-offset:2px;font-weight:750}.drop small{margin-top:18px;color:#8090a2;font-size:11px}.upload-symbol{height:52px;width:52px;display:grid;place-items:center;border-radius:14px;background:#e4f4fd;border:1px solid #d1e6f3;color:#0e79b6;font-size:28px;font-weight:700}.file-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:21px 0 13px}.file-toolbar strong{font-size:14px}.file-toolbar p{font-size:11.5px;color:var(--muted);margin:4px 0 0}.toolbar-buttons{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;text-align:center;border:1px solid transparent;border-radius:10px;min-height:43px;padding:10px 15px;text-decoration:none;font-weight:750;font-size:12.5px;white-space:normal;transition:background .15s,transform .15s}.btn:hover:not(:disabled){filter:brightness(.98)}.btn.primary{background:var(--brand);color:#fff}.btn.primary:hover:not(:disabled){background:var(--brand-hover)}.btn.secondary{background:#fff;color:#34495c;border-color:#d7e1e8}.btn.subtle{background:#edf3f7;color:#35516a}.btn.stop{background:#fff1ee;color:var(--danger);border-color:#f8cfca}.file-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.file-list.empty{display:block}.empty-text{border:1px solid #e8edf1;border-radius:12px;color:#91a0ac;text-align:center;padding:35px 15px;font-size:12px}.file-card{overflow:hidden;border:1px solid #e0e6ed;background:#fff;border-radius:11px;min-width:0;position:relative}.file-thumb{display:block;width:100%;aspect-ratio:1.18;object-fit:contain;background:#f4f6f8}.file-info{padding:9px}.file-name{font-size:11.5px;font-weight:760;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-details{font-size:10.5px;color:var(--muted);margin-top:3px}.remove{position:absolute;top:5px;right:5px;border:0;background:#1b3045de;color:#fff;width:30px;height:30px;font-size:19px;border-radius:8px;line-height:1}.file-state{font-size:11px;color:var(--success);font-weight:750}.action-bar{display:flex;flex-wrap:wrap;gap:9px;border-top:1px solid #edf1f4;padding-top:21px;margin-top:22px}.action-bar .primary{flex:1;min-width:185px}.progress-wrap{margin-top:18px;border-radius:11px;background:#f4f8fa;padding:14px}.progress-head{display:flex;justify-content:space-between;font-size:12px;margin-bottom:9px}.progress-head span{color:var(--brand);font-weight:800}.progress{width:100%;height:9px;background:#dbe4eb;overflow:hidden;border-radius:99px}.progress>div{height:100%;width:0;background:linear-gradient(90deg,#0c76ba,#32a7d6);border-radius:99px;transition:width .2s}.progress-wrap p{margin:8px 0 0;color:var(--muted);font-size:11.5px;overflow-wrap:anywhere}.notice{margin-top:14px;border-radius:10px;padding:11px 13px;font-size:12.5px;white-space:pre-line}.notice.info{background:#edf7fd;color:#215b83}.notice.ok{background:#eafaf1;color:#086c42}.notice.err{background:#fff2f1;color:#a32318}.result{border:1px solid #b1e1cb;border-radius:14px;margin-top:20px;background:#f9fffc;padding:17px}.result-head{display:flex;gap:11px;align-items:center}.result-icon{width:37px;height:37px;flex:none;display:grid;place-items:center;border-radius:50%;background:#d6f6e6;color:var(--success);font-size:22px;font-weight:800}.result-head h2{margin:0;font-size:17px}.result-head p{margin:4px 0 0;color:#4f6a5e;font-size:11.5px}.result-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-top:15px}.result-meta{color:#648075;font-size:11px}.result-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:18px}.result-tile{min-width:0;background:#fff;border:1px solid #d9ebe2;border-radius:10px;overflow:hidden}.result-tile img{width:100%;aspect-ratio:1;object-fit:contain;background:#f6f7f8}.result-tile div{padding:7px}.result-tile p{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.result-tile a{display:block;font-size:11px;color:var(--brand);font-weight:750;text-decoration:underline;margin-top:4px}.footer{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;color:#8593a0;font-size:11px;margin-top:21px}
.modal-backdrop{position:fixed;inset:0;z-index:10;padding:18px;background:#091d30cf;display:flex;justify-content:center;align-items:center;overflow:auto}.modal{width:min(1190px,100%);max-height:calc(100dvh - 36px);overflow:auto;background:#fff;border-radius:16px;box-shadow:0 25px 110px #020d1c60}.modal-head{padding:16px 20px;border-bottom:1px solid #e6edf2;display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:2;background:#fff}.modal-head h2{font-size:16px;margin:2px 0;max-width:740px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.modal-head p:not(.eyebrow){font-size:11.5px;color:var(--muted);margin:0}.modal-main{display:grid;grid-template-columns:minmax(0,1fr) 245px;gap:17px;padding:17px}.editor-stage{width:100%;height:min(55dvh,520px);min-height:300px;background:#172332;position:relative;border-radius:11px;overflow:hidden;touch-action:none}.editor-stage canvas{display:block;width:100%;height:100%;cursor:crosshair;touch-action:none}.editor-help{margin:9px 0;color:var(--muted);font-size:11.5px}.editor-tools{display:flex;gap:7px;flex-wrap:wrap}.tool-btn{border:1px solid #d6e1e9;border-radius:8px;background:#f9fbfc;min-height:39px;padding:8px 10px;font-size:11.5px;font-weight:760;color:#344c60}.editor-preview{border:1px solid #e1e8ee;border-radius:11px;padding:11px;text-align:center}.editor-preview h3{font-size:12.5px;text-align:left;margin:0 0 10px}.editor-preview canvas{max-width:100%;display:block;margin:auto;background:conic-gradient(#fff 25%,#e4eaf0 0 50%,#fff 0 75%,#e4eaf0 0) 0 0/15px 15px;border:1px solid #dce3e8;border-radius:5px}.editor-preview p{margin:9px 0 0;font-size:11px;color:var(--muted)}.editor-nav{display:grid;gap:8px;margin-top:12px}.editor-sidebar>.help{margin-top:12px}kbd{display:inline-block;border:1px solid #d8e3e9;padding:1px 4px;border-radius:4px;background:#f5f8fa;margin:0 2px 2px 0;font-size:10px}
@media(max-width:1150px){.workspace{grid-template-columns:350px minmax(0,1fr)}.app-shell{padding:20px}.file-list,.result-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:900px){.workspace{grid-template-columns:1fr}.settings{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.settings .panel-heading,.settings .advanced,.settings .server-status{grid-column:1/-1}.settings>.field-block{border-top:1px solid #eef1f4;padding-top:16px;margin-top:14px}.file-list,.result-gallery{grid-template-columns:repeat(4,minmax(0,1fr))}.modal-main{grid-template-columns:minmax(0,1fr) 205px}}@media(max-width:640px){.app-shell{padding:12px 12px 24px}.header{padding:8px 0 19px;align-items:flex-start}.brand-mark{width:41px;height:41px;flex-basis:41px}.brand-title h1{font-size:22px}.brand-title p:not(.eyebrow){font-size:11px}.version{font-size:10px;padding:5px 7px;margin-top:1px}.workspace{gap:12px}.settings{display:block;padding:16px}.uploader{padding:16px;min-height:auto}.settings>.field-block{margin-top:16px}.file-list,.result-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.drop{min-height:215px}.panel-heading h2{font-size:16px}.toolbar-buttons{max-width:55%}.toolbar-buttons .btn{padding:7px 9px;min-height:36px;font-size:11px}.action-bar{display:grid}.action-bar .primary{min-width:0}.footer{display:block}.footer span{display:block;margin:5px 0}.modal-backdrop{padding:0}.modal{max-height:100dvh;height:100dvh;border-radius:0}.modal-head{padding:12px;position:sticky}.modal-head h2{max-width:220px}.modal-main{grid-template-columns:1fr;padding:10px;gap:10px}.editor-stage{min-height:255px;height:44dvh}.editor-sidebar{display:grid;grid-template-columns:minmax(0,1fr) 160px;gap:10px;align-items:start}.editor-preview{padding:8px}.editor-nav{margin:0}.editor-sidebar>.help{grid-column:1/-1}.editor-tools .tool-btn{font-size:11px;flex:1;min-width:90px}.result-actions .primary{width:100%}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}
