.analytics-preferences{box-sizing:border-box;padding:12px 20px;color:inherit;font:inherit;font-size:12px;line-height:1.6;flex-shrink:0;max-width:100%;width:100%}.analytics-preferences summary{cursor:pointer;width:fit-content;min-height:32px;display:list-item;align-content:center}.analytics-preferences summary:focus-visible,.analytics-preferences button:focus-visible,.analytics-preferences a:focus-visible{outline:2px solid #517dc6;outline-offset:3px}.analytics-preferences-body{max-width:640px;padding:4px 0 8px}.analytics-preferences-body p{margin:8px 0;font-size:12px;line-height:1.7;white-space:normal}.analytics-preferences a{color:inherit;text-decoration:underline}.analytics-actions{display:flex;gap:8px;flex-wrap:wrap}.analytics-preferences .analytics-actions button{font:inherit;font-size:12px;line-height:1.5;color:inherit;background:transparent;border:1px solid #8993a480;border-radius:6px;padding:7px 12px;min-height:36px;cursor:pointer}.analytics-preferences .analytics-actions button:hover{background:#8993a418}@media(max-width:600px){.analytics-preferences{padding:10px 16px}.analytics-preferences summary,.analytics-preferences .analytics-actions button{min-height:44px}}@media print{.analytics-preferences{display:none!important}}@font-face{font-family:Plex;src:url(/fonts/plex-sans.woff2) format("woff2");font-display:swap}:root{font-family:Plex,Noto Sans CJK SC,sans-serif;font-size:14px;color:var(--ink);background:var(--bg);font-synthesis:none;--bg: #f7f8fa;--surface: #fff;--sidebar: #f1f3f6;--ink: #252c37;--muted: #5e6878;--line: #dbe0e8;--soft: #edf1f8;--accent: #2857c7;--on-accent: #fff;--danger: #b52c3d;--success: #187257;--focus: #3266dc;--shadow: 0 1px 2px #202c4510}:root[data-theme=dark]{color-scheme:dark;--bg: #14181f;--surface: #1c222c;--sidebar: #191e27;--ink: #e5eaf2;--muted: #a7b2c5;--line: #3b4656;--soft: #273247;--accent: #92b0ff;--on-accent: #111b32;--danger: #ff9ba8;--success: #8adac0;--focus: #b1c6ff;--shadow: none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{outline-offset:3px}button{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:8px 13px;border:1px solid var(--line);border-radius:7px;background:var(--surface);box-shadow:var(--shadow);white-space:nowrap;font-weight:500;transition:box-shadow .14s}button:hover:not(:disabled){background:var(--soft);border-color:var(--muted)}button:active:not(:disabled){background:var(--sidebar)}button:disabled{opacity:.48;cursor:not-allowed;box-shadow:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--focus)}button svg{width:16px;height:16px;stroke-width:1.7;flex:none}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}.primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent);box-shadow:inset 0 1px #ffffff25,0 1px 2px #203b6020}.primary:hover:not(:disabled){background:var(--accent);filter:brightness(.94)}.quiet{border-color:transparent;background:transparent;box-shadow:none}.icon-button{width:38px;padding:7px}.danger{color:var(--danger)}input,select,textarea{min-height:38px;border:1px solid var(--line);border-radius:6px;background:var(--surface);padding:8px 10px;max-width:100%}input[type=checkbox]{width:18px;min-height:18px;accent-color:var(--accent)}label{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:12px;font-weight:500}label>input,label>select,label>textarea{color:var(--ink);font-size:14px}input[aria-invalid=true]{border-color:var(--danger)}h1,h2,h3,p{margin:0}h1{font-size:26px;letter-spacing:-.7px;font-weight:550}h2{font-size:16px;font-weight:550;letter-spacing:-.15px}h3{font-size:14px;font-weight:550}p{line-height:1.6}.muted{color:var(--muted)}.small{font-size:12px}.number{font-variant-numeric:tabular-nums}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.spread{justify-content:space-between}.stack{display:flex;flex-direction:column;gap:16px}.skip{position:fixed;left:12px;top:12px;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;padding:10px;background:var(--surface);z-index:100}.skip:focus{clip-path:none;width:auto;height:auto;overflow:visible}.shell{display:grid;grid-template-columns:204px minmax(0,1fr);min-height:100vh}.sidebar{background:var(--sidebar);border-right:1px solid var(--line);padding:26px 16px;display:flex;flex-direction:column;gap:30px}.brand{display:flex;gap:10px;align-items:center;font-size:16px;font-weight:600;letter-spacing:-.4px;padding:0 8px}.brand-mark{width:29px;height:29px;display:grid;place-items:center;border:1px solid var(--ink);border-radius:7px}.brand-mark svg{width:20px;height:20px}.sidebar nav{display:flex;flex-direction:column;gap:5px}.sidebar nav button{justify-content:flex-start;border:0;box-shadow:none;background:transparent;min-height:42px;padding:10px 12px;color:var(--muted)}.sidebar nav button[aria-current=page]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}.sidebar-note{margin-top:auto;display:flex;gap:8px;align-items:flex-start;padding:8px;font-size:12px;line-height:1.6;color:var(--muted)}.sidebar-note svg{width:16px;height:16px;flex:none;margin-top:3px}.app{min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:72px;padding:16px 30px;border-bottom:1px solid var(--line);background:var(--surface)}.project-name{border-color:transparent;background:transparent;font-weight:500;padding-left:0;width:220px}.topbar select{border-color:transparent;background:transparent}.save-state{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px}.save-state:before{content:"";height:5px;width:5px;border-radius:50%;background:currentColor}.workspace{padding:30px;max-width:1600px;margin:auto}.page-title{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:26px}.page-title p{margin-top:7px;color:var(--muted);font-size:13px}.eyebrow{text-transform:uppercase;letter-spacing:1.3px;font-size:10px;font-weight:600;color:var(--muted);margin-bottom:8px}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;flex-wrap:wrap}.segmented{display:inline-flex;border:1px solid var(--line);background:var(--sidebar);padding:3px;border-radius:8px;gap:2px}.segmented button{border:0;background:transparent;box-shadow:none;min-height:32px;color:var(--muted);padding:7px 13px;font-size:13px}.segmented button[aria-selected=true],.segmented button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px #1824391a}.work-grid{display:grid;grid-template-columns:minmax(480px,1.03fr) minmax(360px,1fr);gap:22px;align-items:start}.work-grid>.stack{min-width:0}.panel{background:var(--surface);border:1px solid var(--line);border-radius:9px;box-shadow:var(--shadow);min-width:0;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 18px;border-bottom:1px solid var(--line)}.panel-head .muted{font-size:12px}.panel-body{padding:18px}.table-wrap{position:relative;overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px;text-align:left}th{font-size:11px;font-weight:500;color:var(--muted);background:var(--bg);text-align:left;padding:10px 9px;border-bottom:1px solid var(--line);white-space:nowrap}td{padding:5px 6px;border-bottom:1px solid var(--line);vertical-align:middle}tbody tr:last-child td{border:0}td input,td select{width:100%;min-height:34px;font-size:12px;border-color:transparent;padding:6px}td input:hover,td input:focus,td select:hover{border-color:var(--line)}td .dim{min-width:66px;width:82px;text-align:right;font-variant-numeric:tabular-nums}td .qty{min-width:44px;width:50px;text-align:right}td .id{min-width:63px;width:72px}td .material{min-width:92px;width:120px}td .name{min-width:110px}td .price{min-width:64px;width:76px;text-align:right}td .quiet{width:28px;min-height:32px;padding:4px}.panel-foot{padding:12px 16px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}.panel-foot button{font-size:12px;min-height:32px}.rules-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.rules-grid input{width:100%}.subline{padding:12px 18px;font-size:11px;color:var(--muted);line-height:1.6;background:var(--bg);border-top:1px solid var(--line)}.status{font-size:12px;display:flex;gap:7px;align-items:center}.status svg{width:15px;height:15px}.status.good{color:var(--success)}.status.bad{color:var(--danger)}.notice{padding:12px 14px;border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:6px;background:var(--surface);font-size:12px;line-height:1.6;margin-bottom:14px}.notice.error{border-left-color:var(--danger);color:var(--danger)}.notice button{margin-top:8px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);padding:18px;border-bottom:1px solid var(--line);gap:12px}.metric dt{font-size:11px;color:var(--muted);margin-bottom:6px}.metric dd{margin:0;font-size:22px;letter-spacing:-.5px;font-variant-numeric:tabular-nums}.metric dd small{font-size:12px;letter-spacing:0;color:var(--muted);margin-left:4px}.metric{margin:0}.plot{min-height:260px;padding:24px 18px;background:var(--bg);overflow:hidden}.empty{min-height:270px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:12px;padding:35px;color:var(--muted)}.empty svg{width:34px;height:34px;stroke-width:1}.empty strong{font-size:14px;color:var(--ink);font-weight:500}.empty p{font-size:12px;max-width:260px}.bar-label{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:var(--muted);margin-bottom:8px}.bar-diagram{display:flex;height:45px;border:1px solid #9fa9b9;background:repeating-linear-gradient(135deg,#e2e6ec 0 2px,#f7f8fa 2px 7px);margin-bottom:18px}.bar-piece{position:relative;background:#dce5f8;border-right:1px solid #819bc4;color:#23416d;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:500;overflow:hidden;min-width:0;padding:0;border-radius:0;box-shadow:none;height:43px;min-height:0}.bar-piece[aria-pressed=true]{background:#b2c8f1;outline:2px solid #2857c7;outline-offset:-2px}.bar-kerf{background:#75869f;min-width:1px}.legend{display:flex;gap:16px;align-items:center;flex-wrap:wrap;font-size:10px;color:var(--muted);margin:2px 0 17px}.legend span:before{content:"";display:inline-block;width:8px;height:8px;background:#c5d6f3;border:1px solid #849bbc;margin-right:5px}.legend span:last-child:before{background:#e7eaf0}.detail-list{max-height:260px;overflow:auto;padding:0 18px}.detail-row{display:flex;align-items:center;justify-content:space-between;font-size:12px;border-bottom:1px solid var(--line);padding:10px 0;gap:10px}.export-row{display:flex;padding:16px 18px;border-top:1px solid var(--line);gap:8px;flex-wrap:wrap}.export-row button{font-size:12px}.mobile-tabs{display:none}.project-list{display:flex;flex-direction:column;gap:10px;max-width:950px}.project-card{display:flex;align-items:center;justify-content:space-between;padding:20px;background:var(--surface);border:1px solid var(--line);border-radius:8px;gap:16px}.project-card p{font-size:12px;color:var(--muted);margin-top:5px}.guide{max-width:760px}.guide h2{margin:25px 0 12px}.guide p{margin:10px 0}.guide ul{padding-left:22px;line-height:1.8}.footer-note{font-size:11px;color:var(--muted);padding:18px 2px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.error-list{max-height:180px;overflow:auto;margin:8px 0;padding:0;list-style:none}.error-list li{padding:4px 0}.error-list button{min-height:30px;text-align:left;white-space:normal;font-size:12px;justify-content:flex-start;color:var(--danger)}dialog{color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:0;width:min(720px,calc(100% - 32px));max-height:88vh;box-shadow:0 20px 100px #0003}dialog::backdrop{background:#111b3680}dialog header,dialog footer{padding:18px 22px;display:flex;justify-content:space-between;align-items:center;gap:12px}dialog header{border-bottom:1px solid var(--line)}dialog footer{border-top:1px solid var(--line)}dialog .dialog-content{padding:20px 22px;overflow:auto;max-height:65vh}dialog textarea{width:100%;min-height:140px;font-family:ui-monospace,monospace;font-size:12px;line-height:1.6}dialog .mapping{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:15px 0}.check-label{flex-direction:row;align-items:center}.sheet-canvas{height:350px;overflow:hidden;touch-action:none;position:relative}.sheet-canvas svg{width:100%;height:100%}.sheet-controls{display:flex;gap:6px;align-items:center}.sheet-controls button{min-height:30px;padding:5px 8px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.import-target{border:1px dashed var(--line);padding:16px;border-radius:7px}.candidate-select{max-width:190px;font-size:12px;min-height:32px}.toolbar .quiet{font-size:12px}.group-badge{display:inline-block;border:1px solid var(--line);border-radius:4px;padding:2px 5px;font-size:10px;color:var(--muted)}@media(min-width:1700px){.work-grid{grid-template-columns:minmax(560px,1.1fr) minmax(400px,1fr)}}@media(max-width:1200px){.shell{grid-template-columns:170px minmax(0,1fr)}.sidebar{padding:24px 10px}.workspace{padding:24px}.topbar{padding:14px 24px}.work-grid{grid-template-columns:minmax(0,1fr)}.rules-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.project-name{width:180px}.plot{min-height:180px}}@media(max-width:760px){.shell{display:block}.sidebar{padding:12px 16px;border-right:0;border-bottom:1px solid var(--line);gap:12px}.sidebar .brand{padding:0}.sidebar nav{flex-direction:row;gap:3px;overflow:auto}.sidebar nav button{font-size:12px;min-height:38px;padding:8px 10px}.sidebar-note{display:none}.topbar{padding:12px 16px;min-height:65px;flex-wrap:wrap}.project-name{width:170px;font-size:13px}.topbar .row{gap:5px}.topbar select{max-width:92px;font-size:12px;padding:5px}.save-state{font-size:10px}.workspace{padding:22px 16px}.page-title{margin-bottom:20px}.page-title h1{font-size:24px}.page-title .row{gap:5px}.page-title .row button{font-size:12px;padding:7px 10px}.work-grid{display:block}.work-grid>.stack,.work-grid>.results{margin-bottom:18px}.rules-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar{gap:10px}.segmented button{font-size:12px;padding:7px 10px}.panel-head{padding:14px}.panel-head h2{font-size:14px}.panel-body{padding:14px}.mobile-tabs{display:flex;margin:0 0 16px;width:100%}.mobile-tabs button{flex:1}.mobile-hidden{display:none!important}.mobile-table table,.mobile-table tbody{display:block}.mobile-table thead{display:none}.mobile-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:13px;border-bottom:1px solid var(--line)}.mobile-table tbody td{display:flex;flex-direction:column;padding:0;border:0}.mobile-table td:before{content:attr(data-label);font-size:10px;color:var(--muted);margin:0 0 5px 2px}.mobile-table td input,.mobile-table td select{width:100%;min-width:0;border-color:var(--line);height:38px}.mobile-table td:last-child{align-self:end;align-items:flex-end}.mobile-table td .quiet{width:38px}.metrics{padding:14px;gap:8px}.metric dd{font-size:20px}.metric dt{font-size:10px}.export-row{padding:14px;gap:7px}.export-row button{font-size:11px;padding:7px 10px;min-height:38px}.panel-foot{padding:10px 13px}.project-card{padding:16px;flex-wrap:wrap}.project-card .row{flex-wrap:wrap}.plot{padding:18px 14px}.candidate-select{max-width:150px}dialog .dialog-content{padding:16px}dialog header,dialog footer{padding:16px}dialog .mapping{grid-template-columns:1fr}.notice{font-size:12px}.footer-note{font-size:10px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}@font-face{font-family:Noto Sans CJK SC;src:url(/fonts/studio-cjk-ui.woff) format("woff");font-display:swap;unicode-range:U+2E80-9FFF,U+F900-FAFF,U+FF00-FFEF,U+20000-2FA1F}@media(min-width:761px){td .id{min-width:50px;width:58px}td .material{min-width:75px;width:90px}td .name{min-width:72px;width:90px}td .dim{min-width:56px;width:68px}td .qty{min-width:32px;width:40px}td .price{min-width:45px;width:58px}td:last-child .row{flex-wrap:nowrap}td:last-child{width:58px}}:root{--plot-trim: #c8cdd6;--plot-offcut: #f3f4f6;--plot-piece: #dce6f7;--cut-line: #a84c00}:root[data-theme=dark]{--plot-trim: #454d5e;--plot-offcut: #232a36;--plot-piece: #293d60;--cut-line: #ffbb77}.sheet-tools{display:flex;align-items:center;gap:2px;flex-wrap:wrap;margin-bottom:12px}.sheet-tools button{min-width:36px;min-height:36px;padding:6px}.sheet-canvas{width:100%;height:310px;background:var(--bg);border:1px solid var(--line);touch-action:none;display:block}.sheet-canvas g[role=button]{cursor:pointer;outline:none}.sheet-canvas g[role=button]:focus rect{stroke:var(--ink);stroke-width:3}.sheet-details{padding:10px 0;max-height:320px;overflow:auto}.cut-steps{padding-left:20px;max-height:320px;overflow:auto}.cut-steps li{padding:4px 0}.cut-steps li span{display:block;margin-left:12px}.material-summary{font-size:12px;margin:16px 0;gap:6px;overflow-wrap:anywhere}@media(max-width:760px){.sheet-canvas{height:270px}.sheet-details .detail-row{grid-template-columns:auto 1fr}.sheet-details .number{grid-column:2}}
