/* Shared visual roles. Both Telegram appearance and browser appearance use these. */
:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #171b22;
  --muted: #596572;
  --accent: #245b8c;
  --accent-soft: #e8eff6;
  --red: #b13c3e;
  --green: #28734b;
  --line: #e4e8ed;
  --control-bg: #e9edf1;
  --selected-bg: #ffffff;
  --balance-bg: #193552;
  --balance-ink: #ffffff;
  --balance-muted: #c2d5e8;
  --preview-bg: #e8eff6;
  --radius-card: 17px;
  --radius-control: 11px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 20px;
  --text-caption: 0.8125rem;
  --text-body: 1rem;
  --text-section: 0.875rem;
  --control-height: 44px;
  --radius-sheet: 23px;
  --radius-button-primary: 13px;
  --radius-button-secondary: 12px;
  --sheet-footer-space: 30px;
  --safe-bottom: max(
    env(safe-area-inset-bottom, 0px),
    var(--tg-content-bottom, 0px)
  );
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11171e;
  --surface: #1d2630;
  --ink: #eff2f5;
  --muted: #b1bdc9;
  --accent: #91c8ff;
  --accent-soft: #293e52;
  --red: #ffaaaa;
  --green: #8cd6aa;
  --line: #34404b;
  --control-bg: #28333d;
  --selected-bg: #3a4652;
  --balance-bg: #204363;
  --preview-bg: #293e52;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #11171e;
    --surface: #1d2630;
    --ink: #eff2f5;
    --muted: #b1bdc9;
    --accent: #91c8ff;
    --accent-soft: #293e52;
    --red: #ffaaaa;
    --green: #8cd6aa;
    --line: #34404b;
    --control-bg: #28333d;
    --selected-bg: #3a4652;
    --balance-bg: #204363;
    --preview-bg: #293e52;
  }
}
:root {
  --on-accent: #ffffff;
  --on-dark: #ffffff;
  --tone-blue-bg: #e6eef9;
  --tone-blue-ink: #3c6ea4;
  --tone-green-bg: #e4f3ea;
  --tone-green-ink: #28734b;
  --tone-yellow-bg: #fff2d7;
  --tone-yellow-ink: #845711;
  --tone-purple-bg: #f0eaf8;
  --tone-purple-ink: #775394;
  --tone-red-bg: #fae9e8;
  --tone-red-ink: #a33d40;
}
:root[data-theme="dark"] {
  --on-accent: #102033;
  --tone-blue-bg: #223e56;
  --tone-blue-ink: #a1d1ff;
  --tone-green-bg: #213e32;
  --tone-green-ink: #8cd6aa;
  --tone-yellow-bg: #493a20;
  --tone-yellow-ink: #efd093;
  --tone-purple-bg: #3c304d;
  --tone-purple-ink: #d4b6f1;
  --tone-red-bg: #4a2c31;
  --tone-red-ink: #ffaaaa;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --on-accent: #102033;
    --tone-blue-bg: #223e56;
    --tone-blue-ink: #a1d1ff;
    --tone-green-bg: #213e32;
    --tone-green-ink: #8cd6aa;
    --tone-yellow-bg: #493a20;
    --tone-yellow-ink: #efd093;
    --tone-purple-bg: #3c304d;
    --tone-purple-ink: #d4b6f1;
    --tone-red-bg: #4a2c31;
    --tone-red-ink: #ffaaaa;
  }
}
