/* Fusion20 social finish only. Existing nodes, authorizations, native scrollers,
   keyboard budgets, image fitting, background layers and media keep their owners.
   The final readable sheet consumes these local tokens; RGB remains outside
   these foreground plates. No new animation, generated label or media filter. */
body :is(#overliveAccountPanel,#social,#overliveContactProfile,#liveUserProfile,.social-confirm-dialog,.private-call-panel,.private-call-dock,#space .interface-background-picker,#accountAppOptions){
 --fusion-social-ink:#eeece4;
 --fusion-social-muted:#c5c1b5;
 --fusion-social-gold:#d9ad61;
 --fusion-social-ember:#b85b35;
 --fusion-social-panel:rgb(20 25 26 / .88);
 --fusion-social-inset:rgb(8 13 15 / .86);
 --fusion-social-control:rgb(27 32 32 / .90);
 --fusion-social-line:rgb(238 236 228 / .13);
 --fusion-social-field-line:rgb(197 193 181 / .62);
 --social-reference-ink:var(--fusion-social-ink);
 --social-reference-muted:var(--fusion-social-muted);
 --social-reference-accent:var(--fusion-social-gold);
 --readable-ink:var(--fusion-social-ink);
 --readable-muted:var(--fusion-social-muted);
 --readable-placeholder:#b8b5aa;
 --readable-panel:var(--fusion-social-panel);
 --readable-surface:var(--fusion-social-panel);
 --readable-label:var(--fusion-social-inset);
 --readable-field:rgb(8 13 15 / .90);
 --readable-button:var(--fusion-social-control);
 --readable-control:var(--fusion-social-control);
 --readable-border:var(--fusion-social-field-line);
 --readable-focus:var(--fusion-social-gold);
 color:var(--fusion-social-ink);
 font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
 font-size:14px;line-height:1.5;
}
/* Each RGB control resolves its own variables. Override them locally instead
   of repainting the personal photo/GIF, the live scene or the global body. */
body :is(#overliveAccountPanel,#social,#overliveContactProfile,#liveUserProfile,.social-confirm-dialog,.private-call-panel,#space .interface-background-picker,#accountAppOptions) .rgb-surface{
 --readable-ink:var(--fusion-social-ink);
 --readable-muted:var(--fusion-social-muted);
 --readable-surface:var(--fusion-social-panel);
 --readable-label:var(--fusion-social-inset);
 --readable-field:rgb(8 13 15 / .90);
 --readable-button:var(--fusion-social-control);
 --readable-control:var(--fusion-social-control);
 --readable-border:var(--fusion-social-field-line);
 --readable-focus:var(--fusion-social-gold);
}

/* Quiet plates frame the actual content. No width, height or scroll ownership. */
body #space #overliveAccountPanel,
body #social.overlive-social,
body #space .interface-background-picker,
body #space #accountAppOptions.app-secondary-options{
 background:var(--fusion-social-panel)!important;
 color:var(--fusion-social-ink)!important;
 border-color:var(--fusion-social-line)!important;
 border-radius:20px;box-shadow:0 16px 38px rgb(0 0 0 / .18)!important;
}
body #overliveAccountPanel :is(.account-profile-editor,.account-recovery-code,.account-connection-options,.account-remember-options,.account-reset-panel){
 --readable-surface:var(--fusion-social-inset);
 background:var(--fusion-social-inset)!important;
 border-color:var(--fusion-social-line)!important;
 border-radius:16px;box-shadow:none!important;
}
body #space #accountAppOptions.app-secondary-options>summary,
body #overliveAccountPanel .account-profile-editor>summary{
 background:transparent!important;color:var(--fusion-social-ink)!important;
 border-color:var(--fusion-social-line)!important;border-radius:16px;box-shadow:none!important;
}
body #overliveAccountPanel .account-heading h2,
body #social .social-heading h1,
body #overliveContactProfile .social-contact-heading h2,
body #liveUserProfile #liveUserProfileTitle,
body .social-confirm-dialog h2,
body .private-call-panel .private-call-name{
 font-family:'Space Grotesk',system-ui,sans-serif;color:var(--fusion-social-ink)!important;
 letter-spacing:-.025em;text-shadow:none;
}
body #overliveAccountPanel :is(.account-heading .eyebrow,.account-app-role),
body #social .social-heading>div>span{
 color:var(--fusion-social-gold)!important;
}
body #overliveAccountPanel .account-app-role{
 background:rgb(45 37 24 / .85)!important;
 border-color:var(--fusion-social-line)!important;border-radius:8px;
}
body #overliveAccountPanel :is(.account-avatar,.account-photo-preview,.account-gallery-photo),
body #social .social-row-main .social-avatar,
body dialog:is(#overliveContactProfile,#liveUserProfile).profile-sheet :is(.social-avatar-wrap,.live-user-avatar),
body .private-call-panel .private-call-avatar{
 border-color:rgb(217 173 97 / .22)!important;box-shadow:none!important;
}
body #overliveAccountPanel .account-avatar{background:var(--fusion-social-inset);}
body #overliveAccountPanel .account-gallery-photo{
 background:rgb(8 13 15 / .78);border-radius:16px;
}
body #overliveAccountPanel .account-gallery-photo[data-main='true']{
 background:rgb(48 40 27 / .82);border-color:var(--fusion-social-line)!important;
 box-shadow:none!important;
}
body #overliveAccountPanel .account-gallery-main[aria-pressed='true']::after{
 background:rgb(8 13 15 / .90);color:var(--fusion-social-gold);
}
body #overliveAccountPanel .account-security{border-color:var(--fusion-social-line);}
body #overliveAccountPanel .account-recovery-code code{
 --readable-surface:var(--fusion-social-inset);
 background:var(--fusion-social-inset)!important;color:var(--fusion-social-gold)!important;
 border-color:rgb(217 173 97 / .42)!important;
}

/* Inputs retain their native size, password manager, file chooser and caret. */
body #overliveAccountPanel input:not([type='file']):not([type='checkbox']):not([type='hidden']),
body #social :is(.social-find input,.social-private-form textarea),
body #social .social-gif-options :is(.gif-search-query,.gif-search-reddit input){
 --readable-field:rgb(8 13 15 / .90);
 background:var(--readable-field)!important;color:var(--fusion-social-ink)!important;
 border-color:var(--fusion-social-field-line)!important;
 border-radius:16px;font-size:16px;caret-color:var(--fusion-social-ink);text-shadow:none;
}
body #overliveAccountPanel .overlive-presence-field{
 background:var(--fusion-social-control);color:var(--fusion-social-ink);
 border-color:var(--fusion-social-line);border-radius:16px;
}
/* The invisible native status select and the presence dots remain untouched. */
body #overliveAccountPanel :is(.account-description,.account-field-hint,.account-recovery-help,.account-security p,.account-reset-panel>p,.account-recovery-code p,.account-remember-options p,.account-remember-options label,.account-connection-options summary,.overlive-presence-feedback),
body #social :is(.social-status,.social-empty,.social-row-text>span,.social-list-title,.social-find-feedback,.social-private-message time),
body #overliveContactProfile .social-contact-heading p,
body #liveUserProfile :is(#liveUserHandle,#liveUserRole),
body .private-call-panel :is(.private-call-label,.private-call-status,.private-call-security){
 color:var(--fusion-social-muted)!important;
}

/* Existing controls keep their dimensions. Accent uses tone, never a selected
   ring; focus is a separate, deliberately visible keyboard affordance. */
body #overliveAccountPanel :is(.account-visitor,.account-password-toggle,.account-photo-remove,.account-text-button,.account-gallery-action,.account-recovery-actions button,#accountPhotoChoose),
body #social :is(.social-pill,.social-older,.social-refresh),
body dialog:is(#overliveContactProfile,#liveUserProfile).profile-sheet :is(.social-contact-button,#liveUserActions>.btn,.social-close,.close,.profile-privacy-toggle),
body #overliveAccountPanel .profile-privacy-toggle,
body .social-confirm-dialog>div>button,
body .private-call-panel :is(.private-call-minimize,.private-call-actions>button),
body .private-call-dock,
body #space .interface-background-picker :is(.background-choose,.background-base){
 background:var(--fusion-social-control)!important;color:var(--fusion-social-ink)!important;
 border-color:rgb(238 236 228 / .20)!important;border-radius:16px;
 box-shadow:none!important;text-shadow:none;font-size:14px;
}
body #overliveAccountPanel .account-submit,
body #social .social-private-form>button[type='submit']{
 background:#d9ad61!important;color:#211b10!important;
 border-color:transparent!important;box-shadow:none!important;text-shadow:none;font-weight:700;
}
body #overliveAccountPanel .account-tabs,
body #social .social-tabs{
 background:rgb(8 13 15 / .80);border-color:var(--fusion-social-line);border-radius:16px;
}
body #overliveAccountPanel .account-tabs>button,
body #social .social-tabs>button{
 background:transparent!important;border-color:transparent!important;
 color:var(--fusion-social-muted)!important;box-shadow:none!important;
}
body #overliveAccountPanel .account-tabs>button[aria-selected='true'],
body #social .social-tabs>button[aria-selected='true'],
body #social .social-gif-options .gif-provider-tabs>button[aria-selected='true']{
 background:transparent!important;color:var(--fusion-social-gold)!important;
 border-color:transparent!important;box-shadow:none!important;text-shadow:0 0 10px rgb(217 173 97 / .20);
}
body #overliveAccountPanel .account-tabs>button[aria-selected='true'] svg,
body #social .social-tabs>button[aria-selected='true'] svg{
 color:var(--fusion-social-gold);
}
body #social .social-private-call{color:var(--fusion-social-gold)!important;}

/* Linear inbox/friend rows and the native read anchor stay as they are. */
body #social .social-row{
 background:transparent;border-bottom-color:var(--fusion-social-line);
 border-radius:0;box-shadow:none;
}
body #social .social-row-main{
 background:transparent!important;color:var(--fusion-social-ink)!important;border-color:transparent!important;
}
body #social :is(.social-thread-heading,.social-thread-tools){border-color:var(--fusion-social-line);}
body #social .social-row-text strong,
body #social .social-thread-heading strong{color:var(--fusion-social-ink)!important;}
body #social .social-private-message{
 --readable-surface:rgb(27 32 32 / .90);
 background:var(--readable-surface)!important;border-color:var(--fusion-social-line)!important;
 border-radius:18px 18px 18px 6px;color:var(--fusion-social-ink)!important;box-shadow:none;
}
body #social .social-private-message.mine{
 --readable-surface:rgb(51 36 28 / .90);
 background:var(--readable-surface)!important;border-color:rgb(217 173 97 / .16)!important;
 border-radius:18px 18px 6px 18px;
}
body #social .social-private-message p{color:var(--fusion-social-ink)!important;}
body #social .social-private-message a{color:#e5c88f!important;}
body #social .social-unread{
 background:#d9ad61!important;color:#211b10!important;border-color:transparent!important;
}

/* Native profile sheets keep their open/closed state, safe areas and fitting. */
body dialog:is(#overliveContactProfile,#liveUserProfile).profile-sheet,
body .social-confirm-dialog,
body .private-call-panel,
body .private-call-dock{
 background:var(--fusion-social-panel)!important;color:var(--fusion-social-ink)!important;
 border-color:var(--fusion-social-line)!important;
 box-shadow:0 18px 46px rgb(0 0 0 / .30);
}
body dialog:is(#overliveContactProfile,#liveUserProfile).profile-sheet{border-radius:20px 20px 0 0;}
body .social-confirm-dialog,
body .private-call-panel{border-radius:20px;}
body dialog:is(#overliveContactProfile,#liveUserProfile).profile-sheet :is(.profile-private-label,.profile-public-photos[data-restricted='true']){
 background:var(--fusion-social-inset);color:var(--fusion-social-muted);
 border-color:var(--fusion-social-line);border-radius:16px;
}
body dialog:is(#overliveContactProfile,#liveUserProfile).profile-sheet .profile-public-photos>img{
 border-color:var(--fusion-social-line);background:var(--fusion-social-inset);
}
body .private-call-panel :is(header,.private-call-security){border-color:var(--fusion-social-line);}
body .private-call-panel .private-call-security>summary{color:var(--fusion-social-ink)!important;}
body .private-call-panel .private-call-code{
 background:var(--fusion-social-inset);color:var(--fusion-social-gold);border-color:rgb(217 173 97 / .25);
}
body .private-call-panel .private-call-actions>button[aria-pressed='true']{
 background:rgb(48 40 27 / .90)!important;color:var(--fusion-social-gold)!important;
 border-color:var(--fusion-social-line)!important;
}
body .private-call-panel .private-call-actions>.private-call-accept{
 background:rgb(31 77 59 / .90)!important;border-color:rgb(158 204 177 / .35)!important;color:#eeece4!important;
}
body #overliveAccountPanel #accountLogout,
body #overliveAccountPanel #accountLogout:hover,
body .social-confirm-dialog .social-confirm,
body .private-call-panel .private-call-actions>.private-call-end,
body #liveUserProfile.profile-sheet #liveUserActions>.btn.danger{
 background:rgb(133 39 57 / .90)!important;color:#fff!important;border-color:rgb(242 161 174 / .48)!important;
}

/* Restyle app chrome only: no iframe/image, provider logo or attribution edits. */
body #social .social-gif-options :is(.gif-provider-tabs button,.gif-search-more,.gif-search-retry,.gif-search-reddit button,.gif-search-choice),
body #social :is(.giphy-message-card,.social-reddit-card){
 background:var(--fusion-social-inset)!important;color:var(--fusion-social-ink)!important;
 border-color:var(--fusion-social-line);border-radius:16px;
}
body #social :is(.gif-search-status,.gif-search-caption,.gif-search-author){color:var(--fusion-social-muted);}

/* Native focus, visible errors and disabled/busy feedback beat old RGB paint.
   No display, positioning, opacity, transform or overflow rules are replaced. */
body :is(#overliveAccountPanel,#social,#overliveContactProfile,#liveUserProfile,.social-confirm-dialog,.private-call-panel,#space .interface-background-picker,#accountAppOptions) :is(button,input,textarea,summary,[tabindex]):focus-visible,
body .private-call-dock:focus-visible,
body #overliveAccountPanel .overlive-presence-field:focus-within{
 outline:2px solid #d9ad61!important;outline-offset:3px;
}
body :is(#overliveAccountPanel,#social,#overliveContactProfile,#liveUserProfile,.social-confirm-dialog,.private-call-panel,#space .interface-background-picker) :is(button,input,textarea):disabled{
 color:#bdbbb1!important;background:var(--fusion-social-inset)!important;
 border-color:rgb(197 193 181 / .28)!important;border-style:dashed!important;
}
body #overliveAccountPanel :is(.account-status[data-kind='error'],.account-confirm-error,.profile-privacy-status),
body #social .social-status[data-error='true'],
body #overliveContactProfile .social-action-status:not(:empty),
body #space .interface-background-picker .background-status[data-error='true']{
 color:#ffc9cd!important;
}
