/* EPA V48 — one final, scoped geometry layer. No changes to saved photos, accounts or tables. */
@media (max-width: 850px) {
  /* Featured property cards: deliberately shorter above-the-fold; never crop the actual file. */
  #epaHomeDashboard #listingCards {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  #epaHomeDashboard #listingCards .listing{
    display:flex!important;flex-direction:column!important;min-width:0!important;
    border-radius:13px!important;overflow:hidden!important;
    box-shadow:0 2px 9px rgba(10,44,75,.075)!important;
  }
  #epaHomeDashboard #listingCards .listing-photo{
    height:128px!important;min-height:128px!important;max-height:128px!important;
    aspect-ratio:auto!important;width:100%!important;position:relative!important;
    background-image:none!important;background:#edf2f7!important;
    overflow:hidden!important;border-radius:0!important;
  }
  #epaHomeDashboard #listingCards .listing-photo.epa-photo-enhanced:before,
  #epaHomeDashboard #listingCards .listing-photo.epa-photo-enhanced:after{display:none!important;content:none!important}
  #epaHomeDashboard #listingCards .epa-v48-photo-open{
    display:grid!important;place-items:center!important;position:absolute!important;inset:0!important;
    width:100%!important;height:100%!important;padding:4px!important;margin:0!important;border:0!important;
    border-radius:0!important;background:transparent!important;cursor:zoom-in!important;
  }
  #epaHomeDashboard #listingCards .epa-v48-listing-img{
    width:100%!important;height:100%!important;min-width:0!important;max-width:100%!important;
    display:block!important;object-fit:contain!important;object-position:center!important;
    border-radius:0!important;image-rendering:auto!important;
  }
  #epaHomeDashboard #listingCards .listing-photo .tag,
  #epaHomeDashboard #listingCards .listing-photo .fav{z-index:5!important}
  #epaHomeDashboard #listingCards .listing-content{padding:8px 8px 9px!important;gap:0!important}
  #epaHomeDashboard #listingCards .listing .price{font-size:14px!important;line-height:1.23!important;margin:0 0 4px!important;min-height:0!important}
  #epaHomeDashboard #listingCards .listing .place{
    font-size:10.5px!important;line-height:1.32!important;margin:0!important;min-height:2.64em!important;
    display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;
    white-space:normal!important;overflow:hidden!important;
  }
  #epaHomeDashboard #listingCards .listing .kind{
    font-size:9.5px!important;line-height:1.3!important;margin:4px 0 5px!important;min-height:0!important;
    display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:1!important;
    white-space:normal!important;overflow:hidden!important;
  }
  #epaHomeDashboard #listingCards .listing .epa-home-owner{
    margin:0!important;padding:6px 0!important;gap:6px!important;min-height:36px!important;overflow:hidden!important;
  }
  #epaHomeDashboard #listingCards .listing .seller-avatar{
    flex:0 0 30px!important;width:30px!important;height:30px!important;
    min-width:30px!important;min-height:30px!important;max-width:30px!important;max-height:30px!important;
  }
  #epaHomeDashboard #listingCards .listing .epa-home-owner b{
    font-size:10px!important;line-height:1.15!important;white-space:nowrap!important;
    display:block!important;max-height:1.2em!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  #epaHomeDashboard #listingCards .listing .epa-home-owner small{
    font-size:8.5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  #epaHomeDashboard #listingCards .listing .epa-btn{
    min-height:33px!important;height:33px!important;margin-top:4px!important;
    padding:6px 5px!important;font-size:10.5px!important;border-radius:9px!important;
  }
}
@media (max-width: 350px){
  #epaHomeDashboard #listingCards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  #epaHomeDashboard #listingCards .listing-photo{height:112px!important;min-height:112px!important;max-height:112px!important}
}
/* Portfolio collection thumbnails and detail gallery: unchanged files, no forced crop/zoom. */
#epaWorkspace .epa-property .epa-property-photo{background-size:contain!important;background-position:center!important;background-repeat:no-repeat!important}
.epa-detail-modal .epa-detail-cover{
  width:100%!important;height:clamp(210px,56vw,340px)!important;
  display:block!important;object-fit:contain!important;object-position:center!important;
  background:#edf3f8!important;transform:none!important;
}
.epa-detail-modal .epa-detail-gallery .epa-detail-thumb img{
  object-fit:contain!important;object-position:center!important;background:#edf3f8!important;
}
/* Collaboration offers: single compact avatar. Never touch story/profile photo source. */
#epaWorkspace .epa-collab-offer .epa-collab-person{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:nowrap!important;margin:7px 0!important;min-height:36px!important}
#epaWorkspace .epa-collab-offer .epa-collab-person>b{font-size:11px!important;flex:0 0 auto!important}
#epaWorkspace .epa-collab-offer .epa-collab-person-btn{
  display:inline-flex!important;align-items:center!important;gap:7px!important;
  padding:2px 4px!important;margin:0!important;min-height:36px!important;
  max-width:calc(100% - 65px)!important;min-width:0!important;
  flex:0 1 auto!important;background:transparent!important;border:0!important;
  box-shadow:none!important;border-radius:7px!important;overflow:hidden!important;
  text-align:left!important;font-size:12px!important;
}
#epaWorkspace .epa-collab-offer .epa-collab-person-btn .epa-collab-avatar{
  display:flex!important;position:relative!important;align-items:center!important;justify-content:center!important;
  padding:0!important;margin:0!important;box-sizing:border-box!important;overflow:hidden!important;
  flex:0 0 34px!important;width:34px!important;height:34px!important;
  min-width:34px!important;min-height:34px!important;max-width:34px!important;max-height:34px!important;
  line-height:1!important;font-size:13px!important;border-radius:50%!important;
}
#epaWorkspace .epa-collab-offer .epa-collab-person-btn .epa-collab-avatar>img,
#epaWorkspace .epa-collab-offer .epa-collab-person-btn .epa-collab-avatar img.epa-collab-avatar-image,
#epaWorkspace .epa-collab-offer .epa-collab-person-btn .epa-collab-avatar img.epa-photo-portrait{
  display:block!important;position:absolute!important;inset:0!important;
  width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
  max-width:100%!important;max-height:100%!important;aspect-ratio:1/1!important;
  border:0!important;border-radius:50%!important;margin:0!important;padding:0!important;
  object-fit:cover!important;object-position:center!important;transform:none!important;filter:none!important;
}
#epaWorkspace .epa-collab-offer .epa-collab-person-btn>span:last-child{
  min-width:0!important;font-size:12px!important;line-height:1.25!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
/* Office catalog: one well-proportioned card instead of a half-width empty column. */
#epaWorkspace .epa-v48-center-summary{padding:11px 13px!important}
#epaWorkspace .epa-v48-center-heading{display:flex!important;align-items:flex-start!important;gap:9px!important;min-width:0!important}
#epaWorkspace .epa-v48-center-heading>div{flex:1!important;min-width:0!important}
#epaWorkspace .epa-v48-center-heading h2{font-size:16px!important;line-height:1.3!important;margin:0 0 3px!important;overflow-wrap:anywhere!important}
#epaWorkspace .epa-v48-center-heading p{margin:0!important;font-size:11.5px!important;line-height:1.45!important}
#epaWorkspace .epa-v48-center-description{font-size:12px!important;line-height:1.45!important;margin:9px 0 0!important}
#epaWorkspace .epa-v48-back{flex:0 0 34px!important;width:34px!important;height:34px!important;min-height:34px!important;border:1px solid #dce6ee!important;border-radius:10px!important;background:#fff!important;color:#174869!important;display:grid!important;place-items:center!important;padding:0!important;font-size:20px!important;white-space:nowrap!important;overflow:hidden!important}
#epaWorkspace .epa-v48-empty-photo{display:grid;place-items:center;color:#6c7e8f;font-size:12px;background:#eef3f7;max-height:95px!important;height:95px!important;min-height:95px!important;aspect-ratio:auto!important}
#epaWorkspace .epa-office-gallery{margin:9px 0 0!important;grid-template-columns:repeat(auto-fit,minmax(105px,1fr))!important}
#epaWorkspace .epa-office-gallery img{height:115px!important;object-fit:contain!important;object-position:center!important}
#epaWorkspace .epa-office-tile .epa-btn{min-height:38px!important;white-space:normal!important}
#epaWorkspace .epa-v48-booking-form-card{scroll-margin-top:185px;padding:13px!important}
#epaWorkspace .epa-v48-booking-form-card h3{font-size:16px!important;margin:0 0 7px!important}
#epaWorkspace .epa-v48-booking-form-card>p{margin:0 0 10px!important;font-size:12px!important}
#epaWorkspace .epa-v48-booking-modes,#epaWorkspace .epa-v48-thread-tabs{display:flex!important;gap:7px!important;flex-wrap:wrap!important;margin:9px 0 12px!important}
#epaWorkspace .epa-v48-booking-modes>.epa-btn,#epaWorkspace .epa-v48-thread-tabs>.epa-btn{min-height:35px!important;flex:1 1 120px!important;padding:7px 9px!important;border-radius:10px!important;font-size:12px!important}
#epaWorkspace .epa-v48-first-offer{margin:11px 0!important;padding:12px!important;border-radius:10px!important;border:1px solid #d9e5ee!important;background:#f7fafc!important}
#epaWorkspace .epa-v48-first-offer label{display:flex!important;flex-direction:column!important;gap:6px!important;margin:0 0 9px!important;font-size:12px!important;font-weight:750!important}
#epaWorkspace .epa-v48-first-offer input{width:100%!important;min-height:40px!important;border:1px solid #cddbe7!important;border-radius:9px!important;padding:9px!important;box-sizing:border-box!important}
#epaWorkspace .epa-v48-first-offer small{font-size:11px;color:#697b8d;line-height:1.4}
#epaWorkspace .epa-v48-first-offer[hidden],#epaWorkspace .epa-v48-thread-pane[hidden]{display:none!important}
@media(max-width:630px){
  #epaWorkspace .epa-v41-room-grid{grid-template-columns:1fr!important;gap:9px!important}
  #epaWorkspace .epa-v41-room-card{display:grid!important;grid-template-columns:120px minmax(0,1fr)!important;min-width:0!important}
  #epaWorkspace .epa-v41-room-card>img,#epaWorkspace .epa-v41-room-image{height:100%!important;min-height:155px!important;max-height:none!important;object-fit:contain!important}
  #epaWorkspace .epa-v41-room-content{padding:10px!important;gap:5px!important}
  #epaWorkspace .epa-v41-room-content h3{font-size:13px!important;margin:0!important}
  #epaWorkspace .epa-v41-room-content p{font-size:11px!important;line-height:1.3!important;margin:0!important}
  #epaWorkspace .epa-v41-room-price{font-size:14px!important}
  #epaWorkspace .epa-v41-room-content>.epa-btn{min-height:34px!important;padding:7px 6px!important;margin-top:4px!important;font-size:11px!important}
  #epaWorkspace .epa-office-header{flex-direction:row!important;align-items:center!important;padding:10px!important;gap:9px!important}
  #epaWorkspace .epa-office-header>div{min-width:0!important}
  #epaWorkspace .epa-office-header h1{font-size:16px!important;line-height:1.3!important;margin:3px 0!important}
  #epaWorkspace .epa-office-header p{font-size:11px!important;line-height:1.35!important}
}
