/* Game background picker, loaded when its settings panel is opened. */
.game-background-settings { display: grid; gap: 10px; padding: 10px 12px 14px; }
.game-bg-title { display: grid; gap: 2px; }
.game-bg-title b { font: 700 14px 'Microsoft JhengHei', sans-serif; color: #1c2a3a; }
.game-bg-title small { color: #4b5b6e; font-size: 12px; }
.game-bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
#game .game-bg-grid .game-bg-tile {
  display: grid !important;
  gap: 5px;
  padding: 5px !important;
  border: 1px solid rgb(255 255 255 / 70%) !important;
  border-radius: 14px !important;
  background: rgb(255 255 255 / 45%) !important;
  color: #1c2a3a !important;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
#game .game-bg-grid .game-bg-tile:active { transform: scale(0.96); }
.game-bg-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: center / cover no-repeat;
}
.game-bg-thumb.random { background: linear-gradient(135deg, #7aa7ff, #b58cff 45%, #ff9fb8); color: #fff; }
.game-bg-thumb.random svg { width: 34%; height: auto; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 30%)); }
.game-bg-name { font: 600 12px 'Microsoft JhengHei', sans-serif; }
#game .game-bg-grid .game-bg-tile.selected {
  border-color: #0a84ff !important;
  background: rgb(255 255 255 / 82%) !important;
  box-shadow: 0 0 0 2px #0a84ff, 0 6px 16px rgb(10 60 140 / 22%) !important;
}
#game .game-bg-grid .game-bg-tile.selected .game-bg-name::before { content: '✓ '; color: #0a84ff; }

.game-bg-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
