/* Public gallery, using the existing Osa Plants palette and local serif. */
.gallery-hero { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(100deg, var(--paper), #f1efe7); }
.gallery-hero-inner { position: relative; padding-block: 28px 18px; }
.gallery-hero h1 { margin: 0; font: 500 clamp(50px, 5.6vw, 86px)/1.05 var(--serif); }
.gallery-hero p { margin: 4px 0 18px; color: var(--muted); font-size: clamp(23px, 2.1vw, 32px); line-height: 1.2; }
.gallery-foliage { position: absolute; z-index: -1; right: -35px; top: -125px; width: min(38vw, 590px); height: auto; opacity: .68; pointer-events: none; transform: rotate(12deg); }
.gallery-filters { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; max-width: 980px; }
.gallery-filter { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 10px 28px; border: 1px solid transparent; border-radius: 5px; background: #eeebe5; color: var(--ink); font: 500 19px/1.2 var(--serif); text-align: center; }
.gallery-filter:hover { background: var(--green-100); border-color: var(--green-700); }
.gallery-filter.is-active { color: #fff; background: var(--green-800); }
.gallery-season-filter { min-width: 0; }
.gallery-season-filter summary { cursor: pointer; list-style: none; }
.gallery-season-filter summary::-webkit-details-marker { display: none; }
.gallery-season-links { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.gallery-season-filter[open] { flex-basis: 100%; }
.gallery-season-filter[open] summary { width: fit-content; }
.gallery-results { padding: 12px max(12px, calc((100vw - 1900px) / 2)) 28px; }
.gallery-grid { columns: 5; column-gap: 12px; }
.gallery-card { position: relative; display: block; min-height: 100px; margin-bottom: 12px; border-radius: 5px; overflow: hidden; break-inside: avoid; background: #e7e8de; }
.gallery-card img { display: block; width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.gallery-card:nth-child(7n + 1) img { aspect-ratio: 4/5; }
.gallery-card:nth-child(7n + 3) img { aspect-ratio: 1/1; }
.gallery-card:nth-child(7n + 5) img { aspect-ratio: 3/2; }
.gallery-open { position: absolute; left: 50%; top: 50%; display: flex; align-items: center; justify-content: center; gap: 10px; max-width: calc(100% - 20px); width: max-content; min-height: 46px; padding: 10px 20px; border-radius: 50px; color: #fff; background: rgb(31 48 28 / 90%); font-size: 20px; line-height: 1.15; text-align: center; opacity: 0; transform: translate(-50%, -50%); transition: opacity 160ms ease; }
.gallery-open svg { flex-shrink: 0; }
.gallery-card:hover .gallery-open, .gallery-card:focus-visible .gallery-open { opacity: 1; }
.gallery-preview-empty { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; min-height: 180px; padding: 20px; color: var(--green-800); background: radial-gradient(ellipse at top left, #eef0e7, #dddccd); text-align: center; overflow-wrap: anywhere; }
.gallery-preview-empty small { font: 13px/1.3 var(--sans); }
.gallery-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; }
.gallery-pagination a, .gallery-pagination > span { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 6px; border-radius: 50%; background: #eeebe5; }
.gallery-pagination a[aria-current="page"], .gallery-pagination a:hover { color: #fff; background: var(--green-800); }
.gallery-empty { padding-block: 50px 80px; text-align: center; }
.gallery-empty h2 { margin: 0 0 10px; font-size: 36px; font-weight: 500; }
.gallery-empty p { margin: 0 auto 22px; max-width: 600px; font-size: 23px; }
.gallery-hero :focus-visible, .gallery-results :focus-visible { outline: 3px solid var(--green-700); outline-offset: 4px; }
.gallery-viewer { min-height: 75vh; color: #f9f8ef; background: radial-gradient(ellipse at 45% 35%, #283c29, #182c1d 85%); }
.gallery-viewer-inner { max-width: 1840px; margin-inline: auto; padding: 16px clamp(16px, 4.8vw, 90px) 26px; }
.gallery-back { display: inline-flex; align-items: center; gap: 22px; min-height: 48px; margin-bottom: 14px; font: 500 clamp(30px, 2.7vw, 46px)/1.15 var(--serif); }
.gallery-back > span { font: 300 45px/.8 var(--serif); }
.gallery-stage { position: relative; padding-inline: 74px; }
.gallery-image-frame { display: flex; align-items: center; justify-content: center; min-width: 0; height: min(57vh, 720px); }
.gallery-main-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 5px; object-fit: contain; }
.gallery-arrow { position: absolute; top: 50%; display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid #7e8c75; border-radius: 50%; background: rgb(255 255 255 / 3%); font: 300 40px/1 var(--serif); transform: translateY(-50%); }
.gallery-arrow:hover { background: rgb(255 255 255 / 14%); }
.gallery-arrow-previous { left: 0; }
.gallery-arrow-next { right: 0; }
.gallery-photo-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 350px); align-items: center; gap: 32px; margin: 24px 22px 25px; }
.gallery-photo-description { min-width: 0; }
.gallery-photo-description h1 { margin: 0 0 12px; font: 500 clamp(30px, 2.6vw, 43px)/1.08 var(--serif); overflow-wrap: anywhere; }
.gallery-photo-meta { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; font-size: 23px; line-height: 1.2; }
.gallery-photo-meta time { display: flex; align-items: center; gap: 12px; }
.gallery-photo-meta svg { flex-shrink: 0; }
.gallery-photo-meta p { margin: 0; overflow-wrap: anywhere; }
.gallery-photo-meta time + p { padding-left: 24px; border-left: 1px solid #75816b; }
.gallery-related { min-width: 0; padding-left: 28px; border-left: 1px solid #617057; }
.gallery-related > p { margin: 0 0 10px; font-size: 20px; line-height: 1.2; }
.gallery-related-link { display: flex; align-items: stretch; gap: 12px; min-height: 60px; font-size: 21px; line-height: 1.1; }
.gallery-related-link > img { width: 90px; height: 65px; border-radius: 4px; object-fit: cover; }
.gallery-related-link > span { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 1; padding: 12px 18px; border-radius: 5px; background: #3b5139; }
.gallery-related-link:hover > span { background: #4a6247; }
.gallery-thumbnails { display: flex; align-items: stretch; gap: 12px; overflow-x: auto; padding: 5px; scrollbar-color: #84947d #243823; }
.gallery-thumbnails > a { flex: 1 0 min(130px, 13vw); min-width: 70px; max-width: 200px; height: clamp(70px, 7vw, 112px); min-height: 44px; border: 2px solid transparent; border-radius: 5px; overflow: hidden; }
.gallery-thumbnails > a[aria-current="true"] { border-color: #fbfaef; }
.gallery-thumbnails img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbnails .gallery-preview-empty { min-height: 100%; height: 100%; padding: 8px; font-size: 15px; line-height: 1; gap: 4px; }
.gallery-thumbnails .gallery-preview-empty small { font-size: 10px; }
.gallery-viewer :focus-visible { outline: 3px solid #f4e4ab; outline-offset: 4px; }
@media (min-width: 1700px) { .gallery-grid { columns: 6; } }
@media (max-width: 1199px) {
    .gallery-grid { columns: 4; }
    .gallery-photo-info { grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 20px; margin-inline: 0; }
    .gallery-related { padding-left: 20px; }
    .gallery-related-link > img { display: none; }
    .gallery-stage { padding-inline: 60px; }
    .gallery-arrow { width: 46px; height: 46px; }
    .gallery-photo-meta { font-size: 21px; }
}
@media (max-width: 900px) {
    .gallery-grid { columns: 3; }
    .gallery-filter { padding-inline: 18px; }
    .gallery-foliage { width: 320px; opacity: .35; top: -55px; }
    .gallery-photo-info { grid-template-columns: 1fr; }
    .gallery-related { border-left: 0; border-top: 1px solid #617057; padding: 16px 0 0; }
    .gallery-related-link { max-width: 340px; }
    .gallery-related-link > img { display: block; }
    .gallery-image-frame { height: min(56vh, 620px); }
}
@media (max-width: 600px) {
    .gallery-hero-inner { padding-block: 24px 16px; }
    .gallery-hero h1 { font-size: clamp(44px, 12vw, 65px); }
    .gallery-hero p { max-width: 300px; font-size: 23px; }
    .gallery-filters { gap: 8px; }
    .gallery-filter { padding: 10px 14px; min-height: 44px; font-size: 18px; }
    .gallery-season-links { gap: 7px; }
    .gallery-results { padding: 10px 10px 24px; }
    .gallery-grid { columns: 2; column-gap: 10px; }
    .gallery-card { margin-bottom: 10px; }
    .gallery-open { min-height: 36px; padding: 7px 10px; font-size: 15px; }
    .gallery-open span { display: none; }
    .gallery-open svg { width: 20px; height: 20px; }
    .gallery-preview-empty { padding: 15px 8px; min-height: 130px; font-size: 19px; }
    .gallery-viewer-inner { padding: 14px 12px 22px; }
    .gallery-back { font-size: 32px; gap: 14px; }
    .gallery-stage { padding: 0 0 56px; }
    .gallery-image-frame { height: min(56vh, 480px); min-height: 180px; }
    .gallery-arrow { top: auto; bottom: 0; width: 44px; height: 44px; transform: none; }
    .gallery-arrow-previous { left: calc(50% - 54px); }
    .gallery-arrow-next { right: calc(50% - 54px); }
    .gallery-photo-info { margin-block: 18px 20px; gap: 18px; }
    .gallery-photo-description h1 { font-size: 32px; }
    .gallery-photo-meta { display: block; font-size: 22px; }
    .gallery-photo-meta time + p { border-left: 0; padding: 10px 0 0; }
    .gallery-thumbnails { gap: 8px; }
    .gallery-thumbnails > a { flex-basis: 100px; min-width: 100px; height: 70px; }
}
@media (max-width: 349px) { .gallery-grid { columns: 1; } .gallery-filter { padding-inline: 12px; } }
@media (hover: none) { .gallery-open { left: auto; right: 8px; top: auto; bottom: 8px; opacity: 1; transform: none; width: 36px; min-height: 36px; padding: 7px; } .gallery-open span { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .gallery-open { transition: none; } }
