/* The round (1.0.3 polish, section B of the handoff): the action slot, the
   reveal, the shot clock, the intro card's demo and Count's slider. Loaded
   last, so the play screen's skeleton is decided in one place.

   ---------- B5. One action slot ----------
   Play, Lock in, Next shot and See results are one button in one place: the
   foot of the screen, above the home indicator, the field's full width, one
   height. It is the last thing in #controls on every shot (the fourteen canvas
   shots, the keen1 shots and Season 2 share this chrome), so nothing about a
   renderer decides where it sits.

   The column, top to bottom: header, strip, the field, then the dock. The dock
   keeps one height through the intro card, play and the reveal (--dock-h) and
   its contents stand on its floor: the instruction and any slider just above
   the slot while playing, the result card just above the slot on the reveal.
   Because that height never changes, the field never moves; it sits centred in
   whatever the screen has left over.

   A number field with the keyboard up keeps its own layout (design.css). On a
   screen too short for all of it (a phone on its side) the column is taller
   than the screen and scrolls, as it did before, with the slot at its foot. */
#app{
  --slot-h:54px;
  --slot-foot:max(16px,calc(var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)) + 6px));
  --band-h:54px;
  --dock-h:226px;
  /* What stands above the field: the header (app.js measures it as --head-h,
     because its meta line wraps on a narrow phone and grows with larger text),
     then the strip and the gaps around it. */
  --chrome-rest:64px;
  --chrome-h:calc(var(--head-h,63px) + var(--chrome-rest));
}
/* A run with no strip (Playground, a practice) ends each shot on two buttons:
   Try again over Try for real, Choose another shot over Again. The room the
   strip would have had goes to the dock, so the second button never pushes the
   result card up over the band. */
#app:has(>#play>.strip[hidden]){--dock-h:280px;--chrome-rest:18px}
/* Controls that arrive part-way through a shot (Count's, after its one look)
   come in with their question on one short fade (app.js arriveInDock). */
body[data-phase="play"] #play>.dock.is-arriving>:is(.instr,#controls){animation:round-dock-in .2s ease-out both}
@keyframes round-dock-in{from{opacity:0}}
@media (prefers-reduced-motion:reduce){body[data-phase="play"] #play>.dock.is-arriving>:is(.instr,#controls){animation:none}}
/* A run against someone ends each shot on a head-to-head line as well; the dock
   keeps that room from the first card on, so the field holds its place. */
#app:has(>#play.is-duel){--dock-h:286px}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app{
  /* the header, the strip (34) and the gaps around it (--chrome-h), the dock and the foot. */
  --shot-width:min(100%,max(180px,calc(100svh - var(--chrome-h) - var(--dock-h) - var(--slot-foot) - max(10px,var(--safe-area-inset-top,env(safe-area-inset-top,0px))))));
  height:auto;min-height:100svh;gap:12px;padding-bottom:var(--slot-foot);
}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play{
  display:flex!important;flex-direction:column;flex:1 0 auto!important;gap:0;
  width:100%;max-width:none;min-height:0!important;height:auto!important;
  margin:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none;
}
/* The strip and the field travel together, centred in the space the header
   and the dock leave: one auto margin above the strip, one above the dock. */
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>.strip{flex:none;margin:auto 0 0}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>#stage{
  flex:none;align-self:center;width:var(--shot-width);max-width:none;margin:12px auto 0;
}
/* A run with no strip (Playground, a practice before the daily): the field takes the upper margin itself. */
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>.strip[hidden]+#stage{margin-top:auto}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>.dock{
  display:flex!important;flex-direction:column;justify-content:flex-end;gap:10px;
  flex:none;align-self:stretch;width:auto;box-sizing:border-box;
  min-height:var(--dock-h);margin:auto 0 0;padding:12px 0 0;
  background:none;border:0;border-radius:0;box-shadow:none;animation:none;
}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>.dock>#controls{
  display:flex!important;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:10px;
  flex:none;min-height:var(--slot-h);margin:0;padding:0;
}
/* The instruction: the last words above the slot, set on the screen's axis. */
:root[data-theme] body[data-phase="play"]:not(.keyboard-open) #app>#play>.dock>.instr{
  display:block;flex:none;min-height:0;margin:0;padding:0 6px;text-align:center;text-wrap:balance;
  font:400 1rem/1.4 var(--card-label,var(--font-ui));color:var(--es-ink);
}
:root[data-theme] body[data-phase="play"]:not(.keyboard-open) #app>#play>.dock>.instr>span:not([class]){display:inline;font-size:inherit;line-height:inherit}
:root[data-theme] body[data-phase="play"]:not(.keyboard-open) #app>#play>.dock>.hint{order:0;margin:0;padding:0 6px;text-align:center;text-wrap:balance;color:var(--es-ink-2)}
/* The slot. Anything else a screen offers (Practice first, Choose another
   shot, Back) stands above it. */
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>.dock>#controls>.btn.primary{
  order:9;position:static;flex:none;box-sizing:border-box;
  width:100%;max-width:none;height:var(--slot-h);min-height:var(--slot-h);margin:0;padding:0 18px;
  border:0;border-radius:14px;transform-origin:center;
  font:700 1.06rem/1 var(--card-label,var(--font-ui));letter-spacing:0;white-space:nowrap;
  box-shadow:0 1px 0 rgba(255,255,255,.1) inset,0 5px 14px -9px rgba(3,10,22,.35);
}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #app>#play>.dock>#controls>.btn.primary svg{width:18px;height:18px}
/* A waiting Lock in is the same filled button at lower contrast, not an outline
   (an outline is how the app draws a secondary button). */
:root[data-theme] body[data-phase="play"] #app>#play>.dock>#controls>.btn.primary:disabled{
  opacity:1;border:0;cursor:default;
  background:color-mix(in srgb,var(--btn) 42%,var(--es-ground));
  color:color-mix(in srgb,var(--btn-text) 88%,var(--btn));
  box-shadow:none;
}
:root[data-theme="light"] body[data-phase="play"] #app>#play>.dock>#controls>.btn.primary:disabled{background:color-mix(in srgb,var(--btn) 52%,var(--es-ground))}

/* ---------- The intro card (B5, B8) ----------
   Laid out as the shot will be: the field's own square, the objective where
   the instruction will stand, and Play in the slot. Pressing Play changes what
   the screen says, not where anything is.
   What stands in the square is a picture of the shot, never something that
   could be it (AJ, 29 Nov): a smaller plate, dashed, without the field's
   paper, its edge or its shadow, with its loop running along the foot. A demo
   with a slider is a little taller than wide. */
:root[data-theme] body.shot-ready:not(.keyboard-open) #app>#play>#stage{
  display:block;width:var(--shot-width);height:auto;aspect-ratio:1/1;min-height:0;max-width:none;
  background:none;border:0;border-radius:0;box-shadow:none;overflow:visible;
}
:root[data-theme] body.shot-ready #stage>#stage-ui{position:absolute;inset:0;display:block;height:auto;padding:0}
:root[data-theme] body.shot-ready #shot-ready{display:grid;place-items:center;width:100%;height:100%;padding:0}
:root[data-theme] body.shot-ready #shot-ready>.ready-demo{display:grid;place-items:center;width:100%;height:100%;margin:0}
:root[data-theme] body.shot-ready .ready-demo>.demo-plate{
  --demo-pad:10px;
  position:relative;box-sizing:border-box;width:min(76%,calc(var(--shot-width) * .9 * var(--demo-aspect,1)));
  padding:var(--demo-pad) var(--demo-pad) calc(var(--demo-pad) + 9px);
  border:1.5px dashed var(--es-line-strong);border-radius:20px;
}
:root[data-theme] body.shot-ready .demo-plate>.shot-demo-field{
  width:100%;height:auto;max-width:100%;aspect-ratio:var(--demo-aspect,1);
  background:color-mix(in srgb,var(--es-surface) 62%,transparent);border:0;border-radius:11px;box-shadow:none;
}
:root[data-theme] body.shot-ready .demo-plate>.shot-demo-field.is-night{background:#081A36}
.demo-loop{position:absolute;left:var(--demo-pad);right:var(--demo-pad);bottom:8px;height:3px;border-radius:2px;overflow:hidden;background:color-mix(in srgb,var(--es-ink) 14%,transparent)}
.demo-loop>b{display:block;width:100%;height:100%;border-radius:inherit;background:color-mix(in srgb,var(--es-ink) 62%,transparent);transform:scaleX(0);transform-origin:left center}
@media (prefers-reduced-motion:reduce){.demo-loop{display:none}}
/* A shot with no demo keeps its icon in the field's place. */
:root[data-theme] body.shot-ready #shot-ready>.ready-summary{display:grid;place-items:center;grid-template-columns:none;gap:0}
:root[data-theme] body.shot-ready.ready-demoed #shot-ready>.ready-summary{display:none}
:root[data-theme] body.shot-ready #shot-ready>p{margin:0;font:400 .95rem/1.4 var(--card-label,var(--font-ui));color:var(--es-ink-2);text-align:center}
#shot-ready-brief{display:grid;gap:5px;justify-items:center;margin:0;padding:0 6px 2px;text-align:center}
#shot-ready-brief>h2{margin:0;font:700 clamp(1.06rem,4.7vw,1.24rem)/1.28 var(--card-label,var(--font-ui));letter-spacing:0;text-transform:none;text-wrap:balance;color:var(--es-ink)}
#shot-ready-brief>h2:focus{outline:none}
#shot-ready-brief>.ready-clock{margin:0;font:400 .9rem/1.35 var(--card-label,var(--font-ui));color:var(--es-ink-2)}
:root[data-theme] body:is(.shot-ready,[data-phase="play"]) #app>#play>.dock>#controls>.ready-links{display:flex;justify-content:center;margin:-4px 0 -6px}
/* A practice before the real shot: stamped, and its field dashed (as the demo's plate is). */
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) .app-header>#shot-heading>.practice-stamp{
  font:900 15px/1 var(--display);letter-spacing:.11em;text-transform:uppercase;color:var(--es-coral);
  padding:5px 9px 4px;border:2px solid var(--es-coral);border-radius:3px;background:var(--es-ground);
}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) .app-header>#shot-heading>.practice-stamp{font-size:13px;padding:4px 8px 3px;margin:3px 0;overflow:visible;transform:rotate(-3deg)}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #app>#play.is-warmup>#stage{border-style:dashed;border-color:var(--es-line-strong)}

/* ---------- B2. The band: the key to the drawing ----------
   The foot of the field's paper holds only what is needed to read the drawing:
   which mark is whose, or the two numbers of a shot answered with a number.
   What it measured is a sentence in the card (reveal-band.js). It takes no room
   of its own (it hangs over the top of the dock's reserve), so the field and
   the card stay where they are whether a shot has one or not. Its paper is
   there from the first frame of the reveal; what it says arrives on the
   reveal's clock. */
:root[data-theme] body[data-phase="reveal"] #app>#play>.shot-facts:not([hidden]){
  position:relative;z-index:1;flex:none;align-self:center;box-sizing:border-box;
  display:grid;align-content:center;justify-items:center;gap:0;
  width:var(--shot-width);max-width:100%;height:var(--band-h);min-height:var(--band-h);
  margin:0 0 calc(-1 * var(--band-h));padding:0 12px;opacity:1;transform:none;
}
:root[data-theme] body[data-phase="reveal"] #app>#play>.shot-facts[data-layout="legend"]{--band-h:40px}
:root[data-theme] body[data-phase="reveal"] #app>#play>.shot-facts[hidden]{display:none!important}
:root[data-theme] body[data-phase="reveal"] #app>#play>.shot-facts:not([hidden])>*{
  opacity:0;transform:translateY(5px);
  transition:opacity .2s ease-out,transform .26s cubic-bezier(.2,.8,.2,1);
}
:root[data-theme] body[data-phase="reveal"] #app>#play>.shot-facts.is-in:not([hidden])>*{opacity:1;transform:none}
.shot-facts .facts-legend{flex-wrap:nowrap;gap:22px;padding-bottom:6px;font:400 .84rem/1.2 var(--card-label,var(--font-ui));color:var(--es-ink-2)}
.shot-facts .fact-k{font:400 .78rem/1.15 var(--card-label,var(--font-ui));letter-spacing:0;text-transform:none}
.shot-facts .fact-v{font-size:1.6rem}
/* A narrow field (a short phone, an iPhone SE). */
@container (max-width:300px){
  .shot-facts .facts-legend{gap:14px;font-size:.74rem}
  .shot-facts .facts-legend .lg-line,.shot-facts .facts-legend .lg-dash{width:16px}
  .shot-facts .fact-k{font-size:.7rem}
  .shot-facts .fact-v{font-size:1.3rem}
}

/* ---------- B1, B3. The result card ----------
   The score, the verdict and the standing, directly above the slot. The number
   counts in plain ink; as it stops it takes its band's colour, the verdict
   lands beside it, and the standing follows a beat later (app.js revealScript
   sets .is-landed and .is-placed). The gold of a hundred arrives with the
   landing too, never before. */
:root[data-theme] body[data-phase="reveal"] #app>#play>.dock>#controls>.score-chip{
  order:1;position:relative;box-sizing:border-box;flex:none;
  display:grid;align-content:center;gap:6px;width:100%;max-width:none;min-height:84px;margin:0;padding:10px 18px;
  background:var(--es-surface);border:1px solid var(--es-line);border-radius:20px;box-shadow:var(--es-shadow-soft,var(--es-shadow));
  animation:round-card-in .26s cubic-bezier(.2,.9,.25,1) both;
}
@keyframes round-card-in{from{opacity:0;transform:translateY(10px)}}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip .score-line{display:grid;grid-template-columns:auto minmax(0,1fr);gap:0;align-items:center;margin:0}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip .n{
  display:block;width:auto;height:auto;min-width:0;min-height:0;margin:0 18px 0 0;padding:2px 18px 0 0;
  border:0;border-right:1px solid var(--fx-rule);border-radius:0;background:none;box-shadow:none;transform:none;animation:none;
  font:900 64px/.86 var(--display);letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:var(--es-ink);
  transition:color .22s ease-out;
}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip.is-landed .n.g-good{color:var(--band-ink-good,var(--band-good))}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip.is-landed .n.g-ok{color:var(--band-ink-ok,var(--band-ok))}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip.is-landed .n.g-meh{color:var(--band-ink-meh,var(--band-meh))}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip.is-landed .n.g-bad{color:var(--band-ink-bad,var(--band-bad))}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip .d{display:grid;gap:3px;align-content:center;min-width:0;text-align:left;container-type:inline-size}
/* The verdict, how far off, and the standing: three lines of plain words, the
   number beside them the only thing in colour (AJ, 29 Nov: the old lowercase
   "Sharp recall / Off by 2.8%" over a word in capitals). */
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip .d>b{
  font:700 1.24rem/1.18 var(--card-label,var(--font-ui));letter-spacing:-.008em;text-transform:none;color:var(--es-ink);text-wrap:balance;
  /* One line where it can be: the size steps down with the word's length (--chars, set by app.js). */
  font-size:clamp(1.02rem,calc(100cqw / (var(--chars,10) * .56)),1.24rem);
  opacity:0;transform:translateY(5px);
  transition:opacity .16s ease-out,transform .24s cubic-bezier(.2,.8,.2,1);
}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip.is-landed .d>b{opacity:1;transform:none}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip .d>span{
  font:400 .92rem/1.32 var(--card-label,var(--font-ui));color:var(--es-ink);text-wrap:pretty;
  opacity:0;transform:translateY(4px);transition:opacity .2s ease-out,transform .24s cubic-bezier(.2,.8,.2,1);
}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip .d>span:is(:empty,[hidden]){display:none}
/* How far off lands with the verdict, a beat behind it; the standing follows. */
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip.is-landed .d>[data-score-detail]{opacity:1;transform:none;transition-delay:.06s}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip.is-placed .d>span{opacity:1;transform:none}
/* The standing: what the finish lane's standingCopy() says, with the globe it speaks of. */
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip .d>.shot-population{font-size:.86rem;color:var(--es-ink-2)}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip:not(.is-perfect)>.perfect-crown{display:none}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip.is-perfect{padding:10px 18px;border-radius:20px}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip.is-perfect .n{border-right-color:rgba(36,26,8,.28)}
:root[data-theme] body[data-phase="reveal"] #controls>.score-chip.is-perfect>.perfect-crown{animation:round-crown-in .3s cubic-bezier(.2,1.5,.4,1) both}
@keyframes round-crown-in{from{opacity:0;transform:rotate(13deg) translateY(8px) scale(.6)}}
/* What else the reveal offers stands between the card and the slot. A challenge's
   "You win this shot by 20" would give the score away, so it keeps its place
   and arrives with the standing, after the number has stopped. */
:root[data-theme] body[data-phase="reveal"] #app>#play>.dock>#controls>:is(.duel-shot,.shot-challenge){
  order:2;visibility:hidden;opacity:0;transform:translateY(4px);
  transition:opacity .2s ease-out,transform .24s cubic-bezier(.2,.8,.2,1),visibility 0s linear .2s;
}
:root[data-theme] body[data-phase="reveal"] #app>#play>.dock>#controls>.score-chip.is-placed~:is(.duel-shot,.shot-challenge){visibility:visible;opacity:1;transform:none;transition-delay:0s}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #app>#play>.dock>#controls>.btn:not(.primary){order:5;flex:none;min-height:44px;margin:0}
/* The strip's pill fills with the score when the number lands, not before. */
:root[data-theme] body[data-phase="reveal"] #strip .slot{transition:background-color .22s ease-out,color .22s ease-out}
:root[data-theme] body[data-phase="reveal"] #strip.is-pending .slot.pop,
:root[data-theme] body[data-phase="reveal"] #strip.is-pending .slot.pop.done.is-perfect{background:none;background-image:none;color:var(--es-ink);box-shadow:inset 0 0 0 2px var(--es-ink)}
:root[data-theme] body[data-phase="reveal"] #strip.is-pending .slot.pop :is(.slot-score,.perfect-crown){display:none}
:root[data-theme] body[data-phase="reveal"] #strip.is-pending .slot.pop .em{filter:none;color:inherit}
@media (prefers-reduced-motion:reduce){
  :root[data-theme] body[data-phase="reveal"] #app>#play>.shot-facts:not([hidden])>*,
  :root[data-theme] body[data-phase="reveal"] #controls>.score-chip,
  :root[data-theme] body[data-phase="reveal"] #controls>.score-chip :is(.n,.d>b,.d>span),
  :root[data-theme] body[data-phase="reveal"] #controls>.score-chip.is-perfect>.perfect-crown,
  :root[data-theme] body[data-phase="reveal"] #strip .slot,
  :root[data-theme] body[data-phase="reveal"] #app>#play>.dock>#controls>:is(.duel-shot,.shot-challenge){animation:none;transition:none}
}

/* ---------- B6. The shot clock ----------
   One row inside the field's top edge: a stopwatch, the seconds left, and a bar
   that drains toward them, winding up to full as it arrives. All of it turns
   red for the last five. app.js (paintClock) says how much is left; the row
   stands in the 30px the drawing has always left free. */
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #stage>.timebar{
  --clock:var(--es-ink);
  position:absolute;z-index:2;left:0;right:0;top:0;height:29px;box-sizing:border-box;
  display:flex;align-items:center;gap:6px;padding:1px 16px 0 13px;
  background:none;pointer-events:none;color:var(--clock);transition:color .2s ease-out;
}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #stage>.timebar[hidden]{display:none}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #stage>.timebar[data-calm="urgent"]{--clock:var(--fx-you)}
#stage>.timebar>.clock-face{flex:none;width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.200;stroke-linecap:round;overflow:visible}
#stage>.timebar .clock-hand{transform-origin:12px 13.600px}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #stage>.timebar>b{
  flex:none;min-width:1.320em;font:900 1.120rem/1 var(--display);letter-spacing:.01em;font-variant-numeric:tabular-nums;color:inherit;text-align:left;
  transform-origin:left center;
}
#stage>.timebar>.clock-rule{flex:1;min-width:0;height:5px;border-radius:3px;overflow:hidden;background:color-mix(in srgb,var(--clock) 17%,transparent);transform-origin:left center;animation:clock-wind .5s cubic-bezier(.2,.8,.2,1) both}
@keyframes clock-wind{from{transform:scaleX(0)}}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #stage>.timebar>.clock-rule>i{
  display:block;width:100%;height:100%;border-radius:inherit;background:var(--clock);transform-origin:left center;
  transition:background-color .2s ease-out;
}
/* A Season 2 night field is navy in both themes: its clock is drawn in chalk. */
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #stage.season-night>.timebar{--clock:#F5F1E6}
:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #stage.season-night>.timebar[data-calm="urgent"]{--clock:#FF8873}
@media (prefers-reduced-motion:reduce){#stage>.timebar>.clock-rule{animation:none}:root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #stage>.timebar i{transition:none}}

/* ---------- Count's slider, with − and + for the last dot ----------
   Count is answered on Percent's slider, as it was before 1.0.3 (AJ, 29 Nov).
   An exact count is worth getting to the dot, so the read-out stands between a
   small − and +: one a press, a held press keeps going. They sit inside the
   line the read-out already had, so the slider, Lock in and the field are
   where Percent's are. */
.estimate-slider-head:has(>.estimate-fine){align-items:center}
.estimate-fine{display:flex;align-items:center;gap:8px}
.estimate-fine>.estimate-readout{min-width:2ch;text-align:center}
.estimate-fine>.estimate-step{
  position:relative;display:grid;place-items:center;box-sizing:border-box;width:40px;height:36px;margin:-3px 0;padding:0 0 2px;
  border:1px solid var(--es-line-strong);border-radius:12px;background:var(--es-surface);color:var(--es-ink);
  font:700 1.35rem/1 var(--card-label,var(--font-ui));box-shadow:var(--es-shadow-soft,none);
  touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;cursor:pointer;
  transition:transform .08s ease-out,background-color .12s ease-out;
}
/* The finger's target is at least 44 px each way, whatever the button's drawn size. */
.estimate-fine>.estimate-step::after{content:"";position:absolute;inset:-6px -4px}
.estimate-fine>.estimate-step.is-held{transform:scale(.94);background:var(--es-surface-2)}
.estimate-fine>.estimate-step[aria-disabled="true"]{color:var(--es-ink-3);opacity:.5;cursor:default}
.estimate-fine>.estimate-step:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.estimate-fine>.estimate-step{transition:none}}

/* ---------- A short phone (320 x 568 and its like) ----------
   The same skeleton with everything a size smaller, so the slot still stands
   at the foot with nothing to scroll: a lower slot, band and card, tighter
   gaps, and the instruction a size down. */
@media (max-height:620px) and (max-width:600px){
  #app{--slot-h:48px;--band-h:46px;--dock-h:204px;--chrome-rest:50px}
  #app:has(>#play>.strip[hidden]){--dock-h:255px;--chrome-rest:8px}
  #app:has(>#play.is-duel){--dock-h:261px}
  :root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app{gap:8px}
  :root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>#stage{margin-top:8px}
  :root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>.dock{gap:7px;padding-top:8px}
  :root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>.dock>#controls{gap:7px}
  :root[data-theme] body[data-phase="play"]:not(.keyboard-open) #app>#play>.dock>.instr{font-size:.875rem;line-height:1.32}
  :root[data-theme] body[data-phase="reveal"] #app>#play>.dock>#controls>.score-chip{min-height:70px;padding:7px 14px}
  :root[data-theme] body[data-phase="reveal"] #controls>.score-chip .n{font-size:54px;margin-right:14px;padding-right:14px}
  :root[data-theme] body[data-phase="reveal"] #controls>.score-chip .d>b{font-size:clamp(.95rem,calc(100cqw / (var(--chars,10) * .56)),1.1rem)}
  :root[data-theme] body[data-phase="reveal"] #controls>.score-chip .d>span{font-size:.8rem}
  /* A field this small has its own lettering close under the top edge (Timer's
     "8s"): the clock is drawn smaller so the two never touch. */
  :root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #stage>.timebar{height:22px;padding:1px 12px 0 10px;gap:5px}
  #stage>.timebar>.clock-face{width:14px;height:14px}
  :root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]) #stage>.timebar>b{font-size:.95rem}
  #stage>.timebar>.clock-rule{height:4px}
  #shot-ready-brief{gap:3px}
  #shot-ready-brief>h2{font-size:1rem}
  #shot-ready-brief>.ready-clock{font-size:.82rem}
  .estimate-fine>.estimate-step{width:38px;height:32px;margin:-4px 0;font-size:1.2rem}
}

/* ---------- A phone on its side ----------
   Too short for the column: it scrolls, as it did before, with the slot at its
   foot. The dock gives up its reserve and the field its width so there is as
   little to scroll as possible. (iPhone is portrait only; this is the web and
   Android.) */
@media (max-height:500px) and (orientation:landscape){
  #app{--dock-h:0px;--band-h:46px;--slot-h:48px}
  :root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app{--shot-width:min(100%,max(150px,calc(100svh - 190px)));gap:8px}
  :root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>.strip{margin-top:0}
  :root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>#stage{margin-top:8px}
  :root[data-theme] body:is([data-phase="play"],[data-phase="reveal"]):not(.keyboard-open) #app>#play>.dock{margin-top:0;padding-top:10px;gap:8px}
  :root[data-theme] body[data-phase="reveal"] #app>#play>.shot-facts:not([hidden]){margin-bottom:0}
}
