.toolbar{display:flex;flex-direction:column;align-items:flex-start;max-width:calc(100% - 16px)}
.toolbar-row{display:flex;align-items:center;gap:4px;flex-wrap:wrap;max-width:100%}.toolbar-row button{white-space:nowrap}
.toolbar-row #machineSelector{max-width:130px}.toolbar-row #sheetSelect{max-width:min(360px,calc(100vw - 180px))}
.gauge-choice{position:relative}.gauge-choice .gauge-help{display:none!important;position:absolute;top:100%;left:0;z-index:25;white-space:normal;width:220px;padding:8px;border-radius:5px;background:#102b40;color:white;box-shadow:0 3px 12px #0003;font-size:11px;font-weight:400}
.gauge-choice:hover .gauge-help,.gauge-choice:focus-within .gauge-help{display:block!important}
.snapshot-dialog{width:min(940px,calc(100vw - 20px));max-height:calc(100dvh - 20px);border:1px solid #bdcbd7;border-radius:10px;padding:12px;background:white;color:#102b40;overflow:auto}
.snapshot-dialog::backdrop{background:#0e1a2baa}.snapshot-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}.snapshot-title h2{font-size:17px;margin:0}.snapshot-dialog p{font-size:12px;margin:6px 0}
.snapshot-controls,.snapshot-actions{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.snapshot-dialog button{padding:6px 10px;font-size:12px;min-height:34px}.snapshot-controls button[aria-pressed="true"]{background:#1465bf;color:white}
.snapshot-stage{display:flex;justify-content:center;background:#eef3f7;overflow:hidden}.snapshot-stage canvas{display:block;max-width:100%;max-height:58dvh;width:auto;height:auto;touch-action:none;cursor:crosshair}
.snapshot-status{min-height:18px;color:#315570}.snapshot-attachments{border:1px solid #dce4eb;border-radius:6px;margin:8px 0;padding:6px;background:#f7fafd;max-height:170px;overflow:auto;font-size:11px}.snapshot-attachments:empty{display:none}
.snapshot-item{display:flex;align-items:center;gap:8px;padding:4px 0}.snapshot-item img{width:56px;height:42px;object-fit:contain;border:1px solid #dce4eb;background:white}.snapshot-item span{flex:1;min-width:0}.snapshot-item button{font-size:11px;padding:3px 6px}
.snapshot-fallback{width:100%;font-size:12px;padding:6px}.part-options{display:flex;gap:5px;flex-wrap:wrap;margin:7px 0}.part-options button{font-size:11px;padding:5px 7px}
@media(max-width:650px){
 .toolbar-row #sheetSelect{max-width:calc(100vw - 155px);font-size:10px}.toolbar-row #machineSelector{max-width:116px;font-size:11px}
 .toolbar-row #zoomIn,.toolbar-row #zoomOut{display:inline-block;min-width:30px}.toolbar-row button{min-height:30px;font-size:11px;padding:4px 7px}
 .snapshot-dialog{padding:9px}.snapshot-dialog button{min-height:40px}.snapshot-stage canvas{max-height:52dvh}.snapshot-actions button{flex:1;min-width:90px}
 .gauge-help{width:180px}.gauge-choice:last-child .gauge-help{left:auto;right:0}
 .snapshot-attachments{max-height:120px}
}

/* Compact part cards: one row of expandable references and notes. */
.detail.has-part{display:flex;flex-direction:column;overflow:hidden}
.detail .detail-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.detail .detail-heading{padding-right:30px}
.detail #closeDetail{position:absolute;right:6px;top:5px;z-index:3;background:white}
.detail #partReferences{border:0;margin:2px 0 5px;padding:0}
.detail #partReferences h3{margin:0;font-size:10px;letter-spacing:0;text-transform:none}
.detail-dropdowns{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.detail .detail-dropdowns button{display:flex;justify-content:space-between;align-items:center;gap:5px;min-height:28px;padding:4px 7px;font-size:11px}
.detail-dropdowns button[aria-expanded="true"]{background:#e9f3fc;border-color:#8fb4d9}
.detail-dropdowns button[aria-expanded="true"] span{transform:rotate(180deg)}
.detail .detail-dropdown-panel[hidden]{display:none}
.detail-dropdown-panel{border-top:1px solid var(--line);margin-top:5px;padding-top:5px}
.detail-dropdown-panel p{margin:2px 0;font-size:11px;line-height:1.4}
body .detail .detail-dropdown-panel .location-row{max-height:none;overflow:visible;margin:0;gap:4px}
