/* Only media mosaics: face crops, family groups and detail images are untouched. */
.photo-grid.photo-mosaic,
#family-results.photo-mosaic {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
}
.photo-mosaic > a,
.photo-mosaic > .photo-tile,
#family-results.photo-mosaic > article {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #e9e6db;
}
.photo-mosaic .photo-tile > a { width: 100%; height: 100%; }
.photo-grid.photo-mosaic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.photo-mosaic .photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
}
.photo-mosaic .media-failure {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  margin: 0;
  padding: 12px 32px;
  background: #e9e6db;
  font-size: 12px;
}
.photo-mosaic > .empty { grid-column: 1 / -1; }
.photo-mosaic .photo-tile.is-selected,
#family-results.photo-mosaic article.selected {
  outline: 2px solid var(--red);
  outline-offset: -2px;
  z-index: 1;
}
/* An inset overlay stays above the image without changing its dimensions. */
.photo-mosaic .photo-tile.is-selected::after,
#family-results.photo-mosaic article.selected::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 2px var(--red);
  pointer-events: none;
}
#album-filter-toggle[hidden] { display: none; }
.masthead .album-navigation { flex-wrap: nowrap; align-items: center; }
.masthead #album-filter-toggle {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.masthead #album-filter-toggle[aria-expanded="true"] { color: var(--red); border-bottom-color: var(--red); }
#album-filter-panel { margin: 0; }
#album-filter-panel > summary { cursor: pointer; padding: 8px 0; }
#album-filter-panel.filter-enhanced > summary { display: none; }
@media (max-width: 1000px) {
  .photo-grid.photo-mosaic, #family-results.photo-mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .photo-grid.photo-mosaic, #family-results.photo-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .masthead .album-navigation { gap: 6px; justify-content: space-between; min-width: 0; }
  .masthead .album-navigation a, .masthead #album-filter-toggle { font-size: 13px; white-space: nowrap; }
  .photo-mosaic .photo-hover { padding: 20px 30px 6px 6px; font-size: 11px; }
  .photo-mosaic .photo-select { right: 2px; bottom: 2px; }
}
