.story-gallery{margin:2.5em 0;color:#172534}
.story-gallery-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;overscroll-behavior-inline:contain;touch-action:pan-x pan-y;scrollbar-width:none;border:1px solid var(--line);background:#10151d}
.story-gallery-track::-webkit-scrollbar{display:none}
.story-gallery-slide{flex:0 0 100%;min-width:0;scroll-snap-align:start;margin:0;list-style:none;display:flex;justify-content:center;align-items:center}
.story-gallery-slide a{display:block;line-height:0;max-width:100%}
.story-gallery-slide img{display:block;width:auto;max-width:100%;height:auto;max-height:min(76vh,760px);object-fit:contain;border:0}
.story-gallery-controls{display:flex;align-items:center;justify-content:center;gap:1.2rem;margin:.8rem 0;font-family:var(--mono);font-size:.85rem}
.story-gallery-controls button,.story-gallery-dialog button{border:1px solid #4d6075;background:#101b29;color:#fff;font:inherit;cursor:pointer;padding:.3rem .8rem}
.story-gallery-controls button:hover,.story-gallery-dialog button:hover{border-color:var(--blue)}
.story-gallery-controls button:disabled{opacity:.4;cursor:default}
.story-gallery figcaption{color:#31455a;font-family:var(--mono);font-size:.78rem;line-height:1.5;text-align:center}
.story-gallery-dialog{position:fixed;inset:2vh 2vw;max-width:96vw;max-height:96vh;width:max-content;padding:2rem 1rem 1rem;border:1px solid var(--line);background:#080d14;color:#fff}
.story-gallery-dialog::backdrop{background:rgba(0,0,0,.9)}
.story-gallery-dialog img{display:block;width:auto;max-width:calc(96vw - 2rem);height:auto;max-height:calc(96vh - 5rem);object-fit:contain;border:0}
.story-gallery-dialog button{position:absolute;right:.5rem;top:.4rem}
@media(max-width:580px){.story-gallery-slide img{max-height:72vh}.story-gallery-controls{gap:2rem}.story-gallery-controls button{padding:.5rem .9rem}}
@media(prefers-reduced-motion:reduce){.story-gallery-track{scroll-behavior:auto}}
