#ml-controls{border-top:1px solid var(--line);margin-top:10px;padding-top:10px}
#ml-controls .hint{font-size:12px;margin:8px 0}
#ml-controls small{color:var(--muted)}
.ml-field{display:grid;gap:5px;margin:10px 0}
.ml-field label{margin:0!important;font-weight:600}
.ml-field select{width:100%;min-height:40px}
.ml-field small{color:var(--muted);font-size:12px;line-height:1.45}
.ml-badge{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px;font-weight:600;color:var(--ink);border:1px solid var(--line);border-radius:20px;padding:3px 8px}
.ml-badge i{background:var(--ml-color);width:8px;height:8px;border-radius:50%;flex:none}
.ml-intro{margin-top:0}
.ml-filters{display:grid;grid-template-columns:1.2fr 1fr;gap:12px}
.ml-selection{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0}
.ml-selection label{margin:0!important}
.ml-items{max-height:min(340px,36vh);min-height:100px;overflow:auto;border:1px solid var(--line);border-radius:8px;overscroll-behavior:contain}
.ml-item{display:flex!important;align-items:center;gap:12px;padding:12px!important;margin:0!important;border-bottom:1px solid var(--line);cursor:pointer}
.ml-item:last-child{border-bottom:0}
.ml-item:has(input:checked){background:color-mix(in srgb,var(--accent) 10%,var(--surface))}
.ml-item input{flex:none}
.ml-item-copy{min-width:0;flex:1}
.ml-item-copy strong,.ml-item-copy small{display:block;overflow-wrap:anywhere}
.ml-item-copy strong{font-size:14px}
.ml-item-copy small{color:var(--muted);font-size:12px;margin-top:3px}
.ml-empty{padding:16px;color:var(--muted)}
.ml-assignment{margin-top:14px}
#ml-selected{margin:0;font-weight:600}
.ml-assignment .hint{margin-bottom:0;font-size:12px}
.ml-preview{width:44px;height:44px;flex:none;border-radius:5px;overflow:hidden;background:var(--paper);display:grid;place-items:center}
.ml-preview img{width:100%;height:100%;object-fit:cover}
.ml-preview-symbol svg{width:23px;height:23px;color:var(--muted)}
#mig-dialog:has(#ml-items){width:min(780px,calc(100% - 24px));max-width:780px;height:min(780px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);overflow:hidden}
#mig-dialog:has(#ml-items) form{height:100%;display:flex;flex-direction:column}
#mig-dialog:has(#ml-items) .dialog-heading{padding:16px 24px;flex:none}
#mig-dialog:has(#ml-items) .dialog-heading h2{font-size:26px}
#mig-dialog:has(#ml-items) .dialog-footer{padding:12px 24px;flex:none}
#mig-dialog:has(#ml-items) .dialog-body{display:flex;flex-direction:column;gap:0;min-height:0;max-height:none;flex:1;padding:16px 24px}
#mig-dialog:has(#ml-items) .ml-intro{font-size:14px;margin:0 0 10px;flex:none}
#mig-dialog:has(#ml-items) .ml-filters label{margin:0;font-size:12px}
#mig-dialog:has(#ml-items) .ml-filters input,#mig-dialog:has(#ml-items) .ml-filters select{margin-top:4px;min-height:40px;padding:8px 10px}
#mig-dialog:has(#ml-items) .ml-items{flex:1;max-height:none;min-height:100px}
#mig-dialog:has(#ml-items) .ml-assignment{flex:none;font-size:14px;margin-top:12px}
#mig-dialog:has(#ml-items) .ml-assignment .ml-field{grid-template-columns:auto 1fr;align-items:center;gap:14px;margin:8px 0 0}
#mig-dialog:has(#ml-items) .ml-assignment .ml-field small{display:none}
#mig-dialog:has(#ml-items) .ml-assignment .hint{margin:8px 0 0}
.lw-select .ml-badge{margin-top:5px}
.lw-lineage-hidden{font-size:11px;color:var(--muted);display:block;margin-top:3px}
@media(max-width:600px){.ml-filters{grid-template-columns:1fr 1fr;gap:8px}.ml-item{display:grid!important;grid-template-columns:18px 36px 1fr;gap:6px 8px;padding:10px!important}.ml-preview{width:36px;height:36px;grid-row:span 2}.ml-item input{grid-row:span 2}.ml-item-copy{grid-column:3}.ml-item>.ml-badge{grid-column:3;justify-self:start}.ml-item-copy strong{font-size:13px}.ml-selection{font-size:12px}.ml-assignment{margin-top:10px}#mig-dialog:has(#ml-items) .dialog-heading,#mig-dialog:has(#ml-items) .dialog-body,#mig-dialog:has(#ml-items) .dialog-footer{padding:12px 16px}#mig-dialog:has(#ml-items) .dialog-heading h2{font-size:23px}#mig-dialog:has(#ml-items) .ml-assignment .ml-field{grid-template-columns:1fr;gap:4px}#mig-dialog:has(#ml-items) .dialog-footer .form-message:empty{display:none}#mig-dialog:has(#ml-items) .dialog-footer{justify-content:flex-end;gap:8px}}
