/* Game page Overview gallery (single-dapp.php: hero + thumb strip) — the thumbs
 * are buttons since 1.0.209 and open the full-size viewer below. */
.cg-dapp-thumb, .cg-dapp-gallery-hero-btn { padding: 0; cursor: pointer; font: inherit; color: inherit; text-align: inherit; -webkit-appearance: none; appearance: none; }
.cg-dapp-thumb { display: block; width: 100%; }
.cg-dapp-gallery-hero-btn { display: block; width: 100%; height: 100%; border: 0; background: none; }
.cg-dapp-gallery-hero-btn img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cg-dapp-thumb:focus-visible, .cg-dapp-gallery-hero-btn:focus-visible { outline: 2px solid #00dbe9; outline-offset: 2px; }

/* ---- viewer ---- */
.cg-gallery-lb { position: fixed; inset: 0; z-index: 100000; background: rgba(8,8,9,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.cg-gallery-lb[hidden] { display: none; }
.cg-gallery-lb-stage { position: relative; width: min(1280px, 100%); aspect-ratio: 16 / 9; max-height: calc(100vh - 140px); background: #000; border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.cg-gallery-lb-stage img, .cg-gallery-lb-stage iframe { width: 100%; height: 100%; object-fit: contain; border: 0; display: block; }
.cg-gallery-lb-cap { width: min(1280px, 100%); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 4px 0; font-size: 13px; color: #e5e2e3; }
.cg-gallery-lb-cap span:last-child { color: #b9cacb; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cg-gallery-lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14); background: rgba(19,19,20,.78); color: #e5e2e3; font-size: 24px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.cg-gallery-lb-btn:hover, .cg-gallery-lb-btn:focus-visible { border-color: #00dbe9; outline: none; }
.cg-gallery-lb-prev { left: 10px; } .cg-gallery-lb-next { right: 10px; }
.cg-gallery-lb-close { position: absolute; right: 10px; top: 10px; transform: none; width: 36px; height: 36px; font-size: 20px; }
.cg-gallery-lb-thumbs { width: min(1280px, 100%); display: flex; gap: 6px; padding: 10px 0 0; overflow-x: auto; scrollbar-width: none; }
.cg-gallery-lb-thumbs::-webkit-scrollbar { display: none; }
.cg-gallery-lb-thumbs button { flex: 0 0 96px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; border: 1px solid transparent; padding: 0; background: #0d0e10; cursor: pointer; opacity: .6; }
.cg-gallery-lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cg-gallery-lb-thumbs button.is-on, .cg-gallery-lb-thumbs button:hover { opacity: 1; border-color: #00dbe9; }
body.cg-gallery-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .cg-gallery-tile { transition: none; } }
