/* /play, the racecard. Page rules only: tokens, type, buttons, tables and the sheet come from system.css.
   Every class here starts with pl-. Phone first (390 wide), then 720, 900, 1040 and 1400.

   Order on a phone: readout (sticky), sheet, running order, racecard, results. The slip is a bar fixed under the
   thumb. From 1040 the race sits in a sticky left column and the racecard in the right one, with the slip under
   the racecard title. From 1400 the racecard is two columns of 13 and 12, so all 25 runners fit one screen. */

.pl { --read: 66px; --slip-h: 56px; }
html:has(.pl) { scroll-padding-top: 104px; scroll-padding-bottom: calc(var(--slip-h) + 12px); }
.pl .site-head .wrap, .pl .site-foot .wrap, .pl-results > .wrap { max-width: calc(1440px + 2 * var(--gutter)); }
.pl .site-foot { padding-bottom: calc(40px + var(--slip-h)); }

.pl-deck { display: flex; flex-direction: column; }
.pl-left { display: contents; }

/* ---- readout ---- */
.pl-readout { position: sticky; top: 0; z-index: 20; background: var(--ground); }
.pl-readout-in { display: flex; align-items: center; justify-content: space-between; gap: 4px 12px; height: 56px; padding: 0 var(--gutter); }
.pl-clock { display: flex; align-items: baseline; gap: 8px; flex: none; }
.pl-time { font-size: 30px; line-height: 1; font-weight: 500; letter-spacing: -0.03em; min-width: 4ch; }
.pl-clock-for { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.pl-clock-for .fig { color: var(--text); }
.pl-lead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 2px 7px; min-width: 0; font-size: 13px; line-height: 1.3; color: var(--text-2); text-align: right; }
.pl-lead > span { white-space: nowrap; }
.pl-lead #lead { font-size: 15px; color: var(--text); }
.pl-lead #lead:not(.mark) b { font-weight: 600; }
.pl-readout .ticks { margin: 0 var(--gutter); }

/* ---- the sheet ---- */
.pl-sheet canvas { height: 200px; }
.pl-cap { padding: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-2); }

/* ---- running order ---- */
.pl-under { position: relative; padding: 0 var(--gutter); }
.pl-order-row { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.pl-k { flex: none; font: 400 13px/1.3 var(--sans); color: var(--text-2); }
.pl-order-line { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.pl-order-line span { margin-right: 12px; }
.pl-order-line .fig { margin-right: 4px; font-size: 13px; color: var(--text-2); }
.pl-order-line b { font-weight: 600; }
.pl-order-line .is-dim b { font-weight: 400; color: var(--text-2); }
.pl-order-line .is-lead b { background: var(--accent); color: var(--on-accent); padding: 1px 5px 2px; border-radius: 3px; }
.pl-all { flex: none; min-height: 44px; min-width: 44px; padding: 0; margin-left: auto; background: none; border: 0; font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; color: var(--text); cursor: pointer; white-space: nowrap; }
/* The call at the close takes the place of the running order for the three seconds a finished race is held. */
.pl-call { position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 44px; display: flex; align-items: center; visibility: hidden; font-size: 14px; line-height: 1.3; font-weight: 500; overflow: hidden; text-wrap: balance; }
.pl-under.is-call .pl-call { visibility: visible; }
.pl-under.is-call .pl-order-row { visibility: hidden; }

.pl-tower { position: relative; height: 0; margin: 0 var(--gutter); overflow: hidden; }
.pl-tower.is-open { border-top: 1px solid var(--hair-2); }
.pl-trow { position: absolute; left: 0; right: 0; top: 0; height: 30px; display: grid; grid-template-columns: 26px minmax(0, 1fr) 64px 78px; column-gap: 8px; align-items: center; border-bottom: 1px solid var(--hair); background: var(--ground); font-size: 14px; transition: transform 0.28s var(--ease), opacity 0.2s var(--ease); will-change: transform; }
.pl-trow.is-off { opacity: 0; }
.pl-trow .pl-tpos { font-size: 13px; color: var(--text-2); }
.pl-trow b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-trow .pl-tval { justify-self: end; font-size: 13px; padding: 1px 4px; margin-right: -4px; border-radius: 3px; }
.pl-trow .pl-tnote { font-size: 12px; color: var(--text-2); text-align: right; white-space: nowrap; }
.pl-trow.is-lead .pl-tval { background: var(--accent); color: var(--on-accent); font-weight: 500; }
.pl-trow.is-mine .pl-tnote { color: var(--text); }
.pl-trow.is-dim b, .pl-trow.is-dim .pl-tval { color: var(--text-2); font-weight: 400; }

/* ---- racecard ---- */
.pl-card { padding: 18px var(--gutter) 0; min-width: 0; }
.pl-card-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pl-title { font: 600 28px/1.05 var(--sans); letter-spacing: -0.026em; }
.pl-title .fig { font-weight: 500; letter-spacing: -0.04em; }
.pl-off { flex: none; font-size: 13px; line-height: 1.3; color: var(--text-2); white-space: nowrap; }
.pl-off .fig { font-size: 15px; color: var(--text); }
.pl-pool { margin-top: 10px; min-height: 57px; font-size: 13px; line-height: 1.45; color: var(--text-2); max-width: 78ch; }
.is-real .pl-pool { min-height: 76px; }
.pl-pool b { font-weight: 500; color: var(--text); }
.pl-pool .fig { color: var(--text); }
.pl-key { padding: 12px 0 0; font-size: 13px; line-height: 1.45; color: var(--text-2); max-width: 78ch; }

.pl-tote { --cols: 28px minmax(0, 1fr) 58px 50px 44px 52px; margin-top: 4px; }
.pl-heads, .pl-run { display: grid; grid-template-columns: var(--cols); column-gap: 6px; align-items: center; }
.pl-heads { position: sticky; top: var(--read); z-index: 10; height: 30px; background: var(--ground); border-bottom: 1px solid var(--hair-2); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.pl-heads span { overflow: hidden; text-overflow: ellipsis; }
.pl-heads span:nth-child(n+3) { text-align: right; }
.pl-heads-b { display: none; }
/* Practice has no pool: the card drops the Pool and Pays columns and gives the room to the runner's name.
   A runner locked for the next race says so under its name. */
.pl:not(.is-real) .pl-tote { --cols: 28px minmax(0, 1fr) 68px 59px; }
.pl:not(.is-real) .pl-share, .pl:not(.is-real) .pl-pays, .pl:not(.is-real) .pl-heads span:nth-child(n+5) { display: none; }
.pl-run { position: relative; min-height: 56px; border-bottom: 1px solid var(--hair); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 0.15s var(--ease); }
/* The real checkbox sits under the number. The whole row is its label. */
.pl-box { position: absolute; left: 0; top: 50%; width: 26px; height: 26px; margin: -13px 0 0; opacity: 0; pointer-events: none; }
.pl-run:has(.pl-box:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); z-index: 1; }
.pl-no { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--hair-2); border-radius: var(--r-sm); font-size: 13px; color: var(--text-2); transition: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease); }
.pl-who { min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }
.pl-who b { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-sub { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-sub .fig { font-size: 12px; }
.pl-now { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; min-width: 0; }
.pl-val { font-size: 14px; line-height: 1.2; padding: 1px 4px; margin-right: -4px; border-radius: 3px; }
.pl-run.is-lead .pl-val { background: var(--accent); color: var(--on-accent); font-weight: 500; }
/* The needle: how far the runner is from level, full scale three times its usual move. */
.pl-needle { position: relative; width: 100%; height: 7px; }
.pl-needle::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 1px; background: var(--hair-2); }
.pl-needle::after { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 7px; background: var(--text-3); }
.pl-needle i { position: absolute; left: 50%; top: 2px; width: 50%; height: 3px; background: var(--text); transform-origin: left center; transform: scaleX(0); transition: transform 0.25s linear; }
/* Form: ten sticks, oldest at the left. Height is the place in that race, the marked stick won. */
.pl-form { display: flex; align-items: flex-end; justify-content: flex-end; gap: 1px; height: 24px; }
.pl-form i { width: 4px; height: 2px; background: var(--text); opacity: 0.42; }
.pl-form i.w { opacity: 1; background: var(--accent); }
.pl-form i.x { opacity: 0.16; }
.pl:not(.is-real) .pl-form i { width: 5px; }
.pl-share, .pl-pays { min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; line-height: 1.2; white-space: nowrap; }
.pl-share .fig { font-size: 13px; color: var(--text-2); }
.pl-pays .fig { font-size: 15px; font-weight: 500; }
.pl-share .pl-s2, .pl-pays .pl-s2 { font-size: 12px; color: var(--text-2); }
.pl-share .pl-s2 { color: var(--text); }
.pl-share .pl-s2 .fig { font-size: 12px; color: var(--text); }
.pl-run.is-none .pl-pays .fig, .pl-run.is-none .pl-share .fig { color: var(--text-3); font-weight: 400; }

.pl-run.is-pick { background: var(--panel); }
.pl-run.is-next .pl-no { border-color: var(--text); color: var(--text); }
.pl-run.is-pick .pl-no { background: var(--text); border-color: var(--text); color: var(--ground); font-weight: 500; }
.pl-run.is-racing .pl-st, .pl-run.is-next .pl-st { color: var(--text); }
.pl-run:active { background: var(--panel-2); }
.pl-run.is-wait { cursor: default; }
.pl-run.is-wait .pl-no { color: var(--text-3); }

.pl-fail { display: grid; gap: 10px; justify-items: start; padding: 24px 0 8px; border-top: 1px solid var(--hair-2); margin-top: 8px; }
.pl-fail-title { font: 600 20px/1.2 var(--sans); letter-spacing: -0.015em; }

/* ---- the slip: a bar under the thumb ---- */
.pl-slip { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--hair-2); }
.pl-slip-a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; min-height: 22px; }
.pl-slip-t { font: 600 15px/1.3 var(--sans); letter-spacing: -0.01em; white-space: nowrap; }
.pl-slip-t .fig { font-weight: 500; }
.pl-slip-hint, .pl-slip-sum { font-size: 13px; line-height: 1.3; color: var(--text-2); white-space: nowrap; }
.pl-slip-sum b { font-weight: 500; color: var(--text); }
.pl-picks { order: 3; flex: 0 0 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pl-picks::-webkit-scrollbar { display: none; }
.pl-picks li { flex: none; display: inline-flex; align-items: baseline; gap: 5px; height: 26px; line-height: 24px; padding: 0 8px; border: 1px solid var(--hair-2); border-radius: var(--r-sm); font-size: 13px; color: var(--text-2); white-space: nowrap; }
.pl-picks li b { font-weight: 600; color: var(--text); }
.pl-picks li .fig { font-size: 12px; }
.pl-picks li .pl-ret { color: var(--text); }
.pl-slip-b { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-stake { flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.pl-field { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; background: var(--ground); border: 1px solid var(--hair-2); border-radius: var(--r); }
.pl-field:focus-within { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.pl-field:has([aria-invalid="true"]) { border-color: var(--down); }
.pl-field-k, .pl-sym { flex: none; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.pl-field input { flex: 1 1 auto; min-width: 0; width: 100%; height: 44px; padding: 0; background: none; border: 0; outline: 0; font-size: 16px; font-weight: 500; text-align: right; color: var(--text); -webkit-appearance: none; appearance: none; }
.pl-stake .seg button { min-height: 46px; padding: 0 10px; }
.pl-clear { flex: none; min-height: 48px; }
.pl-go { flex: 1 1 0; min-height: 48px; min-width: 0; padding: 0 12px; font-size: 15px; white-space: normal; line-height: 1.2; text-align: center; }
.pl-says { display: grid; gap: 2px; }
.pl-status { font-size: 13px; line-height: 1.4; color: var(--text); }
.pl-status:empty { display: none; }
.pl-status.is-bad { color: var(--down); }
.pl-slip-note { font-size: 12px; line-height: 1.4; color: var(--text-2); }
.pl-slip-note:empty, .pl-status:not(:empty) + .pl-slip-note { display: none; }
/* With nothing picked the bar is one line. A note from the engine still shows. */
.pl-slip.is-empty .pl-slip-b, .pl-slip.is-empty .pl-slip-note { display: none; }
.pl-slip.is-empty.is-busy .pl-slip-b { display: flex; }

/* ---- to collect, jackpot, the win line ---- */
.pl-acct { display: grid; gap: 16px; padding: 24px var(--gutter) 0; }
.pl-acct:not(:has(> :not([hidden]))) { display: none; }
.pl-win { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 6px 12px; box-shadow: inset 2px 0 0 var(--accent); font-size: 15px; line-height: 1.35; }
.pl-win .btn { flex: none; }
.pl-money { display: grid; gap: 12px; }
.pl-facts { border-top: 1px solid var(--hair-2); }
.pl-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; min-height: 40px; padding: 9px 0; border-bottom: 1px solid var(--hair); }
.pl-facts dt { font-size: 14px; color: var(--text-2); }
.pl-facts dd { font-size: 14px; color: var(--text-2); }
.pl-facts dd .fig { font-size: 15px; color: var(--text); }
.pl-inplay { display: grid; gap: 6px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.pl-inplay p { max-width: 60ch; }
.pl-inplay .fig { color: var(--text); }
.pl-inplay .is-late { color: var(--text); }
.pl-record { font-size: 13px; color: var(--text-2); }
.pl-record:has(#record:empty) { display: none; }

/* ---- results ---- */
.pl-results { padding-top: 40px; scroll-margin-top: 70px; }
.pl-res-head { display: grid; gap: 10px; margin-bottom: 16px; }
.pl-check { margin: 0 0 12px; padding: 4px 0 4px 12px; box-shadow: inset 2px 0 0 var(--hair-2); font-size: 14px; line-height: 1.45; color: var(--text); max-width: 78ch; }
.pl-check.is-bad { box-shadow: inset 2px 0 0 var(--down); color: var(--down); }
.pl-log-empty { padding: 16px 0; border-top: 1px solid var(--hair-2); font-size: 15px; color: var(--text-2); }
.pl-more { display: flex; flex-wrap: wrap; gap: 0 28px; padding-top: 12px; }
.pl-table .pl-sub2 { display: block; font: 400 13px/1.35 var(--sans); color: var(--text-2); white-space: normal; }
.pl-table .pl-jp { margin-left: 8px; height: 22px; padding: 0 7px; font-size: 12px; vertical-align: 1px; }
.pl-table .pl-fin > span { display: inline-block; margin-right: 16px; white-space: nowrap; }
.pl-table .pl-fin .fig { color: var(--text-2); }
.pl-table .pl-fin b { font-weight: 600; }
.pl-table .pl-you-won { background: var(--accent); color: var(--on-accent); padding: 1px 6px 2px; border-radius: 3px; font: 500 14px/1.3 var(--sans); }
.pl-table td.c-you, .pl-table td.c-pot { font-family: var(--sans); }
.pl-table tr.pl-wait td { color: var(--text-2); font-family: var(--sans); }
/* One finished race as 25 sticks in card order, up or down from level. The marked stick won. */
.pl-field25 { display: flex; align-items: center; gap: 2px; height: 28px; }
.pl-field25 i { position: relative; flex: none; width: 3px; height: 28px; }
.pl-field25 i::after { content: ""; position: absolute; left: 0; width: 3px; top: var(--t, 13px); height: var(--h, 2px); background: var(--text); opacity: 0.5; }
.pl-field25 i.w::after { background: var(--accent); opacity: 1; }
.pl-field25 i.x::after { opacity: 0.14; }

/* The narrowest phones: tighter columns so the usual move still fits under the name. */
@media (max-width: 379.98px) {
  .pl-title { font-size: 24px; }
  .pl-tote { --cols: 26px minmax(0, 1fr) 54px 39px 40px 48px; }
  .pl:not(.is-real) .pl-tote { --cols: 26px minmax(0, 1fr) 60px 49px; }
  .pl-heads, .pl-run { column-gap: 5px; }
  .pl-form i { width: 3px; }
  .pl:not(.is-real) .pl-form i { width: 4px; }
  .pl-who b { font-size: 15px; }
}

/* Phone: each finished race is a small block, not a wide table row. */
@media (max-width: 719.98px) {
  .pl-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pl-table, .pl-table tbody { display: block; }
  .pl-table tbody { border-top: 1px solid var(--hair-2); }
  .pl-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 0; padding: 11px 0; border-bottom: 1px solid var(--hair); }
  .pl-table td { display: block; height: auto; padding: 0; border: 0; white-space: normal; font-size: 13px; color: var(--text-2); text-align: left; }
  .pl-table td.c-time { order: 1; flex: 0 0 60px; font-size: 14px; }
  .pl-table td.c-coin { order: 2; flex: 1 1 55%; min-width: 0; font-size: 16px; color: var(--text); }
  .pl-table td.c-read { order: 3; flex: none; margin-left: 10px; font-size: 15px; color: var(--text); }
  .pl-table td.c-you { order: 4; flex: 0 0 auto; min-width: 56px; text-align: right; font-size: 14px; color: var(--text); }
  .pl-table td.c-fin { order: 5; flex: 0 0 100%; padding-left: 60px; }
  .pl-table td.c-move { order: 6; flex: none; padding-left: 60px; text-align: left; }
  .pl-table td.c-usual { order: 7; flex: 1 1 0; padding-left: 5px; text-align: left; white-space: nowrap; }
  .pl-table td.c-pot { order: 8; flex: none; padding-left: 60px; text-align: left; }
  .pl-table td.c-check { order: 9; flex: 1 1 0; padding-left: 12px; }
  .pl-table td.c-field { display: none; }
  .pl-table td.c-void { order: 2; flex: 1 1 0; font-size: 14px; }
  .pl-table td[data-k]::before { content: attr(data-k) " "; font: 400 13px/1.3 var(--sans); color: var(--text-2); }
  .pl-table td:empty { display: none; }
  /* the note under the winner runs on one line, under the reading. The first three are names only, so they fit */
  .pl-table .pl-sub2 { margin-top: 2px; white-space: nowrap; }
  .is-real .pl-table .pl-fin > span > .fig:last-child { display: none; }
  .pl-table tr.is-lead td:first-child { box-shadow: none; padding-left: 0; }
  .pl-table tr.is-lead { box-shadow: inset 2px 0 0 var(--accent); padding-left: 10px; }
  .pl-table tr.is-lead td.c-time { flex-basis: 50px; }
  .pl-table tr.pl-wait { display: block; }
  .pl-table tr.pl-wait td { font-size: 15px; }
}

/* ---- from 720: a wider sheet with finished races on it, the running order as a short tower ---- */
@media (min-width: 720px) {
  .pl { --read: 74px; }
  .pl-readout-in { height: 64px; }
  .pl-time { font-size: 40px; }
  .pl-clock-for, .pl-lead { font-size: 14px; }
  .pl-lead #lead { font-size: 17px; }
  .pl-sheet canvas { height: 280px; }
  .pl-cap { padding-left: var(--gutter); padding-right: var(--gutter); }
  .pl-order-line { visibility: hidden; }
  .pl-call { font-size: 15px; }
  .pl-card { padding-top: 28px; }
  .pl-title { font-size: 36px; letter-spacing: -0.028em; }
  .pl-pool, .is-real .pl-pool { min-height: 38px; }
  .pl-tote { --cols: 30px minmax(0, 1fr) 84px 64px 60px 72px; }
  .pl:not(.is-real) .pl-tote { --cols: 30px minmax(0, 1fr) 96px 64px; }
  .pl-heads, .pl-run { column-gap: 12px; }
  .pl-run { min-height: 48px; }
  .pl-who { flex-direction: row; align-items: baseline; gap: 10px; }
  .pl-sub { font-size: 13px; }
  .pl-form i { width: 5px; }
  .pl-pays .pl-s2, .pl-share .pl-s2 { font-size: 12px; }
  .pl-slip-a { flex-wrap: nowrap; align-items: center; }
  .pl-picks { order: 0; flex: 1 1 auto; min-width: 0; }
  .pl-slip-hint { flex: 1 1 auto; }
  .pl-slip-b { flex-wrap: nowrap; }
  .pl-stake { flex: none; grid-template-columns: 240px auto; }
  .pl-results { padding-top: 64px; }
  .pl-res-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: end; column-gap: 32px; margin-bottom: 20px; }
  .pl-table td { height: 48px; }
  .pl-table .pl-sub2 { margin-top: -2px; }
  .pl-table td.c-coin { font-size: 16px; }
  .pl-th-field, .pl-table td.c-field { display: none; }
}

@media (min-width: 900px) {
  .pl-th-field { display: table-cell; }
  .pl-table td.c-field { display: table-cell; }
}

/* ---- 900 to 1039: the racecard in two columns under the sheet ---- */
@media (min-width: 900px) and (max-width: 1039.98px) {
  .pl-tote { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; --cols: 28px minmax(0, 1fr) 60px 54px 46px 54px; }
  .pl:not(.is-real) .pl-tote { --cols: 28px minmax(0, 1fr) 72px 54px; }
  .pl-heads-b { display: grid; }
  .pl-heads, .pl-run { column-gap: 8px; }
  .pl-who { flex-direction: column; align-items: stretch; gap: 1px; }
  .pl-sub { font-size: 12px; }
  .pl-form i, .pl:not(.is-real) .pl-form i { width: 4px; }
}

/* ---- from 1040: the race in a sticky left column, the racecard at the right, the slip under its title ---- */
@media (min-width: 1040px) {
  .pl { --slip-h: 0px; }
  html:has(.pl) { scroll-padding-top: 200px; scroll-padding-bottom: 20px; }
  .pl .site-foot { padding-bottom: 40px; }
  .pl-deck { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); column-gap: 32px; align-items: start; max-width: calc(1440px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
  .pl-left { display: block; position: sticky; top: 0; min-width: 0; padding-bottom: 16px; }
  .pl-deck.is-long .pl-left { position: static; }
  .pl-readout { position: static; }
  .pl-readout-in { height: 76px; padding: 0; }
  .pl-readout .ticks { margin: 0; }
  .pl-time { font-size: 52px; }
  .pl-lead #lead { font-size: 19px; }
  .pl-sheet canvas { height: clamp(260px, calc(100vh - 564px), 440px); }
  .pl-cap { padding-left: 0; padding-right: 0; }
  .pl-under { padding: 0; }
  .pl-call { left: 0; right: 0; }
  .pl-tower { margin: 0; }
  .pl-acct { padding: 20px 0 0; }
  .pl-money { grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: center; }
  .pl-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; border-top: 0; }
  .pl-facts dd { white-space: nowrap; }
  .pl-rec { grid-column: 1 / -1; }
  .pl-facts > div { flex: 0 1 auto; display: grid; gap: 2px; justify-content: start; min-height: 0; padding: 0; border-bottom: 0; }
  .pl-facts dt { font-size: 13px; }

  .pl-card { padding: 12px 0 0; }
  .pl-pool, .is-real .pl-pool { min-height: 38px; margin-top: 8px; }
  .pl-heads { position: static; }
  .pl-tote { --cols: 28px minmax(0, 1fr) 76px 60px 52px 64px; }
  .pl:not(.is-real) .pl-tote { --cols: 28px minmax(0, 1fr) 96px 60px; }
  .pl-heads, .pl-run { column-gap: 10px; }
  .pl-run { min-height: 44px; }

  /* the slip: not a bar here. It sits under the racecard title and stays there while the card scrolls. */
  .pl-slip { position: sticky; top: 0; z-index: 12; margin-top: 10px; padding: 10px 0 8px; gap: 8px; background: var(--ground); border-top: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); }
  .pl-slip.is-empty .pl-slip-b { display: flex; }
  .pl-slip.is-empty .pl-status:empty + .pl-slip-note { display: block; }
  .pl-slip-a { min-height: 26px; }
  .pl-slip-b { flex-wrap: wrap; }
  .pl-stake { flex: 1 1 100%; grid-template-columns: minmax(0, 1fr) auto; }
  .pl-says { min-height: 19px; display: flex; flex-wrap: wrap; gap: 0 14px; align-items: baseline; }
  .pl-slip-note { font-size: 13px; }
  .pl-results { padding-top: 72px; }
}

/* ---- from 1400: two columns of 13 and 12, all 25 runners on one screen ---- */
@media (min-width: 1400px) {
  .pl-deck { grid-template-columns: minmax(0, 1fr) minmax(0, 1.26fr); }
  .pl-tote { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; --cols: 28px minmax(0, 1fr) 58px 54px 46px 52px; }
  .pl:not(.is-real) .pl-tote { --cols: 28px minmax(0, 1fr) 72px 54px; }
  .pl-heads-b { display: grid; }
  .pl-heads, .pl-run { column-gap: 8px; }
  .pl-who { flex-direction: column; align-items: stretch; gap: 1px; }
  .pl-who b { font-size: 15px; }
  .pl-sub { font-size: 12px; }
  .pl-form i, .pl:not(.is-real) .pl-form i { width: 4px; }
  .pl-key { max-width: none; }
  .pl-slip-b { flex-wrap: nowrap; }
  .pl-stake { flex: none; grid-template-columns: 236px auto; }
}

@media (hover: hover) {
  .pl-run:not(.is-wait):hover { background: var(--panel); }
  .pl-run.is-pick:hover { background: var(--panel-2); }
  .pl-all:hover { text-decoration-thickness: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-trow, .pl-needle i, .pl-run, .pl-no { transition: none; }
}

/* The connected address is a button (press, then press again to disconnect). */
button.pl-addr { cursor: pointer; background: none; font-family: inherit; }
button.pl-addr.fig { font-family: var(--mono); }
button.pl-addr:hover { color: var(--text); border-color: var(--text-2); }
button.pl-addr:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* A finished race's time links to that race's own page. */
a.c-race, a.h-race { color: inherit; text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 3px; }
a.c-race:hover, a.h-race:hover { text-decoration-color: currentColor; }

/* Offered only after the sign in window failed or was closed: connect the browser's own wallet. */
.pl-direct { display: block; margin-top: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 40px; text-align: left; }
.pl-direct:hover { color: var(--text); }

/* The browser's own check exists only for recent races. With none on show the column is left out. */
.pl-table.no-check .c-check, .pl-table.no-check .c-check-h { display: none; }

/* Picks that run off the edge of the row fade out there (play.js sets has-more while there is more to scroll to). */
.pl-picks.has-more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
