/* Public profile identity; the shared banner keeps its crop and soft fade. */
.profile-publication-header .profile-cover-back {
    position:absolute;z-index:1;top:16px;left:20px;max-width:calc(100% - 40px);
    min-height:44px;margin:0;padding:0 10px;box-sizing:border-box;border-radius:8px;
    background:color-mix(in srgb,var(--fl-editorial) 94%,transparent);color:var(--fl-text);
}
.profile-publication-header .profile-cover-back:hover { background:var(--fl-editorial);color:var(--fl-ivory); }
.profile-publication-header .profile-cover-content { margin-top:-20px;padding:0 28px 24px; }
.profile-identity-grid { display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:24px; }
.profile-personal-identity { min-width:0;align-self:start; }
.profile-publication-header .profile-publication-identity { gap:18px; }
.profile-publication-header .profile-publication-identity h1.profile-nickname-long { font-size:clamp(1.75rem,3.5vw,3rem);overflow-wrap:anywhere; }
.profile-publication-header .profile-publication-bio { margin:16px 0 0; }
.profile-publication-bio.is-collapsed { display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden; }
.profile-bio-more,.profile-tags-more {
    min-height:36px;padding:4px 6px;border:0;border-radius:6px;background:transparent;color:var(--fl-secondary);
    font:600 .78rem/1.4 var(--fl-sans);text-align:left;cursor:pointer;
}
.profile-bio-more { margin:4px 0 0; }
.profile-tags-more { flex:0 0 auto; }
.profile-bio-more:hover,.profile-tags-more:hover { color:var(--fl-ivory);text-decoration:underline; }
.profile-bio-more[hidden],.profile-tags-more[hidden],.community-profile-interest[hidden] { display:none!important; }
.profile-tags-measure { position:fixed;left:-10000px;top:0;visibility:hidden;pointer-events:none; }
.profile-avatar-control { position:relative;display:inline-flex;flex-shrink:0; }
.profile-avatar-control .personal-edit-identity {
    position:absolute;right:-5px;bottom:-5px;display:grid;place-items:center;width:44px;height:44px;
    border-radius:50%;color:#fffaf6;font-size:.85rem;text-decoration:none;isolation:isolate;
}
.profile-avatar-control .personal-edit-identity::before {
    content:'';position:absolute;inset:5px;z-index:-1;border:2px solid var(--fl-editorial);
    border-radius:50%;background:var(--fl-burgundy);
}
.profile-avatar-control .personal-edit-identity:hover::before { background:var(--fl-raspberry); }
.profile-publication-header .profile-publication-stats {
    display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px 18px;margin:20px 0 0;padding-top:16px;
}
.profile-publication-header .profile-publication-stats dd { font-size:.9rem; }
.profile-publication-header .profile-publication-stats dt { font-size:.66rem;letter-spacing:.06em; }
.profile-publication-header .follow-actions { margin-top:14px; }
@media(min-width:1000px) {
    .profile-identity-grid:has(.community-profile-interests) { grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);gap:32px; }
    .profile-identity-grid .community-profile-interests { align-self:end;margin:96px 0 16px; }
}
@media(max-width:600px) {
    .profile-publication-header .profile-cover-back { top:12px;left:12px;max-width:calc(100% - 24px); }
    .profile-publication-header .profile-cover-content { margin-top:-12px;padding:0 20px 20px; }
    .profile-publication-header .profile-publication-stats { grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px; }
    .profile-publication-header .profile-publication-stats dt { font-size:.6rem; }
    .profile-tags-more,.profile-bio-more { min-height:44px; }
}
@media(max-width:420px) {
    .profile-publication-header .profile-publication-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Community: compact shared editor and a separate public visibility form. */
#profile-tags,#community-visibility { scroll-margin-top:90px; }
.profile-sr-only {
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
    clip-path:inset(50%);white-space:nowrap;border:0;
}
#profile-tags .account-profile-tags__availability { min-width:0;margin:0;padding:0;border:0; }
#profile-tags .account-profile-tags__groups { display:grid;grid-template-columns:minmax(0,1fr);gap:0;align-items:start; }
#profile-tags .account-profile-tags__panel { min-width:0;border-top:1px solid var(--admin-border); }
#profile-tags .account-profile-tags__panel > summary {
    display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:4px 12px;
    padding:13px 2px;cursor:pointer;list-style:none;color:var(--admin-text);
}
#profile-tags .account-profile-tags__panel > summary::-webkit-details-marker { display:none; }
#profile-tags .account-profile-tags__panel > summary::after { content:'+';grid-column:3;grid-row:1;font-size:1.15rem; }
#profile-tags .account-profile-tags__panel[open] > summary::after { content:'−'; }
.account-profile-tags__panel-title { font-size:.86rem;font-weight:700; }
.account-profile-tags__panel-count {
    grid-column:2;grid-row:1;padding:2px 8px;border-radius:999px;background:var(--admin-surface-hover);
    color:var(--admin-text-secondary);font-size:.7rem;font-variant-numeric:tabular-nums;
}
.account-profile-tags__panel-preview {
    grid-column:1 / -1;overflow-wrap:anywhere;font-size:.75rem;line-height:1.5;color:var(--admin-text-secondary);
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
#profile-tags .account-profile-tags__panel > summary:focus-visible { outline:2px solid var(--accent);outline-offset:2px;border-radius:6px; }
#profile-tags .account-profile-tags__group { align-self:start;min-width:0;padding:12px;margin:0 0 12px;background:var(--admin-surface); }
#profile-tags .account-profile-tags__panel .account-profile-tags__group > legend { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
#profile-tags .account-profile-tags__choices,
#profile-tags .account-profile-pride-catalogue { max-height:none;overflow:visible;overscroll-behavior:auto; }
#profile-tags .account-profile-tags__choices:empty,
#profile-tags .account-profile-tags__notice:empty,
#profile-tags .fl-profile-selected:empty { display:none; }
#profile-tags .account-profile-tags__choices { margin:5px 0;padding:4px 0;gap:7px; }
#profile-tags .fl-profile-category summary { padding:10px 2px; }
#profile-tags .public-profile-form__actions { margin-top:14px;flex-wrap:wrap; }
#profile-tags .public-profile-form__actions,
#community-visibility .public-profile-form__actions { display:flex;flex-direction:row;align-items:center;gap:10px; }
#profile-tags .public-profile-form__actions > button,
#community-visibility .public-profile-form__actions > button,
#community-visibility .public-profile-form__actions > a { flex:0 0 auto;width:auto;min-height:36px;padding:8px 16px; }
#profile-tags button[type=reset] { background:transparent;color:var(--admin-text);border:1px solid var(--admin-border);box-shadow:none; }
.community-profile-visibility { margin-top:20px;padding-top:20px;border-top:1px solid var(--admin-border); }
.community-profile-visibility > h2 { margin:0 0 6px;font-size:1rem; }
.community-profile-visibility > p { margin:0 0 16px;max-width:760px;color:var(--admin-text-secondary);font-size:.8rem;line-height:1.55; }
.community-profile-visibility form { display:grid;gap:14px; }
.community-profile-visibility .community-profile-visibility__group { min-width:0;margin:0;padding:0;border:0;background:transparent; }
.community-profile-visibility__group legend { margin-bottom:7px;padding:0;font-size:.78rem;font-weight:700;color:var(--admin-text-secondary); }
.community-profile-visibility__choices { display:flex;flex-wrap:wrap;gap:7px; }
.community-profile-visibility__choice {
    display:inline-flex;align-items:center;gap:7px;max-width:100%;padding:7px 10px;border:1px solid var(--admin-border);
    border-radius:20px;font-size:.78rem;line-height:1.4;color:var(--admin-text);cursor:pointer;
}
.community-profile-visibility__choice:has(input:checked) { border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,transparent); }
.community-profile-visibility__choice input { flex:0 0 auto;width:15px;height:15px;margin:0;accent-color:var(--accent); }
.community-profile-visibility__choice > span { display:inline-flex;align-items:center;gap:6px;overflow-wrap:anywhere;min-width:0; }
.community-profile-visibility__choice:focus-within,.community-profile-interest:focus-visible { outline:2px solid var(--accent);outline-offset:2px; }
.community-profile-visibility .public-profile-form__actions { flex-wrap:wrap;margin-top:6px; }
.community-profile-interests { display:grid;gap:12px;margin:0;min-width:0;align-self:start; }
.community-profile-interests__group { display:grid;grid-template-columns:106px minmax(0,1fr);gap:8px 12px;align-items:start;min-width:0;max-width:100%; }
.community-profile-interests .community-profile-interests__group h2 { margin:6px 0 0;font:700 .72rem/1.4 var(--fl-sans);letter-spacing:.04em;color:var(--fl-secondary); }
.community-profile-interests__tags { display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0; }
.community-profile-interest {
    display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:6px 10px;overflow-wrap:anywhere;
    border:1px solid var(--fl-border-strong);border-radius:20px;background:var(--fl-raised-soft);color:var(--fl-ivory);
    font-size:.78rem;line-height:1.4;
}
.community-profile-visibility__choice,.community-profile-interest { -webkit-touch-callout:none;-webkit-user-select:none;user-select:none; }
.community-profile-interest .account-profile-tag__flag {
    position:relative;display:inline-block;flex:0 0 auto;width:22px;height:14px;overflow:hidden;
    border:1px solid color-mix(in srgb,currentColor 35%,transparent);border-radius:3px;
}
body:has(.community-profile-interests) .fl-profile-description,
body:has(#profile-tags) .fl-profile-description { background:var(--fl-popover);color:var(--fl-ivory);border-color:var(--fl-border-strong); }
@media(max-width:600px) {
    #profile-tags .public-profile-form__actions,
    #community-visibility .public-profile-form__actions { flex-direction:column;align-items:stretch; }
    .community-profile-visibility__choice { min-height:38px;box-sizing:border-box; }
    .community-profile-interests { gap:14px; }
    .community-profile-interests__group { width:100%;grid-template-columns:minmax(0,1fr);gap:6px; }
    .community-profile-interests .community-profile-interests__group h2 { margin:0; }
}

