/* EPA V50 - scoped picture display; keep photo sources and all functionality unchanged. */
/* Critical containment: avatars are never allowed to stretch the property owner text area. */
#epaWorkspace .epa-property-owner > img[data-epa-owner],
#epaWorkspace .epa-property-owner > span:first-child[data-epa-owner]{
  display:block!important;flex:0 0 34px!important;width:34px!important;height:34px!important;
  min-width:34px!important;max-width:34px!important;min-height:34px!important;max-height:34px!important;
  border-radius:50%!important;overflow:hidden!important;object-fit:cover!important;object-position:center!important;
}
#epaWorkspace .epa-property-owner > span:last-child{min-width:0!important;flex:1 1 auto!important;width:auto!important;max-width:calc(100% - 43px)!important;}
#epaWorkspace .epa-property-owner > span:last-child:not(:first-child) img{display:none!important;}
#epaWorkspace .epa-property-owner{max-width:100%!important;min-width:0!important;overflow:hidden!important;}
#epaWorkspace .epa-property-owner > img[data-epa-owner]{height:34px!important;width:34px!important;}
/* Both home/listing photos: unaltered original shown in front, soft color/blur in empty margins. */
#epaHomeDashboard #listingCards .listing-photo{isolation:isolate!important;background:#dbe7ef!important;overflow:hidden!important;}
#epaHomeDashboard #listingCards .listing-photo .epa-v50-listing-backdrop{
  position:absolute!important;inset:-14px!important;width:calc(100% + 28px)!important;height:calc(100% + 28px)!important;
  display:block!important;object-fit:cover!important;object-position:center!important;filter:blur(14px) brightness(.82)!important;
  opacity:.55!important;pointer-events:none!important;z-index:0!important;
}
#epaHomeDashboard #listingCards .listing-photo .epa-v48-photo-open{z-index:1!important;}
#epaHomeDashboard #listingCards .listing-photo .epa-v48-listing-img{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important;z-index:1!important;object-fit:contain!important;object-position:center!important;}
#epaHomeDashboard #listingCards .listing-photo .tag,#epaHomeDashboard #listingCards .listing-photo .fav{z-index:4!important;}
#epaWorkspace .epa-property-photo{isolation:isolate!important;background-size:cover!important;background-position:center!important;}
#epaWorkspace .epa-property-photo:before{content:"";position:absolute;inset:0;background:rgba(230,240,249,.38);backdrop-filter:blur(10px);pointer-events:none;z-index:0;}
#epaWorkspace .epa-property-photo .epa-v50-property-cover{display:block!important;position:absolute!important;inset:0!important;
  width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;
  object-fit:contain!important;object-position:center!important;z-index:1!important;background:transparent!important;}
#epaWorkspace .epa-property-photo .tag,#epaWorkspace .epa-property-photo .fav{z-index:3!important;}
/* Portfolio detail: all originals are visible, with no cropped edges or global avatar CSS. */
.epa-detail-modal .epa-detail-cover,.epa-detail-modal .epa-detail-gallery img{object-fit:contain!important;object-position:center!important;}
.epa-detail-modal .epa-detail-agent > .epa-detail-agent-photo,.epa-detail-modal .epa-detail-agent > .epa-detail-agent-initial{
  width:48px!important;height:48px!important;min-width:48px!important;max-width:48px!important;flex:0 0 48px!important;
  border-radius:50%!important;object-fit:cover!important;overflow:hidden!important;}
/* Office cards: don't let a portrait screenshot make its column taller than the whole card. */
@media(max-width:850px){
  #epaWorkspace .epa-v41-room-card{display:grid!important;grid-template-columns:clamp(105px,30vw,136px) minmax(0,1fr)!important;
    grid-template-rows:auto!important;align-items:stretch!important;min-width:0!important;}
  #epaWorkspace .epa-v41-room-card>img,#epaWorkspace .epa-v41-room-card>.epa-v41-room-image{
    display:block!important;width:100%!important;height:160px!important;min-height:160px!important;max-height:160px!important;
    object-fit:contain!important;object-position:center!important;align-self:start!important;background:#e5eff7!important;}
  #epaWorkspace .epa-v41-room-card .epa-v41-room-content{min-width:0!important;padding:10px!important;}
  #epaWorkspace .epa-v41-room-card .epa-v41-room-content h3{overflow-wrap:anywhere!important;line-height:1.25!important;}
}
@media(max-width:380px){
  #epaWorkspace .epa-v41-room-card{grid-template-columns:108px minmax(0,1fr)!important;}
  #epaWorkspace .epa-v41-room-card>img,#epaWorkspace .epa-v41-room-card>.epa-v41-room-image{height:145px!important;min-height:145px!important;max-height:145px!important;}
}
/* Other avatar surfaces: only image wrappers, never a person's name/body text. */
#epaWorkspace .epa-collab-avatar, #epaWorkspace .epa-collab-avatar>img{max-width:44px!important;max-height:44px!important;}
#epaHomeDashboard .epa-home-owner .seller-avatar{overflow:hidden!important;}
