.gallery {
  min-width: 50vw;
  display: grid;
  grid-template-columns: repeat(2, 1fr);

  place-content: center;

  &:has(img:nth-child(10)) {
    grid-template-columns: repeat(4, 1fr);
  }

  &:has(img:nth-child(30)) {
    grid-template-columns: repeat(10, 1fr);
  }

  img {
    width: 100%;
    height: auto;
    display: block;
  }
}

header {
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}