/* A reserved top strip keeps pagination and branding off the media pixels. */
#shortsViewer .viewer-media-header{position:absolute;inset:0 0 auto;height:44px;background:#0b1410;z-index:2;display:flex;align-items:center;justify-content:center}
#shortsViewer .short-media{top:44px!important}
#shortsViewer .viewer-media-header .short-album-nav,
body.media-focus #shortsViewer .viewer-media-header .short-album-nav,
body.immersive-feed #shortsViewer .viewer-media-header .short-album-nav{position:static;inset:auto;transform:none;margin:0;padding:0;width:auto;visibility:visible!important;pointer-events:auto!important}
#shortsViewer .viewer-media-header .album-pagination{margin:0;padding:4px 12px;border:1px solid #ffffff25;box-shadow:none;background:#ffffff0b;min-height:30px;box-sizing:border-box}
#shortsViewer .viewer-media-header .album-position{font-size:12px;line-height:20px;white-space:nowrap}
#shortsViewer .viewer-media-header .album-dots,#shortsViewer .viewer-media-header .short-album-nav>p{display:none}
#shortsViewer.active-album .shorts-top>b{visibility:hidden}
.post-media-layout>.album-nav{position:relative;inset:auto;display:flex;justify-content:center;align-items:center;min-height:40px;padding:2px 8px;box-sizing:border-box;background:#0b1410;z-index:2}
.post-media-layout:has(>.album-nav)>.media-actions{top:52px}
.post-media-layout:has(>.album-nav)>.media-slot,.post-media-layout:has(>.album-nav)>.media-slot>img,.post-media-layout:has(>.album-nav)>.media-slot>video,
#shortsViewer .short-card:has(.short-album-nav) .short-media,#shortsViewer .short-card:has(.short-album-nav) .short-media>img,#shortsViewer .short-card:has(.short-album-nav) .short-media>video{touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none;-webkit-user-drag:none}
/* Drag only the handle; action buttons retain their ordinary tap behaviour. */
html[data-controls-side=right] #shortsViewer .short-card .short-reactions,
html[data-controls-side=right] .post-media-layout>.media-actions{left:auto!important;right:10px!important}
html[data-controls-side=left] #shortsViewer .short-card .short-reactions,
html[data-controls-side=left] .post-media-layout>.media-actions{left:10px!important;right:auto!important}
html[data-controls-side=right] #shortsViewer .short-play{left:14px;right:auto}
html[data-controls-side=right] .post-media-layout .video-fullscreen{left:10px;right:auto}
#shortsViewer .short-card .short-reactions .controls-drag-handle,.post-media-layout .media-actions .controls-drag-handle{display:grid;place-items:center;width:36px;height:28px;min-height:28px;flex:0 0 28px;padding:0!important;margin:0;border:1px solid #ffffff65;border-radius:14px;background:#10251be6;color:#fff;font:700 20px/1 system-ui;touch-action:none;cursor:grab;user-select:none;position:sticky;top:0;z-index:5;box-shadow:0 2px 8px #0004}
.controls-drag-handle span{pointer-events:none}
.controls-drag-handle:focus-visible{outline:3px solid #e4c579;outline-offset:-3px}
.controls-dragging{z-index:12!important;will-change:transform;overflow:visible!important}
.controls-dragging .controls-drag-handle{cursor:grabbing!important;background:#28533e!important}

/* Playback controls always occupy the edge opposite the action rail. */
html[data-controls-side=left]{--lmc-aux-left:auto;--lmc-aux-right:10px}
html[data-controls-side=right]{--lmc-aux-left:10px;--lmc-aux-right:auto}
html[data-controls-side] .post-media-layout .feed-extra-controls,
html[data-controls-side] .post-media-layout .video-fullscreen,
html[data-controls-side] #shortsViewer .short-card .short-play{
 left:var(--lmc-aux-left,auto)!important;right:var(--lmc-aux-right,10px)!important;
}

/* Keep audio reachable in clear/full-screen view, opposite the action rail. */
#shortsViewer .short-focus-sound{display:none}
body.media-focus #shortsViewer .short-card:not(.is-photo) .short-focus-sound{
 display:grid;place-items:center;position:absolute;top:54px;
 left:var(--lmc-aux-left,auto);right:var(--lmc-aux-right,10px);
 width:44px;height:44px;min-height:44px;padding:10px!important;border-radius:50%;
 z-index:12;background:#10251be6;color:white;border:1px solid #ffffff65;
 visibility:visible!important;pointer-events:auto!important;touch-action:manipulation;
}
#shortsViewer .short-focus-sound svg{width:24px;height:24px}
