.album-list li:not(:last-child) {
  margin-bottom: 1rem;
}

.album-description {
  margin-top: 0.5rem;
  white-space: pre-wrap;
}

/* Row-major grid: photos read left-to-right, top-to-bottom so an album's
   general flow stays consistent across column counts. The `masonry` Stimulus
   controller enhances this into tight-packed columns; without JS it degrades to
   a plain grid (short photos leave whitespace below, but order is preserved). */
.album-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}

@media (max-width: 1344px) {
  .album-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 460px) {
  .album-photo-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

.album-photo-grid-thumb {
  display: block;
  background: lightgray;
}

.album-photo-grid-thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.2s ease;
}

.album-photo-grid-thumb:hover img {
  opacity: 0.85;
}

.photo-page-image {
  width: 100%;
  height: auto;
  display: block;
}

.photo-page-title {
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  margin-bottom: 0.5rem;
}

.photo-page-caption {
  margin-bottom: 1rem;
  white-space: pre-wrap;
}
