:root {
  --paper:#f3f5f2; --surface:#fff; --ink:#25352d; --muted:#65756b;
  --line:#dfe6df; --green:#315b49; --green-soft:#eaf2ec; --red:#ac433b;
  font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif; color:var(--ink); background:var(--paper);
  font-synthesis:none;
}
*{box-sizing:border-box}
body{margin:0;font-size:14px;line-height:1.5}
button,input,select,a{font:inherit}
button,input,select,summary{touch-action:manipulation}
button,a,summary{cursor:pointer}
button{border:0;background:none;color:inherit}
button:disabled{cursor:not-allowed;opacity:.45}
a{color:inherit;text-decoration:none}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,.upload:focus-visible{outline:3px solid #88b19a;outline-offset:3px}
input[type=checkbox]{width:17px;height:17px;accent-color:var(--green);margin:0;flex-shrink:0}
input[type=number]{font-variant-numeric:tabular-nums;appearance:textfield;-moz-appearance:textfield}
input::-webkit-inner-spin-button{appearance:none}
input:disabled,select:disabled{background:#f1f3f0;color:#7a877e}
svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
[hidden]{display:none!important}
.storage-warning{padding:12px 24px;background:#fff2d7;color:#714b13;border-bottom:1px solid #ead6ab}
.project-file-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}
.project-file-actions button{flex:1;white-space:nowrap;font-size:12px}
.offline-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;border:1px solid var(--line);background:var(--surface);border-radius:12px;margin-top:18px}
.offline-panel p{font-size:12px;color:var(--muted);margin:5px 0 0}
.offline-panel button{flex-shrink:0}
@media(max-width:740px){.offline-panel{align-items:stretch;flex-direction:column}.offline-panel button{min-height:44px}.project-file-actions button{min-height:44px}.header-right{gap:12px!important}.brand>span{display:none}}
.top{height:68px;padding:0 30px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#fffffff5;position:sticky;top:0;z-index:10}
.brand{display:flex;align-items:center;gap:10px}.brand svg{width:34px;height:34px;color:var(--green);stroke-width:2}
.brand strong{font-size:23px;letter-spacing:2px;font-weight:750}.brand>span{font-size:12px;color:var(--muted);border-left:1px solid var(--line);padding-left:18px;margin-left:8px}
.header-right{display:flex;gap:22px;align-items:center}
.local{display:flex;align-items:center;gap:7px;font-size:12px;color:#4f725b}.local i{width:7px;height:7px;background:#648e70;border-radius:50%}
.local.offline{color:#a05239}.local.offline i{background:#ba7154}
.text-button{font-size:12px;color:var(--green);padding:7px 0;font-weight:550}.text-button:hover{text-decoration:underline;text-underline-offset:4px}
.small{margin-left:auto}
.workspace{display:grid;grid-template-columns:350px minmax(0,1fr);max-width:1680px;margin:auto;min-height:calc(100dvh - 68px)}
.sidebar{position:sticky;top:68px;height:calc(100dvh - 68px);overflow-y:auto;scrollbar-width:thin;background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;padding:0 24px}
.section{padding:22px 0;border-bottom:1px solid var(--line);flex-shrink:0}
.section-heading{display:flex;align-items:center;gap:10px;margin-bottom:15px}
.section-heading h2{font-size:14px;font-weight:650;margin:0}
.number{font-size:10px;letter-spacing:1px;color:#628571;font-weight:650;border:1px solid #dfe8df;border-radius:5px;display:grid;place-items:center;min-width:26px;height:24px}
.upload{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:108px;padding:14px;border:1px dashed #afc5b6;border-radius:10px;background:#f4f8f3;cursor:pointer;transition:background .15s,border-color .15s}
.upload:hover,.upload.dragging{background:#e9f3e9;border-color:var(--green)}
.upload svg{width:25px;height:25px;color:#50755c;margin-bottom:2px}
.upload strong{font-size:13px;font-weight:600;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.upload span{font-size:11px;color:var(--muted)}
.upload[aria-disabled=true]{pointer-events:none;opacity:.65}
.import-options{display:flex;justify-content:space-between;gap:8px;margin-top:13px;font-size:12px;color:var(--muted)}
.import-options label{display:flex;align-items:center;gap:6px}.import-options select{background:transparent;border:0;padding:3px;color:var(--green);font-size:12px}
.import-tip{font-size:11px;line-height:1.7;color:var(--muted);margin:7px 0 14px}
.sample-heading{font-size:11px;color:var(--muted);margin:12px 0 8px}
.samples{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sample{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:8px;padding:9px;min-width:0;text-align:left}
.sample img{width:42px;height:33px;object-fit:contain;flex-shrink:0}.sample span{font-size:11px;color:#516558}
.sample:hover{border-color:#a8bfae}.sample.selected{border-color:#5c846b;background:#f5f9f3;box-shadow:0 0 0 1px #5c846b}
details{margin-top:18px}summary{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;font-size:13px;font-weight:600;padding:5px 0}
summary::-webkit-details-marker{display:none}summary:after{content:'＋';margin-left:auto;color:#6c8876}details[open]>summary:after{content:'−'}
#library{margin-top:14px}#library summary{font-size:12px;font-weight:500}
#library-count{background:#edf3eb;color:#4f7059;border-radius:10px;min-width:20px;text-align:center;font-size:10px;padding:1px 5px}
.library-controls{display:flex;gap:8px;margin-top:9px}.library-controls select{flex:1;min-width:0;width:0;border:1px solid var(--line);border-radius:7px;background:white;padding:9px 7px;color:#405647;font-size:12px}
.library-controls .secondary{padding:7px 12px}
.history-actions{display:flex;gap:3px;margin-left:auto}.history-actions button{width:30px;height:30px;border:1px solid var(--line);border-radius:6px;font-size:19px;color:var(--green)}
.history-actions button:not(:disabled):hover{background:var(--green-soft)}
.size-fields{display:flex;gap:8px;align-items:flex-end}.size-fields>label{min-width:0;flex:1;font-size:12px;color:var(--muted)}
.unit-input{height:46px;background:#fff;border:1px solid #ccd8ce;border-radius:7px;display:flex;align-items:center;padding:0 10px;margin-top:7px}
.unit-input:focus-within{border-color:var(--green);box-shadow:0 0 0 2px #315b4912}
.unit-input input{width:100%;min-width:0;border:0;outline:none;background:transparent;color:var(--ink);font-size:19px;font-weight:550}
.unit-input span{font-size:11px;white-space:nowrap;color:var(--muted)}
.lock{width:23px;height:46px;display:grid;place-items:center;color:#849789;flex-shrink:0}.lock.active{color:var(--green)}.lock svg{width:17px;height:17px}
.field-hint{font-size:11px;line-height:1.75;color:var(--muted);margin:9px 0 13px}
.palette-heading{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin:17px 0 10px}.palette-heading>span:last-child{font-size:11px;color:var(--muted)}
.palette{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.color-item{display:flex;align-items:center;gap:7px;padding:9px 8px;border:1px solid var(--line);border-radius:8px;background:white;min-width:0}
.color-item.off{background:#f5f6f3}.color-item.off .swatch-meta,.color-item.off input[type=color]{opacity:.4}
.color-item input[type=color]{width:28px;height:31px;border:0;padding:0;background:transparent;cursor:pointer;flex-shrink:0}
.color-item input::-webkit-color-swatch-wrapper{padding:0}.color-item input::-webkit-color-swatch{border:1px solid #0001;border-radius:5px}
.swatch-meta{display:flex;flex-direction:column;gap:2px;min-width:0}.swatch-meta strong{font-size:11px;font-weight:550}.swatch-meta small{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums}
.needle-section{padding-bottom:20px}.needle-section details{margin:0}.needle-section summary{font-size:14px;padding:0}
.setting{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px;font-size:12px;color:#4b6353}
.setting select{border:1px solid #cddacd;border-radius:7px;padding:9px 8px;color:#324d3e;font-size:12px;background:#fff;max-width:182px;min-width:0;min-height:38px}
.setting input[type=number]{width:82px;border:1px solid #cddacd;border-radius:7px;background:#fff;padding:8px;color:var(--ink);font-size:15px;text-align:right}
.setting.inactive{color:#7c8b81}.setting.inactive input{background:#f2f4f0;color:#7d897e}
.parameter-input{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted)}
.spacing-presets{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:-3px 0 8px}
.spacing-presets button{font-size:11px;background:#f7f9f5;border:1px solid var(--line);border-radius:6px;padding:5px 3px;min-height:30px;color:#627367}
.spacing-presets button.selected{border-color:#779c80;background:#e9f2e8;color:#315b49;font-weight:600}
.method-demo{display:flex;align-items:center;gap:10px;padding:10px 11px;background:#f0f5ee;border-radius:8px;margin:11px 0 5px}
.method-demo svg{width:47px;height:38px;flex-shrink:0;stroke-width:1.5;color:#5e7f50}.method-demo p{font-size:11px;line-height:1.75;margin:0;color:#52694c}
.angle-preview{display:flex;align-items:center;gap:10px;font-size:11px;color:#52724f;background:#f2f6ef;border-radius:7px;margin-top:10px;padding:8px 10px}
.direction-disc{display:block;position:relative;width:32px;height:32px;border:1px solid #b4c9af;border-radius:50%;background:white;flex-shrink:0}
.direction-disc i{position:absolute;left:4px;right:4px;top:14px;height:2px;background:#52754c}
.direction-disc i:after{content:'';position:absolute;right:0;top:-2px;width:5px;height:5px;border-top:2px solid #52754c;border-right:2px solid #52754c;transform:rotate(45deg)}
#reset-settings{font-size:11px;border-bottom:1px solid #d4e1d2;padding:2px 0;margin-top:3px}
.field-error{font-size:12px;line-height:1.65;color:var(--red);margin:8px 0}
.invalid,[aria-invalid=true]{border-color:#bb6757!important}.unit-input.invalid{box-shadow:0 0 0 2px #bb67570f}
.generate-box{position:sticky;bottom:0;margin-top:auto;padding:16px 0 13px;background:#fff;box-shadow:0 -10px 15px #ffffffed;z-index:3;flex-shrink:0}
.primary{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:12px 17px;border-radius:8px;background:var(--green);color:#fff;font-size:13px;font-weight:600;transition:background .15s}
.primary:not(:disabled):hover{background:#244838}.primary svg{width:20px;height:20px}
.generate-box .primary{display:flex;width:100%;justify-content:space-between;height:48px}
.generate-box p{font-size:11px;color:var(--muted);margin:8px 0 0;text-align:center}
.secondary{display:inline-flex;align-items:center;justify-content:center;border:1px solid #ccd9cb;color:var(--green);background:#fff;border-radius:7px;padding:10px 13px;font-size:12px;white-space:nowrap;min-height:38px}
.secondary:hover{background:#f3f7f0}.compact{padding:10px 14px;font-size:12px;min-height:38px;white-space:nowrap}
.workarea{min-width:0;padding:28px 32px 24px}
.canvas-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
.eyebrow{font-size:11px;color:var(--muted);margin-bottom:5px;display:flex;gap:9px;align-items:center}
#result-state{font-size:10px;padding:2px 7px;background:#e5ebe4;color:#637464;border-radius:4px}#result-state[data-status=done]{background:#dcefe1;color:#315f40}
h1{font-size:23px;font-weight:650;line-height:1.45;margin:0;overflow-wrap:anywhere}
.project-meta{display:flex;flex-direction:column;align-items:flex-end;gap:7px;flex-shrink:0}.draft-status{font-size:11px;color:#657e6a}.tag{background:#e6eee4;color:#4f6f50;font-size:10px;border-radius:5px;padding:4px 8px;white-space:nowrap}
.notice{font-size:12px;line-height:1.7;color:#62755f;margin-bottom:15px;min-height:20px}.notice:empty{display:none}
.notice.error{background:#fff1ec;border:1px solid #efd1c7;border-radius:8px;color:#9f4230;padding:11px 13px}
.draft-conflict{background:#fff7e7;border:1px solid #e7d4a7;border-radius:9px;padding:12px;margin-bottom:12px}.draft-conflict p{font-size:12px;margin:0 0 9px;color:#7e673a}.draft-conflict>div{display:flex;gap:8px}
.svg-compat{display:grid;grid-template-columns:156px minmax(0,1fr);gap:17px;align-items:center;padding:15px;border:1px solid #e6d7b7;background:#fffbf2;border-radius:10px;margin-bottom:16px}
.svg-compat>img{width:156px;height:112px;object-fit:contain;background:white;border:1px solid #e8dfcb;border-radius:7px}
.svg-compat h2{font-size:14px;color:#77592d;margin:0 0 5px}.svg-compat p{font-size:11px;line-height:1.8;color:#826a45;margin:6px 0}.svg-compat p strong{color:#974b30}
.compat-colors{display:flex;align-items:center;gap:8px;font-size:11px;color:#755a34;margin-top:8px}.compat-colors select{border:1px solid #dfcfaf;border-radius:5px;background:white;padding:5px;color:#725326}
.compat-actions{display:flex;gap:8px;align-items:center;margin-top:10px;flex-wrap:wrap}.compat-actions .primary{min-height:38px;padding:9px 12px;font-size:12px}.compat-actions .secondary{padding:8px 11px;color:#7d6544;border-color:#dfcfaf}
.compat-help{font-size:10px!important}
.workflow{display:flex;gap:0;list-style:none;padding:0;margin:0 0 17px;color:#72846e;font-size:11px}
.workflow li{display:flex;align-items:center;gap:7px;flex:1;white-space:nowrap}.workflow li:last-child{flex:0}
.workflow li:not(:last-child):after{content:'';height:1px;background:#dce4d8;flex:1;margin:0 15px 0 7px}
.workflow li>span{display:grid;place-items:center;border:1px solid #d4dfd0;background:#fff;border-radius:50%;width:23px;height:23px;font-size:11px}
.workflow li.active{color:#325b40;font-weight:600}.workflow li.active>span{background:var(--green);border-color:var(--green);color:#fff}.workflow li.complete>span{color:#46744c;background:#dfebdc;border-color:#c9dec1}
.preview-shell{border:1px solid #d8e2d5;border-radius:12px;background:white;overflow:hidden;box-shadow:0 3px 12px #233b2510}
.preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:54px;border-bottom:1px solid #e5ece1;padding:6px 14px}
.tabs{display:flex;gap:4px}.tabs button{font-size:12px;font-weight:600;padding:8px 15px;border-radius:6px;color:#688066;white-space:nowrap}.tabs button.selected{color:#2c5237;background:#e5efe1}
.zoom-controls{display:flex;align-items:center;gap:3px}.zoom-controls button{min-width:28px;height:32px;padding:4px 6px;border-radius:5px;color:#61765c;font-size:12px}.zoom-controls button:hover{background:#f0f5ec}
.zoom-controls #fit{border-right:1px solid var(--line);border-radius:0;padding-right:12px;margin-right:3px}
#expand-preview{font-size:21px;margin-left:5px;border-left:1px solid var(--line)}
.preview-summary{font-size:11px;line-height:1.7;color:#5e7557;padding:9px 17px;background:#fafcf8;border-bottom:1px solid #e7eee3;font-variant-numeric:tabular-nums}
.stage{position:relative;height:clamp(300px,48vh,560px);display:flex;align-items:center;justify-content:center;overflow:hidden;cursor:grab;touch-action:none;background-color:#f3f2ea;background-image:linear-gradient(#3c554f08 1px,transparent 1px),linear-gradient(90deg,#3c554f08 1px,transparent 1px);background-size:24px 24px}
.stage:active{cursor:grabbing}.stage:focus-visible{outline:3px solid #85a887;outline-offset:-3px}
.stage[data-fabric=dark]{background-color:#27362e;background-image:linear-gradient(#ffffff06 1px,transparent 1px),linear-gradient(90deg,#ffffff06 1px,transparent 1px)}
.stage[data-fabric=gray]{background-color:#91a097;background-image:linear-gradient(#ffffff10 1px,transparent 1px),linear-gradient(90deg,#ffffff10 1px,transparent 1px)}
.artboard{width:86%;height:75%;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.artboard img,.artboard canvas{width:100%;height:100%;object-fit:contain}.artboard img{pointer-events:none}
.measurement{position:absolute;top:15px;left:0;right:0;text-align:center;font-size:11px;color:#6b7e63;pointer-events:none;z-index:1}
.measurement:before,.measurement:after{content:'';display:inline-block;border-top:1px solid #b6c6ad;vertical-align:middle;width:35px;margin:0 12px}
.stage-caption{position:absolute;bottom:11px;left:50%;transform:translateX(-50%);max-width:94%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:4px 8px;border-radius:5px;font-size:10px;color:#6a7a61;background:#f3f2eacc;pointer-events:none}
.stage[data-fabric=dark] .measurement{color:#d1e1cd}.stage[data-fabric=dark] .stage-caption{color:#d1e1cd;background:#27362ecc}
.stage[data-fabric=gray] .measurement{color:#2e5036}.stage[data-fabric=gray] .stage-caption{color:#264d30;background:#91a097d9}
.stage-busy{position:absolute;inset:0;background:#f7faf1e8;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px;z-index:2;cursor:wait;backdrop-filter:blur(2px)}
.stage-busy strong{font-size:14px;color:#3c5f38}.stage-busy>span:last-child{font-size:11px;color:#637b5b}
.spinner{width:29px;height:29px;border:2px solid #cbdac3;border-top-color:var(--green);border-radius:50%;animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.playback{padding:13px 16px;background:#f4f8f0;border-bottom:1px solid #e0e9da;font-size:12px}
.playback-heading{display:flex;align-items:center;gap:10px;margin-bottom:11px}.playback-heading strong{font-size:12px;color:#375d38}.playback-heading>span{font-size:11px;color:#6d8164}.playback-heading .text-button{margin-left:auto;padding:2px 0;white-space:nowrap}
.transport{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.transport button{height:36px;min-width:36px;border:1px solid #cadac1;border-radius:6px;background:white;font-size:12px;color:#446439}
.transport button:not(:disabled):hover{background:#e7f0df}.transport #play{padding:0 15px;min-width:120px;background:var(--green);color:white;font-weight:600}.transport #play:hover{background:#244838}
.transport select,.preview-options select{border:1px solid #cfdbc8;border-radius:6px;background:#fff;color:#4b6940;font-size:11px;padding:8px}
.transport span{margin-left:auto;font-size:12px;color:#45673b;white-space:nowrap;font-variant-numeric:tabular-nums}
.simulation-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px;font-size:11px;color:#57764c}.simulation-meta>span{color:#76876d;font-size:10px}
.color-timeline{height:5px;display:flex;border-radius:3px;overflow:hidden;margin-top:11px}.color-timeline i{height:100%;border-right:1px solid #fff8}
.playback>input{display:block;width:100%;accent-color:var(--green);height:19px;margin:2px 0 9px;cursor:pointer}
.preview-options{display:flex;align-items:center;gap:12px;flex-wrap:wrap;color:#57764c;font-size:11px}.preview-options label{display:flex;align-items:center;gap:5px}.preview-options input[type=checkbox]{width:15px;height:15px}
.preview-options select{max-width:155px;padding:6px}.preview-options .needle-seek{margin-left:auto;gap:4px}.needle-seek input{width:72px;min-height:29px;border:1px solid #ccdac6;border-radius:5px;background:white;padding:4px 6px;color:#45623c;font-size:12px}.needle-seek .text-button{font-size:11px;padding:4px}
.status-panel{display:flex;align-items:center;gap:12px;background:white;border:1px solid var(--line);border-radius:10px;padding:16px;margin-top:16px}
.status-icon{display:grid;place-items:center;width:36px;height:36px;background:#edf4e8;border-radius:50%;color:#668556;font-size:21px;flex-shrink:0}
.status-text{flex:1;min-width:0}.status-text strong{font-size:13px;font-weight:600}.status-text p{font-size:11px;line-height:1.75;color:#6b7e61;margin:4px 0 0}
.download-actions{display:flex;align-items:center;gap:8px}.result-note{font-size:11px;line-height:1.8;color:#6c7f62;margin:11px 0 0}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}
.stats>span{display:flex;flex-direction:column;gap:5px;padding:12px 14px;border:1px solid #dee7d8;background:#fafcf7;border-radius:9px;color:#718467;font-size:11px}
.stats strong{font-size:18px;font-weight:550;color:#375c31;white-space:nowrap;font-variant-numeric:tabular-nums}
.thread-order{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin:12px 0 0}.thread-order:before{content:'换色顺序';font-size:11px;color:#708568;margin-right:3px}
.thread-chip{display:flex;gap:6px;align-items:center;padding:7px 9px;border:1px solid #d9e4d2;background:white;border-radius:6px;font-size:11px;color:#58774c}.thread-chip i{width:13px;height:13px;border:1px solid #0002;border-radius:3px}.thread-chip.selected{border-color:#588047;background:#eaf4e2;box-shadow:0 0 0 1px #588047}
.workspace-footer{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:10px;line-height:1.8;color:#7b8c71;padding-top:20px}
dialog{width:min(550px,92vw);max-height:85dvh;overflow:auto;border:1px solid var(--line);border-radius:15px;background:white;color:var(--ink);padding:26px;box-shadow:0 20px 90px #26311f30}
dialog::backdrop{background:#23392355;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.dialog-heading h2{font-size:17px;margin:0}.dialog-heading button{width:32px;height:32px;font-size:25px;color:#6f8068}
dialog ol{font-size:13px;line-height:1.9;color:#586e4e;padding-left:20px}dialog li{margin:12px 0}.help-note{padding:12px;background:#f2f6ed;border-radius:8px;font-size:12px;line-height:1.8;color:#697e5e}dialog>.primary{width:100%;margin-top:16px}
body.preview-expanded{overflow:hidden}.preview-shell.expanded{position:fixed;inset:14px;z-index:30;display:flex;flex-direction:column;box-shadow:0 0 0 30px #23392366;border-radius:12px}
.preview-shell.expanded .preview-toolbar,.preview-shell.expanded .preview-summary,.preview-shell.expanded .playback{flex-shrink:0}.preview-shell.expanded .stage{height:auto;min-height:100px;flex:1}
@media(min-width:1600px){.workarea{padding:30px 42px}.stage{height:clamp(400px,52vh,650px)}}
@media(max-width:1150px) and (min-width:741px){.workspace{grid-template-columns:320px minmax(0,1fr)}.sidebar{padding:0 18px}.workarea{padding:22px 20px}.playback-heading>span{display:none}.status-panel{flex-wrap:wrap}.download-actions{width:100%;justify-content:flex-end}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.brand>span{display:none}.preview-toolbar{flex-wrap:wrap}.preview-options .needle-seek{margin-left:0}.setting select{max-width:164px}}
@media(max-width:740px){
 .top{height:58px;padding:0 16px;position:relative}.brand strong{font-size:21px}.brand svg{width:29px;height:29px}.brand>span{display:none}.header-right{gap:12px}.local{display:none}.local.offline{display:flex;font-size:10px}.header-right .text-button{font-size:11px}
 .workspace{display:flex;flex-direction:column;padding-bottom:8px;min-height:calc(100dvh - 58px)}.sidebar,.workarea{display:contents}
 .canvas-heading{order:0;padding:20px 16px 0;margin-bottom:12px}.canvas-heading h1{font-size:20px}.project-meta{gap:5px}.draft-status{font-size:10px}.eyebrow{font-size:10px}
 .draft-conflict{order:1;margin:0 16px 12px}.notice{order:2;margin:0 16px 12px;font-size:11px}
 .svg-compat{order:3;grid-template-columns:1fr;margin:0 16px 14px;padding:12px;gap:12px}.svg-compat>img{width:100%;height:136px}
 .workflow{order:4;margin:0 16px 12px;font-size:10px}.workflow li{gap:5px}.workflow li:not(:last-child):after{margin:0 7px}.workflow li>span{width:21px;height:21px;font-size:10px}
 .preview-shell{order:5;margin:0 12px 14px;border-radius:9px}.preview-toolbar{padding:6px 8px;gap:6px;flex-wrap:wrap;min-height:48px}.tabs button{padding:7px 10px;font-size:11px}.zoom-controls{gap:0}.zoom-controls button{font-size:11px;min-width:25px;padding:4px}.zoom-controls #fit{font-size:10px;padding-right:6px;margin-right:0}#expand-preview{font-size:19px;margin-left:2px}
 .preview-summary{font-size:10px;padding:8px 11px}.stage{height:310px;touch-action:pan-y}.artboard{height:74%;width:87%}.stage-caption{font-size:9px}.measurement{font-size:10px;top:12px}
 .playback{padding:11px 10px}.playback-heading>span{display:none}.playback-heading .text-button{font-size:10px}.transport{gap:6px}.transport button{height:38px;min-width:33px}.transport #play{min-width:107px;padding:0 10px}.transport span{font-size:11px}.transport select{font-size:11px;max-width:138px}.simulation-meta{font-size:10px}.simulation-meta>span{font-size:9px}.preview-options{gap:9px}.preview-options .needle-seek{margin-left:0}.preview-options select{font-size:10px;max-width:144px}.needle-seek input{width:75px}
 .section{padding:20px;background:white;margin:0 12px;border:1px solid var(--line);border-radius:10px;flex-shrink:0}.sidebar>.section:nth-child(1){order:6}.sidebar>.section:nth-child(2){order:7;margin-top:12px}.sidebar>.section:nth-child(3){order:8;margin-top:12px}
 .size-fields{max-width:none}.palette{grid-template-columns:repeat(2,minmax(0,1fr))}.color-item{padding:10px;gap:8px}.swatch-meta strong{font-size:12px}.swatch-meta small{font-size:11px}.upload{min-height:91px}.sample img{width:44px}.sample span{font-size:11px}.setting select{max-width:195px}.field-hint{font-size:12px}.setting{font-size:13px}.spacing-presets button{min-height:34px}
 .generate-box{order:9;position:static;box-shadow:none;margin:12px 12px 0;padding:15px 16px;background:#e9f1e5;border:1px solid #d2e1c8;border-radius:10px}.generate-box p{margin-top:8px;font-size:11px}.generate-box .primary{height:48px}
 .status-panel{order:10;margin:14px 12px 0;flex-wrap:wrap;padding:14px}.download-actions{width:100%;gap:8px}.download-actions>a{flex:1}.result-note{order:11;margin:10px 16px 0}.stats{order:12;grid-template-columns:repeat(2,minmax(0,1fr));margin:12px 12px 0;gap:8px}.stats strong{font-size:17px}.stats>span{padding:12px}
 .thread-order{order:13;margin:12px 16px 0}.workspace-footer{order:14;padding:16px 18px 20px}.preview-shell.expanded{inset:5px;margin:0;border-radius:9px}.preview-shell.expanded .stage{min-height:80px}
 body.has-result .status-panel{order:5;margin:0 12px 12px}body.has-result .result-note{order:5;margin:0 16px 10px}body.has-result .stats{order:5;margin:0 12px 12px}body.has-result .thread-order{order:5;margin:0 16px 16px}
}
@media(max-width:380px){.preview-toolbar{flex-direction:column;align-items:stretch}.zoom-controls{justify-content:flex-end}.tabs button{flex:1}.tabs{width:100%}.header-right{gap:8px}.status-icon{display:none}}
.common-settings{border:1px solid #d5e2cf;background:#f7faf3;border-radius:8px;padding:10px;margin:12px 0}
.common-settings p{font-size:11px;color:#63775b;line-height:1.7;margin:0 0 8px}
.common-settings p:last-child{margin:8px 0 0;font-size:10px}.common-settings>div{display:flex;gap:8px}
.common-settings .secondary{flex:1;min-height:34px;padding:7px 10px;font-size:11px}
.mobile-nav{display:none}
.phone-address-label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#61745a}
#phone-address{padding:9px;border:1px solid var(--line);border-radius:6px;background:white;color:var(--ink);width:100%}
#phone-options{text-align:center}#phone-qr{display:block;margin:15px auto 10px;max-width:100%;object-fit:contain}
#phone-link{display:block;overflow-wrap:anywhere;font-size:14px;color:var(--green);text-decoration:underline;margin-bottom:14px}
@media(max-width:740px){
 .mobile-nav{display:flex;align-items:center;gap:7px;position:sticky;top:0;z-index:9;background:#f8fbf6f2;backdrop-filter:blur(8px);padding:8px 12px;border-bottom:1px solid var(--line)}
 .mobile-nav button{min-height:36px;padding:5px 10px;border:1px solid #d5e1ce;border-radius:6px;font-size:12px;color:var(--green);background:white}
 .mobile-nav span{margin-left:auto;font-size:9px;color:#74856a}
 #preview-shell,#settings-section{scroll-margin-top:66px}
 .setting input[type=number],.needle-seek input,.library-controls select,#phone-address{font-size:16px}
 #phone-access{display:none}
 .common-settings .secondary{min-height:42px;font-size:12px}
 .workspace{padding-bottom:env(safe-area-inset-bottom)}
 .offline-panel{order:14;margin:14px 12px 0;padding:16px}
 .workspace-footer{order:15}
}
@media(max-width:380px){.mobile-nav span{display:none}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
