/* Design tokens: structure only — palette, type, cursors, stacking layers, static rendering values.
   Motion is not here: every duration, easing curve, steps() and keyframe amplitude is a setting of config/game
   (group MOTION, edited in the balancer) and is set on :root at boot by src/core/motion.js as --t-*, --ease-*,
   --steps-*, --kf-* (MOTION.t.hoverSlow → --t-hover-slow). tools/check_tunables.py fails on a time value,
   cubic-bezier(), steps() or keyframe value in any stylesheet, this one included. */
:root {
  /* palette (design/art/style-guide.md) */
  --parchment: #FBF6EC;
  --card: #F7F0E4;
  --card-parchment: #F4D6AC;  /* the parchment of ui/card-frame.webp, under its 9-slice joins (home.css .kincard) */
  --line: #C0A98A;
  --gold: #AB8248;
  --gold-dark: #957A59;
  --gold-light: #E0BD7B;
  --text: #4A3A2C;
  --glow: #F7B44F;
  --sky-top: #0f1633;
  --sky-mid: #1f2a55;
  --sky-low: #3a3f6e;
  --glass-line: rgba(224, 189, 123, .22);
  /* kin looks (dev/collection, the album): rim light of a silhouette per affinity, the purified-by-light glow */
  --affinity-earth: #D9B98A;
  --affinity-fire: #FFA466;
  --affinity-plant: #A8DA8E;
  --affinity-air: #B6D3FF;
  --affinity-night: #B7A8FF;
  --purified: #FFE8A6;
  /* the carved sign (D135, variant A; design/ui/sketches/a-wood): wood, the planed field, brass, and the inks that keep
     4.5:1 on them (measured in design/ui/sketches/contrast.txt) */
  --wood-dark: #5E3417;
  --wood: #8A5528;
  --wood-light: #A86B35;
  --field: #F3E2BE;           /* planed ash: the text field of a sign */
  --field-2: #E9D2A2;
  --groove: rgba(110, 66, 28, .38);
  --carve: #6B4318;           /* small labels and quiet buttons on the field (5.6:1) */
  --build-now: #8A5A1E;                  /* the stage now and the stage's game on the restoration sign (with a sign and a line, never colour alone) */
  --ink: #3B2A1C;             /* text on the field and on parchment */
  --ink-2: #5C4430;           /* secondary text */
  --ink-title: #46280F;       /* carved titles */
  --brass-hi: #F6DDA4;        /* the primary button: light brass, dark text (≈9:1) */
  --brass: #DDAE62;
  --brass-lo: #A47A3C;
  --brass-ink: #2E1E0E;
  /* the corner plates' brass (index.html #brass-g) on the rim of a sign's close button, and its planed face */
  --plate-hi: #FBE6B2;
  --plate: #D9A85A;
  --plate-lo: #8E6328;
  --face-hi: #FFF8E6;
  --face-lo: #E4C994;
  --leaf-ink: #4E5A22;        /* affinity and rarity words on parchment */
  --earth-ink: #6E4E2A;
  --fire-ink: #8A3412;
  --night-ink: #3E4874;
  /* the splash (styles/boot.css): the app's kin's rim, shadow and contact shadow; the star dust around it and its glow */
  --boot-rim: rgba(251, 230, 178, .35);
  --boot-shadow: rgba(4, 6, 20, .55);
  --boot-contact: rgba(4, 6, 20, .5);
  --boot-dust: rgba(255, 236, 196, .9);
  --boot-dust-glow: rgba(255, 214, 150, .35);
  /* the full moon's steady halo (styles/moon.css): moonlight a little warmer than the silver of the waxing cup */
  --moon-full-core: rgba(255, 240, 214, .5);
  --moon-full-mid: rgba(255, 228, 196, .3);
  --moon-full-low: rgba(250, 220, 190, .1);
  --moon-full-edge: rgba(248, 216, 186, 0);
  --rare-ink: #33507F;
  --epic-ink: #5E4388;
  /* the tiers of a kin's stars (D168, home.css .kc-rank): gold is the brass gradient (index.html #brass-g) */
  --tier-gold-ink: #6E4A1C;
  --tier-silver: #C2CCDF;      /* moon silver: a cool light grey, lighter than gold */
  --tier-silver-ink: #4A5774;
  --tier-silver-glint: #FFFFFF;
  --tier-violet: #8F6CCB;      /* violet: darker than gold, so the three differ in greys too */
  --tier-violet-ink: #3F2870;
  --tier-violet-facet: #EDE3FF;
  --focus-ring: #2E1E0E;      /* focus on a sign: dark ring, light halo */
  --focus-halo: rgba(251, 246, 236, .92);
  /* the pictograms' second colour (D140, styles/icons.css): a surface sets --ek-icon-accent to one of these */
  --ek-icon-accent-parchment: #A0621A;   /* on the planed field and parchment: ≥3:1 to --field */
  --ek-icon-accent-night: var(--glow);   /* on the night sky and on dark planks */
  --ek-icon-accent-bronze: #7A3E0A;      /* inside a light brass medallion */
  --ek-icon-accent: var(--ek-icon-accent-parchment);

  /* typography (D92): Philosopher for titles and names, Nunito for interface text and numbers */
  --font-display: 'Philosopher', Georgia, serif;
  --font-ui: 'Nunito', system-ui, sans-serif;

  /* island light (D72): 1 full · .66 dim · .33 ember · 0 out, set from state by island.js */
  --light: 1;
  /* our island is drawn this much shorter than it is rastered (island.css .world): while it floats by fractions of a
     pixel its rows sample the raster at every phase at once, so the tower never pulses crisp/soft as a whole */
  --float-sample-y: .99;
  /* the map camera: --t-camera is set from MAP.cameraMs by map.js; every other --t-*, --ease-*, --steps-*,
     --kf-* comes from config/game MOTION (src/core/motion.js) */

  /* hand-drawn cursors (design/art/batch-cursor.md); every clickable element uses --cursor-hover */
  --cursor: -webkit-image-set(url(../assets/ui/cursor.png) 1x, url(../assets/ui/cursor@2x.png) 2x) 10 10, auto;
  --cursor-hover: -webkit-image-set(url(../assets/ui/cursor-hover.png) 1x, url(../assets/ui/cursor-hover@2x.png) 2x) 10 10, pointer;
  --cursor-grab: -webkit-image-set(url(../assets/ui/cursor-grab.png) 1x, url(../assets/ui/cursor-grab@2x.png) 2x) 20 20, grab;
  --cursor-grabbing: -webkit-image-set(url(../assets/ui/cursor-grabbing.png) 1x, url(../assets/ui/cursor-grabbing@2x.png) 2x) 20 20, grabbing;

  /* Stacking layers of the island view, bottom to top. Inside the sky, far islands, island craft and the
     cloud band stack by depth (sky.js depthZ), not by tokens. */
  --z-sky: 0;
  --z-map: 4;
  --z-world: 5;               /* our island: above the map, also while the camera flies */
  --z-traffic-front: 6;
  --z-hud: 7;
  --z-moon: 8;
  --z-rooms: 9;
  --z-settings: 10;           /* the Settings drawer under the gear (ui/settings.js) */
  --z-sheet: 11;
  --z-acct: 12;               /* the account sheet and the guest's reminder under the avatar (ui/account.js) */
  --z-guard: 13;              /* the guard's sign of the watch post (ui/guard.js) and the restoration sign (ui/build.js); a lore sign covers them */
  --z-cup-flow: 14;           /* the record ritual's motes from the moon to the avatar, over the account sheet (ui/moon.js) */
  --z-game: 15;               /* the screen of a mini-game (scenes/games/screen.js): over the island's signs; a lore sign covers it */
  --z-lore: 20;               /* a lore sign over the game (ui/lore.js); «no connection» covers it */
  --z-net: 30;                /* «connecting» / «no connection» over the whole game (ui/connection.js); tips and errors stay above */
  --z-realm-gate: 40;         /* a closed world's code card and «update the game» (ui/realm.js): over «no connection» */
  --z-tip: 1000;
  --z-error: 1100;            /* the error boundary's calm message: above everything, the tooltip included */
  --z-boot: 1050;             /* the splash until the first screen is ready (core/boot.js): over the game; errors stay above */
  /* inside the map layer */
  --z-map-fly: 150;
  --z-place-hover: 500;
  --z-craft-far: 600;
  color-scheme: dark;
}
