/* EPA V55 — explicit view modes and focused media layout, scoped to EPA pages. */
/* Front page exposes only the two practical views. */
#epaHomeDashboard [data-epa-view-toolbar="featured"] .epa-v51-modes{flex-wrap:nowrap}
/* Opportunity Center can choose independently from other grids. */
#epaWorkspace .epa-listings.epa-v51-cards[data-epa-view-scope="opportunity"][data-epa-view-mode="grid"]{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
#epaWorkspace .epa-listings.epa-v51-cards[data-epa-view-scope="opportunity"][data-epa-view-mode="stack"]{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
#epaWorkspace .epa-listings.epa-v51-cards[data-epa-view-scope="opportunity"][data-epa-view-mode="compact"]{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
#epaWorkspace .epa-listings[data-epa-view-scope="opportunity"][data-epa-view-mode="grid"] .epa-property-photo{height:178px!important;min-height:178px!important;max-height:178px!important}
#epaWorkspace .epa-listings[data-epa-view-scope="opportunity"][data-epa-view-mode="stack"] .epa-property-photo{height:280px!important;min-height:280px!important;max-height:280px!important}
#epaWorkspace .epa-listings[data-epa-view-scope="opportunity"][data-epa-view-mode="compact"]>.epa-property{display:grid!important;grid-template-columns:min(31%,126px) minmax(0,1fr)!important}
#epaWorkspace .epa-listings[data-epa-view-scope="opportunity"][data-epa-view-mode="compact"] .epa-property-photo{height:100%!important;min-height:160px!important;max-height:none!important}
/* Full photo stays in frame; portrait photos get a taller frame without crop. */
#epaHomeDashboard #listingCards[data-epa-view-mode="grid"] .listing-photo[data-epa-photo-ratio="portrait"]{height:225px!important;min-height:225px!important;max-height:225px!important}
#epaWorkspace .epa-listings[data-epa-view-mode="grid"] .epa-property-photo[data-epa-photo-ratio="portrait"]{height:252px!important;min-height:252px!important;max-height:252px!important}
#epaWorkspace .epa-listings[data-epa-view-mode="stack"] .epa-property-photo[data-epa-photo-ratio="portrait"]{height:295px!important;min-height:295px!important;max-height:295px!important}
#epaHomeDashboard #listingCards .listing-photo .epa-v48-listing-img,
#epaWorkspace .epa-property-photo .epa-v50-property-cover{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important;max-width:100%!important;max-height:100%!important}
/* Keep two-column cards legible and owner actions concise. */
#epaWorkspace .epa-listings[data-epa-view-mode="grid"] .epa-property-owner{display:flex!important;gap:6px!important;align-items:center!important;min-width:0!important;padding:7px 0!important}
#epaWorkspace .epa-listings[data-epa-view-mode="grid"] .epa-property-owner>b{font-size:12px!important}
#epaWorkspace .epa-listings[data-epa-view-mode="grid"] .epa-property-owner>span:last-child{line-height:1.25!important;min-width:0!important}
#epaWorkspace .epa-listings[data-epa-view-mode="grid"] .epa-property-owner small{display:none!important}
#epaWorkspace .epa-listings[data-epa-view-mode="grid"] .epa-property-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}
#epaWorkspace .epa-listings[data-epa-view-mode="grid"] .epa-property-actions button{font-size:10px!important;padding:7px 4px!important;white-space:normal!important;min-height:34px!important;min-width:0!important}
#epaWorkspace .epa-listings[data-epa-view-mode="grid"] .epa-property-body{padding:8px!important}
#epaWorkspace .epa-listings[data-epa-view-mode="grid"] .epa-property-meta{line-height:1.4!important;overflow-wrap:anywhere}
/* Ranking: portrait photos with non-centered subject can be anchored lower while circular crop remains correct. */
#epaUnifiedHome .epa-u-avatar,#epaUnifiedRankingRoot .epa-u-avatar,#epaUnifiedExpertRoot .epa-u-avatar{overflow:hidden!important;border-radius:50%!important;flex:none!important}
#epaUnifiedHome .epa-u-avatar.epa-v55-portrait-avatar img,
#epaUnifiedRankingRoot .epa-u-avatar.epa-v55-portrait-avatar img,
#epaUnifiedExpertRoot .epa-u-avatar.epa-v55-portrait-avatar img{object-position:50% 78%!important}
/* Center + room now have one detail panel, not two duplicated blocks. */
#epaWorkspace .epa-v55-office-detail{padding:14px!important;border-radius:17px!important;overflow:hidden!important}
.epa-v55-office-head h2{font-size:18px!important;margin:4px 0 6px!important;color:#163d5d!important;overflow-wrap:anywhere}
.epa-v55-office-head small{font-size:10px;color:#6c8296;letter-spacing:.05em}
.epa-v55-office-head p{font-size:12px;color:#64768b;line-height:1.5;margin:0 0 12px;overflow-wrap:anywhere}
.epa-v55-office-gallery{display:grid;gap:8px;margin:11px 0 14px}
.epa-v55-office-main-photo{display:grid;place-items:center;width:100%;height:220px;overflow:hidden;background:#edf3f8;border:1px solid #dfe9f1;border-radius:12px;padding:0;cursor:zoom-in}
.epa-v55-office-main-photo img{display:block;width:100%;height:100%;object-fit:contain;object-position:center}
.epa-v55-office-thumbs{display:flex;gap:7px;overflow-x:auto;padding:1px 0 5px;scrollbar-width:thin}
.epa-v55-office-thumbs button{flex:0 0 68px;width:68px;height:58px;overflow:hidden;padding:2px;border:1px solid #e0e7f0;background:#fff;border-radius:8px}
.epa-v55-office-thumbs img{display:block;width:100%;height:100%;object-fit:contain}
.epa-v55-office-placeholder{padding:70px 10px;background:#edf3f8;border-radius:12px;text-align:center;font-size:12px;color:#738aa1}
.epa-v55-office-facts{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.epa-v55-office-facts span{background:#f3f8fc;border:1px solid #e2eaf3;border-radius:9px;padding:7px 9px;font-size:11px;color:#234b65}
.epa-v55-office-description,.epa-v55-office-included{font-size:12px;line-height:1.5;color:#65788a;margin:7px 0}
.epa-v55-office-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:12px 0;border-top:1px solid #e3eaf0;padding-top:12px}
.epa-v55-office-bottom>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.epa-v55-office-bottom small{font-size:10px;color:#718295}
.epa-v55-office-bottom strong{font-size:17px;color:#0e3b62;white-space:nowrap}
.epa-v55-office-bottom .epa-v52-location-inline{flex:0 0 auto;font-size:11px!important;padding:8px!important;min-height:38px!important}
.epa-v55-office-book-action{display:block;width:100%!important;min-height:43px!important;margin:12px 0 0!important}
.epa-v55-room-picker{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#496780;margin:8px 0}
.epa-v55-room-picker select{max-width:100%;padding:10px;border:1px solid #dee8f2;border-radius:9px;background:#fff;color:#203e58}
.epa-v55-office-overlay{position:fixed;inset:0;z-index:2147483640;background:#081a2df2;display:grid;place-items:center;padding:20px;box-sizing:border-box}
.epa-v55-office-overlay img{display:block;max-width:95vw;max-height:85dvh;width:auto;height:auto;object-fit:contain}
.epa-v55-office-overlay-close{position:absolute;right:12px;top:12px;width:44px;height:44px;background:#173e5e;color:#fff;border:1px solid #ffffff66;border-radius:50%;font-size:28px}
@media(max-width:400px){.epa-v55-office-main-photo{height:190px}.epa-v55-office-bottom strong{font-size:15px}#epaWorkspace .epa-v55-office-detail{padding:11px!important}}
