:root{--ink:#33271f;--secondary:#756e66;--muted:#a49a8e;--line:#e8e2d9;--brown:#663d28;--cream:#f8f5ef;--warm:#eee4d6;--gold:#bf8857;--shadow:0 2px 9px #261b1307;--font:Inter,"Segoe UI",Arial,sans-serif}*{box-sizing:border-box}html,body{margin:0;min-height:100%;color:var(--ink);background:#f7f6f2;font-family:var(--font);font-size:13px}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--gold);outline-offset:2px}button{transition:background .15s,border-color .15s,transform .13s}button:hover:not(:disabled){transform:translateY(-1px)}.topbar{height:75px;background:#fff;display:flex;align-items:center;padding:0 26px;border-bottom:1px solid var(--line);gap:28px;box-shadow:var(--shadow);position:relative;z-index:4}.brand{display:flex;align-items:center;gap:11px;min-width:287px}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#543520;color:#eec69a;font-size:36px;font-weight:400;line-height:1}.brand-label{display:flex;flex-direction:column;gap:2px}.brand-label strong{font-size:18px;letter-spacing:-.6px}.brand-label strong span{font-weight:400;color:#6f533e}.brand-label small{color:#ad835e;font-size:9px;letter-spacing:2.1px;font-weight:700}.beta{font-size:9px;color:#926d49;background:#f6eadc;padding:5px 7px;border-radius:4px;letter-spacing:.6px;font-weight:700}.project-title{flex:1;display:flex;align-items:center;gap:9px;min-width:0;max-width:390px}.file-icon{color:#987658;font-size:21px}.project-title input{border:0;background:transparent;font-weight:600;min-width:0;width:100%;color:#6d6256;font-size:12px}.project-title input:focus{outline:0;border-bottom:1px solid #ad8a6a}.autosave-dot{background:#6ba383;width:6px;height:6px;border-radius:50%;flex-shrink:0}.autosave-label{color:#93877a;font-size:11px;white-space:nowrap}.top-actions{margin-left:auto;display:flex;align-items:center;gap:8px}.btn{border:1px solid transparent;border-radius:7px;padding:10px 14px;font-weight:650;white-space:nowrap}.btn.ghost{background:transparent;color:#66594f}.btn.ghost:hover{background:#f8f2e9}.btn.light{background:#f5f0e9;border-color:#e5dacd;color:#6d4830}.btn.primary{background:var(--brown);color:white;box-shadow:0 2px 5px #4b2d1e24}.btn.primary:hover{background:#482a1b}.workspace-layout{display:grid;grid-template-columns:254px minmax(430px,1fr) 282px;min-height:calc(100vh - 75px)}.sidebar{background:#fff;min-height:calc(100vh - 75px);display:flex;flex-direction:column}.left-sidebar{border-right:1px solid var(--line)}.right-sidebar{border-left:1px solid var(--line);overflow:auto}.panel-head{display:flex;justify-content:space-between;align-items:center;padding:29px 23px 22px}.overline,.eyebrow{color:#ad8b70;font-size:9px;letter-spacing:1.75px;font-weight:800}.panel-head h2{font-size:19px;margin:6px 0 0;letter-spacing:-.5px}.panel-line{width:15px;height:2px;background:#caab8e}.section-heading{display:flex;justify-content:space-between;align-items:center;font-size:10px;font-weight:800;color:#87776a;letter-spacing:1.1px;margin-bottom:14px}.plus-muted{font-size:18px;font-weight:400;color:#a9927f}.side-section{border-top:1px solid #f0ece6;padding:22px 18px}.shapes-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.shape-button{border:1px solid #ece4d9;background:#fff;padding:13px 8px 11px;min-height:89px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:11px;color:#685447;font-size:11px}.shape-button:hover{background:#faf4eb;border-color:#d2bba6}.shape-art{height:27px;width:40px;display:block;border:2px solid #986b50;position:relative}.rect-art{border-radius:2px}.round-art{border-radius:10px}.circle-art{border-radius:50%;width:29px;height:29px}.hexa-art{width:38px;height:28px;background:#986b50;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%)}.hexa-art:before{content:"";position:absolute;inset:2px;background:white;clip-path:inherit}.draw-button{margin-top:11px;display:flex;align-items:center;gap:10px;padding:12px;width:100%;border:1px dashed #d9bda3;border-radius:8px;color:#76452d;background:#fcf8f2;font-size:11px;font-weight:600}.draw-button>span:first-child{font-size:17px}.faint{margin-left:auto;opacity:.45}.pieces-section{flex:1}.count-pill{font-weight:600;letter-spacing:0;color:#9a7c66;background:#f6f1ea;border-radius:10px;padding:2px 7px}.piece-list{display:flex;flex-direction:column;gap:6px}.piece-item{width:100%;text-align:left;border:1px solid transparent;background:transparent;border-radius:8px;padding:11px 9px;display:flex;align-items:center;gap:9px;color:#65584e}.piece-item:hover{background:#faf7f2}.piece-item.active{background:#f6ece0;border-color:#e6cdb6;color:#613a24}.piece-mini{width:34px;height:33px;display:grid;place-items:center;background:#f3f0eb;border-radius:7px;color:#a17e67;font-size:17px;flex-shrink:0}.piece-item.active .piece-mini{background:#eaddcf;color:#764d36}.piece-copy{flex:1;min-width:0}.piece-copy strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.piece-copy small{display:block;color:#97887a;margin-top:3px;font-size:10px}.piece-check{color:#aa805d}.text-action{border:0;background:transparent;color:#88613f;font-size:11px;margin-top:13px;padding:5px}.sidebar-bottom{display:flex;align-items:flex-start;gap:10px;margin:24px 17px 18px;border-radius:9px;padding:13px 12px;background:#f8f3ec;color:#8a7968;font-size:10px;line-height:1.7}.sidebar-bottom p{margin:0}.help-badge{border:1px solid #b89d81;border-radius:50%;width:16px;height:16px;display:grid;place-items:center;font-family:Georgia,serif;flex-shrink:0}.editor-main{padding:32px 30px 16px;min-width:0;display:flex;flex-direction:column;gap:19px}.editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.editor-heading h1{margin:7px 0 3px;font-size:25px;letter-spacing:-.9px;line-height:1.2}.editor-title-row{display:flex;gap:15px;align-items:center}.working-badge{background:#ebf4ed;color:#5f8d70;border:1px solid #dcecdf;border-radius:30px;padding:6px 9px;font-size:10px;white-space:nowrap}.working-dot{background:#60ab7b;border-radius:50%;width:6px;height:6px;display:inline-block;margin-right:5px}.editor-heading p{color:#94897b;margin:6px 0 0;font-size:12px}.zoom-controls{display:flex;align-items:center;border:1px solid #e3dcd3;background:#fff;border-radius:7px;white-space:nowrap}.zoom-controls button{border:0;background:transparent;color:#756b60;padding:9px 12px;font-size:17px}.zoom-controls span{font-size:11px;font-weight:700;min-width:41px;text-align:center}.zoom-controls .fit-button{border-left:1px solid #e9e3db}.canvas-container{min-height:390px;flex:1;position:relative;background:#fff;border:1px solid #e6e0d8;border-radius:12px;overflow:hidden;box-shadow:0 3px 13px #4b34200a;display:flex;flex-direction:column}.canvas-tools{background:#fff;height:49px;flex-shrink:0;border-bottom:1px solid #eee9e1;display:flex;align-items:center;gap:13px;padding:0 17px;font-size:11px;color:#796b5d}.tool-tip{display:flex;align-items:center;gap:9px}.cursor-glyph{font-size:15px;color:#a57853}.divider-vertical{width:1px;height:18px;background:#e7e1da}.tool-unit{background:#f1e8df;border-radius:4px;padding:4px 8px;font-weight:800;font-size:10px;color:#906a4c}.mode-hint{margin-left:auto;color:#a79a8d;font-size:10px}#board{width:100%;flex:1;min-height:300px;display:block;touch-action:none;cursor:crosshair}#board.dragging{cursor:grabbing}#board.drawing{cursor:crosshair}#board .outline{stroke:#bd594a;stroke-width:.42;fill:#dc9b7430;stroke-linejoin:round;vector-effect:non-scaling-stroke}#board .outline.selected{fill:#bf8a5b29;stroke:#ab4d39;stroke-width:.7}#board .guide{stroke:#bc9868;stroke-width:.25;stroke-dasharray:1.5 1.6;fill:none;pointer-events:none;vector-effect:non-scaling-stroke}#board .hole{stroke:#477da6;stroke-width:.18;fill:#edf5ff;pointer-events:none;vector-effect:non-scaling-stroke}#board .piece-hit{fill:transparent;stroke:transparent;stroke-width:4;cursor:grab}#board .selection-outline{fill:none;stroke:#a87752;stroke-dasharray:3 2;stroke-width:.45;pointer-events:none;vector-effect:non-scaling-stroke}#board .handle{fill:#fff;stroke:#a87752;stroke-width:.45;pointer-events:none;vector-effect:non-scaling-stroke}.canvas-bottom{height:45px;flex-shrink:0;background:#fff;border-top:1px solid #eee9e1;display:flex;align-items:center;justify-content:space-between;padding:0 15px;color:#817870;font-size:10px;gap:15px}.legend{display:flex;flex-wrap:wrap;align-items:center;gap:19px}.legend span{display:flex;align-items:center;gap:7px;white-space:nowrap}.legend i{width:17px;border-top:2px solid #be594a}.legend .legend-holes{border-top:2px dotted #477da6}.legend .legend-seam{border-top:2px dashed #bc9868}.canvas-coordinates{font-variant-numeric:tabular-nums;white-space:nowrap}.polygon-actions{position:absolute;bottom:58px;left:50%;transform:translateX(-50%);background:#fff;border:1px solid #dfd5c6;box-shadow:0 8px 25px #271b1224;border-radius:10px;display:flex;align-items:center;gap:12px;padding:10px;z-index:2;white-space:nowrap;color:#6b5545;font-size:11px}.polygon-actions[hidden]{display:none}.polygon-actions .btn{padding:7px 10px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.metric{display:flex;align-items:center;gap:11px;border:1px solid #eae3da;border-radius:10px;background:#fff;padding:15px;box-shadow:0 2px 7px #35221305;min-width:0}.metric-icon{width:34px;height:34px;flex-shrink:0;display:grid;place-items:center;background:#f6ece1;color:#b08360;border-radius:8px;font-size:21px}.metric small{display:block;font-size:9px;letter-spacing:1px;color:#a29588;font-weight:700;white-space:nowrap}.metric strong{display:block;font-size:16px;margin-top:5px;letter-spacing:-.3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.editor-footer{display:flex;justify-content:space-between;gap:12px;color:#a19588;font-size:10px;line-height:1.5}.editor-footer>span:last-child{white-space:nowrap;letter-spacing:1px;font-size:9px}.right-head{padding:28px 22px 22px}.settings-icon{font-size:18px;color:#ae8d73}.inspector{padding:0 19px 20px;min-width:0}.inspector-empty{padding:25px;color:#8d8277}.form-label{display:block;font-size:10px;letter-spacing:.7px;color:#8b7c6d;font-weight:800;margin-bottom:9px}.field{border:1px solid #e5ddd3;border-radius:7px;background:#fff;color:#54483d;padding:11px 10px;outline:0}.field:focus,.input-mm:focus-within{border-color:#b88f70;box-shadow:0 0 0 2px #dec1a64a}.full-field{width:100%;min-width:0}.field-section-title{border-top:1px solid #eee8e0;margin:23px 0 15px;padding-top:18px;display:flex;align-items:center;justify-content:space-between;color:#907c69;font-size:10px;font-weight:800;letter-spacing:1px}.field-section-title>span:last-child{color:#ac9d8e}.two-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.number-label{font-size:11px;color:#7d7165;display:block;margin-bottom:12px;line-height:1.45}.number-label .input-mm{margin-top:7px}.input-mm{display:flex;align-items:center;gap:4px;border:1px solid #e8dfd6;border-radius:7px;background:#fff;padding:0 9px}.input-mm input{width:100%;min-width:0;padding:10px 0;border:0;outline:0;color:#433428;font-weight:650;font-size:12px;background:transparent}.input-mm input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.input-mm span{font-size:10px;color:#a69687;flex-shrink:0}.coordinates{margin-top:2px}.stitch-title{margin-top:13px}.stitch-symbol{font-size:21px!important;color:#b78a6d!important;font-weight:400}.toggle-line{display:flex;align-items:center;justify-content:space-between;gap:9px;font-size:11px;color:#6e6154;font-weight:600;margin-bottom:16px;cursor:pointer}.toggle-line input{position:absolute;opacity:0}.switch{height:19px;width:34px;border-radius:14px;background:#c9c0b5;position:relative;flex-shrink:0;transition:background .15s}.switch:after{content:"";position:absolute;top:3px;left:3px;width:13px;height:13px;background:#fff;border-radius:50%;transition:left .15s}.toggle-line input:checked+.switch{background:#8a583c}.toggle-line input:checked+.switch:after{left:18px}.toggle-line input:focus-visible+.switch{outline:2px solid #ac825e}.number-label select{margin-top:7px;font-size:11px;font-weight:500}.guide-toggle{margin-top:8px}.sides-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}.sides-grid label{font-size:11px;color:#75675b;white-space:nowrap}.sides-grid input{accent-color:#8a5637}.inspector-notice{display:flex;gap:8px;align-items:flex-start;background:#f9f3ea;color:#89755e;border-radius:8px;padding:11px;font-size:10px;line-height:1.5}.inspector-notice>span:first-child{font-size:14px}.remove-piece{border:0;background:transparent;color:#aa6b5c;font-size:11px;padding:13px 0}.export-section{border-top:1px solid var(--line);padding:20px 19px 27px;margin-top:auto;background:#fcfaf7}.export-section .field{margin-bottom:13px}.export-button{display:flex;align-items:center;text-align:left;gap:9px;width:100%;border:1px solid #e8dfd4;border-radius:8px;padding:10px;background:#fff;margin:7px 0}.export-button:hover{background:#fbf4ea;border-color:#d6bda2}.file-badge{display:grid;place-items:center;width:38px;height:39px;background:#eee4d9;color:#83522f;border-radius:6px;flex-shrink:0;font-size:10px;font-weight:800}.file-badge.dxf{color:#456d90;background:#e9f1f7}.file-badge.pdf{color:#ae5d50;background:#f9ece8}.export-button strong{display:block;font-size:11px;color:#685749}.export-button small{display:block;color:#aa9b8b;font-size:10px;margin-top:3px}.arrow-down{color:#a48b75;font-size:15px;margin-left:auto}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(12px);background:#3d2c20;color:#fff;border-radius:9px;padding:12px 18px;box-shadow:0 10px 35px #0003;opacity:0;pointer-events:none;transition:all .18s;z-index:20;font-size:12px;max-width:min(92vw,520px);line-height:1.5}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.toast.error{background:#993f35}@media(max-width:1270px){.workspace-layout{grid-template-columns:220px minmax(340px,1fr) 252px}.topbar{padding:0 16px;gap:10px}.brand{min-width:232px}.beta,.autosave-label,.project-title .file-icon{display:none}.sidebar .panel-head{padding-left:18px;padding-right:18px}.editor-main{padding:27px 18px 15px}.metrics{gap:7px}.metric{padding:11px;gap:7px}.metric-icon{width:28px;height:28px}}@media(max-width:970px){.workspace-layout{grid-template-columns:210px minmax(340px,1fr);}.right-sidebar{grid-column:1/-1;min-height:auto;display:block;border-top:1px solid var(--line);border-left:0}.right-sidebar .panel-head{padding:20px 22px}.inspector{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;align-items:start}.inspector .field-section-title,.inspector .inspector-notice,#stitch-fields,.inspector .remove-piece,.inspector #sides-container{grid-column:1/-1}.export-section{padding:18px 22px}.top-actions .btn span{display:none}.top-actions{gap:4px}.project-title{flex:1}}@media(max-width:680px){.topbar{height:auto;min-height:66px;flex-wrap:wrap;padding:11px 14px;gap:8px}.brand{min-width:auto;flex:1}.brand-label strong{font-size:16px}.project-title{order:3;flex-basis:100%;max-width:none;border-top:1px solid #f1eee8;padding-top:7px}.top-actions{margin:0}.top-actions .btn{font-size:12px;padding:7px 9px}.top-actions #new-project,.top-actions #open-project{display:none}.workspace-layout{display:flex;flex-direction:column}.left-sidebar,.right-sidebar{min-height:auto;border-right:0;border-left:0}.left-sidebar{order:2}.editor-main{order:1;padding:18px 12px}.right-sidebar{order:3}.left-sidebar .panel-head{padding:14px 20px}.left-sidebar .side-section{padding:13px 18px}.shapes-grid{grid-template-columns:repeat(4,1fr)}.shape-button{min-height:72px;font-size:10px;gap:8px}.left-sidebar .pieces-section{display:none}.left-sidebar .sidebar-bottom{display:none}.editor-head{align-items:flex-start}.editor-heading h1{font-size:20px}.editor-heading p{font-size:11px}.working-badge{display:none}.zoom-controls{margin-top:16px}.zoom-controls button{padding:6px}.canvas-container{min-height:350px}.canvas-tools{padding:0 10px}.mode-hint{display:none}.legend{gap:10px}.legend span{font-size:9px}.canvas-coordinates{display:none}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-footer>span:last-child{display:none}.right-sidebar .inspector{display:block}.polygon-actions{flex-wrap:wrap;justify-content:center;max-width:95%;white-space:normal}.polygon-actions span{width:100%;text-align:center}}
/* CueroLab Studio 2.0: geometría editable, selección de aristas y plantillas */
.template-picker{margin-top:15px;padding:12px;border:1px solid #e9ddcf;border-radius:10px;background:#fbf7f0}
.template-picker .form-label{display:block;margin-bottom:8px}
.template-add{width:100%;margin-top:9px;justify-content:center}
#edit-geometry[disabled]{opacity:.47;cursor:not-allowed}
#edit-geometry[aria-pressed="true"]{background:#ebd8bf;border-color:#9e704d;color:#654126}
#board.geometry-mode .piece-hit{cursor:default}
.edit-edge{fill:none;stroke:#a0aab0;stroke-width:2;opacity:.75;stroke-dasharray:2 1;cursor:pointer;vector-effect:non-scaling-stroke;pointer-events:stroke}
.edit-edge.enabled{stroke:#23846b;opacity:.95}
.edit-edge:hover,.edit-edge.focused{stroke:#dd7927;stroke-width:4;opacity:1}
.edit-edge-label{font-size:4px;fill:#68513c;font-weight:700;pointer-events:none;paint-order:stroke;stroke:#fff;stroke-width:2px}
.vertex-handle{fill:#fff;stroke:#985533;stroke-width:1;cursor:crosshair;vector-effect:non-scaling-stroke;pointer-events:all}
.vertex-handle:hover,.vertex-handle.active{fill:#eec28e;stroke:#7d4420;stroke-width:1.5}
.geometry-tools{padding:11px 10px;border:1px solid #ecdcca;border-radius:8px;margin:8px 0 18px;background:#fffaf4}
.geometry-tools strong{font-size:11px;color:#815537}
.geometry-tools p,.hint-small{color:#988676;font-size:10px;line-height:1.5;display:block;margin:6px 0 10px}
.geometry-buttons{display:flex;gap:6px;margin:8px 0 12px}
.geometry-buttons button{font-size:10px;border-radius:6px;border:1px solid #d7c4b0;background:#fff8f0;color:#71533b;cursor:pointer;flex:1;padding:7px 4px}
.geometry-buttons button:disabled{opacity:.45;cursor:not-allowed}
.segment-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0 14px}
.segment-list label{font-size:11px;color:#6e5b4d;display:flex;gap:5px;align-items:center}
.segment-list input{accent-color:#31836d}
/* Respeta el atributo HTML hidden aun si los estilos de formularios definen display. */
[hidden]{display:none!important}

/* CueroLab Studio 3.0 · tiradores Bézier y generador de simetría */
.bezier-handle-line{fill:none;stroke:#2964a3;stroke-width:.65;stroke-dasharray:1.4 .9;pointer-events:none;opacity:.8}
.bezier-handle{fill:#e5f4ff;stroke:#1d69ad;stroke-width:1.1;cursor:grab;pointer-events:all;vector-effect:non-scaling-stroke}
.bezier-handle:hover,.bezier-handle.active{fill:#67bbea;stroke:#164875;stroke-width:1.65}
#bezier-tools .two-cols{margin-top:10px}
#bezier-tools .number-label{font-size:10px}
#symmetry-tools .full-field{margin-top:7px}
#bezier-tools .geometry-buttons button,#symmetry-tools .geometry-buttons button{min-height:32px}
#stat-cut-length{font-size:14px}
