/* קימי: the games' shared palette (2026-10-21; README.md beside it). One place for the looks every game shares:
   the font, the sizes, the colours by their job, the corners, the shadows, the spacing, the motion and the layers.
   Change a value here and every game that uses it changes. Since 21.10 (Haim: "אחידות בגדלי הפונטים ובצבעים") one
   size scale for all the games, and one colour for each job in all of them (the titles, the strong green, the paper
   and the edge under a card); contrast as it was (Haim: not now). Since 23.10 (unify2) the near ones folded into one:
   five text colours where there were eleven, three edges where there were eight, six corners where there were
   seventeen, and one answer card in every game (its foot and its shadows below). Variables only, all "--k-". Linked once in the
   viewer (character/viewer_dressup/index.html), before the games' own css. A game's own drawing (the lab's machine,
   the bridge's planks) is named once at the head of its own css, with its prefix. Not for the 3D: three.js colours
   stay in the code. */
:root {
  /* ------------------------------------------------ the font */
  --k-font: 'Google Sans', Rubik, system-ui, sans-serif;   /* (Haim 27.10: "תחליף את הפונט בכל האפליקציה ל-Google Sans"; weights 400-700, a heavier ask shows at 700) */
  --k-font-display: var(--k-font);                 /* (titles) */
  --k-font-hand: 'Patrick Hand', var(--k-font);    /* (handwriting: a note, a postcard; the game links the font itself, the message's game.js, 26.10) */
  --k-w-regular: 600;                              /* (his words, the story's words: the lightest the games use) */
  --k-w-bold: 700;

  /* ------------------------------------------------ text sizes: five, for the whole app (29.10, Haim: "תקבע 5 גדלי
     פונטים אחידים לכל האפליקציה"; there were seven steps and twelve sizes of games' own). Every text is on one of
     them: t1 15 small print, a label; t2 18 a sentence, the story, his words; t3 22 an answer, the question, a button;
     t4 28 a big number, a big button; t5 40 a title, the biggest word. On a phone each a little smaller, by the
     screen's width, never under 15 (what a child reads on a phone). The old names stay, each one of the five, so
     every game's text is on them without a change of its own. (A word drawn on a thing that grows with the thing, the
     machine's screen, a riddle's tile, is sized by the thing, in the games' own css.) */
  --k-t1: 15px;
  --k-t2: clamp(16px, 4.4vw, 18px);
  --k-t3: clamp(18px, 5.2vw, 22px);
  --k-t4: clamp(22px, 6.6vw, 28px);
  --k-t5: clamp(28px, 9vw, 40px);


  /* ================================================ the colours (3.11, second pass): ramps. A warm neutral and five
     hues, each in steps: 100 a fill, 500 the colour itself, 700 its edge, its foot and its words on a fill. Every other
     colour name below points into these. Nothing glows: a thing that calls is ringed in gold, crisp. */
  --k-n-0: #ffffff;
  --k-n-50: #fffaf2;                               /* (paper: a card, a sheet) */
  --k-n-100: #f6ecdf;                              /* (a faded cell, a used one, the ground under a picture still loading) */
  --k-n-200: #eadbc8;                              /* (the line round a card, a sheet's foot) */
  --k-n-300: #d9c0a0;                              /* (a card's foot) */
  --k-n-500: #8a6a55;                              /* (quiet words: a link, a label, a ring still to come) */
  --k-n-700: #6b5242;                              /* (a sentence on a card, an icon) */
  --k-n-900: #3a2618;                              /* (the words) */
  --k-orange-100: #ffe3cc;
  --k-orange-500: #f6782b;                         /* (Kimmi's colour: the one thing to do now) */
  --k-orange-700: #c25415;                         /* (its foot; a title, 4.6:1 on paper) */
  --k-green-100: #d6f5dd;
  --k-green-500: #2fa84a;                          /* (right, done, go) */
  --k-green-700: #1f7a34;
  --k-red-100: #ffe1d9;
  --k-red-500: #e8573f;                            /* (wrong: never harsh, a warm red) */
  --k-red-700: #b23b27;
  --k-gold-100: #fff2c9;
  --k-gold-500: #ffc531;                           /* (what he reads, what calls, a star) */
  --k-gold-700: #d18f0c;
  --k-blue-100: #dfe9ff;
  --k-blue-300: #a9c2f6;
  --k-blue-500: #3f7cf0;                           /* (a letter's place in a spelled word: .k-slot, Haim 16.11) */
  --k-blue-700: #2754b8;
  --k-sky-100: #cfeefb;
  --k-sky-300: #9fd8f2;
  --k-wood-500: #7a4a2b;                           /* (a wooden sign) */
  --k-wood-700: #5a341d;
  --k-night: #1b1020;
  --k-shade-faint: #0000001a;
  --k-shade: #00000033;
  --k-shade-strong: #00000052;

  /* ------------------------------------------------ colours, by their job. The text: five, where there were eleven
     (unify2, 23.10: the near ones folded into one, each into the darker where they differed, so no contrast went down) */
  --k-ink: var(--k-n-900);                                /* (the games' text: words and numbers on a card, on wood and paper; it was three, #3a2a20, #3a2414, #4a2c18) */
  --k-ink-soft: var(--k-n-700);                           /* (a card's sentence, the start card's words) */
  --k-ink-muted: var(--k-n-500);                          /* (a link, the test chooser's labels, a button turned off: the music, 4.9:1 on its button where it was 2.9) */
  --k-paper: var(--k-n-0);                               /* (a card: white, Haim 27.11 "כרטיסים - לבנים"; was --k-n-50, a cream) */
  --k-paper-pure: var(--k-n-0);                            /* (his bubble) */
  --k-paper-glass: color-mix(in srgb, var(--k-n-0) 88%, transparent);
  /* (glass: a button or a bar over the world, the world blurred through it, Haim 9.11 "את כל הכפתורים וה-UI השקוף, תן אפקט זכוכית") */
  --k-glass: color-mix(in srgb, var(--k-n-0) 55%, transparent);
  --k-glass-blur: blur(14px) saturate(1.5);
  --k-glass-rim: inset 0 1px 0 color-mix(in srgb, var(--k-n-0) 85%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--k-n-0) 45%, transparent);   /* (an icon button over the world, the progress pill) */
  --k-paper-dim: var(--k-n-100);                          /* (a faded cell or tag, a used one; and the ground under a picture still loading) */
  /* (the beige edge under a thing: three, where there were eight, unify2 23.10) */
  --k-edge: var(--k-n-300);                               /* (the solid shadow under a card, a tile) */
  --k-edge-soft: var(--k-n-200);                          /* (under the question's card, the start and end cards, an icon button, a card standing in the world; the test chooser's edges) */
  --k-accent: var(--k-orange-500);                             /* (the main action: the big button) */
  --k-accent-edge: var(--k-orange-700);
  --k-title: var(--k-orange-700);                              /* (a title: in every game, the lab and the bridge too since 21.10) */
  --k-q-board: color-mix(in srgb, var(--k-paper-pure) 80%, transparent);   /* (the question's board: see-through, not a button, Haim 29.10) */
  --k-q-rim: color-mix(in srgb, var(--k-title) 75%, transparent);
  --k-sh-q-board: 0 6px 0 color-mix(in srgb, var(--k-n-300) 60%, transparent), 0 14px 28px var(--k-shade-faint);   /* (the question's see-through board) */
  --k-title-small: var(--k-orange-700);                        /* (orange text under 18 px on paper: --k-title gives 3.56:1 there, this 5.0:1; the UI check 26.10) */
  --k-good: var(--k-green-100);                               /* (a right answer) */
  --k-good-edge: var(--k-green-500);
  --k-good-strong: var(--k-green-500);                        /* (a strong green: a "go" button that opens, the escape's "פותחים!"; a lock wheel set right) */
  --k-good-strong-edge: var(--k-green-700);
  --k-bad: var(--k-red-100);                                /* (a wrong answer) */
  --k-slot-bg: #fff; --k-slot-edge: var(--k-blue-500); --k-slot-on: var(--k-blue-500); --k-slot-on-edge: var(--k-blue-700);   /* (a letter's place: components.css .k-slot) */
  --k-q-bg: var(--k-gold-500); --k-q-edge: var(--k-gold-700); --k-q-ink: var(--k-ink);   /* (the answer's place, the "?" box: components.css .k-q) */
  --k-gold: var(--k-gold-500);                               /* (what is being read, what to look at) */
  --k-teal: var(--k-green-500);                               /* (done, checked: the bridge's ok, the lab's found) */
  --k-teal-edge: var(--k-green-700);
  --k-sign: var(--k-wood-500);                               /* (a wooden sign: the bridge's measure, the balance's sum; a world's kit can give its own, --sign) */
  --k-sign-edge: var(--k-wood-700);
  /* (the progress: still to come, a ring; now, a ring with its middle lit; done, full. 3:1 at least on the pill, UI-6,
     23.10: they were filled #e9dccd, #ffd39b and #f6a04d, 1.35, 1.4 and 2.1 to 1) */
  --k-dot-now: var(--k-orange-100);                            /* (the middle of the one now; the lab's hundred chart's anchor too) */
  --k-star-edge: var(--k-gold-700);
  --k-coin: radial-gradient(circle at 35% 30%, var(--k-gold-100), var(--k-gold-500) 60%, var(--k-gold-700));   /* (from the gold ramp) */
  --k-sky: var(--k-sky-100);                                /* (the page behind the world) */
  --k-sky-top: var(--k-sky-300);                            /* (the sky's own blue, at its top: the lab's window) */
  --k-sky-plain: linear-gradient(180deg, var(--k-sky-300) 0%, var(--k-sky-100) 38%, var(--k-n-50) 70%, var(--k-n-100) 100%);   /* (a world without its kit) */
  --k-world: var(--k-green-500);                              /* (a world's own colour, when its kit gives none: --tray-c) */
  --k-night-80: color-mix(in srgb, var(--k-night) 80%, transparent);
  --k-night-40: color-mix(in srgb, var(--k-night) 40%, transparent);

  /* ------------------------------------------------ corners: six, where there were seventeen (unify2, 23.10: each
     job on the step nearest it, 2 px at most from what it was, but the question's picture, 16 to 20) */
  --k-r-surface: 14px;                             /* (Haim 27.11 "כרטיסים - ... פחות פינות עגולות": 14, was 24) (every surface: an answer card, the question's card, a panel, the story's page, a game's board, his bubble, a button) */
  --k-r-inner: 8px;                                /* (a thing inside a surface, a picture in a card, a map in its frame: the surface's corner less its padding, so the two curves run side by side) */
  --k-r-xs: 6px;                                   /* (a tiny corner: a progress dot, a cell of a chart or a table, a band, a strip's cell, a little label) */
  --k-r-s: 12px;                                   /* (a small one: a chip, a plank, a key) */
  --k-r-pill: 999px;
  --k-r-round: 50%;

  /* ------------------------------------------------ shadows: a game button's, a solid edge under it, no blur, and a soft drop */
  --k-sh-1: 0 var(--k-foot) 0 var(--k-n-300);   /* (a small thing: an icon button, a chip) */
  --k-sh-1-press: 0 1px 0 var(--k-n-300);   /* (pressed) */
  --k-sh-press: 0 2px 0 var(--k-n-300);   /* (a card pressed) */
  --k-sh-sheet: 0 var(--k-foot) 0 var(--k-n-200), 0 14px 28px var(--k-shade-faint);   /* (a big sheet: the question's card, the start and end cards, the story's page, a board: its line, a foot, a soft shadow on the ground) */
  --k-sh-bubble: 0 var(--k-foot) 0 var(--k-n-200), 0 10px 20px var(--k-shade-faint);   /* (his words) */
  --k-sh-primary: 0 var(--k-foot) 0 var(--k-orange-700);   /* (the big button) */
  --k-sh-primary-press: 0 1px 0 var(--k-orange-700);   /* (pressed) */
  /* (an answer card, one in every game since 23.10, unify2: .k-card--answer, components.css. It stands on a thick foot
     of its own, as the true-or-false thumbs do, and goes down into it when it is touched (21.10 night, Haim's "תיישם
     הכל": it looked like a web page's button): a light line inside its top, a darker one inside its foot, the foot
     itself and its shadow on the ground; the right and the wrong answers on a foot of their own colour) */
  /* (the answer card, one size per screen, Haim 13.11 "בכרטיסי התשובות, צריך גודל אחיד ... יש מערכת עיצוב שתחליט": a card of words
     and a card of a picture and words each one height on a screen, whatever their words; a phone on its side and a tablet below) */
  --k-card-h: 96px; --k-card-pic-h: 168px; --k-card-img: 104px; --k-card-font: var(--k-t4); --k-card-font-long: var(--k-t3);
  --k-foot: 5px;   /* (one foot for everything, Haim 4.11: "לשמוע שוב את הסיפור" the model, a solid foot and no line round it: buttons, chips, cards, sheets, bubbles) */
  --k-foot-edge: var(--k-n-300);   /* (a card's foot) */
  --k-foot-good: var(--k-green-700);   /* (a right card's foot) */
  --k-foot-bad: var(--k-red-700);   /* (a wrong card's foot) */
  --k-lit: 0 0 0 0 transparent;   /* (a card's thin line, inset so no layout moves; the old top highlight is gone) */
  --k-sh-answer: var(--k-lit), 0 var(--k-foot) 0 var(--k-foot-edge);   /* (an answer at rest: its line and its foot, nothing blurred) */
  --k-sh-answer-press: var(--k-lit), 0 0 0 var(--k-foot-edge);   /* (pressed: down into its foot) */
  --k-sh-answer-lit: inset 0 0 0 3px var(--k-gold-500), 0 var(--k-foot) 0 var(--k-gold-700);   /* (lit, one look: the mouse, his reading, the right one calling: a gold line and a gold foot, no halo) */
  --k-sh-answer-right: inset 0 0 0 3px var(--k-green-500), 0 var(--k-foot) 0 var(--k-foot-good);   /* (right) */
  --k-sh-answer-wrong: inset 0 0 0 3px var(--k-red-500), 0 var(--k-foot) 0 var(--k-foot-bad);   /* (wrong) */
  --k-sh-answer-flash: var(--k-sh-answer-right), 0 0 0 8px var(--k-green-100);   /* (the right answer's flash at its peak: a green ring, crisp) */
  /* (the keyboard's focus, on every button and answer: a gold ring round it) */
  --k-focus: 3px solid var(--k-gold-500);   /* (the keyboard's focus) */
  --k-focus-gap: 3px;
  --k-sh-dot: inset 0 0 0 2px var(--k-ink-muted);
  --k-sh-dot-now: inset 0 0 0 3px var(--k-accent-edge);
  --k-sh-dot-done: inset 0 -3px 0 var(--k-title-small);
  --k-sh-coin: inset 0 -3px 0 var(--k-star-edge);
  /* (the prizes painted, Haim 13.11 via Main: an ice-blue crystal star, "לא שניהם צהובים", and a gold coin with Kimmi's face;
     the star's own glow was lost in its cut, so a soft blue one behind it) */
  --k-img-star: url(/games/shared/ui/prize_star_3d.webp?v=2);   /* (the 3D crystal star's render, Haim 13.11 "את הכוכב תכניס"; 15.11 no twinkles, both sides the same) */
  --k-img-coin: url(/games/shared/ui/prize_coin_2.webp?v=2);   /* (Kimmi's face in the middle, equal margins, Haim 13.11; 15.11 the face stands out, pop_face.mjs) */
  --k-glow-star: none;   /* (the halo is in the picture now) */
  --k-drop-coin: drop-shadow(0 2px 2px rgb(60 40 0 / .3));
  --k-sh-good-strong: 0 4px 0 var(--k-green-700);   /* (a green button) */
  --k-sh-good-strong-press: 0 1px 0 var(--k-green-700);   /* (pressed) */
  --k-sh-pic: inset 0 0 0 1px var(--k-shade-faint);                       /* (a hairline round a picture) */

  /* ------------------------------------------------ spacing */
  --k-s-1: 4px;
  --k-s-2: 8px;
  --k-s-3: 12px;
  --k-s-4: 16px;
  --k-s-5: 24px;                                   /* (the start and end cards' sides; 22 before 3.11, every space now on the 4 px grid) */
  --k-s-6: 32px;

  /* ------------------------------------------------ motion */
  /* (every card's and answer's times are these since 23.10, unify2: none written as a number) */
  --k-t-fast: 90ms;                                /* (a press: a card or a button sinks, its shadow shortens) */
  --k-t-base: 200ms;                               /* (a bubble's fade, a card's colour, its lock; and the wait before a card goes) */
  --k-t-slow: 350ms;                               /* (a card fading, or going away) */
  --k-ease-pop: cubic-bezier(.3, 1.5, .5, 1);
  --k-ease-out: ease-out;

  /* ------------------------------------------------ layers, inside the games' page (#ch-ui and the others). Every
     z-index in the games is one of these since 21.10 (UI-6), none written as a number */
  --k-z-sky: 0;                                    /* (under the 3D: the sky, the lab's room) */
  --k-z-3d: 1;                                     /* (the 3D picture: him, the island) */
  --k-z-air: 2;                                    /* (the air in front of him) */
  --k-z-stage: 3;                                  /* (the game's own stage over the 3D) */
  --k-z-ui: 5;                                     /* (the games' page over the 3D) */
  --k-z-q: 6;                                      /* (the question's card) */
  --k-z-tray: 7;                                   /* (the answers) */
  --k-z-bubble: 8;                                 /* (his words, the story book) */
  --k-z-hud: 9;
  --k-z-overlay: 10;                               /* (the start and end cards) */
  --k-z-top: 12;                                   /* (a clue seen big; a thing flying over everything: a crystal, a weight, a plank, the rocket) */
  /* (the order of the parts inside one thing that has its own layers, never measured against the page's: the
     scale's beam and pans, a thing on its pedestal, the detective's strings over the clues, the lab's pins) */
  --k-z-in-1: 1;
  --k-z-in-2: 2;
  --k-z-in-3: 3;
  /* (an answer that waits, locked while he reads: a little faded, one look in every game, UI-7; the escape's lock
     wheels and its drawing while he explains it too, since 23.10, where they were half seen and grey) */
  --k-locked: saturate(.7) brightness(.95);


  /* ================================================ the design system (3.11, Haim: "צריך דיזיין סיסטם מסודר עם עיגולי
     פינות, גדלי פונטים, צבעים, עיצוב כרטיסים, מצבי הובר, ריווחים, גרידים"). Every thing takes its value by its JOB,
     from these names; a number of its own only for a game's own drawing. All of it seen alive: /studio/design/.
     CORNERS, three and round: --k-r-surface (24) every surface; --k-r-inner (14) a thing inside one; --k-r-s (12) a
       chip, a tag, a key; --k-r-xs (6) a cell, a dot; --k-r-pill / --k-r-round what is round by its shape.
     TYPE, five by job: --k-t1 15 a label, --k-t2 18 his words and the story, --k-t3 22 an answer, the question, a
       button, --k-t4 28 a big number, --k-t5 40 a title; two weights, 600 for words and 700 for the rest (Google Sans
       has no heavier: 800 and 900 drew as 700).
     SPACE, on a 4 px grid: 4 8 12 16 24 32 (--k-s-1..6); a surface's padding --k-pad, between cards --k-gap.
     GRID, on a wide screen: the HUD over all; the game's board at the left from the screen's edge; the column at the
       right, the question's card at its top, his zone under it down to the foot (shell.js kimmiZone), the answers at
       its foot when they stand there; one edge (--k-edge-x) and one gutter (--k-gutter) between them all. On a tall
       phone: the HUD, the question, the board or the answers, him at the foot.
     STATES of anything touched: rest; hover (mouse only: up 6 px, a gold rim and glow); press (down into its foot);
       focus (a gold ring, the keyboard); off/locked (--k-locked); reading (gold rim, lit); picked; right (green, its
       own foot); wrong (rose, a shake); gone (falls away); glow (the right one calling). */
  --k-pad: var(--k-s-4);                           /* (inside a surface) */
  --k-gap: var(--k-s-3);                           /* (between cards, between a card's parts) */
  --k-edge-x: 16px;                                /* (the screen's edge to the first thing) */
  --k-gutter: 16px;                                /* (between the board and the column, between zones) */

  /* ------------------------------------------------ touch */
  --k-touch: 48px;                                 /* (an icon button, a link: the games' own) */
  --k-touch-min: 44px;                             /* (the least a finger needs, on a phone; 40 on a computer) */
  --k-gap-touch: 8px;                              /* (the least between two things to touch) */
  --k-icon: 26px;
  --k-icon-stroke: 2.4;

  /* ------------------------------------------------ the components' own (components.css, and the games' css built the same way) */
  --k-hud-h: 64px;
  /* (the game's margin: nothing nearer the screen's sides and foot than this, the HUD's round buttons' own from the side; answer
     cards with their foot too, Haim 18.11 "זה צריך להיות במערכת עיצוב, אסור שאלמנטים יהיו בשוליים הדקים האלו") */
  --k-edge-gap: max(16px, 2.4vmin);
  --k-btn-h: 64px;                                 /* (the big button) */
  --k-btn-low-h: 52px;
  --k-sheet-w: min(420px, 46vw);
}
/* (a token built on a world's own colour: the kits set theirs on the page's body, kits.js applyCss, so it is
   worked out there, not on :root) */
body {
  --k-sh-sign: 0 4px 0 var(--sign-edge, var(--k-sign-edge)), 0 8px 18px var(--k-shade);   /* (a wooden sign) */
}

/* (the answer card on a tablet and on a phone on its side, 13.11: a phone's still easy to touch, 60 px and more) */
@media (max-width: 1279px) { :root { --k-card-h: 84px; --k-card-pic-h: 156px; --k-card-img: 76px; } }
@media (max-height: 500px) and (min-aspect-ratio: 1/1) { :root { --k-card-h: 68px; --k-card-pic-h: 68px; --k-card-img: 50px; --k-card-font: var(--k-t3); --k-card-font-long: var(--k-t2); } }
/* (Haim 24.11 "פחות עיגולי פינות לכרטיסי התשובות במובייל, באופן גורף": on a phone on its side every answer card's corners smaller,
   and the picture inside it with them; set on the card itself, so every game's own rule that reads --k-r-surface on it follows) */
@media (max-height: 500px) and (min-aspect-ratio: 1/1) { .k-card--answer { --k-r-surface: 10px; --k-r-inner: 6px; } }

/* (a computer: the whole UI a step bigger, one scale for every game, Haim 15.11 "במסך הדסקטופ, כרגע ה-UI פצפון, לוודא
   אחידות, רק שיהיה קצת יותר גדול": the five text sizes, the icon buttons, the bar and the big button about a fifth up) */
@media (min-width: 1280px) and (min-height: 650px) {
  :root {
    --k-t1: 19px; --k-t2: 23px; --k-t3: 29px; --k-t4: 37px; --k-t5: 52px;   /* (a step more, Haim 15.11 "עוד קצת") */
    --k-touch: 62px; --k-touch-min: 52px; --k-icon: 34px;
    --k-hud-h: 82px; --k-btn-h: 80px; --k-btn-low-h: 66px;
  }
}
