/* Fans254 V1410 — Tablet/desktop-only stream media fitting.
   The website's mobile breakpoint is max-width:760px; leave it untouched.
   Only the replaced media fit changes: no geometry, player, R2 URL, carousel,
   feed, image size, admin height limits, ad CTA, or Live playback changes. */
@media (min-width:761px) {
  /* Organic/sponsored video in Home, Following, Trending, user profile,
     reposted/quoted posts, and other normal feed-card surfaces. */
  .social-shell .social-post:not(.social-reel-post)
    .social-post-video-player:not(.f254-live-player):not(.f254-live-reel-player):not([data-live-player]) > video,
  .social-shell .social-post:not(.social-reel-post)
    .social-post-media.f830-ad-media > video {
    object-fit:contain !important;
    object-position:center center !important;
  }

  /* Single-photo feed posts, galleries, quotes/reposts and feed ads. */
  .social-shell .social-post:not(.social-reel-post)
    .social-post-media:not(.social-post-video-player) > img,
  .social-shell .social-post:not(.social-reel-post)
    .f254-feed-gallery .f254-feed-slide > img,
  .social-shell .social-post:not(.social-reel-post)
    img.f254-quote-source-media,
  .social-shell .social-post:not(.social-reel-post)
    .f254-quote-own-content > img,
  .social-shell .social-post:not(.social-reel-post)
    .social-post-media.f830-ad-media > img {
    object-fit:contain !important;
    object-position:center center !important;
  }

  /* Full-screen/regular Reels, including image/video advertisement reels.
     Live Reels are a separate playback system and remain unchanged. */
  .social-shell .social-reel-panel:not(.f1009-live-reel-panel):not([data-f1009-live-reel])
    .social-reel-post:not([data-f1160-live-id]) .social-reel-media > video,
  .social-shell .social-reel-panel:not(.f1009-live-reel-panel):not([data-f1009-live-reel])
    .social-reel-post:not([data-f1160-live-id]) .social-reel-media > img {
    object-fit:contain !important;
    object-position:center center !important;
  }
}

/* Equal-or-higher specificity than old `!important` cover rules. These rules
   intentionally change FIT ONLY, preserving the exact existing stage sizes. */
@media (min-width:761px) {
  /* V1267's tall-cover rule applies on desktop as well as mobile; override it
     explicitly so those feed videos do not remain cropped on tablet/desktop. */
  .social-shell .social-post:not(.social-reel-post)
    .social-post-video-player[data-feed-player][data-f1267-tall-cover]:not(.f830-ad-media):not([data-locked-player]):not(.social-locked-player):not(.sensitive-media-gate)
    > video[data-feed-video]:not([data-preview-only]) {
    object-fit:contain !important;
    object-position:center center !important;
  }
  /* Existing compact quote media is intentionally fixed-height. Contain the
     media in that unchanged frame instead of the former centered crop. */
  .social-shell .social-post:not(.social-reel-post) .f254-quote-source-card > img.f254-quote-source-media,
  .social-shell .social-post:not(.social-reel-post) .f254-quoted-source > .social-post-media:not(.social-post-video-player) img,
  .social-shell .social-post:not(.social-reel-post) .f254-quoted-source > .social-post-media:not(.social-post-video-player) img.f254-feed-cropped,
  .social-shell .social-post:not(.social-reel-post) .f254-quoted-source .f254-feed-slide img,
  .social-shell .social-post:not(.social-reel-post) .f254-quote-source-gallery .f254-feed-slide img,
  .social-shell .social-post:not(.social-reel-post) .f254-quote-own-content > :is(img,video),
  .social-shell .social-post:not(.social-reel-post) .f254-quoted-source > .social-post-video-player > video,
  .social-shell .social-post:not(.social-reel-post) .f254-quote-source-card > .f254-quote-source-video > video,
  .social-shell .social-post:not(.social-reel-post) .f254-quoted-source > .social-post-video-player > video.f254-feed-cropped {
    object-fit:contain !important;
    object-position:center center !important;
  }
}

@media (min-width:761px) {
  /* Ads V1112 used a particularly specific desktop cover rule; preserve its
     size/scroll behavior while overruling only the fit on larger screens. */
  .social-shell .social-post.f832-new-sponsored:not(.social-reel-post)
    > .social-post-media.f842-ad-video-stage.f837-limited-media > video[data-f1112-ad-fit] {
    object-fit:contain !important;
    object-position:center center !important;
  }
}
