/* Keep the bathroom galleries balanced on desktop without cropping photos. */
@media (min-width: 751px) {
  main .project-photos:not(:has(>.matched-comparison)) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    max-width: 1400px;
    margin-inline: auto;
  }
  main .project-photos::before { flex: 0 0 100%; }
  main .project-photos:not(:has(>.matched-comparison)) > figure {
    flex: 0 1 calc((100% - 48px) / 3);
    max-width: 440px;
    min-width: 0;
  }
  main .project-photos.two:not(:has(>.matched-comparison)) > figure,
  main .project-photos:has(> figure:nth-of-type(4)):not(:has(> figure:nth-of-type(5))):not(:has(>.matched-comparison)) > figure {
    flex-basis: calc((100% - 24px) / 2);
    max-width: 560px;
  }
  main .project-photos:not(:has(>.matched-comparison)) > figure:only-of-type {
    flex-basis: 100%;
    max-width: 560px;
  }
  main .project-photos:has(> figure:only-of-type):not(:has(>.matched-comparison)) {
    max-width: 660px;
  }
  main .project-photos:not(:has(>.matched-comparison)) > figure img {
    height: clamp(260px, 30vw, 420px) !important;
    width: 100%;
    object-fit: contain;
  }
  main .project-photos:not(:has(>.matched-comparison)) > figure:only-of-type img {
    height: clamp(360px, 44vw, 580px) !important;
  }
}
