.photo-strip{display:flex!important;flex-wrap:nowrap!important;min-width:0;max-width:100%;overflow-x:auto;padding-bottom:8px}.photo-strip>.photo-thumb{flex:0 0 56px;min-width:56px}
.photo-strip{scrollbar-width:none;padding-bottom:0}
.photo-strip::-webkit-scrollbar{display:none}
.photo-strip>.photo-thumb{flex:0 0 calc((100% - 3 * var(--gallery-gap, 10px))/4);min-width:0}


.profile-photo-stage{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;min-width:0;margin:14px 0 22px}
.profile-photo-stage:has(.profile-photo-nav:not([hidden])){grid-template-columns:30px minmax(0,1fr) 30px;gap:5px}
.profile-photo-stage>.photo-strip{margin:0}
.profile-photo-nav:not([hidden]){display:contents}
.profile-photo-nav[hidden]{display:none!important}
.profile-photo-stage:has(.profile-photo-nav:not([hidden]))>.photo-strip{grid-area:1/2}
.profile-photo-stage .profile-photo-nav>button{grid-row:1;display:grid;place-items:center;width:30px;height:36px;min-width:0;min-height:0;padding:0;border:0;border-radius:8px;background:#87345f;color:#fff;font:bold 22px/1 system-ui;cursor:pointer}
.profile-photo-nav>button:first-child{grid-column:1}
.profile-photo-nav>button:last-child{grid-column:3}
.profile-photo-stage .profile-photo-nav>button:disabled{opacity:.45;cursor:default}

.profile-photo-stage>.photo-strip{width:100%!important;max-width:100%!important}
.profile-photo-stage .profile-photo-nav>button{box-sizing:border-box!important;inline-size:30px!important;max-inline-size:30px!important;min-inline-size:0!important;padding:0!important;margin:0!important;background:#87345f!important;color:#fff!important}

.profile-gallery-guest .photo-thumb ~ .photo-thumb img,
.profile-gallery-guest:has(.photo-thumb ~ .photo-thumb.selected) .profile-main-photo img {
  filter: blur(8px) !important;
}
.profile-gallery-guest .photo-thumb,
.profile-gallery-guest .profile-main-photo {
  overflow: hidden;
}
.profile-gallery-guest:has(.photo-thumb ~ .photo-thumb.selected) .profile-main-photo {
  pointer-events: none;
}

.profile-public-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-block:12px}
.profile-public-gallery .public-gallery-locked:not(:has(img)){display:grid;place-items:center}
.profile-public-gallery .public-gallery-locked:not(:has(img)) span{position:static;background:transparent;color:#2a1d33}
.public-gallery-tile{position:relative;display:block;overflow:hidden;border:1px solid #d5c4d1;border-radius:12px;min-height:120px;background:#e8dfe7;padding:0}
.public-gallery-tile img{display:block;width:100%;height:160px;object-fit:cover}
.public-gallery-locked{cursor:default}
.public-gallery-locked span{position:absolute;bottom:0;left:0;right:0;padding:8px;background:#2a1d33;color:#fff;text-align:center;font-size:.8rem}

/* Guest profile: the public renderer places the image directly in this frame. */
body:not([data-member="true"]) #profilePage .profile-main-photo > img {
 position:absolute;inset:0;display:block;width:100%;height:100%;max-width:100%;
 object-fit:contain;object-position:center;background:var(--panel,var(--surface));
}
