/* V49: compact square galleries.
   The explicit block-size overrides earlier responsive image rules that
   stretched portrait source files to the height of their intrinsic ratio. */
html body .v47-album-shell .v47-album-track,
html body .v47-film-shell .v47-film-track {
  align-items: flex-start !important;
  overscroll-behavior-inline: contain;
}

html body .v47-album-shell .v47-album-track > .v47-album-card,
html body .v47-film-shell .v47-film-track > .v47-film-card {
  --v49-gallery-tile: clamp(176px, 16vw, 216px);
  flex: 0 0 var(--v49-gallery-tile) !important;
  align-self: flex-start !important;
  display: grid !important;
  grid-template-rows: var(--v49-gallery-tile) auto !important;
  width: var(--v49-gallery-tile) !important;
  min-width: var(--v49-gallery-tile) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}

html body .v47-album-shell .v47-album-track > .v47-album-card > img,
html body .v47-film-shell .v47-film-track > .v47-film-card > img {
  display: block !important;
  inline-size: 100% !important;
  block-size: var(--v49-gallery-tile) !important;
  width: 100% !important;
  height: var(--v49-gallery-tile) !important;
  min-height: var(--v49-gallery-tile) !important;
  max-height: var(--v49-gallery-tile) !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: center !important;
}

html body .v47-album-shell .v47-album-track > .v47-album-card > span,
html body .v47-film-shell .v47-film-track > .v47-film-card > span {
  display: flex !important;
  align-items: center !important;
  min-height: 56px !important;
  padding: 10px 12px !important;
  line-height: 1.35 !important;
}

@media (max-width: 1024px) {
  html body .v47-album-shell .v47-album-track > .v47-album-card,
  html body .v47-film-shell .v47-film-track > .v47-film-card {
    --v49-gallery-tile: clamp(164px, 27vw, 198px);
  }
}

@media (max-width: 640px) {
  html body .v47-carousel-head {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 12px !important;
  }

  html body .v47-carousel-head > div:first-child {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  html body .v47-carousel-head > .v47-controls {
    margin-left: auto !important;
  }

  html body .v47-carousel-head h2 {
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  html body .v47-album-shell .v47-album-track > .v47-album-card,
  html body .v47-film-shell .v47-film-track > .v47-film-card {
    --v49-gallery-tile: min(52vw, 184px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .v47-album-track,
  .v47-film-track {
    scroll-behavior: auto !important;
  }
}
