.gallery-enlarge { position:relative; display:block; width:100%; padding:0; border:0; background:transparent; cursor:zoom-in; }
.gallery-panel { border:1px solid #ffffff28; border-top:2px solid #ff2430; background:#101014; overflow:hidden; scroll-margin-block:calc(var(--header-height,82px) + 12px) 12px; }
.gallery-panel-heading { display:flex; justify-content:space-between; gap:12px; padding:12px 18px; border-bottom:1px solid #ffffff18; font:600 .875rem/1.4 var(--type-body); color:#eee; }
.gallery-panel-heading span:last-child { color:#b4b4bd; }
.gallery-panel-heading[hidden],.gallery-toggle[hidden],.gallery-load-zone button[hidden] { display:none; }
.gallery-scrollport { padding:16px; }
.gallery-panel.is-expanded .gallery-scrollport { height:min(68svh,780px); overflow-y:auto; overscroll-behavior-y:contain; scrollbar-gutter:stable; scrollbar-width:thin; scrollbar-color:#ff4651 #202026; scroll-padding:12px; }
.gallery-scrollport:focus-visible { outline:2px solid #ff6971; outline-offset:-3px; }
.gallery-scrollport::-webkit-scrollbar { width:8px; }
.gallery-scrollport::-webkit-scrollbar-track { background:#202026; }
.gallery-scrollport::-webkit-scrollbar-thumb { background:#ff4651; border-radius:8px; }
.gallery-panel-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 16px; border-top:1px solid #ffffff24; background:#19191e; }
.gallery-panel-footer p { margin:0; color:#bfc0c8; font-size:.875rem; }
.gallery-toggle { display:inline-flex; align-items:center; justify-content:center; gap:14px; min-height:48px; padding:12px 18px; border:1px solid #ff6971; background:#d70e1c; color:#fff; cursor:pointer; font:600 1rem/1.3 var(--type-body); flex-shrink:0; }
.gallery-toggle-icon { flex:none; transition:transform .18s; }
.gallery-toggle[aria-expanded="true"] { background:#26262e; border-color:#ffffff50; }
.gallery-toggle[aria-expanded="true"] .gallery-toggle-icon { transform:rotate(180deg); }
.gallery-toggle:hover { background:#b80b17; border-color:#ff6971; }
.gallery-toggle:focus-visible { outline:3px solid #ff3442; outline-offset:3px; }
.gallery-load-zone { display:flex; justify-content:center; }
.gallery-load-zone button:not([hidden]) { margin-top:20px; cursor:pointer; }
.gallery-load-zone button:disabled { opacity:.65; cursor:wait; }
.home-page #gallery.archive-gallery .gallery-panel .archive-grid { gap:12px !important; }
.home-page #gallery.archive-gallery .gallery-panel:not(.is-expanded) .archive-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
.home-page #gallery.archive-gallery .gallery-panel.is-expanded .archive-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
@media(max-width:700px) {
  .gallery-scrollport { padding:10px; }
  .gallery-panel.is-expanded .gallery-scrollport { height:68svh; }
  .gallery-panel-heading { padding:10px 12px; }
  .gallery-panel-heading span:first-child { display:none; }
  .gallery-panel-footer { gap:10px; padding:10px; }
  .gallery-panel-footer p { max-width:11ch; line-height:1.3 !important; }
  .gallery-toggle { padding:12px; gap:8px; font-size:.9375rem; }
  .home-page #gallery.archive-gallery .gallery-panel:not(.is-expanded) .archive-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .home-page #gallery.archive-gallery .gallery-panel.is-expanded .archive-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
  .home-page #gallery.archive-gallery .gallery-panel .archive-grid { gap:10px !important; }
}
@media(prefers-reduced-motion:reduce) { .gallery-toggle-icon { transition:none; } }
.home-page #gallery.archive-gallery .archive-grid figure[hidden] { display:none !important; }
.home-page #gallery.archive-gallery .archive-grid figcaption { display:none; }
.gallery-enlarge:focus-visible { outline:3px solid #ff3442; outline-offset:4px; }
body.gallery-lightbox-open { overflow:hidden; }
.gallery-lightbox { width:min(1100px,calc(100% - 24px)); max-width:1100px; max-height:calc(100dvh - 24px); padding:0; margin:auto; border:1px solid #ffffff50; background:#111115; color:#f5f5f2; box-shadow:0 20px 80px #0009; }
.gallery-lightbox::backdrop { background:#050507e8; }
.gallery-lightbox-frame { display:flex; flex-direction:column; align-items:center; padding:12px; gap:12px; }
.gallery-lightbox-close { position:fixed; top:max(12px,env(safe-area-inset-top)); right:max(12px,env(safe-area-inset-right)); z-index:2; display:grid; place-items:center; width:56px; height:56px; padding:0; border:1px solid #ffffff40; border-radius:0; background:#111115; color:white; box-shadow:0 4px 20px #0008; font:500 2.25rem/1 var(--type-body),sans-serif; cursor:pointer; }
.gallery-lightbox-close span { display:block; }
.gallery-lightbox-close:hover { background:#29292f; border-color:#ff6971; }
.gallery-lightbox img { display:block; width:auto; height:auto; max-width:100%; max-height:calc(100dvh - 190px); object-fit:contain; }
.gallery-lightbox p { margin:0; padding:0 8px 4px; font:500 1rem/1.5 var(--type-body),sans-serif; text-align:center; }
.gallery-lightbox button:focus-visible { outline:3px solid #ff3442; outline-offset:3px; }
