.mlp-dialog{margin:auto;width:min(900px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;border:1px solid var(--line,#d8d8d8);border-radius:14px;background:var(--bg,#fff);color:var(--text,#222);box-shadow:0 20px 70px #0003}
.mlp-dialog::backdrop{background:#0006}.mlp-dialog>header,.mlp-dialog>footer{display:flex;align-items:center;gap:12px;padding:16px 20px}.mlp-dialog>header{border-bottom:1px solid var(--line,#ddd)}.mlp-dialog h2{margin:0;flex:1;font-size:18px}.mlp-dialog button,.mlp-dialog input,.mlp-dialog select{font:inherit;color:inherit}.mlp-dialog button{cursor:pointer;border:1px solid var(--line,#ddd);border-radius:7px;padding:8px 12px;background:var(--surface,#f5f5f5)}.mlp-dialog button:disabled{opacity:.5;cursor:default}.mlp-dialog button:focus-visible,.mlp-dialog input:focus-visible,.mlp-dialog select:focus-visible{outline:2px solid var(--accent,#4f72df);outline-offset:2px}.mlp-body{padding:16px 20px;overflow:auto;max-height:calc(100vh - 250px)}.mlp-status{padding:0 20px;margin:4px 0 12px;min-height:20px;font-size:13px;color:var(--muted,#666)}.mlp-dialog>footer{border-top:1px solid var(--line,#ddd)}.mlp-dialog>footer>span{margin-right:auto;font-size:13px}.mlp-dialog>footer>button:last-child{background:var(--text,#292929);color:var(--bg,#fff);border-color:transparent}.mlp-filters{display:flex;gap:10px;margin-bottom:14px}.mlp-filters input{flex:1;min-width:100px}.mlp-dialog input,.mlp-dialog select{box-sizing:border-box;border:1px solid var(--line,#ddd);border-radius:6px;background:var(--bg,#fff);padding:8px}.mlp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:12px}.mlp-card{min-width:0;border:1px solid var(--line,#ddd);border-radius:9px;padding:8px;background:var(--surface,#f5f5f5)}.mlp-card.is-selected{border-color:var(--accent,#426ade);box-shadow:0 0 0 1px var(--accent,#426ade)}.mlp-dialog .mlp-card-select{display:flex;flex-direction:column;align-items:stretch;border:0;padding:0;width:100%;background:transparent;text-align:left}.mlp-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:8px;font-size:13px}.mlp-card small{display:block;font-size:12px;color:var(--muted,#666);line-height:1.5}.mlp-card select{width:100%;margin-top:8px;font-size:12px}.mlp-preview{height:112px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:6px;background:var(--bg,#fff);color:var(--muted,#666)}.mlp-preview img{width:100%;height:100%;object-fit:contain}.mlp-pagination{display:flex;gap:12px;align-items:center;justify-content:center;margin-top:18px;font-size:13px}.mlp-body>label{display:flex;flex-direction:column;gap:8px}.mlp-body>p{font-size:14px}.mlp-library-action{font-size:12px;padding:7px 10px!important}
@media(max-width:520px){.mlp-dialog{width:calc(100vw - 16px)}.mlp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mlp-body{padding:12px}.mlp-dialog>header,.mlp-dialog>footer{padding:12px}.mlp-preview{height:96px}.mlp-pagination{gap:6px}}

/* One grouped label chooser across manual uploads and completed-output saving. */
.mltc-dialog,.mltc-edit{position:fixed;inset:0;margin:auto;--mltc-border:var(--workspace-border,var(--border,#e5e7eb));--mltc-surface:var(--workspace-surface,var(--bg,#fff));--mltc-muted:var(--workspace-text-muted,var(--muted,#92969d));color:var(--workspace-text,var(--text,#333));background:var(--mltc-surface);border:1px solid var(--mltc-border);border-radius:14px;padding:0;box-shadow:0 22px 90px #0003;font:13px/1.5 inherit}.mltc-dialog{width:min(1280px,94vw);max-height:92vh}.mltc-dialog::backdrop,.mltc-edit::backdrop{background:#0006}.mltc-dialog button,.mltc-dialog input,.mltc-edit button,.mltc-edit input{font:inherit;color:inherit}.mltc-dialog button,.mltc-edit button{cursor:pointer;background:transparent;border:1px solid var(--mltc-border);border-radius:6px;padding:7px 12px}.mltc-dialog button:hover,.mltc-edit button:hover{background:color-mix(in srgb,currentColor 5%,transparent)}.mltc-dialog button:focus-visible,.mltc-dialog input:focus-visible,.mltc-edit input:focus-visible{outline:2px solid #507fe6;outline-offset:2px}.mltc-dialog>header,.mltc-dialog>footer{display:flex;align-items:center;gap:15px;padding:20px 24px;border-bottom:1px solid var(--mltc-border)}.mltc-dialog>header h2{font-size:17px;font-weight:600;flex:1;margin:0}.mltc-dialog>header>button{border:0;font-size:22px;padding:0 5px;color:var(--mltc-muted)}.mltc-dialog>footer{justify-content:flex-end;border:0;border-top:1px solid var(--mltc-border);padding:14px 24px}.mltc-dialog>footer button:last-child,.mltc-edit [type=submit]{background:var(--workspace-text,#333);color:var(--workspace-surface,#fff);border-color:transparent;min-width:90px}.mltc-toolbar{display:flex;gap:12px;padding:16px 24px}.mltc-toolbar>input{flex:1;min-width:0}.mltc-dialog input:not([type=checkbox]):not([type=radio]),.mltc-edit input{border:1px solid var(--mltc-border);border-radius:6px;padding:8px 10px;background:transparent;min-width:0}.mltc-columns{display:grid;grid-template-columns:240px minmax(200px,1fr) minmax(280px,1fr);height:min(58vh,600px);border-top:1px solid var(--mltc-border);border-bottom:1px solid var(--mltc-border)}.mltc-columns>aside,.mltc-columns>main,.mltc-selection{overflow:auto;min-width:0;padding:16px;border-right:1px solid var(--mltc-border)}.mltc-selection{border-right:0;padding:20px}.mltc-dialog h3{font-size:13px;font-weight:600;margin:0 0 12px}.mltc-group{display:flex;flex-direction:column;text-align:left;width:100%;gap:5px;border:0!important;padding:14px 12px!important;border-radius:5px!important}.mltc-group.active{background:color-mix(in srgb,currentColor 7%,transparent)!important}.mltc-group small,.mltc-dialog main>small,.mltc-presets>small{color:var(--mltc-muted);font-size:11px}.mltc-required{color:#ef5363;font-weight:600;margin-left:3px}.mltc-options{display:flex;flex-direction:column;gap:6px;margin-top:16px}.mltc-options label{display:flex;align-items:center;gap:9px;padding:9px 7px;border-radius:5px;cursor:pointer}.mltc-options label:hover{background:color-mix(in srgb,currentColor 4%,transparent)}.mltc-options input{accent-color:var(--workspace-text,#333);width:15px;height:15px;margin:0}.mltc-chip{display:inline-flex;align-items:center;gap:6px;font-size:12px!important;border:0!important;background:color-mix(in srgb,currentColor 6%,transparent)!important;padding:5px 9px!important;margin:0 7px 7px 0;border-radius:5px!important;max-width:100%;overflow-wrap:anywhere}.mltc-chip>span{color:var(--mltc-muted)}.mltc-empty{color:var(--mltc-muted);text-align:center;font-size:12px;padding:24px 5px}.mltc-presets{margin-top:26px;border-top:1px solid var(--mltc-border);padding-top:20px}.mltc-presets>h3{margin-bottom:4px}.mltc-preset{display:inline-flex;margin:10px 8px 0 0}.mltc-preset>button:first-child{border-radius:5px 0 0 5px}.mltc-preset>button:last-child{border-left:0;border-radius:0 5px 5px 0;color:var(--mltc-muted)}.mltc-preset-add{display:flex;gap:7px;flex-wrap:wrap;margin-top:18px}.mltc-preset-add>input{width:130px;flex:1}.mltc-preset-add>button{font-size:11px;white-space:nowrap}.mltc-status{min-height:20px;font-size:12px;color:#d24d55;margin:8px 24px}.mltc-group-actions{display:flex;gap:6px;flex-wrap:wrap;border-top:1px solid var(--mltc-border);margin-top:18px;padding-top:14px}.mltc-group-actions>button{font-size:11px;padding:5px 8px}.mltc-edit{width:min(420px,90vw);padding:25px}.mltc-edit label{display:flex;flex-wrap:wrap;gap:8px}.mltc-edit label>input{width:100%}.mltc-edit h3{font-size:17px;margin:0 0 24px}.mltc-edit footer{display:flex;gap:12px;justify-content:flex-end;margin-top:25px}.mltc-field{min-width:0}.mltc-field>.mltc-open{color:#4978da;font-size:12px;background:transparent;border:0;padding:8px 0;cursor:pointer}.mltc-field-selected{display:flex;gap:0;flex-wrap:wrap;padding-top:4px}.mltc-field-selected>small{color:var(--mltc-muted,var(--muted,#999));font-size:11px}.mltc-field-selected input[hidden]{display:none!important}.mltc-product-search{position:relative;min-width:0;width:100%}.mltc-product-search>input{box-sizing:border-box;width:100%;min-height:36px;border:1px solid var(--mlu-border,var(--border,#ddd));border-radius:6px;padding:8px 10px;background:var(--workspace-page-bg,var(--bg,#fff));font:inherit;color:inherit}.mltc-product-results{position:absolute;top:calc(100% + 5px);left:0;right:0;max-height:260px;overflow:auto;background:var(--workspace-surface,var(--bg,#fff));border:1px solid var(--mlu-border,var(--border,#ddd));border-radius:7px;box-shadow:0 9px 28px #0002;z-index:25;padding:5px}.mltc-product-results>button{display:block;text-align:left;border:0!important;background:transparent;width:100%;font:inherit;font-size:12px;color:inherit;padding:9px 10px!important;cursor:pointer}.mltc-product-results>button:hover,.mltc-product-results>button:focus-visible{background:color-mix(in srgb,currentColor 7%,transparent)}.mltc-product-results>span{padding:12px;display:block;color:var(--muted,#999);font-size:12px}.mltc-product-results[hidden]{display:none!important}.mltc-dialog [hidden]{display:none!important}
@media(max-width:850px){.mltc-columns{grid-template-columns:180px minmax(180px,1fr)}.mltc-selection{grid-column:1/-1;border-top:1px solid var(--mltc-border);max-height:220px}.mltc-columns{height:62vh;grid-template-rows:1fr auto}.mltc-columns>main{border-right:0}.mltc-toolbar{flex-wrap:wrap}.mltc-toolbar>input{flex-basis:60%}.mltc-dialog>header{padding:16px}.mltc-presets{margin-top:14px;padding-top:12px}.mltc-empty{padding:10px 5px}}
@media(max-width:520px){.mltc-columns{grid-template-columns:135px minmax(0,1fr)}.mltc-columns>aside,.mltc-columns>main,.mltc-selection{padding:10px}.mltc-toolbar{padding:12px;gap:7px}.mltc-toolbar>button{font-size:11px}.mltc-group{padding:10px 5px!important}.mltc-dialog{width:96vw;max-height:94vh}.mltc-group small{font-size:10px}}
.mltc-multiple{position:relative;font-size:12px;min-width:0}.mltc-multiple>summary{border:1px solid var(--mlu-border,var(--border,#ddd));border-radius:6px;padding:9px 26px 9px 10px;cursor:pointer;list-style:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:var(--workspace-page-bg,var(--bg,#fff));min-height:36px;box-sizing:border-box;position:relative}.mltc-multiple>summary::-webkit-details-marker{display:none}.mltc-multiple>summary:after{content:'⌄';position:absolute;right:10px;color:var(--muted,#888)}.mltc-multiple[open]>summary:after{content:'⌃'}.mltc-multiple>div{position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:30;padding:10px;max-height:300px;overflow:auto;border:1px solid var(--mlu-border,var(--border,#ddd));border-radius:7px;box-shadow:0 9px 28px #0002;background:var(--workspace-surface,var(--bg,#fff))}.mltc-multiple [type=search]{width:100%;border:1px solid var(--mlu-border,var(--border,#ddd));background:transparent;color:inherit;padding:7px 9px;border-radius:5px;box-sizing:border-box;margin-bottom:7px;font:inherit}.mltc-multiple [data-multiple-options]>label{display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important;padding:8px 4px;cursor:pointer}.mltc-multiple [data-multiple-options]>label[hidden]{display:none!important}.mltc-multiple input[type=checkbox]{width:15px;height:15px;margin:0;accent-color:var(--workspace-text,#333)}.mltc-drop-target{outline:2px dashed currentColor;outline-offset:-3px}.mltc-options label[draggable=true]{cursor:grab}
