.language-bar { gap:10px; flex-wrap:wrap; align-items:center; }
.favorites-open { display:inline-flex; align-items:center; gap:7px; min-height:40px; padding:9px 13px; border:1px solid rgba(110,120,160,.2); border-radius:14px; color:#536681; background:rgba(255,255,255,.85); font-size:.84rem; }
.favorites-open svg, .favorite-btn svg, .version-history-btn svg { width:14px; height:14px; flex:none; }
.favorite-btn, .version-history-btn { display:inline-flex; align-items:center; gap:4px; padding:3px 6px; border:0; border-radius:12px; background:transparent; color:#7a748c; font-size:.76rem; }
.favorite-btn:hover, .version-history-btn:hover { background:rgba(119,105,175,.1); color:#7060a3; }
.favorite-btn { flex-shrink:0; white-space:nowrap; transition:color .2s, background-color .2s; }
.favorite-btn svg { fill:transparent; transform-origin:center; transition:fill .2s, color .2s, transform .2s; }
.favorite-btn:not(:disabled):hover svg { transform:scale(1.12); }
.favorite-btn:not(:disabled):active svg { transform:scale(.9); }
.favorite-btn.saved { color:#986b00; }
.favorite-btn.saved svg { color:#c18a00; fill:#ffd447; }
.favorite-btn:disabled { cursor:wait; opacity:.65; }
.plugin-library-card .meta { flex-wrap:wrap; row-gap:8px; }
.plugin-library-card .meta .meta-right { display:flex; flex-wrap:wrap; gap:6px; flex-basis:100%; margin-left:0; }
.modal-overlay.library-modal { z-index:10090; }
.library-modal .library-dialog { max-width:800px; width:calc(100% - 24px); max-height:85vh; overflow-y:auto; }
html:not([data-background-theme="dark"]) .library-modal .library-dialog { background:#fff !important; }
.library-dialog .close-btn { flex:none; }
.collection-filters { display:flex; flex-wrap:wrap; gap:10px; margin:8px 0; }
.collection-filters input { flex:1; min-width:100px; }
.collection-filters select { padding:9px 12px; border:1px solid #d4d4e0; border-radius:14px; background:rgba(255,255,255,.6); color:inherit; }
.library-note { margin:10px 0 16px; font-size:.8rem; color:#7a8298; line-height:1.7; }
.collection-item, .version-item { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:16px 0; border-top:1px solid rgba(125,133,160,.17); }
.library-item-copy { min-width:0; flex:1; }
.library-item-copy h3 { margin:0 0 6px; font-size:.95rem; overflow-wrap:anywhere; }
.library-item-copy p { margin:5px 0; color:#747b91; font-size:.82rem; line-height:1.7; overflow-wrap:anywhere; }
.library-item-copy small { color:#7d859a; font-size:.74rem; }
.library-item-copy .version-notes { white-space:pre-wrap; max-height:180px; overflow-y:auto; }
.library-item-actions { display:flex; flex-direction:column; align-items:flex-end; gap:9px; flex:none; }
.favorite-remove, .version-delete { padding:4px 7px; border:0; border-radius:8px; background:transparent; color:#a36868; font-size:.76rem; }
.library-dialog button:disabled { opacity:.5; cursor:default; }
.library-dialog button:focus-visible, .favorites-open:focus-visible, .favorite-btn:focus-visible { outline:2px solid #8297ce; outline-offset:3px; }
html[data-background-theme="dark"] .favorites-open, html[data-background-theme="dark"] .collection-filters select { background:#202737; color:#d7e0f1; border-color:#46516a; }
html[data-background-theme="dark"] .favorite-btn, html[data-background-theme="dark"] .version-history-btn { color:#c0b8dc; }
html[data-background-theme="dark"] .favorite-btn.saved { color:#ffd447; }
html[data-background-theme="dark"] .favorite-btn.saved svg { color:#ffd447; }
html[data-background-theme="dark"] .library-note, html[data-background-theme="dark"] .library-item-copy p, html[data-background-theme="dark"] .library-item-copy small { color:#b0bbd0; }
@media (max-width:600px) {
    .collection-item, .version-item { flex-direction:column; gap:10px; }
    .library-item-actions { flex-direction:row; align-items:center; flex-wrap:wrap; }
    .library-modal .library-dialog { padding:22px 18px; }
}
@media (prefers-reduced-motion:reduce) {
    .favorite-btn, .favorite-btn svg { transition:none; }
    .favorite-btn:not(:disabled):hover svg, .favorite-btn:not(:disabled):active svg { transform:none; }
}
