/* Sponsor My Body — HYROX Nice
   Tokens, HUD, panels and dialogs. The scene itself is drawn to a canvas. */

:root {
  --ink:            #0b0708;
  --ink-2:          #140d0e;
  --surface:        rgba(22, 13, 14, 0.82);
  --edge:           rgba(255, 237, 0, 0.26);
  --edge-soft:      rgba(255, 200, 200, 0.10);
  /* Fitness Park yellow is the brand accent */
  --hyrox:          #ffed00;
  --hyrox-dim:      #9e9200;
  --sponsor:        #ffed00;
  --paper:          #f2ece6;
  /**
   * Muted text was failing contrast against the dark ground: #8b7373 on
   * #0b0708 is about 4.3:1 and #5e4a4b barely 2.2:1, which is why the small
   * grey type was hard to read. Both are lifted well past 4.5:1, and the
   * dimmest tier is reserved for decoration rather than words.
   */
  --muted:          #b3a49e;
  --muted-2:        #8d7f7a;
  --ok:             #46d67f;

  /* HYROX house type: a tight industrial grotesque in heavy condensed caps */
  --display: 'Oswald', 'Archivo Narrow', 'Arial Narrow', sans-serif;
  --cond:    'Archivo Narrow', 'Archivo', 'Arial Narrow', sans-serif;
  --body:    'Archivo', system-ui, -apple-system, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* how far the bottom-centre column (#cta) sits from the bottom edge; the
     season panel is placed from it where the two share the width */
  --cta-bottom: clamp(18px, 3.4vw, 32px);
  /* on a phone, the height kept free at the very bottom for the legal row
     (#legal): the season panel and the avatar stand on it */
  --foot-phone: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
#stage canvas { position: relative; z-index: 1; }

canvas { display: block; touch-action: none; }

/* ---------- boot ---------- */
#boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  gap: 18px;
  justify-items: center;
  background: var(--ink);
  transition: opacity .7s ease;
}
#boot.gone { opacity: 0; pointer-events: none; }
#boot .mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 9vw, 80px);
  letter-spacing: -.01em;
  color: var(--paper);
  line-height: .88;
  text-transform: uppercase;
}
#boot .mark em { color: var(--hyrox); font-style: normal; }
#boot .bar {
  width: min(280px, 60vw);
  height: 2px;
  background: rgba(255,255,255,.10);
  overflow: hidden;
}
#boot .bar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--hyrox);
  transition: width .3s ease;
}
#boot .note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  /* the scene behind is busy and bright in places; a soft shade keeps
     small type legible without adding a panel behind every label */
  text-shadow: 0 1px 3px rgba(0, 0, 0, .75), 0 0 12px rgba(0, 0, 0, .45);
}
/* every control inside the HUD must take clicks, even after `all: unset` */
.hud button, .hud a, .hud input, .hud select,
button.hud { pointer-events: auto !important; }
/* interactive descendants stay clickable at any depth */
.hud button,
.hud a,
.hud input,
.hud select { pointer-events: auto; }
/* a .hud that IS a control must take clicks itself */
button.hud { pointer-events: auto; }

/* the phone layout's wrappers (index.html: the top bar, the view bar, the
   bottom sheet and its folding part) make no box of their own, so each block
   inside stands where its own rules put it; only a phone held upright gives
   them one (see "Phones held upright" at the end), and only there do the
   menu, its button and the sheet's handle and line show */
#top, #viewbar, #dock, #dockMore { display: contents; }
#menuBtn, #dockGrip, #dockLine, #menu { display: none; }

/* top-left identity */
#brand {
  top: clamp(12px, 2vw, 20px);
  left: clamp(12px, 2vw, 20px);
  padding: 16px 20px 17px;
  display: grid;
  gap: 9px;
  max-width: min(400px, 74vw);

  /**
   * A soft plate behind the block.
   *
   * A drop shadow alone was not enough: the scene behind swings between a
   * bright wall photo and near-black, so the same grey either glared or
   * vanished. A dark pane keeps the contrast constant whatever is behind it.
   */
  background: linear-gradient(150deg, rgba(14, 11, 8, .78), rgba(14, 11, 8, .52));
  backdrop-filter: blur(11px);
  border: 1px solid rgba(255, 237, 0, .14);
  border-radius: 20px;
}
#brand h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: .88;
  letter-spacing: -.005em;
  text-transform: uppercase;
}
#brand h1 span { color: var(--hyrox); }
#brand .earn {
  font-family: var(--cond);
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .01em;
}
#brand .earn b {
  color: var(--paper);
  font-weight: 700;
  font-family: var(--mono);
  font-size: .94em;
  font-variant-numeric: tabular-nums;
}
#brand .sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
#brand .sub > span { white-space: nowrap; }
#brand .sub button {
  all: unset;
  cursor: pointer;
  color: var(--hyrox);
  border-bottom: 1px solid rgba(255, 237, 0, .4);
  padding-bottom: 1px;
  white-space: nowrap;
}
#brand .sub button:hover { color: var(--hyrox); border-color: var(--hyrox); }
#brand .sub button:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 3px; }
/* "How it works", under the countdown line (the training calendar is the
   round button at the bottom right, #diaryFab) */
#brand .sublinks { display: flex; flex-wrap: wrap; align-items: center; gap: inherit; }
/* not on sale (sales closed, or a race not open yet): the line under the
   title starts with the state in red (ui/hud.js), on phones too */
/* on a line of its own: next to the countdown it pushed the line out of the box */
#brand .sub .lstate { display: block; margin-bottom: 4px; color: #ff5a4f; font-weight: 700; }
#brand .sub .lstate::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #ff4d4d;
  vertical-align: 1px;
}
/* the race is on: the state in HYROX yellow, behind the clock's live light */
#brand .sub .lstate.live { color: var(--hyrox); }
#brand .sub .lstate.live::before {
  box-shadow: 0 0 6px rgba(255, 77, 77, .8);
  animation: onair 1.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  #brand .sub .lstate.live::before { animation: none; }
}

/* top-right clock */
#clock {
  top: clamp(12px, 2vw, 20px);
  right: clamp(12px, 2vw, 20px);
  padding: 12px 16px;
  display: flex;
  gap: clamp(8px, 1.4vw, 15px);
  align-items: center;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(200deg, rgba(14, 11, 8, .74), rgba(14, 11, 8, .48));
  backdrop-filter: blur(11px);
  border: 1px solid rgba(255, 237, 0, .12);
  border-radius: 999px;
}
#clock .units {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 15px);
}
#clock .unit {
  display: flex;
  align-items: baseline;
  gap: 3px;
}
#clock .n {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(19px, 2.5vw, 30px);
  letter-spacing: -.02em;
  color: var(--paper);
}
#clock .u {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-2);
  text-transform: uppercase;
}
/* race day (ui/hud.js sets data-race from raceState()): while the race is on,
   a red light and "En course" before the time since the start, the days
   dropped; once it is over, a chequered flag, "Course terminée" and the
   final time in place of the digits. All in the digits' own row, so the
   pill keeps its height (on a phone the social row sits right under it) */
#clock .cstate { display: none; align-items: center; gap: 8px; }
#clock[data-race="live"] .cstate,
#clock[data-race="done"] .cstate { display: flex; }
#clock[data-race="live"] .cstate + .unit,
#clock[data-race="done"] .unit { display: none; }
#clock[data-race="live"] { border-color: rgba(255, 77, 77, .42); }
#clock .cslabel {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--paper);
  white-space: nowrap;
}
#clock .cmark {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff4d4d;
  box-shadow: 0 0 0 3px rgba(255, 77, 77, .18), 0 0 10px rgba(255, 77, 77, .7);
  animation: onair 1.2s ease-in-out infinite;
}
#clock[data-race="done"] .cmark {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: repeating-conic-gradient(var(--paper) 0 25%, #16150a 0 50%) 0 0 / 6px 6px;
  box-shadow: none;
  animation: none;
}
#clock .cstime { color: var(--hyrox); }
/* what the digits count to, over them: an upright phone's bar only */
#clock .clabel { display: none; }
@keyframes onair { 50% { opacity: .3; } }
/* up to 930px wide the header and the clock share too little width for the
   words beside the time (on a tablet the pill ran under the title block, on
   a phone out of its 42vw): on race day the light, or the flag, stands
   alone, and the line under the title says "Départ donné" or "Course
   terminée". The words stay while there is no final time to show instead */
@media (max-width: 930px) {
  #clock[data-race="live"] .cslabel,
  #clock[data-race="done"] .cstate:has(.cstime:not([hidden])) .cslabel { display: none; }
}
/* less motion asked for: the light stays lit (the page-wide rule would make
   it flicker at a hundredth of a millisecond) */
@media (prefers-reduced-motion: reduce) {
  #clock .cmark { animation: none; }
}

/* bottom-left: the season panel (ui/goal.js). Real money only — this corner
   used to show a "watching now" counter that was a random walk, then a bar
   towards a 5 000 € goal that sat near zero. It shows what grows instead:
   what has been raised and the charity's part, or an invitation before the
   first euro (#goal.empty). The site's audience (#audience, below) is a
   card in the same style, under it: the card itself comes from this rule. */
#goal,
#audience {
  left: clamp(12px, 2vw, 20px);
  bottom: clamp(12px, 2vw, 20px);
  width: min(300px, 78vw);
  padding: 13px 16px 14px;
  display: grid;
  gap: 7px;
  background: linear-gradient(150deg, rgba(14, 11, 8, .74), rgba(14, 11, 8, .48));
  backdrop-filter: blur(11px);
  border: 1px solid rgba(255, 237, 0, .12);
  border-radius: 18px;
}
/* its parts are grids and flex boxes, which beat the UA rule for [hidden] */
#goal [hidden] { display: none !important; }
#goal .glabel,
#audience .aulabel {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
/* "Déjà 120 € collectés": the words in the condensed face, the sum in the big mono */
#goal .gsum,
#audience .aunow {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--paper);
}
#goal .gsum b,
#audience .aunow b {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* the no-break space before "€" (fr, es, it) in the condensed face: the mono
   one is a full character wide, "210  €" (see bigSum in ui/goal.js) */
#goal .gsum b .nb,
#audience .aunow b .nb { font-family: var(--cond); letter-spacing: 0; }
/* before the first euro the same line is the invitation, set like a call */
#goal.empty .gsum {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.12;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
}
/* the charity's part, in euros; the sum in the accent reads as a bonus */
#goal .gcharity {
  margin-top: -3px;
  font-family: var(--body);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}
#goal .gcharity b, #goal .gshort b { color: var(--hyrox); font-weight: 700; white-space: nowrap; }
/* what the money is for: one sober line */
#goal .gfor,
#audience .autotal {
  margin: 0;
  font-family: var(--body);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
}
/* the one-line summary is the compact form's; the full panel has the lines above */
#goal .gshort { display: none; }
#goal a { color: var(--paper); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); }
#goal a:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }
/* the count on the left once there is one; alone, the button sits left */
#goal .gfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
#goal .gcount {
  all: unset;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .2);
  text-underline-offset: 3px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .05em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--muted-2);
}
#goal .gcount[hidden], #goal .gthanks[hidden] { display: none; }
#goal .gcount:hover { color: var(--paper); }
#goal .gcount:focus-visible, #goal .gthanks:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }
/* "Merci à Julie M., Karim B. et 16 autres ›": the wall, from the corner */
#goal .gthanks {
  all: unset;
  cursor: pointer;
  display: block;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  text-shadow: none;
}
#goal .gthanks b { color: var(--paper); font-weight: 600; }
#goal .gthanks:hover b { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); }
#goal .gsupport {
  all: unset;
  cursor: pointer;
  flex: none;
  padding: 7px 13px;
  border: 1px solid rgba(255, 237, 0, .45);
  border-radius: 999px;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--hyrox);
  text-shadow: none;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease;
}
#goal .gsupport:hover { background: var(--hyrox); color: #16150a; }
#goal .gsupport:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

/* "online payment opens soon", from ui/payment.js */
#goal .gnotice,
#slot .snotice {
  font-family: var(--body);
  font-size: 12px;
  line-height: 1.45;
  color: var(--paper);
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: color-mix(in srgb, var(--hyrox) 9%, transparent);
  text-shadow: none;
}
#goal .gnotice[hidden], #slot .snotice[hidden] { display: none; }
#goal .gnotice.on, #slot .snotice.on { animation: notice .32s cubic-bezier(.2,.8,.3,1) both; }
@keyframes notice { from { opacity: 0; transform: translateY(4px); } }

/* the panel clears the centred column on narrower desktops, and sits above
   the city picker once there is no room beside the column at all — when the
   window is tall enough for that; a short one (a phone held sideways) takes
   the compact form further down instead, or the panel ran off the top */
@media (min-width: 721px) and (max-width: 1100px) {
  #goal, #audience { width: max(230px, calc(50vw - 242px)); }
}
@media (min-width: 721px) and (max-width: 960px) and (min-height: 640px) {
  /* the top of the column (#cta): the button (57px), the hint's two lines
     (35px), the picker (75px) and their two 9px gaps, then 9px more */
  #goal, #audience { width: min(300px, 42vw); bottom: calc(var(--cta-bottom) + 194px); }
}

/* ---------- the site's audience, live (index.html #audience, ui/audience.js) ----------
   Right under the season panel, in its very style (the card, the label, the
   big type and the grey line are the panel's own rules, above): the people
   on the site right now behind a green light, the visits since the start,
   then under the panel's thin rule the last arrivals, newest on top, and
   the small print. Real figures only: hidden until the backend has sent
   some. The block takes the corner and the panel steps up by the block's
   height and a gap (--aud-h and the `aud` class on <html>, from
   ui/audience.js); with the block hidden, the panel is back in place. */
:root { --aud-gap: 10px; --aud-lift: 0px; }
html.aud { --aud-lift: calc(var(--aud-h, 0px) + var(--aud-gap)); }
#goal {
  translate: 0 calc(-1 * var(--aud-lift));
  transition: translate .32s cubic-bezier(.2,.8,.3,1);
}
/* the audience card, a little more compact than the season panel above it */
#audience { padding: 11px 14px 12px; gap: 5px; }
#audience .aulabel { font-size: 9.5px; }
#audience .aunow { font-size: 14px; }
#audience .aunow b { font-size: 19px; }
#audience .autotal { font-size: 11px; }
/* a grid, which beats the UA rule for [hidden], as do its flex children */
#audience[hidden],
#audience [hidden] { display: none !important; }
#audience .aunow {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: -1px;
}
/* the live light: a green dot whose ring widens and fades, like a pulse */
#audience .aulight,
#audience .aushort::before {
  flex: none;
  align-self: center;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: aulive 1.8s ease-out infinite;
}
@keyframes aulive {
  0% { box-shadow: 0 0 0 0 rgba(70, 214, 127, .6); }
  70%, 100% { box-shadow: 0 0 0 6px rgba(70, 214, 127, 0); }
}
#audience .autotal { margin-top: -3px; }
/* the compact form's line (phones and upright tablets, below) */
#audience .aushort { display: none; margin: 0; }
/* the arrivals: a flag, the country, how long ago; under the panel's rule */
#audience .aufeed {
  display: grid;
  gap: 3px;
  margin: 1px 0 0;
  padding: 7px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .06);
  list-style: none;
}
#audience .aufeed li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
  color: var(--paper);
}
#audience .auflag { font-size: 13px; line-height: 1; text-align: center; text-shadow: none; }
#audience .aucn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#audience .auago {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 9.5px;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* a new arrival slides in at the top, its time lit in the accent a moment */
#audience .aufeed li.new { animation: aurow .45s cubic-bezier(.2,.8,.3,1) both; }
#audience .aufeed li.new .auago { animation: aunew 2.4s ease-out both; }
@keyframes aurow { from { opacity: 0; transform: translateY(-6px); } }
@keyframes aunew { from, 40% { color: var(--hyrox); } }
@media (prefers-reduced-motion: reduce) {
  /* lit, still (the page-wide rule would make it flicker), and no slide */
  #audience .aulight, #audience .aushort::before { animation: none; box-shadow: 0 0 0 2px rgba(70, 214, 127, .25); }
  #audience .aufeed li.new, #audience .aufeed li.new .auago { animation: none; }
}
/* shorter windows keep the column clear of the title block: three
   arrivals, then only the latest */
@media (max-height: 760px) {
  #audience .aufeed li:nth-child(n+4) { display: none; }
}
@media (max-height: 680px) {
  #audience .aufeed li:nth-child(n+2) { display: none; }
}

/* ---------- « Actus »: our latest X posts (index.html #news, ui/news.js) ----------
   A card in the season panel's style at the right edge, under the clock:
   the label with X's mark, the latest post (three lines of it), how long
   ago and "Voir sur X ↗"; unfolded, the last five, the list scrolling past
   the room the window has above the calendar and social bubbles. Words
   only, their line breaks kept (pre-line). The 3D page's view list is
   centred on the same edge: shorter windows show fewer lines of the post,
   and the shortest (a phone held sideways) none of the card. A tablet held
   upright has the Instagram and X bubbles under the clock: the card goes
   under them. The zone card and a player card open over that edge: the
   card steps aside meanwhile. On a phone held upright it is a card of the
   bottom sheet, under the audience (see "Phones held upright"). */
#news {
  top: 100px;
  right: clamp(12px, 2vw, 20px);
  width: min(300px, 78vw);
  /* clear of the calendar and social bubbles (92px up, 50px tall) */
  max-height: calc(100vh - 100px - 154px);
  padding: 12px 16px 13px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  /* the list scrolls under a wheel or a finger, and its words can be selected */
  pointer-events: auto;
  background: linear-gradient(200deg, rgba(14, 11, 8, .74), rgba(14, 11, 8, .48));
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  border: 1px solid rgba(255, 237, 0, .12);
  border-radius: 18px;
  transition: opacity .18s ease, visibility 0s;
}
/* a grid, which beats the UA rule for [hidden], as do its flex children */
#news[hidden],
#news [hidden] { display: none !important; }
#news .nwhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
#news .nwlabel {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
#news .nwlabel svg { flex: none; width: 11px; height: 11px; color: var(--paper); }
/* "Les 5 dernières ⌄" / "Réduire ⌃", in the season panel's small type */
#news .nwmore {
  all: unset;
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .05em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}
#news .nwmore::after {
  content: '';
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease, margin .2s ease;
}
#news.open .nwmore::after { margin-top: 3px; transform: rotate(-135deg); }
/* a finger's worth to hit */
#news .nwmore::before { content: ''; position: absolute; inset: -12px -8px; }
#news .nwmore:hover { color: var(--paper); }
#news .nwmore:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 3px; border-radius: 3px; }
#news .nwlist {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 237, 0, .25) transparent;
}
#news:not(.open) .nwlist > li:nth-child(n+2) { display: none; }
#news .nwlist > li + li { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .06); }
#news .nwtext {
  margin: 0;
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.45;
  color: var(--paper);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
/* folded: three lines of the latest post */
#news:not(.open) .nwtext {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
#news .nwfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; }
#news .nwago {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#news .nwlink {
  position: relative;
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(255, 237, 0, .4);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hyrox);
  text-decoration: none;
  white-space: nowrap;
}
#news .nwlink::after { content: '\00a0↗'; content: '\00a0↗' / ''; }
/* more to hit, up into the gap over it and leftwards: not past the list's
   right or bottom edge, which would give the list something to scroll by */
#news .nwlink::before { content: ''; position: absolute; inset: -10px 0 0 -8px; }
#news .nwlink:hover { border-color: var(--hyrox); }
#news .nwlink:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 3px; }
/* a tablet held upright: under the Instagram and X bubbles (92px down, 50px tall) */
@media (min-width: 721px) and (max-width: 930px) and (min-height: 640px) {
  #news { top: 152px; max-height: calc(100vh - 152px - 154px); }
}
/* shorter windows: fewer lines of the latest post, the view list below stays clear */
@media (min-width: 721px) and (max-height: 720px) {
  #news:not(.open) .nwtext { -webkit-line-clamp: 2; line-clamp: 2; }
}
@media (min-width: 721px) and (max-height: 640px) {
  #news:not(.open) .nwtext { -webkit-line-clamp: 1; line-clamp: 1; }
}
/* too short for it (the view list would start under its single line), or a
   narrow phone held sideways: the edge is the view list's */
@media (max-height: 579px), (max-width: 720px) and (orientation: landscape) {
  #news { display: none !important; }
}
/* the zone card and a player card open over the right edge: the card steps aside */
@media (min-width: 721px) {
  body:has(#slot.on, #player.on) #news { opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility 0s .18s; }
}
/* a phone held upright: one more card of the bottom sheet, like the season
   panel and the audience above it; the sheet scrolls, not the list */
@media (max-width: 720px) and (orientation: portrait) {
  #dockMore > #news {
    position: static;
    top: auto;
    right: auto;
    width: auto;
    max-height: none;
    background: rgba(255, 255, 255, .035);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: rgba(255, 237, 0, .11);
  }
  #dockMore > #news .nwlist { overflow: visible; }
  #news .nwtext { font-size: 13.5px; }
  /* the list does not scroll here: a finger's worth all round */
  #news .nwlink::before { inset: -12px -6px; }
}

/**
 * Bottom centre: the race picker, the hint and the big button, in one column.
 *
 * The picker used to be placed on its own, a fixed distance up, and the hint
 * under it wraps to two lines in every language at this width — three with a
 * fallback font. At 1024–1440 px it ran under the picker. Stacked in one
 * column with a gap between each, they can never touch, whatever the hint
 * says. The hint keeps room for two lines even when it needs one (Bangkok's
 * is shorter), so the picker does not jump under the cursor on a city change.
 */
#cta {
  left: 50%; bottom: var(--cta-bottom);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: min(420px, 84vw);
}
#cta .hintbox {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  font-size: 10.5px;
  /* two lines of 1.35 plus the plate's 3px + 3px */
  min-height: calc(2.7em + 6px);
}
#cta .hint {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.35;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  text-wrap: balance;
  /* a faint plate: the hint runs over the athletes' white shoes */
  padding: 3px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(14, 11, 8, .42);
  backdrop-filter: blur(6px);
}
/* not on sale (sales closed, or a race not open yet): a red sign, so the
   zones are never read as buyable; the state itself, first, in bold */
#cta .hint.closed {
  color: #ffd9d6;
  border-color: rgba(255, 77, 77, .55);
  background: rgba(96, 12, 12, .66);
}
#cta .hint.closed span:first-child { color: #ff6b61; font-weight: 700; }
#cta .hint.closed span:first-child::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #ff4d4d;
  vertical-align: 1px;
}
/* the race on screen is on (panels.js): a race sign, not a closed one —
   HYROX yellow on near-black, the state first behind the clock's live
   light, and a sheen that runs across it now and then */
#cta .hint.live {
  position: relative;
  overflow: hidden;
  color: #f6eed2;
  border-color: rgba(255, 237, 0, .6);
  background: rgba(24, 20, 2, .8);
  box-shadow: 0 0 20px rgba(255, 237, 0, .16);
}
#cta .hint.live span:first-child { color: var(--hyrox); font-weight: 700; }
#cta .hint.live span:first-child::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #ff4d4d;
  box-shadow: 0 0 0 3px rgba(255, 77, 77, .2), 0 0 8px rgba(255, 77, 77, .8);
  vertical-align: 1px;
  animation: onair 1.2s ease-in-out infinite;
}
#cta .hint.live::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 237, 0, .16) 50%, transparent 62%);
  transform: translateX(-100%);
  animation: livesheen 4.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes livesheen {
  0%, 45% { transform: translateX(-100%); }
  85%, 100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  #cta .hint.live span:first-child::before { animation: none; }
  #cta .hint.live::after { animation: none; opacity: 0; }
}
/* the backend is configured but not answering (ui/outage.js): an amber sign
   in the hint's place, which it hides until it is closed, and about as tall
   as the hint's two lines so the column does not climb (the season panel is
   placed from its height on a tablet); on a phone held upright, under the
   big button in the bottom sheet */
#outage {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 3px 4px 3px 11px;
  border: 1px solid rgba(255, 176, 46, .6);
  border-radius: 12px;
  background: rgba(62, 38, 4, .82);
  backdrop-filter: blur(6px);
  color: #ffe7ba;
  font-family: var(--body);
  font-size: 11px;
  line-height: 1.3;
  text-align: left;
  text-shadow: none;
}
#outage[hidden] { display: none; }
#outage p { flex: 1; margin: 0; text-wrap: pretty; }
#outage p::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #ffb02e;
  box-shadow: 0 0 0 3px rgba(255, 176, 46, .18);
  vertical-align: 1px;
}
#outage button {
  all: unset;
  cursor: pointer;
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  color: #ffd592;
  font-size: 11px;
}
#outage button:hover { background: rgba(255, 255, 255, .08); }
#outage button:focus-visible { outline: 1px solid #ffd592; outline-offset: 1px; }
#cta:has(#outage:not([hidden])) .hintbox { display: none; }
/* the pay buttons look it meanwhile: muted, not a call to buy (ui/panels.js
   and ui/goal.js set aria-disabled; pressed, they still say why) */
#slot .stake[aria-disabled="true"],
#goal .gsupport[aria-disabled="true"] {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, .18);
  cursor: default;
}
#slot .stake[aria-disabled="true"]:hover,
#goal .gsupport[aria-disabled="true"]:hover { background: rgba(255, 255, 255, .05); color: var(--muted); }
/* the sign, in view, answers a press of one itself (ui/payment.js): a pulse
   rather than the same sentence a second time */
#outage.ping { animation: outping .7s ease 1; }
@keyframes outping {
  30% { border-color: #ffd592; box-shadow: 0 0 0 5px rgba(255, 176, 46, .3); }
}
/* a window held sideways: as wide as the race picker above it, clear of the
   season panel on its left */
@media (min-width: 721px) and (max-width: 960px) and (max-height: 639px) {
  #outage { align-self: center; width: 256px; }
}
/* a narrow phone held sideways has no room left in the column (the picker
   already reaches the view row): the sign stays out, and the zone card, the
   zones list and every pay button still say it */
@media (max-width: 720px) and (orientation: landscape) {
  #outage { display: none !important; }
}

/* each phrase stays whole: two lines break between them (panels.js) */
#cta .hint span { display: inline-block; }
#cta .hint .sep { font-style: normal; }
#cta .buy {
  all: unset;
  cursor: pointer;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  padding: 15px 26px;
  background: var(--hyrox);
  color: #16150a;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(16px, 1.9vw, 20px);
  letter-spacing: .02em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background .18s ease, transform .18s ease;
}
#cta .buy:hover { background: #fff45c; transform: translateY(-1px); }
#cta .buy:focus-visible { outline: 2px solid var(--sponsor); outline-offset: 4px; }

/* bottom-right athlete */
#athlete {
  right: 0; bottom: 0;
  padding: clamp(16px, 3vw, 30px);
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: right;
}
#athlete .txt { display: grid; gap: 2px; }
#athlete .h {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
}
#athlete .s {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
#athlete .av {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(150deg, #3a2224, #1a1011);
  border: 1px solid var(--edge);
  display: grid;
  place-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
  color: var(--hyrox);
}

/* view controls */
#views {
  right: 0; top: 50%;
  transform: translateY(-50%);
  padding: 0 clamp(12px, 2vw, 22px);
  display: grid;
  gap: 5px;
}
#views button {
  all: unset;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-align: right;
  transition: color .16s ease, border-color .16s ease;
}
#views button:hover { color: var(--paper); }
#views button[aria-pressed="true"] {
  color: var(--hyrox);
  border-color: var(--edge);
}
#views button:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }

/* ---------- slot tooltip ---------- */
#tip {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -114%);
  transition: opacity .16s ease;
  background: var(--surface);
  backdrop-filter: blur(9px);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 11px 14px;
  min-width: 168px;
  display: grid;
  gap: 5px;
}
#tip.on { opacity: 1; }
#tip .zone {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--paper);
}
#tip .row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--muted);
}
#tip .row b {
  color: var(--sponsor);
  font-variant-numeric: tabular-nums;
}
#tip .row.taken b { color: var(--paper); }
#tip .next {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
#tip .next b { color: var(--hyrox); font-variant-numeric: tabular-nums; }
#tip .coming {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 5px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
#tip .row[hidden], #tip .next[hidden], #tip .coming[hidden] { display: none; }
#tip .coming span {
  display: block;
  margin-top: 3px;
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

/* a tap on a zone that isn't on sale yet points at the button that is */
#cta .buy.nudge { animation: nudge .9s cubic-bezier(.3,.7,.4,1) 1; }
@keyframes nudge {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 237, 0, 0); }
  30%      { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 237, 0, .25); }
  60%      { transform: scale(.99); }
}

/* ---------- panel ---------- */
#panel {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 3, 4, .74);
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}
#panel.on { opacity: 1; pointer-events: auto; }

#panel .card {
  width: min(500px, 100%);
  max-height: 84vh;
  background: #16120c;
  border: 1px solid var(--edge);
  border-radius: 22px;
  padding: 20px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 15px;
  overflow: hidden;
  transform: translateY(8px) scale(.99);
  transition: transform .24s cubic-bezier(.2,.8,.3,1);
}
#panel.on .card { transform: none; }

#panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#panel h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(21px, 3vw, 27px);
  text-transform: uppercase;
  letter-spacing: -.005em;
  line-height: .95;
}
#panel .x {
  all: unset;
  cursor: pointer;
  width: 26px; height: 26px;
  display: grid; place-content: center;
  border-radius: 50%;
  color: var(--muted-2);
  font-size: 12px;
}
#panel .x:hover { color: var(--hyrox); background: rgba(255,255,255,.06); }
#panel .x:focus-visible { outline: 1px solid var(--hyrox); }

/* two panes instead of one long scroll */
#panel .tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}
#panel .tabs button {
  all: unset;
  flex: 1;
  cursor: pointer;
  text-align: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  transition: background .16s ease, color .16s ease;
}
#panel .tabs button:hover { color: var(--paper); }
#panel .tabs button[aria-selected="true"] {
  background: var(--hyrox);
  color: #16150a;
}
#panel .tabs button:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

#panel .pane {
  display: none;
  overflow-y: auto;
  padding-right: 4px;
}
#panel .pane.on { display: block; }

#panel .lede {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--paper);
}

#panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 13px;
  counter-reset: step;
}
#panel ol li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}
#panel ol li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: #16150a;
  background: var(--hyrox);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  margin-top: 1px;
}
#panel ol li b { color: var(--paper); }

/* whose skin: the ledger shows one athlete at a time */
#panel .whose {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}
#panel .whose button {
  all: unset;
  flex: 1;
  cursor: pointer;
  text-align: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--muted);
  transition: background .16s ease, color .16s ease;
}
#panel .whose button:hover { color: var(--paper); }
#panel .whose button[aria-pressed="true"] {
  background: rgba(255, 237, 0, .16);
  color: var(--hyrox);
}
#panel .whose button[data-athlete="ombeline"][aria-pressed="true"] {
  background: rgba(255, 94, 168, .16);
  color: #ff8ec4;
}
#panel .whose button:focus-visible { outline: 1px solid var(--paper); outline-offset: 1px; }

/* the zone table gets a header row, so the columns are named */
#panel .ledgerhead {
  display: grid;
  grid-template-columns: 1fr auto 86px;
  gap: 12px;
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
#panel .ledgerhead span:last-child { text-align: right; }

#panel .buy {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  padding: 13px;
  border-radius: 999px;
  background: var(--hyrox);
  color: #16150a;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 14px;
}
#panel .buy:hover { background: #fff45c; }
#panel .buy:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
#panel .buy.disabled {
  cursor: not-allowed;
  background: rgba(255,255,255,.08);
  color: var(--muted);
}
#panel .buy.disabled:hover { background: rgba(255,255,255,.08); }

/* slot ledger inside panel */
#ledger {
  display: grid;
  gap: 0;
}
/*
 * A row is a plain box, not a button, because a held one carries a link to
 * the sponsor's site (a link cannot sit inside a button). Its zone name is
 * the button, stretched over the whole row by ::after, so the row is still
 * one click target and one tab stop; the site link sits above that layer.
 */
#ledger .l {
  all: unset;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto 86px;
  gap: 12px;
  align-items: baseline;
  padding: 11px 10px;
  margin: 0 -8px;
  border-radius: 12px;
  border-bottom: 1px solid rgba(255,255,255,.055);
  font-family: var(--mono);
  font-size: 11.5px;
  transition: background .14s ease;
}
#ledger .l:hover { background: rgba(255, 237, 0, .07); }
#ledger .l:last-child { border-bottom: none; }
#ledger .z {
  all: unset;
  cursor: pointer;
  color: var(--paper);
  letter-spacing: .03em;
}
#ledger .z::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
}
#ledger .z:focus-visible::after { outline: 1px solid var(--hyrox); outline-offset: -1px; }
#ledger .lsite {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 3px;
  color: var(--hyrox);
  text-decoration: none;
  border-radius: 4px;
}
#ledger .lsite:hover { background: color-mix(in srgb, var(--hyrox) 16%, transparent); }
#ledger .lsite:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 1px; }
#ledger .b { color: var(--muted); letter-spacing: .04em; font-size: 10.5px; }
#ledger .p {
  color: var(--sponsor);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 62px;
}
#ledger .l.free .b { color: var(--hyrox); }
/* after the close an empty zone is unsold: muted, not the "available" yellow */
#ledger .l.unsold .b { color: var(--muted-2); }

/* Bangkok / Paris: sales not open yet, shown instead of a clickable table */
#ledger .lclosed {
  display: grid;
  gap: 6px;
  padding: 26px 14px;
  text-align: center;
  border: 1px dashed var(--edge);
  border-radius: 14px;
}
#ledger .lclosed strong {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 15px;
  color: var(--paper);
}
#ledger .lclosed span {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
#ledger .l.free .p { color: var(--hyrox); }
/* after the close the rows stay (they are the sponsors page) under a short notice */
#ledger .lclosed.ended {
  padding: 12px 14px;
  margin-bottom: 8px;
  text-align: left;
}
#ledger .lclosed.ended strong { font-size: 14px; }

/* mobile */
/**
 * Phone layout, for a narrow window held sideways (a small phone turned):
 * a phone held upright has a layout of its own, one top bar, one segmented
 * control and one bottom sheet (see "Phones held upright" at the end).
 *
 * Everything used to pile into the top 180px: the CTA had been moved to the
 * top for the open zone sheet, but the rule applied all the time, and the
 * city picker and social buttons were sent up there with it. The stack is
 * now: brand + clock at the top, social under the clock, and from the bottom
 * up: the legal row, season panel / avatar, the CTA, then the city picker.
 * The zone sheet slides over the bottom controls, so nothing needs to move
 * out of its way.
 */
@media (max-width: 720px) and (orientation: landscape) {
  /*
   * The view list becomes one row under the header: on a phone held upright
   * the home shot fills the width, so a column on the right edge would sit
   * over Ombeline. Pinch replaces the zoom buttons.
   */
  /* under the header, however tall it is: its state line ("Enchères
     closes", "En course") takes a line more in some languages, and the
     block ran over the row by up to 13px (ui/hud.js sets --brand-bottom) */
  #views {
    top: max(146px, calc(var(--brand-bottom, 0px) + 6px));
    left: 12px;
    right: 12px;
    width: fit-content;
    margin: 0 auto;
    transform: none;
    display: flex;
    gap: 2px;
    padding: 4px;
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    scrollbar-width: none;
    background: linear-gradient(200deg, rgba(14, 11, 8, .74), rgba(14, 11, 8, .48));
    backdrop-filter: blur(11px);
    border: 1px solid rgba(255, 237, 0, .12);
    border-radius: 999px;
  }
  #views::-webkit-scrollbar { display: none; }
  #views button {
    flex: none;
    padding: 6px 8px;
    font-size: 9px;
    letter-spacing: .04em;
    text-align: center;
  }
  #views .zoomrow { display: none; }
  #athlete .txt { display: none; }

  /* 58vw + the clock's 42vw left the two panels overlapping by the gutters */
  #brand { max-width: calc(58vw - 32px); padding: 10px 13px 11px; gap: 5px; }
  #brand h1 { font-size: clamp(22px, 6.4vw, 28px); }
  /* tighter mono so the sales countdown ("Enchères : 26 j 9 h restantes ·
     clôture 20.10") keeps to two lines and the block clears the view row;
     with a state line over it, the lines close up a little too */
  #brand .sub { font-size: 9.5px; letter-spacing: .05em; gap: 4px 10px; line-height: 1.24; }
  #brand .sub > span { white-space: normal; }
  #brand .sub .lstate { margin-bottom: 2px; }

  #clock {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 18px;
    max-width: 42vw;
  }
  #clock .n { font-size: 16px; }
  #clock .units { gap: 6px; }
  #clock .cstate { gap: 6px; }
  #clock .cslabel { font-size: 8.5px; letter-spacing: .1em; }

  /* a clear 8px gap above the season panel and the avatar under it, which
     are 64px tall and stand on the legal row (--foot-phone). No hint on a
     phone: the picker sits right above the button */
  #cta { bottom: calc(72px + var(--foot-phone)); width: min(360px, 88vw); }
  #cta .hintbox { display: none; }
  #cta .buy { padding: 13px 20px; font-size: 15px; }
}
/* except during the race: most visitors come on a phone, and nothing else
   there said the pair were out racing (the line under the title is small,
   the clock just counts). The race sign comes back as one line over the
   city picker, above the athletes' feet: "● En course · on est sur le
   parcours", the third phrase and the dot before it left out (panels.js).
   Not on a phone held sideways: there the picker already reaches the view
   row under the header */
@media (max-width: 720px) and (min-height: 480px) {
  html:not(.no3d) #cta .hintbox:has(.hint.live) { display: flex; order: -1; min-height: 0; }
  #cta .hint.live {
    font-size: 9.5px;
    letter-spacing: .07em;
    padding: 4px 12px;
    white-space: nowrap;
    max-width: 100%;
  }
  #cta .hint.live span:nth-child(n+3),
  #cta .hint.live span:nth-child(2) .sep { display: none; }
}

/*
 * The season panel's compact form: one small block, no taller than the avatar
 * button — label and total on the left, the supporter button on the right,
 * and one short line underneath: the charity's part, then the number of
 * supporters once there are some (see ui/goal.js). The line on what the
 * money is for, the charity sentence and the count row belong to the roomy
 * panel; the "payment opens soon" notice takes the short line's place.
 * Before the first euro the block is just the invitation beside the button.
 * Narrow phones held sideways show it in the strip under the CTA, beside the
 * avatar; landscape windows too short for the full panel use it too, placed
 * higher. An upright phone shows the full panel, in its bottom sheet.
 */
@media (max-width: 720px) and (orientation: landscape), (min-width: 721px) and (max-width: 960px) and (max-height: 639px) {
  #goal {
    width: calc(100vw - 24px - 74px);
    padding: 7px 10px 8px 12px;
    border-radius: 16px;
    grid-template-columns: 1fr auto;
    grid-template-areas: "label btn" "sum btn" "line line";
    gap: 1px 8px;
    align-items: center;
  }
  #goal .glabel { grid-area: label; font-size: 8.5px; letter-spacing: .1em; line-height: 1.1; }
  #goal .gsum { grid-area: sum; font-size: 11px; line-height: 1.2; }
  #goal .gsum b { font-size: 14px; }
  /* no tracking, and the short wording without the charity's name
     (`charityShort`): "dont 21,50 € pour l'association · 12 soutiens" and
     the other three languages fit a 360px phone. Narrower (320px), the
     charity phrase takes the ellipsis and the count stays whole. */
  #goal .gshort {
    display: flex;
    gap: .6em;
    grid-area: line;
    min-width: 0;
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 8.5px;
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--muted);
    white-space: nowrap;
  }
  #goal .gshort .gsc { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  #goal .gshort .gsn { flex: none; }
  #goal .gcharity, #goal .gfor, #goal .gcount, #goal .gthanks { display: none; }
  #goal .gfoot { display: contents; }
  #goal .gsupport { grid-area: btn; padding: 7px 10px; font-size: 11px; }
  #goal .gnotice {
    grid-area: line;
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 10.5px;
    line-height: 1;
    color: var(--hyrox);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #goal:has(.gnotice:not([hidden])) .gshort { display: none; }

  /* before the first euro: the invitation alone beside the button (the label
     would make it a third line) */
  #goal.empty { grid-template-areas: "sum btn" "line line"; }
  #goal.empty .glabel { display: none; }
  #goal.empty .gsum {
    font-family: var(--cond);
    font-weight: 700;
    font-size: 12.5px;
    line-height: 1.2;
    letter-spacing: .01em;
    text-transform: none;
  }
}
/*
 * Sideways phones: on the left, just above the button and the hint (the
 * column's bottom offset, then about 101px for the button, a gap and the
 * hint's two lines, then a gap), and narrow enough to stay clear of the city
 * picker above them, which starts 128px left of centre. The brand block
 * above ends well before it.
 */
@media (min-width: 721px) and (max-width: 960px) and (max-height: 639px) {
  #goal {
    width: min(268px, calc(50vw - 153px));
    bottom: calc(var(--cta-bottom) + 108px);
  }
  #goal .gsupport { padding: 6px 8px; font-size: 10.5px; }
}
/*
 * The audience block's compact form, on phones and on tablets held upright
 * (up to 960px wide), in the season panel's compact type: the label; one line
 * for the two counts, "● 12 en direct · 4 832 visites"; and the latest
 * arrival alone. On a tablet it stands above the big button's column, in
 * the season panel's place (the panel, full size, steps up over it): the
 * full block there made the column climb into the title block, or on the
 * flat page into its note. On a narrow phone held sideways it takes the strip
 * beside the avatar, and the season panel, the big button's column and the
 * calendar button step up by its height and an 8px gap, so nothing stands
 * over anything. An upright phone shows the full block, with its arrivals,
 * in its bottom sheet.
 */
@media (min-width: 721px) and (max-width: 960px), (max-width: 720px) and (orientation: landscape) {
  :root { --aud-gap: 8px; }
  #audience {
    padding: 7px 10px 8px 12px;
    border-radius: 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "label label" "short short" "feed feed";
    gap: 3px 8px;
    align-items: center;
  }
  #audience .aulabel {
    grid-area: label;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 8.5px;
    letter-spacing: .1em;
    line-height: 1.1;
  }
  #audience .aunow, #audience .autotal { display: none; }
  #audience .aushort {
    grid-area: short;
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--cond);
    font-weight: 700;
    font-size: 11px;
    line-height: 1.2;
    color: var(--paper);
    white-space: nowrap;
  }
  #audience .aushort::before { content: ''; display: inline-block; margin: 0 7px 0 1px; vertical-align: 1px; }
  #audience .aushort b {
    font-family: var(--mono);
    font-size: 14px;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
  }
  #audience .aufeed { grid-area: feed; margin: 0; padding: 0; border-top: 0; }
  #audience .aufeed li:nth-child(n+2) { display: none; }
  #audience .aufeed li { grid-template-columns: 15px minmax(0, 1fr) auto; column-gap: 6px; font-size: 11px; line-height: 1.25; }
  #audience .auflag { font-size: 12px; }
  #audience .auago { font-size: 9px; }
  /* the flat page's note, centred, steps up too, clear of the column */
  html.no3d.aud #no3d { translate: 0 calc(-1 * var(--aud-lift)); }
}
@media (max-width: 720px) and (orientation: landscape) {
  #audience { width: calc(100vw - 24px - 74px); }
  /* (html.aud: the two buttons' own rules come later, and `all: unset` there
     would take the translate back) */
  html.aud #cta, html.aud #diaryFab, html.aud #backHome { translate: 0 calc(-1 * var(--aud-lift)); }
  #cta { transition: translate .32s cubic-bezier(.2,.8,.3,1); }
}
/* too short for both cards (a phone held sideways): the block stays out
   and the season panel where it was (ui/audience.js sees no height) */
@media (max-height: 539px), (min-width: 721px) and (max-width: 960px) and (max-height: 639px) {
  #audience { display: none !important; }
}
@media (max-width: 460px) {
  /* keep the units: "37 00 53 47" alone does not say which is days */
  #clock .unit { gap: 1px; }
  #clock .u { font-size: 8px; }
  #goal .gsupport { padding: 6px 8px; font-size: 10.5px; }
}
@media (max-width: 370px) {
  /* a hair smaller again, so the French sales countdown ("Enchères : 26 j
     7 h restantes · clôture 20.10") still keeps to two lines at 360px */
  #brand .sub { font-size: 9px; letter-spacing: .03em; }
  /* and the phone's race sign keeps to its one line at 320px */
  #cta .hint.live { font-size: 9px; letter-spacing: .04em; padding: 4px 10px; }
}
@media (max-width: 340px) {
  /* the smallest phones drop the close date from that line (the zone card
     still gives it), so the brand block clears the view row */
  #brand .lclose { display: none; }
}
@media (max-width: 340px) and (orientation: landscape) {
  /* and the season panel drops its label, as it does before the first euro:
     beside Italian's wide "Ci sostenga · 10 €" the label and the total each
     took two lines and the block ran 10px into the big button above it */
  #goal { grid-template-areas: "sum btn" "line line"; }
  #goal .glabel { display: none; }
}





/* the zone card is display:grid, which beats the UA rule for [hidden] — and
   so do its grid, flex and `all: unset` children */
#slot[hidden],
#slot [hidden] { display: none !important; }

/* ---------- zone panel ----------
   Deliberately not the reference's rounded blue card: this is a hard-edged
   technical readout — clipped corners, a rule-led hierarchy, HYROX red.       */
#slot {
  position: fixed;
  z-index: 50;
  top: 50%;
  right: clamp(14px, 2.4vw, 30px);
  transform: translateY(-50%) translateX(16px);
  width: min(318px, calc(100vw - 28px));
  /* with what is included and the payment notice a held zone's card is about
     650px tall: on a short window it scrolls instead of running off both ends */
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(26,16,18,.94), rgba(15,9,11,.96));
  backdrop-filter: blur(14px);
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: 16px 17px 17px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
  display: grid;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2,.8,.3,1);
}
#slot.on { opacity: 1; pointer-events: auto; transform: translateY(-50%) translateX(0); }

#slot header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
#slot .sh { display: grid; gap: 1px; }
#slot .slabel {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#slot .sz {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--paper);
}
#slot .sx {
  all: unset;
  cursor: pointer;
  width: 22px; height: 22px;
  display: grid; place-content: center;
  color: var(--muted-2);
  font-size: 12px;
}
#slot .sx:hover { color: var(--hyrox); }
#slot .sx:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }

#slot .smeta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
#slot .sdot {
  width: 3px; height: 3px;
  background: var(--muted-2);
  display: inline-block;
}

/* brand block: logo and name side by side, left-aligned, not centred */
#slot .sbody[hidden] { display: none !important; }
#slot .sbody { display: grid; gap: 10px; }

#slot .brandrow {
  display: flex;
  align-items: center;
  gap: 12px;
}
#slot .mark {
  width: 52px; height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-content: center;
  font-size: 26px;
  line-height: 1;
  border-radius: 13px;
  background: var(--sponsor);
  color: #0d0f06;
}
#slot .mark.open {
  background: transparent;
  border: 1px dashed var(--hyrox);
  color: var(--hyrox);
  font-family: var(--mono);
  font-size: 22px;
}
/* an unsold zone after the close: grey, not the accent that invites a buyer */
#slot .mark.open.ended { border-color: var(--muted-2); color: var(--muted-2); }
/* the brand's logo in the glyph's place, on the field its picture asks for
   (data/logos.js logoField, set by ui/panels.js): its own background, or the
   brand's colour behind a see-through one; a photo covers the chip */
#slot .mark.logo {
  display: block;
  position: relative;
  overflow: hidden;
  width: calc(52px * var(--wide, 1));
  flex-basis: calc(52px * var(--wide, 1));
  background: #f7f5f0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
/* placed by ui/panels.js once the logo is read; until then, contained */
#slot .mark.logo img { position: absolute; left: 12%; top: 12%; width: 76%; height: 76%; max-width: none; object-fit: contain; }
#slot .mark.logo.cover img { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; }

/* the brand's Instagram and X: each network's mark in a small round bubble,
   like the site's own (#social); the handle is in its tooltip */
#slot .bsoc[hidden], #slot .bsoc a[hidden] { display: none; }
#slot .bsoc { display: flex; gap: 7px; margin-top: 6px; }
#slot .bsoc a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(200deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02));
  color: var(--paper);
  transition: border-color .15s, color .15s, background .15s, transform .15s;
}
#slot .bsoc svg { width: 15px; height: 15px; }
#slot .bsoc a:not([href]) { cursor: default; }
#slot .bsoc a:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }
#slot .bsoc a[href]:active { transform: scale(.94); }
@media (hover: hover) {
  #slot .bsoc a[href]:hover { border-color: var(--hyrox); color: var(--hyrox); background: color-mix(in srgb, var(--hyrox) 12%, transparent); }
}
#slot .brandtext { display: grid; gap: 2px; min-width: 0; }
#slot .bname {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.1;
  color: var(--paper);
}
#slot .bby {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--muted);
}
#slot .btag {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}
/* a long description, folded to three lines: « Voir plus » shows the rest */
#slot .btag:not(.open):not([hidden]) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
#slot .bmore {
  justify-self: start;
  margin-top: -6px;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--paper) 35%, transparent);
  background: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--paper);
  cursor: pointer;
}
#slot .bmore:hover { border-color: var(--paper); }
#slot .bmore:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }
#slot .bsite {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--hyrox);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--hyrox) 35%, transparent);
  justify-self: start;
  padding-bottom: 1px;
}
#slot .bsite::after { content: ' ↗'; opacity: .6; }
#slot .bsite:hover { border-color: var(--hyrox); }
#slot .bsite:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }

/* ---------- the zone card's live line (index.html #slotAudience, ui/audience.js) ----------
   "● 3 regardent · 128 vues du logo", under the brand: who has this card
   open now, behind the audience block's green light (its pulse, aulive),
   and the card's views; in the card's small mono type, the figures in
   paper. It wraps on a narrow card rather than running off it. Hidden
   without figures (the #slot [hidden] rule above). */
#slot .saud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
  margin: -3px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .04em;
  line-height: 1.4;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
#slot .saud b { font-weight: 700; color: var(--paper); }
#slot .saunow { display: inline-flex; align-items: center; gap: 7px; }
#slot .saulight {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  animation: aulive 1.8s ease-out infinite;
}
#slot .sausep { color: var(--muted-2); }
@media (prefers-reduced-motion: reduce) {
  #slot .saulight { animation: none; box-shadow: 0 0 0 2px rgba(70, 214, 127, .25); }
}

/* what a sponsor gets: four short lines, ticked in the card's accent */
#slot .sinc {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.07);
}
#slot .sinct {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#slot .sinc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
#slot .sinc li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
}
#slot .sinc li::before {
  content: '';
  position: absolute;
  left: 2px; top: 4px;
  width: 8px; height: 4px;
  border-left: 2px solid var(--hyrox);
  border-bottom: 2px solid var(--hyrox);
  transform: rotate(-45deg);
}

/* prices read as a ledger, not a hero number */
#slot .pricebox {
  display: grid;
  gap: 5px;
  padding: 11px 13px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--hyrox) 6%, transparent);
}
#slot .pricerow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
#slot .pricerow b {
  font-size: 15px;
  letter-spacing: -.01em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
#slot .pricerow.next { color: var(--muted); }
#slot .pricerow.next b {
  font-size: 21px;
  font-weight: 700;
  color: var(--hyrox);
}
/* "dont 8 € pour l'association", under the price, in the card's accent
   (Ombeline's pink on hers, through the --hyrox override below) */
#slot .pcharity {
  margin-top: -2px;
  text-align: right;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .03em;
  line-height: 1.4;
  color: var(--hyrox);
}
#slot .pcharity b { font-weight: 700; }
#slot .pcharity a { color: inherit; }
#slot .pcharity:empty { display: none; }

#slot .stake {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
  padding: 13px 16px;
  background: var(--hyrox);
  color: #16150a;
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .02em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background .16s ease;
}
#slot .stake:hover { background: #fff45c; }
#slot .stake:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

/* Ombeline's zones take her pink instead of Thomas's yellow */
/*
 * Ombeline's accent is pink, and it has to be pink everywhere on her card —
 * the zone label, the price, the link, the frame — not just the button: the
 * rest used to stay Thomas's yellow. Everything in the card reads its accent
 * from --hyrox / --edge, so redefining them here is enough; the same goes for
 * her patches' hover card and her rows in the ledger.
 */
#slot.ombeline,
#tip.ombeline,
#bodyTip.ombeline,
#player.ombeline,
#about .apc.ombeline,
#panel.ombeline #ledger {
  --hyrox: #ff8ec4;
  --sponsor: #ff8ec4;
  --edge: rgba(255, 142, 196, .30);
}
#slot.ombeline .stake { background: #ff8ec4; color: #2a0f1c; }
#slot.ombeline .stake:hover { background: #ffa8d4; }

#slot .srule {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--muted-2);
}
#slot .srule button {
  all: unset;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 1px solid var(--edge);
}
#slot .srule button:hover { color: var(--hyrox); }

@media (max-width: 720px) {
  #slot {
    top: auto; bottom: 0; right: 0; left: 0;
    width: auto;
    transform: translateY(16px);
    border-radius: 18px 18px 0 0;
    max-height: 64vh;
    overflow-y: auto;
  }
  #slot.on { transform: none; }
}
/*
 * Short screens: the 64vh sheet on a 667px phone, or the card on a phone held
 * sideways, cannot show everything, and with the "Included" list above the
 * price the buy button — and the "payment opens soon" answer under it — sat
 * below the fold: pressing the only button on the card seemed to do nothing.
 * Here the card tightens and the list moves after the button and the rule,
 * so the zone, its price and the button come first and the list is a short
 * scroll away. (payment.js also scrolls the card to its notice.)
 */
@media (max-width: 720px) and (max-height: 740px), (min-width: 721px) and (max-height: 660px) {
  /* (a held zone's card with its notice is about 630px, which a desktop
     window shows whole from 660px up; the 64vh phone sheet keeps the button
     in view from about 740px up, and payment.js scrolls to the notice) */
  #slot { gap: 9px; padding-top: 13px; padding-bottom: 14px; }
  #slot .sinc { order: 1; }
}
/* a phone-width window held sideways: the sheet may use more of the height */
@media (max-width: 720px) and (max-height: 500px) {
  #slot { max-height: calc(100vh - 56px); }
}

/* ---------- player cards (ui/player.js) ----------
   A game card per athlete: the big overall rating, the name, six rated
   qualities as bars that fill as it lands, goal times, stations and a
   special skill. On the right like the zone card (which it replaces), a
   sheet from the bottom on phones. It sits over the About sheet it can be
   opened from. Ombeline's takes her pink through the --hyrox override. */
#player[hidden],
#player [hidden] { display: none !important; }
#player {
  position: fixed;
  z-index: 63;
  top: 50%;
  right: clamp(14px, 2.4vw, 30px);
  width: min(344px, calc(100vw - 28px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  /* it lands with a slight turn, like a card dealt onto the table */
  transform: translateY(-50%) perspective(900px) translateX(22px) rotateY(-9deg);
  transition: opacity .2s ease, transform .38s cubic-bezier(.2,.8,.3,1);
}
#player.on {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) perspective(900px);
}

#player .pcard {
  position: relative;
  display: grid;
  gap: 11px;
  padding: 15px 17px 13px;
  border-radius: 20px;
  border: 1px solid var(--edge);
  background: linear-gradient(162deg, color-mix(in srgb, var(--hyrox) 17%, #1a1210) 0%, #170e10 34%, #0e0809 100%);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
  overflow: hidden;
  outline: none;
}
/* a sheen crosses the card once as it lands (none with reduced motion) */
#player .pcard::before {
  content: '';
  position: absolute;
  inset: -30% -70%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 44%, rgba(255, 255, 255, .09) 50%, transparent 56%);
  transform: translateX(-70%);
}
#player.on .pcard::before { animation: psheen 1.2s .12s cubic-bezier(.3,.6,.3,1) both; }
@keyframes psheen { to { transform: translateX(70%); } }

#player .ptop {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding-right: 24px;
}
#player .prating {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 68px;
  padding: 9px 7px 8px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: color-mix(in srgb, var(--hyrox) 11%, transparent);
}
#player .povr {
  font-family: var(--display);
  font-weight: 700;
  font-size: 48px;
  line-height: .9;
  letter-spacing: -.01em;
  color: var(--hyrox);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px color-mix(in srgb, var(--hyrox) 35%, transparent);
}
#player .povl {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
#player .pid { display: grid; gap: 4px; min-width: 0; }
#player .prole {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#player .pname {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 32px;
  line-height: .92;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--paper);
  overflow-wrap: anywhere;
}
#player .pname span {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  letter-spacing: .05em;
  color: var(--muted);
}
#player .pduo {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
#player .px {
  all: unset;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted-2);
  font-size: 12px;
}
#player .px:hover { color: var(--hyrox); background: rgba(255, 255, 255, .06); }
#player .px:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 1px; }

/* the six ratings */
#player .pstats {
  list-style: none;
  margin: 0;
  padding: 11px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .07);
  display: grid;
  gap: 6px;
}
#player .pstats li {
  display: grid;
  grid-template-columns: 104px 1fr 42px;
  align-items: center;
  gap: 10px;
}
/* a rating printed in words (« 10 000 % »): its value's column widens */
#player .pstats li.wide { grid-template-columns: 104px 1fr 70px; }
#player .pstats li.wide .psv { font-size: 13px; }
#player .psl {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.1;
  color: var(--paper);
}
#player .psl small {
  display: block;
  margin-top: 1px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 8.5px;
  letter-spacing: .04em;
  color: var(--muted-2);
}
#player .psb {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
#player .psb i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--hyrox) 45%, transparent), var(--hyrox));
  box-shadow: 0 0 8px color-mix(in srgb, var(--hyrox) 40%, transparent);
  transform-origin: left center;
  transform: scaleX(0);
  /* one after the other, top to bottom */
  transition: transform .8s cubic-bezier(.2,.8,.3,1) calc(var(--i) * 70ms + 140ms);
}
#player.fill .psb i { transform: scaleX(var(--v)); }
#player .psv {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  text-align: right;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* ↗ on a rating that is going up */
#player .pup {
  margin-left: 2px;
  font-style: normal;
  font-size: 11px;
  color: var(--hyrox);
  cursor: help;
}
#player .prise {
  margin: -3px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .03em;
  line-height: 1.4;
  color: var(--muted);
}
#player .prise i { font-style: normal; color: var(--hyrox); }

/* goal times, as two race tiles */
#player .pblock { display: grid; gap: 6px; }
#player .pt {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#player .pgoals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#player .pgoal {
  display: grid;
  gap: 1px;
  padding: 7px 10px 8px;
  border-radius: 11px;
  border: 1px solid var(--edge-soft);
  background: rgba(255, 255, 255, .035);
}
#player .pgoal span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
/* 17px: "moins d’une heure", "menos de una hora" keep to one line in the tile */
#player .pgoal b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.05;
  color: var(--paper);
  text-wrap: balance;
}

/* experience and stations: label, then value. One grid for the three rows
   (the rows' boxes step aside), so the label column is as wide as the
   longest label in each language: a fixed 112px broke "Estaciones
   favoritas" onto two lines. */
#player .pfacts {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: baseline;
  gap: 5px 12px;
}
#player .pfacts div { display: contents; }
#player .pfacts dt {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--muted-2);
}
#player .pfacts dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--paper);
}

#player .pskill {
  display: grid;
  gap: 3px;
  padding: 9px 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: linear-gradient(120deg, color-mix(in srgb, var(--hyrox) 13%, transparent), transparent 72%);
}
#player .pskill b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#player .pskill b + span { font-size: 13px; line-height: 1.4; color: var(--paper); }

/* the card that has no figures yet: no ratings are invented */
#player .psoon {
  display: grid;
  justify-items: center;
  gap: 9px;
  padding: 26px 16px 24px;
  text-align: center;
  border: 1px dashed var(--edge);
  border-radius: 14px;
  background: color-mix(in srgb, var(--hyrox) 5%, transparent);
}
#player .psoon b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--hyrox);
}
#player .psoon span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  line-height: 1.6;
  color: var(--muted-2);
}
#player.soon .povr { text-shadow: none; }

#player .pfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
#player .pself {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  color: var(--muted-2);
}
/* the other athlete's card, in that athlete's colour */
#player .pswap {
  all: unset;
  cursor: pointer;
  margin-left: auto;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .01em;
  color: #ffed00;
  white-space: nowrap;
}
#player .pswap[data-player="ombeline"] { color: #ff8ec4; }
#player .pswap:hover { text-decoration: underline; text-underline-offset: 3px; }
#player .pswap:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; border-radius: 3px; }

@media (max-width: 720px) {
  #player {
    top: auto; bottom: 0; left: 0; right: 0;
    width: auto;
    max-height: calc(100vh - 56px);
    border-radius: 20px 20px 0 0;
    transform: translateY(24px);
  }
  #player.on { transform: none; }
  #player .pcard {
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
}
/*
 * Laptop windows under 800px tall (1280x720, 1366x657 once the browser has
 * its bars): the card, about 595px, centred, ran over the countdown and its
 * language switcher at the top and the social row and corner card at the
 * bottom, hiding the language buttons outright. From 800px up it clears
 * both centred. Below, it hangs from under the clock (20px, its 67px, a 9px
 * gap) and stops 9px above the social row (66px up, 31px tall: 106px),
 * tightened to about 510px so a 720px window shows it whole; shorter windows
 * scroll it inside that band. Narrower windows keep their own layout: the
 * social row moves under the clock there.
 */
@media (min-width: 931px) and (max-height: 799px) {
  #player {
    top: 96px;
    max-height: calc(100vh - 202px);
    transform: perspective(900px) translateX(22px) rotateY(-9deg);
  }
  #player.on { transform: perspective(900px); }
  #player .pcard { gap: 7px; padding: 12px 16px 10px; }
  #player .povr { font-size: 42px; }
  #player .prating { padding: 7px 7px 6px; }
  #player .pname { font-size: 28px; }
  #player .pname span { font-size: 15px; }
  #player .pstats { gap: 3px; padding-top: 8px; }
  /* the notes ("sleds", "SkiErg · RowErg") beside their name, not under it */
  #player .pstats li { grid-template-columns: 122px 1fr 42px; }
  #player .psl small { display: inline; margin: 0 0 0 5px; }
  #player .pgoal { padding: 5px 10px 6px; }
  #player .pfacts { row-gap: 3px; }
  #player .pskill { padding: 7px 12px 8px; }
  #player .pskill b { font-size: 18px; }
  #player .pfoot { padding-top: 7px; }
}
/* up to about 1160px wide the card's column meets the centred one (the hint
   and the big button, 420px wide): it stops above the hint too (the button
   32px up, 59px tall, a 9px gap, the hint's 34px, then 9px); under about
   995px it meets the city picker above them (75px and a 9px gap more) */
@media (min-width: 931px) and (max-width: 1160px) and (max-height: 799px) {
  #player { max-height: calc(100vh - 239px); }
}
@media (min-width: 931px) and (max-width: 994px) and (max-height: 799px) {
  #player { max-height: calc(100vh - 323px); }
}
@media (prefers-reduced-motion: reduce) {
  /* filled at once: no stagger, no sheen, no turn */
  #player .psb i { transition: none; }
  #player .pcard::before { display: none; }
  #player, #player.on { transition: opacity .01ms; }
}

/* hovering a body outside its patches: whose card a click opens */
#bodyTip, #screenTip {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 16px));
  transition: opacity .14s ease;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 12px 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--surface);
  backdrop-filter: blur(9px);
  white-space: nowrap;
}
#bodyTip.on, #screenTip.on { opacity: 1; }
#bodyTip b, #screenTip b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#bodyTip span, #screenTip span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper);
}

/* ---------- about dialog ---------- */
/* the About sheet, and the support sheet in the same frame (ui/goal.js) */
#about,
#supportSheet {
  position: fixed;
  z-index: 62;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 3, 4, .76);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}
#about.on, #supportSheet.on { opacity: 1; pointer-events: auto; }
#about .card,
#supportSheet .card {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #150c0e;
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  gap: 14px;
  transform: translateY(10px);
  transition: transform .24s cubic-bezier(.2,.8,.3,1);
}
#about.on .card, #supportSheet.on .card { transform: none; }
#about .ah,
#supportSheet .ah {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#about h2,
#supportSheet h2 {
  margin: 0;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .01em;
}
#about .ax,
#supportSheet .ax {
  all: unset;
  cursor: pointer;
  width: 28px; height: 28px;
  display: grid; place-content: center;
  border-radius: 7px;
  color: var(--muted);
}
#about .ax:hover, #supportSheet .ax:hover { color: var(--paper); background: rgba(255,255,255,.07); }
#about .ax:focus-visible, #supportSheet .ax:focus-visible { outline: 1px solid var(--hyrox); }

#about .araised {
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: rgba(255, 237, 0, .07);
  padding: 20px 16px;
  display: grid;
  gap: 5px;
  justify-items: center;
}
/* two counters, one per athlete, instead of a single pooled total */
/**
 * Each column fills its half. The parent's `justify-items: center` shrank the
 * columns to their content and centred them in their tracks, so the divider
 * (the first column's right border) landed wherever "7 / 11" happened to end
 * rather than at the middle of the box.
 */
#about .araised2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: stretch;
  gap: 0;
  padding: 18px 8px;
}
#about .acol {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 0 12px;
}
#about .acol:first-child { border-right: 1px solid var(--edge); }
#about .abig {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -.02em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
#about .abig.ombeline { color: #ff8ec4; }
#about .asub {
  font-size: 13px;
  color: var(--muted);
}
#about .acaption {
  text-align: center;
  margin-top: -6px;
}
#about p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 60ch;
}
#about p b { color: var(--paper); font-weight: 700; }
#about .alead { color: var(--paper); }
#about .abul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}
#about .abul li {
  position: relative;
  padding-left: 17px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
#about .abul li::before {
  content: '';
  position: absolute;
  left: 2px; top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--hyrox);
}
#about .abul li b { color: var(--paper); }
/* the supporters wall: names from data/funding.js, nothing until there are some */
#supportSheet .asupp {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid var(--edge-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}
#supportSheet .asupp h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#supportSheet .asupp ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#supportSheet .asupp li {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13px;
  color: var(--paper);
}
#supportSheet .asupp p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
/* the wall scrolls with the sheet; a long one stays a block of names */
#supportSheet .asupp { scroll-margin-top: 12px; }
#supportSheet .asupp ul { max-height: 42vh; overflow-y: auto; }
#supportSheet .sintro { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
/* the amounts: pills in the site's yellow, the chosen one filled */
#supportSheet .samounts { display: flex; flex-wrap: wrap; gap: 8px; }
#supportSheet .samounts button {
  all: unset;
  cursor: pointer;
  min-width: 64px;
  padding: 10px 14px;
  box-sizing: border-box;
  text-align: center;
  border: 1px solid rgba(255, 237, 0, .4);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--hyrox);
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
#supportSheet .samounts button.on { background: var(--hyrox); color: #16150a; }
#supportSheet .samounts button:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
#supportSheet .samounts button:active { transform: scale(.96); }
@media (hover: hover) { #supportSheet .samounts button:not(.on):hover { background: rgba(255, 237, 0, .12); } }
#supportSheet .sother { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
#supportSheet .sfield { display: flex; align-items: center; gap: 6px; }
#supportSheet .sfield input {
  width: 96px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, .04);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 16px;
  text-align: right;
  -moz-appearance: textfield;
}
#supportSheet .sfield input::-webkit-outer-spin-button,
#supportSheet .sfield input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#supportSheet .sfield input:focus { outline: 1px solid var(--hyrox); border-color: transparent; }
#supportSheet .sfield input[aria-invalid="true"] { outline: 1px solid #ff6b6b; border-color: transparent; }
#supportSheet .sfield b { font-family: var(--mono); color: var(--muted); }
#supportSheet .srange { margin: -6px 0 0; font-size: 11.5px; color: var(--muted-2); text-align: right; }
#supportSheet .srange.bad { color: #ff8a8a; }
#supportSheet .sgo {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  width: 100%;
  padding: 14px 18px;
  text-align: center;
  border-radius: 999px;
  background: var(--hyrox);
  color: #16150a;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: background .15s ease, transform .15s ease;
}
#supportSheet .sgo:hover { background: #fff88a; }
#supportSheet .sgo:active { transform: scale(.98); }
#supportSheet .sgo:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
#supportSheet .sgo[aria-disabled="true"] { background: rgba(255, 255, 255, .08); color: var(--muted); }
#supportSheet .snotice {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--paper);
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--edge);
  background: color-mix(in srgb, var(--hyrox) 9%, transparent);
}
#supportSheet .snotice[hidden] { display: none; }
#supportSheet .snotice.on { animation: notice .32s cubic-bezier(.2,.8,.3,1) both; }
#supportSheet .sfine { margin: -4px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--muted-2); text-align: center; }
#supportSheet .sfine a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
#supportSheet .sfine a:hover { color: var(--paper); }
/* the player cards, one small card each (ui/player.js) */
#about .aplayers { display: grid; gap: 9px; }
#about .aplayers h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#about .apgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#about .apc {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "r n" "r s" "go go";
  align-items: center;
  column-gap: 11px;
  row-gap: 1px;
  padding: 11px 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: linear-gradient(150deg, color-mix(in srgb, var(--hyrox) 13%, transparent), transparent 72%);
  transition: border-color .16s ease, transform .16s ease;
}
#about .apc:hover { border-color: var(--hyrox); transform: translateY(-1px); }
#about .apc:focus-visible { outline: 2px solid var(--hyrox); outline-offset: 2px; }
#about .apr {
  grid-area: r;
  min-width: 40px;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  color: var(--hyrox);
}
#about .apn {
  grid-area: n;
  align-self: end;
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--paper);
}
#about .aps {
  grid-area: s;
  align-self: start;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--muted);
}
#about .apgo {
  grid-area: go;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-family: var(--cond);
  font-weight: 700;
  font-size: 12px;
  color: var(--hyrox);
}
/* the training diary: one line on what it is, and the button that opens it */
#about .adiary {
  display: grid;
  gap: 7px;
  padding: 13px 14px 10px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(255, 237, 0, .08), transparent 70%);
}
#about .adiary h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#about .adiary p { font-size: 13px; line-height: 1.5; }
#about .adbtn {
  all: unset;
  cursor: pointer;
  justify-self: start;
  padding: 6px 0;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--hyrox);
}
#about .adbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
#about .adbtn:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; border-radius: 2px; }
/* what supporting is: the button in the season panel only names the amount */
#about .afine {
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.55;
}
#about .afoot {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 14px;
  display: grid;
  gap: 9px;
  justify-items: center;
}
/* what the clock counts to: the close of sales, or the race */
#about .aclockl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
#about .aclockl:empty { display: none; }
#about .aclock {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .04em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
/* "Résultat très vite", in place of the final time (ui/hud.js) */
#about .aclock.words {
  font-family: var(--cond);
  font-size: 16px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#about .anote {
  font-size: 12px;
  color: var(--muted-2);
  text-align: center;
}
#about .buy {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  width: 100%;
  text-align: center;
  padding: 14px;
  border-radius: 10px;
  background: var(--hyrox);
  color: #16150a;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 15px;
}
#about .buy:hover { background: #fff88a; }
#about .buy:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

/* athlete corner button */
#athlete {
  all: unset;
  box-sizing: border-box;
  position: fixed;
  z-index: 20;
  right: clamp(12px, 2vw, 20px);
  bottom: clamp(12px, 2vw, 20px);
  padding: 10px 12px 10px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: right;
  cursor: pointer;
  background: linear-gradient(200deg, rgba(14, 11, 8, .74), rgba(14, 11, 8, .48));
  backdrop-filter: blur(11px);
  border: 1px solid rgba(255, 237, 0, .12);
  border-radius: 999px;
}
#athlete .h .ext { color: var(--muted-2); font-size: 11px; }
#athlete:hover .h { color: var(--hyrox); }
#athlete:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }









/* ---------- instagram pop-over ----------
   Anchored above the button rather than covering the screen: this is a peek
   at a profile, not a dialog that stops everything.                          */
#feedPanel {
  position: fixed;
  z-index: 64;
  right: clamp(16px, 3vw, 30px);
  bottom: calc(clamp(66px, 7.5vh, 88px) + 44px);
  width: min(330px, calc(100vw - 32px));
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(.98);
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .24s cubic-bezier(.2,.8,.3,1);
}
#feedPanel.on { opacity: 1; pointer-events: auto; transform: none; }

#feedPanel .card {
  background: rgba(20, 15, 10, .96);
  backdrop-filter: blur(14px);
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: 15px;
  display: grid;
  gap: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}

/* the little tail pointing down at the button */
#feedPanel .card::after {
  content: '';
  position: absolute;
  right: 26px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: rgba(20, 15, 10, .96);
  border-right: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  transform: rotate(45deg);
}

#feedPanel .intro {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  min-height: 3.1em;
}
#feedPanel .intro b { color: var(--paper); font-weight: 700; }

#feedPanel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px solid rgba(255,255,255,.07);
}
#feedPanel .who { display: flex; align-items: center; gap: 10px; }
#feedPanel .pic {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  background: linear-gradient(150deg, #3a3224, #1a1611);
  border: 1px solid var(--edge);
  color: var(--hyrox);
  font-family: var(--display);
  font-weight: 800;
  font-size: 14px;
  background-size: cover;
  background-position: center;
}
#feedPanel .pic.photo { color: transparent; }
#feedPanel .names { display: grid; gap: 1px; }
#feedPanel .handle {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 15px;
  color: var(--paper);
}
#feedPanel .real {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--muted-2);
}
#feedPanel .x {
  all: unset;
  cursor: pointer;
  width: 22px; height: 22px;
  display: grid; place-content: center;
  border-radius: 50%;
  color: var(--muted-2);
  font-size: 11px;
}
#feedPanel .x:hover { color: var(--hyrox); background: rgba(255,255,255,.06); }
#feedPanel .x:focus-visible { outline: 1px solid var(--hyrox); }

#feedPanel .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  border-radius: 10px;
  overflow: hidden;
}
#feedPanel .grid a {
  position: relative;
  aspect-ratio: 1;
  display: block;
  background: #201810;
  background-size: cover;
  background-position: center;
  text-decoration: none;
}
#feedPanel .grid a .ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
}
#feedPanel .grid a:hover { outline: 1px solid var(--hyrox); outline-offset: -1px; }

#feedPanel .follow {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 999px;
  background: var(--hyrox);
  color: #16150a;
  text-decoration: none;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
}
#feedPanel .follow:hover { background: #fff45c; }
#feedPanel .follow:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

@media (max-width: 720px) {
  #feedPanel {
    right: 50%;
    bottom: auto;
    top: 132px;
    transform: translateX(50%) translateY(10px);
  }
  #feedPanel.on { transform: translateX(50%); }
  #feedPanel .card::after { display: none; }
}

/* ---------- social ---------- */
#social {
  position: fixed;
  z-index: 22;
  right: clamp(12px, 2vw, 20px);
  /* 10px clear of the corner card, whose top sits 82px up */
  bottom: 92px;
  display: flex;
  align-items: stretch;
  gap: 10px;
}

/* Instagram and X: round bubbles in the same style as the calendar button
   (#diaryFab), which sits just left of them in the same row. The handle is
   a tooltip above the bubble, on hover and keyboard focus, and stays in the
   aria-label. */
#social button,
#social a {
  --fab: 50px;
  all: unset;
  box-sizing: border-box;
  position: relative;
  width: var(--fab);
  height: var(--fab);
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 50%;
  color: var(--hyrox);
  background: linear-gradient(200deg, rgba(14, 11, 8, .8), rgba(14, 11, 8, .55));
  backdrop-filter: blur(11px);
  border: 1px solid rgba(255, 237, 0, .4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4), inset 0 0 0 3px rgba(255, 237, 0, .05);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
#social svg { display: block; width: 22px; height: 22px; }
#social button:focus-visible,
#social a:focus-visible { outline: 2px solid var(--hyrox); outline-offset: 3px; }
#social button:active,
#social a:active { transform: scale(.96); }
#social span {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  translate: 0 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(14, 11, 8, .9);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 12px;
  letter-spacing: .08em;
  color: var(--paper);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s ease, translate .16s ease;
}
#social button:focus-visible span,
#social a:focus-visible span { opacity: 1; translate: none; }
@media (hover: hover) {
  #social button:hover,
  #social a:hover { border-color: var(--hyrox); background: linear-gradient(200deg, rgba(40, 36, 8, .85), rgba(14, 11, 8, .6)); }
  #social button:hover span,
  #social a:hover span { opacity: 1; translate: none; }
}

/* typewriter caret on the corner name */
#athlete .h .caret {
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 1px;
  background: var(--hyrox);
  vertical-align: -0.12em;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- instagram (legacy) ---------- */
#insta {
  position: fixed;
  z-index: 22;
  right: clamp(16px, 3vw, 30px);
  bottom: clamp(62px, 7vh, 82px);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 8px;
  text-decoration: none;
  border: 1px solid var(--edge);
  background: rgba(14, 11, 8, .58);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  transition: color .16s ease, border-color .16s ease;
}
#insta svg { width: 15px; height: 15px; flex: 0 0 15px; }
#insta:hover { color: var(--hyrox); border-color: var(--hyrox); }
#insta:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }

/* the avatar becomes the profile photo when one is supplied */
#athlete .av {
  background-size: cover;
  background-position: center;
}
#athlete .av.photo { color: transparent; border-color: var(--hyrox); }

@media (max-width: 720px) {
  #social { bottom: auto; top: 92px; gap: 8px; }
  #social button, #social a { --fab: 40px; }
  #social svg { width: 19px; height: 19px; }
  #social span { bottom: auto; top: calc(100% + 8px); translate: 0 -5px; }
}
@media (max-width: 370px) {
  #social button, #social a { --fab: 36px; }
  #social svg { width: 17px; height: 17px; }
}
/* short landscape windows: there is no room between the corner avatar and
   the view list, so the row sits left of the avatar, centred on it */
@media (min-width: 721px) and (max-height: 539px) {
  #social { gap: 8px; bottom: 30px; right: calc(clamp(12px, 2vw, 20px) + 78px); }
  #social button, #social a { --fab: 36px; }
  #social svg { width: 17px; height: 17px; }
}

/*
 * Tablets and narrow windows (721–930 px): the corner card, 215px wide,
 * ran over the right end of the big button — by 60px on an iPad held
 * upright (768 px), by 20px on a phone held sideways (844 px). As on a
 * phone, it is just the avatar there (it still opens the About sheet).
 * Upright, the social row beside the button goes under the clock, as on a
 * phone, with the Instagram pop-over opening below it; sideways, the view
 * list fills that side, and the row stays where it is. Below about 785 px
 * the 400px header also ran under the clock (about 350px): it gives way.
 */
@media (min-width: 721px) and (max-width: 930px) {
  #athlete .txt { display: none; }
  #brand { max-width: min(400px, calc(100vw - 400px)); }
  /* and narrower than the French sales line kept on one line ("Enchères :
     24 j 23 h restantes · clôture 20.10"), which ran 25px out of it at
     760px: the line wraps instead, before the close date rather than inside it */
  #brand .sub > span { white-space: normal; }
  #brand .lclose { white-space: nowrap; }
}
@media (min-width: 721px) and (max-width: 930px) and (min-height: 640px) {
  #social { bottom: auto; top: 92px; }
  #social span { bottom: auto; top: calc(100% + 8px); translate: 0 -5px; }
  /* the row went up under the clock: the calendar button takes its place */
  #diaryFab { right: clamp(12px, 2vw, 20px); }
  #feedPanel { bottom: auto; top: 132px; transform: translateY(-10px) scale(.98); transform-origin: top right; }
  #feedPanel.on { transform: none; }
  #feedPanel .card::after { display: none; }
}

/* ---------- the training calendar's round button (index.html #diaryFab) ----------
   It opens the calendar (ui/diary.js). On a desktop it stands at the right
   edge, 12px above the Instagram and X bubbles (66-88px up, 31px tall): the
   view list, centred on that edge and about 182px tall, stays clear of it
   from about 520px of height up. On a phone it sits at the right edge beside
   the city picker, centred on it (the bottom-centre column stands 72px up
   on the legal row, then the 48px button, a 9px gap and the 69px picker),
   and shrinks on the narrowest phones so it keeps clear of the picker in
   all four languages (10px at 320px). A short window (a phone held
   sideways) has no room on the right edge between the view list and the
   bubbles: there it stands just right of the picker (about 256px wide),
   over the right end of the hint. Its short name shows as a tooltip on
   hover and on keyboard focus; its accessible name is the calendar's full
   one (aria-label). */
#diaryFab {
  --fab: 50px;
  all: unset;
  box-sizing: border-box;
  position: fixed;
  z-index: 21;
  /* same row as #social, left of its two 50px bubbles and their gaps */
  right: calc(clamp(12px, 2vw, 20px) + 120px);
  bottom: 92px;
  width: var(--fab);
  height: var(--fab);
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 50%;
  color: var(--hyrox);
  background: linear-gradient(200deg, rgba(14, 11, 8, .8), rgba(14, 11, 8, .55));
  backdrop-filter: blur(11px);
  border: 1px solid rgba(255, 237, 0, .4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4), inset 0 0 0 3px rgba(255, 237, 0, .05);
  /* translate: on a phone it steps up with the big button's column when the
     audience block comes in under the season panel */
  transition: border-color .16s ease, background .16s ease, transform .16s ease, translate .32s cubic-bezier(.2,.8,.3,1);
}
#diaryFab svg { display: block; width: 24px; height: 24px; }
#diaryFab:focus-visible { outline: 2px solid var(--hyrox); outline-offset: 3px; }
#diaryFab:active { transform: scale(.96); }
/* the tooltip: to the left on a desktop, over the scene */
#diaryFab .fabtip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  translate: 5px 0;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(14, 11, 8, .9);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: none;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s ease, translate .16s ease;
}
#diaryFab:focus-visible .fabtip { opacity: 1; translate: none; }
@media (hover: hover) {
  #diaryFab:hover { border-color: var(--hyrox); background: linear-gradient(200deg, rgba(40, 36, 8, .85), rgba(14, 11, 8, .6)); }
  #diaryFab:hover .fabtip { opacity: 1; translate: none; }
}
@media (max-width: 720px) {
  #diaryFab {
    --fab: 44px;
    right: 12px;
    bottom: calc(var(--foot-phone) + 129px + (69px - var(--fab)) / 2);
  }
  #diaryFab svg { width: 22px; height: 22px; }
  /* above it, right-aligned, and above the picker's top beside it */
  #diaryFab .fabtip { right: 0; top: auto; bottom: calc(100% + 22px); transform: none; translate: 0 4px; }
}
@media (max-width: 370px) {
  #diaryFab { --fab: 40px; }
  #diaryFab svg { width: 20px; height: 20px; }
}
@media (max-width: 340px) {
  #diaryFab { --fab: 36px; }
  #diaryFab svg { width: 18px; height: 18px; }
}
/* short windows: right of the city picker, centred on it (the column's
   bottom, the big button — 30px of padding and its line, 1.48 of its font
   size — the hint's 34px and the two 9px gaps, then half of what the
   picker's 75px leaves); the tooltip above it, and above the picker's top */
@media (min-width: 721px) and (max-height: 539px) {
  #diaryFab {
    --fab: 44px;
    right: auto;
    left: calc(50% + 146px);
    bottom: calc(var(--cta-bottom) + 82px + 1.48 * clamp(16px, 1.9vw, 20px) + (75px - var(--fab)) / 2);
  }
  #diaryFab svg { width: 22px; height: 22px; }
  #diaryFab .fabtip { right: auto; left: 50%; top: auto; bottom: calc(100% + 22px); transform: translateX(-50%); translate: 0 4px; }
}

/* ---------- fps readout ---------- */
#fps {
  position: fixed;
  z-index: 70;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  padding: 5px 12px;
  background: rgba(10, 9, 6, .82);
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--hyrox);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* ---------- city picker ----------
   The top of the bottom-centre column (#cta): above the hint and the button,
   a gap from each, however many lines the hint takes. */
#cities {
  display: flex;
  gap: 4px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 4px;
  background: rgba(14, 11, 8, .72);
  backdrop-filter: blur(12px);
}

/**
 * Each button is its own pill.
 *
 * Packing them edge to edge inside a rounded strip left the selected one with
 * square inner corners against its neighbours — the "not round enough" look.
 * Separate pills with a gap between them are round on all four corners
 * whichever one is active.
 */
#cities button { border-radius: 999px; }
#cities button {
  all: unset;
  cursor: pointer;
  display: grid;
  gap: 1px;
  justify-items: center;
  padding: 8px 20px;
  border-radius: 999px;
  transition: background .18s ease, color .18s ease;
}
#cities .cflag {
  font-size: 15px;
  line-height: 1;
  margin-bottom: 1px;
}
#cities .cname {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .01em;
  color: var(--muted);
}
#cities .cdate {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
#cities button:hover .cname { color: var(--paper); }
#cities button[aria-pressed="true"] { background: var(--hyrox); }
#cities button[aria-pressed="true"] .cname { color: #16150a; }
#cities button[aria-pressed="true"] .cdate { color: rgba(22,21,10,.68); }
#cities button:focus-visible { outline: 1px solid var(--paper); outline-offset: 2px; }
/* a race kept off the site from the admin (scene/turntable.js, syncCityPicker);
   with one race left, its pill only names it: nothing to pick */
#cities button[hidden] { display: none; }
#cities.single button { cursor: default; }

@media (max-width: 720px) {
  #cities button { padding: 6px 13px; }
  #cities .cname { font-size: 12.5px; }
  #cities .cdate { font-size: 9px; }
}

/* ---------- back to full body ---------- */
#backHome {
  all: unset;
  box-sizing: border-box;
  position: fixed;
  z-index: 24;
  left: 50%;
  top: 84px;
  transform: translateX(-50%) translateY(-6px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  cursor: pointer;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--paper);
  font-family: var(--cond);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s cubic-bezier(.2,.8,.3,1), border-color .16s ease, translate .32s cubic-bezier(.2,.8,.3,1);
}
#backHome.on {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
#backHome:hover { border-color: var(--hyrox); }
#backHome:focus-visible { outline: 2px solid var(--hyrox); outline-offset: 3px; }
#backHome .arrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--hyrox);
}

@media (max-width: 720px) {
  #backHome { top: auto; bottom: calc(184px + var(--foot-phone)); font-size: 12.5px; }
}

/* ---------- scene switcher ---------- */
#scenes {
  top: 96px;
  right: 0;
  padding: 0 clamp(12px, 2vw, 22px);
  display: grid;
  gap: 4px;
  justify-items: end;
}
#scenes button {
  all: unset;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 7px 11px;
  border: 1px solid var(--edge);
  text-align: right;
  min-width: 96px;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
#scenes button:hover { color: var(--paper); border-color: var(--muted); }
#scenes button[aria-pressed="true"] {
  color: #16150a;
  background: var(--hyrox);
  border-color: var(--hyrox);
  font-weight: 700;
}
#scenes button:focus-visible { outline: 1px solid var(--paper); outline-offset: 2px; }

@media (max-width: 720px) {
  #scenes {
    top: auto;
    bottom: 92px;
    left: 0;
    right: auto;
    grid-auto-flow: column;
    justify-items: start;
  }
  #scenes button { min-width: 0; }
}

/* ---------- language switcher ---------- */
#lang {
  display: flex;
  gap: 3px;
  margin-left: 8px;
  align-self: center;
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 3px;
}
#lang button { border-radius: 999px; }
#lang button {
  all: unset;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  transition: color .15s ease, background .15s ease;
}
#lang button:hover { color: var(--paper); }
#lang button[aria-pressed="true"] {
  color: #16150a;
  background: var(--hyrox);
  font-weight: 700;
}
#lang button:focus-visible { outline: 1px solid var(--paper); outline-offset: 1px; }

/* ---------- zoom controls ---------- */
.zoomrow {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.zoomrow button {
  all: unset;
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: grid;
  place-content: center;
  border: 1px solid var(--edge);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  transition: color .15s ease, border-color .15s ease;
}
.zoomrow button:hover { color: var(--hyrox); border-color: var(--hyrox); }
.zoomrow button:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }

@media (max-width: 720px) {
  #lang { margin-left: 0; }
}

/* ---------- the legal row (index.html #legal) ----------
   The legal pages and the disclaimer HYROX's terms call for ("not
   affiliated"), in one discreet line at the foot of the page. On a desktop
   it sits in the gap under the big button (--cta-bottom is at least 18px),
   between the season panel and the corner card, and moves nothing. On a
   phone that gap is taken by the season panel and the avatar, so they, the
   big button and the back button step up by --foot-phone to make room. The
   credits the Creative Commons licences ask for live in the legal notice.
   On a desktop the row stays under about 425px in every language (Spanish
   is the longest): from 961 to 1100px the season panel's right edge sits
   222px left of centre. */
#legal {
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100vw - 24px);
  padding: 1px 9px;
  border-radius: 999px;
  /* a faint plate, like the hint's: the row runs over the floor's yellow ring */
  background: rgba(14, 11, 8, .5);
  backdrop-filter: blur(6px);
  font-family: var(--cond);
  font-weight: 600;
  font-size: 10px;
  line-height: 13px;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap;
}
#legal nav { display: flex; align-items: center; gap: 6px; flex: none; }
#legal a { color: var(--muted); text-decoration: none; }
#legal a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }
#legal a:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; border-radius: 2px; }
/* an invisible hit area taller than the 12-13px line, for fingers: 4px up
   (on a phone, exactly to the panels standing on the row, never over them)
   and 4px down to the screen's edge; 3px sideways stays inside the gaps */
#legal a { position: relative; }
#legal a::after { content: ''; position: absolute; inset: -4px -3px; }
/* the contact link: the word, or on the narrowest phones an envelope */
#legal .lcontact svg { display: none; width: 12px; height: 9px; vertical-align: -1px; }
#legal .lsep { color: var(--muted-2); }
/* never wider than the screen: the disclaimer would take an ellipsis before
   the row ran off the edge (the steps below keep it whole on real phones) */
#legal .ldisc { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 720px) {
  /* 12px tall, 4px up: the bottom row stands 4px above it (--foot-phone) */
  #legal { bottom: 4px; gap: 4px; max-width: calc(100vw - 16px); padding: 0 6px; font-size: 9px; line-height: 12px; }
  #legal nav { gap: 4px; }
  #goal, #audience, #athlete { bottom: var(--foot-phone); }
}
/* With "Contact" in the row it runs longer, and the disclaimer must stay
   whole. On phones "(FR)" goes (the pages still say they are in French):
   the Spanish row, the longest, is then 356px, which a 375px phone holds.
   Narrower, "Contact" becomes an envelope, then a hair of size and gap:
   it keeps to one line down to 320px. On desktops from 961 to about
   1140px, where the season panel comes closest, "(FR)" goes too, so the
   row stays under about 420px (Spanish, 471px with it). */
@media (max-width: 480px), (min-width: 961px) and (max-width: 1140px) {
  #legal .lfr { display: none; }
}
@media (max-width: 374px) {
  #legal .lcontact span { display: none; }
  #legal .lcontact svg { display: inline-block; }
}
@media (max-width: 340px) {
  #legal { font-size: 8px; letter-spacing: .01em; gap: 3px; }
  #legal nav { gap: 3px; }
}

/* the same, at the foot of the About sheet */
#about .alegal {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  text-align: center;
}
#about .alegal .adisc {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}
#about .alinks {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted-2);
}
#about .alinks a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .25); text-underline-offset: 2px; }
#about .alinks a:hover { color: var(--paper); text-decoration-color: currentColor; }
#about .alinks a:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; border-radius: 2px; }
/* the contact address, written out so it can be copied */
#about .alegal .acontact {
  margin-top: 4px;
  font-family: var(--cond);
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted-2);
}
#about .acontact a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .25); text-underline-offset: 2px; overflow-wrap: anywhere; }
#about .acontact a:hover { color: var(--paper); text-decoration-color: currentColor; }
#about .acontact a:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; border-radius: 2px; }

/* without JavaScript: over the boot screen, which then shows only the mark */
#noscript {
  position: fixed;
  z-index: 95;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(460px, calc(100vw - 32px));
  padding: 16px 18px;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--ink-2);
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
#noscript p { margin: 0 0 6px; }
#noscript p:last-child { margin: 0; }
#noscript .nslinks { margin-top: 10px; font-family: var(--cond); font-weight: 700; font-size: 14px; }
#noscript .nsdisc { font-size: 12px; color: var(--muted-2); }
#noscript a { color: var(--hyrox); }

/* ---------- the page without the 3D hall (src/boot.js) ---------- */
html.no3d body {
  /* both layers fixed: every element on the page is position: fixed, so the
     body has no height of its own and a scrolling layer would be 0 px tall */
  background:
    linear-gradient(180deg, rgba(11, 7, 8, .72), rgba(11, 7, 8, .94)) fixed,
    url('../../public/img/nice.webp') center / cover no-repeat fixed,
    var(--ink);
}
html.no3d #stage,
html.no3d #views,
html.no3d #cities,
html.no3d #tip,
html.no3d #backHome,
html.no3d #bodyTip,
html.no3d #screenTip,
html.no3d #cta .hintbox { display: none; }

#no3d {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  padding: 20px 22px;
  display: grid;
  gap: 10px;
  justify-items: start;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--edge);
  border-radius: 18px;
  text-shadow: none;
}
#no3d strong {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--paper);
}
#no3d span { font-family: var(--body); font-size: 14px; line-height: 1.45; color: var(--muted); }
#no3d button {
  all: unset;
  cursor: pointer;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hyrox);
  border-bottom: 1px solid rgba(255, 237, 0, .4);
  padding-bottom: 1px;
}
#no3d button:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- training diary (ui/diary.js) ----------
   The calendar from the diary's first day to race day, over everything but
   the demo badge (and the About sheet it opens from). Hidden, not just
   transparent, while closed: nothing in it takes the keyboard's focus. */
#diary {
  position: fixed;
  z-index: 66;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 3, 4, .76);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .24s ease, visibility 0s linear .24s;
}
#diary.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .24s ease; }
#diary [hidden] { display: none !important; }
/* a fixed height: the months and the day beside them scroll inside it,
   and the card keeps its size from one day to the next */
#diary .card {
  width: min(1120px, 100%);
  height: min(88vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #150c0e;
  border: 1px solid var(--edge);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  transform: translateY(10px);
  transition: transform .24s cubic-bezier(.2,.8,.3,1);
}
#diary.on .card { transform: none; }

#diary .dh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
#diary .dht { display: grid; gap: 4px; min-width: 0; }
#diary .dkick {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#diary h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 28px);
  line-height: .95;
  letter-spacing: -.005em;
  text-transform: uppercase;
}
#diary .dx {
  all: unset;
  flex: none;
  cursor: pointer;
  width: 36px; height: 36px;
  display: grid; place-content: center;
  border-radius: 50%;
  color: var(--muted);
  font-size: 13px;
}
#diary .dx:hover { color: var(--hyrox); background: rgba(255, 255, 255, .07); }
#diary .dx:focus-visible { outline: 1px solid var(--hyrox); }

/* the months on the left and the day shown on the right, each scrolling on
   its own, so the day stays in sight while the months go by */
#diary .dbody {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  padding: 16px 22px 0;
}
#diary .dsplit {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  min-height: 0;
}
#diary .dcal,
#diary .dday {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
/* a few pixels around the edges: room for the focus rings */
#diary .dcal { margin-left: -4px; padding: 4px 18px 22px 4px; }
#diary .dday {
  container: dday / inline-size;
  margin-right: -4px;
  padding: 4px 4px 22px 24px;
  border-left: 1px solid rgba(255, 255, 255, .06);
}

#diary .dintro { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

/* what the colours mean */
#diary .dlegend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 13px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
#diary .dlegend li { display: inline-flex; align-items: center; gap: 6px; }
#diary .dlegend li::before {
  content: '';
  width: 11px; height: 11px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--k) 28%, #150c0e);
  box-shadow: inset 0 -2px 0 var(--k);
}
#diary .dlegend li.rest::before { background: none; box-shadow: none; border: 1px dashed var(--k); }
#diary .dlegend .ltoday::before { background: none; box-shadow: inset 0 0 0 1.5px var(--paper); }
#diary .dlegend .lrace::before { background: rgba(255, 237, 0, .12); box-shadow: inset 0 0 0 1.5px var(--hyrox); }

/* a month: its name, the weekdays from Monday, the days */
#diary .dmonth { display: grid; gap: 7px; }
#diary .dmonth h3 {
  margin: 4px 0 0;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .01em;
  color: var(--paper);
}
#diary .dweek,
#diary .dgrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}
#diary .dweek span {
  text-align: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
#diary .dd {
  all: unset;
  box-sizing: border-box;
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3;
  display: grid;
  place-content: center;
  justify-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
#diary .dd.blank { background: none; }
#diary .dd.before { color: var(--muted-2); background: rgba(255, 255, 255, .018); }
#diary .dd.future { opacity: .38; }
/* a day with an entry: its kind's colour, a bar underneath */
#diary .dd.has {
  cursor: pointer;
  font-weight: 700;
  color: var(--paper);
  background: color-mix(in srgb, var(--k) 22%, #150c0e);
  box-shadow: inset 0 -3px 0 var(--k);
  transition: background .14s ease, transform .14s ease;
}
#diary .dd.has:hover { background: color-mix(in srgb, var(--k) 34%, #150c0e); transform: translateY(-1px); }
#diary .dd.has:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
/* a rest day is logged too, just quieter */
#diary .dd.has.rest {
  background: none;
  box-shadow: none;
  border: 1px dashed var(--k);
  color: var(--muted);
}
/* a poster is the day's thumbnail, darkened so the number stays readable */
#diary .dd.has.thumb {
  background:
    linear-gradient(180deg, rgba(10, 6, 7, .25), rgba(10, 6, 7, .72)),
    var(--img) center / cover no-repeat,
    #150c0e;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
}
#diary .dd .dplay {
  position: absolute;
  top: 4px; right: 5px;
  font-size: 7px;
  font-style: normal;
  color: var(--k);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
}
#diary .dd.today { box-shadow: inset 0 0 0 2px var(--paper); color: var(--paper); font-weight: 700; }
#diary .dd.has.today { box-shadow: inset 0 -3px 0 var(--k), inset 0 0 0 2px var(--paper); }
/* the day shown on the right: filled with its colour, its number dark on
   it; today keeps its white ring on top */
#diary .dd.has.sel,
#diary .dd.has.sel:hover {
  background: var(--k);
  color: #150c0e;
  box-shadow: none;
  text-shadow: none;
  transform: none;
}
#diary .dd.has.rest.sel { border-style: solid; }
#diary .dd.has.thumb.sel,
#diary .dd.has.thumb.sel:hover {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--k) 30%, transparent), color-mix(in srgb, var(--k) 55%, rgba(10, 6, 7, .7))),
    var(--img) center / cover no-repeat,
    #150c0e;
  color: var(--paper);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
  box-shadow: inset 0 0 0 3px var(--k);
}
#diary .dd.has.sel.today { box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 4px #150c0e; }
#diary .dd.has.thumb.sel.today { box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 5px var(--k); }
#diary .dd.has.sel .dplay { color: #150c0e; text-shadow: none; }
#diary .dd.has.thumb.sel .dplay { color: var(--paper); }
/* before the first day, today is the one shown */
#diary .dd.sel:not(.has) { background: rgba(242, 236, 230, .14); }
/* race day stands out even among the days still to come */
#diary .dd.race {
  opacity: 1;
  color: var(--hyrox);
  font-weight: 700;
  background: rgba(255, 237, 0, .12);
  box-shadow: inset 0 0 0 1.5px var(--hyrox);
}
#diary .dd em {
  margin-top: 3px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--hyrox);
}

/* ---------- the day on the right ---------- */
#diary .ddnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
}
/* back up to the months: only on a phone, where the day is under them */
#diary .ddback {
  all: unset;
  display: none;
  cursor: pointer;
  padding: 8px 2px;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--hyrox);
}
#diary .ddback:hover { text-decoration: underline; text-underline-offset: 3px; }
#diary .ddback:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; border-radius: 2px; }
#diary .ddarrows { display: flex; gap: 6px; }
#diary .ddarrows button {
  all: unset;
  cursor: pointer;
  width: 40px; height: 40px;
  display: grid; place-content: center;
  border: 1px solid var(--edge);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--paper);
}
#diary .ddarrows button:hover:not(:disabled) { border-color: var(--hyrox); color: var(--hyrox); }
#diary .ddarrows button:focus-visible { outline: 1px solid var(--paper); outline-offset: 2px; }
#diary .ddarrows button:disabled { opacity: .28; cursor: default; }

#diary .ddcard { display: grid; gap: 14px; }
/* the video on the left, the words on the right */
#diary .ddmain {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
/* a phone clip keeps its shape (9:16) until it has loaded, as tall as the
   side has room for (the card's height less the header's 76px or so, the
   side's paddings and the 40px row of the date and arrows above it); a day
   without one keeps that shape too, so the words stay put from one day to
   the next */
#diary .ddmedia {
  position: relative;
  height: clamp(200px, calc(min(88vh, 820px) - 184px), 440px);
  aspect-ratio: 9 / 16;
  max-width: 100%;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--k) 45%, transparent);
  background: #0d0708;
}
#diary .ddmedia.none { display: grid; }
#diary .ddvideo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0d0708;
}
#diary .ddstill { margin: 0; height: 100%; }
#diary .ddstill img { display: block; width: 100%; height: 100%; object-fit: cover; }
#diary .ddstill figcaption,
#diary .ddph span {
  font-family: var(--body);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
#diary .ddstill figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 12px 11px;
  background: linear-gradient(180deg, transparent, rgba(8, 5, 6, .88));
  color: var(--paper);
}
/* no video that day: a screen with nothing on it, which says so */
#diary .ddph {
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 20px 16px;
  text-align: center;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, color-mix(in srgb, var(--k) 14%, #241417), #12090b);
}
#diary .ddph b {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--k);
}
#diary .ddinfo { display: grid; gap: 10px; align-content: start; min-width: 0; }
#diary .ddmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
#diary .ddkind {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--k) 65%, transparent);
  background: color-mix(in srgb, var(--k) 20%, transparent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper);
}
#diary .ddmeta time {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
#diary .ddtitle {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
  overflow-wrap: anywhere;
}
#diary .ddtitle:focus { outline: none; }
#diary .ddtext { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); white-space: pre-line; }
#diary .ddinsta {
  justify-self: start;
  margin-top: 4px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--hyrox);
  color: #16150a;
  text-decoration: none;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 13.5px;
}
#diary .ddinsta:hover { background: #fff45c; }
#diary .ddinsta:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
/* a narrow side (a small laptop, a tablet): the words under the video */
@container dday (max-width: 460px) {
  #diary .ddmain { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  #diary .ddmedia { justify-self: center; }
  #diary .ddmedia.none { width: 100%; height: auto; aspect-ratio: auto; min-height: 150px; }
}

/* phones and short screens (a phone held sideways, a small laptop window):
   the sheet takes the screen and scrolls as one — the months, then the day
   under them. Two columns there left each one a strip too short for the
   day's video and the month's squares. ui/diary.js reads the same query
   (STACKED) */
@media (max-width: 720px), (max-height: 520px) {
  #diary { padding: 10px; }
  #diary .card { height: calc(100vh - 20px); height: calc(100dvh - 20px); border-radius: 16px; }
  #diary .dh { padding: 13px 10px 11px 16px; }
  #diary h2 { font-size: 22px; }
  #diary .dbody {
    display: block;
    padding: 14px 14px 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
  #diary .dsplit { display: block; }
  #diary .dcal, #diary .dday { gap: 14px; margin: 0; overflow: visible; }
  #diary .dcal { padding: 0; }
  /* at least a screen tall, so a tap on a square can bring the day to the top */
  #diary .dday {
    min-height: calc(100vh - 100px);
    min-height: calc(100dvh - 100px);
    margin-top: 22px;
    padding: 16px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }
  #diary .ddback { display: inline-flex; gap: 6px; justify-self: start; padding: 4px 2px; }
  /* nothing written yet: the blank page first, then the empty months (no
     square to tap down to it) */
  #diary .dsplit.empty { display: flex; flex-direction: column; }
  #diary .dsplit.empty .dday {
    order: -1;
    min-height: 0;
    margin: 0 0 22px;
    padding: 0 0 18px;
    border-top: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  #diary .dsplit.empty .ddback { display: none; }
}
/* short and wide (a phone held sideways): the months keep a readable width
   instead of squares a fifth of the screen tall, and the day keeps its video
   beside the words, as tall as the screen leaves under the sheet's header */
@media (min-width: 721px) and (max-height: 520px) {
  #diary .dcal { max-width: 520px; }
  #diary .ddmedia { height: max(160px, calc(100dvh - 216px)); }
}
@media (max-width: 720px) {
  #diary .dday { container-type: normal; }
  #diary .dweek, #diary .dgrid { gap: 4px; }
  #diary .dd { aspect-ratio: 1; border-radius: 8px; font-size: 11.5px; }
  #diary .dd em { font-size: 6.5px; letter-spacing: .02em; }
  #diary .ddmain { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  #diary .ddmedia { justify-self: center; height: min(50vh, 420px); }
  #diary .ddmedia.none { width: 100%; height: auto; aspect-ratio: auto; min-height: 150px; }
  #diary .ddtitle { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  #diary .dd.has:hover { transform: none; }
}

/* ---------- preview badges (ui/demo.js, ui/simu.js) ----------
   ?demo shows fictional data, ?simu a moment that has not come yet; each
   hangs a tab from the top edge the whole visit, side by side in one strip,
   over every panel and dialog and over the boot screen (#boot is 90), so a
   shared preview link is never taken for the real site. They stay in the
   gutter above the header blocks. */
#badges {
  position: fixed;
  z-index: 92;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  pointer-events: none;
}
#demoBadge,
#simuBadge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px 4px;
  border-radius: 0 0 10px 10px;
  background: var(--hyrox);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
  color: #16150a;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 10.5px;
  line-height: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}
/* the simulation in Paris's winter-sky blue, so the two never read as one */
#simuBadge { background: #7fd4ff; }
#simuBadge time { font-variant-numeric: tabular-nums; }
#simuBadge time::before { content: '·'; margin-right: .7em; }
/* caution-tape ends */
#demoBadge::before,
#demoBadge::after,
#simuBadge::before,
#simuBadge::after {
  content: '';
  width: 12px;
  align-self: stretch;
  background: repeating-linear-gradient(-45deg, #16150a 0 3px, transparent 3px 6px);
}
@media (max-width: 999px) {
  /* the gutter above the header is 2vw, under the 20px of the full tab
     (12px on a phone): the small tab keeps clear of the header blocks */
  #demoBadge, #simuBadge { gap: 6px; padding: 0 8px 1px; font-size: 8.5px; line-height: 11px; letter-spacing: .1em; border-radius: 0 0 7px 7px; }
  #demoBadge::before, #demoBadge::after,
  #simuBadge::before, #simuBadge::after { width: 8px; }
  /* both at once: tighter, and without the tape, to share a phone's width */
  #badges:has(#demoBadge):has(#simuBadge) { gap: 4px; }
  #badges:has(#demoBadge):has(#simuBadge) > * { letter-spacing: .03em; padding: 0 7px 1px; }
  #badges:has(#demoBadge):has(#simuBadge) > *::before,
  #badges:has(#demoBadge):has(#simuBadge) > *::after { display: none; }
}
@media (max-width: 370px) {
  #badges:has(#demoBadge):has(#simuBadge) > * { font-size: 7.5px; padding: 0 5px 1px; }
}

/* ---------- the finish card (ui/finish.js) ----------
   Once the race on screen is over: the time, the thanks, the next race. On a
   wide screen under the title block (placed from it, --f-top, and kept clear
   of the season panel, --f-room), open; on a phone and a short window, one
   line above the city picker (--f-bottom) that opens upwards on a tap. */
#finish {
  /* open over the calendar and social bubbles (21, 22) on a short window,
     under every card and dialog (50 and up) */
  z-index: 23;
  pointer-events: auto;
  left: clamp(12px, 2vw, 20px);
  top: var(--f-top, 200px);
  width: min(340px, calc(100vw - 24px));
  max-height: max(120px, var(--f-room, 360px));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 14px 16px 15px;
  background: linear-gradient(150deg, rgba(14, 11, 8, .86), rgba(14, 11, 8, .64));
  backdrop-filter: blur(11px);
  border: 1px solid rgba(255, 237, 0, .22);
  border-radius: 18px;
  text-shadow: none;
}
#finish summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  list-style: none;
  cursor: pointer;
}
#finish summary::-webkit-details-marker { display: none; }
#finish summary:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 4px; border-radius: 4px; }
#finish .fkick {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hyrox);
}
#finish .fflag {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: repeating-conic-gradient(var(--paper) 0 25%, #16150a 0 50%) 0 0 / 5.5px 5.5px;
}
#finish .ftitle {
  grid-column: 1;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--paper);
}
#finish .ftitle b { color: var(--hyrox); font-weight: 700; font-variant-numeric: tabular-nums; }
/* the fold's chevron: down while folded, up while open */
#finish .fchev {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 8px;
  height: 8px;
  margin: 0 4px 4px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
#finish[open] .fchev { transform: translateY(4px) rotate(-135deg); }
#finish .fbody {
  display: grid;
  gap: 10px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
#finish p { margin: 0; }
#finish .fgoal {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--paper);
}
#finish .fsoon {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: var(--paper);
}
#finish .fthanks {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
#finish .fthanks b { color: var(--paper); font-weight: 600; }
#finish .fnext {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
#finish .fnext b {
  font-family: var(--cond);
  font-size: 14px;
  letter-spacing: .03em;
  color: var(--paper);
}
/* the next race: the season panel's button, turning the room there */
#finish .fnext button {
  all: unset;
  cursor: pointer;
  padding: 7px 13px;
  border: 1px solid rgba(255, 237, 0, .45);
  border-radius: 999px;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--hyrox);
  white-space: nowrap;
  transition: background .16s ease, color .16s ease;
}
#finish .fnext button:hover { background: var(--hyrox); color: #16150a; }
#finish .fnext button:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

@media (max-width: 720px), (max-height: 539px) {
  #finish {
    top: auto;
    bottom: var(--f-bottom, 240px);
    left: 50%;
    transform: translateX(-50%);
    width: min(360px, calc(100vw - 24px));
    /* open, it stays under the view row (at 146px, about 34px tall) */
    max-height: max(96px, calc(100vh - var(--f-bottom, 240px) - 190px));
    padding: 9px 14px 10px;
    border-radius: 16px;
  }
  #finish summary { gap: 3px 10px; }
  #finish .fkick { font-size: 8.5px; letter-spacing: .1em; gap: 6px; }
  #finish .fflag { width: 9px; height: 9px; background-size: 4.5px 4.5px; }
  #finish .ftitle { font-size: 18px; }
  #finish .fbody { gap: 8px; margin-top: 8px; padding-top: 8px; }
  #finish .fgoal { font-size: 9.5px; }
  #finish .fsoon { font-size: 13.5px; }
  #finish .fthanks { font-size: 12px; line-height: 1.45; }
  #finish .fnext button { padding: 6px 11px; font-size: 11.5px; }
}
/* a short window (a phone held sideways): the picker's column comes up to
   the title block's height, so the line goes in the gap right of that block,
   under the clock and clear of the view list (--f-left, --f-top-short,
   --f-width, measured), and opens downwards */
@media (min-width: 721px) and (max-height: 539px) {
  #finish {
    top: var(--f-top-short, 84px);
    bottom: auto;
    left: var(--f-left, 430px);
    transform: none;
    width: var(--f-width, 280px);
    max-height: calc(100vh - var(--f-top-short, 84px) - 12px);
  }
}

/* ---------- the "under construction" gate ----------
   Its rules are in gate/gate.css, shared with the standalone gate page
   (gate.html); src/ui/gate.js loads them only when the gate shows. */

/* ─── Back from Stripe (ui/paymentReturn.js) ─────────────────────────── */
#payReturn {
  position: fixed;
  /* over the boot screen (90) and the badges (92): it shows while the hall loads */
  z-index: 93;
  top: 18px;
  left: 50%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(560px, calc(100vw - 24px));
  padding: 14px 14px 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--hyrox);
  background: rgba(16, 11, 12, .94);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
  color: #f2ece6;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity .35s, transform .35s;
}
#payReturn.on { opacity: 1; transform: translate(-50%, 0); }
#payReturn.cancel { border-color: rgba(242, 236, 230, .35); }
#payReturn p { flex: 1; }
#payReturn button {
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(242, 236, 230, .1);
  color: inherit;
  font-size: 18px;
  line-height: 28px;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) { #payReturn { transition: none; } }

/* ---------- phones held upright ----------
   One slim bar at the top (the title, the countdown, the calendar and the
   menu button), one segmented control under it (the views, with the way back
   from a zone as its first segment while there is one), and one sheet at the
   bottom (ui/phone.js): folded, the race picker, the big button and one line
   ("80 € collectés · ● 2 en direct"); pulled up or tapped, the season panel
   and the live arrivals under them. What a desktop spreads round the edges
   of the screen — the line under the title, How it works, the language, the
   pair's card, Instagram and X, the legal row — is in the menu (#menu). The
   camera frames the athletes in the room left between the bar and the
   folded sheet (rig.setInsets, from ui/phone.js), so nothing stands on
   them. The old phone rules above are for a narrow window held sideways. */
@media (max-width: 720px) and (orientation: portrait) {
  :root {
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --bar-top: calc(var(--safe-t) + 8px);
    --bar-h: 50px;
    /* where the view bar ends: the sheet never climbs past it */
    --bars-bottom: calc(var(--bar-top) + var(--bar-h) + 8px + 36px);
  }
  /* a preview badge hangs from the top edge (?demo, ?simu): the bar starts under it */
  body:has(#badges) { --bar-top: calc(var(--safe-t) + 15px); }

  /* the top bar */
  #top {
    display: flex;
    align-items: center;
    gap: 8px;
    top: var(--bar-top);
    left: max(8px, env(safe-area-inset-left, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    z-index: 22;
    height: var(--bar-h);
    padding: 0 6px 0 14px;
    background: linear-gradient(160deg, rgba(14, 11, 8, .88), rgba(14, 11, 8, .66));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 237, 0, .15);
    border-radius: 18px;
    pointer-events: auto;
  }
  /* the title block and the clock lose their own plates inside it */
  #top > #brand,
  #top > #clock {
    position: static;
    padding: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-radius: 0;
    max-width: none;
  }
  #brand { flex: none; gap: 0; }
  #brand h1 { font-size: 15.5px; line-height: .9; white-space: nowrap; }
  /* the line under the title and How it works: in the menu */
  #brand .sub { display: none; }
  #clock { flex: 0 1 auto; flex-direction: column; align-items: flex-end; justify-content: center; min-width: 0; margin-left: auto; gap: 3px; }
  /* the bar's clock is the page's only one here: while the race on screen
     sells it counts to the close of sales, and says so over the digits
     (ui/hud.js); the race day's own words take its place */
  #clock .clabel {
    display: block;
    font-family: var(--mono);
    font-size: 7.5px;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--hyrox);
  }
  #clock .clabel:empty,
  #clock[data-race="live"] .clabel,
  #clock[data-race="done"] .clabel { display: none; }
  #clock .units { gap: 6px; }
  #clock .unit { gap: 1px; }
  #clock .n { font-size: 15px; }
  #clock .u { font-size: 8px; }
  #clock .cstate { gap: 6px; }
  #clock .cslabel { font-size: 8.5px; letter-spacing: .1em; }
  /* the language: in the menu */
  #lang { display: none; }

  /* the calendar and the menu: two round buttons of one style, side by side
     at the bar's end */
  #diaryFab,
  #menuBtn {
    --fab: 36px;
    all: unset;
    box-sizing: border-box;
    position: relative;
    flex: none;
    width: var(--fab);
    height: var(--fab);
    display: grid;
    place-items: center;
    cursor: pointer;
    border-radius: 50%;
    color: var(--hyrox);
    background: rgba(255, 237, 0, .06);
    border: 1px solid rgba(255, 237, 0, .4);
    pointer-events: auto;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
  }
  #diaryFab svg, #menuBtn svg { display: block; width: 19px; height: 19px; }
  /* a finger's worth to hit (44 px), the look kept at 36 */
  #diaryFab::after, #menuBtn::after { content: ''; position: absolute; inset: -4px; }
  #diaryFab:active, #menuBtn:active { transform: scale(.94); }
  #diaryFab:focus-visible, #menuBtn:focus-visible { outline: 2px solid var(--hyrox); outline-offset: 2px; }
  #menuBtn[aria-expanded="true"] { background: var(--hyrox); color: #16150a; }
  /* the calendar's name, under it for the keyboard (a finger never hovers) */
  #diaryFab .fabtip { right: 0; left: auto; top: calc(100% + 10px); bottom: auto; transform: none; translate: 0 -4px; }

  /* the segmented control under the bar */
  #viewbar {
    display: flex;
    align-items: center;
    gap: 2px;
    top: calc(var(--bar-top) + var(--bar-h) + 8px);
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100vw - 16px);
    z-index: 21;
    padding: 3px;
    background: linear-gradient(200deg, rgba(14, 11, 8, .82), rgba(14, 11, 8, .58));
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(11px);
    border: 1px solid rgba(255, 237, 0, .13);
    border-radius: 999px;
    pointer-events: auto;
  }
  #viewbar > #views {
    position: static;
    top: auto;
    right: auto;
    transform: none;
    display: flex;
    gap: 2px;
    padding: 0;
  }
  #views .zoomrow { display: none; }
  #views button {
    position: relative;
    flex: none;
    padding: 8px 10px;
    border: 0;
    font-size: 9.5px;
    line-height: 12px;
    letter-spacing: .06em;
    text-align: center;
    white-space: nowrap;
  }
  #views button[aria-pressed="true"] { background: rgba(255, 237, 0, .15); color: var(--hyrox); }
  /* a finger's worth to hit, above and below the slim segments */
  #views button::after { content: ''; position: absolute; inset: -8px 0; }
  /* the way back from a zone is the Athlète segment itself: marked ↩ while
     the camera is on a detail, it flies home like the desktop's pill (both
     put the zone card away) — one segment, not a second one doing the same */
  #viewbar > #backHome,
  #viewbar > #backHome.on { display: none; }
  #viewbar:has(#backHome.on) #views button[data-view="wide"] { color: var(--hyrox); }
  #viewbar:has(#backHome.on) #views button[data-view="wide"]::before {
    content: '↩';
    content: '↩' / '';
    margin-right: 5px;
    font-weight: 700;
  }

  /* the bottom sheet (ui/phone.js sets --dock-shift: folded, the part under
     its line is below the screen's edge; --dock-room keeps it under the view
     bar when it is pulled all the way up) */
  #dock {
    display: flex;
    flex-direction: column;
    gap: 8px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 21;
    max-height: calc(100vh - var(--dock-room, 140px));
    max-height: calc(100dvh - var(--dock-room, 140px));
    padding: 0 max(12px, env(safe-area-inset-right, 0px)) calc(12px + var(--safe-b)) max(12px, env(safe-area-inset-left, 0px));
    background: linear-gradient(180deg, rgba(24, 18, 14, .9), rgba(12, 9, 8, .97) 120px);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 237, 0, .16);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -12px 34px rgba(0, 0, 0, .38);
    pointer-events: auto;
    touch-action: none;
    transform: translateY(var(--dock-shift, 0px));
    transition: transform .34s cubic-bezier(.2, .8, .3, 1);
  }
  #dock.dragging { transition: none; }

  #dockGrip {
    all: unset;
    position: relative;
    display: block;
    flex: none;
    height: 20px;
    margin-bottom: -6px;
    cursor: grab;
    touch-action: none;
  }
  /* its hit area reaches a little over the sheet's edge: 44 px in all */
  #dockGrip::after { content: ''; position: absolute; left: 0; right: 0; top: -24px; bottom: 0; }
  #dockGrip::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 8px;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 999px;
    background: rgba(242, 236, 230, .3);
  }
  #dockGrip:focus-visible::before { background: var(--hyrox); box-shadow: 0 0 0 3px rgba(255, 237, 0, .25); }

  #dock > #cta {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    translate: none;
    flex: none;
    width: auto;
    gap: 8px;
  }
  /* no hint on a phone (the race sign during the race excepted, above) */
  #cta .hintbox { display: none; }
  #cta .buy { padding: 13px 20px; font-size: 16px; }
  /* the outage sign under the big button, in the line's place */
  #cta #outage { order: 1; padding: 6px 5px 6px 11px; font-size: 12px; line-height: 1.35; }
  #outage button { position: relative; }
  #outage button::after { content: ''; position: absolute; inset: -11px; }

  /* the race picker, compact: each race one pill, its flag beside its name and date */
  #cities {
    align-self: center;
    gap: 3px;
    padding: 3px;
    background: rgba(255, 255, 255, .035);
    border-color: rgba(255, 237, 0, .16);
    backdrop-filter: none;
  }
  #cities button {
    position: relative;
    grid-template-columns: auto auto;
    column-gap: 6px;
    row-gap: 0;
    align-items: center;
    justify-items: start;
    padding: 5px 13px 5px 9px;
  }
  #cities button::after { content: ''; position: absolute; inset: -5px 0; }
  #cities .cflag { grid-row: span 2; margin: 0; font-size: 16px; }
  #cities .cname { font-size: 12.5px; line-height: 1.12; }
  #cities .cdate { font-size: 8.5px; line-height: 1.2; letter-spacing: .08em; }

  /* the line: what has been raised, who is here now, and the fold's chevron */
  #dockLine {
    all: unset;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 32px;
    margin-top: -4px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    touch-action: none;
    white-space: nowrap;
  }
  #dockLine b { color: var(--paper); font-weight: 700; }
  /* the sheet's main handle: 44 px to hit, into the gap under it */
  #dockLine::after { content: ''; position: absolute; left: 0; right: 0; top: -4px; bottom: -8px; }
  #dockLine:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; border-radius: 6px; }
  #dockLine .dlive { display: inline-flex; align-items: center; gap: 6px; }
  #dockLine .dlive[hidden] { display: none; }
  #dockLine .dlive::before {
    content: '·';
    margin-right: 1px;
    color: var(--muted-2);
  }
  #dockLine .dlive i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ok);
    animation: aulive 1.8s ease-out infinite;
  }
  #dockLine .dlchev {
    width: 6px;
    height: 6px;
    margin: 3px 0 0 2px;
    border-left: 1.6px solid var(--hyrox);
    border-top: 1.6px solid var(--hyrox);
    transform: rotate(45deg);
    transition: transform .25s ease, margin .25s ease;
  }
  #dock.open #dockLine .dlchev { transform: rotate(225deg); margin-top: -3px; }

  /* the part under the line: the season panel and the audience, full size */
  #dockMore {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    scrollbar-width: none;
    transition: visibility 0s;
  }
  /* folded, nothing of it peeks over the screen's edge (the home indicator's
     strip included); it goes once the sheet is down, and is there as soon
     as a finger pulls it */
  #dock:not(.open):not(.dragging) #dockMore { visibility: hidden; transition: visibility 0s .34s; }
  #dockMore::-webkit-scrollbar { display: none; }
  #dockMore > #goal,
  #dockMore > #audience {
    position: static;
    left: auto;
    bottom: auto;
    width: auto;
    translate: none;
    transition: none;
    background: rgba(255, 255, 255, .035);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: rgba(255, 237, 0, .11);
  }
  #goal .gsupport { padding: 8px 14px; font-size: 12.5px; }

  /* the rest a desktop shows round the edges is in the menu */
  #social, #athlete, #legal { display: none; }

  /* the menu, dropping from the bar */
  #menu {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 58;
    padding: calc(var(--bar-top) + var(--bar-h) + 8px) max(8px, env(safe-area-inset-right, 0px)) calc(8px + var(--safe-b)) max(8px, env(safe-area-inset-left, 0px));
    background: rgba(6, 3, 4, .62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .2s ease;
  }
  #menu[hidden] { display: none; }
  #menu.on { opacity: 1; }
  #menu .card {
    display: grid;
    gap: 14px;
    width: min(380px, 100%);
    max-height: 100%;
    margin-left: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 15px 15px 16px;
    background: #16120c;
    border: 1px solid var(--edge);
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
    transform: translateY(-8px);
    transition: transform .24s cubic-bezier(.2, .8, .3, 1);
  }
  #menu.on .card { transform: none; }
  #menu .mh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  #menu h2 {
    margin: 0;
    font-family: var(--display);
    font-weight: 700;
    font-size: 20px;
    line-height: .95;
    letter-spacing: -.005em;
    text-transform: uppercase;
  }
  #menu .mx {
    all: unset;
    position: relative;
    cursor: pointer;
    flex: none;
    width: 32px;
    height: 32px;
    display: grid;
    place-content: center;
    border-radius: 50%;
    color: var(--muted);
    font-size: 13px;
    background: rgba(255, 255, 255, .05);
  }
  #menu .mx:focus-visible { outline: 1px solid var(--hyrox); }
  #menu .mx::after { content: ''; position: absolute; inset: -6px; }
  /* the line under the title of a desktop: the sales countdown, or the state */
  #menu .mline {
    margin: -4px 0 0;
    font-family: var(--mono);
    font-size: 10.5px;
    line-height: 1.45;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
  }
  #menu .mline:empty { display: none; }
  #menu .mline .lstate { display: block; margin-bottom: 3px; color: #ff5a4f; font-weight: 700; }
  #menu .mline .lstate.live { color: var(--hyrox); }
  #menu .mline a { color: var(--hyrox); }
  #menu .mlang {
    display: flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--edge);
    border-radius: 999px;
  }
  #menu .mlang button {
    all: unset;
    box-sizing: border-box;
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 44px;
    cursor: pointer;
    border-radius: 999px;
    text-align: center;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--muted);
  }
  #menu .mlang button[aria-pressed="true"] { background: var(--hyrox); color: #16150a; font-weight: 700; }
  #menu .mlang button:focus-visible { outline: 1px solid var(--paper); outline-offset: 1px; }
  #menu .mlist { display: grid; gap: 2px; }
  #menu .mrow {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 7px 8px;
    border-radius: 14px;
    cursor: pointer;
    color: var(--paper);
    text-decoration: none;
  }
  #menu .mrow:active { background: rgba(255, 237, 0, .07); }
  #menu .mrow:focus-visible { outline: 1px solid var(--hyrox); outline-offset: -1px; }
  #menu .mic {
    flex: none;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 237, 0, .35);
    color: var(--hyrox);
    font-family: var(--display);
    font-weight: 700;
    font-size: 15px;
    background-size: cover;
    background-position: center;
  }
  #menu .mic svg { width: 18px; height: 18px; }
  #menu .mic.av { background-color: #2a1c1d; }
  #menu .mic.av.photo { color: transparent; }
  #menu .mtxt { flex: 1; min-width: 0; display: grid; gap: 1px; }
  #menu .mtxt b { font-family: var(--cond); font-weight: 700; font-size: 15px; }
  #menu .mtxt small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--muted-2); }
  #menu .mgo { font-style: normal; font-family: var(--mono); font-size: 13px; color: var(--muted-2); }
  #menu .mfoot {
    display: grid;
    gap: 4px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .07);
    text-align: center;
    font-family: var(--cond);
    font-weight: 600;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--muted-2);
  }
  #menu .mfoot p { margin: 0; color: var(--muted); }
  #menu .mlegal a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .25); text-underline-offset: 2px; }
  #menu .mlegal a:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }
  #menu .lfr { display: none; }

  /* the Instagram pop-over, opened from the menu: under the bar */
  #feedPanel { top: calc(var(--bar-top) + var(--bar-h) + 8px); }

  /* the zone card's sheet clears the home indicator */
  #slot { padding-bottom: calc(17px + var(--safe-b)); }

  /* the dialogs' small ✕ and the card's rules link: a finger's worth to hit
     (44 px), their look kept */
  #slot .sx, #feedPanel .x, #about .ax, #supportSheet .ax, #panel .x, #slot .srule button { position: relative; }
  #slot .sx::after, #feedPanel .x::after, #about .ax::after, #supportSheet .ax::after, #panel .x::after, #player .px::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
  }
  #slot .srule button::after { content: ''; position: absolute; inset: -12px -4px; }

  /* the finish card's line stands on the folded sheet, and opens no higher
     than the view bar (ui/finish.js measures the sheet) */
  #finish { max-height: max(96px, calc(100vh - var(--f-bottom, 240px) - var(--bars-bottom) - 10px)); }
  /* and steps aside while the sheet is pulled up over its place */
  body:has(#dock.open) #finish { visibility: hidden; }

  /* the page without the hall: no views, so no view bar */
  html.no3d #viewbar { display: none; }

  /* the frame-rate readout (?fps) under the view bar, in its left corner, on
     one line */
  #fps {
    top: calc(var(--bars-bottom) + 6px);
    left: max(8px, env(safe-area-inset-left, 0px));
    transform: none;
    max-width: calc(100vw - 16px);
    padding: 4px 9px;
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
@media (max-width: 720px) and (orientation: portrait) and (prefers-reduced-motion: reduce) {
  #dockLine .dlive i { animation: none; }
}
@media (max-width: 370px) and (orientation: portrait) {
  #top { gap: 6px; padding-left: 12px; }
  #brand h1 { font-size: 14.5px; }
  #clock .units { gap: 4px; }
  #clock .n { font-size: 14px; }
  #views button { padding: 8px 8px; letter-spacing: .04em; }
  #cities button { padding: 5px 10px 5px 8px; }
}

/* ---------- sharing a zone (index.html #slotShare, #shareSheet; ui/share.js) ----------
   The zone card's « Partager », a quiet pill under the brand (the yellow
   button stays the card's one call to buy), and the sheet it opens, in the
   About sheet's frame: the story image on the left, the buttons beside it;
   on a phone, a sheet from the bottom with the image on top. Hidden sheets
   are out of the tab order and the accessibility tree (visibility). */
#slot .sshare {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper);
  transition: border-color .15s ease, background .15s ease;
}
#slot .sshare svg { width: 14px; height: 14px; color: var(--hyrox); }
#slot .sshare:focus-visible { outline: 1px solid var(--hyrox); outline-offset: 2px; }
#slot .sshare:active { transform: scale(.97); }
@media (hover: hover) {
  #slot .sshare:hover { border-color: var(--hyrox); background: color-mix(in srgb, var(--hyrox) 12%, transparent); }
}

#shareSheet {
  position: fixed;
  /* over the zone card (50) and the other sheets (62), under the payment banner (93) */
  z-index: 64;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 3, 4, .76);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .24s ease, visibility 0s linear .24s;
}
#shareSheet.on { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .24s ease; }
#shareSheet .card {
  width: min(700px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #150c0e;
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: clamp(18px, 3vw, 26px);
  display: grid;
  gap: 16px;
  transform: translateY(10px);
  transition: transform .24s cubic-bezier(.2,.8,.3,1);
}
#shareSheet.on .card { transform: none; }
#shareSheet .ah { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#shareSheet h2 {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .01em;
}
#shareSheet .ax {
  all: unset;
  cursor: pointer;
  flex: none;
  width: 28px; height: 28px;
  display: grid; place-content: center;
  border-radius: 7px;
  color: var(--muted);
}
#shareSheet .ax:hover { color: var(--paper); background: rgba(255,255,255,.07); }
#shareSheet .ax:focus-visible { outline: 1px solid var(--hyrox); }

#shareSheet .shbody {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
/* the image at the proportions of a story, 9 by 16 */
#shareSheet .shstory {
  margin: 0;
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}
#shareSheet .shstory img { display: block; width: 100%; height: 100%; object-fit: cover; }
#shareSheet .shstory img[hidden], #shareSheet .shwait[hidden] { display: none; }
#shareSheet .shwait {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 18px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
/* a light that runs along a line while the image is drawn */
#shareSheet .shwait::before {
  content: '';
  width: 64%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0 30%, var(--hyrox) 50%, transparent 70% 100%) 0 0 / 250% 100%, rgba(255, 255, 255, .1);
  animation: shrun 1.3s linear infinite;
}
#shareSheet .shwait.idle::before { display: none; }
@keyframes shrun { from { background-position: 100% 0, 0 0; } to { background-position: 0 0, 0 0; } }

#shareSheet .shside { display: grid; gap: 10px; align-content: center; min-width: 0; }
#shareSheet .shintro { margin: 0 0 6px; font-size: 14px; line-height: 1.55; color: var(--muted); }
#shareSheet .shgo,
#shareSheet .shbtn {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
  width: 100%;
  text-align: center;
  border-radius: 999px;
  font-family: var(--cond);
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  transition: background .15s ease, border-color .15s ease, transform .15s ease, opacity .15s ease;
}
#shareSheet .shgo { padding: 14px 18px; background: var(--hyrox); color: #16150a; font-size: 17px; }
#shareSheet .shgo:hover { background: #fff88a; }
#shareSheet .shrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#shareSheet .shbtn {
  padding: 11px 12px;
  border: 1px solid var(--edge);
  color: var(--paper);
  font-size: 13.5px;
  line-height: 1.2;
}
@media (hover: hover) {
  #shareSheet .shbtn:not([aria-disabled="true"]):hover { border-color: var(--hyrox); background: color-mix(in srgb, var(--hyrox) 12%, transparent); }
}
#shareSheet .shgo:active, #shareSheet .shbtn:not([aria-disabled="true"]):active { transform: scale(.98); }
#shareSheet .shgo:focus-visible, #shareSheet .shbtn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
#shareSheet .shbtn[aria-disabled="true"] { opacity: .42; cursor: default; }
#shareSheet .shlink {
  box-sizing: border-box;
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11.5px;
  text-overflow: ellipsis;
}
#shareSheet .shlink:focus { outline: 1px solid var(--hyrox); border-color: transparent; color: var(--paper); }
#shareSheet .shdone { min-height: 1.45em; margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ok); }

@media (max-width: 720px) {
  #shareSheet { padding: 0; place-items: end stretch; }
  #shareSheet .card {
    width: 100%;
    max-height: 94vh;
    gap: 12px;
    border-radius: 18px 18px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateY(16px);
  }
  #shareSheet .shbody { grid-template-columns: 1fr; gap: 12px; }
  /* as tall as the screen allows with the buttons still in view under it */
  #shareSheet .shstory { justify-self: center; height: min(48vh, 440px); width: auto; }
  #shareSheet .shintro { margin: 0; font-size: 13px; text-align: center; }
  #shareSheet .shgo { padding: 13px 16px; }
}
@media (max-width: 720px) and (max-height: 700px) {
  #shareSheet .shstory { height: 38vh; }
}
@media (prefers-reduced-motion: reduce) {
  #shareSheet, #shareSheet .card { transition: none; }
  #shareSheet .shwait::before { animation: none; background: var(--hyrox); opacity: .5; }
}
/* back from paying for a zone: « Partager ma marque » under the message,
   the close button still beside it (ui/paymentReturn.js) */
#payReturn:has(.prshare) { flex-wrap: wrap; }
#payReturn:has(.prshare) p { flex: 1 1 calc(100% - 40px); margin: 0; }
#payReturn:has(.prshare) > button:not(.prshare) { order: 1; }
#payReturn .prshare {
  order: 2;
  width: auto;
  height: auto;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--hyrox);
  color: #16150a;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: .03em;
  text-transform: uppercase;
}
#payReturn .prshare:hover { background: #fff88a; }
#payReturn .prshare:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
