:root{--bg: #f4f4f2;--panel: #ffffff;--ink: #1d1f22;--muted: #6b7078;--line: #dfe1e4;--accent: #e8590c;--accent-ink: #ffffff;--field: #f7f7f8;--view: #fbfbfa;--cut: #d6336c;--material: #cfd4da;--bridge: #e8590c;--loose: #e03131;color-scheme:light}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--bg: #121314;--panel: #1b1c1e;--ink: #e8e9eb;--muted: #9399a1;--line: #2c2e31;--field: #232427;--view: #161718;--cut: #ff6b9a;--material: #3b4047;--bridge: #ff8c42;--loose: #ff6b6b;color-scheme:dark}}*{box-sizing:border-box}html,body{margin:0;height:100%}body{background:var(--bg);color:var(--ink);font:13px/1.4 system-ui,-apple-system,Segoe UI,sans-serif;display:flex;flex-direction:column}header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 14px;padding:10px 16px;border-bottom:1px solid var(--line);background:var(--panel)}.brand{font-weight:700;font-size:16px;display:flex;align-items:center;gap:8px;flex:1}.brand small{font-weight:400;color:var(--muted);font-size:12px}.brand small a{color:inherit;font-weight:600;text-decoration:none}.brand small a:hover{text-decoration:underline}header .back{color:var(--muted);font-weight:600;text-decoration:none;white-space:nowrap;padding-right:14px;border-right:1px solid var(--line)}header .back:hover{color:var(--accent)}.laser{font-size:11px;font-weight:600;color:var(--accent);border:1px solid currentColor;border-radius:999px;padding:1px 8px;white-space:nowrap}.mark{width:14px;height:14px;background:var(--accent);clip-path:polygon(0 100%,50% 0,100% 100%,50% 70%)}.actions{display:flex;gap:8px}button{font:inherit;border:1px solid var(--accent);background:var(--accent);color:var(--accent-ink);padding:6px 12px;border-radius:6px;cursor:pointer;font-weight:600}button.ghost{background:transparent;color:var(--ink);border-color:var(--line);font-weight:500}main{flex:1;display:flex;min-height:0}aside{width:300px;flex-shrink:0;overflow-y:auto;background:var(--panel);border-right:1px solid var(--line);padding:4px 14px 20px}section{border-bottom:1px solid var(--line);padding:10px 0 12px}section:last-child{border-bottom:0}h3{margin:8px 0;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}label{display:flex;flex-direction:column;gap:3px;margin-bottom:8px;color:var(--muted);font-size:12px}label.inline{flex-direction:row;align-items:center;gap:6px;color:var(--ink)}input[type=number],input[type=text],select{font:inherit;color:var(--ink);background:var(--field);border:1px solid var(--line);border-radius:5px;padding:5px 7px;width:100%}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}.seg{display:flex;border:1px solid var(--line);border-radius:6px;overflow:hidden;margin-bottom:10px}.seg button{flex:1;background:transparent;color:var(--muted);border:0;border-radius:0;font-weight:500;padding:6px 4px}.seg button.on{background:var(--ink);color:var(--panel)}.drop{border:1.5px dashed var(--line);border-radius:8px;padding:16px 10px;text-align:center;cursor:pointer;color:var(--muted)}.drop.over{border-color:var(--accent)}.drop input{display:none}.hint{color:var(--muted);font-size:12px;margin:4px 0 0}[hidden]{display:none!important}.view{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--view)}.view-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--panel);font-weight:600;min-height:40px}#flat{flex:1;min-height:0;position:relative;overflow:hidden;cursor:grab}#flat svg{width:100%;height:100%;display:block}#flat .material{fill:var(--material);fill-rule:evenodd}#flat .bridge{fill:var(--bridge)}#flat .loose{fill:var(--loose);fill-rule:evenodd}#flat .cutline{fill:none;stroke:var(--cut);stroke-width:1px;vector-effect:non-scaling-stroke}.legend{display:flex;align-items:center;gap:5px;font-weight:400;color:var(--muted);font-size:12px;flex-wrap:wrap}.legend i{width:12px;height:12px;border-radius:2px;display:inline-block;margin-left:6px}.legend i.material{background:var(--material)}.legend i.bridge{background:var(--bridge)}.legend i.loose{background:var(--loose)}.legend i.cutline{height:0;width:14px;border-top:2px solid var(--cut);border-radius:0}#stats{border-top:1px solid var(--line);background:var(--panel);padding:8px 12px;display:flex;flex-wrap:wrap;gap:4px 16px;font-size:12px;color:var(--muted)}#stats b{color:var(--ink);font-weight:600}#stats .warn{color:var(--accent);width:100%}#stats .good{color:#2b8a3e}@media(max-width:900px){html,body{height:auto}main{flex-direction:column}aside{width:100%;overflow:visible;border-right:0;border-bottom:1px solid var(--line)}.view{min-height:70vh}header small{display:none}header .back{border-right:0;padding-right:0}}
