/* Social surfaces follow the light frosted registration palette. Layout, images and unread colors stay intact. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.address-book,.ab-sheet) {
 --ab-soft:var(--forge-soft);--ab-line:var(--forge-line);--ab-color:var(--forge-accent);--ab-tint:rgba(50,120,237,.075);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.announcement-list,.announcement-detail) {
 --announcement-line:var(--forge-line);--announcement-soft:var(--forge-soft);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .post-detail {
 --post-line:var(--forge-line);--post-soft:var(--forge-soft);--post-accent:var(--forge-accent);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .community-profile {
 --profile-line:var(--forge-line);--profile-soft:var(--forge-soft);--profile-accent:var(--forge-accent);--profile-fade-rgb:var(--forge-page-rgb,238,245,250);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-management {
 --cm-soft:var(--forge-soft);--cm-line:var(--forge-line);
}

/* Keep the square and all social lists flat and separated by quiet rules. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.square-stream,.square-announcements,.message-hub,.community-post,.conversation-row,.conversation-row.pinned,.ab-person-row,.ab-group-main,.announcement-row,.community-profile-strategy-row) {
 background:transparent;box-shadow:none!important;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.community-post,.conversation-row,.ab-person-row,.ab-group-row,.announcement-row,.community-comment,.post-detail-comment,.community-profile-strategy-row,.compose-page-head,.compose-bottom) {
 border-color:var(--forge-line);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.community-likes-inline,.community-comments-inline) {
 background:rgba(233,243,253,.68);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.community-likes-inline,.community-more-comments,.community-featured,.community-post footer button.liked,.community-post footer .community-pin-action) {
 color:var(--forge-accent);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .community-comments-inline p {
 color:var(--forge-muted);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .community-pin-label {
 color:var(--forge-accent);background:rgba(50,120,237,.08);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.community-post-open,.community-content,.post-detail-body,.announcement-article-body) {
 color:var(--forge-ink);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .community-fab {
 color:#fff;background:linear-gradient(145deg,#2d6dcd,#205bb5);border-color:rgba(38,105,192,.32);
 box-shadow:inset 0 1px 0 rgba(255,255,255,.32),0 9px 24px rgba(51,103,170,.2),0 2px 5px rgba(45,88,145,.06)!important;
}

/* Existing menus and controls get a restrained glass surface, without affecting their placement. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(#community-feed-menu,.chat-message-action-menu) {
 color:var(--forge-ink);background:var(--forge-panel);border-color:var(--forge-line-strong);box-shadow:var(--forge-shadow);
 backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-message-menu-backdrop {
 background:rgba(38,75,113,.13);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .ab-tabs {
 background:rgba(227,238,249,.65);border-color:var(--forge-line);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .ab-tabs button.active {
 color:var(--forge-ink);background:linear-gradient(145deg,rgba(255,255,255,.95),rgba(245,251,255,.78));border-color:var(--forge-line-strong);
 box-shadow:inset 0 1px 0 rgba(255,255,255,.96),0 3px 9px rgba(56,101,155,.07)!important;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.ab-create-banner,.ab-result-card,.community-profile-account,.social-request) {
 background:var(--forge-panel);border-color:var(--forge-line);box-shadow:var(--forge-shadow);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.ab-search,.ab-lookup-control,.ab-find-switch button,.ab-invite-button,.ab-create-icon,.ab-status-pill,.announcement-clean,.announcement-row-icon,.cm-rows,.cm-permission-list,.community-profile-strategy-choices,.community-profile-sharing-accounts) {
 background:var(--forge-soft);border-color:var(--forge-line);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.ab-find-switch button.active,.post-detail-featured,.post-detail-article>footer button.liked,.community-profile-snapshot.is-current,.announcement-row.is-unread .announcement-row-icon) {
 color:var(--forge-accent);background:rgba(50,120,237,.08);border-color:var(--forge-line-strong);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.ab-primary:not(.ab-danger),.ab-lookup-control button,.cm-primary:not(.cm-danger),.community-profile-follow:not(.is-following),.community-profile-sharing-actions [type="submit"],#community-profile-wallpaper-save,#post-detail-comment-form button[type="submit"]) {
 background:linear-gradient(145deg,#2d6dcd,#205bb5);border-color:rgba(38,105,192,.28);color:#fff;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.ab-picker-row input:checked~.ab-checkbox,.cm-permission-list input:checked+i,.cm-invite-person input:checked+i,.community-profile-strategy-choices input:checked~.community-profile-choice-check) {
 background:#2d6dcd;border-color:#2d6dcd;color:#fff;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .community-profile-sharing-accounts input:checked~.community-profile-sharing-check svg {
 color:#fff;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .cm-switch.on {
 background:#3278ed;border-color:rgba(47,108,200,.28);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .cm-switch.on>i {
 background:#fff;
}

/* A white-and-ice-blue messenger. The fixed doodle wallpaper and bubble geometry are unchanged. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-page {
 --chat-bg:#e7f0f8;--chat-in:rgba(255,255,255,.95);--chat-out:#dceeff;--chat-bar:rgba(246,251,255,.92);
 color:var(--forge-ink);background:var(--chat-bg);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-page>.chat-page-scroll {
 background:transparent;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-page :is(.chat-page-header,.chat-page-footer,.chat-page-notice) {
 background:var(--chat-bar);border-color:var(--forge-line);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-message-content p {
 color:var(--forge-ink);background:var(--chat-in);
 box-shadow:inset 0 1px 0 rgba(255,255,255,.98),inset 0 0 0 1px rgba(100,148,189,.12),0 3px 8px rgba(62,101,146,.055);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-message.out .chat-message-content p {
 background:linear-gradient(145deg,#eaf5ff,var(--chat-out));color:#17385b;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.86),inset 0 0 0 1px rgba(105,164,216,.19),0 3px 9px rgba(62,111,160,.06);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-message.in .chat-message-content p::before {
 background:var(--chat-in);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-message.out .chat-message-content p::after {
 background:var(--chat-out);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-page .chat-input-row input {
 background:rgba(255,255,255,.72);border-color:var(--forge-line);color:var(--forge-ink);
 box-shadow:inset 0 1px 2px rgba(72,117,159,.04);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-page .chat-input-row input:focus {
 border-color:rgba(50,120,237,.46);box-shadow:0 0 0 2px rgba(50,120,237,.08);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-page .chat-input-row .chat-send {
 color:#fff;background:linear-gradient(145deg,#2d6dcd,#205bb5);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-page-header #live-chat-more {
 color:var(--forge-ink);background:var(--forge-soft);border-color:var(--forge-line);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-page :is(.chat-timestamp,.chat-system-notice>span,.chat-retracted span) {
 color:var(--forge-muted);background:rgba(249,253,255,.72);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-page-footer #live-chat-muted {
 color:var(--forge-muted);border-color:var(--forge-line);background:transparent;
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) #live-chat-messages .message-menu-selected .chat-message-content>p {
 box-shadow:0 0 0 2px var(--forge-accent),0 4px 16px rgba(48,105,170,.13);
}

/* Fade into the same mist-white page without tinting, filtering or blurring the actual cover photo. */
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.community-profile,.community-profile-hero,.community-profile-content) {
 background:var(--bg,#eef5fa);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .community-profile:not(.has-wallpaper) .community-profile-nav>button {
 color:var(--forge-ink);background:rgba(255,255,255,.42);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .community-profile-tabs>button[aria-selected="true"] {
 color:var(--forge-accent);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.community-profile-manage,.community-profile-follow.is-following,.community-profile-settings-row>svg:first-child,.community-profile-wallpaper-pickers>button,.community-profile-sharing-actions button:not([type="submit"])) {
 color:var(--forge-ink);background:var(--forge-soft);border-color:var(--forge-line);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) #community-profile-wallpaper-remove {
 background:transparent;border-color:transparent;color:var(--forge-muted);
}
:root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.community-profile-strategy-icon:not(.is-cfd),.chat-forward-avatar,.cm-avatar,.community-avatar,.post-detail-avatar) {
 color:var(--forge-accent);background:rgba(61,130,224,.085);border-color:var(--forge-line);
}

@media(hover:hover) and (pointer:fine) {
 :root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.conversation-row,.ab-person-row,.ab-group-main,.announcement-row,.community-profile-strategy-row):hover {
  background:rgba(50,120,237,.045);
 }
 :root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(.chat-message-action-menu .chat-message-action,.chat-forward-target):not(:disabled):hover {
  background:rgba(50,120,237,.08);color:var(--forge-accent);
 }
}
@media(prefers-reduced-transparency:reduce) {
 :root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) :is(#community-feed-menu,.chat-message-action-menu) {
  background:#f7fbff;backdrop-filter:none;-webkit-backdrop-filter:none;
 }
 :root[data-theme="light"]:not(.auth-pending) body.ui-polished:not(.admin-body) .chat-page :is(.chat-page-header,.chat-page-footer,.chat-page-notice) {
  background:#f3f8fd;backdrop-filter:none;-webkit-backdrop-filter:none;
 }
}
