/* 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: color-mix(in srgb, var(--pink) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pink) 50%, transparent); 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: color-mix(in srgb, var(--pink) 70%, transparent); background: var(--surface-2); box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 1px color-mix(in srgb, var(--pink) 35%, transparent); }
.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 */
/* the end panel as big as the player (watch-next.js scales .th-nx-in with it), in its middle when it is short; one to three picks: big cards in a row */
.th-nx { display: flex; flex-direction: column; } .th-nx-in { width: 100%; margin: auto 0; }
.th-nx-in[data-n="1"] { --nx-w: 520px; } .th-nx-in[data-n="2"] { --nx-w: 940px; } .th-nx-in[data-n="3"] { --nx-w: 1300px; }
.th-nx-in .rpl-grid { max-width: var(--nx-w, 1400px); } .th-nx-in .th-nx-head { max-width: max(var(--nx-w, 1400px), 560px); } .th-nx-in .th-nx-head :is(h3, .btn, .th-nx-auto) { white-space: nowrap; } /* (its words in one line over a small card) */
.th-nx-in[data-n="1"] .rpl-grid { grid-template-columns: minmax(0, 1fr); } .th-nx-in[data-n="2"] .rpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .th-nx-in[data-n="3"] .rpl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.th-nx-in:is([data-n="1"], [data-n="2"], [data-n="3"]) .rpl-title { font-size: 17px; }
@media (max-width: 640px) { .th-nx-in:is([data-n="2"], [data-n="3"]) .rpl-grid { grid-template-columns: minmax(0, 1fr); } }
.th-nx-in.climbing :is(.th-nx-grid, .th-nx-head h3) { display: none; } .th-nx-in.picks .th-nx-top { display: none; } /* (the play's climb on its own, then the picks) */
.th-nx-in.picks :is(.th-nx-grid, .th-nx-head h3) { animation: nx-in .5s var(--ease) both; } @keyframes nx-in { from { opacity: 0; transform: translateY(14px); } } @keyframes nx-fade { from { opacity: 0; } }
.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: background-color .3s; } .th-nx-top .rl-plus { transition: opacity .4s; } /* (watch-next.js's rise moves the rows itself, a frame at a time) */
.th-nx-top.rising .rl-r.new { will-change: transform, filter; box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 1px color-mix(in srgb, var(--pink) 35%, transparent), 0 calc(var(--smear, 0) * 30px) calc(var(--smear, 0) * 44px) rgba(255, 102, 170, calc(var(--smear, 0) * .5)); } /* (climbing: a pink trail as long as it is quick) */
.nx-smear { position: absolute; width: 0; height: 0; overflow: hidden; }
/* a small player (a phone's): the end in its space, under the top bar and over the controls; the climb's rows smaller (four around the
   play), what to watch next as the Up next list's rows (the first one's countdown along its picture), Watch again an icon */
.th-next.small .th-nx { padding: 52px 12px 96px; }
.th-next.small .th-nx-in .th-nx-head { max-width: none; flex-wrap: wrap; row-gap: 8px; margin-bottom: 12px; } .th-next.small .th-nx-head h3 { font-size: 20px; }
.th-next.small .th-nx-acts { gap: 6px; } .th-next.small .th-nx-acts [data-nx="again"] span { display: none; }
.th-next.small .rl-prof { width: 100%; gap: 8px; padding: 10px 12px 12px; border-radius: 14px; --rh: 42px; --gap: 5px; }
.th-next.small .rl-av { width: 34px; height: 34px; border-radius: 10px; } .th-next.small .rl-who b { font-size: 16px; } .th-next.small .rl-who small { font-size: 12px; } .th-next.small .rl-goal b { font-size: 22px; }
.th-next.small .rl-tops .tp-map b { font-size: 13px; } .th-next.small .rl-tops .tp-map small { font-size: 11px; } .th-next.small .rl-tops .tp-w { font-size: 15px; } .th-next.small .rl-tops .tp-grade { height: 26px; font-size: 13px; }
.th-next.small .th-nx-grid.rpl-list { display: flex; flex-direction: column; gap: 8px; }
.th-next .nx-up .rp-thumb { position: relative; overflow: hidden; box-shadow: 0 0 0 2px var(--pink); }
.th-next .nx-up .rp-thumb::before { content: ""; position: absolute; left: 0; bottom: 0; z-index: 3; width: 100%; height: 3px; background: var(--pink); transform-origin: left; animation: nxUp var(--nx-s, 8s) linear both; }
.th-nx-top .rl-r.new.landed { animation: nx-land 1.4s var(--ease) 1 !important; } /* (at its place: it lights up; a glow, not a motion: it stays with Windows' animations off) */
@keyframes nx-land { 0% { box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 1px color-mix(in srgb, var(--pink) 35%, transparent); } 30% { box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 3px color-mix(in srgb, var(--pink) 90%, transparent), 0 0 34px color-mix(in srgb, var(--pink) 55%, transparent); } 100% { box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 1px color-mix(in srgb, var(--pink) 35%, transparent); } }
/* 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; }
/* a speedrun replay's end: the run on its leaderboard now (watch-next.js runHtml), as the website's Speedrun rows (style.css .lb > .lb-row):
   its place in a circle (gold, silver, bronze at the top), the runner, how far behind the record, its time or pp; sized by the rows' height */
.rl-run { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 0 16px 0 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); --sz: min(40px, calc(var(--rh) - 12px)); }
.rr-n { display: grid; place-items: center; width: calc(var(--sz) - 6px); height: calc(var(--sz) - 6px); border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rl-run.rk1 .rr-n { background: #ffd15c; color: #3a2a00; box-shadow: 0 0 14px rgba(255, 209, 92, .55); } .rl-run.rk2 .rr-n { background: #cfd6e4; color: #1d2430; } .rl-run.rk3 .rr-n { background: #e0955b; color: #2e1708; }
.rl-run.new:not(.rk1):not(.rk2):not(.rk3) .rr-n { background: color-mix(in srgb, var(--pink) 32%, transparent); color: #fff; } /* (it: its place lit as it is) */
.rr-av { width: var(--sz); height: var(--sz); border-radius: 12px; background: var(--surface-2); object-fit: cover; }
.rr-who { display: flex; flex-direction: column; min-width: 0; } .rr-who b { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; } .rr-who small { color: var(--muted); font-size: 13px; }
.rr-who .flag { height: .8em; margin-right: .45em; border-radius: 3px; vertical-align: -.06em; }
.rr-gap { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.rr-val { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; } .rr-val i { margin-left: 1px; font-size: .62em; font-style: normal; opacity: .65; } .rl-run.rk1 .rr-val { color: #ffd15c; }
.th-next.small .rl-run { gap: 8px; padding: 0 12px 0 8px; } .th-next.small .rr-n { font-size: 13px; } .th-next.small .rr-av { border-radius: 9px; } .th-next.small .rr-who b { font-size: 14px; } .th-next.small .rr-who small { font-size: 11.5px; }
.th-next.small .rr-gap { display: none; } .th-next.small .rr-val { font-size: 16px; } /* (a phone's: the gap left out) */
.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; }
  .rr-n { font-size: 12px; } .rr-who b { font-size: 13px; } .rr-who small, .rr-gap { font-size: 11px; } .rr-val { font-size: 15px; }
}
@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; } .th-nx-in.picks :is(.th-nx-grid, .th-nx-head h3) { animation-name: nx-fade; } /* (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%); }
}
