#photos .cpj-gallery-intro { margin: 0 0 26px; }
#photos .cpj-gallery-group + .cpj-gallery-group { margin-top: 38px; }
#photos .cpj-gallery-group h3 { margin: 0 0 16px; }
#photos .cpj-gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
#photos .cpj-gallery-link {
  display: block;
  border: 1px solid #ffffff40;
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  background: #101b32;
  overflow: hidden;
}
#photos .cpj-gallery-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#photos .cpj-gallery-link:hover { border-color: #ffdb72; }
#photos :is(a, button):focus-visible { outline: 3px solid #ffdb72; outline-offset: 3px; }

#cpj-photo-viewer {
  width: min(94vw, 1000px);
  max-height: 96dvh;
  padding: 12px;
  margin: auto;
  border: 1px solid #ffffff40;
  border-radius: 16px;
  background: #0d172c;
  color: #fff;
  box-sizing: border-box;
}
#cpj-photo-viewer::backdrop { background: #000d; }
#cpj-photo-viewer .cpj-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
#cpj-photo-caption { margin: 0; font-size: .9rem; }
#cpj-photo-viewer .cpj-viewer-image {
  display: block;
  width: 100%;
  height: min(72dvh, 760px);
  max-height: calc(96dvh - 138px);
  margin: 10px 0;
  object-fit: contain;
}
#cpj-photo-viewer button {
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #ffffff55;
  border-radius: 8px;
  background: #263454;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
@media (max-width: 850px) {
  #photos .cpj-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  #photos .cpj-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
