/* MyFriends.Space — Friends Feed / Browse / Profile Photos.
   Additive, component-scoped styles. No changes to games, authentication,
   consent handling, protected media, or the live-connection lifecycle. */
.fn-page-heading {display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0 0 26px;min-width:0}
.fn-page-heading>div{min-width:0}.fn-page-heading h1{font-size:clamp(1.8rem,4vw,2.6rem);line-height:1.15;letter-spacing:-.045em;margin:8px 0 10px}
.fn-page-heading p:not(.mfs-eyebrow){margin:0;max-width:64ch;font-size:.98rem;line-height:1.65;color:var(--cx-muted)}
.fn-page-heading>.cx-button{flex-shrink:0}.fn-page-heading .mfs-eyebrow{font-size:.65rem;letter-spacing:.16em;color:var(--cx-primary)}
.fn-breadcrumb{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:.86rem;margin:0 0 18px;min-width:0}
.fn-breadcrumb a{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-weight:600;text-underline-offset:3px}
.fn-breadcrumb>span{color:var(--cx-muted);overflow-wrap:anywhere}.fn-breadcrumb .mfs-icon{width:17px;height:17px}
/* Feed has a single reading column. Discovery and management are elsewhere. */
.fn-feed{max-width:790px}.fn-feed-frame,.fn-timeline{min-width:0}.fn-composer{padding:24px 24px 8px;margin-bottom:20px}
.fn-composer-top{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.fn-composer-top>div{flex:1;min-width:170px}
.fn-composer-top h2{font-size:1rem;line-height:1.5;letter-spacing:-.015em;margin:0 0 2px}.fn-composer-top p{font-size:.85rem;color:var(--cx-muted);margin:0}
.fn-composer-mark{width:44px;height:44px;display:grid;place-items:center;background:var(--cx-soft);color:var(--cx-primary);border-radius:14px;flex-shrink:0}
.fn-composer-mark .mfs-icon{width:23px;height:23px}.fn-composer-top>.cx-button{font-size:.84rem;padding:12px 15px}
.fn-compose-options{margin:14px 0 0;border-top:1px solid var(--cx-border)}.fn-compose-options>summary{font-size:.82rem;font-weight:600!important;color:var(--cx-muted);padding:13px 0!important;min-height:44px}
.fn-compose-links{display:flex;gap:8px;flex-wrap:wrap;padding:0 0 12px}.fn-compose-links a{display:inline-flex;align-items:center;min-height:44px;padding:9px 12px;background:var(--cx-soft);border:1px solid var(--cx-border);border-radius:9px;font-size:.84rem;font-weight:650;text-decoration:none}
.fn-feed-filters{border:1px solid var(--cx-border);background:var(--cx-surface);border-radius:14px;margin-bottom:22px;min-width:0;padding:0 18px}
.fn-feed-filters>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:12px 0!important;cursor:pointer;font-size:.84rem;list-style:none}
.fn-feed-filters>summary::-webkit-details-marker{display:none}.fn-feed-filters>summary>span:first-child{display:flex;gap:9px;align-items:center}.fn-feed-filters>summary .mfs-icon{width:18px;height:18px;color:var(--cx-primary)}
.fn-filter-state{font-size:.76rem;font-weight:400;color:var(--cx-muted);display:flex;align-items:center;gap:9px}.fn-filter-state:after{content:'⌄';font-size:1rem}.fn-feed-filters[open] .fn-filter-state:after{content:'⌃'}
.fn-filter-form{display:grid;grid-template-columns:minmax(140px,.8fr) minmax(0,1.4fr);gap:14px;padding:4px 0 18px}.fn-filter-form .cx-field{margin:0}
.fn-filter-buttons{grid-column:1/-1;display:flex;align-items:center;gap:18px}.fn-text-action{display:inline-flex;align-items:center;min-height:44px;padding:8px 4px;text-underline-offset:3px;font-size:.86rem}
.fn-feed-label{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:20px 2px 12px}.fn-feed-label h2{font-size:.86rem;font-weight:700;margin:0;line-height:1.5}.fn-feed-label>span{color:var(--cx-muted);font-size:.75rem;white-space:nowrap}
.fn-new-posts{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.fn-new-posts[hidden]{display:none}
.fn-feed-end{font-size:.79rem;color:var(--cx-muted);line-height:1.7;text-align:center;margin:24px auto 0;max-width:56ch}
.fn-empty{padding:40px 26px}.fn-empty>.mfs-icon{width:36px;height:36px;color:var(--cx-primary);margin-bottom:12px}.fn-empty p{color:var(--cx-muted);font-size:.94rem;max-width:52ch;margin:12px auto 20px;line-height:1.7}.fn-empty h2{font-size:1.2rem;letter-spacing:-.02em}
.fn-feed .cx-post{box-shadow:0 3px 14px #20133204}.fn-feed .cx-post h2{font-size:1.25rem;line-height:1.4}.fn-feed .cx-post-excerpt{line-height:1.75}
.fn-feed .cx-reactions .cx-button{font-size:.8rem;padding:9px 12px}.fn-feed .cx-post-foot a{display:inline-flex;align-items:center;min-height:44px}
/* Browse keeps people filters and friendship actions; there are no feed tabs. */
.fn-browse-context{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:-4px 0 18px;color:var(--cx-muted);font-size:.82rem}
.fn-browse-context>span{display:inline-flex;align-items:center;gap:8px}.fn-browse-context .mfs-icon{width:18px;height:18px;color:var(--cx-primary)}
.fn-browse-context nav{display:flex;gap:20px;flex-wrap:wrap}.fn-browse-context a{display:inline-flex;align-items:center;min-height:44px;text-underline-offset:4px}
.fn-browse .cx-search-line .cx-button{min-width:100px}.fn-browse .cx-result-heading h2{font-size:1rem}
/* Personal libraries: own drafts/saved items never become a discovery feed. */
.fn-library{max-width:960px}.fn-library-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px;padding:0;border:0}
.fn-library-tabs a{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:11px 17px;border-radius:11px;border:1px solid var(--cx-border);background:var(--cx-surface);font-size:.87rem;font-weight:650;text-decoration:none;line-height:1.4;text-align:center}
.fn-library-tabs a[aria-current=page]{background:var(--cx-primary);color:#fff;border-color:transparent}.theme-dark .fn-library-tabs a[aria-current=page]{background:#b99aff;color:#21152f}
.fn-library-filter{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(140px,1fr) auto;gap:14px;align-items:end;margin:0 0 24px;padding:18px;background:var(--cx-surface);border:1px solid var(--cx-border);border-radius:16px}
.fn-library-filter .cx-field{margin:0}.fn-library-filter>.cx-button{margin-bottom:0}.fn-post-library{display:grid;gap:14px}
.fn-library-post{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:0}.fn-library-post-main{min-width:0;flex:1}
.fn-library-meta{display:flex;align-items:center;gap:10px;font-size:.76rem;color:var(--cx-muted);flex-wrap:wrap}.fn-library-post h2{font-size:1.12rem;margin:12px 0 6px;line-height:1.45;overflow-wrap:anywhere}.fn-library-post h2 a{color:var(--cx-ink);text-decoration:none}.fn-library-post p{margin-bottom:0}
.fn-library-post-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end}.fn-library-post-actions .cx-button{font-size:.83rem}
/* Photo library. Covers use the protected media endpoint, never public uploads. */
.fn-photos{max-width:1120px}.fn-photo-search{display:flex;gap:10px;align-items:center;margin-bottom:12px}.fn-photo-search input{flex:1}.fn-photo-search .cx-button{flex:0 0 auto;min-width:96px}.fn-library-note{color:var(--cx-muted);font-size:.83rem;line-height:1.65;margin:12px 0 24px;max-width:80ch}
.fn-album-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;align-items:stretch}.fn-album-card{padding:0;margin:0;overflow:hidden;display:flex;flex-direction:column}
.fn-album-cover{display:block;position:relative;aspect-ratio:4/3;background:var(--cx-soft);overflow:hidden;border-bottom:1px solid var(--cx-border)}.fn-album-cover img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .2s ease}.fn-album-cover:hover img{transform:scale(1.02)}
.fn-album-placeholder{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--cx-muted);font-size:.9rem}.fn-album-placeholder .mfs-icon{width:38px;height:38px;color:var(--cx-primary)}
.fn-album-count{position:absolute;bottom:13px;right:13px;border-radius:8px;background:#21152ee8;color:#fff;font-size:.74rem;padding:6px 9px;backdrop-filter:blur(4px)}
.fn-album-info{padding:19px;flex:1;display:flex;flex-direction:column;min-width:0}.fn-album-info h2{font-size:1.1rem;line-height:1.45;margin:12px 0 6px}.fn-album-info h2 a{color:var(--cx-ink);text-decoration:none}.fn-album-info .cx-help{font-size:.78rem;margin:0 0 18px}
.fn-album-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}.fn-album-actions .cx-button{flex:1;font-size:.8rem;padding:10px 11px;min-width:100px}
/* Contextual owner actions live directly below the actual profile picture. */
.mfs-site .profile-theme-scope .fn-profile-photo-tools{margin:-2px 0 22px;display:grid;gap:0;border:1px solid var(--mfs-border,#e3dceb);border-radius:13px;background:var(--mfs-surface,#fff);overflow:hidden;font-family:system-ui,sans-serif}
.mfs-site .profile-theme-scope .fn-profile-photo-tools a{color:var(--mfs-primary,#7142d8);text-decoration:none;min-height:46px;line-height:1.4;font-size:13px;font-weight:650;display:flex;align-items:center;justify-content:center;padding:11px 9px;gap:8px}
.mfs-site .profile-theme-scope .fn-profile-photo-tools a:focus-visible{outline:3px solid var(--mfs-primary,#7142d8);outline-offset:-4px}.mfs-site .profile-theme-scope .fn-profile-photo-tools a:hover{background:var(--mfs-soft,#f3eefb)}
.mfs-site .profile-theme-scope .fn-profile-photos-main{justify-content:flex-start;padding:12px 14px;font-size:14px;background:var(--mfs-soft,#f3eefb)}.fn-profile-photos-main>span{flex:1}.fn-profile-photos-main .mfs-icon{width:19px;height:19px}
.fn-profile-photo-secondary{display:grid;grid-template-columns:1fr 1fr}.fn-profile-photo-secondary>a+a{border-left:1px solid var(--mfs-border,#e3dceb)}
.fn-profile-posts .cx-heading>a{display:inline-flex;align-items:center;min-height:44px;font-size:.88rem}.fn-profile-posts .cx-profile-post-grid{margin-bottom:16px}
.fn-tags .cx-tag-preview{display:block;max-width:100%;max-height:340px;object-fit:contain;border-radius:12px;margin:14px auto}.fn-tags .cx-panel>h2{font-size:1.1rem}.fn-tags .cx-actions{margin-top:18px}
.fn-album-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));list-style:none;padding:0;margin:0 0 20px;gap:12px}.fn-album-steps>li{display:flex;align-items:center;gap:9px;font-size:.82rem;color:var(--cx-muted);line-height:1.5}.fn-album-steps span{width:27px;height:27px;display:grid;place-items:center;flex-shrink:0;border-radius:9px;color:var(--cx-primary);background:var(--cx-soft);font-weight:750}.fn-editor #album-photos{scroll-margin-top:100px}
/* The main menu remains consistent across Feed, Browse and profile pages. */
.fn-menu-group{padding:12px 0;border-bottom:1px solid var(--mfs-border)}.fn-menu-group h3{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--mfs-muted);margin:0 12px 8px}.fn-menu-group>a{display:flex}
.mfs-account-popover{max-height:min(740px,calc(100dvh - 100px));overflow-y:auto;overscroll-behavior:contain}
@media(min-width:961px) and (max-width:1150px){.mfs-header-inner{gap:10px}.mfs-desktop-nav{gap:0}.mfs-desktop-nav a{padding:10px 8px;font-size:13px}.mfs-header-inner .mfs-brand img{width:175px}.mfs-account-name{max-width:95px}}
@media(max-width:1000px){.fn-album-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fn-library-post{gap:14px}.fn-library-post-actions{max-width:220px}}
@media(max-width:760px){
 .fn-page-heading{align-items:flex-start;margin-bottom:22px;gap:18px}.fn-page-heading h1{font-size:1.9rem}.fn-page-heading>.cx-button{align-self:flex-start;font-size:.83rem}
 .fn-composer{padding:19px 18px 5px}.fn-composer-top{gap:12px}.fn-composer-top>div{min-width:145px}.fn-composer-top>.cx-button{flex-basis:100%;width:100%;margin-top:2px}
 .fn-compose-options{margin-top:12px}.fn-compose-links{display:grid;grid-template-columns:1fr}.fn-compose-links a{justify-content:flex-start}
 .fn-feed-label{margin-top:18px}.fn-filter-form{grid-template-columns:1fr}.fn-filter-state{font-size:.72rem}.fn-feed-filters{padding:0 14px}.fn-feed-filters>summary{font-size:.82rem;gap:8px}
 .fn-feed .cx-post{padding:19px}.fn-feed .cx-reactions{gap:7px}.fn-feed .cx-reactions .cx-button{font-size:.75rem;padding:9px 10px}
 .fn-library-filter{grid-template-columns:1fr 1fr;padding:16px}.fn-library-filter>.cx-field:first-child{grid-column:1/-1}.fn-library-filter>.cx-button{width:100%}
 .fn-library-post{align-items:flex-start;flex-direction:column}.fn-library-post-actions{max-width:none;width:100%;justify-content:flex-start}.fn-library-post-actions .cx-button{flex:1}
 .fn-photos .fn-page-heading{flex-direction:column}.fn-photos .fn-page-heading>.cx-button{width:100%}.fn-album-grid{gap:16px}.fn-album-info{padding:16px}.fn-album-actions{flex-direction:column}.fn-album-actions .cx-button{width:100%;flex:auto}
 .fn-browse-context{align-items:flex-start;flex-direction:column;gap:0;font-size:.81rem}.fn-browse-context nav{gap:20px}.fn-browse .cx-heading>.cx-button{width:auto}
 .fn-album-steps{grid-template-columns:1fr;gap:9px}.fn-editor .fn-page-heading{flex-direction:column}.fn-editor .fn-page-heading>.cx-button{width:auto}
}
@media(max-width:520px){
 .fn-page-heading p:not(.mfs-eyebrow){font-size:.9rem}.fn-feed-label h2{font-size:.8rem}.fn-feed-label>span{font-size:.7rem}
 .fn-filter-state{max-width:128px;text-align:right}.fn-empty{padding:32px 20px}.fn-new-posts{align-items:flex-start;flex-direction:column;gap:10px}
 .fn-album-grid{grid-template-columns:1fr}.fn-album-actions{flex-direction:row}.fn-album-actions .cx-button{width:auto;flex:1}.fn-album-info{padding:20px}
 .fn-photos .fn-library-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.fn-library-tabs a{font-size:.8rem;padding:10px 12px}
 .fn-photo-search .cx-button{min-width:84px;font-size:.85rem}.fn-profile-photo-secondary{grid-template-columns:1fr 1fr}
 .fn-library .fn-page-heading{flex-direction:column}.fn-library .fn-page-heading>.cx-button{width:100%}.fn-library-filter{gap:12px}
 .fn-composer-top h2{font-size:.94rem}.fn-composer-top p{font-size:.8rem}.fn-composer-mark{width:40px;height:40px}.fn-profile-posts .cx-heading{align-items:flex-start;gap:8px;flex-direction:column}
}
@media(prefers-reduced-motion:reduce){.fn-album-cover img{transition:none}.fn-album-cover:hover img{transform:none}.fn-editor #album-photos{scroll-behavior:auto}}
