/* Uploaded attachment previews and inline post videos: shrink to fit, retain the full frame, never stretch. */
.post-files .post-files-videos .col-media{min-width:0}
:is(.post-files .post-files-videos, [id^="wall_content_"], .wall-entry .content, .stream-entry .content) video{
    display:block!important;
    width:auto!important;
    height:auto!important;
    max-width:min(100%,640px)!important;
    max-height:360px!important;
    max-height:min(360px,50svh)!important;
    margin-inline:auto;
    object-fit:contain!important;
}
/* Fullscreen is a deliberate choice and keeps its full viewing area. */
:is(.post-files .post-files-videos, [id^="wall_content_"], .wall-entry .content, .stream-entry .content) video:fullscreen{
    width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;
}
:is(.post-files .post-files-videos, [id^="wall_content_"], .wall-entry .content, .stream-entry .content) video:-webkit-full-screen{
    width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;
}

/* Release the gallery link's inherited 100% height after shrinking its video. */
:is(.post-files .post-files-videos, [id^="wall_content_"], .wall-entry .content, .stream-entry .content) a:has(> video){
    height:auto!important;min-height:0!important;
}
