/* The Games gallery (/gallery/games, /gallery/games/<id>; static/js/gamegallery.js; the Game Maker module). The list,
   the tabs, the side panel and Report come from css/uigallery.css; this adds the card bits, the genre counts, the
   carousel and the systems list. */

/* ---------------------------------------------------------------- the list */
.gg-genres .chip .n { margin-left: 5px; color: var(--ink-3); font-weight: 700; font-size: 0.8em; }
.gg-genres .chip.on .n { color: inherit; opacity: 0.8; }
.gg-genres .chip.is-empty:not(.on) { opacity: 0.6; }
.gg-card .thumb { aspect-ratio: 16 / 9; background: #0b0f1e; }
.gg-card .thumb img { object-fit: cover; }
.gg-card .gg-sys { position: absolute; right: 10px; bottom: 10px; padding: 1px 9px; border-radius: 999px; background: rgba(10, 14, 32, 0.72);
  color: #fff; font-size: 0.74rem; font-weight: 800; }
#gg-sentinel { height: 1px; }

/* ---------------------------------------------------------------- one game */
.gg-head { margin-bottom: 12px; }
.gg-head h1 { margin: 0 0 2px; font-size: clamp(1.5rem, 2.6vw, 2rem); overflow-wrap: anywhere; }
.gg-carousel { display: grid; gap: 10px; }
.gg-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #0b0f1e; border: 2px solid var(--line); }
.gg-stage > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gg-noshot { display: grid; place-items: center; align-content: center; gap: 8px; height: 100%; color: #c9d2ee; font-weight: 800; }
.gg-noshot .i { width: 48px; height: 48px; }
.gg-nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 0; background: rgba(10, 14, 32, 0.72); color: #fff; cursor: pointer; }
.gg-nav .i { width: 22px; height: 22px; }
.gg-prev { left: 10px; }
.gg-prev .i { transform: rotate(180deg); }
.gg-next { right: 10px; }
.gg-nav:hover { background: var(--blue); }
.gg-nav:focus-visible, .gg-thumb:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.gg-caption { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 3px 11px; border-radius: 999px;
  background: rgba(10, 14, 32, 0.72); color: #fff; font-size: 0.84rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gg-caption .muted { color: #c9d2ee; font-weight: 700; margin-left: 4px; }
.gg-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.gg-thumb { flex: 0 0 auto; width: 120px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #0b0f1e; cursor: pointer; scroll-snap-align: start; opacity: 0.75; }
.gg-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gg-thumb:hover { opacity: 1; }
.gg-thumb[aria-current="true"] { border-color: var(--blue); opacity: 1; box-shadow: 0 3px 0 var(--blue-d); }
.gg-page .ug-layout { grid-template-areas: "main side" "sys side"; }
.gg-page .ug-main { grid-area: main; }
.gg-page .ug-side { grid-area: side; }
.gg-systems { grid-area: sys; min-width: 0; }
@media (max-width: 1000px) { .gg-page .ug-layout { grid-template-areas: "main" "side" "sys"; } }
.gg-h { font-size: 1.2rem; }
.gg-sys-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.gg-sys-list li { display: grid; gap: 3px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.gg-sys-list li.lead { border-color: var(--yellow); }
.gg-sys-list li span { color: var(--ink-2); font-size: 0.9rem; line-height: 1.35; }
.gg-sys-list .badge { font-size: 0.7rem; vertical-align: middle; margin-left: 4px; color: #1b1f3b; }
.gg-genre-link { text-decoration: none; }
@media (max-width: 560px) {
  .gg-thumb { width: 96px; }
  .gg-nav { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: no-preference) {
  .gg-stage > img { transition: opacity 0.15s ease; }
  .gg-stage > img.is-swapping { opacity: 0.4; }
}
