/* a speedrun replay made of its plays' replay files (run-reel.js, drawn by reel-view.js). Beside the picture, where the game has its leaderboard:
   the app's speedrun timer as the app draws it (ui/style.css .run-w: its state's dot and colours, the time, the bar, the pp live) over the
   run's maps as the game's leaderboard rows; above the playfield instead where the picture has no room beside it (reel-view.js fit). Over
   the picture: its title, a play's review, the next map coming in (its cover sliding in, then zooming away as it is played), its result.
   All moved by the replay's own clock (reel-view.js sets --a, --b, --zo, --d and --s2 to --s5), so a pause or a jump holds them where they are.
   The same file in the app (ui/) and on the website (public/) */
.th-board.reel { width: var(--bw, 260px); gap: 6px; opacity: var(--in, 1); transform: translate(calc((1 - var(--in, 1)) * -16px), -50%); }
.th-board.reel.top { left: 50%; top: auto; bottom: calc(100% - var(--pt, 160px)); transform: translate(-50%, calc((1 - var(--in, 1)) * -12px)); }
.rl-timer { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(21, 15, 19, .92); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.rl-th { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.rl-brand { min-width: 0; overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; } .rl-logo { color: var(--pink); font-weight: 800; }
.rl-state { flex: none; padding: 2px 8px; border-radius: 999px; color: var(--gold); font-size: 11px; font-weight: 700; transition: color .25s; }
.rl-tr { display: flex; align-items: center; justify-content: center; gap: 10px; }
.rl-dot { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-bottom: 6px; border-radius: 50%; background: #555; color: #111; font-size: 9px; font-weight: 900; transition: background-color .25s; }
.rl-clock { margin: 2px 0 8px; font-size: 38px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; transition: color .25s; }
.rl-tb { height: 6px; margin-bottom: 8px; border-radius: 99px; background: var(--surface); overflow: hidden; } .rl-tb i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--pink); }
.rl-tf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 15px; } .rl-tf small { color: var(--muted); font-size: 12.5px; }
.rl-pp { font-variant-numeric: tabular-nums; transition: color .25s; } .rl-pp.rl-live { color: #7dffa0; } .rl-pp.rl-live::after { content: " LIVE"; font-size: .55em; letter-spacing: .08em; opacity: .8; }
[data-rs="playing"] .rl-dot { background: #4be06b; animation: rsPulse 1.3s ease-in-out infinite; } [data-rs="verified"] .rl-dot { background: #9be89b; }
[data-rs="paused"] .rl-dot, [data-rs="armed"] .rl-dot, [data-rs="break"] .rl-dot { background: #ffd15c; }
[data-rs="playing"] .rl-clock { color: #fff; } [data-rs="paused"] .rl-clock, [data-rs="armed"] .rl-clock, [data-rs="break"] .rl-clock { color: #ffd15c; } [data-rs="verified"] .rl-clock { color: #9be89b; }
[data-rs="playing"] .rl-state, [data-rs="verified"] .rl-state { color: #9be89b; }
@keyframes rsPulse { 50% { box-shadow: 0 0 0 5px rgba(75, 224, 107, .25); } }
.rl-lb { display: flex; flex-direction: column; gap: 3px; }
.rl-m { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; column-gap: 8px; height: 30px; padding: 0 10px 0 6px; border-radius: 8px; background: rgba(0, 0, 0, .5); font-size: 12.5px;
  transition: background-color .3s, box-shadow .3s, opacity .3s, transform .3s var(--ease); }
.rl-m i { color: rgba(255, 255, 255, .45); font-size: 15px; font-style: normal; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.rl-m span { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rl-m b { color: var(--gold); font-variant-numeric: tabular-nums; }
.rl-m.past { opacity: .62; } .rl-m:not(.on):not(.past) { opacity: .4; }
.rl-m.on { background: rgba(255, 102, 170, .2); box-shadow: inset 0 0 0 1px rgba(255, 102, 170, .5); transform: translateX(8px); } .rl-m.on i { color: var(--pink); } .rl-m.on b { color: #7dffa0; }
.th-board.reel.slim .rl-timer { padding: 8px 10px; border-radius: 12px; } .th-board.reel.slim .rl-th { margin-bottom: 2px; } .th-board.reel.slim .rl-brand { font-size: 12px; }
.th-board.reel.slim .rl-state { padding: 1px 6px; font-size: 10px; } .th-board.reel.slim .rl-dot { width: 16px; height: 16px; margin-bottom: 4px; font-size: 7px; }
.th-board.reel.slim .rl-clock { margin: 0 0 5px; font-size: 26px; } .th-board.reel.slim .rl-tb { height: 4px; margin-bottom: 5px; }
.th-board.reel.slim .rl-tf { font-size: 13px; } .th-board.reel.slim .rl-tf small { font-size: 11px; }
.th-board.reel.slim .rl-m { height: 24px; font-size: 11.5px; } .th-board.reel.slim .rl-m i { font-size: 13px; }
.th-reel { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 90px 16px 150px; pointer-events: none; --a: 0; --b: 1; --zo: 0; --d: 0; }
.th-reel::before { content: ""; position: absolute; inset: 0; background: rgba(6, 4, 6, .5); opacity: var(--d); } /* (the picture dimmed behind a card) */
.th-reel > * { position: relative; grid-area: 1 / 1; }
.rl-title { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 92%; padding: 20px 28px; border: 1px solid var(--line); border-radius: 18px; background: rgba(21, 15, 19, .92); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); text-align: center;
  opacity: calc(var(--a) * var(--b)); transform: translateY(calc((1 - var(--a)) * 16px)) scale(calc(.96 + var(--a) * .04)); }
.th-reel small { color: rgba(255, 255, 255, .6); font-size: 12.5px; font-weight: 700; }
.rl-title b { font-family: var(--font-head); font-size: clamp(22px, 2.8vw, 34px); overflow-wrap: anywhere; text-wrap: balance; }
.rl-title span { color: var(--pink); font-weight: 700; }
.ph-intro .rl-title { opacity: calc(var(--a) * (1 - var(--b))); transform: translateY(calc((1 - var(--a)) * 16px - var(--b) * 24px)) scale(calc(.96 + var(--a) * .04)); } /* (the title goes as the first map comes in) */
.rl-next { width: min(520px, 92%); aspect-ratio: 16 / 7; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 18px 20px; border-radius: 18px; text-align: left;
  background: linear-gradient(transparent 30%, rgba(8, 6, 9, .9)), var(--cover, none) center / cover, #241b1f; box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  opacity: calc(var(--a) * (1 - var(--zo))); transform: translateX(calc((1 - var(--a)) * 38%)) rotate(calc((1 - var(--a)) * 2deg)) scale(calc(1 + var(--zo) * .12)); }
.ph-intro .rl-next { opacity: calc(var(--b) * (1 - var(--zo))); transform: translateX(calc((1 - var(--b)) * 38%)) rotate(calc((1 - var(--b)) * 2deg)) scale(calc(1 + var(--zo) * .12)); }
.rl-next b { font-family: var(--font-head); font-size: clamp(18px, 2.2vw, 26px); line-height: 1.2; overflow-wrap: anywhere; } .rl-next span { color: rgba(255, 255, 255, .8); font-size: 14px; }
.ph-play .rl-next.rl-still { opacity: 1; transform: none; } /* (a play with no replay: its map stays) */
.rl-none { align-self: end; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: rgba(255, 255, 255, .8); font-size: 13px; }
.rl-left { color: rgba(255, 255, 255, .85); font-size: 14px; font-variant-numeric: tabular-nums; opacity: var(--s5); transform: translateY(calc((1 - var(--s5)) * 6px)); } .rl-done { color: var(--gold); }
/* between two maps, and at its end: the run as a profile's top plays (the website's profile .tp-row), its runner and its pp against its goal over
   them; the play just played coming in at the foot (--s2), its pp and the run's counting (--s3), then rising to its place (--s4: each row's --y) */
.rl-prof { display: flex; flex-direction: column; gap: 10px; width: min(760px, 94%); padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(21, 15, 19, .94); box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  opacity: calc(var(--a) * var(--b)); transform: translateY(calc((1 - var(--a)) * 18px)) scale(calc(.97 + var(--a) * .03)); --rh: 54px; --gap: 7px; }
.rl-ph { display: flex; align-items: center; gap: 12px; }
.rl-av { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--surface-2); object-fit: cover; }
.rl-who { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.rl-who b { overflow: hidden; font-family: var(--font-head); font-size: 20px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; } .rl-who small { color: var(--muted); font-size: 13px; font-weight: 600; }
.rl-goal { display: flex; flex: none; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.rl-goal b { font-family: var(--font-head); font-size: 30px; line-height: 1; color: var(--gold); } .rl-goal small { color: var(--muted); font-size: 14px; font-weight: 700; }
.rl-plus { color: #7dffa0; font-size: 14px; font-weight: 800; opacity: var(--s3, 0); } .rl-plus:empty { display: none; }
.rl-gbar { height: 8px; border-radius: 99px; background: var(--surface); overflow: hidden; }
.rl-gbar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--pink); transition: background-color .3s, box-shadow .3s; } .rl-gbar.time i { background: #66ccff; }
.rl-prof.hit .rl-gbar i { background: var(--gold); box-shadow: 0 0 14px rgba(255, 209, 92, .7); } /* (the goal reached: the bar lights up) */
.rl-tops { position: relative; display: block; height: calc(var(--n) * (var(--rh) + var(--gap)) - var(--gap)); }
.rl-tops .rl-r { position: absolute; top: 0; left: 0; right: 0; height: var(--rh); min-height: 0; opacity: var(--e, 1); transform: translateY(calc(var(--y, 0) * (var(--rh) + var(--gap)))); }
.rl-r.new { z-index: 1; border-color: rgba(255, 102, 170, .7); background: var(--surface-2); box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 102, 170, .35); }
.rl-r .tp-n { text-align: center; }
.rl-prof .rl-left { text-align: center; opacity: var(--s5, 1); transform: translateY(calc((1 - var(--s5, 1)) * 6px)); }
.rl-res { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.rl-res b:first-child { font-family: var(--font-head); font-size: clamp(22px, 2.6vw, 30px); }
.rl-res .rl-final { font-family: var(--font-head); font-size: clamp(28px, 3.6vw, 44px); color: #9be89b; font-variant-numeric: tabular-nums; }
/* its place on the speedrun leaderboard now (it moves when someone gets past it): beside the timer's name, and under its result (counting up to it) */
.rl-place { color: var(--gold); font-variant-numeric: tabular-nums; }
.rl-at { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: rgba(255, 255, 255, .85); font-size: 15px; font-weight: 700; }
.rl-at b { font-family: var(--font-head); font-size: clamp(22px, 2.6vw, 30px); color: var(--gold); font-variant-numeric: tabular-nums; } .rl-at small { color: var(--muted); font-size: 13px; }
/* a replay's end (watch-next.js): its play among its player's top plays now, as a review shows a run's, rising to its place */
.th-nx-top { position: relative; margin: 0 auto 26px; } .th-nx-acts { margin-left: auto; } /* (nothing to watch next: Watch again and × stay at the right) */
.th-nx-top .rl-r { transition: transform var(--step, .9s) var(--ease), background-color .3s; } .th-nx-top .rl-plus { transition: opacity .4s; }
.th-nx-top .rl-r.new.landed { animation: nx-land 1.4s var(--ease) 1; } /* (at its place: it lights up) */
@keyframes nx-land { 0% { box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 102, 170, .35); } 30% { box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 3px rgba(255, 102, 170, .9), 0 0 34px rgba(255, 102, 170, .55); } 100% { box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 102, 170, .35); } }
/* its end as its player chose it, "The play": the play itself big, their osu! rank then and after it */
.th-nx-play { position: relative; margin: 0 auto 18px; }
.th-nx-play .wt-grade { flex: none; display: grid; place-items: center; min-width: 64px; height: 46px; padding: 0 10px; border-radius: 12px; font-size: 28px; }
.th-nx-line { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; color: rgba(255, 255, 255, .85); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.th-nx-play .rl-at .up { color: #7dffa0; } .th-nx-play .rl-at .down { color: #ff9aa8; }
.th-board.reel.slim { transition: opacity .3s var(--ease); } .th-board.reel.slim:not([data-ph="play"]) { opacity: 0; } /* (a small picture: the board steps aside for the panels) */
@media (max-width: 640px), (max-height: 500px) { .th-reel { padding: 56px 12px 96px; } .rl-title { padding: 12px 16px; border-radius: 14px; } .rl-next { aspect-ratio: 16 / 6; padding: 14px 16px; } }
@media (max-width: 640px) { .rl-ph { flex-wrap: wrap; row-gap: 4px; } .rl-goal { flex-basis: 100%; justify-content: flex-end; } .rl-goal b { font-size: 26px; } .rl-prof { padding: 14px; } } /* (narrow: its pp under the runner) */
@media (max-height: 500px) {
  .th-reel.ph-review, .th-reel.ph-end { padding: 8px 12px; }
  .rl-prof { gap: 6px; padding: 10px 12px 12px; border-radius: 14px; --rh: 38px; --gap: 5px; } .rl-av { width: 32px; height: 32px; border-radius: 9px; }
  .rl-who b { font-size: 16px; } .rl-who small { font-size: 12px; } .rl-goal b { font-size: 22px; } .rl-gbar { height: 6px; }
  .rl-tops .tp-map { padding: 0; } .rl-tops .tp-map b { font-size: 13px; } .rl-tops .tp-map small, .rl-tops .tp-acc small, .rl-tops .tp-pp small { font-size: 11px; }
  .rl-tops .tp-acc, .rl-tops .tp-w { font-size: 14px; } .rl-tops .tp-grade { height: 24px; font-size: 13px; } .rl-tops .mod-hex { height: 20px; min-width: 26px; font-size: 10px; }
  .rl-res b:first-child { font-size: 18px; } .rl-res .rl-final { font-size: 24px; } .rl-at b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { /* (crossfades only) */
  [data-rs="playing"] .rl-dot { animation: none; } .rl-m { transition: none; } .rl-m.on { transform: none; }
  .rl-title, .ph-intro .rl-title, .rl-next, .ph-intro .rl-next, .rl-left, .rl-prof, .rl-prof .rl-left { transform: none; }
  .rl-tops .rl-r { transform: translateY(calc(var(--y, 0) * (var(--rh) + var(--gap)))); } .rl-gbar i, .th-board.reel.slim, .th-nx-top .rl-r { transition: none; } /* (the end panel's climb: the same steps, each row at its place at once; its glow stays) */ /* (a row still goes to its place: its order is the point) */
  .th-board.reel { transform: translateY(-50%); } .th-board.reel.top { transform: translateX(-50%); }
}
