#materialLibrary{box-sizing:border-box;width:min(620px,94vw);max-height:86vh;padding:0;border:1px solid #ddd8e1;border-radius:20px;background:#fff;color:#302d36;overflow-y:auto;box-shadow:0 18px 70px #21182c33}
#materialLibrary::backdrop{background:#25203155}
.ml-library [hidden]{display:none!important}
.ml-library .ml-inner{display:block;padding:22px;max-width:none}
.ml-library header,.ml-library article>div:first-child,.ml-library .ml-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.ml-library header{position:static;height:auto;background:none;border:0;padding:0;min-height:0}
.ml-library h2,.ml-library h3{margin:0;font-size:1.2rem}
.ml-library .ml-filters{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:10px}
.ml-library label{display:grid;gap:5px;font-size:.85rem;margin:8px 0;color:#51495a}
.ml-library input,.ml-library select,.ml-library textarea{box-sizing:border-box;width:100%;min-width:0;border:1px solid #d8d2dc;border-radius:8px;padding:8px;background:white;color:inherit;font:inherit}
.ml-library textarea{resize:vertical}
.ml-library article,.ml-library form{background:#f8f7f9;border:1px solid #e9e5eb;border-radius:12px;padding:12px;margin:10px 0}
.ml-library p{margin:7px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.ml-library article p{max-height:6em;overflow:auto}
.ml-preview :is(img,video,audio){max-width:100%;max-height:250px}
.ml-library small,.ml-library :is(.ml-context,.ml-status,.ml-page-count){font-size:.83rem;color:#686070}
.ml-library .ml-actions{justify-content:flex-start}
.ml-library button{width:auto;border:1px solid #d4ceda;border-radius:8px;background:#fff;color:#4d405b;padding:6px 11px;cursor:pointer;font:inherit}
.ml-library button[data-mode=use],.ml-library .ml-primary{background:#6550a1;color:white;border-color:#6550a1}
.ml-library button:disabled{opacity:.5;cursor:default}
.ml-library :focus-visible{outline:2px solid #7355ae;outline-offset:2px}
.ml-page{background:#fffdfd;border:1px solid #e8e3ee;border-radius:20px;color:#302d36}
.ml-page header h1{font-size:1.7rem;margin:0}
.ml-page .ml-filters{max-width:870px;margin-top:14px}
.ml-page article,.ml-page form{padding:16px}
@media(max-width:520px){.ml-library .ml-inner{padding:14px}.ml-library .ml-filters{grid-template-columns:1fr 1fr}.ml-library .ml-filters label:first-child{grid-column:1/-1}}
