/* LAWS:
   - numbers and colours only — a value here names no surface and re-decides no look
   - a token no palette block ever overrides is raw; the moment a theme moves it, it is semantic
   - :root is the only selector this file may carry
   History: NOTES.md */

/* ── THE RAW TIER ───────────────────────────────────────────────────────────────────────────────
   17 of the 105 :root properties, MOVED here byte-for-byte from index.html's inline sheet (they are
   not rewritten — the default render must be identical). The split test is mechanical: these are
   the properties that NO palette block (day · paper · midnight; rockpool until 2026-11-11) overrides. They are the
   theme-invariant floor — the brand lantern, the medals, the parchment safety rail, the type scale
   and the font stacks. Everything a look re-decides lives in tokens.semantic.css.
   The inline sheet still loads AFTER this file and still wins on ties; that is intended and it
   empties in Stage 5. */
:root{
  /* WREN'S BROOM AND WHAT HE POINTS AT (first five minutes F3; the owner 2026-11-23 in the flight lab): the dotted trail a
     calm (reduced-motion) Wren leaves, and the STRONG ORANGE that pulses round a button he points at ("a strong colour to
     make it obvious"), at three strengths for the ring's breath */
  --wfTrail:#e8b64c; --wfGlow:#ff7a1a; --wfGlowA:rgba(255,122,26,.75); --wfGlowB:rgba(255,122,26,.45);
  --wfGlowC:rgba(255,122,26,.65); --wfGlow0:rgba(255,122,26,0);
  /* …and the first five minutes' own geometry (ui/screens/onboard/onboard.css may hold no px): the bubble's ink border and
     tail, the card's width, the seal and the explorer's head */
  --obBorder:3px; --obTail:20px; --obTailW:15px; --obTailIn:15px; --obTailInW:10px; --obCardW:640px; --obSeal:180px;
  --obGlowRing:4px; --obGlowOff:3px; --obHair:1px; --obBlur:6px; --obBig:240px; --obBigPhone:200px; --obSideW:17rem; --obCardWide:960px; --obDash:3px; --obMapW:300px; --obGlowSpread:14px; --obGlowBlurA:18px; --obGlowBlurB:34px;
  /* the brand lantern — never moves, at any hour (see the theme surface note in tokens.semantic.css) */
  --gold:#ffd166; --goldD:#a87f21; --goldL:#ffeeb8; --red:#ff8fa3;
  --bronze:#c07f4a; --silver:#cfdcf0; --goldT:#ffd166;
  /* a LEVEL medal is a small struck coin (owner 2026-11-12: the painted ribbon medals "look a bit old fashioned
     here"; "silver looks more blue than silver. Add a shimmer of metal gloss, like a rim of the disc or mild
     gradient"). Four stops a metal: the light it catches, its body, its shade and its rim. The silver is a
     neutral grey on purpose: --silver above leans blue and is the place medal's, untouched. */
  --coinGoldHi:#fff3c2; --coinGold:#f8cb4e; --coinGoldLo:#c98b0e; --coinGoldRim:#96690a;
  --coinSilHi:#ffffff; --coinSil:#d6d6d3; --coinSilLo:#8f908c; --coinSilRim:#6e6f6b;
  --coinBrzHi:#f8d3ab; --coinBrz:#d08a50; --coinBrzLo:#8d5126; --coinBrzRim:#6b3d1b;
  /* the celebration's paper (§34.17): the four colours of the painted confetti, sampled from the pieces themselves
     (outputs/sparkles), so a streamer cut in code and a firework's sparkles are the same paper as the painted bits */
  --fxGold:#fbbf42; --fxCoral:#f75652; --fxSky:#5eb2f8; --fxLeaf:#88bb57;
  /* …and the Smudge's ink (2026-10-20): his own mean ink colour, measured on his painted base, which every painted
     ink piece in icons/painted/fx/ was moved onto (outputs/sparkles assemble.mjs). A drop that has not loaded yet is
     drawn as a dot of this, so even the stand-in is his ink. */
  --fxInk:#122c5d;
  /* parchment — reserved for the warm beats: teaching, rules, proclamations.
     --parchInk2 is the QUIET parchment ink (leads, seal lines, side notes). It was #7a6438, which
     measures 4.67:1 on --parch but only 3.82:1 on --parch2 — and every parchment surface here is a
     gradient BETWEEN those two stops, so the token failed 4.5:1 over most of its own background.
     Two places had already discovered that independently and hard-coded #5f4c24 over the top of it
     (the certificate at .certpage, the grown-up notes at #teachnotes, both M21). #5f4c24 is now the
     token: 6.81:1 on --parch, 5.56:1 on --parch2. The .certpage override is left in place on purpose
     — it is the one thing here that gets printed, so it pins its own value. */
  --parch:#f7e8c8; --parch2:#e7d2a4; --parchInk:#3b2c14; --parchInk2:#5f4c24;
  /* the two stops ABOVE --parch, which the trophy screen needed and nothing had named: the lit top
     of a parchment sheet, and the near-white of a page you are standing on. Both were already in the
     app as literals — map.js paints the here-pin #fffaf0 — so this names what existed rather than
     adding a colour. */
  --parchHi:#fdf3dd; --parchLit:#fffaf0;
  /* THE STORYBOOK BUBBLE (owner's pick "A", 2026-09-24, §36 g). The teacher's balloon is parchment
     LIT FROM ABOVE — --parchLit at the top to --parchLo at the foot — drawn with a warm brown pen
     rather than the near-black ink, and it casts a warm shadow instead of a black one. The letter
     tiles the hand-over word arrives in are the same paper, with a warm edge underneath. Parchment
     never moves between looks (themes.css), so none of these do either. */
  --parchLo:#f3e2bd; --bubPen:#6b4a26; --bubShade:rgba(84,56,20,.28);
  /* a floating piece ON PARCHMENT (the teach card's chunks, the hand-over word's tiles): parchment is the same light paper in
     every look, so its pieces take one warm drop, never a look's own (2026-10-25, the floating pressables) */
  --float-drop-warm:0 2px 4px -1px rgba(84,56,20,.22), 0 6px 12px -8px rgba(84,56,20,.42);
  /* THE PRESS (polish survey 2026-11-11, item 8): what a finger's weight does to a thing it opens. A card settles a
     little, a small round control a little more; under reduced motion it dims instead of changing size. */
  --press-card:.98; --press-small:.94; --press-dim:.82;
  --ptileLo:#f6e7c6; --ptileEdge:#caa46a; --ptileRim:#e3cfa4;
  /* THE RING (owner, 2026-09-29, ROADMAP §34.9): the line around a card, a door, a picker tile, a field and a plain
     button is 1px. It was 2px — on a retina screen four solid pixels of grey around every card, beside painted art
     whose edges are soft. The owner picked "1.5 px" from photographs of 2 / 1.5 / 1 — and the 1.5 and 1 photographs
     were BYTE-IDENTICAL: Chrome floors a border width to whole CSS pixels (measured: 1.5px drew 3 device px at DPR 3,
     and getComputedStyle answers 1px). So the picture that was chosen is a 1px ring, and 1px is what ships — the
     same in every engine (WebKit would have drawn a real 1.5 on an iPad, a ring nobody approved). The exercise pieces a child
     taps (build slots and pieces, sort piles, the judge card) keep their 2px: they are the quest card's own
     vocabulary, which §34 leaves alone, and ui/mg's costumes mirror their metrics. An accent BAR is not a ring. */
  --ring:1px;
  /* THE DISPLAY STACK — ONE FAMILY (owner, 2026-09-29, ROADMAP §34.9 option C). m6 kept Avenir Next
     FIRST so Apple devices kept their look, and every heading, door title, button and THE WORD on the
     quest card was Avenir Next Heavy there while the rest was Nunito: two bold faces on one screen,
     measured (the §34.9 census, CDP) on 20% of all text, and the "clunky" the owner saw. Every other
     platform never had Avenir and already drew all of it in Nunito ExtraBold, which is what this makes
     universal. It is also the spelling reason Nunito is self-hosted at all (M24): its lowercase l has a
     tail, Avenir's is a bare bar beside capital I — and the word a child is asked to spell was shown in
     Avenir on every Apple device. Photographed first (outputs/scale-audit, variants A–D) and ruled.
     Avenir Next stays SECOND only as the Apple fallback for a glyph neither Nunito face carries. */
  --fdisp:"Nunito","Avenir Next","Segoe UI",system-ui,sans-serif;
  --fbody:"Nunito","Avenir Next","Segoe UI",system-ui,-apple-system,sans-serif;

  /* ── THE TYPE SCALE (P3 §2) ─────────────────────────────────────────────────────────────────
     "Cramped mixed-font feedback text" was seven sizes stacked in one centred column: the word at
     46px, the miss word at 54px, the praise at 22px display-900, its hint at 16px, the instruction
     at 17px, the reveal at 17px, the struck attempt at 20px. None of them disagreed about anything
     a reader could name — they just all disagreed.
     THREE SIZES PER SCREEN, and no more. --fqw is THE WORD: the one thing on the card that is
     display-weight, and every surface that shows a word whole (#bigword, the miss word, the
     transfer anchor) now uses the SAME clamp, so a word does not change size depending on why it
     is being shown. --fqm is the interactive/answer tier (the chips a finger presses). --fqb is
     body — instructions, feedback, reveals, hints — at a fixed 16px with line-height ≥1.5, which
     is the size the bubble speaks in.
     NO NEW FONTS: --fdisp for the word, --fbody for everything else. That is the whole system. */
  --fqw:clamp(34px,6vw,46px);
  --fqm:21px;
  --fqb:16px;

  --tileOkInk:#fff;                                  /* …and on the GREEN tile, which stays dark */

  /* ── THE TROPHY SCREEN'S GEOMETRY (TROPHY-MAP-SPEC §3) ──────────────────────────────────────
     The one screen in this app whose layout is a DESIGN DECISION rather than a consequence: a
     landscape split with the country on the left and the ledger on the right, drawn before it was
     built (outputs/trophy-map-design/). These are that drawing's measured values, lifted from the
     artboards rather than re-chosen here, and they are raw because no look re-decides a column
     width — the four palettes change what the ledger is PAINTED in, never how wide it is.
     --trLedger is the artboard's 452 at a 1440 frame. --trStack is where the split stops being
     honest and the portrait stack takes over (owner ruling: stack, do not shrink). */
  --trLedger:452px; --trStack:900px;                 /* trophy.css repeats --trStack as 56.25em: a media query cannot read a token */
  --trGap:1.25rem; --trPad:1.5rem;
  --trR:1.125rem; --trRsm:.75rem;                    /* the row's radius, and a tile's */
  --trTap:44px;                                      /* every control on this screen, both frames */
  --trPin:1.6rem;                                    /* the medal disc on a ledger row */
  --trPip:.56rem;                                    /* …and the small progress dot beside it */
  --trPill:999px;                                    /* the pill idiom, so the gate sees a token and not a number */
  --trHair:1px;                                      /* the horizon rule, and only that */
  --trRule:1px;                                      /* the ink rules: header, deckle, tile borders — as --ring (§34.9) */

  /* ── THE MEDAL BOARD, ON THE SAME PAPER (ROADMAP §11.4) ─────────────────────────────────────
     My Journey absorbed the certificate, so the pride shelf and its story panel sit on the trophy
     screen's own parchment and inherit its gap, radius and rule above. What is NEW is only the
     medal itself at two sizes — the shelf's, and the panel's hero — plus the word chips the wall
     is built from. Two sizes and no orientation variants: a square medal is orientation-agnostic
     and --trStack's own reflow handles the phone (owner ruling, and the reason the art wave is
     three sprites rather than six). */
  --jMed:2.4rem;                                     /* the medal on a place row inside the panel */
  --jMedLv:1.5rem;                                   /* a level's own medal, in the corner of its tile in the ledger */
  --jCoinRim:.09rem; --jCoinRing:.07rem;             /* …the coin's dark rim, and the light ring struck just inside it */
  --jMedShelf:4rem;                                  /* the medal standing on the shelf — the sprite's own 64px, so the paint is native */
  --jMedBig:4.5rem;                                  /* …and the hero at the head of the story panel */
  --jWordPad:.15rem .55rem;                          /* one word on the wall */

  /* ── THE FURNITURE (art wave 2, the polish pass) ────────────────────────────────────────────
     Four painted ornaments, all of them CSS backgrounds so a missing file paints nothing and the
     board underneath is unchanged. These are the HEIGHTS the two tileable strips are drawn at and
     the sizes of the two sprites; the strips' widths are never named — they are mirror-tiled and
     repeat-x carries them (outputs/medal-art/gen2.mjs). */
  --jLaurel:7.5rem;                                  /* the wreath behind the panel's hero medal */
  --jLaurelSm:4.25rem;                               /* …and on a phone, where it was a third of the head (§36 (d)) */
  --jRosette:1.75rem;                                /* the "New!" rosette on the medal just won */

  /* ── THE COSTUME LAYER'S GEOMETRY (BOSS-MINIGAME-SPEC §2) ───────────────────────────────────
     ui/mg/ dresses an exercise it does not otherwise touch, so every number it needs is here and
     none of them is in a presenter. Two rules shape the lot:
       · CHARACTER ART WAS 168px NATIVE, drawn at integer scale with image-rendering:pixelated (spec §1). THAT
         PIXEL-ERA RULE IS SUPERSEDED for the boss (handover §6B, owner yes 2026-10-20): the Smudge and the Gull
         keeper are PAINTED stills, drawn smoothly at whatever size the teacher's spot he stands in gives him, never
         pixelated, never stretched. --mgArt/--mgArtSm are now only the box he stands in when no spot is lent (the
         minigame lab), and Ember's, who is still pixel art and retired from the app.
       · BATTLE CHROME OVERLAYS, so nothing here is a height the session column has to find. The
         splotches, the chip and the bar are absolutely placed inside .card, which is already
         position:relative;overflow:hidden — see A126. The figure stands in a box that already exists. */
  --mgArt:168px; --mgArtSm:112px;                    /* the boss with no spot lent (the lab), and Ember */
  --mgBossCap:240px;                                 /* the tallest a boss is drawn: a tablet's rail is a 356 box, and
                                                        he is a guest there, not the host (the contract's "240 on big screens") */
  --mgPortrait:7.5rem;                               /* his face on the beat card, standing on its top edge */
  --mgShrink:0;                                      /* how much of himself he loses per cleaned sign: NONE, the
                                                        owner's ruling (2026-10-20, v486: "either half as much or not at
                                                        all"; half is .045). His painted faces carry the fight now, and a
                                                        scale under a painted strip read as a glitch */
  --mgSplat:2rem; --mgSplatSm:1.75rem;               /* one painted ink splat on the place's sign, wide and phone */
  --mgMess:1.5rem;                                   /* one piece of his mess on the card's edge (a dab; splats and flecks scale off it) */
  --mgR:1rem; --mgRsm:.7rem;                         /* the beat card's radius, and a pen's */
  --mgTap:44px;                                      /* a sheep, a pen — every tap target in ui/mg */
  --mgGap:.55rem; --mgPad:.85rem;
  --mgPill:999px;
  --mgRule:2px;                                      /* a pen's rail, and the beat card's edge */
  --mgBar:.5rem;                                     /* the signs-clean bar. It only ever fills. */
  --mgFlyBug:1.1rem;                                 /* the firefly itself */
  --mgIntro:.9s; --mgBeat:.42s; --mgWobble:.36s;     /* the three durations the costumes animate on */
  /* ── wave 2: the Storm, the two extra sort costumes and the parcel ─────────────────────────── */
  --mgLamp:1.25rem;                                  /* one lamp on the keeper's rack */
  --mgVeil:.5;                                       /* the storm at FULL strength, before a lamp is lit */
  --mgRain:.28;                                      /* the rain scrim over the veil, likewise */
  --mgSeal:1.6rem;                                   /* the wax seal on a sent parcel */
  --mgGapMin:clamp(74px,26vw,112px);                 /* the parcel's blank — MIRRORS #cloze .gap, and is GENERIC:
                                                        never the answer's width, and never a pixel taller than
                                                        the plain blank, or the card grows under a phone. */
  /* THE PARCEL'S BOX IS #cloze's BOX, and these five mirror it deliberately (index.html `#cloze{}`).
     A costume replaces the carrier sentence in the session column, and A126 says that column never
     scrolls on a phone — so the skin may repaint the box and may not resize it. A 360×740 phone had
     literally no spare pixel; the first draft added 68 and scrolled. If #cloze's metrics ever move,
     these move with them, and the scenario that measures costumed-vs-plain overflow is the alarm. */
  --mgPcFont:clamp(21px,3.3vw,27px);
  --mgPcLine:1.65;
  --mgPcPad:18px 24px;
  --mgPcPadSm:18px 16px 12px;                        /* …and its phone step (index.html @560px) */
  /* …and its PORTRAIT-PHONE step (index.html @420px portrait), where the side inset goes entirely:
     the mascot stands beside the sentence there and already indents it by 90px, so the frame's own
     inset is a second one for the same job. Worth a whole line of wrapping, which is why the mirror
     has to carry it — measured, without these two the costumed cloze put the ✓ row 18px above where
     the plain one put it on a 360×740 phone. */
  --mgPcPadPh:18px 0 12px;
  --mgPcMarPh:14px 0 2px;
  --mgPcMar:14px auto 2px;
  --mgPcMax:660px;
  --mgSlot:2.6rem;                                   /* the depth of a rune slot in the golem's chest */
  /* ── wave 3: the smithy and Ember's hoard ──────────────────────────────────────────────────── */
  /* THE SMITHY'S ROWS ARE THE WORD BUILDER'S ROWS, and these six mirror index.html's `#buildslots`,
     `#buildbank`, `.fslot` and `.fchunk` deliberately — the same discipline the --mgPc* tokens keep
     for the parcel, for the same A126 reason. Patternsmith stands IN the session column (it replaces
     the two plain rows rather than overlaying them), so it may repaint them and may not grow them by
     a pixel. If the plain builder's metrics ever move, these move with them, and the costumed-vs-
     plain overflow scenario is the alarm that says so. */
  --mgSmSlotH:62px;                                  /* .fslot's height */
  --mgSmStockH:58px;                                 /* .fchunk's height */
  --mgSmMinW:56px;                                   /* both, and the reason a one-letter piece is still tappable */
  --mgSmSlotRow:66px; --mgSmStockRow:62px;           /* #buildslots / #buildbank min-heights */
  --mgSmFont:28px; --mgSmStockFont:26px;             /* …and their type, phone step 23px at 560 */
  --mgSmR:14px;                                      /* the piece radius — the Forge's own */
  --mgGem:1.15rem;                                   /* one treasure on Ember's pile */
  --mgDragon:var(--mgArtSm);                         /* Ember, idle. Same 168px art at the same integer steps. */
  /* ── wave 4A: the YOUNG layer and the HEAT dial (BOSS-MINIGAME-SPEC §9) ─────────────────────────
     Every value below is a LOOK or a TAP TARGET. Not one of them changes what a costume asks or how
     it is judged — that is §9.0's law, and the reason these are tokens rather than branches in a
     presenter: a knob that only exists under a costume is cosmetic BY LAW, and a cosmetic knob's
     home is this file. The one real pacing number heat moves (the flash beat) is NOT here, because
     the PLAIN rendering has to honour it too and so it is computed by the host. */
  --mgTapY:56px;                                     /* a sheep, a lantern, a pen — for a young finger */
  --mgMark:.9em;                                     /* the shape beside a young pen's name */
  --mgVeilY:.3; --mgRainY:.16;                       /* the storm, at a five-year-old's strength */
  --mgFlyBugHot:1.45rem;                             /* the firefly, brighter for a child who is cruising */
  --mgShimmer:.35;                                   /* how much a hot ember pile and a hot anvil glow */
  /* ── wave 4C: the Wobbly Tower (BOSS-MINIGAME-SPEC §11) ────────────────────────────────────────
     A block's SIZE is the only thing heat moves here, and size is a look: what is asked, what is
     typed and what is judged are identical whichever brick the child earns (§9.0). The young pair
     is a bigger brick and a gentler lean, for the same reason the sheep get a 56px tap target — a
     five-year-old reads a picture off fewer, larger shapes. */
  --mgTBlockW:2.6rem; --mgTBlockH:.62rem;            /* a warm block */
  --mgTBlockWHot:3.2rem; --mgTBlockHHot:.82rem;      /* …and the one a child who is cruising earns */
  --mgTBlockWY:3.1rem; --mgTBlockHY:.9rem;           /* the young brick: fewer of them, each bigger */
  --mgTGap:.14rem;                                   /* mortar */
  --mgTLean:2.2deg;                                  /* the wobble, at its furthest over */
  --mgTLeanY:1.2deg;                                 /* …and a five-year-old's, which is gentler */
  --mgTWob:900ms;                                    /* how long the lean takes to settle */

  /* ── THE KEYBOARD (ui/kbd) ──────────────────────────────────────────────────
     One board serves every surface, so its geometry is one place. --kbUnit is the width cap of ONE
     ROW UNIT; a key is --kw units wide and every row totals --kbRow of them, which is what makes a
     letter the same size in row 3 as in row 1 and the same size on the pet's board as on the quest's.
     --kbBleed is how far a tap target reaches past its keycap into the gap: ten keys do not fit a
     phone at 44px (iOS's own are about 32), so a bigger TARGET is the only honest answer and it moves
     nothing on screen. The two --kb*Sm values are the phone step, applied in kbd.css at 560. */
  --kbUnit:54px;                                     /* one unit, at its widest */
  --kbRow:10;                                        /* units per row — the phone's own arithmetic, stated once */
  --kbMax:600px;                                     /* the board itself: a child's hands, not an iPad's */
  --kbH:52px;    --kbHsm:46px;                       /* a key's height — the phone keeps 46, never less */
  --kbGap:6px;   --kbGapSm:4px;
  --kbR:12px;    --kbRsm:10px;
  --kbFont:23px; --kbFontSm:20px;
  --kbFnFont:20px;                                   /* ⌫ ⇧ , . — a glyph, not a letter */
  --kbSpaceFont:15px;                                /* the space bar says a word, so it sets like one */
  --kbBleed:3px; --kbBleedSm:2px;                    /* exactly half the gap beside it, both steps */
  --kbTop:20px;  --kbTopSm:14px;                     /* air above the board: Done sits right over it (owner 2026-10-03, was 12/8) */
  --kbDrop:2px;                                      /* how far a press sinks (the keycap floats since 2026-10-25; was its 4px edge) */
  --kbGloss:rgba(255,255,255,.18);                   /* the light on top of a keycap */
  --kbShiftInk:#2b2005;                              /* ink on an armed shift — the gold never moves, nor does this */
  --kbPopMin:44px; --kbPopFont:30px; --kbPopPad:8px 10px 10px; --kbPopLine:1.5px;
  --kbPopShade:rgba(40,30,20,.28);                   /* the press preview's drop */

  /* ── THE WRITING DESK (ui/screens/desk) ────────────────────────────────────
     A SCHOOL EXERCISE BOOK, and every number below is what makes one: ruled lines at a real line
     height, a page with a real bottom, a margin wide enough to write to the edge of.
     --dk-lh IS READ BY JAVASCRIPT (surface-a.js, surface-b.js) because the page's height has to be
     a whole number of lines or the rules and the text drift apart down the page — which is the one
     way a ruled book looks wrong immediately. So a design change here really is a design change:
     the surfaces re-read it on every layout and never carry a copy. */
  --dk-lh:36px;    --dk-fs:22px;                     /* the writing: a line, and the letters on it */
  --dk-pad-x:22px; --dk-pad-y:10px;                  /* the page's margins */
  /* the gutter between pages in the one text flow. IT MUST BE WIDER THAN EITHER MARGIN (§52): the page
     box clips at its edge, not at its margin, so a gap narrower than the left margin let the end of the
     previous page show between the fold and the margin line (photographed 2026-10-14). */
  --dk-gap:80px; --dk-gap-spread:100px;
  --dk-page-max:680px;                               /* a child's book, not a monitor */
  --dk-lines-min:6; --dk-lines-max:14;               /* how short and how tall a page may get */
  --dk-r:10px; --dk-rsm:8px; --dk-pill:999px;
  /* the desk's own spacing and type steps. Named here because this repo has no shared scale — every
     screen brings its own (--tr*, --mg*, --j*) — and a screen that reached for another screen's
     would be two designs that cannot move apart. */
  --dk-g1:.25rem; --dk-g2:.5rem; --dk-g3:.75rem; --dk-g4:1.25rem;
  --dk-hair:1px; --dk-edge:1.5px; --dk-nub:2px;      /* the page's border, a chip's, a caret's corner */
  --dk-sm:.8125rem; --dk-md:1rem; --dk-lg:1.25rem;
  --dk-drop:0 10px 22px rgba(40,30,20,.24);          /* the book's shadow on the desk */
  --dk-drop-sm:0 6px 16px rgba(40,30,20,.18);        /* …and a panel's, which sits closer */
  --dk-tap:44px;                                     /* every control on this screen */
  --dk-caret:2.5px;                                  /* the drawn caret's width */
  /* THE FAMILIAR RED SQUIGGLE (RULINGS §9 ②, the owner overruling the design strand's "never red"):
     children already know it, "that's just fair, and it matches their user experience". A true red
     rather than the app's --red, which is a soft pink built for a gentle miss beat and would read
     here as decoration rather than as a mark. */
  --dk-mark:#d9342b;
  /* THE ORANGE ASK (ROADMAP §51.3, owner 2026-10-13 "Yes"): a real word she probably did not mean ("very exiting",
     "fiends" for friends). Not wrong, so not red — the squiggle's shape says "look here", the colour says "maybe". */
  --dk-ask:#e07b00;
  --dk-caret-ink:#3a75d8;                            /* a caret is blue in every editor she will meet */
  --dk-sel:rgba(255,209,102,.55);                    /* the selection wash — the brand lantern, at half */
  /* ── THE NOTEPAD (ROADMAP §52, the owner's pick B 2026-10-14: "an open exercise book") ─────────
     School-book paper: blue rules, a red margin, a grain you only see up close. On a wide screen the
     book lies OPEN — a cloth cover, the writing on the right page, the desk's helper and buttons on
     the left, a ribbon in the fold. The spread's own numbers are switched on by desk.css's one media
     query; at every other width the --dk-spread-* values below are simply never read. */
  --dk-rule:#bdd0e6;                                 /* the ruled line: an exercise book's pale blue */
  --dk-margin:rgba(214,72,82,.5); --dk-margin-w:2px;  /* the margin line, and its weight */
  --dk-pad-l:46px; --dk-margin-x:30px;               /* the writing starts right of the margin line… */
  --dk-pad-l-spread:70px; --dk-margin-x-spread:48px; /* …which sits further in on the open book */
  --dk-paper:#fffaf0;                                /* the page (the lit parchment, named for what it is) */
  --dk-stamp:64px; --dk-stamp-in:10px;               /* §58.1: the teacher's stamp on a finished page, and how far in
                                                     from the page's bottom corner it lands */
  --dk-ink:#232c47; --dk-ink2:#5a6380;              /* ink ON THE PAPER, theme-invariant like the paper: Midnight's and
                                                     Rockpool's --ink is near-white and wrote cream on cream (Fable review §52) */
  --dk-paper-tex:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .25 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* the cover's blue cloth: a fine diagonal weave over a light falling from the top */
  --dk-cloth-bg:repeating-linear-gradient(45deg,rgba(255,255,255,.045) 0 2px,transparent 2px 5px),linear-gradient(180deg,#3b6f93,#2f5d7c);
  --dk-cloth-pad:14px; --dk-cloth-r:16px;            /* how much cover shows round the pages, its corner */
  --dk-leaf-edges:-3px 0 0 #efe5d0,-5px 0 0 #e2d4b8,3px 0 0 #efe5d0,5px 0 0 #e2d4b8;  /* the pages stacked under the open ones */
  --dk-fold:46px; --dk-fold-ink:rgba(80,60,30,.2);   /* the shadow either side of the fold */
  --dk-ribbon-bg:linear-gradient(90deg,#b8322f,#dc5149 50%,#b8322f);   /* the bookmark ribbon */
  --dk-ribbon-w:22px; --dk-ribbon-tail:34px; --dk-ribbon-notch:14px;  /* its width, its hang below the book, its cut */
  --dk-book-drop:0 26px 50px rgba(50,35,15,.36);     /* the open book's shadow on the desk */
  --dk-app-spread:1360px;                            /* the column the open book is allowed (the app's is 900) */
  --dk-page-max-spread:620px;                        /* one page of the open book */
  --dk-lines-max-spread:16;                          /* …and a taller one: the chrome is beside it, not above it */
  --dk-leaf-pad:1.75rem;                             /* the left page's own margins */
  /* THE PAGE TURN (§52): a leaf lifts at the fold and turns over. Decoration only — the page has
     already changed underneath it, so nothing waits for it, and it is never drawn under ?fast=1 or
     reduced motion. */
  --dk-flip:.62s; --dk-flip-persp:2400px; --dk-flip-shade:rgba(60,40,15,.32);
  --dk-flip-quick:.24s;                              /* the flick when typing runs onto the next page */
  --dk-flip-ease:cubic-bezier(.45,.05,.3,1);
  /* PRINTING LIKE THE BOOK: the printable box of the smaller of A4 and Letter at the sheet margin, in
     CSS px — the book pages are laid out in px and fitted into it, two to a sheet when they fit. */
  --dk-print-w:680px; --dk-print-h:930px; --dk-print-gap:28px;
  --dk-print-fs:12pt; --dk-print-lh:1.6; --dk-print-lh-wide:2.3;
  --dk-sheet-pad:14mm; --dk-card-pad:10mm; --dk-card-gap:8mm;

  /* ── THE DESK'S TOOL ICONS (ROADMAP §36 (b), law 6: icons drawn on a 24px grid) ──────────────
     The six squares in the desk's tool row. (The speaker on a suggestion chip was the seventh; it is
     the app's one painted speaker since 2026-11-12, an <img>, and has no token here.) Each is a stroke
     path in a 24 viewBox, used as a MASK so it takes currentColor and answers hover the way the
     border beside it does — the shape the monitoring line's shield already established. They live
     here, with the other raw values, because desk.css may hold no literal and desk.view.js may hold
     no drawing; a screen sheet points at them by name.
     `black` is the mask's own ink and never reaches a pixel: a mask reads alpha, and the colour is
     whatever the button's `color` is at the time. */
  --dk-icon:22px; --dk-icon-sm:15px;                 /* the glyph inside a 44px square, and on a chip */
  --dk-spk:18px;                                     /* the painted speaker on a suggestion chip: a picture needs 3px more than a line did */
  --dk-idea-icon:48px;                               /* a practice idea's PAINTED icon (2026-10-25); its tiers are 48/96/144 */
  --dk-pnum-w:3.2em;                                 /* "12 / 14" without the row twitching on a turn */
  --dk-btn-max:190px;                                /* #qbtns's own 180 + the desk's longer labels */
  --dk-prow-min:19em;                                /* a print row's basis: one per line on a phone */
  --dk-off:.38;                                      /* a tool with nowhere to go */
  --dk-i-prev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5 L8 12 L15 19'/%3E%3C/svg%3E");
  --dk-i-next:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5 L16 12 L9 19'/%3E%3C/svg%3E");
  --dk-i-undo:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9 H14 a5 5 0 0 1 0 10 H8'/%3E%3Cpath d='M8 5 L4 9 L8 13'/%3E%3C/svg%3E");
  --dk-i-redo:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 9 H10 a5 5 0 0 0 0 10 H16'/%3E%3Cpath d='M16 5 L20 9 L16 13'/%3E%3C/svg%3E");
  --dk-i-keys:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='13' rx='2'/%3E%3Cpath d='M7 10 h0 M11 10 h0 M15 10 h0 M7 13 h0 M11 13 h0 M15 13 h0 M8 16 h8'/%3E%3C/svg%3E");
  --dk-i-print:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 9 V3 h10 v6'/%3E%3Cpath d='M7 18 H4 v-7 h16 v7 h-3'/%3E%3Crect x='7' y='14' width='10' height='7'/%3E%3C/svg%3E");

  /* ── THE QUEST CHOOSER (ui/screens/quest/chooser.*) ────────────────────────
     Three painted doors before the map, only when there is a choice (QUEST-CHOOSER-SPEC §3). The
     widths below are not new design: they are the HOME doors' own numbers, measured off index.html
     by the art lane before it rendered a pixel (§6 correction 1) — `.doorbtn` is 252 in a `.bigrow`
     column and the phone media query caps a stacked one at 280. A door that did not match them
     would be a fourth door vocabulary in an app that already has three.
     --chArt is the painting's height, and it is the number the whole screen is built around: three
     doors AND their titles have to fit a 640px-tall phone, which is what put the rolls at 21:9 and
     makes `object-fit:cover` the crop. --chStack is repeated as an em query in chooser.css for the
     reason trophy.css repeats --trStack: a media query cannot read a token. */
  --chDoor:252px; --chDoorPhone:280px;               /* a door in the row, and a stacked one's cap */
  --chArt:110px; --chArtPhone:96px;                  /* the painting — the whole reason three fit */
  --chGap:18px; --chPad:0 0 14px;                    /* `.bigrow`'s gutter; the painting is flush */
  --chTextPad:0 14px;                                /* …so only the words are inset */
  --chR:24px; --chRule:2px;                          /* the door's radius and edge — `.doorbtn`'s */
  --chTap:44px;                                      /* every control on this screen */
  --chTitle:21px; --chBlurb:14px;                    /* `.doorbtn .t` and `.doorbtn .d`, verbatim */
  --chTitleGap:10px; --chBlurbGap:5px;
  --chLift:5px;                                      /* how far a door rises under a pointer */
  --chMove:.12s;                                     /* …and how long it takes. Zero with motion off. */
  --chStack:828px;                                   /* 3 × 252 + 2 × 18 + the card's sides: below it
                                                        the row cannot hold three and stacks */
  --chHeadGap:6px 0 16px;
  --chLines:2;                                       /* a door's line is ONE line's worth of words —
                                                        two rows of them is the cap, so a long place
                                                        name cannot push the third door off a phone */
  --chTrack:.3px;                                    /* the title plate's letter-spacing */
  /* the door's three shadows, whole — `.doorbtn`'s own, so the two vocabularies match exactly */
  --chDrop:0 16px 30px -18px var(--shade);
  --chDropHi:0 22px 36px -18px var(--shade);
  --chInset:inset 0 1px 0 rgba(255,255,255,.1);
  --chRing:0 0 0 5px rgba(255,209,102,.14);          /* the lantern halo a hovered door wears */

  /* ── THE EXPLORER ROSTER (ui/screens/profile/roster.*) ─────────────────────
     Sixteen painted portraits chosen like a kart roster (PLAYER-PICKER-SPEC §3). --rsChip is NOT a
     new number: it is `.facechip`'s own 58, kept so the grid reads as the control it replaced and
     so a chip still clears a thumb with its gap. Four columns of it is 262 wide, which fits the
     narrowest card in the app; eight is 544 and needs a landscape, which is what --rsWide says.
     --rsCap is the whole reason home's picker still costs one block instead of a screen: the
     compact grid SCROLLS past two and a half rows rather than growing to four, so opening the
     look-picker cannot push Today's Quest off a phone (the defect A49 was written for). */
  --rsChip:58px;                                     /* `.facechip`, verbatim */
  --rsGap:10px;                                      /* `.facerow`'s gutter, verbatim */
  --rsCols:4; --rsColsWide:8;                        /* 4×4 on a phone, 8×2 in landscape */
  --rsWide:37.5em;                                   /* repeated as an em query in roster.css: a
                                                        media query cannot read a token */
  --rsBig:160px;                                     /* the chosen explorer, large (§3) */
  --rsBigPhone:128px;
  --rsName:22px; --rsNameGap:4px;
  --rsHeadGap:12px;
  --rsCap:168px;                                     /* two rows and a peek of the third, then scroll */
  --rsPop:.34s;                                      /* the bounce when the big one changes */
  --rsPopLift:6px;
}
