:root{color-scheme:dark;--bg:#101113;--panel:#191b1e;--line:#35383e;--muted:#a9acb4;--text:#f4f5f6;--gold:#ffca2c;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
*{box-sizing:border-box}body{margin:0}header,main,footer{max-width:1540px;margin:auto;padding-inline:clamp(14px,3vw,36px)}header{height:78px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid #27292d}.brand{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--text);font-size:clamp(18px,2.7vw,27px);font-weight:750;white-space:nowrap;letter-spacing:-.035em}.brand b{color:var(--gold)}.brand svg{width:34px;fill:none;stroke:var(--gold);stroke-width:2;stroke-linejoin:round}.header-actions,.tools,.export-actions{display:flex;align-items:center;gap:8px}.filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:22vw;color:var(--muted);font-size:13px;padding:7px 10px;border:1px solid var(--line);border-radius:6px}.upload{position:relative;white-space:nowrap;cursor:pointer}.upload input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.upload:focus-within{outline:2px solid white;outline-offset:2px}
main{display:grid;grid-template-columns:310px minmax(0,1fr);gap:16px;padding-top:18px}.panel{border:1px solid var(--line);background:var(--panel);border-radius:13px;min-width:0}.settings{padding:22px}.eyebrow{font-size:10px;font-weight:760;letter-spacing:.13em;color:var(--muted);display:flex;align-items:center;gap:7px}.eyebrow span{display:inline-block;width:6px;height:6px;background:var(--gold);border-radius:50%}h1,h2{margin:5px 0 17px;letter-spacing:-.04em;font-size:25px}h2{font-size:28px;margin-bottom:0}
fieldset{border:0;padding:0;margin:0 0 21px;min-width:0}fieldset:last-child{margin-bottom:0}legend{padding:13px 0 7px;border-top:1px solid var(--line);width:100%;font-weight:670;font-size:13px}.segments{display:grid;grid-template-columns:1fr 1fr;gap:3px;background:#111214;border:1px solid var(--line);border-radius:7px;padding:3px}.segments label{position:relative}.segments input{position:absolute;opacity:0}.segments span{display:block;text-align:center;padding:7px 2px;border-radius:4px;font-size:12px;cursor:pointer}.segments input:checked+span{background:var(--gold);color:#171302;font-weight:720}.segments input:focus-visible+span{outline:2px solid white}.field{display:flex;align-items:center;justify-content:space-between;gap:7px;font-size:13px;margin-top:8px}.number{display:flex;align-items:center;border:1px solid var(--line);background:#111214;border-radius:6px;overflow:hidden;width:90px;flex-shrink:0}.number:focus-within{border-color:var(--gold)}.number:has(:disabled){opacity:.45}.number input{min-width:0;width:100%;text-align:right;padding:7px 4px;background:none;border:0;color:inherit;font:inherit;outline:none}.number small{padding-right:7px;color:var(--muted)}output{display:block;text-align:right;margin-top:4px;color:var(--muted);font-size:11px}.switch{display:flex;align-items:center;gap:8px;font-size:13px}.switch input{accent-color:var(--gold);width:16px;height:16px}.switch b{margin-left:auto;color:var(--gold);font-size:9px;letter-spacing:.09em}
.workspace{display:flex;flex-direction:column}.workspace-head,.export-bar{display:flex;align-items:center;justify-content:space-between;padding:15px 18px;gap:8px}.stage{position:relative;flex:1;min-height:430px;isolation:isolate;background:#121315;background-image:linear-gradient(#ffffff08 1px,transparent 1px),linear-gradient(90deg,#ffffff08 1px,transparent 1px);background-size:24px 24px;border-block:1px solid var(--line);overflow:hidden}.stage canvas{position:absolute;width:100%;height:100%;cursor:grab;touch-action:none}.stage canvas:active{cursor:grabbing}.stage-top,.stage-bottom{position:absolute;left:12px;right:12px;display:flex;align-items:center;justify-content:space-between;pointer-events:none;color:var(--muted);font-size:11px}.stage-top{top:12px}.stage-bottom{bottom:12px}.stage-top button{pointer-events:auto;padding:3px 9px;font-size:18px}.stage-top span,.stage-bottom span{background:#181a1de8;border:1px solid var(--line);border-radius:5px;padding:5px 8px}.stage-bottom i{display:inline-block;border-radius:50%;width:7px;height:7px;background:var(--gold)}.stage-state{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:max-content;max-width:85%;text-align:center;background:#1d2024;padding:14px 18px;border-radius:8px;color:var(--muted);border:1px solid var(--line);font-size:14px}.stage-state.error{color:#ffc1ba;border-color:#955952}.export-bar p{font-size:12px;color:var(--muted);margin:5px 0 0}
button,.button,select,.download{font:inherit;font-size:12px;font-weight:680;border:1px solid var(--line);border-radius:6px;background:#25282c;color:var(--text);padding:8px 11px}button,select,.download{cursor:pointer}button:hover:not(:disabled),select:hover{border-color:var(--gold)}.primary,button[aria-pressed=true]{background:var(--gold);border-color:var(--gold);color:#191401}.primary:hover:not(:disabled){background:#ffda67}button:disabled{opacity:.43;cursor:default}#downloads{padding:0 18px 15px;color:var(--muted);font-size:13px}#downloads a{display:inline-block;margin:5px 5px 0 0;text-decoration:none}footer{display:flex;justify-content:space-between;gap:14px;color:var(--muted);font-size:11px;padding-block:12px 20px}.sr{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
@media(max-width:850px){main{grid-template-columns:245px minmax(0,1fr);gap:10px}.settings{padding:14px}.export-bar,.workspace-head{padding:12px}.export-bar{flex-wrap:wrap}}
@media(max-width:650px){header{height:62px}.filename{display:none}main{display:flex;flex-direction:column}.workspace{order:-1}.stage{min-height:350px}.export-actions{flex-wrap:wrap}.settings form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.settings fieldset:first-child{grid-column:1/-1}}
@media(max-width:410px){.settings form{display:block}.stage{min-height:300px}.brand svg{width:26px}.stage-bottom span{padding:3px 4px}.stage-bottom{font-size:10px}}
.rear-modes{grid-template-columns:repeat(3,minmax(0,1fr))}.rear-modes span{font-size:11px}.field-note{margin:9px 0 0;color:var(--muted);font-size:11px;line-height:1.45}
.rear-modes.two-options{grid-template-columns:repeat(2,minmax(0,1fr))}
.corner-toggle{margin-top:12px}
#backing-bar[hidden]{display:none}#budget .number{width:100px}#estimate{font-size:14px;color:var(--gold);margin-top:9px}
.cut-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.cut-actions[hidden]{display:none}.cut-actions strong{font-size:12px}.workspace-head .tools{flex-wrap:wrap;justify-content:flex-end}
#model{width:100%}.rear-modes input:disabled+span{opacity:.45;cursor:default}
.field[hidden],.switch[hidden]{display:none}
#layer-controls{padding:0 18px 12px;margin:0;display:flex;flex-wrap:wrap;gap:8px 16px}#layer-controls[hidden],.layer-option[hidden]{display:none}.layer-option{display:flex;gap:5px;align-items:center;font-size:12px}.layer-option input{accent-color:var(--gold)}
.model-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.model-card{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;padding:5px;font-size:11px;text-align:center;min-height:74px}.model-card svg{display:block;width:100%;max-width:76px;height:41px;fill:none;stroke:currentColor;stroke-width:2.7;stroke-linecap:round;stroke-linejoin:round}.model-card svg .detail{stroke:#7fcfff;stroke-width:3}.model-card[aria-pressed=true] svg .detail{stroke:#594b11}.model-card[aria-pressed=true]{color:#191401}
#preview-colors{padding:0 18px 10px;margin:0;display:flex;flex-wrap:wrap;gap:8px 16px}.preview-color{display:flex;gap:6px;align-items:center;font-size:12px}.preview-color input{width:29px;height:23px;padding:1px;border:1px solid var(--line);border-radius:4px;background:var(--panel);cursor:pointer}#key i{background:var(--core-preview-color,#68717d)}
#text-form{max-width:1468px;margin:12px auto 0;padding:10px 18px;display:flex;flex-wrap:wrap;align-items:end;gap:10px;background:var(--panel);border:1px solid var(--line);border-radius:8px}#text-form[hidden]{display:none}#text-form label{display:grid;gap:4px;font-size:12px}#sign-text{min-width:0;width:min(42vw,320px);color:var(--text);background:#111214;border:1px solid var(--line);border-radius:6px;padding:8px}#text-status{font-size:12px;margin:0}.header-actions button{white-space:nowrap}@media(max-width:460px){.header-actions button,.header-actions .button{font-size:10px;padding:6px}.header-actions{gap:4px}.brand{font-size:15px}}
.workspace{align-self:start;width:100%}.stage{flex:none;height:clamp(350px,58vh,620px)}@media(min-width:851px){.workspace{position:sticky;top:12px}}@media(max-width:650px){.stage{height:clamp(300px,50vh,480px)}}
#text-form .upload{display:inline-flex;align-items:center}#sign-font{max-width:min(50vw,300px)}
#fit-size{margin-top:10px}
#sheet-budget{grid-column:1/-1}
.sheet-cut{margin-top:9px}
.sheet-cut select{max-width:57%;min-width:0;padding:6px 7px}
.sheet-cut output{line-height:1.5;overflow-wrap:anywhere}
#sheet-total{margin-top:9px;color:var(--gold);font-size:12px;font-weight:680;text-align:left}
#sheet-total:empty,#sheet-catalog-status:empty,#sheet-list:empty{display:none}
#sheet-catalog{margin-top:12px;border:1px solid var(--line);border-radius:8px;padding:9px}
#sheet-catalog summary{font-size:12px;font-weight:670;cursor:pointer}
#sheet-catalog input[name="sheetMaterial"]{min-width:0;width:50%;padding:6px;color:inherit;background:#111214;border:1px solid var(--line);border-radius:6px;font:inherit}
#sheet-catalog .number{width:106px}
#sheet-catalog small{white-space:nowrap}
.sheet-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px}
#sheet-list{list-style:none;margin:8px 0 0;padding:0}
#sheet-list li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px;padding:7px 0;border-top:1px solid var(--line);font-size:11px}
#sheet-list li span{overflow-wrap:anywhere}
#sheet-list li button{font-size:10px;padding:4px 6px}
#sheet-list li button+button{margin-left:4px}
