#games-popover .modal-card { width: min(780px, 100%); }
.game-catalog-controls { flex-wrap: wrap; gap: 8px; padding-top: 0; padding-bottom: 8px; }
.game-catalog-controls .modal-sort-select { min-width: 120px; flex: 1; }
.game-filters { padding: 0 20px 8px; color: var(--text-muted, #a6a8b2); font-size: 12px; }
.game-filters > summary { width: fit-content; padding: 4px 0; cursor: pointer; }
.game-filter-controls { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
.game-filter-controls .modal-sort-select { min-width: 120px; flex: 1; }
.game-catalog-controls [hidden] { display: none; }
.game-shelves { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 10px; }
.game-shelf[aria-pressed="true"] { border-color: var(--user-accent, #a6abb1); background: color-mix(in srgb, var(--user-accent, #a6abb1) 15%, var(--bg-card, #202126)); }
.game-continue { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.game-continue[hidden] { display: none; }
.game-metadata-info { padding: 0 0 6px; font-size: 11px; line-height: 1.5; color: var(--text-muted, #a6a8b2); }
.game-metadata-info summary { cursor: pointer; }
.game-metadata-info p { margin: 6px 0; }
.game-metadata-references { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.game-metadata-references a { color: inherit; text-decoration: underline; }
.game-tags { display: block; margin-top: 3px; color: var(--text-muted, #a6a8b2); font-size: 10px; }
.catalog-button { font: inherit; font-size: 12px; color: var(--text-main, #e9e9ed); background: var(--bg-card, #202126); border: 1px solid var(--border-color, #393b42); border-radius: 7px; padding: 8px 10px; cursor: pointer; white-space: nowrap; }
.catalog-button:hover:not(:disabled) { filter: brightness(1.15); }
.catalog-button:disabled { opacity: .45; cursor: default; }
.catalog-button:focus-visible, .game-launch:focus-visible, .game-favorite:focus-visible, .game-source-menu summary:focus-visible, .game-source-choice:focus-visible, .game-filters summary:focus-visible { outline: 2px solid var(--user-accent, #a6abb1); outline-offset: 2px; }
.catalog-status { margin: 0; padding: 0 20px 10px; color: var(--text-muted, #a6a8b2); font-size: 11px; line-height: 1.5; }
.catalog-pagination { justify-content: center; align-items: center; gap: 16px; padding: 10px 20px; border-top: 1px solid var(--border-color, #393b42); }
.catalog-page { font-size: 12px; color: var(--text-muted, #a6a8b2); min-width: 90px; text-align: center; }
#game-list { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); grid-auto-rows: auto; }
#game-list .game-item { position: relative; padding: 8px; gap: 0; overflow: visible; align-items: stretch; flex-direction: column; cursor: default; }
.game-launch { display: flex; flex-direction: column; gap: 9px; align-items: stretch; min-width: 0; width: 100%; padding: 0; border: 0; border-radius: 5px; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.game-cover-frame { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 5px; background: var(--bg-card, #2b3036); }
.game-cover-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-muted, #a6a8b2); font-size: 19px; letter-spacing: .06em; background: linear-gradient(135deg, #ffffff08, #0000000a); }
.game-cover-placeholder[hidden] { display: none; }
.game-launch .game-cover { position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; opacity: 0; object-fit: cover; }
.game-launch .game-cover[data-loaded] { opacity: 1; }
.game-launch .game-info { min-width: 0; padding: 1px 25px 3px 2px; }
.game-launch .game-title, .game-launch .game-author { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-favorite { position: absolute; top: 12px; right: 12px; border: 1px solid #ffffff30; border-radius: 6px; width: 26px; height: 26px; padding: 0; background: #16181ad9; color: #e4e6e8; font-size: 19px; line-height: 1; cursor: pointer; }
.game-favorite[aria-pressed="true"] { color: var(--user-accent, #d6d8de); }
.game-favorite:hover { background: #30343be8; }
.game-source-menu { position: absolute; bottom: 9px; left: 9px; right: 9px; pointer-events: none; }
.game-source-menu[open] { z-index: 3; }
.game-source-menu summary { display: grid; place-items: center; width: 24px; height: 24px; margin-left: auto; border-radius: 5px; list-style: none; color: var(--text-muted, #a6a8b2); font-size: 19px; line-height: 1; cursor: pointer; pointer-events: auto; }
.game-source-menu summary::-webkit-details-marker { display: none; }
.game-source-menu summary:hover, .game-source-menu[open] summary { background: #80808022; }
.game-source-choice { position: absolute; right: 0; bottom: 28px; width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--border-color, #525861); border-radius: 6px; color: var(--text-main, #e9e9ed); background: var(--bg-card, #202126); box-shadow: 0 6px 20px #0004; font: inherit; font-size: 11px; pointer-events: auto; }
@media (max-width: 560px) {
  #game-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 15px; }
  .game-catalog-controls { padding-left: 14px; padding-right: 14px; }
  .catalog-status { padding-left: 14px; padding-right: 14px; }
  .game-catalog-controls .modal-sort-select { min-width: 110px; }
  .catalog-button { padding: 7px 9px; }
  .game-shelves, .game-filters { padding-left: 14px; padding-right: 14px; }
  .game-shelves { gap: 5px; }
}
@media (pointer: coarse) {
  .catalog-button, .game-catalog-controls select, .game-filter-controls select, .game-filters summary { min-height: 44px; }
  .game-favorite { width: 44px; height: 44px; }
  .game-source-menu summary { width: 44px; height: 44px; }
  .game-source-choice { bottom: 48px; min-height: 44px; }
  .game-launch .game-info { padding-right: 44px; }
}
