/* Shared immersive player: natural media proportions, readable controls. */
body[data-page="watch"]{--player-sky:#8ed9f0;--player-glass:rgba(24,27,32,.68)}
body[data-page="watch"] .short-canvas{max-width:min(100vw,560px);background:#08090c}
.short-ambient{position:absolute;inset:-45px;z-index:-1;background-position:center;background-size:cover;filter:blur(36px) brightness(.23);transform:scale(1.12);pointer-events:none}
body[data-page="watch"] .short-media{position:relative;object-fit:contain;background:transparent;z-index:0}
body[data-page="watch"] .short-canvas:after{inset:40% 0 0;background:linear-gradient(transparent 12%,rgba(5,7,10,.2) 40%,rgba(5,7,10,.88) 100%)}
body[data-page="watch"] .short-bottom{inset-inline-start:18px;inset-inline-end:80px;bottom:calc(74px + env(safe-area-inset-bottom));padding:0}
.short-owner{gap:12px;min-height:48px}
.short-avatar-link{box-shadow:0 0 0 1.5px #a4def1,0 3px 18px #0006}
.short-avatar{width:44px;height:44px}
.short-owner-text strong{font-size:17px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;text-shadow:0 2px 10px #000}
.short-username{font-size:13px;color:#caeaf5;margin-top:3px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.short-caption{font-size:13px;font-weight:400;line-height:1.65;margin:14px 0 0;color:#edf1f5;overflow-wrap:anywhere;text-shadow:0 1px 7px #0009}
.short-caption[hidden]{display:none}
body[data-page="watch"] .short-rail{inset-inline-end:14px;bottom:calc(154px + env(safe-area-inset-bottom));gap:12px}
.short-tool{width:44px;height:44px;border-color:#ffffff25;background:var(--player-glass);box-shadow:0 4px 18px #0002;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);transition:background .18s,transform .18s}
.short-tool .icon{width:21px;height:21px}
.short-tool:active{transform:scale(.93)}
.short-tool:focus-visible,.gallery-arrow:focus-visible,.gallery-dot:focus-visible{outline:2px solid var(--player-sky);outline-offset:4px}
.short-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:64px;height:64px;z-index:4;opacity:0;pointer-events:none;border-color:#ffffff40;background:#15191d60;box-shadow:0 5px 30px #0003}
.short-play .icon{width:27px;height:27px}
.paused .short-play,.short-play:focus-visible{opacity:1;pointer-events:auto}
.short-play:active{transform:translate(-50%,-50%) scale(.95)}
body[data-page="watch"] .short-progress{inset-inline:18px;width:calc(100% - 36px);bottom:calc(18px + env(safe-area-inset-bottom));height:28px}
.short-progress::-webkit-slider-runnable-track{height:3px;background:linear-gradient(to right,var(--player-sky) var(--progress),#ffffff38 var(--progress))}
.short-progress::-webkit-slider-thumb{width:11px;height:11px;margin-top:-4px;box-shadow:0 0 10px #8ed9f040}
body[data-page="watch"] .short-time{bottom:calc(49px + env(safe-area-inset-bottom));inset-inline-start:19px;font-size:11px;letter-spacing:.25px;color:#ced8e0;font-variant-numeric:tabular-nums}
.gallery-controls{position:absolute;top:max(22px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:5;display:flex;align-items:center;gap:8px;padding:3px 5px;border:1px solid #ffffff20;border-radius:30px;background:var(--player-glass);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);direction:ltr}
.gallery-arrow{border:0;border-radius:50%;width:40px;height:40px;padding:0;background:transparent;color:#fff;font-size:29px;line-height:1;cursor:pointer}
.gallery-arrow:disabled{opacity:.25;cursor:default}
.gallery-count{min-width:46px;text-align:center;color:#edf5fa;font-size:12px;font-variant-numeric:tabular-nums}
.gallery-dots{position:absolute;z-index:5;bottom:calc(28px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;max-width:85%;overflow:auto;scrollbar-width:none;gap:1px}
.gallery-dot{flex-shrink:0;width:22px;height:28px;padding:0;border:0;background:transparent;cursor:pointer;display:grid;place-items:center}
.gallery-dot:after{content:'';width:5px;height:5px;background:#ffffff65;border-radius:10px;transition:width .2s,background .2s}
.gallery-dot[aria-current="true"]:after{width:17px;background:var(--player-sky)}
body[data-page="watch"] .is-photo .short-bottom{bottom:calc(76px + env(safe-area-inset-bottom))}
body[data-page="watch"] .is-photo .short-rail{bottom:calc(150px + env(safe-area-inset-bottom))}
.brand-loading{background:#0b1016a8;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.loading-b{width:49px;height:60px}
.shorts-nav-button{width:46px;height:46px;border-color:#ffffff20;background:#20242b99}
@media(min-width:768px){body[data-page="watch"] .short-canvas{border-inline:1px solid #ffffff0b}body[data-page="watch"] .shorts-navigation{inset-inline-end:max(30px,calc((100vw - 560px)/2 - 76px))}.short-caption{font-size:14px}.short-owner-text strong{font-size:18px}}
@media(max-height:620px){body[data-page="watch"] .short-rail{bottom:140px;gap:7px}.short-tool{width:38px;height:38px}.short-caption{-webkit-line-clamp:1;margin-top:8px}.short-avatar{width:36px;height:36px}}
@media(prefers-reduced-motion:reduce){.short-tool,.gallery-dot:after{transition:none}}
.short-more{position:absolute;inset-inline-end:14px;bottom:calc(154px + env(safe-area-inset-bottom));z-index:6}
.short-more[aria-expanded="true"]{color:var(--player-sky);border-color:#8ed9f060;background:#253640e8}
body[data-page="watch"] .short-options{bottom:calc(210px + env(safe-area-inset-bottom));padding:9px;border:1px solid #ffffff1c;border-radius:32px;inset-inline-end:5px;background:#111820bd;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.short-options[hidden]{display:none!important}
.short-sound-prompt{position:absolute;z-index:5;top:calc(50% + 50px);left:50%;transform:translateX(-50%);padding:11px 19px;background:#17242cdd;border:1px solid #8ed9f070;border-radius:25px;color:#c9effb;font:inherit;font-size:13px;white-space:nowrap;cursor:pointer}
@media(max-height:620px){.short-more{bottom:140px}body[data-page="watch"] .short-options{bottom:190px;gap:6px;padding:6px}}
/* Options stay in the top corner, clear of author and caption. */
body[data-page="watch"] .short-more{top:max(22px,env(safe-area-inset-top));right:14px;left:auto;bottom:auto;inset-inline-end:auto}
body[data-page="watch"] .short-options{top:calc(max(22px,env(safe-area-inset-top)) + 54px);right:5px;left:auto;bottom:auto;inset-inline-end:auto}
/* The overflow action belongs to the post identity row. */
body[data-page="watch"] .short-bottom{inset-inline-end:18px}
body[data-page="watch"] .short-owner{position:relative}
body[data-page="watch"] .short-owner-text{flex:1}
body[data-page="watch"] .short-more{position:static;flex-shrink:0;margin-inline-start:auto;align-self:center;width:38px;height:38px;box-shadow:none;background:#20273085}
body[data-page="watch"] .short-options{top:auto;bottom:calc(142px + env(safe-area-inset-bottom));right:10px;left:auto}

/* Keep taps and swipes on the site surface rather than native video UI. */
body[data-page="watch"] video.short-media{pointer-events:none;-webkit-touch-callout:none}
body[data-page="watch"] .short-video-touch{position:absolute;inset:0;z-index:1;touch-action:pan-y pinch-zoom;-webkit-tap-highlight-color:transparent}

body[data-page="watch"] .manual-swipe,body[data-page="watch"] .manual-swipe .short-video-touch{touch-action:none}

/* Preserve the source image orientation when audio playback changes. */
body[data-page="watch"] video.short-media{transform:none!important;-webkit-transform:none!important;rotate:none!important;scale:none!important}
