:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--bg:#f6f7f9;--surface:#fff;--border:#e3e5ea;--text:#16171a;--text-muted:#666b76;--primary:#2563eb;--primary-hover:#1d4ed8;--primary-contrast:#fff;--danger:#dc2626;--danger-bg:#fef2f2;--shadow:0 1px 2px #1018280f;font-family:system-ui,sans-serif}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--bg:#16171b;--surface:#1e2024;--border:#303338;--text:#f1f2f4;--text-muted:#9a9fa8;--primary:#3b82f6;--primary-hover:#60a5fa;--primary-contrast:#0b1220;--danger:#f87171;--danger-bg:#2a1616;--shadow:0 1px 2px #0006}}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);margin:0}h1{margin:0 0 1.25rem;font-size:1.375rem}h2{color:var(--text-muted);margin:0 0 1rem;font-size:1rem}a{color:var(--primary)}.topnav{border-bottom:1px solid var(--border);background:var(--surface);justify-content:space-between;align-items:center;padding:.875rem 1.5rem;display:flex}.topnav a{color:var(--text);font-weight:600;text-decoration:none}.nav-links{align-items:center;gap:1.25rem;font-size:.9rem;display:flex}.nav-links a{color:var(--text-muted);font-weight:500}.nav-links a:hover{color:var(--text)}main{padding:1.5rem 2rem}.page-narrow{max-width:900px;margin:0 auto}form{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:10px;max-width:380px;padding:1.5rem}.projects-page form,.tools-page form{margin-bottom:2rem}.origin-picker{flex-direction:column;align-items:flex-start;gap:.4rem;display:flex}.origin-picker-plate{background:var(--bg);border:1px solid var(--border);border-radius:4px;width:100%;max-width:160px;position:relative}.origin-dot{border:2px solid var(--border);background:var(--surface);cursor:pointer;border-radius:50%;width:16px;height:16px;padding:0;position:absolute;transform:translate(-50%,-50%)}.origin-dot:hover{border-color:var(--primary)}.origin-dot.active{border-color:var(--primary);background:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent)}.origin-picker-label{color:var(--text-muted);font-size:.8rem;font-weight:400}form label{color:var(--text-muted);flex-direction:column;gap:.35rem;margin-bottom:1rem;font-size:.875rem;font-weight:500;display:flex}input,select{font:inherit;border:1px solid var(--border);background:var(--bg);color:var(--text);border-radius:6px;padding:.5rem .65rem}input:focus,select:focus{outline:2px solid var(--primary);outline-offset:-1px}button{font:inherit;background:var(--primary);color:var(--primary-contrast);cursor:pointer;border:none;border-radius:6px;padding:.55rem 1.1rem;font-weight:600}button:hover{background:var(--primary-hover)}button:disabled{opacity:.6;cursor:not-allowed}.tool-table button,.project-list button{color:var(--danger);background:0 0;padding:.3rem .6rem;font-weight:500}.tool-table button:hover,.project-list button:hover{background:var(--danger-bg)}.error{color:var(--danger);margin:-.25rem 0 1rem;font-size:.875rem}table{border-collapse:collapse;background:var(--surface);border:1px solid var(--border);width:100%;box-shadow:var(--shadow);border-radius:10px;overflow:hidden}th,td{text-align:left;border-bottom:1px solid var(--border);padding:.65rem .9rem}th{text-transform:uppercase;letter-spacing:.03em;color:var(--text-muted);font-size:.8rem}tr:last-child td{border-bottom:none}.projects-page-header{justify-content:space-between;align-items:center;margin-bottom:1.25rem;display:flex}.projects-page-header h1{margin:0}.new-project-link{background:var(--primary);color:var(--primary-contrast);border-radius:6px;padding:.55rem 1.1rem;font-weight:600;text-decoration:none;display:inline-block}.new-project-link:hover{background:var(--primary-hover)}.project-list{flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none;display:flex}.project-list li{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:8px;justify-content:space-between;align-items:center;padding:.9rem 1.1rem;display:flex}.project-list a{font-weight:600;text-decoration:none}.project-list a:hover{text-decoration:underline}.auth-page{flex-direction:column;align-items:center;padding-top:3rem;display:flex}.auth-page p{color:var(--text-muted);font-size:.9rem}.muted{color:var(--text-muted);font-size:.875rem}.project-detail-header{align-items:baseline;gap:1rem;margin-bottom:1rem;display:flex}.project-detail-header h1{margin:0}.project-detail-meta{color:var(--text-muted);font-size:.875rem}.project-detail-layout{grid-template-columns:300px 1fr;gap:1.25rem;height:calc(100vh - 170px);min-height:420px;display:grid}.project-detail-sidebar{flex-direction:column;gap:1.25rem;min-height:0;display:flex;overflow-y:auto}.upload-form,.tool-form{max-width:none}.part-properties{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:10px;padding:1.25rem 1.5rem}.part-properties h2{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.part-properties label{color:var(--text-muted);flex-direction:column;gap:.35rem;margin-bottom:.85rem;font-size:.875rem;font-weight:500;display:flex}.part-properties label:last-child{margin-bottom:0}.part-properties .gcode-preview+button,.part-properties button{margin-bottom:.6rem}.checkbox-label{align-items:center;flex-direction:row!important;gap:.5rem!important}.checkbox-label input{width:auto}.gcode-preview{background:var(--bg);border:1px solid var(--border);white-space:pre-wrap;word-break:break-all;border-radius:6px;max-height:260px;padding:.75rem;font-size:.75rem;overflow:auto}.sidebar-tabs{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:10px;gap:.25rem;padding:.25rem;display:flex}.sidebar-tabs button{color:var(--text-muted);background:0 0;border-radius:7px;flex:1;padding:.5rem;font-weight:500}.sidebar-tabs button.active{background:var(--primary);color:var(--primary-contrast)}.sidebar-tabs button:hover:not(.active){background:var(--bg)}.project-switcher{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:10px;padding:1rem 1.25rem}.project-switcher ul{flex-direction:column;gap:.15rem;margin:0;padding:0;list-style:none;display:flex}.project-switcher li a{color:var(--text);text-overflow:ellipsis;white-space:nowrap;border-radius:6px;padding:.4rem .5rem;font-weight:500;text-decoration:none;display:block;overflow:hidden}.project-switcher li a:hover{background:var(--bg)}.project-switcher li.active a{background:var(--primary);color:var(--primary-contrast)}.project-switcher-manage{color:var(--text-muted);margin-top:.4rem;font-size:.8rem;text-decoration:none;display:block}.project-switcher-manage:first-of-type{border-top:1px solid var(--border);margin-top:.5rem;padding-top:.5rem}.project-switcher-manage:hover{color:var(--text)}.file-list{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:10px;min-height:0;padding:1rem 1.25rem}.file-list ul{flex-direction:column;gap:.25rem;margin:0;padding:0;list-style:none;display:flex}.file-list li{align-items:center;gap:.25rem;display:flex}.file-list-item{text-align:left;color:var(--text);text-overflow:ellipsis;white-space:nowrap;background:0 0;border-radius:6px;flex:1;padding:.4rem .5rem;font-weight:500;overflow:hidden}.file-list-item:hover{background:var(--bg)}.file-list li.active .file-list-item{background:var(--primary);color:var(--primary-contrast)}.delete-btn{color:var(--text-muted);background:0 0;padding:.3rem .5rem;font-weight:400}.delete-btn:hover{background:var(--danger-bg);color:var(--danger)}.project-detail-preview{flex-direction:column;gap:.75rem;min-height:0;display:flex}.geometry-canvas{background:var(--surface);border:1px solid var(--border);min-height:0;box-shadow:var(--shadow);border-radius:10px;flex:1;position:relative;overflow:hidden}.geometry-canvas canvas{touch-action:none;width:100%;height:100%;display:block}.canvas-reset-view{background:var(--surface);color:var(--text);border:1px solid var(--border);box-shadow:var(--shadow);padding:.35rem .7rem;font-size:.8rem;font-weight:500;position:absolute;top:.75rem;right:.75rem}.canvas-reset-view:hover{background:var(--bg)}.geometry-stats{color:var(--text-muted);gap:1.5rem;font-size:.875rem;display:flex}
