.gallery-filters {display:flex;flex-wrap:wrap;gap:8px;margin:0 0 30px}
.gallery-filters button,.viewer-tools button {cursor:pointer;font-family:inherit;font-size:.94rem;line-height:1.3;font-weight:600;padding:11px 15px;border-radius:30px;border:1px solid #97a99c;color:var(--ink);background:transparent}
.gallery-filters button[aria-pressed=true] {background:var(--ink);color:white;border-color:var(--ink)}
#portfolio :focus-visible,#photo-view :focus-visible {outline:3px solid #648310;outline-offset:3px}
.gallery-panel {border-top:1px solid #acb9ae;padding-top:20px}
.gallery-panel h3 {font-size:clamp(1.45rem,3vw,2rem);margin:0 0 12px}
.gallery-panel h4 {font-size:1.28rem;margin:30px 0 8px}
.gallery-panel p {max-width:64ch;margin:0 0 18px;color:#41594d}
.gallery-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 16px;margin-top:18px}
.gallery-item {display:block;text-decoration:none;min-width:0}
.gallery-picture {position:relative;display:block;overflow:hidden;border-radius:8px;background:#dce4d9}
.gallery-picture img {width:100%;height:auto;aspect-ratio:1.5;object-fit:cover;display:block}
.gallery-caption {display:block;font-size:.96rem;line-height:1.38;margin-top:8px}
.gallery-item:hover .gallery-caption {text-decoration:underline;text-underline-offset:3px}
.gallery-play {position:absolute;bottom:10px;left:10px;background:#112f27;color:#fff;font-size:.88rem;padding:5px 10px;border-radius:4px}
.gallery-pair {grid-template-columns:repeat(2,minmax(0,1fr))}
.gallery-single {max-width:850px;grid-template-columns:1fr}
.gallery-single img {aspect-ratio:auto;max-height:570px;object-fit:contain}
#photo-view {border:0;padding:16px;border-radius:12px;color:var(--paper);background:#112b25;width:min(1000px,94vw);max-height:94dvh;overflow:auto}
#photo-view::backdrop {background:rgba(5,19,15,.88)}
.viewer-tools {display:flex;gap:12px;align-items:center;justify-content:space-between}
.viewer-tools button {min-height:42px;color:white;border-color:#7b988c}
#photo-view figure {margin:12px 0}
.viewer-stage {display:grid;place-items:center;background:#0c201b;border-radius:5px;overflow:hidden}
.viewer-stage img,.viewer-stage video {display:block;width:100%;height:min(60dvh,650px);object-fit:contain}
#photo-view figcaption {margin:10px 0;font-size:1rem}
@media(max-width:760px){.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 10px}.gallery-filters{gap:6px}.gallery-filters button{font-size:.875rem}.gallery-single{grid-template-columns:1fr}.gallery-caption{font-size:.89rem}}
@media(max-width:420px){.gallery-play{font-size:.78rem;left:5px;bottom:5px;padding:4px 6px}}
