/* Social member profile. Scoped to the full profile; all other community views retain their layout. */
body.community-app:has(.profile-v5) {
  --profile-surface: #19161f;
  --profile-soft: #221e29;
  --profile-canvas: #100e15;
  --profile-text: #f8f3f7;
  --profile-muted: #baafc3;
  --profile-line: rgba(229, 207, 237, .13);
  --profile-accent: #f19aba;
  --profile-tint: rgba(224, 68, 130, .1);
}
html[data-theme="light"] body.community-app:has(.profile-v5) {
  --profile-surface: #fff;
  --profile-soft: #f6eef5;
  --profile-canvas: #faf6fa;
  --profile-text: #332638;
  --profile-muted: #706075;
  --profile-line: rgba(74, 36, 84, .15);
  --profile-accent: #a52d60;
  --profile-tint: #f9e8f0;
}
body.community-app:has(.profile-v5) #member-view { display: block; min-height: calc(100dvh - 76px); }
body.community-app:has(.profile-v5) .community-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; position: static; width: 100%; height: auto; padding: 12px 0; margin: 0; border: 0; border-bottom: 1px solid var(--profile-line); background: transparent; }
body.community-app:has(.profile-v5) .community-nav :is(.nav-intro, .nav-foot) { display: none; }
body.community-app:has(.profile-v5) #community-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
body.community-app:has(.profile-v5) #community-nav button { flex: 0 0 auto; min-height: 44px; padding: 10px 12px; gap: 7px; border-radius: 10px; color: var(--profile-muted); font-size: .75rem; font-weight: 600; white-space: nowrap; }
body.community-app:has(.profile-v5) #community-nav button:is(:hover, .is-active) { background: var(--profile-tint); border-color: var(--profile-line); color: var(--profile-accent); }
body.community-app:has(.profile-v5) #admin-link { padding: 12px; color: var(--profile-muted); font-size: .75rem; }
body.community-app:has(.profile-v5) #community-main { width: 100% !important; margin: 0 !important; padding: 16px 0 48px !important; }
body.community-app:has(.profile-v5) .view-heading { min-height: 0; margin-bottom: 14px; gap: 12px; }
body.community-app:has(.profile-v5) .view-heading .eyebrow { color: var(--profile-accent); font-size: .6875rem; letter-spacing: .13em; }
body.community-app:has(.profile-v5) .community-notification-button { color: var(--profile-text); border-color: var(--profile-line); background: var(--profile-soft); }
body.community-app:has(.profile-v5) #community-status:empty { display: none; }
.profile-v5 { gap: 24px; color: var(--profile-text); min-width: 0; }
.profile-v5 :where(section, div, form, aside) { min-width: 0; }
.profile-v5 [hidden] { display: none !important; }
.profile-v5 :is(.profile-social-hero, .profile-social-intro, .profile-social-info, .profile-v4-media, .profile-v4-right) { border: 1px solid var(--profile-line); border-radius: 18px; background: var(--profile-surface); box-shadow: 0 8px 28px #0001; }
.profile-v5 .profile-social-hero { overflow: visible; }
.profile-v5 .profile-social-cover { height: clamp(190px, 22vw, 290px); position: relative; overflow: hidden; border-radius: 17px 17px 0 0; background: radial-gradient(ellipse at 85% 15%, #b85ca45c, transparent 55%), radial-gradient(ellipse at 0% 100%, #a6246655, transparent 55%), linear-gradient(115deg, #221221, #4c2141 60%, #291c38); }
.profile-v5 .profile-social-cover::before, .profile-v5 .profile-social-cover::after { content: ''; position: absolute; width: 800px; height: 800px; border: 1px solid #f4bed329; border-radius: 50%; transform: rotate(-25deg) scaleY(.65); top: -350px; right: -160px; }
.profile-v5 .profile-social-cover::after { top: -200px; right: -260px; border-color: #f4bed319; }
.profile-v5 .profile-social-cover-mark { position: absolute; right: 7%; top: 50%; transform: translateY(-50%); font-family: Georgia, serif; font-size: clamp(100px, 14vw, 200px); font-style: italic; letter-spacing: -.16em; color: #ffd6ea20; line-height: 1; user-select: none; }
.profile-v5 .profile-social-cover[data-banner="midnight"] { background: radial-gradient(ellipse at 80% 0, #395f9780, transparent 65%), linear-gradient(120deg, #111326, #242947); }
.profile-v5 .profile-social-cover[data-banner="champagne"] { background: radial-gradient(ellipse at 90% 0, #b58a6880, transparent 65%), linear-gradient(120deg, #302029, #665044); }
.profile-v5 .profile-social-cover[data-banner="aurora"] { background: radial-gradient(ellipse at 90% 0, #40988580, transparent 65%), linear-gradient(120deg, #252035, #5d3375); }
.profile-v5 .profile-social-cover[data-banner="velvet"] { background: radial-gradient(ellipse at 90% 0, #b5538180, transparent 65%), linear-gradient(120deg, #321629, #721c48); }
.profile-v5 .profile-v4-header { display: grid; grid-template-columns: 164px minmax(0, 1fr) auto; align-items: center; gap: 24px; margin: 0; padding: 22px 30px 24px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.profile-v5 .profile-social-avatar { width: 164px; height: 164px; margin-top: -75px; align-self: start; position: relative; padding: 0; overflow: hidden; border: 6px solid var(--profile-surface); border-radius: 50%; display: grid; place-items: center; color: var(--profile-text); background: var(--profile-soft); box-shadow: 0 2px 12px #0003; }
.profile-v5 button.profile-social-avatar { cursor: pointer; }
.profile-v5 .profile-social-avatar :is(img, .avatar) { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-v5 .profile-social-avatar .name-avatar { font-size: 2.5rem; }
.profile-v5 .profile-v4-identity { width: auto; flex: initial; min-width: 0; }
.profile-v5 .profile-v4-name { margin: 0; font-size: clamp(1.75rem, 2.7vw, 2.6rem); line-height: 1.12; letter-spacing: -.035em; overflow-wrap: anywhere; }
.profile-v5 .profile-v9-social-stats { margin-top: 9px; gap: 14px; color: var(--profile-muted); font-size: .8125rem; }
.profile-v5 .profile-v4-relation { margin-top: 5px; color: var(--profile-muted); font-size: .75rem; }
.profile-v5 .profile-v4-meta { font-size: .75rem; color: var(--profile-muted); }
.profile-v5 .profile-v5-popularity { margin: 7px 0 0; color: var(--profile-accent); font-size: .75rem; }
.profile-v5 .profile-v5-popularity:empty { display: none; }
.profile-v5 .profile-v4-actions { max-width: 420px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.profile-v5 .profile-v4-actions > .actions { width: auto; max-width: 100%; margin: 0; flex: 0 1 auto; gap: 8px; }
.profile-v5 .profile-v4-more-summary { color: var(--profile-text); background: var(--profile-soft); border-color: var(--profile-line); justify-content: center; }
.profile-v5 .profile-v4-friend-note { color: var(--profile-muted); padding: 4px 0 0; }
.profile-v5 .profile-v2-media-actions { display: flex; margin: 0; padding: 0; }
.profile-v5 :is(.button, .profile-v4-more-summary) { min-height: 44px; border-radius: 10px; font-size: .8125rem; line-height: 1.4; }
.profile-v5 .button--ghost { border-color: var(--profile-line); color: var(--profile-text); background: var(--profile-soft); }
.profile-v5 :is(button, a, summary, input, textarea, select, [role="tabpanel"]):focus-visible { outline: 2px solid var(--profile-accent); outline-offset: 3px; }
.profile-v5 .profile-social-tabs { display: flex; gap: 4px; border-top: 1px solid var(--profile-line); padding: 0 26px; }
.profile-v5 .profile-social-tab { position: relative; min-height: 58px; padding: 14px 26px; border: 0; border-radius: 0; background: transparent; color: var(--profile-muted); font: inherit; font-weight: 650; font-size: .875rem; cursor: pointer; }
.profile-v5 .profile-social-tab:hover { background: var(--profile-tint); }
.profile-v5 .profile-social-tab[aria-selected="true"] { color: var(--profile-accent); }
.profile-v5 .profile-social-tab[aria-selected="true"]::after { content: ''; position: absolute; height: 3px; border-radius: 4px 4px 0 0; bottom: 0; left: 16px; right: 16px; background: var(--profile-accent); }
.profile-v5 .profile-v4-body { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.55fr); align-items: start; gap: 24px; }
.profile-v5 .profile-social-sidebar { display: grid; align-content: start; gap: 20px; }
.profile-v5 .profile-social-intro { padding: 22px; }
.profile-v5 .profile-social-intro h2 { margin: 0 0 16px; font-size: 1.125rem; color: var(--profile-text); }
.profile-v5 .profile-social-bio { color: var(--profile-text); line-height: 1.65; font-size: .9375rem; margin: 0 0 16px; overflow-wrap: anywhere; white-space: pre-wrap; }
.profile-v5 .profile-social-intro-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.profile-v5 .profile-social-intro-facts span { font-size: .8125rem; color: var(--profile-muted); padding: 7px 10px; border-radius: 8px; background: var(--profile-soft); }
.profile-v5 .profile-social-intro > .button { width: 100%; }
.profile-v5 .profile-v4-about { padding: 24px; }
.profile-v5 .profile-v4-about > h2 { margin: 0 0 22px; font-size: 1.25rem; color: var(--profile-text); }
.profile-v5 .profile-v4-facts { gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.profile-v5 .profile-v4-fact { padding: 12px 14px; border-color: var(--profile-line); background: var(--profile-soft); border-radius: 10px; }
.profile-v5 .profile-v4-fact-label { color: var(--profile-muted); font-size: .6875rem; }
.profile-v5 .profile-v4-fact strong { color: var(--profile-text); font-size: .8125rem; line-height: 1.5; }
.profile-v5 .profile-v4-profile-dropdown { background: transparent; border-color: var(--profile-line); margin-top: 14px; }
.profile-v5 .profile-v4-profile-dropdown > summary { min-height: 44px; padding-block: 13px; color: var(--profile-text); font-size: .8125rem; }
.profile-v5 .profile-v4-profile-dropdown--locked > summary { color: var(--profile-muted); }
.profile-v5 .profile-v4-details-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.profile-v5 .profile-v4-info-card { background: var(--profile-soft); border-color: var(--profile-line); border-radius: 12px; }
.profile-v5 .profile-v4-info-card :is(h3, .profile-v4-bio) { color: var(--profile-text); }
.profile-v5 .profile-v4-chip { background: var(--profile-tint); border-color: var(--profile-line); color: var(--profile-text); }
.profile-v5 .profile-v4-person-card { background: var(--profile-soft); border-color: var(--profile-line); }
.profile-v5 .profile-v4-media { padding: 20px; overflow: hidden; }
.profile-v5 .profile-v2-strip-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 16px; }
.profile-v5 .profile-v2-strip-heading h2 { margin: 0; font-size: 1.125rem; letter-spacing: -.02em; color: var(--profile-text); }
.profile-v5 .profile-v5-gallery-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.profile-v5 .profile-v5-gallery-actions > .muted-copy { color: var(--profile-muted); font-size: .75rem; }
.profile-v5 .profile-v4-gallery-button { width: auto; margin: 0; padding: 8px 0; background: transparent; border-color: transparent; color: var(--profile-accent); text-align: left; min-height: 44px; }
.profile-v5 .profile-v5-photo-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.profile-v5 .profile-v5-photo-layout > :is(.profile-v2-main-photo, .profile-v2-thumb) { width: 100%; height: auto; min-height: 0; aspect-ratio: 1 / 1; margin: 0; padding: 0; border: 1px solid var(--profile-line); border-radius: 12px; background: var(--profile-soft); overflow: hidden; }
.profile-v5 .profile-v5-photo-layout > :is(.profile-v2-main-photo, .profile-v2-thumb) > img { width: 100%; height: 100%; object-fit: cover; }
.profile-v5 .profile-v5-photo-layout > .is-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; text-align: center; color: var(--profile-muted); font-size: .8125rem; border-style: dashed; }
.profile-v5 .profile-v5-photo-layout > .profile-v2-main-photo.is-empty { grid-column: 1 / -1; aspect-ratio: auto; min-height: 200px; }
.profile-v5 .profile-v5-add-icon { font-size: 1.75rem; color: var(--profile-accent); }
.profile-v5 .profile-social-sidebar .profile-v5-photo-layout > :nth-child(n+5) { display: none; }
.profile-v5 .profile-social-photos .profile-v5-photo-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.profile-v5 .profile-social-photos .profile-v4-media { padding: 24px; }
.profile-v5 .profile-v4-right { padding: 0; height: auto !important; min-height: 0 !important; overflow: visible !important; }
.profile-v5 .profile-v4-feed { height: auto; max-height: none; min-height: 0; overflow: visible; background: transparent; border-radius: inherit; }
.profile-v5 .profile-v4-feed-heading { position: static; margin: 0; padding: 22px 24px; background: transparent; border-bottom: 1px solid var(--profile-line); }
.profile-v5 .profile-v4-feed-heading h2 { font-size: 1.125rem; color: var(--profile-text); }
.profile-v5 .profile-v4-composer { padding: 22px 24px; border-color: var(--profile-line); }
.profile-v5 .profile-v4-composer :is(input, select, textarea) { border-color: var(--profile-line); background: var(--profile-canvas); color: var(--profile-text); min-height: 44px; font-size: 1rem; }
.profile-v5 .profile-v4-composer textarea { min-height: 110px; padding: 16px; border-radius: 12px; }
.profile-v5 .profile-v4-feed-list { max-height: none; overflow: visible; padding: 0 24px 24px; }
.profile-v5 .profile-v4-feed-empty { min-height: 170px; background: transparent; color: var(--profile-text); }
.profile-v5 .profile-v4-feed-empty p { color: var(--profile-muted); }
.profile-v5 .feed-post { background: var(--profile-canvas); border-color: var(--profile-line); padding: 22px; border-radius: 14px; }
.profile-v5 .feed-post > header strong { color: var(--profile-text); font-size: .9375rem; }
.profile-v5 .feed-post > p { color: var(--profile-text); font-size: .9375rem; line-height: 1.65; overflow-wrap: anywhere; }
.profile-v5 .feed-post :is(time, .post-visibility) { color: var(--profile-muted); font-size: .75rem; }
@media (max-width: 1100px) {
  .profile-v5 .profile-v4-header { grid-template-columns: 140px minmax(0, 1fr); gap: 16px 22px; }
  .profile-v5 .profile-social-avatar { width: 140px; height: 140px; margin-top: -65px; }
  .profile-v5 .profile-v4-actions { grid-column: 2; justify-content: flex-start; max-width: 100%; }
  .profile-v5 .profile-v4-body { grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); gap: 18px; }
  .profile-v5 .profile-v4-details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-v5 .profile-v4-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body.community-app:has(.profile-v5) .community-nav { gap: 4px; padding-block: 8px; }
  body.community-app:has(.profile-v5) #community-nav { flex-wrap: nowrap; overflow-x: auto; padding: 3px; scrollbar-width: thin; scrollbar-color: var(--profile-line) transparent; }
  body.community-app:has(.profile-v5) #community-nav button { padding-inline: 12px; }
  body.community-app:has(.profile-v5) #admin-link { padding-inline: 6px; }
  body.community-app:has(.profile-v5) .view-heading { align-items: center; }
  body.community-app:has(.profile-v5) .privacy-pill { max-width: 170px; white-space: normal; text-align: center; line-height: 1.4; }
  .profile-v5 { gap: 16px; }
  .profile-v5 .profile-social-cover { height: 180px; }
  .profile-v5 .profile-v4-header { grid-template-columns: minmax(0, 1fr); padding: 0 20px 20px; gap: 14px; }
  .profile-v5 .profile-social-avatar { width: 128px; height: 128px; margin-top: -46px; }
  .profile-v5 .profile-v4-actions { grid-column: 1; width: 100%; }
  .profile-v5 .profile-v4-actions > button { width: auto; }
  .profile-v5 .profile-social-tabs { padding-inline: 8px; }
  .profile-v5 .profile-social-tab { flex: 1; min-width: 0; padding-inline: 10px; }
  .profile-v5 .profile-v4-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .profile-v5 .profile-social-sidebar { gap: 16px; }
  .profile-v5 .profile-social-sidebar .profile-v4-media { display: none; }
  .profile-v5 .profile-v4-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-v5 .profile-v4-details-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-v5 .profile-v4-about { padding: 18px; }
  .profile-v5 .profile-social-photos .profile-v5-photo-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .profile-v5 .profile-social-photos .profile-v4-media { padding: 16px; }
  .profile-v5 :is(.profile-v4-feed-heading, .profile-v4-composer) { padding: 18px; }
  .profile-v5 .profile-v4-feed-list { padding: 0 18px 18px; }
  .profile-v5 .profile-v4-composer-footer { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 360px) {
  body.community-app:has(.profile-v5) .dd-header .brand-mark { width: 32px; height: 32px; }
  body.community-app:has(.profile-v5) .dd-header .brand-copy strong { font-size: .75rem; }
  .profile-v5 .profile-v4-header { padding-inline: 16px; }
  .profile-v5 .profile-social-photos .profile-v5-photo-layout { grid-template-columns: minmax(0, 1fr); }
}
/* Reference layout: compact profile header, independent composer and post cards. */
.profile-reference .profile-social-cover { height: clamp(130px, 14vw, 190px); }
.profile-reference .profile-social-cover-mark { font-size: clamp(95px, 10vw, 150px); }
.profile-reference .profile-v4-header { grid-template-columns: 138px minmax(0,1fr) auto; padding: 18px 24px 20px; gap: 22px; }
.profile-reference .profile-social-avatar { width: 138px; height: 138px; margin-top: -56px; border-width: 5px; }
.profile-reference .profile-v4-name { font-size: clamp(1.6rem,2.4vw,2.1rem); }
.profile-reference .profile-v4-relation { display: none; }
.profile-reference .profile-v5-popularity { font-size: .6875rem; margin-top: 4px; }
.profile-reference .profile-social-tabs { padding-inline: 12px; }
.profile-reference .profile-social-tab { min-height: 52px; padding-inline: 22px; }
.profile-reference .profile-v4-body { grid-template-columns: minmax(0,.85fr) minmax(0,1.2fr); gap: 18px; }
.profile-reference .profile-social-sidebar { gap: 16px; }
.profile-reference .profile-social-intro { padding: 20px; }
.profile-reference .profile-social-bio { text-align: center; margin-block: 18px; }
.profile-reference .profile-social-intro-facts { justify-content: center; margin: 14px 0; }
.profile-reference .profile-social-intro-facts span { padding: 0; background: transparent; }
.profile-reference .profile-reference-relation { margin: 16px 0; color: var(--profile-muted); }
.profile-reference .profile-social-intro > .button { min-height: 38px; border-radius: 8px; margin-block: 2px; }
.profile-reference .profile-v4-media { padding: 18px; }
.profile-reference .profile-reference-show-photos { min-height: 44px; border: 0; background: transparent; color: var(--profile-accent); padding: 5px 0; }
.profile-reference .profile-social-sidebar .profile-v4-gallery-button { display: none; }
.profile-reference .profile-social-photos .profile-reference-show-photos { display: none; }
.profile-reference .profile-social-sidebar .profile-v5-gallery-actions > .muted-copy { display: none; }
.profile-reference .profile-social-sidebar .profile-v5-photo-layout { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.profile-reference .profile-social-sidebar .profile-v5-photo-layout > :nth-child(n+5) { display: flex; }
.profile-reference .profile-social-sidebar .profile-v5-photo-layout > :nth-child(n+7) { display: none; }
.profile-reference .profile-v4-right { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.profile-reference .profile-v4-feed { display: grid; gap: 16px; padding: 0; }
.profile-reference .profile-v4-feed-heading { padding: 17px 20px; border: 1px solid var(--profile-line); border-radius: 12px; background: var(--profile-surface); }
.profile-reference .profile-v4-composer { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--profile-line); border-radius: 14px; background: var(--profile-surface); margin: 0; }
.profile-reference .profile-reference-composer-prompt { display: flex; gap: 12px; align-items: flex-start; }
.profile-reference .profile-reference-small-avatar { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--profile-tint); }
.profile-reference .profile-reference-small-avatar :is(img,.name-avatar) { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-reference .profile-v4-composer textarea { min-height: 66px; flex: 1; width: 100%; border-radius: 18px; padding: 12px 15px; background: var(--profile-soft); resize: vertical; }
.profile-reference .profile-v4-composer-footer { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 12px; border-top: 1px solid var(--profile-line); }
.profile-reference .profile-v9-composer-top { display: block; margin: 0; }
.profile-reference .profile-v9-type-label { display: flex; align-items: center; gap: 8px; margin: 0; }
.profile-reference .profile-v9-type-label > span { display: none; }
.profile-reference .profile-v4-composer-footer select { width: auto; min-width: 100px; }
.profile-reference .profile-v4-composer-footer > select { flex: 1; }
.profile-reference .profile-v4-feed-list { display: grid; gap: 16px; padding: 0; }
.profile-reference .feed-post { margin: 0; padding: 20px; border: 1px solid var(--profile-line); border-radius: 14px; background: var(--profile-surface); }
.profile-reference .feed-post > header { padding-bottom: 14px; }
.profile-reference .profile-v4-feed-empty { padding: 24px; border: 1px solid var(--profile-line); border-radius: 14px; background: var(--profile-surface); }
.profile-reference .profile-reference-friends { border: 1px solid var(--profile-line); border-radius: 14px; padding: 18px; background: var(--profile-surface); }
.profile-reference .profile-reference-card-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: center; }
.profile-reference .profile-reference-card-heading h2 { margin: 0; font-size: 1.125rem; }
.profile-reference .profile-reference-card-heading .button { border: 0; background: transparent; color: var(--profile-accent); padding-inline: 0; }
.profile-reference .profile-reference-friends-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-block: 16px; }
.profile-reference .profile-reference-friend { min-width: 0; display: grid; align-content: start; gap: 8px; text-align: left; border: 0; padding: 0; border-radius: 8px; color: var(--profile-text); background: transparent; cursor: pointer; font-size: .8125rem; }
.profile-reference .profile-reference-friend strong { overflow-wrap: anywhere; }
.profile-reference .profile-reference-friend-photo { width: 100%; aspect-ratio: 1; overflow: hidden; display: grid; place-items: center; border-radius: 10px; background: var(--profile-soft); }
.profile-reference .profile-reference-friend-photo :is(img,.name-avatar) { width: 100%; height: 100%; object-fit: cover; }
.profile-reference .profile-social-sidebar .profile-reference-friend:nth-child(n+7) { display: none; }
.profile-reference .profile-reference-friends-panel .profile-reference-friends-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
@media(max-width:1100px) { .profile-reference .profile-v4-header { grid-template-columns: 128px minmax(0,1fr); } .profile-reference .profile-v4-actions { grid-column: 2; } .profile-reference .profile-social-avatar { width: 128px; height: 128px; } }
@media(max-width:760px) {
  .profile-reference .profile-social-cover { height: 140px; }
  .profile-reference .profile-v4-header { grid-template-columns: 104px minmax(0,1fr); gap: 14px; padding: 12px 16px 18px; }
  .profile-reference .profile-social-avatar { width: 104px; height: 104px; margin-top: -38px; }
  .profile-reference .profile-v4-name { font-size: 1.5rem; }
  .profile-reference .profile-v4-actions { grid-column: 1/-1; }
  .profile-reference .profile-social-tabs { padding-inline: 4px; }
  .profile-reference .profile-social-tab { padding-inline: 8px; font-size: .8125rem; }
  .profile-reference .profile-v4-body { grid-template-columns: minmax(0,1fr); }
  .profile-reference .profile-social-sidebar .profile-v4-media { display: block; }
  .profile-reference .profile-social-sidebar .profile-v5-photo-layout > :nth-child(n+4) { display: none; }
  .profile-reference .profile-social-sidebar .profile-reference-friends { display: none; }
  .profile-reference .profile-reference-friends-panel .profile-reference-friends-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-reference .profile-v4-composer { padding: 14px; }
  .profile-reference .profile-v4-composer-footer > select { flex: 1 1 100px; max-width: 100%; }
  .profile-reference .profile-v4-composer-footer > button { margin-left: auto; }
}
@media(max-width:360px) { .profile-reference .profile-v4-header { grid-template-columns: 86px minmax(0,1fr); gap: 10px; } .profile-reference .profile-social-avatar { width: 86px; height: 86px; } .profile-reference .profile-v4-name { font-size: 1.3rem; } }


/* Popularity follows the existing identity palette. Dark colors come from staff.css. */
html[data-theme="light"] .profile-v5 .profile-v5-popularity.identity-name--vrouw { color: #a62f66 !important; }
html[data-theme="light"] .profile-v5 .profile-v5-popularity.identity-name--man { color: #2367a2 !important; }
html[data-theme="light"] .profile-v5 .profile-v5-popularity.identity-name--couples { color: #825e1e !important; }
html[data-theme="light"] .profile-v5 .profile-v5-popularity.identity-name--trans { color: #7743a6 !important; }
html[data-theme="light"] .profile-v5 .profile-v5-popularity.identity-name--non_binary { color: #226f65 !important; }
html[data-theme="light"] .profile-v5 .profile-v5-popularity.identity-name--other { color: #625269 !important; }

/* Compact controls for the owner's profile; existing forms and privacy options stay intact. */
.profile-v5 .profile-edit-menu { position: relative; }
.profile-v5 .profile-edit-summary { display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 16px;border:1px solid var(--profile-line);border-radius:10px;background:var(--profile-soft);color:var(--profile-text);font-size:.8125rem;font-weight:650;cursor:pointer;list-style:none; }
.profile-v5 .profile-edit-summary::-webkit-details-marker { display:none; }
.profile-v5 .profile-edit-summary::after { content:'⌄'; }
.profile-v5 .profile-edit-menu[open] .profile-edit-summary::after { content:'⌃'; }
.profile-v5 .profile-edit-options { position:absolute;z-index:20;top:calc(100% + 8px);right:0;display:grid;gap:4px;min-width:230px;max-width:calc(100vw - 48px);padding:8px;border:1px solid var(--profile-line);border-radius:12px;background:var(--profile-surface);box-shadow:0 12px 36px #0004; }
.profile-v5 .profile-edit-options .button { justify-content:flex-start;text-align:left;width:100%;border-color:transparent;background:transparent; }
.profile-v5 .profile-edit-options .button:hover { background:var(--profile-soft); }
.profile-v5 .profile-composer-disclosure { border:1px solid var(--profile-line);border-radius:14px;background:var(--profile-surface);overflow:hidden; }
.profile-v5 .profile-composer-summary { display:flex;align-items:center;gap:14px;min-height:82px;padding:18px 20px;cursor:pointer;list-style:none;color:var(--profile-text); }
.profile-v5 .profile-composer-summary::-webkit-details-marker { display:none; }
.profile-v5 .profile-composer-summary::after { content:'+';font-size:1.5rem;color:var(--profile-accent);margin-left:auto; }
.profile-v5 .profile-composer-disclosure[open] > .profile-composer-summary::after { content:'−'; }
.profile-v5 .profile-composer-summary-copy { display:grid;gap:4px; }
.profile-v5 .profile-composer-summary-copy strong { font-size:.9375rem; }
.profile-v5 .profile-composer-summary-copy small { font-size:.75rem;color:var(--profile-muted); }
.profile-v5 .profile-composer-disclosure > .profile-v4-composer { border:0;border-top:1px solid var(--profile-line);border-radius:0; }
.profile-v5 .profile-intro-editor { margin:14px 0;padding:14px;border:1px solid var(--profile-line);border-radius:10px;background:var(--profile-soft); }
.profile-v5 .profile-intro-editor h3 { margin:0 0 10px;font-size:.9375rem; }
.profile-v5 .profile-intro-editor form > .button { margin:10px 8px 0 0; }
.profile-reference .profile-social-intro-facts { justify-content:flex-start;gap:8px;margin:12px 0 0; }
.profile-reference .profile-social-intro-facts > span { padding:5px 9px;border-radius:7px;background:var(--profile-soft); }
@media(max-width:620px) {
 .profile-v5 .profile-edit-options { right:0;left:auto; }
 .profile-v5 .profile-composer-summary { padding:14px;gap:10px; }
 .profile-v5 .profile-composer-summary-copy small { line-height:1.45; }
}

/* Compact profile header with the circular avatar extending above the card. */
.profile-reference .profile-social-cover { display:none; }
.profile-reference .profile-social-hero { margin-top:40px; }
.profile-reference .profile-social-avatar { margin-top:-48px; }
@media(max-width:760px) {
 .profile-reference .profile-social-hero { margin-top:32px; }
 .profile-reference .profile-social-avatar { margin-top:-36px; }
}

/* Compact profile header with the circular avatar extending above the card. */
.profile-reference .profile-social-cover { display:none; }
.profile-reference .profile-social-hero { margin-top:40px; }
.profile-reference .profile-social-avatar { margin-top:-48px; }
@media(max-width:760px) {
 .profile-reference .profile-social-hero { margin-top:32px; }
 .profile-reference .profile-social-avatar { margin-top:-36px; }
}

/* A single avatar and compact, accessible posting controls. */
.profile-reference .profile-composer-summary { min-height:70px;padding:14px 18px;gap:12px; }
.profile-reference .profile-composer-summary-copy small { font-size:.75rem; }
.profile-reference .profile-reference-composer-prompt textarea { min-height:96px;border-radius:12px; }
.profile-reference .profile-composer-media { position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0;cursor:pointer; }
.profile-reference .profile-composer-media input[type=file] { position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:0;opacity:0;overflow:hidden; }
.profile-reference .profile-composer-media-action { display:inline-flex;align-items:center;min-height:38px;padding:8px 12px;border:1px solid var(--profile-line);border-radius:9px;background:var(--profile-soft);color:var(--profile-text);font-size:.8rem;font-weight:600; }
.profile-reference .profile-composer-media:hover .profile-composer-media-action { border-color:var(--profile-accent); }
.profile-reference .profile-composer-media:focus-within .profile-composer-media-action { outline:2px solid var(--profile-accent);outline-offset:3px; }
.profile-reference .profile-composer-media-status { color:var(--profile-muted);font-size:.72rem;font-weight:400; }
.profile-reference .profile-v4-composer-footer { display:grid;grid-template-columns:105px minmax(0,1fr) auto;align-items:center;gap:10px;margin-top:0;padding-top:14px; }
.profile-reference .profile-v4-composer-footer :is(select,button) { min-width:0;min-height:42px;border-radius:9px;font-size:.8rem;margin:0; }
.profile-reference .profile-v4-composer-footer select { width:100%; }
.profile-reference .profile-v4-composer-footer > button { padding:10px 18px;background:var(--profile-accent);color:#fff;border-color:transparent; }
.profile-reference .profile-v4-feed-heading { border:0;border-radius:0;background:transparent;padding:4px 2px; }
@media(max-width:620px) {
 .profile-reference .profile-v4-composer-footer { grid-template-columns:95px minmax(0,1fr); }
 .profile-reference .profile-v4-composer-footer > button { grid-column:1/-1;justify-self:stretch;width:100%;margin:0; }
 .profile-reference .profile-composer-summary { padding:14px; }
 .profile-reference .profile-composer-media-status { flex-basis:100%; }
}

.profile-reference .profile-v4-composer-footer > button { background:#b32c68;color:#fff; }

/* Text is the default; a separate poll action sits alongside media. */
.profile-reference .profile-composer-tools { display:flex;flex-wrap:wrap;align-items:center;gap:10px; }
.profile-reference .profile-composer-tools .profile-composer-media-status { flex-basis:100%; }
.profile-reference .profile-composer-poll-action { min-height:38px;padding:8px 14px;font-size:.8rem;border:1px solid var(--profile-line);border-radius:9px;background:var(--profile-soft);color:var(--profile-text); }
.profile-reference .profile-composer-poll-action[aria-pressed=true] { border-color:var(--profile-accent); }
.profile-reference .profile-v4-composer-footer { grid-template-columns:minmax(0,1fr) auto; }
@media(max-width:620px) { .profile-reference .profile-v4-composer-footer { grid-template-columns:minmax(0,1fr); } }

/* One posting toolbar; the form starts expanded without moving page focus. */
.profile-reference .profile-composer-tools { gap:10px; }
.profile-reference .profile-composer-tools .profile-v4-composer-footer { display:contents; }
.profile-reference .profile-composer-tools .profile-v4-composer-footer > select { flex:1 1 180px;min-width:150px;width:auto;min-height:38px; }
.profile-reference .profile-composer-tools .profile-v4-composer-footer > button { flex:0 0 auto;width:auto;min-height:38px;padding:8px 16px; }
@media(max-width:620px) {
 .profile-reference .profile-composer-tools .profile-v4-composer-footer > select { flex:1 1 160px;min-width:0; }
 .profile-reference .profile-composer-tools .profile-v4-composer-footer > button { margin-left:auto; }
}

/* Compact audience selector aligned with the publish action. */
.profile-reference .profile-composer-tools .profile-v4-composer-footer > select { flex:0 1 200px;width:200px;min-width:0;margin-left:auto; }
@media(max-width:620px) {
 .profile-reference .profile-composer-tools .profile-v4-composer-footer > select { flex:0 1 180px;width:180px; }
 .profile-reference .profile-composer-tools .profile-v4-composer-footer > button { margin-left:0; }
}
