/* ── Canonical culture-card geometry ────────────────────────────────────────────
   The cards stretched because every grid was declared minmax(N, 1fr) inside a wide
   container: the 1fr absorbed the leftover width, so a "190px minimum" rendered at
   219px and grew with the viewport. The original card was a fixed 168x124.

   This file loads AFTER main.css and after the four theme stylesheets, so it wins
   without !important and without editing the themes. Themes keep their own colour,
   border and type treatment; only the box is pinned.

   Card name sizes come from main.css's container query (cqw), so type scales itself
   down with the box — no font sizes need touching here. */

.culture-grid,
html[data-theme] .culture-grid {
  grid-template-columns: repeat(auto-fill, 168px);
  justify-content: start;
  gap: 10px;
}

.culture-card,
html[data-theme] .culture-card {
  width: 168px;
  height: 124px;
  aspect-ratio: auto;       /* main.css sets 3/2, which is 112px at this width */
}

/* The themes also redefined the card's overlay variables (a bottom-heavy dark gradient,
   a light editorial wash, etc.). Rules alone were not enough — restore the original
   overlay so the card reads exactly as it did before the theme change. */
html[data-theme],
html[data-theme] .culture-card {
  --card-scrim: linear-gradient(rgba(12, 10, 8, .42), rgba(12, 10, 8, .42));
  --card-scrim-hover: linear-gradient(rgba(12, 10, 8, .24), rgba(12, 10, 8, .24));
  --card-wash: rgba(14, 12, 10, .62);
}

/* Below the card pair width, let two cards share the row and keep the 168:124 ratio
   instead of overflowing the viewport. */
@media (max-width: 420px) {
  .culture-grid,
  html[data-theme] .culture-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .culture-card,
  html[data-theme] .culture-card {
    width: auto;
    height: auto;
    aspect-ratio: 168 / 124;
  }
}
