*{box-sizing:border-box}body{margin:0;font-family:Segoe UI,Roboto,Arial,sans-serif;color:#111;background:#f6f7fb}header{padding:12px 20px;background:#1f2937;color:#fff}h1{margin:0;font-size:20px}.subtitle{margin:4px 0 0;color:#cbd5e1}main{display:flex;gap:16px;padding:12px}section.controls{width:360px;display:flex;flex-direction:column;gap:12px}section.controls .group{background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:10px}section.controls h2{margin:0 0 8px;font-size:14px;color:#334155}label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:6px 0}input[type=number]{width:120px;padding:4px 6px;border:1px solid #cbd5e1;border-radius:6px}input[type=range]{flex:1}#strokeVal,#scaleVal,#offsetYVal{display:inline-block;width:48px;text-align:right;color:#334155}.buttons{display:flex;gap:8px;margin-top:6px}.buttons button{flex:1;padding:6px 8px;border:1px solid #334155;background:#334155;color:#fff;border-radius:6px;cursor:pointer}.buttons button:hover{background:#1f2937}.canvasWrap{flex:1;position:relative;background:#fff;border:1px solid #e5e7eb;border-radius:8px;padding:8px}canvas#view{width:100%;height:100%;display:block;background:linear-gradient(180deg,#ffffff 0,#fbfdff 100%);border-radius:6px}.legend{position:absolute;top:12px;right:16px;background:#ffffffd9;border:1px solid #e5e7eb;border-radius:6px;padding:6px 8px;display:flex;gap:10px}.legend-item{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#334155}.legend-item::before{content:"";display:inline-block;width:12px;height:12px;border-radius:2px}.legend-item.sheet::before{background:#2563eb}.legend-item.punch::before{background:#16a34a}.legend-item.die::before{background:#6b7280}.legend-item.collision::before{background:#dc2626}.readout{position:absolute;bottom:10px;left:16px;background:#ffffffd9;border:1px solid #e5e7eb;border-radius:6px;padding:6px 8px;font-size:12px;color:#1f2937;min-width:280px}
select{padding:4px 6px;border:1px solid #cbd5e1;border-radius:6px;background:#fff}
input[type=file]{border:1px solid #e5e7eb;background:#f8fafc;border-radius:6px;padding:4px}
.dxf-controls{margin-top:6px;padding-top:6px;border-top:1px dashed #e5e7eb}
