/* ==========================================================
   TOKENS — the one place colours, paper size and timings are declared
   Every other stylesheet reads from these. Change the book's palette here.
   ========================================================== */

:root{
  --desk-dark:#100905;
  --desk:#2c1c0e;
  --leather:#2e1f16;
  --leather-edge:#4a3320;
  --paper:#e9dcbd;
  --paper-deep:#d9c79f;
  --ink:#2b2116;
  --ink-faint:#5d4c35;
  --brass:#9c7c3c;
  --rubric:#7a2f1d; /* oxblood red used in medieval rubrication */
  /* the candle's fire. Desk furniture, never used on a page — the book's
     own palette above stops at brass. --flame-core is a pale gold rather
     than white: nothing here is pure white, not even a flame's hottest part. */
  --flame-core:#ffe6a8;
  --flame:#ff9c33;
  --flame-deep:#c9541a;
  --page-w: min(46vw, calc((100vh - 96px) / 1.32), 1200px);
  --page-w: min(46vw, calc((100dvh - 96px) / 1.32), 1200px);
  --page-h: calc(var(--page-w) * 1.32);
  --turn-ms: 900ms;
}

/* Fullscreen (js/fullscreen.js) hides the title, so the 96px it reserves
   above the book — headroom for that title — is dead space; reclaimed here
   down to a token 24px so the book grows into it. The 1200px hard cap is
   raised too: fullscreen is a deliberate "give the book the whole screen"
   request, not a normal window a reader might also be reading email in. */
body.fs-mode{
  --page-w: min(46vw, calc((100dvh - 24px) / 1.32), 1600px);
}
