.library-toolbar { margin: 0 0 30px; }
.library-toolbar[hidden], .game-card[hidden], .library-empty[hidden] { display: none; }
.library-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.library-search { display: flex; align-items: center; gap: 12px; border: 1px solid #4a503f; background: #11140f; padding: 0 16px; width: min(370px, 100%); min-height: 48px; }
.library-search:focus-within { outline: 2px solid var(--yellow); outline-offset: 3px; }
.library-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #aeb49f; stroke-width: 1.8; }
.library-search input { background: transparent; color: var(--ink); border: 0; padding: 14px 0; font: 13px Arial, sans-serif; width: 100%; min-width: 0; outline: none; }
.library-search input::placeholder { color: #a9ad9f; }
.library-count { color: #aeb4a1; font: 11px var(--mono); white-space: nowrap; margin: 0; }
.game-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.game-filter { border: 1px solid #424939; background: transparent; color: #bdc3b2; padding: 11px 15px; border-radius: 3px; font: 11px var(--mono); transition: background .15s, color .15s; }
.game-filter:hover { color: var(--ink); border-color: #8e987f; }
.game-filter[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: #151613; }
.library-empty { padding: 50px 20px; text-align: center; border: 1px dashed #4a503f; color: var(--muted); }
.library-empty button { background: transparent; border: 0; color: var(--yellow); padding: 10px; text-decoration: underline; text-underline-offset: 4px; }
.game-title { align-items: start; }
.game-title > span:first-child { overflow-wrap: anywhere; }
.game-title > span:last-child { flex: none; }
.library-note a { color: var(--yellow); text-decoration: underline; text-underline-offset: 4px; }
.dialog-image-label { display: block; padding: 11px 30px; border-bottom: 1px solid var(--line); color: #aeb4a1; font: 9px var(--mono); letter-spacing: 1.4px; }
.dialog-download-meta { font: 10px/1.8 var(--mono) !important; margin-bottom: 0; }
@media (max-width: 760px) {
  .library-tools { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 18px; }
  .library-search { width: 100%; }
  .library-count { font-size: 10px; }
  .game-filters { gap: 7px; }
  .game-filter { font-size: 10px; padding: 10px 12px; }
  .games-grid { gap: 26px 12px; }
  .game-title { font-size: 18px; gap: 6px; }
  .game-index { font-size: 8px; top: 9px; left: 9px; }
  .dialog-image-label { padding-inline: 24px; }
}
