@layer tokens {

  :root {
    --bg: #f2eee6;
    --panel: #fffdf8;
    --card: #fffdf8;
    --row: #faf7f0;
    --row2: #f4f0e7;
    --bar: #f6f2ea;
    --hgrad1: #fffdf8;
    --hgrad2: #f2ede2;
    --text: #10182b;
    --muted: #5d6678;
    --wd-accent: #ef5a23;
    --wd-accent-ink: #b8401a;
    --cool: #2f6fd0;
    --gold: #8a5f00;
    --hot: #dc2626;
    --ok: #0e7a48;
    --money: #0c7a4e;
    --line: #e6dfd0;
    --shadow: 0 2px 10px rgba(60, 50, 30, .07);
    --sh-float: 0 10px 28px rgba(0, 0, 0, .35);
    --sh-card: 0 6px 22px rgba(0, 0, 0, .28);
    --r-card: 14px;
    --r-ctl: 10px;
    --fs: 1;
    --wd-map-filter: none;
  }

  :root.comfy { --fs: 1.16; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #0e1320;
      --panel: #161d2e;
      --card: #161d2e;
      --row: #1b2438;
      --row2: #1f2940;
      --bar: #121a2b;
      --hgrad1: #161d2e;
      --hgrad2: #0e1320;

      --text: #eef2fa;
      --muted: #8a93a8;

      --wd-accent: #ff6b35;
      --wd-accent-ink: #ff6b35;
      --cool: #6ea8ff;
      --gold: #e0b34c;
      --hot: #ff6b6b;
      --ok: #2fd08a;
      --money: #2fd08a;

      --line: #23304a;
      --shadow: 0 2px 10px rgba(0, 0, 0, .3);
      --wd-map-filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9) saturate(.75);
    }
  }
  :root[data-theme="dark"] {
    --bg: #0e1320;
    --panel: #161d2e;
    --card: #161d2e;
    --row: #1b2438;
    --row2: #1f2940;
    --bar: #121a2b;
    --hgrad1: #161d2e;
    --hgrad2: #0e1320;

    --text: #eef2fa;
    --muted: #8a93a8;

    --wd-accent: #ff6b35;
    --wd-accent-ink: #ff6b35;
    --cool: #6ea8ff;
    --gold: #e0b34c;
    --hot: #ff6b6b;
    --ok: #2fd08a;
    --money: #2fd08a;

    --line: #23304a;
    --shadow: 0 2px 10px rgba(0, 0, 0, .3);
    --wd-map-filter: invert(1) hue-rotate(180deg) brightness(.95) contrast(.9) saturate(.75);
  }
}
