/* The album links sit below the separate car-driving controls. */
.car-album-link {
  display: block;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.car-album-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.car-album-preview img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 5px;
  background: var(--surface);
}
.car-album-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font: 12px/1.6 var(--sans);
  color: var(--accent);
}
.car-album-label > span:last-child { color: var(--clay); }
.car-album-link:hover .car-album-label { color: var(--clay); }
.car-album-link:focus-visible,
.trip-album-link:focus-visible,
.road-album-dialog button:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

/* Posted maps stay static; these separate links open the trip photographs. */
.travel-map { display: flex; flex-direction: column; align-items: stretch; }
.travel-map > img { flex: 0 0 auto; }
.travel-map > figcaption { display: flex; flex: 1; flex-direction: column; }
.trip-card-copy { padding-bottom: 18px; }
.trip-album-link { display: block; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); text-decoration: none; }
.travel-map .trip-album-link { margin-top: auto; }
.trip-album-preview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.trip-album-preview img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; background: var(--surface); }
.trip-album-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 9px; color: var(--accent); font: 12px/1.6 var(--sans); }
.trip-album-label > span { color: var(--clay); }
.trip-album-link:hover .trip-album-label { color: var(--clay); }

/* Share the park viewer's restrained, medium native-dialog composition. */
.road-album-dialog { width: min(760px, calc(100% - 30px)); }
.road-album-dialog .photo-dialog-close { flex-shrink: 0; }
.road-album-dialog .photo-stage { background: var(--stage-bg); }
.road-album-photo {
  display: block;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.road-album-dialog .road-album-caption {
  margin-top: 12px;
  color: var(--muted);
  font: 12px/1.7 var(--sans);
  overflow-wrap: anywhere;
}
.road-album-dialog .photo-dialog-controls {
  justify-content: center;
  flex-wrap: wrap;
}
.road-album-count {
  min-width: 5ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.road-album-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 7px;
  width: 100%;
  min-width: 0;
  max-height: 128px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 5px 5px;
}
.road-album-thumbs button {
  width: 100%;
  min-width: 0;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 4px;
  background: none;
  cursor: pointer;
}
.road-album-thumbs button[aria-pressed="true"] { border-color: var(--clay); }
.road-album-thumbs img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
@media (max-width: 600px) {
  .road-album-dialog { width: calc(100% - 16px); }
}
