/* Complete light-mode compatibility layer.
   This file intentionally loads last among ordinary theme styles so old dark-only surfaces
   consume the same light tokens without changing their feature ownership. */

html.rift-theme-booting body { visibility: hidden !important; }

html[data-rift-effective-theme='light'] {
  --r-bg0:#f5f6f8;
  --r-bg1:#eef0f3;
  --r-bg2:#e7eaee;
  --r-bg3:#dde1e6;
  --r-hover:#e1e5ea;
  --r-sel:#d8dde3;
  --ref-bg-rail:#e4e7eb;
  --ref-bg-side:#eceef1;
  --ref-bg-side-2:#e6e9ed;
  --ref-bg-main:#f5f6f8;
  --ref-bg-main-2:#ffffff;
  --ref-bg-hover:#e1e5ea;
  --ref-bg-active:#d8dde3;
  --ref-border:#d2d7dd;
  --ref-border-soft:#dce0e5;
  --ref-text:#20242a;
  --ref-text-2:#424952;
  --ref-muted:#6d7480;
  --ref-muted-2:#9097a2;
  --p-bg:#f5f6f8;
  --p-side:#eceef1;
  --p-pop:#ffffff;
  --p-hover:#e1e5ea;
  --p-border:#d2d7dd;
  --p-muted:#6d7480;
}

html[data-rift-effective-theme='light'] body,
html[data-rift-effective-theme='light'] .app-shell,
html[data-rift-effective-theme='light'] .content-panel,
html[data-rift-effective-theme='light'] .chat-view,
html[data-rift-effective-theme='light'] .home-view,
html[data-rift-effective-theme='light'] .message-list,
html[data-rift-effective-theme='light'] .voice-view {
  background:#f5f6f8 !important;
  color:#20242a !important;
}

/* User dock / hover controls. */
html[data-rift-effective-theme='light'] .current-user-panel,
html[data-rift-effective-theme='light'] .current-user-panel:hover {
  background:#e6e9ed !important;
  color:#20242a !important;
}
html[data-rift-effective-theme='light'] #ui0212-user-controls,
html[data-rift-effective-theme='light'] .quick-user-controls {
  background:transparent !important;
  border-color:transparent !important;
}
html[data-rift-effective-theme='light'] .current-user-panel:hover #ui0212-user-controls {
  background:#dde1e6 !important;
  border-color:#c9cfd6 !important;
}
html[data-rift-effective-theme='light'] #ui0212-user-controls button,
html[data-rift-effective-theme='light'] .quick-user-controls button,
html[data-rift-effective-theme='light'] #settings-button {
  background:transparent !important;
  color:#59616c !important;
}
html[data-rift-effective-theme='light'] #ui0212-user-controls button:hover,
html[data-rift-effective-theme='light'] #ui0212-user-controls button.active,
html[data-rift-effective-theme='light'] .quick-user-controls button:hover,
html[data-rift-effective-theme='light'] .quick-user-controls button.active,
html[data-rift-effective-theme='light'] #settings-button:hover {
  background:#cfd5dc !important;
  color:#20242a !important;
}
html[data-rift-effective-theme='light'] #ui0212-user-controls button.activity-off,
html[data-rift-effective-theme='light'] .quick-user-controls button.parity-control-on {
  background:#f7d9dc !important;
  color:#b4232d !important;
}
html[data-rift-effective-theme='light'] .current-user-panel > .self-presence-dot,
html[data-rift-effective-theme='light'] .self-presence-dot {
  border-color:#e6e9ed !important;
  --status-cutout:#e6e9ed !important;
}
html[data-rift-effective-theme='light'] .current-user-panel > .self-presence-dot.presence-offline,
html[data-rift-effective-theme='light'] .current-user-panel > .self-presence-dot.presence-invisible {
  background:#e6e9ed !important;
}

/* Empty-channel access roles and other role chips. */
html[data-rift-effective-theme='light'] .rift-empty-channel { color:#20242a !important; }
html[data-rift-effective-theme='light'] .rift-empty-channel p { color:#6d7480 !important; }
html[data-rift-effective-theme='light'] .rift-empty-channel-actions button {
  background:#ffffff !important;
  color:#343a43 !important;
  border-color:#cfd5dc !important;
  box-shadow:none !important;
}
html[data-rift-effective-theme='light'] .rift-empty-channel-actions button:hover {
  background:#e7eaee !important;
  color:#20242a !important;
}
html[data-rift-effective-theme='light'] .rift-empty-role,
html[data-rift-effective-theme='light'] .profile-role,
html[data-rift-effective-theme='light'] .r021-profile-role,
html[data-rift-effective-theme='light'] .v024-role-chip,
html[data-rift-effective-theme='light'] .v024-permission-pills span {
  background:#e1e5ea !important;
  color:#424952 !important;
  border-color:#cbd1d8 !important;
}

/* Profile cards/popouts: every currently-owned profile renderer. */
html[data-rift-effective-theme='light'] .profile-popout,
html[data-rift-effective-theme='light'] .status-popout,
html[data-rift-effective-theme='light'] .r021-profile-card,
html[data-rift-effective-theme='light'] .r021-status-menu,
html[data-rift-effective-theme='light'] .parity-self-card,
html[data-rift-effective-theme='light'] .parity-status-menu,
html[data-rift-effective-theme='light'] .ui0211-self-card,
html[data-rift-effective-theme='light'] .ui0212-self-card,
html[data-rift-effective-theme='light'] .ui0212-status-menu,
html[data-rift-effective-theme='light'] .parity-context,
html[data-rift-effective-theme='light'] .rift-friend-safe-menu,
html[data-rift-effective-theme='light'] .ui0212-context,
html[data-rift-effective-theme='light'] .ui0213-message-menu {
  background:#ffffff !important;
  color:#20242a !important;
  border-color:#cfd5dc !important;
  box-shadow:0 14px 36px rgba(31,36,43,.16) !important;
}
html[data-rift-effective-theme='light'] .profile-avatar-large,
html[data-rift-effective-theme='light'] .profile-presence,
html[data-rift-effective-theme='light'] .r021-profile-avatar,
html[data-rift-effective-theme='light'] .r021-profile-presence,
html[data-rift-effective-theme='light'] .parity-self-avatar,
html[data-rift-effective-theme='light'] .parity-self-avatar .parity-presence,
html[data-rift-effective-theme='light'] .ui0211-self-avatar,
html[data-rift-effective-theme='light'] .ui0211-self-avatar .ui0211-presence,
html[data-rift-effective-theme='light'] .ui0212-self-avatar,
html[data-rift-effective-theme='light'] .ui0212-self-avatar .ui0212-presence {
  border-color:#ffffff !important;
}
html[data-rift-effective-theme='light'] .profile-identity,
html[data-rift-effective-theme='light'] .parity-dm-meta,
html[data-rift-effective-theme='light'] .popover-separator,
html[data-rift-effective-theme='light'] .r021-status-divider,
html[data-rift-effective-theme='light'] .parity-menu-divider,
html[data-rift-effective-theme='light'] .ui0213-message-menu .divider,
html[data-rift-effective-theme='light'] .rift-friend-safe-divider {
  border-color:#d8dde3 !important;
  background:#d8dde3 !important;
}
html[data-rift-effective-theme='light'] .profile-identity span,
html[data-rift-effective-theme='light'] .profile-section h4,
html[data-rift-effective-theme='light'] .r021-profile-user,
html[data-rift-effective-theme='light'] .r021-profile-section h4,
html[data-rift-effective-theme='light'] .parity-self-user,
html[data-rift-effective-theme='light'] .parity-dm-meta span,
html[data-rift-effective-theme='light'] .ui0211-self-user,
html[data-rift-effective-theme='light'] .ui0212-dm-username,
html[data-rift-effective-theme='light'] .ui0212-dm-section h4 {
  color:#69717c !important;
}
html[data-rift-effective-theme='light'] .profile-status-text,
html[data-rift-effective-theme='light'] .profile-section p,
html[data-rift-effective-theme='light'] .r021-profile-section p,
html[data-rift-effective-theme='light'] .parity-self-bio,
html[data-rift-effective-theme='light'] .ui0212-dm-section p,
html[data-rift-effective-theme='light'] .ui0212-dm-note {
  color:#343a43 !important;
}
html[data-rift-effective-theme='light'] .r021-profile-custom,
html[data-rift-effective-theme='light'] .r021-profile-menu,
html[data-rift-effective-theme='light'] .ui0212-dm-status,
html[data-rift-effective-theme='light'] .parity-self-edit,
html[data-rift-effective-theme='light'] .parity-self-status,
html[data-rift-effective-theme='light'] .parity-self-row {
  background:#eef1f4 !important;
  color:#424952 !important;
  border-color:#d4d9df !important;
}
html[data-rift-effective-theme='light'] .r021-profile-menu button,
html[data-rift-effective-theme='light'] .status-option,
html[data-rift-effective-theme='light'] .status-custom-action,
html[data-rift-effective-theme='light'] .r021-status-option,
html[data-rift-effective-theme='light'] .parity-status-item,
html[data-rift-effective-theme='light'] .parity-menu-item,
html[data-rift-effective-theme='light'] .rift-friend-safe-menu button,
html[data-rift-effective-theme='light'] .ui0212-context button,
html[data-rift-effective-theme='light'] .ui0213-message-menu > button {
  color:#424952 !important;
}
html[data-rift-effective-theme='light'] .r021-profile-menu button:hover:not(:disabled),
html[data-rift-effective-theme='light'] .status-option:hover,
html[data-rift-effective-theme='light'] .status-custom-action:hover,
html[data-rift-effective-theme='light'] .r021-status-option:hover,
html[data-rift-effective-theme='light'] .parity-status-item:hover,
html[data-rift-effective-theme='light'] .parity-menu-item:hover:not(:disabled),
html[data-rift-effective-theme='light'] .rift-friend-safe-menu button:hover:not(:disabled),
html[data-rift-effective-theme='light'] .ui0212-context button:hover:not(:disabled),
html[data-rift-effective-theme='light'] .ui0213-message-menu > button:hover:not(:disabled) {
  background:#e4e8ec !important;
  color:#20242a !important;
}
html[data-rift-effective-theme='light'] .ui0212-dm-profile,
html[data-rift-effective-theme='light'] .parity-dm-side {
  background:#eef0f3 !important;
  color:#20242a !important;
  scrollbar-color:#c7cdd4 transparent !important;
}
html[data-rift-effective-theme='light'] .ui0212-dm-avatar,
html[data-rift-effective-theme='light'] .parity-dm-avatar,
html[data-rift-effective-theme='light'] .parity-dm-avatar .parity-presence {
  border-color:#eef0f3 !important;
}
html[data-rift-effective-theme='light'] .ui0212-dm-note:hover,
html[data-rift-effective-theme='light'] .ui0212-dm-note:focus {
  background:#ffffff !important;
}

/* Friend action buttons no longer become dark circles in light mode. */
html[data-rift-effective-theme='light'] .social-actions button,
html[data-rift-effective-theme='light'] .ui0211-friend-action {
  background:#e5e9ed !important;
  color:#59616c !important;
}
html[data-rift-effective-theme='light'] .social-actions button:hover,
html[data-rift-effective-theme='light'] .ui0211-friend-action:hover {
  background:#d4d9df !important;
  color:#20242a !important;
}

/* Menus, message actions and composer attachments. */
html[data-rift-effective-theme='light'] .message-actions,
html[data-rift-effective-theme='light'] .reaction-picker,
html[data-rift-effective-theme='light'] .pending-file,
html[data-rift-effective-theme='light'] .reply-bar,
html[data-rift-effective-theme='light'] .attachment-preview,
html[data-rift-effective-theme='light'] .file-attachment {
  background:#ffffff !important;
  color:#343a43 !important;
  border-color:#d3d8de !important;
}
html[data-rift-effective-theme='light'] .message-actions button:hover {
  background:#e7eaee !important;
  color:#20242a !important;
}

/* Server administration and channel permission surfaces. */
html[data-rift-effective-theme='light'] .parity-settings,
html[data-rift-effective-theme='light'] .ui0212-channel-settings {
  background:#f5f6f8 !important;
  color:#20242a !important;
}
html[data-rift-effective-theme='light'] .parity-settings-nav,
html[data-rift-effective-theme='light'] .ui0212-channel-settings aside {
  background:#eceef1 !important;
  color:#20242a !important;
  border-color:#d3d8de !important;
}
html[data-rift-effective-theme='light'] .parity-settings-nav h4,
html[data-rift-effective-theme='light'] .parity-settings-content h1,
html[data-rift-effective-theme='light'] .parity-settings-content h2,
html[data-rift-effective-theme='light'] .v024-page,
html[data-rift-effective-theme='light'] .v024-card > label {
  color:#20242a !important;
}
html[data-rift-effective-theme='light'] .parity-settings-nav button,
html[data-rift-effective-theme='light'] .ui0212-channel-settings aside button {
  color:#59616c !important;
}
html[data-rift-effective-theme='light'] .parity-settings-nav button:hover,
html[data-rift-effective-theme='light'] .ui0212-channel-settings aside button:hover {
  background:#e0e4e8 !important;
  color:#20242a !important;
}
html[data-rift-effective-theme='light'] .parity-settings-nav button.active,
html[data-rift-effective-theme='light'] .ui0212-channel-settings aside button.active {
  background:#d7dce2 !important;
  color:#20242a !important;
}
html[data-rift-effective-theme='light'] .parity-form-section,
html[data-rift-effective-theme='light'] .v024-permission-editor,
html[data-rift-effective-theme='light'] .v024-permission-toggle,
html[data-rift-effective-theme='light'] .v024-member-role-list label,
html[data-rift-effective-theme='light'] .v024-channel-role label {
  border-color:#d6dbe1 !important;
}
html[data-rift-effective-theme='light'] .parity-form-section input,
html[data-rift-effective-theme='light'] .parity-form-section textarea,
html[data-rift-effective-theme='light'] .parity-form-section select,
html[data-rift-effective-theme='light'] .v024-card input,
html[data-rift-effective-theme='light'] .v024-card textarea,
html[data-rift-effective-theme='light'] .v024-role-form input,
html[data-rift-effective-theme='light'] .v024-role-form select,
html[data-rift-effective-theme='light'] .v024-channel-role select {
  background:#ffffff !important;
  color:#20242a !important;
  border-color:#cbd1d8 !important;
}
html[data-rift-effective-theme='light'] .parity-disabled-page,
html[data-rift-effective-theme='light'] .parity-danger-box,
html[data-rift-effective-theme='light'] .v024-card,
html[data-rift-effective-theme='light'] .v024-loading,
html[data-rift-effective-theme='light'] .v024-empty,
html[data-rift-effective-theme='light'] .v024-role-card,
html[data-rift-effective-theme='light'] .v024-member-card,
html[data-rift-effective-theme='light'] .v024-audit-row,
html[data-rift-effective-theme='light'] .v024-stat-grid article,
html[data-rift-effective-theme='light'] .v024-permission-summary article,
html[data-rift-effective-theme='light'] .v024-channel-role {
  background:#ffffff !important;
  color:#20242a !important;
  border-color:#d3d8de !important;
}
html[data-rift-effective-theme='light'] .v024-muted,
html[data-rift-effective-theme='light'] .v024-role-copy > small,
html[data-rift-effective-theme='light'] .v024-member-copy > small,
html[data-rift-effective-theme='light'] .v024-member-copy p,
html[data-rift-effective-theme='light'] .v024-audit-row span,
html[data-rift-effective-theme='light'] .v024-audit-row small,
html[data-rift-effective-theme='light'] .v024-stat-grid p,
html[data-rift-effective-theme='light'] .v024-permission-summary small,
html[data-rift-effective-theme='light'] .v024-channel-copy {
  color:#69717c !important;
}

/* Voice UI is themed too; video content itself can still provide its own image/background. */
html[data-rift-effective-theme='light'] .r021-voice-screen,
html[data-rift-effective-theme='light'] .ui0212-voice-page {
  background:#eef0f3 !important;
  color:#20242a !important;
}
html[data-rift-effective-theme='light'] .r021-voice-topbar { color:#424952 !important; }
html[data-rift-effective-theme='light'] .r021-video-tile,
html[data-rift-effective-theme='light'] .voice-person-card {
  background:#ffffff !important;
  color:#20242a !important;
  border-color:#d3d8de !important;
}
html[data-rift-effective-theme='light'] .r021-voice-controls-floating {
  background:#ffffff !important;
  border-color:#d3d8de !important;
  box-shadow:0 10px 28px rgba(31,36,43,.14) !important;
}
html[data-rift-effective-theme='light'] .r021-call-group,
html[data-rift-effective-theme='light'] .r021-call-group button + button {
  border-color:#d3d8de !important;
}
html[data-rift-effective-theme='light'] .r021-call-group button,
html[data-rift-effective-theme='light'] .r021-call-button,
html[data-rift-effective-theme='light'] .r021-activity-actions button {
  background:#eef1f4 !important;
  color:#424952 !important;
  border-color:#d3d8de !important;
}
html[data-rift-effective-theme='light'] .r021-call-group button:hover:not(:disabled),
html[data-rift-effective-theme='light'] .r021-call-button:hover:not(:disabled) {
  background:#dde2e7 !important;
}

/* Legacy invite/create surfaces that previously forced black. */
html[data-rift-effective-theme='light'] .modal.rift-invite-modal,
html[data-rift-effective-theme='light'] .ui0211-create-channel,
html[data-rift-effective-theme='light'] .ui0211-create-server,
html[data-rift-effective-theme='light'] .ui0211-join-server,
html[data-rift-effective-theme='light'] .ui0211-server-name-step {
  background:#ffffff !important;
  color:#20242a !important;
}
html[data-rift-effective-theme='light'] .invite-search,
html[data-rift-effective-theme='light'] .ui0211-channel-name-field,
html[data-rift-effective-theme='light'] .ui0211-template-list > button,
html[data-rift-effective-theme='light'] .ui0211-join-existing {
  background:#f5f6f8 !important;
  color:#343a43 !important;
  border-color:#d3d8de !important;
}

/* Light scrollbars on app-owned scrolling surfaces. */
html[data-rift-effective-theme='light'] * {
  scrollbar-color:#b8c0c9 transparent;
}
