/* bryce.today — shared theme definitions.
   THE single source of truth for the two visitor settings and the webfonts.
   Loaded by the homepage, /game/ and /forum/ alike, BEFORE each app's own
   stylesheet, so a setting can never mean one thing on one app and something
   else on another. Anything that varies per visitor belongs in this file.

   Settings live in localStorage and are applied to <html> before first paint
   (see /game/prepaint.js, which the forum reuses):
     cover ∈ oxblood | forest | midnight | jet   → html.cover-<name>
     desk  ∈ walnut | oak | mahogany | ebony     → html.desk-<name>
*/

/* ---- type ---------------------------------------------------------------- */
/* Self-hosted: Android ships none of the serifs a system stack would ask for,
   so without these the whole identity degrades to a generic serif there. */
@font-face {
  font-family: 'Cinzel';
  src: url('/fonts/cinzel.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/garamond.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: 'EB Garamond';
  src: url('/fonts/garamond-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---- the cover ----------------------------------------------------------- */
/* Each is a leather colour plus the darker tone its edges take. */
:root, html.cover-oxblood  { --leather: #5c2124; --leather-dark: #3a1315; }
html.cover-forest          { --leather: #22392c; --leather-dark: #14231a; }
html.cover-midnight        { --leather: #1e2a44; --leather-dark: #121a2b; }
html.cover-jet             { --leather: #241f1c; --leather-dark: #14110f; }

/* ---- the desk ------------------------------------------------------------ */
/* Tiling SVGs; --desk-base is the measured mean of each tile, so a slow or
   failed load never flashes a colour the texture doesn't actually have. */
:root, html.desk-walnut { --desk-base: #493628; --desk: url("/desk-walnut.svg?v=1"); }
html.desk-oak           { --desk-base: #5c4326; --desk: url("/desk-oak.svg?v=1"); }
html.desk-mahogany      { --desk-base: #4d2c23; --desk: url("/desk-mahogany.svg?v=1"); }
html.desk-ebony         { --desk-base: #2a2725; --desk: url("/desk-ebony.svg?v=1"); }
