/* Dark mode: the night tokens (style.css keeps the day ones and every rule).
   base.html loads this file always for "dark", never for "light", and
   with media="(prefers-color-scheme: dark)" for "system", so there is one
   copy of the night palette and the page is right from its first frame
   (no script: the CSP allows none before the page ends). Loaded after the
   page's own stylesheet, so its rules win at equal specificity. */

:root {
  color-scheme: dark;
  --bg: #1f1a2b;
  --paper: #2a2438;
  --paper-2: #3a3160;
  --ink: #efe6d8;
  --ink-2: #cfc4dc;
  --muted: #b9aec9;
  --accent: #b7a3e3;
  --accent-hover: #c9b8ea;
  --on-accent: #1f1a2b;
  --lilac: #5a4a80;
  --lilac-bar: #8e7bc2;        /* 3.2:1 on --paper-2 */
  --gray: #8f8699;             /* 3.4:1 on --paper-2 */
  --glass: rgba(255, 255, 255, 0.12);
  --ok: #9cc4a0;
  --bad: #e7a1a1;
  --line: rgba(201, 184, 234, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 16px rgba(201, 184, 234, 0.12);
  --shadow-lg: 0 8px 32px rgba(201, 184, 234, 0.16);
  --sky-top: #2b2547;
  --sky-mid: #3a3160;
  --sky-low: #2a2438;
  --sky-end: #1f1a2b;
  /* A dim moon: text crossing it still reads at 4.6:1. */
  --sun-core: #6a6090;
  --sun: #564c7c;
  --cloud: rgba(201, 184, 234, 0.22);
  --hill-far: #5a4a80;
  --hill-mid: #3f5a47;
  --hill-near: #33493b;
  /* Positions inside the stars' strip (.deco::before: the top 14% of the
     sky, clear of the avatar's corner; M9), so no star lands on a word. */
  --stars: radial-gradient(1.5px 1.5px at 4% 55%, #fbf5e6 60%, transparent 70%),
    radial-gradient(1px 1px at 19% 25%, #fbf5e6 60%, transparent 70%),
    radial-gradient(1.5px 1.5px at 33% 70%, #fbf5e6 60%, transparent 70%),
    radial-gradient(1px 1px at 48% 35%, #fbf5e6 60%, transparent 70%),
    radial-gradient(1.5px 1.5px at 63% 20%, #fbf5e6 60%, transparent 70%),
    radial-gradient(1px 1px at 79% 65%, #fbf5e6 60%, transparent 70%),
    radial-gradient(1.5px 1.5px at 95% 30%, #fbf5e6 60%, transparent 70%);
}

/* In the dark, a light green over violet paper mixes to grey; the dark
   meadow hill itself, half and half with the paper, stays green. */
.wins-card { background: color-mix(in srgb, var(--hill-mid) 55%, var(--paper)); }
