/* The grid is inside page content; sticky ends before the site footer. */
.player-feed .feed-no-banner{background:linear-gradient(120deg,rgba(125,95,210,.1),rgba(125,95,210,.025))}
.player-feed .feed-no-banner .feed-rich-content{padding-block:16px}
.player-feed .feed-result-panel{align-items:center;gap:8px 14px;margin:12px 0;padding:10px 12px;border-inline-start:3px solid rgba(145,111,255,.65);font-size:13px}
.feed-result-rank{font-weight:700}
.feed-result-duration{font-variant-numeric:tabular-nums;white-space:nowrap}
/* Feed display uses uncropped originals; editor thumbnails stay unchanged. */
.player-feed .feed-media-preview{display:block;width:100%;padding:0;border:0;overflow:hidden;border-radius:12px;background:rgba(125,95,210,.06);margin:16px 0}
.player-feed .feed-media-preview img,.player-feed img.feed-media-preview{display:block;width:100%;height:auto;max-height:520px;object-fit:contain;margin-inline:auto}
.player-feed .feed-image-grid img{width:100%;height:auto;max-height:520px;aspect-ratio:auto;object-fit:contain}
.player-feed .feed-image-grid-1 img{width:100%}
.player-feed .feed-rich-card .feed-cover{height:auto;max-height:520px;aspect-ratio:auto;object-fit:contain;background:rgba(125,95,210,.06)}
.player-post-footer{margin-top:18px;color:inherit}
.player-post-engagement{display:flex;align-items:center;gap:8px;padding:10px 0;font-size:13px;opacity:.85}
.player-post-reaction{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#6942c2;color:#fff;font-size:12px}
.player-post-action-row{display:flex;gap:6px;border-block:1px solid var(--border,rgba(145,111,255,.25));padding:5px 0}
.player-feed .player-post-action-row button{display:flex;flex:1;min-width:0;min-height:44px;align-items:center;justify-content:center;gap:8px;padding:8px;color:inherit;background:transparent;border-radius:8px;font-weight:600;font-size:13px}
.player-feed .player-post-action-row button:hover{background:rgba(125,95,210,.12)}
.player-feed .player-post-action-row button:focus-visible{outline:2px solid #9170ff;outline-offset:2px}
.player-feed .player-post-action-row button[aria-pressed=true]{color:#a88bff;background:rgba(125,95,210,.12)}
.player-post-action-row svg{width:20px;height:20px;flex-shrink:0}
.player-post-footer [data-social-error]:empty{display:none}
.player-post-footer [data-social-error]{display:block;margin-top:8px;font-size:13px}
.player-activity-layout{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,5fr);gap:24px;align-items:start}
.player-activity-layout>*,.player-profile-sidebar-inner{min-width:0}
.player-activity-layout [data-feed-main]{grid-column:2;grid-row:1}
.player-activity-layout [data-feed-sidebar]{grid-column:1;grid-row:1;align-self:stretch}
.player-profile-sidebar-inner{position:sticky;top:var(--profile-sticky-top,90px)}
.player-profile-sidebar .t-card{margin:0 0 18px}
.player-activity-layout .player-feed{margin:0;max-width:none}
.player-activity-layout .t-info-row{gap:12px}
.compact-result-name{min-width:0;overflow-wrap:anywhere}
[data-compact-results] .t-info-row .badge{font-size:inherit;line-height:inherit;font-weight:600}
.profile-contact{border-top:1px solid var(--border,rgba(128,128,128,.25));margin-top:14px;padding-top:14px}
.profile-contact h4{margin:0 0 8px}
.profile-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.profile-preview-grid>.t-desc{grid-column:1/-1}
.profile-friend{text-align:center;min-width:0;display:flex;align-items:center;flex-direction:column;gap:6px}
.profile-friend span{font-size:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-friend-avatar{width:48px;height:48px;border-radius:50%;object-fit:cover}
.profile-gallery-thumb{aspect-ratio:1;display:block;overflow:hidden;border:0;padding:0;border-radius:10px;background:transparent;cursor:pointer}
.profile-gallery-thumb img{width:100%;height:100%;object-fit:cover}
.profile-site-links{display:flex;flex-wrap:wrap;gap:8px 14px;font-size:12px;opacity:.8;padding:0 4px 18px}
/* Grid column 1 starts at the inline start: right in the canonical RTL root. */
@media(max-width:991px){
 .player-activity-layout{grid-template-columns:minmax(0,1fr)}
 .player-activity-layout [data-feed-main]{grid-column:1;grid-row:1}
 .player-activity-layout [data-feed-sidebar]{grid-column:1;grid-row:2}
 .player-profile-sidebar-inner{position:static}
 .profile-preview-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
.feed-image-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:16px 0;overflow:hidden;border-radius:12px}.feed-image-grid a{display:flex;min-width:0;align-items:center;justify-content:center;background:rgba(125,95,210,.06)}.feed-image-grid img{display:block;width:100%;height:100%;aspect-ratio:1;object-fit:cover}.feed-image-grid-1{grid-template-columns:minmax(0,1fr)}.feed-image-grid-1 img{height:auto;max-height:520px;aspect-ratio:auto;object-fit:contain;width:auto;max-width:100%}.feed-gallery-choices,.feed-media-previews{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}.feed-gallery-choices label,.feed-media-previews>div{min-width:0}.feed-gallery-choices img,.feed-media-previews img{display:block;width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px}.player-feed .feed-gallery-choices input{width:20px;height:20px}.feed-media-previews button{min-height:44px;width:100%;padding:6px}.player-feed [data-feed-files]{max-width:100%}@media(max-width:480px){.feed-gallery-choices,.feed-media-previews{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Keep the identity baseline stable as the share row grows. */
.player-share-header{align-items:flex-end}.player-share-header>div:last-child{min-width:0;flex:1}
.player-share-header .p-hero-name-row h1{display:flex;align-items:center;gap:3px;line-height:1.3;flex-wrap:wrap}
.player-share-header .p-hero-meta{align-items:center}
@media(max-width:680px){.player-share-header{align-items:flex-start;flex-direction:column;gap:16px}.player-share-header>div:last-child{width:100%}}

/* Canonical relationship forms sit opposite the identity, mirrored in RTL. */
.player-share-header{flex-wrap:wrap;column-gap:24px;row-gap:16px}
.player-share-header>.player-header-identity{flex:1 1 280px;min-width:0}
.player-share-header>.player-header-action-area{flex:0 1 auto;min-width:0;margin-inline-start:auto;align-self:center}
.player-header-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.player-header-actions form{margin:0}
.player-header-actions button{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:8px 12px;border:1px solid var(--line-strong,rgba(122,137,255,.34));border-radius:9px;background:var(--panel,rgba(8,18,36,.82));color:var(--text,#f7f9ff);font:inherit;font-size:13px;line-height:1.4;cursor:pointer;box-shadow:none}
.player-header-actions form:first-child button{background:var(--violet,#8b3dff);border-color:var(--violet,#8b3dff);color:#fff}
.player-header-actions button svg{display:block;flex:none}
.player-header-actions button:hover{filter:brightness(1.12)}
.player-header-actions button:focus-visible{outline:2px solid var(--violet,#8b3dff);outline-offset:3px}
.player-header-actions>span{font-size:13px;color:var(--text-muted,#a1acc0)}
.player-header-actions:empty{display:none}
.player-social-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:16px 0;min-width:0;overflow-wrap:anywhere}
.player-social-actions p{margin:0;flex:1 1 auto}
@media(max-width:680px){.player-share-header>.player-header-identity{flex:auto}.player-share-header>.player-header-action-area{width:100%;margin-inline-start:0;align-self:stretch;justify-content:flex-start}}
@media(max-width:680px){.p-hero-top.player-share-header{display:grid!important;grid-template-columns:95px minmax(0,1fr);column-gap:14px!important;row-gap:12px!important}.p-hero-top.player-share-header>.player-header-action-area{grid-column:1/-1;padding-top:0!important;width:100%;justify-content:flex-start}.p-hero-top.player-share-header>.player-header-identity{width:auto}}

.player-header-action-area{display:flex;flex-direction:column;align-items:flex-end;gap:4px}.player-header-action-area .player-profile-share{margin-top:0;justify-content:flex-end}.player-header-counts{margin:8px 0 0;font-size:13px;line-height:1.5;color:var(--text,#f7f9ff)}.player-social-actions{justify-content:flex-end}@media(max-width:680px){.player-header-action-area{align-items:flex-start}.player-header-action-area .player-profile-share{justify-content:flex-start}}

.player-header-counts{display:flex;align-items:center;flex-wrap:wrap;gap:6px}.player-header-counts>span:not(.player-count-divider){display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.player-header-counts svg{display:block;width:18px;height:18px;flex:none;color:#88909f;stroke-linecap:round;stroke-linejoin:round}.player-count-divider{color:#88909f}

/* Share at the top; relationship controls at the bottom of the identity section. */
.player-share-header>.player-header-action-area{align-self:stretch;justify-content:space-between;gap:16px}.player-header-action-area .player-profile-share{order:-1}.player-header-action-area .player-header-actions{margin-top:auto}@media(max-width:680px){.player-share-header>.player-header-action-area{gap:10px}.player-header-action-area .player-header-actions{justify-content:flex-start}}

/* Tablet/mobile: keep controls below the identity and clear of the cover. */
@media(max-width:1100px){
 .p-hero-top.player-share-header{display:grid!important;grid-template-columns:160px minmax(0,1fr);gap:16px!important;align-items:end!important}
 .p-hero-top.player-share-header>.player-header-identity{width:auto;min-width:0}
 .p-hero-top.player-share-header>.player-header-action-area{grid-column:1/-1;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;width:100%;margin-inline-start:0;padding-top:0!important}
 .player-header-action-area .player-profile-share{order:0;justify-content:flex-start}
 .player-header-action-area .player-header-actions{margin-top:0;justify-content:flex-end}
}
@media(max-width:680px){
 .p-hero-top.player-share-header{grid-template-columns:95px minmax(0,1fr);column-gap:12px!important;row-gap:14px!important}
 .player-header-counts{gap:5px 10px;font-size:12px}
 .player-header-counts .player-count-divider{display:none}
 .player-header-counts>span:not(.player-count-divider){gap:5px}
 .player-header-counts svg{width:16px;height:16px}
 .p-hero-top.player-share-header>.player-header-action-area{align-items:flex-start}
 .player-header-action-area .player-header-actions{justify-content:flex-start}
 .player-share-header~.t-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
/* iPad: reserve the real avatar width and keep actions under the identity. */
@media(min-width:681px) and (max-width:1100px){
 .p-hero-top.player-share-header{grid-template-columns:200px minmax(0,1fr);column-gap:24px!important}
 .p-hero-top.player-share-header>.player-header-action-area{grid-column:2;flex-direction:column;align-items:flex-end;justify-content:flex-start}
 .player-header-action-area .player-profile-share{order:-1;justify-content:flex-end}
 .player-header-action-area .player-header-actions{justify-content:flex-end}
}
@media(min-width:901px) and (max-width:1100px){
 .p-hero-top.player-share-header{grid-template-columns:200px minmax(0,1fr) auto;column-gap:20px!important;row-gap:0!important}
 .p-hero-top.player-share-header>.player-header-action-area{grid-column:3;grid-row:1;align-self:stretch;justify-content:space-between;gap:12px;width:auto}
 .player-header-action-area .player-header-actions{margin-top:auto;max-width:290px}
 .player-header-action-area .player-profile-share{margin-top:0}
}
/* Mobile-only centered social rows and a raised avatar. */
@media(max-width:680px){
 .p-hero-top.player-share-header{align-items:start!important}
 .p-hero-top.player-share-header>div:first-child{padding-top:28px!important}
 .player-share-header .player-header-counts{position:relative;display:flex;justify-content:center;width:calc(100% + 107px);margin-inline-start:-107px;margin-top:18px;gap:6px;font-size:12px}
 .player-header-counts .player-count-divider{display:inline}
 .p-hero-top.player-share-header>.player-header-action-area{flex-direction:column;align-items:center;justify-content:center;gap:10px}
 .player-header-action-area .player-profile-share{order:-1;justify-content:center}
 .player-header-action-area .player-header-actions{justify-content:center;width:100%}
}
.player-header-actions [data-relationship-status]{flex-basis:100%;max-width:290px;text-align:end;font-size:12px;line-height:1.5;color:var(--muted,#88909f)}.player-header-actions [data-relationship-status]:empty{display:none}.player-header-actions button:disabled{opacity:.55;cursor:not-allowed}@media(max-width:680px){.player-header-actions [data-relationship-status]{text-align:center}}
/* A transparent favicon must not show the fallback globe through it. */
.feed-caption-link [data-caption-favicon] ~ .feed-caption-globe {
    visibility: hidden;
}

/* Owner media actions and canonical upload panel. */
.p-hero-banner{position:relative}.profile-media-action{border:1px solid #9b74ff;background:#5426b9;color:#fff;padding:8px 12px;border-radius:9px;font-size:12px;cursor:pointer;z-index:12}.profile-banner-action{position:absolute;inset-inline-end:16px;top:16px}.profile-avatar-action{position:absolute;bottom:10px;left:10px;right:10px;opacity:0}.group:hover .profile-avatar-action,.group:focus-within .profile-avatar-action{opacity:1}.profile-photo-tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.profile-photo-tabs button{border:1px solid #9270dd;border-radius:8px;padding:8px 12px;background:transparent;color:inherit}.profile-photo-tabs [aria-selected=true]{background:#6331c9;color:white}.profile-photo-item{color:inherit;text-decoration:none;min-width:0}.profile-photo-item img{width:100%;height:140px;object-fit:cover;border-radius:10px}.profile-photo-item span{display:block;font-size:12px;padding:8px}.profile-photo-item small{margin-inline-start:8px;color:#8b58ea}.profile-media-dialog{width:min(460px,calc(100vw - 32px));max-height:90vh;overflow:auto;border:1px solid #a680ef;border-radius:18px;padding:22px;background:var(--bg-card,#fff);color:var(--text-primary,#17162c)}.profile-media-dialog::backdrop{background:rgba(0,0,0,.6)}.profile-media-dialog form{display:grid;gap:14px}.profile-media-dialog label{font-size:13px;display:grid;gap:5px}.profile-media-dialog input,.profile-media-dialog textarea{width:100%;box-sizing:border-box;padding:9px;border:1px solid #ac94d6;border-radius:8px;background:transparent;color:inherit}.profile-media-dialog [data-upload-preview]{width:100%;max-height:180px;object-fit:contain}.profile-upload-footer{display:flex;justify-content:flex-end;gap:12px}.profile-upload-footer button{padding:9px 16px;border:1px solid #9b74ff;border-radius:8px;background:transparent;color:inherit}.profile-upload-footer button[type=submit]{background:#6331c9;color:white}.profile-media-dialog progress{width:100%}html[data-theme=dark] .profile-media-dialog{background:#141225;color:#eee}@media(hover:none){.profile-avatar-action{opacity:1}}

.profile-media-dialog{margin:auto;inset:0;box-sizing:border-box}

/* Large phones and screens below the 768px tablet breakpoint. */
.profile-mid-banner-share{display:none}
@media(min-width:481px) and (max-width:767px){
 .p-hero-top.player-share-header{grid-template-columns:160px minmax(0,1fr)!important;align-items:center!important}
 .p-hero-top.player-share-header .p-avatar{width:150px!important;height:150px!important;min-width:150px!important}
 .p-hero-top.player-share-header .p-avatar-initials{font-size:58px!important}
 .profile-mid-banner-share{display:block;position:absolute;bottom:14px;right:16px;z-index:3}
 .profile-mid-banner-share .player-profile-share{margin:0;justify-content:flex-end}
 .player-header-action-area>.player-profile-share{display:none}
 .player-share-header~.t-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .player-share-header~.t-hero-stats>.t-hero-stat{min-width:0}
}

@media(min-width:481px) and (max-width:767px){.p-hero-top.player-share-header .p-avatar .avatar-initials{width:100%;height:100%}}

/* One image frame: the avatar wrapper must not add a second border. */
.p-hero-top.has-banner .avatar.p-avatar{border:0;box-shadow:none}
.p-hero-top.has-banner .avatar.p-avatar>.avatar-initials,
.p-hero-top.has-banner .avatar.p-avatar>.avatar-image{width:100%!important;height:100%!important;min-width:0!important;box-sizing:border-box;border:4px solid #0a0e1a;border-radius:inherit;box-shadow:none}
[data-theme="light"] .p-hero-top.has-banner .avatar.p-avatar>.avatar-initials,
[data-theme="light"] .p-hero-top.has-banner .avatar.p-avatar>.avatar-image{border-color:#fff}

/* Secondary Gallery navigation shares the main tabs' underline treatment. */
.profile-photo-tabs{align-items:center;gap:24px;border-bottom:1px solid var(--border,rgba(145,111,255,.2));margin-bottom:20px}
.profile-photo-tabs>a{position:relative;display:inline-flex;align-items:center;padding:12px 0;color:inherit;font-size:14px;font-weight:600;text-decoration:none;opacity:.65;border-bottom:2px solid transparent}
.profile-photo-tabs>a[aria-selected=true]{background:transparent;color:inherit;border-bottom-color:#8a35ff;opacity:1}
.profile-photo-tabs>a:focus-visible{outline:2px solid #9b74ff;outline-offset:4px;border-radius:2px}
.profile-photo-tabs>button[data-profile-upload]{margin-inline-start:auto;border:0;border-radius:0;background:transparent;color:#9b74ff;padding:10px 0;font-size:13px;font-weight:600;cursor:pointer}
@media(max-width:480px){.profile-photo-tabs{gap:18px;row-gap:4px}.profile-photo-tabs>a{font-size:13px}.profile-photo-tabs>button[data-profile-upload]{font-size:12px}}

.profile-media-dialog .profile-upload-drop{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:100px;padding:16px;border:2px dashed #9b74ff;border-radius:12px;background:rgba(145,111,255,.06);cursor:pointer}
.profile-upload-drop>span:first-child{font-size:28px;line-height:1}.profile-upload-drop input{position:absolute;inset:0;opacity:0;cursor:pointer}.profile-upload-drop:focus-within,.profile-upload-drop.is-dragging{outline:2px solid #9b74ff;outline-offset:3px;background:rgba(145,111,255,.15)}
.profile-upload-selection{display:flex;align-items:center;gap:12px;min-width:0}.profile-upload-selection[hidden]{display:none}.profile-media-dialog .profile-upload-selection [data-upload-preview]{width:64px;height:64px;flex-shrink:0;border-radius:8px;object-fit:cover}.profile-upload-selection [data-upload-filename]{font-size:12px;overflow-wrap:anywhere;flex:1;min-width:0}.profile-upload-selection button{background:transparent;color:inherit;border:0;font-size:25px;min-width:36px;min-height:36px;cursor:pointer}
.profile-media-dialog button:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.65);box-shadow:none;pointer-events:none}.profile-media-dialog form[aria-busy=true] .profile-upload-drop{opacity:.55;cursor:wait}.profile-media-dialog input:disabled,.profile-media-dialog textarea:disabled{opacity:.65;cursor:not-allowed}
.profile-media-dialog [data-upload-heading]{margin:0;font-size:19px;font-weight:650;line-height:1.4;padding-bottom:12px;border-bottom:1px solid rgba(155,116,255,.22)}.profile-media-dialog [data-banner-help]{line-height:1.5;color:var(--muted,#73738a)}
[data-profile-gallery]{min-width:0;margin-top:24px;padding-top:12px}.profile-photo-legend{width:calc(100% - 16px);padding:0 8px}.profile-photo-legend .profile-photo-tabs{border-bottom:0;margin-bottom:0;gap:24px;flex-wrap:nowrap}.profile-photo-legend .profile-photo-tabs>a{padding:5px 0;white-space:nowrap}.profile-photo-legend .profile-photo-tabs>button[data-profile-upload]{padding:5px 0;white-space:nowrap}@media(max-width:480px){.profile-photo-legend{width:100%;padding:0 2px}.profile-photo-legend .profile-photo-tabs{gap:14px;flex-wrap:wrap}.profile-photo-legend .profile-photo-tabs>a{font-size:12px}.profile-photo-legend .profile-photo-tabs>button[data-profile-upload]{font-size:11px}}
.profile-photo-border-line{flex:1;min-width:20px;border-top:1px solid var(--border,rgba(145,111,255,.2));align-self:center}.profile-photo-legend .profile-photo-tabs>button[data-profile-upload]{margin-inline-start:0}@media(max-width:480px){.profile-photo-border-line{min-width:12px}}
[data-profile-gallery]{border-color:var(--line,rgba(120,145,210,.17))}.profile-photo-border-line{border-top-color:var(--line,rgba(120,145,210,.17))}
.profile-banner-warning{font-size:13px;line-height:1.6;padding:12px;border-inline-start:3px solid #a680ef;border-radius:8px;background:rgba(155,116,255,.09)}.profile-banner-warning[hidden]{display:none}
/* Current media actions: shared uploader and canonical crop adapter. */
.profile-media-toolbar{position:absolute;display:flex;gap:4px;z-index:12;background:var(--card,#171329);padding:4px;border:1px solid var(--border,#343049);border-radius:10px}
.profile-media-toolbar button{display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;padding:8px;background:transparent;border:0;border-radius:7px;color:var(--text,#fff);cursor:pointer}
.profile-media-toolbar button:hover{background:rgba(130,70,230,.2)}
[data-theme="light"] .profile-media-toolbar{background:#fff;border-color:var(--line,#dcdde8);box-shadow:0 3px 12px #17203b14}
[data-theme="light"] .profile-media-toolbar button{color:#452178}
[data-theme="light"] .profile-media-toolbar button:hover{background:#f1e9ff}
.profile-media-toolbar button:focus-visible{outline:2px solid #9f40ff;outline-offset:2px}
.profile-media-toolbar svg{width:20px;height:20px}
.profile-media-toolbar.profile-avatar-action{bottom:8px;inset-inline-end:8px}
.profile-media-toolbar.profile-banner-action{top:16px;inset-inline-end:16px}
@media(hover:hover){
 .p-hero-banner .profile-media-toolbar.profile-banner-action:has([data-media-action]){opacity:0;pointer-events:none;transition:opacity .15s ease}
 .p-hero-banner:hover .profile-media-toolbar.profile-banner-action:has([data-media-action]),
 .p-hero-banner:focus-within .profile-media-toolbar.profile-banner-action:has([data-media-action]){opacity:1;pointer-events:auto}
}
.player-crop-stage{height:300px;max-height:45vh;overflow:hidden;background:#171329;border-radius:10px}
.player-crop-stage img{display:block;max-width:100%}
.player-crop-tools{display:flex;gap:12px;align-items:center;margin:14px 0}
.player-crop-preview{width:80px;height:80px;overflow:hidden;border-radius:8px;flex-shrink:0;background:#171329}
.player-crop-tools button{min-width:44px;min-height:44px}
.player-crop-tools span{font-size:12px;flex:1}
#player-media-actions [data-action-confirm]{line-height:1.7;margin:18px 0}
@media(max-width:480px){.profile-media-toolbar.profile-avatar-action{bottom:0;inset-inline-end:0;gap:0;padding:2px}.profile-media-toolbar.profile-avatar-action button{min-width:32px;min-height:40px;padding:6px}.player-crop-stage{height:240px}}
#player-media-actions .profile-upload-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:18px}
#player-media-actions button{border:1px solid var(--border,#8f4aff);border-radius:9px;padding:10px 16px;color:inherit;background:transparent;cursor:pointer}
#player-media-actions [data-action-save]{background:#7900ed;color:white;border-color:#7900ed}
#player-media-actions button:disabled{opacity:.45;cursor:wait}
#player-media-actions button:focus-visible{outline:2px solid #ac64ff;outline-offset:3px}
/* Quantity-aware feed collages; originals remain available in the media viewer. */
.player-feed .feed-image-grid.feed-collage{gap:3px;aspect-ratio:4/3;max-height:560px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));background:var(--line,rgba(120,145,210,.17))}
.player-feed .feed-collage .feed-collage-tile{position:relative;display:block;min-width:0;min-height:0;overflow:hidden;background:var(--bg-card,#171329)}
.player-feed .feed-image-grid.feed-collage img{display:block;width:100%;height:100%;max-height:none;aspect-ratio:auto;object-fit:cover}
.player-feed .feed-collage-tile:focus-visible{outline:3px solid #9638ff;outline-offset:-3px;z-index:1}
.player-feed .feed-image-grid.feed-collage-1{display:block;width:100%;max-width:none;max-height:none;aspect-ratio:auto;border-radius:12px;overflow:hidden;background:transparent}
.player-feed .feed-image-grid.feed-collage-1 img{width:100%;height:auto;max-height:560px;object-fit:contain;border-radius:0}
.player-feed .feed-image-grid.feed-collage-2{grid-template-rows:minmax(0,1fr);aspect-ratio:3/2}
.player-feed .feed-image-grid.feed-collage-2.is-portrait{aspect-ratio:1/1}
.player-feed .feed-collage-3>a:first-child{grid-column:1/-1}
.player-feed .feed-image-grid.feed-collage-3.is-portrait{grid-template-columns:3fr 2fr}
.player-feed .feed-collage-3.is-portrait>a:first-child{grid-column:auto;grid-row:1/-1}
.player-feed .feed-image-grid.feed-collage-4.is-portrait{grid-template-columns:2fr 1fr;grid-template-rows:repeat(3,minmax(0,1fr))}
.player-feed .feed-collage-4.is-portrait>a:first-child{grid-row:1/-1}
.player-feed .feed-image-grid.feed-collage-5{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:3fr 2fr}
.player-feed .feed-collage-5>a{grid-column:span 2}
.player-feed .feed-collage-5>a:nth-child(-n+2){grid-column:span 3}
.player-feed .feed-collage-more{position:absolute;inset:0;display:grid;place-items:center;background:#0008;color:#fff;font-size:clamp(24px,5vw,46px);font-weight:700;pointer-events:none;direction:ltr}

/* Match the single-photo frame to its image; preserve proportional sizing. */
.player-feed .feed-image-grid.feed-collage-1 .feed-collage-tile {
    border:0;
    border-radius:12px;
}

.player-feed .public-feed-ad-slot{padding:20px;margin-bottom:18px;border:1px dashed var(--line,#ddd);border-radius:14px;color:var(--muted,#777);text-align:center;font-size:12px}

/* Profile timeline collages fill the card instead of shrinking to their capped height. */
.player-feed[data-feed-player] .feed-image-grid.feed-collage:not(.feed-collage-1){
    width:100%;
    max-width:none;
    min-width:0;
    box-sizing:border-box;
    margin-inline:0;
}
.player-header-action-area .player-header-actions{max-width:none}.player-relationship-controls{display:flex;align-items:center;justify-content:inherit;flex-wrap:nowrap;gap:8px;max-width:100%}.player-relationship-controls>form{flex:0 1 auto;min-width:0}.player-relationship-controls>form button{white-space:nowrap}.player-relationship-controls>.profile-safety-menu{flex:0 0 auto}@media(max-width:680px){.player-relationship-controls{gap:5px;width:100%;justify-content:center}.player-relationship-controls>form button{padding:8px;font-size:12px;gap:5px;flex-wrap:wrap;justify-content:center}.player-relationship-controls>form button svg{width:16px;height:16px}}
@media(max-width:680px){.player-relationship-controls>form button{max-width:100%;box-sizing:border-box;width:100%}}

/* Profile hero: one banner share row, mirrored away from the avatar. */
.player-header-summary{display:contents}
.t-hero .profile-mid-banner-share{display:block;position:absolute;left:auto;right:auto;inset-inline-start:auto;inset-inline-end:16px;bottom:14px;z-index:3;max-width:calc(100% - 32px)}
.t-hero .profile-mid-banner-share .player-profile-share{margin:0;justify-content:flex-end;flex-wrap:wrap}
.t-hero .player-header-action-area>.player-profile-share{display:none}
@media(max-width:767px){
 .p-hero-top.player-share-header{--profile-avatar-size:95px;display:grid!important;grid-template-columns:var(--profile-avatar-size) minmax(0,1fr)!important;align-items:start!important;column-gap:14px!important;row-gap:12px!important}
 .p-hero-top.player-share-header>div:first-child{grid-column:1;grid-row:1;padding-top:0!important}
 .p-hero-top.player-share-header>.player-header-identity{display:contents;padding-top:0!important}
 .p-hero-top.player-share-header .player-header-summary{display:block;grid-column:2;grid-row:1;min-width:0;padding-top:36px}
 .p-hero-top.player-share-header .player-header-counts{grid-column:1/-1;grid-row:2;width:auto;min-width:0;margin:0;justify-content:center;gap:6px 10px}
 .p-hero-top.player-share-header>.player-header-action-area{grid-column:1/-1;grid-row:3;padding-top:0!important}
}
@media(min-width:481px) and (max-width:767px){.p-hero-top.player-share-header{--profile-avatar-size:150px}}
@media(max-width:480px){.t-hero .profile-mid-banner-share{top:10px;bottom:auto;inset-inline-end:12px;max-width:calc(100% - 24px)}}

/* Touch screens: keep the image clear until its compact action toggle opens. */
.profile-media-toggle{display:none!important}
@media(max-width:767px),(hover:none){
 .profile-media-toolbar:has(.profile-media-toggle){opacity:1!important;pointer-events:auto!important;left:auto;right:auto;inset-inline-end:4px;bottom:4px;gap:2px!important;padding:3px!important;display:grid!important;grid-template-columns:36px;width:44px!important;min-height:0!important;border-radius:12px;box-shadow:0 3px 12px #0002}
 .profile-media-toolbar.profile-banner-action:has(.profile-media-toggle){top:8px;bottom:auto;inset-inline-end:8px}
 .profile-media-toolbar .profile-media-toggle{display:inline-flex!important}
 .profile-media-toolbar:has(.profile-media-toggle) button{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;padding:8px!important;margin:0!important}
 .profile-media-toolbar:has(.profile-media-toggle) svg{width:18px;height:18px}
 .profile-media-toolbar:has(.profile-media-toggle)>button:not(.profile-media-toggle){display:none}
 .profile-media-toolbar.is-open:has(.profile-media-toggle){width:82px!important;grid-template-columns:repeat(2,36px)}
 .profile-media-toolbar.is-open:has(.profile-media-toggle)>button{display:inline-flex}
}

@media(max-width:767px),(hover:none){.profile-media-toolbar:has(.profile-media-toggle):not(.is-open){background:transparent!important;border-color:transparent!important;box-shadow:none!important}.profile-media-toolbar:not(.is-open) .profile-media-toggle{background:transparent!important}}
