
.gallery{background:#222423}
.gallery-top{flex-shrink:0;border-bottom:1px solid #ffffff0d;padding:18px 3vw;min-height:72px;background:#1c1e1d;position:relative;z-index:2000}
.gallery-top .gallery-heading{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.gallery-total{font-size:12px;color:#a5a7a5;letter-spacing:.06em}
.gallery-grid{overflow:auto;overflow-x:hidden;min-height:0;flex:1;display:block;padding:5vw 4vw 0;background:radial-gradient(ellipse at 50% 10%,#313431 0,#252825 55%,#202320 100%);scrollbar-color:#777 #252825;isolation:isolate}
.photo-table{height:calc(var(--table-height)*1vw);position:relative;width:100%}
.gallery-card{padding:0!important;display:block;position:absolute;left:var(--print-x);top:var(--print-y);width:var(--print-width);min-width:0;z-index:var(--print-z);transform:rotate(var(--print-angle));transform-origin:50% 50%;transition:transform .85s cubic-bezier(.2,.7,.2,1);text-align:left}
.gallery-thumb{aspect-ratio:var(--photo-ratio);display:block;width:100%;overflow:hidden;position:relative;background:#edece6;border:clamp(3px,.45vw,7px) solid #edece6;box-shadow:0 2px 3px #0006,0 14px 24px #0005,0 30px 48px #0002;transition:box-shadow .55s ease}
.gallery-thumb svg{width:100%;height:100%;display:block}
.gallery-card .photo-number{position:absolute;right:10px;bottom:10px;font-size:12px;letter-spacing:.08em;color:#fff;background:#0009;padding:6px 8px;opacity:0;transition:opacity .25s ease;pointer-events:none}
.gallery-card.is-highlight{z-index:1000;transform:rotate(calc(var(--print-angle)*.25)) scale(1.045)}
.gallery-card.is-highlight .gallery-thumb{box-shadow:0 3px 6px #0008,0 25px 40px #0006,0 45px 75px #0004}
.gallery-card:hover,.gallery-card:focus-visible{z-index:1100;transform:rotate(0deg) scale(1.06)}
.gallery-card:hover .photo-number,.gallery-card:focus-visible .photo-number{opacity:1}
.gallery-card:focus-visible{outline-offset:8px!important}
.gallery-viewer{flex:1;display:flex;flex-direction:column;min-height:0;background:#0b0b0b}
.gallery-viewer[hidden],.gallery-grid[hidden],.gallery-back[hidden]{display:none!important}
.gallery-back{font-size:14px!important;text-decoration:underline;text-underline-offset:4px}
.gallery-stage{min-height:0;flex:1;grid-template-columns:64px minmax(0,1fr) 64px;padding:14px 0}
#gallery-photo{width:100%;height:100%;max-height:calc(100svh - 280px);display:block}
.gallery-strip{display:flex;flex-shrink:0;gap:8px;overflow-x:auto;overflow-y:hidden;padding:14px 24px 12px;scrollbar-color:#666 #111;scrollbar-width:thin;background:#101010}
.gallery-strip .strip-photo{flex:0 0 76px;height:76px;padding:4px;border:1px solid transparent;opacity:.45;transition:opacity .2s,border-color .2s}
.strip-photo svg{width:100%;height:100%;display:block}
.gallery-strip .strip-photo[aria-pressed="true"]{opacity:1;border-color:#fff}
.gallery-strip .strip-photo:hover,.gallery-strip .strip-photo:focus-visible{opacity:1}
.gallery-bottom{flex-shrink:0;font-size:14px;min-height:58px;padding:14px 24px}
.gallery-close{font-size:14px!important}
@media(max-width:650px){
 .gallery-top{padding:14px 16px;min-height:70px;gap:12px}.gallery-top .gallery-heading{gap:6px;flex-direction:column;align-items:flex-start}.gallery-heading>.mono{font-size:12px}.gallery-total{font-size:12px}.gallery-grid{padding:12vw 12px 0}
 .photo-table{height:calc(var(--mobile-height)*1vw)}.gallery-card{left:var(--mobile-x);top:var(--mobile-y);width:var(--mobile-width)}.gallery-thumb{border-width:3px}.gallery-card.is-highlight{transform:rotate(calc(var(--print-angle)*.5)) scale(1.035)}.gallery-card:hover,.gallery-card:focus-visible{transform:rotate(0deg) scale(1.04)}
 .gallery-stage{grid-template-columns:36px minmax(0,1fr) 36px}#gallery-photo{max-height:calc(100svh - 250px)}.gallery-bottom{gap:12px;padding:12px 16px}.gallery-play{font-size:12px!important}.gallery-strip{padding:10px 12px;gap:6px}.gallery-strip .strip-photo{flex-basis:62px;height:62px}
}
@media(prefers-reduced-motion:reduce){.gallery-card,.gallery-thumb,.gallery-card .photo-number,.strip-photo{transition:none}.gallery-card.is-highlight{transform:rotate(var(--print-angle))}.gallery-card:hover,.gallery-card:focus-visible{transform:rotate(var(--print-angle))}}
