.pirha-gallery{margin:32px 0;padding:20px;border:1px solid #ddd;background:#f6f6f6}
.pirha-gallery:not(.is-slider){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.pirha-gallery:not(.is-slider)>h3{grid-column:1/-1}
.pirha-gallery.is-slider{--gallery-image-height:clamp(240px,52vw,500px);display:block;overflow:hidden;padding:0;background:#fff;border:1px solid #dedede}
.pirha-gallery .photo-gallery-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px}
.pirha-gallery .photo-gallery-header h3{margin:0;font-family:inherit;font-weight:800;font-size:23px;line-height:1.35;letter-spacing:-.4px}
.photo-gallery-count{font-size:13px;line-height:1.4;font-weight:700;font-variant-numeric:tabular-nums;color:#666;white-space:nowrap}
.photo-gallery-stage{position:relative;min-width:0}
.photo-gallery-viewport{overflow:hidden;touch-action:pan-y pinch-zoom}
.photo-gallery-track{display:flex;align-items:flex-start;transition:transform .3s ease;will-change:transform}
.pirha-gallery .photo-gallery-track>figure{box-sizing:border-box;flex:0 0 100%;width:100%;min-width:0;margin:0}
.pirha-gallery .photo-gallery-image{display:flex;align-items:center;justify-content:center;height:var(--gallery-image-height);background:#141619;cursor:zoom-in;text-decoration:none}
.pirha-gallery .photo-gallery-image img{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;margin:0}
.pirha-gallery .photo-gallery-track figcaption{padding:16px 20px;margin:0;font-size:14px;line-height:1.6;color:#555;overflow-wrap:anywhere}
.pirha-gallery .photo-gallery-track [hidden],.pirha-gallery .photo-gallery-arrow[hidden]{display:none!important}
.photo-gallery-arrow{position:absolute;top:calc(var(--gallery-image-height)/2);transform:translateY(-50%);display:grid;place-items:center;width:44px;height:52px;padding:0;border:1px solid #ffffff60;border-radius:4px;background:#0c0d10bc;color:#fff;font:38px/1 Arial,sans-serif;cursor:pointer;transition:background .15s}
.photo-gallery-arrow:hover{background:#a71925}.photo-gallery-arrow:disabled{opacity:.3;cursor:default;background:#0c0d10bc}
.photo-gallery-arrow.is-previous{left:14px}.photo-gallery-arrow.is-next{right:14px}
.photo-gallery-arrow:focus-visible,.photo-gallery-viewport:focus-visible,.photo-gallery-image:focus-visible{outline:3px solid var(--brand-red, #b91d2b);outline-offset:-3px}
.photo-gallery-progress{height:3px;background:#e8e8e8}.photo-gallery-progress>span{display:block;height:100%;background:var(--brand-red, #ad1921);transition:width .3s ease}
.photo-gallery-thumbnails{position:relative;display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:#b6b6b6 #f3f3f3;padding:12px;background:#fafafa}
.photo-gallery-thumb{box-sizing:border-box;flex:0 0 96px;width:96px;height:68px;padding:2px;border:2px solid transparent;border-radius:3px;background:#fff;cursor:pointer}
.pirha-gallery .photo-gallery-thumb img{display:block;width:100%;height:100%;max-width:100%;object-fit:cover;margin:0;border-radius:1px}
.photo-gallery-thumb:hover{border-color:#b9b9b9}.photo-gallery-thumb[aria-pressed=true]{border-color:var(--brand-red, #ad1921);background:var(--brand-red, #ad1921)}
.photo-gallery-thumb:focus-visible{outline:2px solid var(--brand-red, #ad1921);outline-offset:2px}
.photo-gallery-viewer{box-sizing:border-box;width:min(1100px,96vw);max-width:96vw;max-height:94vh;padding:20px;background:#15171b;color:white;border:0;border-radius:12px}
.photo-gallery-viewer::backdrop{background:#000d}.photo-gallery-viewer>img{display:block;max-width:100%;width:100%;height:62vh;object-fit:contain;margin:15px auto}
.photo-gallery-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;font:14px/1.5 system-ui}
.photo-gallery-controls button{padding:10px 14px;background:#30343b;color:white;border:1px solid #626975;border-radius:6px;cursor:pointer}
.photo-gallery-controls button:disabled{opacity:.35;cursor:default}.photo-gallery-controls button:focus-visible{outline:3px solid white;outline-offset:3px}
.photo-gallery-caption{white-space:pre-line;font:16px/1.6 system-ui;margin:12px 0 20px}.photo-gallery-caption .pirha-photo-credit{color:#c9cdd3}
@media(max-width:540px){.pirha-gallery.is-slider{--gallery-image-height:clamp(230px,75vw,370px)}.pirha-gallery .photo-gallery-header{padding:14px}.pirha-gallery .photo-gallery-header h3{font-size:20px}.pirha-gallery .photo-gallery-track figcaption{padding:12px 14px}.photo-gallery-arrow{width:38px;height:46px}.photo-gallery-arrow.is-previous{left:8px}.photo-gallery-arrow.is-next{right:8px}.photo-gallery-viewer{padding:12px}.photo-gallery-viewer>img{height:55vh}.photo-gallery-controls button{padding:8px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.photo-gallery-track,.photo-gallery-progress>span{transition:none}}
@media(max-width:540px){.photo-gallery-thumb{flex-basis:76px;width:76px;height:54px}}
@media(prefers-reduced-motion:reduce){.photo-gallery-thumbnails{scroll-behavior:auto}}

.photo-gallery-viewer.cover-photo-viewer{width:min(1600px,98vw);max-width:98vw;max-height:98vh;padding:12px}.cover-photo-viewer>img{height:calc(98vh - 150px);min-height:180px}
