/* Light, neutral and dark. The fixed colours on each page are in
   theme-colours.css; these are Home's named colours and the switch. */

:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

:root[data-theme="neutral"] {
  --bg: #3A3F44;
  --surface: #444A50;
  --surface-elevated: #59616A;
  --surface-soft: #4B5157;
  --assistant-bg: #4E555C;
  --assistant-border: rgba(235, 240, 244, 0.18);
  --assistant-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  --border: #6E767E;
  --text: #F7F9FA;
  --text-muted: #CBD2D8;
  --accent: #A5DDF7;
  --accent-hover: #C3E8FA;
  --accent-glow: rgba(165, 221, 247, 0.16);
  --user-bg: #4A6D8E;
  --user-text: #F7FAFA;
}

:root[data-theme="light"] {
  --bg: #EEF1F4;
  --surface: #FFFFFF;
  --surface-elevated: #E9EDF1;
  --surface-soft: #F4F6F8;
  --assistant-bg: #F6F8FA;
  --assistant-border: rgba(30, 36, 41, 0.12);
  --assistant-shadow: 0 10px 28px rgba(30, 36, 41, 0.08);
  --border: #C9D1D8;
  --text: #1E2429;
  --text-muted: #5E6A74;
  --accent: #2C6EA3;
  --accent-hover: #245C8A;
  --accent-glow: rgba(44, 110, 163, 0.12);
  --user-bg: #385572;
  --user-text: #FFFFFF;
}

#account-bar {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; z-index: 20;
  display: flex; align-items: center; gap: 8px;
}
#account-bar #account-chip { position: static; }
#app.chat-mode #account-bar { display: none; }

.pc-theme-switch {
  display: inline-flex; padding: 2px; gap: 2px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
}
.pc-theme-switch button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 26px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-muted); cursor: pointer;
}
.pc-theme-switch button:hover { color: var(--text); }
.pc-theme-switch button.on { background: var(--surface-elevated); color: var(--text); }
.pc-theme-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
