/* =====================================================================
   DELIVERY RUN — the in-game HUD
   =====================================================================
   Zuhair's gameplay frame, file k3MyuBfbyfQNdOuk40Viyc. The eleven HUD
   nodes are SIBLINGS of the frame 146:732; the frame's origin is
   (11339, 1393), measured with get_metadata.

   EVERY NUMBER BELOW IS `absolute metadata coordinate - frame origin`.
   None of it came from get_design_context, which reports each child
   relative to its own box and so reads left:0 top:0 for all of them —
   the S8b trap that put a name under the leader's ring on the board.

   The stage is a fixed 1920x1080 (core/stage.js), so these are stage
   pixels 1:1 and nothing here needs to be responsive. core/loop.js
   scales the whole stage to the monitor.

   THE HUD SITS AT THE EDGES. The centre of the frame is road. Nothing
   in this file is allowed over it — that is the property that broke in
   the portrait build this replaces.
   ================================================================== */

#hud{
  /* the frame's palette, and only the frame's palette */
  --cream:  #f4ede3;
  --orange: #ff5900;
  --brown:  #411517;        /* every stroke on the spill meter */
  --lime:   #cfff00;

  font-family: var(--font);
  font-style: normal;
}
#hud > div{ position:absolute }
/* #h-spill and #h-route are grouping only — the frame gives no group for
   either (the SPILL label 146:808 and the percentage 146:807 sit outside the
   bar group, and the pill is five siblings), so their leaves carry frame
   coordinates directly. display:contents so neither generates a box: an
   inset:0 wrapper is a 1920x1080 rectangle lying across the road, which is
   invisible but is exactly what the "centre of the frame is road" check in
   tests/hud_figma.py is looking for, and it rightly went red on it. */
#h-spill, #h-route{ display:contents }
#hud img{ display:block; pointer-events:none }

/* Figma centres the GLYPHS of a tracked line; CSS letter-spacing adds the
   track after the last glyph too, which drags a centred line left by half of
   it. Each tracked line below carries `text-indent` equal to its tracking,
   which shifts a centred line by half the indent and puts the glyphs back
   where Figma has them. Measured, not assumed — see tests/hud_figma.py. */


/* ---------------------------------------------------------------------
   146:774  Group 29 — TIME LEFT.  group (31,43) 339x257
   ------------------------------------------------------------------ */
#h-time{ left:31px; top:43px; width:339px; height:257px }
/* 146:775 the patch is (60,43) 280x257 — 29px right of the group, because the
   text box is wider than the sticker and the group is the union of the two. */
#h-time .patch{ position:absolute; left:29px; top:0; width:280px; height:257px }
/* 146:776 the text box is (31,72) 339x169 — the full group width, at the group
   origin. Two lines of 77px lead centred in 169px. */
/* The 5px track is on the TEXT NODE in the frame, so BOTH lines carry it —
   the label and the clock. Measured, not read off the generated code, which
   hoists it to the parent where it is easy to miss: the clock's ink is 167px
   wide in the frame and was 152 here, and 167-152 is exactly the three
   inter-glyph gaps of `0:30` at 5px. */
#h-time .stack{
  position:absolute; left:0; top:29px; width:339px; height:169px;
  text-align:center; color:var(--cream); letter-spacing:5px
}
/* THE TWO LINES ARE PLACED, NOT STACKED, and this is the one thing in the file
   that CSS will not do by itself.

   Figma runs a 77px BASELINE GRID: with a fixed line height it puts the
   baseline at the same fraction of every line box whatever the type size, so
   16px and 80px sit 77px apart. CSS instead centres each line's own
   ascent+descent in the line box (half-leading), which is font-size dependent
   — at 16px the baseline lands high in the box and at 80px low, and the two
   lines came out 102px apart instead of 77. Measured against Zuhair's render:
   the label was 10px high and the clock 14px low, a 24px gap that is plainly
   visible next to the frame.

   So each line gets its own box. The tops below put the rendered ink exactly
   where the frame's is — label y 123..133, clock y 154..211 in frame space —
   and tests/hud_figma.py pins both, so a font swap that moves a baseline goes
   red instead of drifting. */
#h-time .cap,
#h-time .val{ position:absolute; left:0; width:339px; height:77px; line-height:77px; text-indent:5px }
#h-time .cap{ top:17.5px; font-weight:600; font-size:16px }
#h-time .val{ top:70.5px; font-weight:600; font-size:80px }


/* ---------------------------------------------------------------------
   146:782  Group 32 — the rider.  group (40,264) 183x154
   ------------------------------------------------------------------ */
#h-rider{ left:40px; top:264px; width:183px; height:154.001px }
/* 146:783 — 158.464x118.035 of artwork, rotated 14.52deg about the centre of
   the 183x154.001 group box. The ROTATION is the sticker's; the icon and the
   name below are upright, which is why they are not in a rotated wrapper. */
#h-rider .patch{
  position:absolute; left:50%; top:50%; width:158.464px; height:118.035px;
  transform:translate(-50%,-50%) rotate(14.52deg)
}
/* 146:785 (124.778,310.469) 13.898x15.439 -> group-relative (84.778,46.469) */
#h-rider .ico{ position:absolute; left:84.778px; top:46.469px; width:13.898px; height:15.439px }
/* 146:784 (57,314.258) 149x66 -> group-relative (17,50.258) */
#h-rider .nm{
  position:absolute; left:17px; top:50.258px; width:149px; height:66px;
  display:flex; flex-direction:column; justify-content:center;
  text-align:center; font-weight:700; font-size:20px; line-height:77px;
  color:rgba(244,237,227,.83); white-space:nowrap
}


/* ---------------------------------------------------------------------
   146:777  Group 28 — SPEED.  group (1624,66) 218x184
   ------------------------------------------------------------------ */
#h-speed{ left:1624px; top:66px; width:218px; height:184px; color:var(--cream); text-align:center }
#h-speed .patch{ position:absolute; left:0; top:0; width:218px; height:184px }
/* each line is its own text box in the frame, so each keeps its own box */
#h-speed .cap,
#h-speed .val,
#h-speed .unit{ position:absolute; display:flex; flex-direction:column; justify-content:center }
/* 146:781 (1671,111) 113x20 -> (47,45) */
#h-speed .cap { left:47px; top:45px;  width:113px; height:20px; font-weight:500; font-size:16px; line-height:60px; letter-spacing:5px; text-indent:5px }
/* 146:779 (1687,137)  81x51 -> (63,71) */
#h-speed .val { left:63px; top:71px;  width:81px;  height:51px; font-weight:500; font-size:64px; line-height:60px }
/* 146:780 (1682,193)  94x22 -> (58,127) */
#h-speed .unit{ left:58px; top:127px; width:94px;  height:22px; font-weight:800; font-size:16px; line-height:60px }


/* ---------------------------------------------------------------------
   ORDERS DELIVERED — Session A. NOT IN ZUHAIR'S FRAME, AND FLAGGED.
   ---------------------------------------------------------------------
   The endless run's score, on screen for the whole run. 146:777's patch and
   type one-for-one — SPEED / 60 / KM/H becomes ORDERS / n / DELIVERED — so it
   reads as part of the same HUD rather than as something bolted on. The label
   and value boxes are 146:777's; the unit box is widened from 94 to 124 about
   the same centre, because DELIVERED is longer than KM/H.

   WHERE: the right column, under the speed patch. Clear of the order card's
   rotated box (which ends at y~476 while the card is up) and outside ROAD, the
   (380..1610 x 0..925) rectangle tests/hud_figma.py holds every painted HUD
   element out of. */
#h-orders{ left:1624px; top:500px; width:218px; height:184px; color:var(--cream); text-align:center }
#h-orders .patch{ position:absolute; left:0; top:0; width:218px; height:184px }
#h-orders .cap,
#h-orders .val,
#h-orders .unit{ position:absolute; display:flex; flex-direction:column; justify-content:center }
#h-orders .cap { left:47px; top:45px;  width:113px; height:20px; font-weight:500; font-size:16px; line-height:60px; letter-spacing:5px; text-indent:5px }
#h-orders .val { left:63px; top:71px;  width:81px;  height:51px; font-weight:500; font-size:64px; line-height:60px }
#h-orders .unit{ left:43px; top:127px; width:124px; height:22px; font-weight:800; font-size:16px; line-height:60px }


/* ---------------------------------------------------------------------
   146:808 + 146:788 + 146:807 — SPILL
   ------------------------------------------------------------------ */
/* 146:808 (15,750) 136x42 */
#h-spill .cap{
  position:absolute; left:15px; top:750px; width:136px; height:42px;
  display:flex; flex-direction:column; justify-content:center; text-align:center;
  font-weight:700; font-size:24px; line-height:77px; letter-spacing:5px; text-indent:5px;
  color:rgba(255,89,0,.82)
}
/* ---------------------------------------------------------------------
   THE SPILL METER — REDESIGNED, with permission
   ---------------------------------------------------------------------
   146:788 Group 33 (56,801) 54.75x198 is kept EXACTLY: same box, same maroon
   track, same 6px stroke, same corner radius, same position, and the label
   (146:808) and percentage (146:807) are untouched at the frame's coordinates.
   What is redesigned is what happens INSIDE the track.

   WHY. Two things, both measured.

   1. THE FRAME IS NOT SELF-CONSISTENT. It draws five of its sixteen bars lit
      beside a `10%` label. Five of sixteen is 31%. There is no mapping that
      satisfies both, so the shipped build picked the only one the value
      supports (linear) and the picture and the number have disagreed since.

   2. SIXTEEN SEGMENTS ARE NOT COUNTABLE AT FOUR METRES. The track is 198px
      tall; sixteen segments is an 11.109px pitch, and each bar carries a 3px
      stroke top and bottom, so the coloured interior is 5.3px. On a 55" 1080p
      panel one pixel is about 0.63mm, so that is 3.3mm of colour read from
      4000mm away — roughly 3 arcminutes, which is at the limit of resolving
      the bar at all and well below counting sixteen of them.

   AND A THIRD THING THE FRAME DOES NOT SHOW AT ALL. The meter carries one
   threshold line. Until Session A it was the CLEAN line at STREAK_SPILL (25%),
   where a delivery stopped paying the 250-point clean streak; the streak is
   deleted, and the line is now the WARNING line at SPILL_WARN — the level at
   which a single collision fills the meter. Derived from HIT_SPILL in tuning.js.

   ------------------------------------------------------------------------
   ONE CONTINUOUS COLUMN. The fill height IS the percentage, so the first defect
   is answered exactly rather than approximately, and there is nothing left for
   the number to disagree with. A position on a scale is also the easier read at
   distance than a count.

   AND IT CARRIES THE THRESHOLD IN ITS COLOUR. Below SPILL_WARN the fill is LIME,
   at or above it ORANGE. That is the same meaning lime already has on this HUD
   (the route bar's progress) and the same meaning orange already has (the brand,
   the alert), so no new vocabulary is invented — and the moment one more bump
   would fill the meter is a colour change across the whole column, visible
   without looking at it.

   A SEGMENTED OPTION WAS BUILT AND REJECTED (S15). It was Zuhair's shape
   coarsened to eight bars — 5.3px of colour each becomes 17.2px — and it worked,
   but it keeps the defect it was meant to fix: one segment is 12.5%, so the
   printed number can never agree with the picture more finely than that. It is
   not coming back; if a segmented meter is ever wanted again, note that at
   sixteen bars the colour is 3 arcminutes at four metres, which is the reason
   the frame's own version is unreadable at the rig.
   ------------------------------------------------------------------ */
#spillbars{
  position:absolute; left:56px; top:801px; width:54.75px; height:198px;

  /* The inside of the track, after its own 6px stroke. Everything below is
     measured against this rather than against the box, so the fill and the
     clean line stop at the stroke instead of under it. */
  --in-x: 6px;
  --in-w: 42.75px;                          /* 54.75 - 2*6 */
  --in-y: 6px;
  --in-h: 186px;                            /* 198 - 2*6 */

  /* Where the warning line sits, as a percentage. WRITTEN BY hud-sync.js FROM
     SPILL_WARN at module load, not typed here — a second copy of a tuning
     constant is a copy that goes stale the first time somebody moves the real
     one, and this one would go stale silently: the line would simply be drawn
     at the wrong height. The literal below is the fallback for a page that
     never runs the module (a CSS-only preview), not the source. */
  --warn: 78;
}
#spillbars::before{
  content:''; position:absolute; inset:0;
  box-sizing:border-box; border:6px solid var(--brown); border-radius:10px;
  background:rgba(65,21,23,.86);
}

/* --- the fill --------------------------------------------------------- */
#spillfill{
  position:absolute; left:var(--in-x); width:var(--in-w);
  bottom:var(--in-y); height:0; border-radius:6px;
  background:var(--lime);
  /* No transition. G.spill moves every frame off a physical model and a CSS
     ease would put the meter behind the thing it is reporting — a rider who
     straightens up should see it stop climbing at the moment they do. */
}
#spillfill.over{ background:var(--orange) }

/* --- the warning line ----------------------------------------------------- */
/* A 3px rule across the track at SPILL_WARN, with a 9px cream tick outside the
   track's left edge — the tick is over the road, where cream is the only one of
   the four that reads. It was the CLEAN line at STREAK_SPILL until Session A;
   same drawing, different threshold, different meaning — see SPILL_WARN.

   Cream, because the ground at that height is maroon (unfilled), lime or
   orange, and cream is the only one of the four that reads on all three. Found
   by rendering it and looking, not by any assertion. */
#spillwarn{
  position:absolute; left:var(--in-x); width:var(--in-w); height:3px;
  bottom:calc(var(--in-y) + var(--in-h) * var(--warn) / 100 - 1.5px);
  background:var(--cream); opacity:.9; text-decoration:none;
}
#spillwarn::before{
  content:''; position:absolute; left:-13px; top:-2px;
  width:9px; height:7px; border-radius:2px; background:var(--cream);
}

/* 146:807 (36,1008) 93x38 */
#h-spill .pct{
  position:absolute; left:36px; top:1008px; width:93px; height:38px;
  display:flex; flex-direction:column; justify-content:center; text-align:center;
  font-weight:700; font-size:40px; line-height:77px;
  color:var(--orange); text-shadow:0 0 4px #ffd9c5
}


/* ---------------------------------------------------------------------
   146:815 + 146:816 + 146:819 + 146:820 + 146:821 — the route pill
   ------------------------------------------------------------------ */
/* 146:815 (556,934) 872x70 */
#h-route .pill{
  position:absolute; left:556px; top:934px; width:872px; height:70px;
  border-radius:10px; background:var(--cream);
  box-shadow:0 4px 7px 2px rgba(255,89,0,.36)
}
/* 146:820 (611,954) 125x29 and 146:821 (1298,954) — left-aligned in the frame */
#h-route .cap{
  position:absolute; top:954px; width:125px; height:29px;
  display:flex; flex-direction:column; justify-content:center;
  font-weight:700; font-size:24px; line-height:36px; color:var(--orange);
  /* S20c: the area is per-leg now and runs to DIPLOMATIC AREA. Without this
     it WRAPS -- AMWAJ ISLANDS broke to two lines and hung below the pill.
     hud-sync.js shrinks it to the box; nowrap is what makes shrinking the
     only outcome rather than one of two. */
  white-space:nowrap
}
#h-route .cap.a{ left:611px }
#h-route .cap.b{ left:1298px }

/* 146:816 Group 34 — two round-capped 10px lines, both centred on y=969.
   The frame's own box is zero-height at y=974 with the art drawn 10px above
   it, so the visual box is (713,964) 538x10.

   The track is #F4EDE3 on an #f4ede3 pill: the groove is the INNER SHADOW,
   not a darker fill. Both shadows are read out of the exported SVG —
   dx4 dy4 blur5 rgba(65,21,23,.53) on the track, dx3 blur2 #aad005 on the
   fill — which is the only place the real values exist. */
#track{
  position:absolute; left:713px; top:964px; width:538px; height:10px;
  border-radius:5px; background:var(--cream);
  box-shadow:inset 4px 4px 5px rgba(65,21,23,.53)
}
#fill{
  position:absolute; left:0; top:0; height:10px; width:0;
  border-radius:5px; background:var(--lime);
  box-shadow:inset 3px 0 2px #aad005
}
/* 146:819 (1159.84,941) 67.145x53.670 — the marker rides the head of the fill.
   In the frame the fill's visual end is at x=1183 and the marker's centre at
   1193.4, so it sits 10.4px AHEAD of the head; hud-sync.js carries that as
   MARKER_LEAD rather than hard-coding a left, so it tracks progress. */
/* S20c: THE MARKER IS THE LEG'S ITEM NOW, so its ASPECT VARIES -- the ten
   groceries run from 101x279 (water bottle) to 308x198 (croissant). A fixed 67.145 x
   53.670 box would squash and stretch them differently one leg to the next,
   and the old `margin-left:-33.572px` centres only that one width. Height is
   held at the frame's 53.670 and the width follows the art; translateX(-50%)
   centres whatever that turns out to be. */
#knob{
  position:absolute; top:941px; width:auto; height:53.670px;
  transform:translateX(-50%);                  /* centre on the value set in JS */
}


/* =====================================================================
   442:580 — EVERY CALLOUT IS ZUHAIR'S OWN RENDER (Session E)
   =====================================================================
   The 3-2-1, GO!, the four messages and the three clock changes. S20b and
   S20c set these as TYPE and wrote "IT IS TYPE, NOT AN IMAGE, AND THAT IS
   NOT A LIBERTY". That was right when written. It is REVERSED here, at the
   owner's pick, and every reason is a measurement:

   WHY TYPE WAS RIGHT. 326:3-11 were TEXT with a soft cream glow, and weight
   900 of the shipped face IS his Black, so CSS rendered his glyph. Exporting
   looked like a dead end twice over: download_assets bakes the canvas ground
   in, and a glow keyed off grey loses its alpha.

   WHY IT CHANGED. 442:580 is still TEXT, but it is no longer a treatment
   type can carry. Measured off his renders: an OPAQUE outside stroke, 8px on
   the 96px messages and chips and 5px on the 250px digits and 200px GO!, with
   Figma's 10px glow beyond it (alpha 170 -> 0 over 10px on every node);
   #471114 maroon fill, and #cfff00 lime with a MAROON stroke on -2s and -3s;
   every message SKEWED and rotated by a transform the generated code drops.
   And the face is ExtraBlack, which fonts/ does not ship -- so type could
   only ever be a lighter, narrower copy under a stroke that shows the weight.

   WHY THIS IS NOT WHAT S20b AVOIDED. get_screenshot with contentsOnly returns
   REAL alpha -- the glow's falloff is in these files -- and this build draws
   every callout at HIS size (250/200/96px), so his natural-size render is 1:1
   and nothing is upscaled. Cropped to ALL ink (alpha > 0, so no glow is cut):
   2.0 MB decoded for the eleven.

   THE STRING STILL CHOOSES. core/hud.js and hud-sync.js write the exact string
   into `data-say` (and into the element as text, transparent, because
   tests/hit.py and tests/run_loop.py read it), and the selectors match the
   EXACT string, so a string with no render paints NOTHING and turns
   tests/hud_figma.py red. MISSED DELIVERY! is his own correction (442:586).
   DELIVERED! IS OURS SINCE SESSION O (the owner): 442:585 is DELIVERD!,
   misspelled, and it was used as drawn until then. say-delivered.png is made
   from HIS OWN OUTLINES by tools/art/make_callout_assets.py -- his glyphs, his
   2.17deg, his stroke and glow, one E added from his own -- flagged for him as
   fixed by us, and CONFIRMED BY HIM (Session T). His misspelling has no rule now
   and paints nothing.

   BEHIND THE START GATE. The files are in seams.js Game.sprites, so START
   stays locked until they have decoded: a count that paints late is a rider
   with no start signal.

   FIXED BY US, SESSION O (the owner; flagged in Session E): -3s AND -2s each
   carried a see-through gap between the minus and the digit, where the two
   glyphs' outside strokes did not meet and only the half-transparent glow
   filled it -- 98px (10x12) in -3s, 51px (9x10) in -2s; +5s has none. The
   pocket is filled in his own stroke colour, off the chip, and nothing else in
   his render changes (tools/art/make_callout_assets.py); tests/hud_figma.py
   reads it off the screen over black and white. CONFIRMED BY HIM (Session T).
   ================================================================== */
#callout.count, #callout.say, #timeplus{
  color:transparent; text-shadow:none;
  background-position:center; background-size:auto; background-repeat:no-repeat
}
#callout[data-say="3"]{   background-image:url(assets/hud/callouts/count-3.png) }
#callout[data-say="2"]{   background-image:url(assets/hud/callouts/count-2.png) }
#callout[data-say="1"]{   background-image:url(assets/hud/callouts/count-1.png) }
#callout[data-say="GO!"]{ background-image:url(assets/hud/callouts/count-go.png) }
#callout[data-say="DELIVERED!"]{       background-image:url(assets/hud/callouts/say-delivered.png) }
#callout[data-say="MISSED DELIVERY!"]{ background-image:url(assets/hud/callouts/say-missed-delivery.png) }
#callout[data-say="SPILLED!"]{         background-image:url(assets/hud/callouts/say-spilled.png) }
#callout[data-say="BUMP!"]{            background-image:url(assets/hud/callouts/say-bump.png) }
#timeplus[data-say="+5s"]{ background-image:url(assets/hud/callouts/time-plus-5s.png) }
#timeplus[data-say="-2s"]{ background-image:url(assets/hud/callouts/time-minus-2s.png) }
#timeplus[data-say="-3s"]{ background-image:url(assets/hud/callouts/time-minus-3s.png) }

/* THE MESSAGE BOX. 240px tall, centred on the same y=230 as the 220px box it
   replaces, because MISSED DELIVERY! is set on two lines in 442:586 and its
   render is 229px -- the old box would have cut 9px off the art. */
#callout.say{
  display:grid; place-items:center; position:absolute;
  left:0; top:110px; width:1920px; height:240px;
  font-weight:900; font-size:96px; line-height:96px;
  opacity:0; transform:scale(1)
}
/* Same shape as the count's: in fast, hold, out. It reuses `co-count` so
   the two cannot drift apart in feel, and `animationend` in core/hud.js
   already strips the class for any callout, not just the numeric ones. */
#callout.say.go{ animation:co-count .9s ease-out }

/* The clock's change. LEFT COLUMN, not centred, because it fires at the
   same instant as DELIVERED! and two callouts on one axis collide. x<380 and
   y clear of the clock group (ends 300) and the rider patch (ends 418), so it
   lands under both and outside ROAD. His three renders are 176..195 x
   105..107, inside this 300x120 box. */
#timeplus{
  display:none; position:absolute; left:40px; top:432px;
  width:300px; height:120px;
  place-items:center;
  font-weight:900; font-size:96px; line-height:96px;
  opacity:0
}
#timeplus.go{ display:grid; animation:co-count .9s ease-out }

/* =====================================================================
   THE ENDING — Session O. NOT IN ZUHAIR'S ART -- TIME'S UP! CONFIRMED BY HIM (Session T)
   =====================================================================
   The clock has reached zero and the bike has rolled to a stop (game.js). Then the
   stopped road tints dark, and TIME'S UP! comes up in the centre with what the rider
   delivered under it -- the owner's brief, beat for beat -- and the score screen fades
   in over all of it. hud-sync.js drives it off the ending's own clock (endingView).

   OVER THE ROAD, AND OVER THE HUD, AND ONLY IN THE ENDING. It is not in #hud, so the
   "nothing on the road" rule tests/hud_figma.py holds #hud to is not bent: it is its own
   layer, over the canvas and the HUD and under the screens (.screen is z-index 5), and
   it generates no box until the ending starts (tests/ending.py).

   THE TINT is black at 70% (END_TINT in tuning.js, where the pick is written down).

   TIME'S UP! IS A RENDER, chosen by its exact string as every callout is: ours, from
   tools/art/make_callout_assets.py, in his count's treatment at GO!'s 200px -- the
   ending is the count's bookend -- FILLED TALABAT ORANGE #FF5900 since Session P, his
   cream outline kept (the owner) -- and his when he draws it, as the same file. The
   selector spells his apostrophe as an escape, U+2019, so no file encoding can stand
   between the string game code writes and the art it chooses.

   THE ORDERS UNDER IT are SVG text in index.html (why SVG is written there), at his
   messages' 96px and 8px stroke. THE BLOCK -- the headline's 174px of art, his 18px, the
   line's ink -- is centred on the frame: 392 to 687 about y=540, and both on x=960. */
#ending{ display:none; position:absolute; inset:0; z-index:4; pointer-events:none }
#ending.on{ display:block }
#end-tint{ position:absolute; inset:0; background:#000; opacity:0 }
#end-say{ position:absolute; inset:0; opacity:0; transform-origin:960px 540px }
#end-head{
  position:absolute; left:0; top:392px; width:1920px; height:174px;
  color:transparent; font-weight:900; font-size:200px; line-height:174px;
  text-align:center; white-space:nowrap;
  background-repeat:no-repeat; background-position:center; background-size:auto
}
#end-head[data-say="TIME\2019 S UP!"]{ background-image:url(assets/hud/callouts/say-times-up.png) }
#end-count{ position:absolute; left:0; top:556px; width:1920px; height:160px; overflow:visible }

/* =====================================================================
   326:12 — THE ORDER CARD
   =====================================================================
   Who it is for, what is being carried, which leg. No address: the areas
   live on the route pill (146:821), which is where they were always
   drawn.

   IT SITS IN THE RIGHT COLUMN because tests/hud_figma.py holds
   ROAD = (380, 0, 1610, 925) against every painted element in #hud, and
   unlike the callouts this one is UP FOR THE WHOLE LEG since Session F
   (it held CARD_HOLD + COUNTDOWN = 5.2s until then). The countdown's
   over-the-road exemption is for something that flashes; a card that is
   always up does not get it. What passes UNDER it anyway -- a right-lane
   car's roof, the drop-off marker clamped to the right edge -- is measured
   in the block above showOrderCard in hud-sync.js.

   `display:none` when it is off, so the same check skips it entirely
   rather than measuring a zero-opacity box lying across the frame.
   ================================================================== */
#ordercard{ display:none }
#ordercard.on{
  display:block; position:absolute;
  left:1640px; top:280px; width:225px; height:190px;
  transform:rotate(-3deg);          /* his sticker is set at an angle */
  color:var(--cream); text-align:left
}
#ordercard .oc-sticker{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:contain
}
#ordercard .oc-row{
  position:absolute; left:34px; display:flex; align-items:center; gap:7px;
  font-weight:600; letter-spacing:.4px; white-space:nowrap
}
#ordercard .oc-who { top:44px;  font-size:16px; color:rgba(244,237,227,.83) }
#ordercard .oc-what{ top:74px;  font-size:15px; color:rgba(244,237,227,.80) }
#ordercard .oc-ico { width:14px; height:16px; opacity:.83 }
/* The item icon is height-sized: the ten groceries (Session E) run from
   101x279 (water bottle) to 308x198 (croissant), so a fixed BOX would squash
   the wide ones and starve the tall ones. */
#ordercard .oc-food{ width:auto; height:26px }
#ordercard .oc-idx{
  position:absolute; left:34px; top:106px;
  font-weight:900; font-size:20px; color:var(--cream);
  text-shadow:0 0 8px var(--cream)
}

/* ---------------------------------------------------------------------
   NOT IN THE FIGMA — see the block of the same name in index.html.
   Six readouts the game drives that Zuhair's frame has no design for.
   The elements stay so every code path still runs unchanged; nothing
   paints them, nothing has been invented, and nothing has been carried
   over from the portrait build. They need a design before they ship.
   ------------------------------------------------------------------ */
#orphans{ display:none }


/* =====================================================================
   THE 3-2-1-GO IS ZUHAIR'S NOW — 326:5, 326:4, 326:3, 326:6
   =====================================================================
   S20b. It used to be designed here, out of parts of his other frames,
   because no countdown existed in the file and the standing start is a
   locked decision. He has drawn one, so the invention is retired.

   WHAT WENT. The `sticker-time.png` octagon behind the numeral, the cream
   fill, the lime GO, the 17px optical lift and the 176px GO size — all of
   it was scaffolding for type on a sticker, and there is no sticker now.
   THE TIMING IS UNTOUCHED: three beats then GO, one token per second from
   game.js, and both keyframes below are byte-for-byte what they were.

   SESSION E: THE COUNT IS HIS RENDER NOW, NOT TYPE — 442:581-584, #471114
   with a 5px cream stroke. The reasons, and the reversal of the paragraph
   that used to stand here ("IT IS TYPE, NOT AN IMAGE"), are in the 442:580
   block above; the art is chosen there by `data-say`.

   SIZES ARE STILL HIS: 250px digits and 200px GO!, and the renders are
   those sizes 1:1 (3 is 166x210 of ink with its glow, GO! 392x174).

   THE COLOUR ANALYSIS THAT STOOD HERE MEASURED #ff5900 — the delivery box's
   own orange, where a digit moved onto the box lost its fill (dE 59.6, worst
   5% 11.7) and only the cream halo saved it. The fill is maroon now with an
   opaque cream stroke, so that table no longer describes these colours. The
   geometry it motivated still holds and is still checked: the box keeps the
   count over the pale sky, its ink well above y=417 where the bike's starts.

   WHERE IT SITS is unchanged and every number is still against something:
     centred x, because the count is the one thing that owns the frame
     top 75, which clears the TIME LEFT group (146:774, ends y=300) and
       the rider patch (146:784, ends y=418) in the only direction that
       matters — it is 420 wide and centred, so it never comes near either
     385 tall. The box is now a positioning frame rather than a drawn
       object: nothing paints but the glyph.

   IT IS THE ONE THING IN THIS FILE ALLOWED OVER THE ROAD, and only
   during the count. tests/hud_figma.py asserts it is gone again the
   moment the run starts, and `animationend` in core/hud.js is what takes
   it out of the layout rather than just fading it — a spent one that
   still has a box is a 420x385 rectangle lying on the road.

   THE FOUR MESSAGES PAINT TOO, since S20c, through `.say` — see the
   442:580 block above. core/hud.js adds `.count` for a numeric token or GO!
   and `.say` for everything else.
   ================================================================== */
#callout{ display:none }
#callout.count{
  display:grid; place-items:center; position:absolute;
  left:750px; top:75px; width:420px; height:385px;
  font-weight:900; font-size:250px; line-height:250px;
  /* S20b's glow sweep stood here -- 20px of CSS blur against Figma's 10px,
     solved against his node render. It measured TYPE; the count is his render
     now and carries its own glow, so there is no blur left to solve. The
     lesson it recorded still holds: a Figma blur radius is not a CSS one. */
  opacity:0; transform:scale(1)
}
/* GO! KEEPS ITS OWN RULE for its size and `co-go` below. It was lime until
   S20b and #ff5900 until Session E; it is his #471114 render like the digits. */
#callout.count.final{ font-size:200px; line-height:200px }

/* One token per second (game.js counts in whole seconds), so each clears
   before the next arrives instead of stacking. The pop is scale only — the
   sticker is a bitmap and scaling it up from 1.0 would soften it, so it
   settles DOWN onto its drawn size from 1.14 and never renders above 1:1
   except for the 90ms of the entry, where the movement hides it. */
@keyframes co-count{
    0% { opacity:0; transform:scale(1.14) }
   12% { opacity:1; transform:scale(1) }
   64% { opacity:1; transform:scale(1) }
  100% { opacity:0; transform:scale(.94) }
}
/* GO gets its own: it rings OUT rather than settling in, so the last thing a
   rider sees before the road starts moving is the sticker leaving. */
@keyframes co-go{
    0% { opacity:0; transform:scale(.86) }
   10% { opacity:1; transform:scale(1) }
   45% { opacity:1; transform:scale(1) }
  100% { opacity:0; transform:scale(1.5) }
}
#callout.count.go{ animation:co-count .9s ease-out }
#callout.count.final.go{ animation:co-go .8s ease-out }
