/* Third Half FC test site. Floodlight tokens and th- component classes come from
   design/thirdhalf-ds (tokens.json, components/bundle.css); only what these two pages use. */
:root {
  --bg-000: #0c0b11; --bg-100: #16141e; --bg-200: #24212d; --bg-300: #2e2a3a;
  --line: #2a2734; --line-strong: #6b6679;
  --ink: #ece9f3; --ink-2: #a7a2b5; --ink-3: #8c879a;
  --violet: #8b3dff; --violet-hover: #9b57ff; --violet-soft: #2a1d47; --on-violet: #ffffff; --violet-text: #b48cff;
  --amber: #ffb21e; --on-amber: #1f1500; --amber-text: #ffc24d;
  --scrim: rgba(12, 11, 17, 0.82); --on-video: #ffffff; --focus: #b48cff;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --radius-m: 10px; --radius-l: 14px; --radius-pill: 999px;
  --ring-live: 0 0 0 4px rgba(139, 61, 255, 0.28);
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "DM Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg-000); color: var(--ink); font: 400 15px/1.47 var(--font-sans); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--violet-text); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* App bar */
.th-appbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 14px var(--space-5); background: var(--bg-000); border-bottom: 1px solid var(--line); }
.th-appbar .brand { display: block; line-height: 0; }
.th-appbar .brand img { height: 17px; width: auto; display: block; }
.th-chip { display: inline-block; font: 600 11px/16px var(--font-sans); padding: 1px 8px; border-radius: var(--radius-pill); background: var(--bg-300); color: var(--ink-2); }

/* Page */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: var(--space-5); display: grid; gap: var(--space-5); flex: 1; align-content: start; }
.wrap.narrow { max-width: 620px; padding-top: var(--space-7); }
.eyebrow { font: 400 11px/16px var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
h1 { margin: var(--space-1) 0 0; font-stretch: 125%; font-weight: 800; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.matchname { margin: var(--space-2) 0 0; font-weight: 700; font-size: 17px; }
.partial { display: inline-block; margin: var(--space-2) 0 0; font: 600 12px/16px var(--font-sans); padding: 3px 10px; border-radius: var(--radius-pill); background: var(--amber-soft, #3a2a0c); color: var(--amber-text); }
.partial[hidden] { display: none; }
.lead { margin: var(--space-2) 0 0; color: var(--ink-2); max-width: 60ch; }
.note { margin: 0; color: var(--ink-3); font-size: 13px; }

/* Buttons */
.th-btn { font: 600 13px/16px var(--font-sans); border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-2); padding: 10px 16px; border-radius: var(--radius-pill); background: var(--bg-200); color: var(--ink); text-decoration: none; }
.th-btn:hover { background: var(--bg-300); }
.th-btn.primary { background: var(--violet); color: var(--on-violet); }
.th-btn.primary:hover { background: var(--violet-hover); }
.th-btn.ghost { background: transparent; color: var(--ink-2); }
.th-btn.ghost:hover { background: var(--bg-200); color: var(--ink); }
.th-btn.lg { padding: 14px 22px; font-size: 15px; }
.th-btn svg { width: 18px; height: 18px; }
.th-icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--bg-200); color: var(--ink); cursor: pointer; flex: none; }
.th-icon-btn:hover { background: var(--bg-300); }
.th-icon-btn.play { width: 46px; height: 46px; background: var(--ink); color: var(--bg-000); }
.th-icon-btn svg { width: 18px; height: 18px; }
.th-btn.speed { font-family: var(--font-mono); font-weight: 500; min-width: 58px; justify-content: center; font-variant-numeric: tabular-nums; }

/* Player */
.th-player { background: var(--bg-100); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; width: 100%; }
/* Keep the video and its controls on one screen: cap the width by the window height. */
.th-player:not(:fullscreen) { max-width: max(420px, calc((100vh - 430px) * 16 / 9)); margin: 0 auto; } /* room for the reaction row too */
.th-player .screen { position: relative; aspect-ratio: 16 / 9; background: #000; cursor: pointer; }
.th-player video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.th-player .msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--scrim); color: var(--on-video); border-radius: var(--radius-m); padding: var(--space-2) var(--space-3); font-size: 14px; text-align: center; max-width: 80%; }
.th-player .msg[hidden] { display: none; }
.th-player .tl { padding: var(--space-3) var(--space-4) 0; }
.th-player .controls { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; padding: var(--space-3) var(--space-4) var(--space-4); }
.th-player .controls .time { font: 500 13px/16px var(--font-mono); color: var(--ink-2); margin: 0 6px; font-variant-numeric: tabular-nums; }
.th-player .controls .grow { flex: 1; }
/* When the player is too narrow for one row of controls (phones, short laptop windows), use two
   planned rows instead of letting the last buttons spill over: play, time and full screen on top;
   moments, quality, speed and sound below. Decided by the player's own width. */
.th-player { container-type: inline-size; }
@container (max-width: 700px) {
  .th-player .controls { row-gap: var(--space-2); }
  .th-player .controls::after { content: ""; flex-basis: 100%; order: 7; }
  .th-player .controls #back { order: 1; } .th-player .controls #play { order: 2; } .th-player .controls #fwd { order: 3; }
  .th-player .controls .time { order: 4; } .th-player .controls .grow { order: 5; } .th-player .controls #full { order: 6; }
  .th-player .controls #prev { order: 8; } .th-player .controls #next { order: 9; }
  .th-player .controls #quality { order: 10; margin-left: auto; } .th-player .controls #speed { order: 11; } .th-player .controls #mute { order: 12; }
}
.th-player:fullscreen { display: flex; flex-direction: column; border: 0; border-radius: 0; background: #000; }
.th-player:fullscreen .screen { flex: 1; aspect-ratio: auto; min-height: 0; }
.th-player:fullscreen .tl, .th-player:fullscreen .controls { background: var(--bg-100); }
/* iPhone: Safari can't put the whole player full screen, so it fills the window itself (player.js). */
.th-player.pseudo-full { position: fixed; inset: 0; z-index: 50; width: 100vw; height: 100vh; height: 100dvh; max-width: none; margin: 0;
  display: flex; flex-direction: column; border: 0; border-radius: 0; background: #000; }
.th-player.pseudo-full .screen { flex: 1; aspect-ratio: auto; min-height: 0; }
.th-player.pseudo-full .tl, .th-player.pseudo-full .controls { background: var(--bg-100); }
.th-player.pseudo-full .controls { padding-bottom: max(var(--space-3), env(safe-area-inset-bottom)); }
html.th-noscroll, html.th-noscroll body { overflow: hidden; }
/* In full screen (the browser's own, or the site's own on an iPhone) the picture fills the screen and the
   timeline and controls lie over the bottom. They fade after a few seconds of playing and stay while
   paused; a tap on the picture shows or hides them (player.js). The score bug always stays. */
.th-player:fullscreen .screen, .th-player.pseudo-full .screen { position: absolute; inset: 0; }
.th-player:fullscreen .tl, .th-player.pseudo-full .tl { margin-top: auto; }
.th-player:fullscreen .tl, .th-player:fullscreen .controls, .th-player.pseudo-full .tl, .th-player.pseudo-full .controls {
  position: relative; z-index: 2; background: rgba(12, 11, 17, 0.72); transition: opacity 0.3s ease; }
.th-player.idle:fullscreen .tl, .th-player.idle:fullscreen .controls,
.th-player.pseudo-full.idle .tl, .th-player.pseudo-full.idle .controls { opacity: 0; pointer-events: none; }
.th-player.idle:fullscreen .screen { cursor: none; }
/* Phones: a play and pause button in the middle of the picture, shown with the controls. */
.th-center { position: absolute; left: 50%; top: 50%; z-index: 3; width: 68px; height: 68px; margin: -34px 0 0 -34px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(12, 11, 17, 0.6); color: var(--on-video); cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease; -webkit-tap-highlight-color: transparent; }
.th-center svg { width: 30px; height: 30px; }
.th-player.touch:not(.idle) .th-center { opacity: 1; pointer-events: auto; }

/* Timeline */
.th-timeline { position: relative; height: 34px; width: 100%; cursor: pointer; touch-action: none; }
.th-timeline .track, .th-timeline .played { position: absolute; left: 0; top: 14px; height: 6px; border-radius: var(--radius-pill); }
.th-timeline .track { right: 0; background: var(--bg-200); }
.th-timeline .played { background: var(--violet); width: 0; }
.th-timeline .head { position: absolute; top: 9px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transform: translateX(-50%); box-shadow: var(--ring-live); pointer-events: none; }
.th-ticks { position: relative; height: 14px; font: 400 11px/14px var(--font-mono); color: var(--ink-3); }
.th-ticks span { position: absolute; top: 0; transform: translateX(-50%); }
.th-ticks span:first-child { transform: none; }

/* Download page: two equal choices, side by side (stacked on a phone) */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.choice { background: var(--bg-100); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--space-5); display: grid; gap: var(--space-3); align-content: start; }
.choice .top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.choice .q { font-stretch: 125%; font-weight: 800; font-size: 28px; line-height: 1.05; letter-spacing: -0.02em; }
.choice .hint { color: var(--ink-2); font-size: 14px; }
.th-btn.solid { background: var(--ink); color: var(--bg-000); justify-content: center; white-space: nowrap; }
.wrap.narrow.dl { max-width: 780px; }
.th-btn.solid:hover { background: #ffffff; }
@media (max-width: 600px) { .choices { grid-template-columns: minmax(0, 1fr); } }
main p { margin: 0; }

/* Marks on the timeline: goals are amber and larger, chances are small and ink */
.th-dot { position: absolute; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--bg-100); border: 0; padding: 0; cursor: pointer; }
.th-dot.goal { width: 14px; height: 14px; background: var(--amber); }
.th-dot::before { content: ""; position: absolute; inset: -9px; } /* bigger target for fingers */
.th-dot:hover::after, .th-dot:focus-visible::after { content: attr(data-label); position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--bg-300); color: var(--ink); border-radius: var(--radius-s, 6px); padding: 4px 8px; font: 500 12px/16px var(--font-mono); z-index: 2; }
.th-timeline .half { position: absolute; top: 9px; width: 2px; height: 16px; background: var(--line-strong); transform: translateX(-50%); pointer-events: none; }
.th-ticks span.strong { color: var(--ink-2); }

/* Moments list under the player */
.moments { display: grid; gap: var(--space-3); }
.moments h2 { margin: 0; font-size: 18px; font-stretch: 112%; font-weight: 700; }
.moments .list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.moment { font: 600 13px/16px var(--font-sans); border: 0; cursor: pointer; padding: 9px 14px; border-radius: var(--radius-pill); background: var(--bg-200); color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.moment:hover { background: var(--bg-300); }
.moment .t { font: 500 12px/16px var(--font-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.moment.goal .t { color: var(--amber-text); }
.moment.goal::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }

/* Footer */
footer { border-top: 1px solid var(--line); padding: var(--space-4) var(--space-5); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); justify-content: space-between; color: var(--ink-3); font-size: 12px; }
footer a { color: var(--ink-3); }
footer a:hover { color: var(--ink); }

@media (max-width: 600px) {
  .wrap { padding: var(--space-4); gap: var(--space-4); }
  .th-appbar, footer { padding-left: var(--space-4); padding-right: var(--space-4); }
  .th-player { border-radius: var(--radius-m); }
  .th-player .tl { padding: var(--space-2) var(--space-3) 0; }
  .th-player .controls { padding: var(--space-2) var(--space-3) var(--space-3); gap: 6px; }
}

/* Score bug: the broadcast bar in the top-left of the video (design option 1).
   Drawn over the video by player.js, never into the file. Sizes follow the width of the picture
   (--vw), so it grows in full screen and shrinks on a phone. The tab under the bar is centred
   by player.js: under the score for a goal, under the clock for added time. */
.th-bug { --h: clamp(24px, calc(var(--vw, 960px) * 0.016 + 18px), 44px); --off: clamp(8px, calc(var(--vw, 960px) * 0.0125), 18px);
  position: absolute; left: calc(var(--vx, 0px) + var(--off)); top: calc(var(--vy, 0px) + var(--off)); z-index: 1;
  display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; color: var(--on-video); font-family: var(--font-sans);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4)); opacity: 0; transform: translateY(-6px); transition: opacity 0.4s ease, transform 0.4s ease; }
.th-bug.on { opacity: 1; transform: none; }
.th-bug .bar { position: relative; z-index: 1; display: flex; height: var(--h); border-radius: calc(var(--h) * 0.25); overflow: hidden; background: var(--scrim); }
.th-bug .bar.pop { animation: th-bug-pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1); }
.th-bug .team { display: flex; align-items: center; justify-content: center; width: calc(var(--h) * 1.8); background: var(--kit); color: var(--kit-ink);
  font-weight: 800; font-stretch: 125%; letter-spacing: 0.03em; font-size: calc(var(--h) * 0.41); }
.th-bug .team.dark { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.th-bug .score { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: calc(var(--h) * 0.22);
  min-width: calc(var(--h) * 2); padding: 0 calc(var(--h) * 0.31); background: var(--violet); color: var(--on-video);
  font-weight: 800; font-size: calc(var(--h) * 0.56); font-variant-numeric: tabular-nums; transition: background-color 0.6s ease, color 0.6s ease; }
.th-bug .score i { width: calc(var(--h) * 0.19); height: max(2px, calc(var(--h) * 0.06)); background: currentColor; opacity: 0.7; }
.th-bug .score .n { display: inline-block; }
.th-bug .score .n.roll { animation: th-bug-roll 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.th-bug .score.goal { background: var(--amber); color: var(--on-amber); transition-duration: 0.15s; }
.th-bug .score.goal::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.75) 50%, transparent 70%);
  transform: translateX(-120%); animation: th-bug-shine 0.9s 0.15s ease-out; }
.th-bug .clk { display: flex; align-items: center; justify-content: center; min-width: calc(var(--h) * 2); padding: 0 calc(var(--h) * 0.31);
  color: var(--amber-text); font: 500 calc(var(--h) * 0.44)/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.th-bug .clk[hidden] { display: none; }
.th-bug .clk.word { font: 800 calc(var(--h) * 0.375)/1 var(--font-sans); font-stretch: 112%; letter-spacing: 0.04em; text-transform: uppercase; animation: th-bug-fade 0.5s ease; }
.th-bug .tab { position: absolute; top: var(--h); left: 0; display: inline-flex; align-items: center; gap: calc(var(--h) * 0.19);
  padding: calc(var(--h) * 0.1) calc(var(--h) * 0.31) calc(var(--h) * 0.13); border-radius: 0 0 calc(var(--h) * 0.19) calc(var(--h) * 0.19);
  background: var(--scrim); font: 700 calc(var(--h) * 0.34)/1.25 var(--font-sans); white-space: nowrap;
  opacity: 0; transform: translateY(-110%); transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.1), opacity 0.3s ease; }
.th-bug .tab.show { opacity: 1; transform: none; }
.th-bug .tab.goal { background: var(--amber); color: var(--on-amber); }
.th-bug .tab .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.th-bug .tab b { flex: none; font-weight: 800; font-stretch: 125%; letter-spacing: 0.04em; }
.th-bug .tab .lbl { color: rgba(255, 255, 255, 0.7); font-weight: 600; }
.th-bug .tab .plus { color: var(--amber-text); font: 500 calc(var(--h) * 0.375)/1.25 var(--font-mono); font-variant-numeric: tabular-nums; }
.th-bug.compact .who, .th-bug.compact .long, .th-bug:not(.compact) .short { display: none; }
@keyframes th-bug-pop { 0% { transform: scale(1); } 35% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes th-bug-roll { from { transform: translateY(90%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes th-bug-shine { to { transform: translateX(120%); } }
@keyframes th-bug-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .th-bug, .th-bug * { animation: none !important; transition: none !important; } }

/* Reactions (design system: components/Reaction). The row sits inside the player under the
   controls, so it is there in full screen too. Built by reactions.js. */
.th-react { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 5px 12px 5px 9px; border-radius: var(--radius-pill);
  background: var(--bg-200); border: 0; cursor: pointer; font-size: 19px; line-height: 1; color: var(--ink); -webkit-tap-highlight-color: transparent; transition: transform 0.12s ease; }
.th-react:hover { background: var(--bg-300); }
.th-react:active { transform: scale(0.92); }
.th-react .n { font: 500 12px/16px var(--font-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.th-react .n:empty { display: none; }
.th-react.mine { background: var(--violet-soft); box-shadow: inset 0 0 0 1px var(--violet); }
.th-react.mine .n { color: var(--violet-text); }
.th-react img { width: 20px; height: 20px; border-radius: 50%; display: block; }
.th-react:disabled { opacity: 0.4; cursor: default; transform: none; }
.th-reacts { padding: 0 var(--space-4) var(--space-3); }
.th-reacts .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2) var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.th-reacts .at { font: 600 13px/16px var(--font-sans); color: var(--ink-2); white-space: nowrap; }
.th-reacts .at b { font: 500 13px/16px var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; display: inline-block; min-width: 5ch; }
.th-reacts .row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.th-reacts .bar[hidden], .th-reacts .row[hidden], .th-reacts .who[hidden] { display: none; }
.th-reacts .status { text-align: center; margin: var(--space-2) 0 0; min-height: 16px; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.th-reacts .link { border: 0; background: none; padding: 0; font: inherit; color: var(--violet-text); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.th-reacts .who label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: var(--space-2); }
.th-reacts .field { display: flex; gap: var(--space-2); }
.th-reacts input { flex: 1; min-width: 0; font: 400 16px/20px var(--font-sans); color: var(--ink); background: var(--bg-200); border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 9px 14px; }
.th-reacts input:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
/* In full screen the reaction row lies over the picture with the controls and shows and hides with them. */
.th-player:fullscreen .th-reacts, .th-player.pseudo-full .th-reacts { position: relative; z-index: 2; background: rgba(12, 11, 17, 0.72); transition: opacity 0.3s ease; }
.th-player:fullscreen .controls, .th-player.pseudo-full .controls { padding-bottom: var(--space-2); }
.th-player:fullscreen .th-reacts, .th-player.pseudo-full .th-reacts { padding-bottom: max(var(--space-3), env(safe-area-inset-bottom)); }
.th-player:fullscreen .th-reacts .status, .th-player.pseudo-full .th-reacts .status { display: none; }
.th-player:fullscreen .th-reacts .bar, .th-player.pseudo-full .th-reacts .bar { padding-top: var(--space-2); }
.th-player.idle:fullscreen .th-reacts, .th-player.pseudo-full.idle .th-reacts { opacity: 0; pointer-events: none; }
.th-player.idle:fullscreen .th-reacts:focus-within, .th-player.pseudo-full.idle .th-reacts:focus-within { opacity: 1; pointer-events: auto; }
@media (max-width: 600px) {
  .th-reacts { padding: 0 var(--space-3) var(--space-3); }
  .th-reacts .bar { gap: var(--space-2); padding-top: var(--space-2); }
  .th-reacts .at { flex-basis: 100%; text-align: center; }
  .th-reacts .row { flex-basis: 100%; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .th-react { padding: 5px 4px; gap: 4px; font-size: 18px; }
}

/* Reactions floating over the picture: two lanes on the right, rising from low down, so they
   stay clear of the score bug in the top-left. */
.th-floats { position: absolute; pointer-events: none; z-index: 1; overflow: hidden; --lane: 150px; }
.th-floats.small { --lane: 104px; }
.th-float { position: absolute; bottom: 14%; right: 3%; display: inline-flex; align-items: center; gap: 6px; max-width: calc(var(--lane) - 8px);
  padding: 5px 10px 5px 7px; border-radius: var(--radius-pill); background: var(--scrim); color: var(--on-video); font: 600 13px/16px var(--font-sans);
  white-space: nowrap; opacity: 0; animation: th-float 2.2s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.th-float.lane1 { right: calc(3% + var(--lane)); }
.th-float.mine { box-shadow: inset 0 0 0 1.5px var(--violet); }
.th-float .em { font-size: 22px; line-height: 1; }
.th-float img { width: 22px; height: 22px; border-radius: 50%; display: block; flex: none; }
.th-float .x { font: 500 12px/16px var(--font-mono); color: var(--amber-text); font-variant-numeric: tabular-nums; }
.th-float .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.th-floats.small .th-float { font-size: 11px; padding: 3px 8px 3px 5px; gap: 4px; }
.th-floats.small .th-float .em { font-size: 17px; }
.th-floats.small .th-float img { width: 17px; height: 17px; }
@keyframes th-float {
  0% { opacity: 0; transform: translateY(0) scale(0.6); }
  12% { opacity: 1; transform: translateY(calc(var(--rise, 80px) * -0.12)) scale(1.05); }
  20% { transform: translateY(calc(var(--rise, 80px) * -0.2)) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translateY(calc(var(--rise, 80px) * -1)); }
}
@media (prefers-reduced-motion: reduce) { .th-float { animation: th-fade 2.2s ease forwards; } }
@keyframes th-fade { 0%, 100% { opacity: 0; } 10%, 80% { opacity: 1; } }

/* Reactions on the timeline: emoji standing just above the track, at their moment */
.th-rxlane { position: relative; height: 24px; margin-bottom: -6px; }
.th-rxlane.empty { height: 0; margin: 0; }
.th-rxspot { position: absolute; bottom: 0; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 1px; border: 0; padding: 0; background: none;
  cursor: pointer; font-size: 15px; line-height: 20px; color: var(--ink); -webkit-tap-highlight-color: transparent; transition: transform 0.12s ease; }
.th-rxspot.big { font-size: 17px; }
.th-rxspot img { width: 15px; height: 15px; border-radius: 50%; display: block; }
.th-rxspot.big img { width: 17px; height: 17px; }
.th-rxspot .stack { display: inline-flex; align-items: center; }
.th-rxspot .g { position: relative; display: block; }
.th-rxspot .g + .g { margin-left: -8px; }
.th-rxspot.big .g + .g { margin-left: -9px; }
.th-rxspot .g:not(:last-child) { filter: drop-shadow(1.5px 0 0 rgba(12, 11, 17, 0.9)); }
.th-rxspot .n { position: absolute; left: 100%; top: -3px; margin-left: 1px; }
.th-rxspot .n { font: 500 10px/12px var(--font-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; align-self: flex-start; }
.th-rxspot.mine .n { color: var(--violet-text); }
.th-rxspot::before { content: ""; position: absolute; inset: -6px -3px; }
.th-rxspot:hover { transform: translateX(-50%) scale(1.25); }
.th-player.pseudo-full .th-rxlane { background: transparent; }

/* Goals and "Most reacted", side by side when there is room */
.th-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-5); align-items: start; }
.th-lists > [hidden] { display: none; }
.moment.rx { gap: 10px; }
.moment.rx .e { display: inline-flex; align-items: center; gap: 3px; font-size: 16px; line-height: 1; }
.moment.rx .e img { width: 16px; height: 16px; border-radius: 50%; }
.moment.rx .e .n { font: 500 12px/16px var(--font-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Desktop: laid out like a video site. The title on top, under it the player as big as the window
   allows, and the goals and "Most reacted" in a column on the right. */
@media (min-width: 1100px) {
  .wrap { max-width: none; grid-template-columns: minmax(0, max(640px, calc((100vh - var(--below)) * 16 / 9))) minmax(300px, 380px);
    grid-template-areas: "head side" "player side" "foot side"; justify-content: center; align-items: start; column-gap: var(--space-5); row-gap: var(--space-4); }
  .wrap > .th-player { grid-area: player; }
  .th-player:not(:fullscreen) { max-width: none; margin: 0; }
  .wrap > .head { grid-area: head; }
  .wrap { --below: 420px; } /* room on screen for the title above and the controls and reactions below */
  .wrap > .head h1 { font-size: 32px; }
  .wrap > .head .lead { max-width: none; }
  .wrap > .th-lists, .wrap > #momentsWrap { grid-area: side; }
  .wrap > .note { grid-area: foot; }
  .th-lists { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .th-lists .moments .list { flex-direction: column; align-items: stretch; }
  .th-lists .moment { border-radius: var(--radius-m); padding: 11px 14px; text-align: left; }
}
