.gallery-page { background: var(--paper); }
.gallery-intro { padding: 48px 0 38px; color: #fff; background: radial-gradient(ellipse at 90% 0, #35336a 0, transparent 60%), #11141a; }
.gallery-breadcrumb { display: inline-flex; align-items: center; min-height: 44px; color: #c4c5d2; font-size: 14px; }
.gallery-intro .section-label { display: block; color: var(--acid); margin-top: 12px; }
.gallery-intro h1 { margin: 14px 0 18px; max-width: 900px; font-size: clamp(36px, 4.5vw, 64px); line-height: 1.15; letter-spacing: -.04em; }
.gallery-intro p { max-width: 800px; color: #c5c8d4; line-height: 1.85; margin: 0; }
.gallery-toolbar { position: sticky; top: 76px; z-index: 50; padding-block: 14px; border-bottom: 1px solid var(--line); background: #f6f4eff5; backdrop-filter: blur(12px); }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-filters button { min-height: 44px; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: transparent; font-size: 14px; cursor: pointer; }
.gallery-filters button[aria-pressed='true'] { color: #fff; background: var(--ink); border-color: var(--ink); }
.gallery-results { margin: 20px 0 18px; color: var(--muted); font-size: 14px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; padding-bottom: 36px; }
.gallery-card { margin: 0; overflow: hidden; min-width: 0; border-radius: 18px; border: 1px solid var(--line); background: #fff; }
.gallery-card[hidden] { display: none; }
.gallery-card a { display: block; }
.gallery-card img { width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; transition: transform .2s ease; }
.gallery-card a:hover img { transform: scale(1.025); }
.gallery-card figcaption { padding: 15px 18px 18px; }
.gallery-card small { display: block; margin-bottom: 7px; color: var(--violet); font-size: 11px; font-weight: 850; }
.gallery-card h2 { margin: 0; font-size: 17px; line-height: 1.5; }
.gallery-source { padding: 22px 0 36px; border-top: 1px solid var(--line); }
.gallery-source p { max-width: 850px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.gallery-source .button { margin-top: 8px; }
.photo-viewer { width: min(1180px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #ffffff30; border-radius: 18px; color: #fff; background: #11141a; }
.photo-viewer::backdrop { background: #05060bea; }
.viewer-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 14px; }
.viewer-top p { margin: 0; color: #c5c8d4; font-size: 13px; }
.photo-viewer button { min-height: 44px; min-width: 44px; padding: 8px 14px; border: 1px solid #ffffff38; border-radius: 10px; color: #fff; background: #ffffff0c; cursor: pointer; }
.viewer-media { min-height: 100px; display: grid; place-items: center; }
.viewer-media img { display: block; width: 100%; max-height: calc(100dvh - 210px); object-fit: contain; }
.viewer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; }
.viewer-caption { margin: 0; line-height: 1.6; font-size: 15px; }
.viewer-navigation { display: flex; flex-shrink: 0; gap: 8px; }
html:has(.photo-viewer[open]) { overflow: clip; }
.gallery-page .site-footer { padding-block: 8px 24px; }
.gallery-page .footer-bottom { margin-top: 12px; padding-top: 24px; }
@media (max-width: 980px) {
 .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .gallery-toolbar { top: 76px; }
}
@media (max-width: 680px) {
 .gallery-intro { padding-block: 24px 30px; }
 .gallery-intro h1 { font-size: clamp(32px,9vw,44px); }
 .gallery-intro p { font-size: 14px; }
 .gallery-toolbar { position: static; padding-block: 12px; }
 .gallery-filters { gap: 7px; }
 .gallery-filters button { padding-inline: 13px; font-size: 13px; }
 .gallery-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
 .gallery-results { line-height: 1.6; }
 .photo-viewer { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
 .viewer-top { padding: 8px; }
 .viewer-bottom { align-items: stretch; flex-direction: column; gap: 12px; padding: 12px; }
 .viewer-navigation { justify-content: space-between; }
 .viewer-navigation button { flex: 1; }
 .viewer-media img { max-height: calc(100dvh - 250px); }
}
@media (prefers-reduced-motion: reduce) { .gallery-card img { transition: none; } }
