/* Original Wangye design tokens, retained verbatim. */
:root {
  /* Page widths follow the screen's shape. Lists fill the screen up to 21:9
     and centre beyond it (32:9); reading pages fill a 16:9 screen and centre on wider ones. A browser
     window is shorter than its screen (tabs, address bar), so a 16:9 screen gives a window of about 2:1
     and a 21:9 screen one of about 2.7:1. 236px is the sidebar and the main area's padding. */
  --page-max-wide: max(1200px, calc(270dvh - 236px));
  --page-max-reading: max(1100px, calc(200dvh - 236px));
  /* The phone shell (below lg): the top bar's height, which sticky headers inside pages sit below, and
     side gutters that keep clear of the notch in landscape. The desktop shell has no top bar. */
  --bar-h: 48px;
  --gutter-l: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));
  color-scheme: light;
  --bg: #e4ddd0;
  --bg-sunk: #d7cfbf;
  --bg-muted: #dcd3c4;
  --surface: #eee8de;
  --surface-2: #e9e2d6;
  --raised: #f4efe7;
  --sidebar: #dfd7c8;
  --daybar: #ded5c6;
  --field: #dcd3c4;
  --ink: #16130e;
  --ink-2: #2c261c;
  --ink-3: #62584a;
  --ink-4: #695f50;
  --line: #c5bba8;
  --line-strong: #aaa08e;
  --line-soft: #d2c8b6;
  --accent: #8e4c5c;
  --accent-ink: #7d434e;
  --accent-soft: rgba(173, 101, 112, 0.11);
  --accent-softer: rgba(173, 101, 112, 0.06);
  --accent-contrast: #fff5ef;
  --note: #7d434e;
  --hot: #9c453c;
  --hot-soft: rgba(156, 69, 60, 0.1);
  --amber: #77572a;
  --amber-ink: #6d4d22;
  --amber-soft: rgba(119, 87, 42, 0.11);
  --ok: #52604a;
  --ok-soft: rgba(82, 96, 74, 0.11);
  --ok-ink: #405039;
  --rank-1: #9c453c;
  --rank-2: #77572a;
  --rank-3: #695f50;
  --rank-rest: #695f50;
  --shadow-card: none;
  --shadow-card-hover: 0 1px 4px rgba(22, 19, 14, 0.04);
  --shadow-soft: 0 3px 10px rgba(22, 19, 14, 0.05);
  --shadow-thumb: 0 1px 2px rgba(22, 19, 14, 0.07);
  --shadow-pop: 0 10px 28px rgba(22, 19, 14, 0.1);
  --prose-ink: #2c261c;
  --code-bg: #ddd4c5;
  --code-keyword: #7d434e;
  --code-string: #435839;
  --code-number: #77572a;
  --code-title: #72586b;
  --code-variable: #804a34;
  --code-meta: #7d434e;
  --brand-pink: #e3a9ae;
  --brand-spectrum: linear-gradient(90deg, #ef7a4a, #f2a93d, #7fbf6b, #58b6c9, #5b8fd6, #8e7bd0, #e59abf);
  --selection: rgba(227, 169, 174, 0.36);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #16130e;
  --bg-sunk: #1c1710;
  --bg-muted: #2b231a;
  --surface: #211c15;
  --surface-2: #292219;
  --raised: #32291f;
  --sidebar: #19150f;
  --daybar: #241e16;
  --field: rgba(228, 221, 208, 0.07);
  --ink: #e4ddd0;
  --ink-2: #d7cfbf;
  --ink-3: #bcb19e;
  --ink-4: #aaa08e;
  --line: rgba(228, 221, 208, 0.14);
  --line-strong: rgba(228, 221, 208, 0.24);
  --line-soft: rgba(228, 221, 208, 0.09);
  --accent: #e3a9ae;
  --accent-ink: #efbdc1;
  --accent-soft: rgba(227, 169, 174, 0.13);
  --accent-softer: rgba(227, 169, 174, 0.07);
  --accent-contrast: #16130e;
  --note: #efbdc1;
  --hot: #e0a090;
  --hot-soft: rgba(224, 160, 144, 0.12);
  --amber: #d4b77e;
  --amber-ink: #e7c88c;
  --amber-soft: rgba(212, 183, 126, 0.12);
  --ok: #a7bd94;
  --ok-soft: rgba(167, 189, 148, 0.12);
  --ok-ink: #c6d5b5;
  --rank-1: #e0a090;
  --rank-2: #d4b77e;
  --rank-3: #c0b59f;
  --rank-rest: #aaa08e;
  --shadow-card: none;
  --shadow-card-hover: none;
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.2);
  --shadow-thumb: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-pop: 0 12px 28px rgba(0, 0, 0, 0.25);
  --prose-ink: #d7cfbf;
  --code-bg: #1c1710;
  --code-keyword: #efbdc1;
  --code-string: #b4c69e;
  --code-number: #d4b77e;
  --code-title: #c8b4c5;
  --code-variable: #d5aa91;
  --code-meta: #e3a9ae;
  --selection: rgba(227, 169, 174, 0.24);
}
