.gallery-dialog{position:fixed;inset:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:#101410;color:#fff;box-shadow:none;isolation:isolate}
.gallery-dialog::backdrop{background:#101410;backdrop-filter:none}
.gallery-backdrop{position:absolute;inset:-24px;width:calc(100% + 48px);height:calc(100% + 48px);max-width:none;object-fit:cover;filter:blur(24px) brightness(.38);pointer-events:none;z-index:0}
.gallery-dialog .gallery-stage{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border-radius:0;background:transparent;touch-action:pan-y}
.gallery-dialog #gallery-image{display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;user-select:none}
.gallery-dialog .gallery-bar{position:absolute;inset:0 0 auto;z-index:3;align-items:flex-start;padding:24px 28px 48px;gap:20px;background:linear-gradient(#000b,#0006 65%,transparent);pointer-events:none}
.gallery-heading{min-width:0;max-width:850px;pointer-events:auto;text-shadow:0 1px 8px #0008}
.gallery-dialog .gallery-bar h2{font-size:clamp(20px,2.4vw,30px);line-height:1.25;letter-spacing:-.5px;margin:6px 0 0;color:#fff}
.gallery-dialog .gallery-bar .eyebrow{color:#ffffffe0;font-size:10px}
.gallery-details-toggle{display:inline-flex;min-height:32px;align-items:center;margin-top:10px;padding:4px 12px;background:#ffffff18;border:1px solid #ffffff40;border-radius:20px;color:#fff;font-size:12px;backdrop-filter:blur(10px);transition:background .2s}
.gallery-dialog .gallery-description{margin-top:10px;max-height:30dvh;overflow-y:auto;color:#fff;font-size:14px;line-height:1.65;padding:12px 16px;border:1px solid #ffffff20;border-radius:12px;background:#101510b3;backdrop-filter:blur(14px);text-shadow:none}
.gallery-dialog .icon-button{width:44px;height:44px;background:#17211866;border:1px solid #ffffff50;color:#fff;backdrop-filter:blur(12px);pointer-events:auto;transition:background .2s,transform .2s}
.gallery-dialog .gallery-bar>.icon-button{flex-shrink:0}
.gallery-dialog .gallery-stage>.icon-button{z-index:4;top:calc(50% - 22px)}
.gallery-dialog .gallery-prev{left:22px}.gallery-dialog .gallery-next{right:22px}
.gallery-overlay-bottom{position:absolute;inset:auto 0 0;z-index:3;display:flex;flex-direction:column;align-items:center;gap:10px;padding:38px 28px max(16px,env(safe-area-inset-bottom));background:linear-gradient(transparent,#0007 30%,#000b);pointer-events:none}
.gallery-dialog .gallery-photo-copy{padding:10px 16px;max-width:850px;text-align:center;color:#fff;background:#10151066;border:1px solid #ffffff20;border-radius:12px;backdrop-filter:blur(10px);pointer-events:auto}
.gallery-dialog .gallery-photo-copy h3{font-size:17px;line-height:1.3;font-weight:600;color:#fff}
.gallery-dialog .gallery-photo-copy p{margin-top:4px;color:#ffffffe6;font-size:13px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.gallery-dialog .gallery-thumbnails{display:flex;width:max-content;max-width:100%;gap:8px;padding:7px;overflow-x:auto;overscroll-behavior-x:contain;background:#10151066;border:1px solid #ffffff20;border-radius:12px;backdrop-filter:blur(12px);pointer-events:auto;scrollbar-width:thin;scrollbar-color:#ffffff70 transparent}
.gallery-dialog .gallery-thumb{flex:0 0 58px;width:58px;height:58px;border:2px solid transparent;border-radius:8px;background:#ffffff20;opacity:.65;transition:opacity .2s,border-color .2s}
.gallery-dialog .gallery-thumb[aria-current=true]{opacity:1;border-color:#fff}.gallery-dialog .gallery-thumb img{object-fit:cover}
.gallery-dialog .gallery-bottom{width:100%;max-width:850px;padding:0;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px;color:#fff;pointer-events:auto}
.gallery-dialog .gallery-bottom .text-link{width:auto;padding:4px 0;font-size:12px;color:#fff}
@media(hover:hover) and (pointer:fine){.gallery-dialog .icon-button:hover,.gallery-details-toggle:hover{background:#48614be6}.gallery-dialog .gallery-thumb:hover{opacity:1}}
@media(max-width:600px){.gallery-dialog .gallery-bar{padding:16px 14px 36px;gap:12px}.gallery-dialog .gallery-bar h2{font-size:20px}.gallery-dialog .gallery-bar .eyebrow{font-size:9px}.gallery-dialog .icon-button{width:38px;height:38px}.gallery-dialog .gallery-stage>.icon-button{top:calc(50% - 19px)}.gallery-dialog .gallery-prev{left:10px}.gallery-dialog .gallery-next{right:10px}.gallery-dialog .gallery-stage .icon-button svg{width:19px;height:19px}.gallery-dialog .gallery-description{font-size:12px;max-height:25dvh;padding:10px 12px}.gallery-overlay-bottom{padding:30px 12px max(12px,env(safe-area-inset-bottom));gap:8px}.gallery-dialog .gallery-photo-copy{padding:8px 10px}.gallery-dialog .gallery-photo-copy h3{font-size:14px}.gallery-dialog .gallery-photo-copy p{font-size:11px}.gallery-dialog .gallery-thumb{flex-basis:44px;width:44px;height:44px}.gallery-dialog .gallery-thumbnails{gap:6px;padding:5px}.gallery-dialog .gallery-bottom,.gallery-dialog .gallery-bottom .text-link{font-size:11px}.gallery-details-toggle{font-size:11px;min-height:30px;margin-top:8px}}
@media(max-height:520px) and (orientation:landscape){.gallery-dialog .gallery-bar{padding:10px 16px 24px}.gallery-dialog .gallery-bar h2{font-size:18px}.gallery-dialog .gallery-bar .eyebrow{display:none}.gallery-details-toggle{margin-top:4px;min-height:26px}.gallery-overlay-bottom{padding:24px 16px 8px;gap:5px}.gallery-dialog .gallery-photo-copy{padding:6px 10px}.gallery-dialog .gallery-photo-copy h3{font-size:12px}.gallery-dialog .gallery-photo-copy p{display:none}.gallery-dialog .gallery-thumb{width:36px;height:36px;flex-basis:36px}.gallery-dialog .gallery-thumbnails{padding:4px}.gallery-dialog .gallery-bottom{font-size:10px}}
@media(prefers-reduced-motion:reduce){.gallery-dialog .icon-button,.gallery-details-toggle,.gallery-dialog .gallery-thumb{transition:none}}

/* Keep captions below the image, within the full-window viewer. */
.gallery-dialog[open]{display:grid;grid-template-rows:minmax(0,1fr) auto}
.gallery-dialog .gallery-stage{position:relative;inset:auto;grid-row:1;min-height:0;height:100%;width:100%}
.gallery-dialog .gallery-overlay-bottom{position:relative;inset:auto;grid-row:2;min-width:0;padding:12px 28px max(16px,env(safe-area-inset-bottom));background:#10151085;border-top:1px solid #ffffff20;backdrop-filter:blur(14px)}
@media(max-width:600px){.gallery-dialog .gallery-overlay-bottom{padding:10px 12px max(12px,env(safe-area-inset-bottom))}}
@media(max-height:520px) and (orientation:landscape){.gallery-dialog .gallery-overlay-bottom{padding:6px 16px 8px;gap:5px}}
