.gallery-browser {
    min-height: 70vh;
    padding: 150px 0 64px;
    background: linear-gradient(160deg, #1c382b, #101f19 75%);
    color: var(--surface);
    scroll-margin-top: 0;
}

.gallery-browser [hidden],
.gallery-page .lightbox-controls[hidden] {
    display: none !important;
}

.gallery-page-title {
    margin: 0 0 26px;
    font-family: "Playfair Display", serif;
    font-size: clamp(2.3rem, 5vw, 3.5rem);
    line-height: 1.1;
}

.gallery-browse-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(213, 181, 122, 0.24);
    border-radius: 18px;
    background: rgba(8, 18, 14, 0.42);
}

.gallery-filters button,
.gallery-back,
.gallery-album-open {
    min-height: 44px;
    padding: 9px 16px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--surface);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.gallery-filters button[aria-pressed="true"] {
    background: var(--surface);
    color: var(--forest);
}

.gallery-filters button:hover:not([aria-pressed="true"]),
.gallery-back:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gallery-wall {
    columns: 4;
    column-gap: 14px;
}

.gallery-photo {
    display: block;
    break-inside: avoid;
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 12px;
    background: #284333;
    cursor: zoom-in;
}

.gallery-photo img {
    width: 100%;
    height: auto;
    transition: filter 180ms ease;
}

.gallery-photo:hover img {
    filter: brightness(1.08);
}

.gallery-browser :is(button, a):focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.gallery-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.gallery-albums {
    display: grid;
    gap: 14px;
}

.gallery-album {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(213, 181, 122, 0.25);
    border-radius: 22px;
    background: #2c4b36;
}

.gallery-album-scenic-views {
    background: #414d36;
}

.gallery-album-people {
    background: #314a47;
}

.gallery-album-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.gallery-album-heading h2 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.3;
}

.gallery-album-heading div > span {
    color: #e0d7bf;
    font-size: 0.8rem;
}

.gallery-album-open {
    flex-shrink: 0;
    padding: 8px;
    color: #f0d6a5;
    font-size: 0.8rem;
}

.gallery-album-previews {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 4px 4px 8px;
    margin: -4px -4px -8px;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #d5b57a transparent;
}

.gallery-preview {
    flex: 0 0 96px;
    height: 96px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #152b21;
    scroll-snap-align: start;
    cursor: zoom-in;
}

.gallery-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-page .lightbox-caption {
    padding: 18px 24px 12px;
}

.gallery-page [data-lightbox-description]:empty {
    display: none;
}

.gallery-page .lightbox-caption h3 {
    font-size: clamp(1.3rem, 3vw, 2rem);
    overflow-wrap: anywhere;
}

.gallery-page .lightbox-meta {
    margin-bottom: 8px;
    font-size: 0.65rem;
}

@media (min-width: 821px) and (max-width: 1199px) {
    .gallery-wall { columns: 3; }
}

@media (max-width: 820px) {
    .gallery-browser { padding: 132px 0 40px; }
    .gallery-page-title { margin-bottom: 20px; }
    .gallery-wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; columns: auto; }
    .gallery-photo { margin-bottom: 0; }
    .gallery-back { padding-left: 0; }
    .gallery-browse-controls { gap: 8px; margin-bottom: 16px; }
    .gallery-filters { gap: 2px; padding: 3px; border-radius: 12px; }
    .gallery-filters button { padding: 8px 10px; font-size: 0.75rem; }
    .gallery-page .lightbox-caption { padding: 16px 18px 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-photo img { transition: none; }
}
