html.hf-view-open, html.hf-view-open body { overflow: hidden !important; }
.hf-native-player { position: relative; }
.hf-native-player video::-webkit-media-controls-fullscreen-button { display: none; }
.hf-view-enter, .hf-view-exit, .hf-view-live-rotate {
    position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
    z-index: 100; padding: 8px 12px; border: 1px solid #ffffff80; border-radius: 8px;
    background: #161616db; color: white; font: 600 14px/1.4 sans-serif; cursor: pointer;
}
.hf-view-stage .hf-view-enter { display: none; }
html.hf-view-open .hf-view-stage {
    position: fixed !important; inset: 0 auto auto 0 !important; z-index: 2147483647 !important;
    box-sizing: border-box !important; width: 100vw !important; height: 100vh !important;
    width: 100dvw !important; height: 100dvh !important; min-width: 0 !important; min-height: 0 !important;
    max-width: none !important; max-height: none !important; margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 0 !important; overflow: hidden !important; background: black;
    aspect-ratio: auto; transform: none !important;
}
html.hf-view-open .hf-view-rotated {
    width: 100vh !important; height: 100vw !important;
    width: 100dvh !important; height: 100dvw !important;
    transform-origin: top left; transform: rotate(90deg) translateY(-100%) !important;
}
.hf-view-stage::backdrop { background: black; }
html.hf-view-open .hf-view-stage :is(video, .plyr__video-wrapper, .post-detail-slides, .post-detail-slide) {
    width: 100% !important; height: 100% !important; max-height: none !important;
    min-height: 0 !important; object-fit: contain !important; aspect-ratio: auto !important;
}
.hf-view-stage .plyr__video-wrapper { padding-bottom: 0 !important; }
.hf-view-rotated [data-plyr="seek"] { touch-action: none; }
.hf-view-stage .plyr__tooltip { display: none; }

.hf-view-ancestor {
    transform: none !important; filter: none !important; perspective: none !important;
    contain: none !important; will-change: auto !important; overflow: visible !important;
    isolation: auto !important; z-index: auto !important;
}

/* Keep the visible icon compact while reserving a full touch target. */
.hf-view-stage > .hf-view-exit {
    top: max(0px, env(safe-area-inset-top)); left: max(0px, env(safe-area-inset-left)); right: auto;
    width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
    border: 0; background: transparent; color: #fff;
}
.hf-view-exit svg {
    box-sizing: border-box; width: 24px; height: 24px; padding: 4px; border-radius: 50%;
    background: rgb(0 0 0 / 44%); fill: none; stroke: currentColor;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.hf-view-exit:focus-visible { outline: none; }
.hf-view-exit:focus-visible svg { outline: 2px solid white; outline-offset: 2px; }
.oc-player-stage:not(:has(iframe)) .hf-view-enter { display: none; }
html.hf-view-open .oc-player-stage.hf-view-stage .oc-player { width: 100%; height: 100%; max-height: none; }
video[data-hf-viewport]::-webkit-media-controls-fullscreen-button { display: none; }
