:root[data-ghr-appearance="light"] { color-scheme:light; }
:root[data-ghr-appearance="dark"] { color-scheme:dark; }
:root[data-ghr-appearance="system"] { color-scheme:light dark; }

:root[data-ghr-appearance] {
  --ghr-pane:#fff;
  --ghr-canvas:#eef1f4;
  --ghr-surface:#f5f7fa;
  --ghr-line:#d8dee7;
  --ghr-text:#172337;
  --ghr-muted:#536477;
  --ghr-link:#1758ad;
  --ghr-selected:#edf4ff;
  --ghr-outgoing:#dcf8c6;
}
:root[data-ghr-appearance="dark"] {
  --ghr-pane:#202834;
  --ghr-canvas:#171e28;
  --ghr-surface:#283343;
  --ghr-line:#414d5f;
  --ghr-text:#e3eaf3;
  --ghr-muted:#aebed0;
  --ghr-link:#a5c9fd;
  --ghr-selected:#2d3b50;
  --ghr-outgoing:#25483e;
}
@media (prefers-color-scheme: dark) {
:root[data-ghr-appearance="system"] {
  --ghr-pane:#202834;
  --ghr-canvas:#171e28;
  --ghr-surface:#283343;
  --ghr-line:#414d5f;
  --ghr-text:#e3eaf3;
  --ghr-muted:#aebed0;
  --ghr-link:#a5c9fd;
  --ghr-selected:#2d3b50;
  --ghr-outgoing:#25483e;
}
}
:root[data-ghr-appearance] body,
:root[data-ghr-appearance] .app .chat,
:root[data-ghr-appearance] .ghrPdfScroll {
  background:var(--ghr-canvas); color:var(--ghr-text);
}
:root[data-ghr-appearance] :is(.sidebar,.head,.composer,.profile,.conv,.result,.bubble,.xcoreProfileButton,
 .xcoreProfileMenu,.xcoreProfileMenu button,.xcoreSettingsModal,.xcoreSettingsHeader,.xcoreSettingsNav,
 .xcoreSettingsContent,.xcoreFormModal,.xcorePermissionGroup,.xcorePermissionCard,.xcoreRoleCard,.modal,
 .cv3-workspace,.cv3-filter,.cv3-review,.rcE-sync-manager,.ghrPdfReader,.ghrPdfReader header,.ghrPdfTools,
 .ac-main,.ac-form,.ac-log-list) {
  background-color:var(--ghr-pane); color:var(--ghr-text); border-color:var(--ghr-line);
}
:root[data-ghr-appearance] .row.out .bubble { background:var(--ghr-outgoing); }
:root[data-ghr-appearance] :is(.conv.active,.conv:hover,.result:hover,.xcoreProfileMenu button:hover,.xcoreSettingsNav button.active) {
  background-color:var(--ghr-selected); color:var(--ghr-text);
}
:root[data-ghr-appearance] :is(.search,.head,.brand,.conv,.result,.profile,.composer,.ghrShortcutRow,.ghrPermissionSearch) {
  border-color:var(--ghr-line);
}
:root[data-ghr-appearance] :is(.composer textarea,.search input,.ghrPermissionSearch,.ghrShortcutRow select,
 .xcoreSettingsContent input:not([type=checkbox]),.xcoreSettingsContent select,.xcoreSettingsContent textarea,
 .ghrPdfReader input,.ghrPdfReader button,.ghrPdfReader a,.ghrPdfThumbButton,.cv3-launch,.rcCTrigger,
 .edit,.waAccount,.cv3-workspace button,.cv3-workspace input:not([type=checkbox]),.cv3-workspace select) {
  background:var(--ghr-surface); color:var(--ghr-text); border-color:var(--ghr-line);
}
:root[data-ghr-appearance] :is(.avatar,.headAvatar,.bigAvatar,.xcoreProfileAvatar,.xcore-restored-day,.xcore-restored-quote) {
  color:var(--ghr-text); background-color:var(--ghr-surface);
}
:root[data-ghr-appearance] :is(.ct small,.ct em,.result small,.result em,.headName small,.bubble footer,
 .xcoreProfileText small,.xcoreProfileMenuHead span,.details label,.modal p,.cv3-help) { color:var(--ghr-muted); }
:root[data-ghr-appearance] :is(.xcoreProfileMenuHead b,.xcoreProfileChevron,.messageText) { color:var(--ghr-text); }
:root[data-ghr-appearance] :is(.bubble,.xcoreSettingsContent,.cv3-workspace) a { color:var(--ghr-link); }
:root[data-ghr-appearance] :is(.bubble,.xcoreSettingsContent,.cv3-workspace) mark { background:#edca73;color:#202733; }
:root[data-ghr-appearance] .ghrWorkspaceSettings h3:not(:first-child) { margin-top:24px; }
:root[data-ghr-appearance] .ghrPdfPage,
:root[data-ghr-appearance] .ghrPdfReader canvas { background:#fff; }
