.photocontent ul.first, .picture ul.first {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 16px;
  margin: 0;
}
.photocontent ul.first::before, .photocontent ul.first::after,
.picture ul.first::before, .picture ul.first::after { display: none; }
.photocontent ul.first > li, .picture ul.first > li { min-width: 0; width: auto; padding: 0; }
.photocontent ul.first img, .picture ul.first img {
  display: block; width: 100%; max-width: 100%; height: 180px;
  object-fit: cover; cursor: pointer; border-radius: 4px;
}
.picture ul.first p { overflow-wrap: anywhere; padding-top: 8px; }
.photo-dialog { border: 0; border-radius: 6px; padding: 16px; width: min(900px, 94vw); max-width: 94vw; max-height: 94vh; overflow: auto; }
.photo-dialog::backdrop { background: rgba(0,0,0,.8); }
.photo-dialog img { display: block; max-width: 100%; max-height: 72vh; object-fit: contain; margin: auto; }
.photo-dialog button { min-width: 44px; min-height: 44px; float: right; margin-bottom: 8px; }
.photo-dialog p { clear: both; text-align: center; white-space: pre-line; padding-top: 12px; }
@media (max-width: 1199px) {
  .photocontent ul.first, .picture ul.first { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .photocontent ul.first, .picture ul.first { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
  .photocontent ul.first img, .picture ul.first img { height: 140px; }
  body .menu-cat { position: relative; float: none; display: flex; width: 100%; height: auto; overflow-x: auto; }
  body .menu-cat .list-group-item { flex: 0 0 auto; }
  body .picture, body .copy-right { float: none; width: 100%; height: auto; }
}
