.gallery-stage {
  height: 100%;
  min-height: 0;
}

.gallery-image-frame {
  align-self: center;
  justify-self: center;
  width: auto;
  height: auto;
  max-width: calc(100vw - 11rem);
  max-height: calc(100svh - 13.5rem);
  overflow: visible;
}

.gallery-main-image {
  width: auto !important;
  height: auto !important;
  max-width: calc(100vw - 11rem) !important;
  max-height: calc(100svh - 13.5rem) !important;
  object-fit: contain;
}

@media (max-width: 840px) {
  .gallery-image-frame {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
  }

  .gallery-main-image {
    max-width: 100% !important;
    max-height: 100% !important;
  }
}

@media (max-width: 620px) {
  .site-header {
    position: sticky !important;
    top: 0 !important;
  }

  .category-tabs {
    position: relative !important;
    top: auto !important;
  }

  .album-cover,
  .album-card:nth-child(5n+1) .album-cover,
  .album-card:nth-child(5n) .album-cover {
    aspect-ratio: 16 / 12 !important;
  }

  .album-cover img {
    object-position: center center;
  }

  #album-card-works1 .album-cover img {
    object-position: center 10%;
  }

  #album-card-works5 .album-cover img {
    object-position: center 18%;
  }

  #album-card-works2 .album-cover img {
    object-position: center 26%;
  }

  #album-card-works3 .album-cover img {
    object-position: center center;
  }

  #album-card-works4 .album-cover img {
    object-position: center 22%;
  }
}
