/* Shared command geometry for home, factory slips, and inspection. */
:is(.paper-command-bar,.workflow-slip-actions,.desk-toolbar,.document-tools){align-items:center!important;gap:6px!important}
:is(.paper-command-bar,.workflow-slip-actions,.desk-toolbar,.document-tools)>:is(button,.btn,.mini-btn),
:is(.paper-command-bar,.workflow-slip-actions,.desk-toolbar,.document-tools) .paper-more>summary{
 box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;
 min-height:32px!important;height:32px!important;margin:0!important;padding:5px 10px!important;font-size:12px!important;line-height:20px!important;white-space:nowrap;vertical-align:middle;
}
:is(.paper-command-bar,.workflow-slip-actions,.desk-toolbar,.document-tools)>.paper-more{margin:0!important;align-self:center!important}
.paper-more>summary{list-style:none!important;display:inline-flex!important;align-items:center!important;gap:5px}
.paper-more>summary::-webkit-details-marker{display:none!important}
.paper-more>summary::marker{content:''!important}
.paper-more>summary::before{content:'▸'!important;font-size:10px;line-height:1}
.paper-more[open]>summary::before{content:'▾'!important}
.slip-view-control{display:inline-flex!important;align-items:center!important;gap:5px;margin:0!important;font-size:12px!important;line-height:20px!important;white-space:nowrap}
.slip-view-control select,select[data-memo-size]{box-sizing:border-box;min-height:30px!important;height:30px!important;margin:0!important;padding:3px 22px 3px 5px!important;font-size:12px!important;line-height:20px!important;max-width:108px}
.document-tools [data-memo-size]:is(label){display:inline-flex;align-items:center;gap:4px;margin:0;font-size:12px;white-space:nowrap}
.workflow-slip-actions{justify-content:flex-start!important;padding:6px!important;min-height:44px!important}
.workflow-slip-actions>p{flex-basis:100%;margin:3px 0!important;line-height:1.4}
.paper-more-content{margin-top:0!important;max-height:min(65vh,620px);overflow:auto}
body.home-details-mode #home-bom-form .component-weight{white-space:nowrap!important}

/* Keep casting controls close to the paper and align checkbox labels in a row. */
#content:has(>#casting-board)>.module-head{min-height:36px!important;margin:2px 0 5px!important;padding:0!important;align-items:center}
#content:has(>#casting-board)>.module-head h2{margin:0!important;font-size:18px}
#content:has(>#casting-board)>.casting-scanner{padding:6px 8px!important;margin:0 0 6px!important}
#content:has(>#casting-board)>.casting-scanner p{margin:4px 0 0!important}
#content:has(>#casting-board)>.cast-tools{min-height:32px!important;margin:0 0 6px!important;gap:8px!important;align-items:center!important}
#content:has(>#casting-board)>.cast-tools label{display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:5px!important;margin:0!important;white-space:nowrap}
#content:has(>#casting-board)>.cast-tools input[type=checkbox]{margin:0!important;width:18px;height:18px}
#casting-board>.attention{margin:4px 0 6px!important;padding:6px 8px!important;font-size:12px;line-height:1.4}
#casting-board>.casting-document[data-casting-document]{padding:8px!important;margin:6px 0!important}
.casting-document[data-casting-document]>header h3{margin:0!important;font-size:15px}
.casting-document[data-casting-document]>header p{margin:2px 0 4px!important;font-size:12px;line-height:1.4}
.casting-document[data-casting-document]>header>.cast-tools{display:flex!important;align-items:center!important;gap:6px!important;margin:0 0 6px!important;flex-wrap:wrap}
.casting-document[data-casting-document]>header>.cast-tools :is(button,select){min-height:30px!important;height:30px!important;margin:0!important;padding:4px 9px!important;font-size:12px!important;line-height:20px!important}
.paper-window-mode :is(.final-order-heading,.final-order-item),[data-detached-row],[data-detached-product]{cursor:pointer}
.qc-select-row{display:flex;align-items:center;gap:6px;border-bottom:1px solid var(--line);padding:4px 0}
.qc-select-row .qc-item-pick{display:flex;align-items:center;justify-content:center;flex:none;padding:6px;cursor:pointer}
.qc-select-row .qc-item-pick input{width:22px;height:22px;margin:0}
.qc-select-row .piece-card{flex:1;min-width:0;margin:0!important;padding:8px!important}
