/* tokens on :root, the page, the HUD layer (index.html links the css/ files in cascade order: a later file wins a tie) */
/* fonts: bundled (assets/fonts, SIL OFL: the licences beside them), so every machine draws the same text and the layout check (tools/layout.js)
   measures the same boxes everywhere. EB Garamond (the headings and every label: --ui-head) as Fontsource serves it, latin and latin-ext at 400/500/600. Georgia is Windows' own and may not be shipped: the system's is used where it
   is installed (local()), else Gelasio, drawn to Georgia's metrics, so a line is as wide either way; the overrides are Georgia's own heights (its hhea), so a line is as tall too. */
@font-face{font-family:'EB Garamond';font-style:normal;font-weight:400;font-display:block;src:url(../assets/fonts/eb-garamond-latin-400.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'EB Garamond';font-style:normal;font-weight:400;font-display:block;src:url(../assets/fonts/eb-garamond-latin-ext-400.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'EB Garamond';font-style:normal;font-weight:500;font-display:block;src:url(../assets/fonts/eb-garamond-latin-500.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'EB Garamond';font-style:normal;font-weight:500;font-display:block;src:url(../assets/fonts/eb-garamond-latin-ext-500.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'EB Garamond';font-style:normal;font-weight:600;font-display:block;src:url(../assets/fonts/eb-garamond-latin-600.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'EB Garamond';font-style:normal;font-weight:600;font-display:block;src:url(../assets/fonts/eb-garamond-latin-ext-600.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Georgia;font-style:normal;font-weight:400;font-display:block;ascent-override:91.7%;descent-override:21.92%;line-gap-override:0%;src:local('Georgia'),local('Georgia-Regular'),url(../assets/fonts/gelasio-latin.woff2) format('woff2')}
@font-face{font-family:Georgia;font-style:normal;font-weight:700;font-display:block;ascent-override:91.7%;descent-override:21.92%;line-gap-override:0%;src:local('Georgia Bold'),local('Georgia-Bold'),url(../assets/fonts/gelasio-latin.woff2) format('woff2')}
@font-face{font-family:Georgia;font-style:italic;font-weight:400;font-display:block;ascent-override:91.7%;descent-override:21.92%;line-gap-override:0%;src:local('Georgia Italic'),local('Georgia-Italic'),url(../assets/fonts/gelasio-italic-latin.woff2) format('woff2')}
@font-face{font-family:Georgia;font-style:italic;font-weight:700;font-display:block;ascent-override:91.7%;descent-override:21.92%;line-gap-override:0%;src:local('Georgia Bold Italic'),local('Georgia-BoldItalic'),url(../assets/fonts/gelasio-italic-latin.woff2) format('woff2')}
/* end fonts */
/* --up1080: 0 on the home 1920x900, 1 at 1080 (and taller), between them in step: a screen that should fill more of a 1080 window grows by it (zoom: calc(1 + var(--up1080) * .12)), keeping its 900 look (Ole, #558) */
/* the Carved look (#1363): --ui-head the face of every heading and label, --ui-body the prose; --ui-accent (bone) the chrome's one accent, gold kept for gold, luck, rarity and the gold ring;
   --ui-sel-bg / --ui-sel-fg the one selection look: a solid dark brown block with near-white text, square corners, no glow (the game-ui skill); --ui-sel-line its border on what is outlined at rest too (a button, a plaque);
   --ui-panel / --ui-panel-line a panel over the scene (the Leaderboard, the Changelog, the Controls): nearly black, its edge faint */
:root{--up1080:max(0,calc((var(--tall) - .8334) * 6));--ui-head:'EB Garamond',Georgia,serif;--ui-body:Georgia,serif;--ui-accent:#ddd5c3;--ui-sel-bg:#2a200e;--ui-sel-fg:#fff8e8;--ui-sel-line:#8a7c5e;--ui-panel:rgba(5,5,7,.76);--ui-panel-line:rgba(207,199,173,.12);--hx:0;--focus-lift:-8px;--vh:1vh;--vw:1vw;--tall:1;--short:clamp(0px,calc(1080px - 100*var(--vh)),180px)} /* --focus-lift: how far a focused card, scroll or plate rises, one amount everywhere (translateY(var(--focus-lift)), never a scale on text: it softens; map nodes scale, the Shop lifts only the picture); viewport units for the UI: fitUI (core.js) sets them to the window's 1% divided by the UI zoom, so write calc(N*var(--vh)), never a bare vh or vw; --short is how far the window is under 1080 tall in those units (0 at 1080 and up, 180px at the home 900): a gap written calc(Npx - var(--short) / K) closes up only on a short window, so 1080 keeps its look; --tall (fitUI) is the UI's height over 1080, at most 1, for a zoom */
html,body{margin:0;height:100%;overflow:hidden;background:#000;font-family:var(--ui-head);font-weight:500;color:#d8d2c0;user-select:none}
canvas{display:block}
#hud{position:fixed;inset:0;pointer-events:none;opacity:0;transition:opacity .8s}
#hud.on{opacity:1}#hud.on.cine{opacity:0}
/* the LOADING cover (loadcover.js): up from the first paint (.boot: opaque, before any script), and over a Graphics preset first applied (the scene left undimmed, Ole: he compares presets by it; the word shadowed to read over it); shown at once, lifted in a fade */
#loadCover{position:fixed;inset:0;z-index:950;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:30px;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .35s,visibility 0s .35s}
#loadCover.on{opacity:1;visibility:visible;transition:none}#loadCover.boot{background:#000}
/* a slow step after a press (loadingRun): .dark, a long one, the screen fading to the boot's black under the word; .spin, a short one, the ring alone at once */
#loadCover.dark{background:#000}#loadCover.on.dark{transition:background-color .25s ease-out}#loadCover.spin .lcWord{display:none}#loadCover.spin .lcRing{background:rgba(0,0,0,.55);box-shadow:0 0 0 14px rgba(0,0,0,.55),0 0 34px 22px rgba(0,0,0,.45)}
#loadCover .lcRing{width:54px;height:54px;box-sizing:border-box;border-radius:50%;border:2px solid rgba(208,201,182,.16);border-top-color:#ddd5c3;animation:lcSpin 1.1s linear infinite}
#loadCover .lcWord{display:flex;align-items:center;gap:22px;font-size:38px;letter-spacing:.02em;color:#d0c9b6;text-shadow:0 0 12px #000,0 0 4px #000;animation:lcPulse 1.8s ease-in-out infinite}
#loadCover .lcWord:before,#loadCover .lcWord:after{content:'';width:120px;height:1px;background:linear-gradient(90deg,transparent,#d0c9b6)}#loadCover .lcWord:after{transform:scaleX(-1)}
/* a page that cannot start (boot-check.js): its line stands still, the ring gone, the line smaller as it is long */
#loadCover.fail .lcRing{display:none}#loadCover.fail .lcWord{animation:none;font-size:26px;max-width:90vw;text-align:center}
@keyframes lcSpin{to{transform:rotate(360deg)}}
@keyframes lcPulse{50%{opacity:.55}}
