/* Photo gallery grid and full-screen viewer (used by js/gallery.js) */
.photo-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 16px 0; }
.photo-gallery a { display: block; }
.photo-gallery img { display: block; width: 100%; height: 160px; object-fit: cover; border: 1px solid #ccc; margin: 0; }

.pv-box { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.9); display: none; align-items: center; justify-content: center; z-index: 1000; }
.pv-box.open { display: flex; }
.pv-frame { position: relative; display: inline-block; max-width: 94vw; }
.pv-frame img { display: block; max-width: 94vw; max-height: 88vh; object-fit: contain; margin: 0; border: 0; }
.pv-frame button { position: absolute; top: 50%; transform: translateY(-50%); font-size: 44px; line-height: 1; color: #fff; background: rgba(0, 0, 0, 0.45); border: 0; border-radius: 4px; cursor: pointer; padding: 6px 12px; }
.pv-frame.pv-loading button { display: none; }
.pv-frame .pv-prev, .pv-frame .pv-next { position: fixed; top: 50%; transform: translateY(-50%); font-size: 40px; padding: 8px 14px; background: none; }
.pv-frame .pv-prev { left: 12px; right: auto; }
.pv-frame .pv-next { right: 12px; left: auto; }
.pv-close { position: fixed; top: 12px; right: 12px; font-size: 32px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; padding: 4px 12px; }
.pv-rotate { position: fixed; top: 12px; left: 12px; font-size: 30px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; padding: 4px 12px; }
.pv-count { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; }
