/* The lantern tokens: one set of colours, type and fonts for the game and the
   public site. The app imports this file into ew.css (under .ew and
   [data-theme]); the server inlines it at the top of /site.css (.night, .day).
   Night is ink and moonlight, day is warm parchment. No red anywhere.
   The fonts are the self-hosted Fraunces and Inter (SIL OFL) in
   /share-fonts, variable weights, so no third-party font request. */
@font-face { font-family: Fraunces; src: url(/share-fonts/fraunces.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: Fraunces; src: url(/share-fonts/fraunces-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: Inter; src: url(/share-fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
/* Local fallbacks sized to the real fonts' widths and heights, so the swap does
   not move text (measured from the woff2 files against Arial, and against Georgia at headline sizes) */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"); font-weight: 100 500; size-adjust: 107.11%; ascent-override: 90.56%; descent-override: 22.41%; line-gap-override: 0%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Liberation Sans Bold"); font-weight: 600 900; size-adjust: 102.2%; ascent-override: 94.91%; descent-override: 23.48%; line-gap-override: 0%; }
@font-face { font-family: "Fraunces Fallback"; src: local("Georgia"); font-weight: 100 500; size-adjust: 91%; ascent-override: 107.7%; descent-override: 28.6%; line-gap-override: 0%; }
@font-face { font-family: "Fraunces Fallback"; src: local("Georgia Bold"), local("Georgia-Bold"); font-weight: 600 900; size-adjust: 91%; ascent-override: 107.7%; descent-override: 28.6%; line-gap-override: 0%; }

:root,
.ew {
  --font-ui: Inter, "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-story: Fraunces, "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --r-sm: 0.625rem;
  --r-md: 1rem;
  --r-lg: 1.375rem;
  --ease: cubic-bezier(0.22, 0.7, 0.18, 1);
  --amber: #f2c27a;
  --moonlight: #fbf3e4;
  --ground: #08060f;
}

.night,
.ew,
.ew[data-theme="night"] {
  --bg: #120d1f;
  --bg-deep: #0b0815;
  --surface: #1d1630;
  --surface-2: #261d3e;
  --line: #3a2f57;
  --line-strong: #7d6ca8; /* 3:1 on every night surface: outlines, radio rings, switch borders */
  --ink: #f4efff;
  --muted: #c9bee6;
  --accent: #b57bff;
  --on-accent: #150e24;
  --sel: #2e2150;
  /* Timed buttons: the drained part, and the full part of a pressed one. The
     label holds 4.5:1 on both parts: --on-accent 6.46 on --accent, 4.90 on
     --lock-drain; --ink 9.00 on --lock-pressed, 12.86 on --sel */
  --lock-drain: #9373c4;
  --lock-pressed: #4a3578;
  --glow: rgba(181, 123, 255, 0.5);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}
.day,
.ew[data-theme="day"] {
  --bg: #fbf6ee;
  --bg-deep: #efe6d6;
  --surface: #fffcf6;
  --surface-2: #f4ecdf;
  --line: #e3d9c8;
  --line-strong: #8f7c5a; /* 3:1 on every day surface */
  --ink: #1c1529;
  --muted: #574e6c;
  --accent: #8b2ff0;
  --on-accent: #fffbf5;
  --sel: #f1e7fe;
  /* --on-accent 5.41 on --accent, 7.29 on --lock-drain; --ink 10.08 on --lock-pressed, 14.81 on --sel */
  --lock-drain: #5e4a85;
  --lock-pressed: #d2b8fa;
  --glow: transparent;
  --shadow: 0 1px 2px rgba(60, 40, 20, 0.06), 0 8px 24px rgba(60, 40, 20, 0.07);
  color-scheme: light;
}
