/* VR_R55_POST_COPY_MEDIA_FLOW
   Copy owns its own height. Media/rich source blocks always start after copy.
   No rich card may visually intrude upward into caption text. */

.postcard-shell,
.vrpCard,
.postCard,
.post-card,
.feedPost,
.feed-post,
.roomPost,
.room-post,
.profilePost,
.profile-post{
  min-width:0!important;
}

/* The old container-level line clamp can shrink the copy box independently
   of what its text still paints. Clamp the text node only. */
.postcard-copy.is-collapsed{
  display:block!important;
  -webkit-line-clamp:unset!important;
  -webkit-box-orient:initial!important;
  overflow:hidden!important;
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  position:relative!important;
  z-index:1!important;
  contain:layout paint!important;
}

.postcard-copyText{
  display:block;
  min-width:0!important;
  max-width:100%!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}

.postcard-copyText.is-collapsed{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:var(--copy-collapsed-lines,2)!important;
  overflow:hidden!important;
  white-space:normal!important;
}

/* Hard document-flow boundary for native media and every current rich source family. */
.postcard-mediaBand,
.postMediaBand,
.postcard-media,
.vrExternalSourceCard,
.vrR50RichLink,
.vrExternalWebCardR49,
.vrpLinkR49,
.vrR51ProviderShell,
[data-vr-r50-rich-link="1"],
[data-media-kind="spotify"]{
  position:relative!important;
  display:block!important;
  float:none!important;
  clear:both!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  flex:0 0 auto!important;
  transform:none!important;
  translate:none!important;
  top:auto!important;
  bottom:auto!important;
  left:auto!important;
  right:auto!important;
  margin-left:0!important;
  margin-right:0!important;
  z-index:2!important;
  isolation:isolate!important;
}

/* Preserve deliberate Feed spacing while guaranteeing a visible gap from copy. */
.postcard-copy + .postcard-mediaBand,
.postcard-copy + .postMediaBand,
.postcard-copy + .vrExternalSourceCard,
.postcard-copy + .vrR50RichLink,
.postcard-copy + .vrExternalWebCardR49,
.postcard-copy + .vrpLinkR49,
.postcard-copy + .vrR51ProviderShell{
  margin-top:6px!important;
}

/* Embedded provider documents stay inside their own box. */
.vrExternalSourceCard iframe,
[data-media-kind="spotify"] iframe,
.vrR50RichLink iframe,
.vrExternalWebCardR49 iframe,
.vrpLinkR49 iframe,
.vrR51ProviderShell iframe{
  position:relative!important;
  display:block!important;
  float:none!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  transform:none!important;
  inset:auto!important;
  z-index:1!important;
}

/* Media can never paint over preceding copy even if an old rule survives elsewhere. */
.postcard-copy{
  isolation:isolate!important;
}
.postcard-mediaBand,
.postMediaBand{
  isolation:isolate!important;
  contain:layout paint!important;
}

/* R55 runtime may add only the exact additional gap needed for a detected overlap. */
[data-vr-r55-flow-guard="1"]{
  box-sizing:border-box!important;
}
