/* Portrait cards scoped to the single martyr gallery; viewer geometry is independent. */
body.single-shahid #gallery .gallery-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
body.single-shahid #gallery .raviyan-gallery-link {aspect-ratio:3 / 4;min-width:0}
body.single-shahid #gallery .raviyan-gallery-link .ra-gallery-photo {position:relative;z-index:1;background:transparent;object-fit:cover;object-position:center}
body.single-shahid #gallery .ra-gallery-focus-top .ra-gallery-photo {object-position:center top}
body.single-shahid #gallery .ra-gallery-focus-bottom .ra-gallery-photo {object-position:center bottom}
body.single-shahid #gallery .ra-gallery-focus-left .ra-gallery-photo {object-position:left center}
body.single-shahid #gallery .ra-gallery-focus-right .ra-gallery-photo {object-position:right center}
body.single-shahid #gallery .ra-gallery-full .ra-gallery-photo {object-fit:contain;object-position:center;transform:none}
body.single-shahid #gallery .raviyan-gallery-link .ra-gallery-backdrop {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:blur(16px);transform:scale(1.14);opacity:.6;pointer-events:none}
#gallery .raviyan-gallery-zoom {z-index:2}
#ra-gallery-viewer {position:fixed;inset:0;width:100%;max-width:none;height:100%;height:100dvh;max-height:none;margin:0;padding:0;border:0;background:#081e17;color:#fffef9;overflow:hidden;font-family:inherit;box-sizing:border-box}
#ra-gallery-viewer:not([open]) {display:none}
#ra-gallery-viewer::backdrop {background:rgba(5,20,15,.94)}
#ra-gallery-viewer .ra-viewer-shell {height:100%;width:100%;box-sizing:border-box;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px;padding:12px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#081e17}
#ra-gallery-viewer .ra-viewer-toolbar {display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;padding-top:env(safe-area-inset-top)}
#ra-gallery-viewer button {display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:1px solid rgba(230,218,190,.23);border-radius:10px;background:rgba(255,254,249,.07);color:#fffef9;font-size:18px;cursor:pointer;touch-action:manipulation}
#ra-gallery-viewer button:disabled {opacity:.35;cursor:default}
#ra-gallery-viewer button:not(:disabled):hover,#ra-gallery-viewer button[aria-pressed=true] {background:rgba(184,158,98,.25)}
#ra-gallery-viewer :focus-visible {outline:2px solid #d4bc82;outline-offset:2px}
#ra-gallery-viewer .ra-viewer-stage {position:relative;min-width:0;min-height:0;overflow:hidden;touch-action:none;user-select:none;cursor:grab}
#ra-gallery-viewer .ra-viewer-stage:active {cursor:grabbing}
#ra-gallery-viewer .ra-viewer-image {position:absolute;left:50%;top:50%;display:block;max-width:none;max-height:none;object-fit:contain;transform-origin:center;user-select:none;pointer-events:none}
#ra-gallery-viewer .ra-viewer-image.is-loading {visibility:hidden}
#ra-gallery-viewer .ra-viewer-status {position:absolute;left:12px;right:12px;top:45%;text-align:center;pointer-events:none;font-size:14px}
#ra-gallery-viewer .ra-viewer-footer {display:flex;align-items:center;justify-content:center;gap:16px;min-width:0}
#ra-gallery-viewer .ra-viewer-footer>div {display:grid;gap:3px;min-width:0;text-align:center;max-width:780px}
#ra-gallery-viewer .ra-viewer-caption {font-size:13px;line-height:1.7;max-height:3.4em;overflow:auto;overflow-wrap:anywhere}
#ra-gallery-viewer .ra-viewer-counter {font-size:12px;color:#ddcda9;white-space:nowrap}
@media(max-width:760px) {
 body.single-shahid #gallery .raviyan-gallery-link {border-radius:12px}
 #ra-gallery-viewer .ra-viewer-toolbar {display:grid;grid-template-columns:repeat(4,44px);gap:4px}
 #ra-gallery-viewer .ra-viewer-shell {padding-top:8px;gap:6px}
 #ra-gallery-viewer .ra-viewer-footer {gap:10px}
 #ra-gallery-viewer .ra-viewer-caption {font-size:12px}
}
@media(prefers-reduced-motion:reduce) {
 body.single-shahid #gallery .raviyan-gallery-link,body.single-shahid #gallery .raviyan-gallery-link img {transition:none;animation:none}
 body.single-shahid #gallery .raviyan-gallery-link:hover {transform:none}
 body.single-shahid #gallery .raviyan-gallery-link:hover .ra-gallery-photo {transform:none}
}
#ra-gallery-viewer button[hidden] {display:none}

@media(max-width:1180px) {
 body.single-shahid #gallery.gallery-panel--story {margin-inline:0}
 body.single-shahid #gallery .gallery-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}
