/* Zamunda.Games — shared catalogue cards. No game iframe or global image rules. */
.zg-catalog-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 12px;
    background: #1b263e;
    color: #f3f4f6;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.zg-catalog-card:hover, .zg-catalog-card:focus-visible {
    border-color: #9c7af6;
    box-shadow: 0 6px 20px rgba(0,0,0,.24);
}
.zg-catalog-card:focus-visible { outline: 2px solid #bba5ff; outline-offset: 3px; }
.zg-catalog-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    flex: none;
    overflow: hidden;
    background: #101827;
}
.zg-catalog-thumb > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: none;
}
.zg-catalog-body { flex: 1; display: flex; flex-direction: column; padding: 11px 12px 12px; min-width: 0; }
.zg-catalog-body h3 {
    margin: 0 0 7px;
    color: #f1f5f9;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}
.zg-catalog-card:hover h3 { color: #c4b5fd; }
.zg-catalog-meta { margin-top: auto; display: flex; align-items: center; gap: .65rem; font-size: .8rem; line-height: 1.3; color: #b6c1d4; flex-wrap: wrap; }
.zg-catalog-rating { display: inline-flex; gap: .25rem; align-items: center; color: #facc15; }
.zg-catalog-rating svg { width: .86rem; height: .86rem; flex-shrink: 0; }
.zg-catalog-views { font-variant-numeric: tabular-nums; }
/* Same square artwork for homepage and full leaderboard feature cards.
   Compact rows retain their existing dimensions and small assets. */
.zg-home-lb-games .zg-home-lb-game-thumb,
.zg-lb-games-grid .zg-lb-game-thumb { aspect-ratio: 1 / 1; background: #101827; }
.zg-home-lb-games .zg-home-lb-game-thumb img,
.zg-lb-games-grid .zg-lb-game-thumb img { display: block; object-fit: contain; object-position: center; transition: none; }
.zg-home-lb-games .zg-home-lb-game-card:hover .zg-home-lb-game-thumb img,
.zg-lb-games-grid .zg-lb-game-card:hover .zg-lb-game-thumb img { transform: none; }
.zg-home-lb-games .zg-home-lb-game-body h3 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; min-height: 2.5em; line-height: 1.25; }
.zg-lb-games-grid .zg-lb-game-body h3 { overflow-wrap: anywhere; }
.zg-lb-record-game > img, .zg-lb-top-game-row img { object-fit: contain; }
/* Fixed Astro nav is 80px tall in both breakpoints; reserve its space on archives. */
.zg-collection-page .zg-collection-intro { padding-top: 112px; padding-bottom: 12px; }
.zg-collection-page .zg-collection-grid { padding-top: 32px; padding-bottom: 48px; }
.zg-collection-intro .text-center > span:first-child { font-size: 2.25rem; margin-bottom: 12px; }
.zg-collection-intro h1 { line-height: 1.14; overflow-wrap: anywhere; }
.zg-collection-intro .mt-8 { margin-top: 20px; }
/* The other standard archive pages share the original pt-40 banner markup. */
main > section:first-child > div > .text-center.pt-40 { padding-top: 112px; }
main > section:first-child > div.py-18:has(> .text-center.pt-40) { padding-block: 0 12px; }
main > section:first-child:has(> div > .text-center.pt-40) + section { padding-top: 32px; }
@media (max-width: 640px) {
    .zg-catalog-body { padding: 9px 10px 10px; }
    .zg-catalog-body h3 { font-size: .875rem; }
    .zg-catalog-meta { font-size: .78rem; }
    .zg-collection-page .zg-collection-intro, main > section:first-child > div > .text-center.pt-40 { padding-top: 100px; }
    .zg-collection-page .zg-collection-grid { padding-top: 24px; }
}
@media (prefers-reduced-motion: reduce) { .zg-catalog-card { transition: none; } }
@media (max-width: 760px) {
    .zg-home-lb-games, .zg-lb-games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .zg-home-lb-game-body, .zg-lb-game-body { padding: 10px; }
    .zg-lb-games-grid .zg-lb-game-body h3 { font-size: .9rem; min-height: 2.5em; }
    .zg-home-lb-game-meta, .zg-lb-game-meta { gap: 5px; margin-top: 8px; }
    .zg-home-lb-game-meta span, .zg-lb-game-meta span { font-size: .75rem; padding: 4px 7px; }
}
@media (max-width: 319px) {
    .zg-home-lb-games, .zg-lb-games-grid { grid-template-columns: 1fr; }
}
