:root{--bg:#f7f3ee;--surface:#fffdfa;--ink:#2b2420;--muted:#7a6e66;--line:#e6ddd3;--accent:#b5384f;--accent-ink:#fff;--accent-soft:#f6e3e6;--radius:10px;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif}*{box-sizing:border-box}body{background:var(--bg);margin:0}button,input,select{font:inherit;color:inherit}.topbar{border-bottom:1px solid var(--line);background:var(--surface);justify-content:space-between;align-items:center;gap:12px;padding:14px 24px;display:flex}.embed .topbar{display:none}.brand{align-items:center;gap:12px;display:flex}.brand-mark{background:var(--accent);width:38px;height:38px;color:var(--accent-ink);border-radius:50%;place-items:center;font-size:18px;display:grid}.brand h1{letter-spacing:-.01em;margin:0;font-size:18px}.brand p{color:var(--muted);margin:0;font-size:13px}.layout{grid-template-columns:360px 1fr;min-height:calc(100vh - 140px);display:grid}.panel{background:var(--surface);border-right:1px solid var(--line);max-height:calc(100vh - 140px);padding:8px 20px 24px;position:sticky;top:0;overflow-y:auto}.panel section{border-bottom:1px solid var(--line);padding:14px 0}.panel section:last-child{border-bottom:0}.panel h2{text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin:0 0 12px;font-size:12px}.field{flex-direction:column;gap:5px;margin-bottom:14px;display:flex}.field-label{justify-content:space-between;gap:8px;font-size:14px;font-weight:600;display:flex}.field-label output{color:var(--accent);font-weight:500}.field small{color:var(--muted);font-size:12px;line-height:1.35}.input-unit{border:1px solid var(--line);background:#fff;border-radius:8px;align-items:center;display:flex;overflow:hidden}.input-unit:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.input-unit input{background:0 0;border:0;outline:none;flex:1;min-width:0;padding:8px 10px}.input-unit span{color:var(--muted);padding:0 10px;font-size:13px}select{border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px 10px}input[type=range]{accent-color:var(--accent);width:100%}.row{grid-template-columns:1fr 1fr;gap:12px;display:grid}.chips{flex-wrap:wrap;gap:6px;display:flex}.chip{border:1px solid var(--line);cursor:pointer;background:#fff;border-radius:999px;padding:6px 12px;font-size:13px}.chip.active{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}.check{align-items:center;gap:8px;margin-bottom:10px;font-size:14px;display:flex}.check input{accent-color:var(--accent);width:16px;height:16px}.link{color:var(--muted);cursor:pointer;background:0 0;border:0;padding:0;font-size:13px;text-decoration:underline}.preview{flex-direction:column;min-width:0;padding:18px 24px;display:flex}.preview-toolbar{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;display:flex}.stats{flex-direction:column;display:flex}.stats strong{font-size:18px}.stats span{color:var(--muted);font-size:13px}.actions{align-items:center;gap:8px;display:flex}.primary,.secondary{cursor:pointer;border:1px solid #0000;border-radius:8px;padding:9px 16px;font-weight:600}.primary{background:var(--accent);color:var(--accent-ink)}.primary:hover:not(:disabled){filter:brightness(1.08)}.secondary{border-color:var(--line);background:#fff}button:disabled{opacity:.55;cursor:progress}.canvas{border:1px solid var(--line);border-radius:var(--radius);background:#fff radial-gradient(#e9e1d8 1px,#0000 1px) 0 0/16px 16px;flex:1;justify-content:center;align-items:center;min-height:360px;padding:16px;display:flex}.svg-wrap{width:100%;height:100%;max-height:calc(100vh - 200px);display:flex}.svg-wrap svg{width:100%;height:auto;max-height:calc(100vh - 200px)}.empty{color:var(--muted)}.alert{border-radius:8px;margin-bottom:12px;padding:10px 14px;font-size:13px}.alert p{margin:2px 0}.alert.error{color:#8a1f1f;background:#fdecec;border:1px solid #f3c4c4}.footnote{color:var(--muted);margin:10px 0 0;font-size:12px}.footnote a{color:inherit}.garments{background:var(--surface);border-bottom:1px solid var(--line);gap:10px;padding:12px 24px;display:flex;overflow-x:auto}.garment{text-align:left;cursor:pointer;border:1px solid var(--line);border-radius:var(--radius);background:#fff;flex-direction:column;flex:none;gap:4px;min-width:190px;padding:10px 14px;display:flex}.garment strong{font-size:15px}.garment-meta{color:var(--muted);flex-direction:column;gap:2px;font-size:12px;display:flex}.garment.active{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}.garment.active strong{color:var(--accent)}.dots{color:var(--accent);letter-spacing:1px;font-size:9px}.dots-off{color:var(--line)}.profile-row{gap:6px;margin-bottom:10px;display:flex}.profile-row select{flex:1;min-width:0;font-weight:600}.icon-btn{border:1px solid var(--line);cursor:pointer;background:#fff;border-radius:8px;width:38px;font-size:15px}.icon-btn:disabled{opacity:.4;cursor:not-allowed}.row-buttons{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.row-buttons select{flex:1;min-width:0;font-size:13px}.small{padding:7px 12px;font-size:13px}.new-profile{background:var(--bg);border-radius:var(--radius);flex-direction:column;gap:10px;padding:12px;display:flex}.new-profile input{border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px 10px}.new-profile .field{margin:0}.guide{background:var(--bg);border-radius:var(--radius);z-index:1;grid-template-columns:92px 1fr;align-items:center;gap:12px;margin-bottom:12px;padding:10px 12px;display:grid;position:sticky;top:0}.guide-figure{width:92px;height:200px}.guide-figure .body{fill:#e9dfd4;stroke:#cbbcad;stroke-width:1px}.guide-figure .limb{stroke:#e9dfd4;stroke-width:15px;stroke-linecap:round}.guide-figure .floor{stroke:#cbbcad;stroke-width:1px}.guide-figure .overlay{fill:none;stroke:var(--accent);stroke-width:3px;stroke-linecap:round}.guide-text strong{font-size:14px}.guide-text p{color:var(--muted);margin:4px 0 0;font-size:12.5px;line-height:1.4}.guide-text .guide-hint{font-style:italic}.measures{grid-template-columns:1fr 1fr;gap:10px 12px;display:grid}.measure{flex-direction:column;gap:4px;display:flex}.measure-label{align-items:flex-end;min-height:2.4em;font-size:12.5px;font-weight:600;line-height:1.2;display:flex}.measure.active .measure-label{color:var(--accent)}.input-unit.invalid{background:#fffaf0;border-color:#e0a100}.range-ends{color:var(--muted);justify-content:space-between;margin-top:-2px;font-size:11.5px;display:flex}.alert.info{color:#1f4b6e;background:#eef4fa;border:1px solid #cddff0}.alert.warn{color:#7a4d00;background:#fff7e6;border:1px solid #f2d9a6}.notes{background:var(--surface);border:1px solid var(--line);border-radius:8px;margin:0 0 12px;padding:10px 14px 10px 30px;font-size:13px}.notes li{margin:2px 0}.dim{color:var(--muted);font-weight:500}.tabs{border-bottom:1px solid var(--line);gap:4px;margin-bottom:12px;display:flex;overflow-x:auto}.tab{color:var(--muted);cursor:pointer;white-space:nowrap;background:0 0;border:0;border-bottom:2px solid #0000;padding:8px 14px;font-weight:600}.tab.active{color:var(--accent);border-bottom-color:var(--accent)}.tab-panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);flex:1;padding:16px 18px;overflow:auto}.tab-panel h3{margin:0 0 4px;font-size:16px}.small-text{margin:0 0 10px;font-size:13px}.steps{flex-direction:column;gap:10px;margin:12px 0 0;padding-left:22px;display:flex}.steps li{padding-left:4px;line-height:1.5}.steps li::marker{color:var(--accent);font-weight:700}.cutting-controls{flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:14px;display:flex}.fabric-layout{margin-bottom:18px}.fabric-layout h3 strong{color:var(--accent)}.fabric-scroll{border-radius:8px;max-height:70vh;overflow:auto}.fabric-svg{width:min(100%,420px);display:block}.fabric-bg{fill:#f3ece4;stroke:#d8cbbd;stroke-width:2px}.fabric-fold{stroke:var(--accent);stroke-width:3px;stroke-dasharray:12 8}.fabric-note{fill:var(--muted);text-anchor:middle;font-size:22px}.piece-cut{fill:#fff;stroke:#2b2420;stroke-width:2px}.piece-seam{fill:none;stroke:#8f8178;stroke-width:1.5px;stroke-dasharray:6 4}.piece-cut+.piece-seam,.piece-seam:only-child{fill:none}.piece-label{fill:var(--accent);text-anchor:middle;dominant-baseline:middle;font-size:22px;font-weight:600}.compare-pick{max-width:360px}.legend{flex-wrap:wrap;align-items:center;gap:8px;margin:6px 0 10px;font-size:13px;display:flex}.swatch{border-radius:2px;width:18px;height:3px;margin-left:8px;display:inline-block}.swatch.a{background:var(--accent)}.swatch.b{background:#2f6f9f}.compare-svg{width:100%;max-height:65vh;display:block}.cmp-a path{fill:#b5384f0f;stroke:var(--accent);stroke-width:2px}.cmp-b path{fill:none;stroke:#2f6f9f;stroke-width:2px;stroke-dasharray:8 5}.section-toggle{cursor:pointer;width:100%;color:var(--muted);background:0 0;border:0;justify-content:space-between;align-items:center;padding:0;display:flex}.section-toggle h2{margin:0}.section-toggle span{font-size:18px}.section-toggle+*{margin-top:10px}.fixes{flex-wrap:wrap;gap:6px;display:flex}.fix-history{flex-direction:column;gap:6px;margin:12px 0 0;padding:0;font-size:12.5px;list-style:none;display:flex}.fix-history li{background:var(--bg);border-radius:6px;justify-content:space-between;align-items:baseline;gap:8px;padding:6px 8px;display:flex}.account{align-items:center;gap:8px;display:flex;position:relative}.sync{background:var(--line);border-radius:50%;width:9px;height:9px}.sync-saved{background:#3a9a5b}.sync-syncing{background:#e0a100}.sync-error{background:#c0392b}.menu{z-index:20;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);flex-direction:column;min-width:220px;padding:6px;display:flex;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 8px 24px #2b24201f}.menu button{text-align:left;cursor:pointer;background:0 0;border:0;border-radius:6px;padding:8px 10px}.menu button:hover{background:var(--bg)}.menu-status{color:var(--muted);margin:4px 10px 6px;font-size:12px}.overlay{z-index:50;background:#2b242059;place-items:center;padding:16px;display:grid;position:fixed;inset:0}.dialog{background:var(--surface);border-radius:14px;width:min(440px,100%);max-height:90vh;padding:18px 20px;overflow:auto;box-shadow:0 20px 50px #0003}.dialog-head{justify-content:space-between;align-items:center;margin-bottom:6px;display:flex}.dialog-head h2{margin:0;font-size:18px}.auth-form{flex-direction:column;gap:4px;margin-bottom:10px;display:flex}.auth-form input{border:1px solid var(--line);background:#fff;border-radius:8px;padding:9px 10px}.stats-table{border-collapse:collapse;width:100%;font-size:14px}.stats-table th,.stats-table td{border-bottom:1px solid var(--line);text-align:right;padding:7px 8px}.stats-table th:first-child,.stats-table td:first-child{text-align:left}@media (width<=820px){.garments{padding:10px 16px}.garment{min-width:160px}.panel{position:static}.layout{grid-template-columns:1fr}.panel{border-right:0;border-bottom:1px solid var(--line);max-height:none;padding:8px 16px 16px}.preview{padding:16px}.topbar{padding:12px 16px}.canvas{min-height:260px;padding:8px}}
