/* Full-screen gallery: separate top-layer surface, never cropped photographs. */
.osmo-gallery{position:fixed;inset:0;margin:0;padding:0;width:100%;max-width:none;height:100svh;height:100dvh;max-height:none;border:0;border-radius:0;background:#111611;color:var(--ivory,#f9f8ed);font-family:Instrument,Arial,sans-serif;overflow:hidden;color-scheme:dark;box-shadow:none}
.osmo-gallery[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;animation:osmo-gallery-in 220ms ease-out}
.osmo-gallery::backdrop{background:#111611}
.osmo-gallery__header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:max(12px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 8px max(22px,env(safe-area-inset-left))}
.osmo-gallery__title{margin:0;font:400 14px/1.3 Instrument,Arial,sans-serif;letter-spacing:-.01em;overflow-wrap:anywhere}
.osmo-gallery__title:focus{outline:none}
.osmo-gallery button{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:400 24px/1 Instrument,Arial,sans-serif;cursor:pointer;touch-action:manipulation}
.osmo-gallery button:hover:not(:disabled){color:#e4edc8;background:#dce4cc0b}
.osmo-gallery button:disabled{opacity:.24;cursor:default}
.osmo-gallery button:focus-visible,.osmo-gallery__viewport:focus-visible{outline:1px solid #dfe8c3;outline-offset:-4px}
.osmo-gallery__close{flex:0 0 44px}
.osmo-gallery__arrow svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.osmo-gallery__viewport{min-height:0;min-width:0;display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x pan-y pinch-zoom;cursor:grab;-webkit-overflow-scrolling:touch;outline-offset:-4px}
.osmo-gallery__viewport::-webkit-scrollbar{display:none}
.osmo-gallery__viewport.is-dragging{scroll-snap-type:none;cursor:grabbing;user-select:none}
.osmo-gallery__slide{position:relative;display:grid;place-items:center;flex:0 0 100%;width:100%;height:100%;min-height:0;margin:0;padding:6px max(16px,env(safe-area-inset-right)) 6px max(16px,env(safe-area-inset-left));scroll-snap-align:start;scroll-snap-stop:always}
.osmo-gallery__image{display:block;width:100%;height:100%;min-width:0;min-height:0;object-fit:contain;object-position:center;user-select:none;-webkit-user-drag:none;background:none}
.osmo-gallery__image[hidden]{display:none}
.osmo-gallery__status{position:absolute;inset:50% 20px auto;margin:0;transform:translateY(-50%);font-size:13px;text-align:center;color:#c9cfc1;pointer-events:none}
.osmo-gallery__status[hidden]{display:none}
.osmo-gallery__empty{margin:auto;padding:32px;text-align:center;font-size:14px;color:#c9cfc1}
.osmo-gallery__footer{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:12px max(22px,env(safe-area-inset-right)) max(17px,calc(env(safe-area-inset-bottom) + 8px)) max(22px,env(safe-area-inset-left));background:#111611}
.osmo-gallery__copy{min-width:0;max-width:64ch}
.osmo-gallery__story{margin:0 0 4px;font:500 clamp(14px,1.4vw,18px)/1.25 Instrument,Arial,sans-serif;color:#f2f2e5}
.osmo-gallery__count{margin:0;font:400 10px/1.3 Plex,monospace;letter-spacing:.035em;color:#c4cdbb;white-space:nowrap}
.osmo-gallery__caption{margin:0;font:400 clamp(12px,1.08vw,14px)/1.4 Instrument,Arial,sans-serif;color:#ced5c8;overflow-wrap:anywhere}
.osmo-gallery__credit{margin:6px 0 0;font:400 10px/1.25 Instrument,Arial,sans-serif;color:#adb9a6}
.osmo-gallery__controls{display:flex;align-items:center;gap:1px;flex-shrink:0}
.osmo-gallery__controls[hidden]{display:none}
@media(max-width:600px){
 .osmo-gallery__header{padding-inline:max(16px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right))}
 .osmo-gallery__title{font-size:13px}
 .osmo-gallery__slide{padding-inline:max(9px,env(safe-area-inset-left)) max(9px,env(safe-area-inset-right))}
 .osmo-gallery__footer{gap:5px;padding-inline:max(16px,env(safe-area-inset-left)) max(16px,env(safe-area-inset-right))}
 .osmo-gallery__controls{justify-self:end}.osmo-gallery__count{font-size:9px}
}
@media(max-width:600px) and (orientation:portrait) and (min-height:480px){
 .osmo-gallery[open]{grid-template-rows:auto minmax(0,1fr) min(58dvh,max(56vw,35dvh)) auto minmax(env(safe-area-inset-bottom),1fr)}
 .osmo-gallery__header{grid-row:1}
 .osmo-gallery__viewport{grid-row:3}
 .osmo-gallery__footer{grid-row:4;display:grid;grid-template-columns:minmax(0,1fr);padding-block:6px}
 .osmo-gallery__image{object-position:center bottom}
}
@media(max-height:480px){
 .osmo-gallery__header{padding-block:1px}.osmo-gallery__footer{padding-block:3px max(6px,env(safe-area-inset-bottom))}
 .osmo-gallery__story{font-size:13px;margin-bottom:2px}.osmo-gallery__caption{font-size:11px}
 .osmo-gallery__credit{margin-top:3px;font-size:9px}.osmo-gallery__copy{max-width:80ch}
}
@keyframes osmo-gallery-in{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.osmo-gallery[open]{animation:none}.osmo-gallery__viewport{scroll-behavior:auto}}
