.post-media-gallery{min-width:0;position:relative}.gallery-stage,.gallery-inline-placeholder{aspect-ratio:16/9;background:var(--media);border-radius:12px;width:100%;position:relative;overflow:hidden}.gallery-carousel{scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none;width:100%;height:100%;display:flex;overflow:auto hidden}.gallery-carousel::-webkit-scrollbar{display:none}.gallery-slide{scroll-snap-align:start;scroll-snap-stop:always;-webkit-user-select:none;user-select:none;flex:0 0 100%;min-width:0;height:100%;position:relative}.gallery-post-kind{z-index:2;pointer-events:none;position:absolute;top:8px;left:8px}.gallery-post-kind .post-kind{box-shadow:0 1px 4px var(--shadow)}.gallery-picture{position:absolute;inset:0}.gallery-picture>img,.gallery-picture>video{object-fit:cover;width:100%;height:100%;display:block}.gallery-stage:not(.is-expanded) .gallery-picture{overflow:hidden}.gallery-stage:not(.is-expanded) .gallery-picture>img{object-fit:contain;transform:scale(var(--gallery-photo-zoom,1));transform-origin:var(--gallery-photo-origin,center);position:relative}.gallery-photo-backdrop{filter:blur(18px)brightness(.72);pointer-events:none;width:calc(100% + 48px);height:calc(100% + 48px);position:absolute;inset:-24px}.gallery-controls{color:var(--media-on);align-items:center;gap:2px;display:flex;position:absolute;bottom:4px;left:4px;right:4px}.gallery-stage button{background:radial-gradient(circle, var(--media-overlay-soft) 0 16px, transparent 17px);width:44px;height:44px;color:var(--media-on);border:0;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:inline-flex}.gallery-stage button:focus-visible{outline:2px solid var(--brand);outline-offset:-3px}.gallery-counter{background:var(--media-overlay-soft);font-variant-numeric:tabular-nums;border-radius:8px;margin-left:auto;padding:4px 8px;font-size:12px}.gallery-picture.is-unavailable>img,.gallery-picture.is-unavailable>video{visibility:hidden}.gallery-feedback{pointer-events:none;text-align:center;color:var(--media-on);flex-direction:column;justify-content:center;align-items:center;gap:4px;font-size:12px;line-height:1.35;display:flex;position:absolute;inset:28px 12px 48px}.gallery-feedback>span{background:var(--media-overlay-soft);border-radius:6px;justify-content:center;align-items:center;gap:6px;max-width:26rem;padding:3px 6px;display:flex}.gallery-stage .gallery-retry{background:var(--media-overlay-soft);width:auto;min-width:44px;height:44px;font-size:inherit;pointer-events:auto;border-radius:22px;gap:6px;padding:0 12px}.gallery-loading-icon{flex-shrink:0;animation:1s linear infinite gallery-loading}@keyframes gallery-loading{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.gallery-loading-icon{animation:none}}.gallery-thumbnails{scrollbar-width:thin;gap:6px;padding:6px 0 2px;display:flex;overflow-x:auto}.gallery-thumbnails button{background:var(--surface-soft);border:2px solid #0000;border-radius:9px;flex:0 0 66px;width:66px;height:66px;padding:2px;position:relative;overflow:hidden}.gallery-thumbnails button[aria-pressed=true]{border-color:var(--brand)}.gallery-thumbnails img{object-fit:cover;border-radius:4px;width:100%;height:100%;display:block}.gallery-thumbnails img.is-unavailable{visibility:hidden}.gallery-thumbnails svg{color:#fff;filter:drop-shadow(0 0 3px #000);fill:var(--scrim);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.gallery-thumbnails .gallery-thumbnail-placeholder{color:var(--muted);fill:none;filter:none}dialog.dialog.gallery-fullscreen{background:var(--media);width:100vw;max-width:none;height:100dvh;max-height:none;color:var(--media-on);border:0;border-radius:0;margin:0;padding:0;position:fixed;inset:0;overflow:hidden}.gallery-fullscreen::backdrop{background:var(--media)}.gallery-fullscreen>.dialog-header{z-index:3;top:env(safe-area-inset-top,0px);right:env(safe-area-inset-right,0px);background:0 0;border:0;min-height:0;padding:6px;position:absolute}.gallery-fullscreen>.dialog-header h2{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}.gallery-fullscreen>.dialog-header button{background:var(--media-overlay-soft);color:#fff;border-radius:50%;width:44px;height:44px}.gallery-stage.is-expanded{aspect-ratio:auto;border-radius:0;height:100%}.is-expanded .gallery-picture{top:calc(env(safe-area-inset-top,0px) + 48px);bottom:calc(env(safe-area-inset-bottom,0px) + 52px)}.is-expanded .gallery-picture>img,.is-expanded .gallery-picture>video{object-fit:contain}.is-expanded .gallery-slide.is-rotated .gallery-picture{width:calc(var(--gallery-height) - 108px);height:var(--gallery-width);inset:50% auto auto 50%;transform:translate(-50%,-50%)rotate(90deg)}.is-expanded .gallery-controls{bottom:calc(env(safe-area-inset-bottom,0px) + 4px);left:max(8px, env(safe-area-inset-left,0px));right:max(8px, env(safe-area-inset-right,0px))}.gallery-stage .gallery-prev,.gallery-stage .gallery-next{position:absolute;top:calc(50% - 22px)}.gallery-prev{left:max(4px, env(safe-area-inset-left,0px))}.gallery-next{right:max(4px, env(safe-area-inset-right,0px))}.gallery-stage button:disabled{visibility:hidden}@media (min-width:700px){.gallery-stage:not(.is-expanded),.gallery-inline-placeholder{max-height:440px}}
