.gallery-heading { padding: clamp(48px, 8vw, 88px) 0 42px; }
.gallery-heading .micro, .gallery-heading p { color: var(--muted); }
.gallery-heading h1 { font-size: clamp(32px, 6vw, 56px); margin: 18px 0 12px; }
.gallery-heading p { font-size: 14px; margin: 0; }
.gallery-grid { columns: 3; column-gap: 24px; list-style: none; margin: 0; padding: 0 0 56px; }
.gallery-item { break-inside: avoid; margin: 0 0 28px; }
.gallery-item figure { margin: 0; }
.gallery-photo { display: block; background: var(--soft); cursor: zoom-in; }
.gallery-photo img { display: block; width: 100%; height: auto; }
.gallery-photo:focus-visible { outline-offset: 4px; }
.gallery-photo:hover { opacity: .9; }
.gallery-item figcaption { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 10px; overflow-wrap: anywhere; }
.gallery-empty { border-top: 1px solid var(--line); padding: 40px 0 88px; margin: 0; color: var(--muted); font-size: 15px; }
body.is-gallery-open { overflow: hidden; }
.lightbox { width: min(1120px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 16px 20px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); overscroll-behavior: contain; }
.lightbox::backdrop { background: #000c; }
.lightbox-toolbar, .lightbox-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lightbox-toolbar p { margin: 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.lightbox button { background: transparent; border: 1px solid var(--line); padding: 8px 14px; min-height: 44px; cursor: pointer; font-size: 13px; }
.lightbox button:hover { background: var(--soft); }
.lightbox button:disabled { opacity: .4; cursor: default; }
.lightbox-figure { margin: 16px 0; }
.lightbox-figure img { display: block; margin: auto; width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 240px); max-height: calc(100dvh - 240px); object-fit: contain; }
.lightbox-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; overflow-wrap: anywhere; }
@media (min-width: 1400px) { .gallery-grid { column-gap: 28px; } }
@media (max-width: 900px) { .gallery-grid { columns: 2; gap: 20px; } }
@media (max-width: 540px) {
    .gallery-grid { columns: 1; }
    .lightbox { width: calc(100vw - 16px); padding: 12px; max-height: calc(100dvh - 16px); }
}
@media (max-height: 480px) {
    .lightbox { padding: 8px 12px; }
    .lightbox-figure { margin: 8px 0; }
    .lightbox-figure img { max-height: calc(100dvh - 180px); }
}
