/* Community profile albums: preserve orientation and keep the timeline unchanged. */
.profile-media-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:start; margin-top:16px; }
.profile-media-grid .profile-media-tile.profile-media-tile { min-width:0; padding:0; margin:0; overflow:hidden; border-radius:16px; }
.profile-media-grid .profile-media-tile .feed-post-media { display:block; margin:0; }
.profile-media-grid .profile-media-tile .feed-post-media-item { border:0; border-radius:0; aspect-ratio:9/16; position:relative; display:flex; flex-direction:column; justify-content:center; background:#100d15; }
.profile-media-grid .profile-media-tile .feed-post-media-item :is(img,video) { width:100%; height:100%; max-height:none; object-fit:contain; position:absolute; inset:0; border-radius:0; }
.profile-media-grid .profile-media-caption { display:grid; gap:5px; padding:12px; font-size:13px; }
.profile-media-grid .profile-media-caption span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.profile-media-grid .profile-media-caption time { font-size:11px; opacity:.65; }
.profile-media-grid .feed-post-video-guard { padding:12px; }
.profile-media-grid .post-media-placeholder,.profile-media-grid .post-media-status { padding:12px; text-align:center; }
@media(max-width:800px) { .profile-media-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } }
@media(max-width:360px) { .profile-media-grid .profile-media-caption { padding:8px; font-size:12px; } }

.community-media-library .profile-media-tile .feed-post-media-item { aspect-ratio:1!important; }
.community-media-library .profile-media-caption { display:none; }
.community-media-library .profile-media-tile .feed-post-media-item :is(img,video) { object-fit:cover; }
.community-library-photo { width:100%; padding:0; border:0; background:transparent; aspect-ratio:1; display:block; position:relative; cursor:pointer; }
.community-library-photo img { display:block; width:100%; height:100%; object-fit:cover; }
.profile-media-grid .feed-post-media-item .community-library-open { position:absolute; inset:0; width:100%; height:100%; min-height:0; display:grid; place-items:center; border:0; color:#fff; font-size:32px; background:transparent; cursor:pointer; z-index:1; text-shadow:0 2px 8px #000; }
.community-media-filters { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.community-media-filters [aria-pressed="true"] { background:#a92c66; color:#fff; }
#community-dialog.community-media-viewer { width:min(960px,94vw); max-width:94vw; }
#community-dialog.community-media-viewer :is(img,video) { display:block; width:100%; height:auto; max-height:75dvh; object-fit:contain; background:#0b090e; }
.community-library-photo:focus-visible,.community-library-open:focus-visible { outline:3px solid #f591c3; outline-offset:-3px; }
