.library-actions {display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.6rem}
.library-actions button {min-height:44px}
.library-dialog {box-sizing:border-box;inset:0;margin:auto;width:min(670px,calc(100% - 22px));max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;
  color:var(--studio-text,#fff5df);background:linear-gradient(135deg,var(--studio-surface,#122e20),var(--studio-background,#081d15));
  border:1px solid var(--studio-border,#a58b55);border-radius:16px;padding:clamp(.8rem,3vw,1.35rem);box-shadow:0 12px 36px #0009}
.library-dialog::backdrop {background:#020a13bd}
.library-dialog header,.library-game {display:flex;align-items:center;justify-content:space-between;gap:.6rem}
.library-dialog header {position:sticky;top:-.85rem;z-index:2;background:var(--studio-surface,#122e20);padding:.2rem 0 .5rem}
.library-status:empty {display:none}
.library-dialog h2,.library-dialog h3 {margin:.3rem 0;color:var(--studio-text,#fff5df)}
.library-dialog button,.library-dialog select {min-height:44px;border:1px solid var(--studio-border,#a58b55);border-radius:8px;padding:.45rem .7rem;
  font:inherit;background:var(--studio-background,#092719);color:var(--studio-text,#fff5df)}
.library-dialog button:disabled {opacity:.55}
.library-dialog .library-primary {background:linear-gradient(135deg,var(--studio-buttonFrom,#f6d88a),var(--studio-buttonTo,#91d1aa));color:#080f21;font-weight:700}
.library-dialog :focus-visible {outline:2px solid var(--studio-accent,#ffd687);outline-offset:3px}
.library-preferences,.library-dialog fieldset {display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.library-dialog fieldset {width:100%;min-width:0;border:1px solid var(--studio-border,#a58b55);border-radius:8px}
.library-preferences select {margin-left:.55rem}
.library-check {display:inline-flex;min-height:36px;gap:.4rem;align-items:center;padding:.2rem .3rem;text-transform:capitalize}
.library-list {list-style:none;margin:0;padding:0}
.library-game {padding:.5rem 0;border-bottom:1px solid var(--studio-border,#a58b55)}
.library-game img {object-fit:cover;border-radius:6px}
.library-game div {flex:1;min-width:0;overflow-wrap:anywhere}
.library-game small {display:block;margin-top:.25rem}
.library-storage,.library-status {color:var(--studio-accent,#f5d387)}
html[data-hide-favorites] :is(.game-fav-button,[data-storefront-action="showFavorites"],[data-discovery-action="favorites"]) {display:none!important}
