/* Rally Riot's in-game UI in Home's look (site/next/hub.css is the source of truth): what is 3D stays 3D (the court, the
   players); everything pressed or read is flat and drawn: two flat tones, an ink outline, a hard drop, slanted boxes
   with small corners. No glass, no pills, no blur. Each button has its own bright colour with white type on it.
   Fixed wording is drawn lettering (words/word-*.webp: -w white, -g gold); text that changes is Bungee set tight and
   slanted (.rr-type); sentences are Kanit. Everything is sized in em from --rr-em, which follows the screen as Home's does.
   Markup: ../index.html, ../lab/scoreboard.mjs and ./rally-ui.mjs (which also loads this file and the two fonts). */
.rr-ui { --rr-ink: #191243; --rr-gold: #ffd23f; --rr-gold-lo: #f7a81d; --rr-red: #ff4d6d; --rr-red-lo: #e02650; --rr-sheet: #2b1f85;
  --rr-slant: -8deg; --rr-line: 0.2em; --rr-drop: 0.42em;
  --rr-display: Bungee, "Titan One", Inter, system-ui, sans-serif; --rr-track: -0.035em; --rr-text: Kanit, Inter, system-ui, sans-serif;
  --rr-em: clamp(8.5px, min(2.1vh, 1.06vw), 17px);
  --rr-top: max(1.5em, env(safe-area-inset-top)); }
@media (max-aspect-ratio: 1/1) { .rr-ui { --rr-em: clamp(8.5px, 2.35vw, 17px); } }
.rr-ui #hud, .rr-ui .rr-side, .rr-ui .rr-scrim, .rr-ui #campanel, .rr-ui #start, .rr-ui dialog.weekly-board.rally-board { font-size: var(--rr-em); font-family: var(--rr-text); letter-spacing: -0.022em; -webkit-tap-highlight-color: transparent; }
.rr-ui #hud *, .rr-ui .rr-side *, .rr-ui #campanel *, .rr-ui #start * { box-sizing: border-box; }
.rr-ui #hud img, .rr-ui .rr-side img { display: block; }
.rr-ui [hidden] { display: none !important; }
.rr-ui .badge.brand { display: none; }   /* the way back is Home, in the menu; no stray logo over the court */
.rr-ui :is(#hud, .rr-side, #campanel, #start) :focus-visible { outline: 0.22em solid var(--rr-gold); outline-offset: 0.3em; }

/* ---- the drawn box, the changing text, a drawn word, a character's icon ---- */
.rr-box { position: relative; isolation: isolate; --top: #fff; --bot: #d3d9ee; border: 0; background: none; color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
.rr-box::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 0.5em; border: var(--rr-line) solid var(--rr-ink); transform: skewX(var(--rr-slant));
  background: linear-gradient(180deg, var(--top) 0 54%, var(--bot) 54% 100%); box-shadow: 0 var(--rr-drop) 0 var(--rr-ink); transition: box-shadow 110ms, filter 110ms; }
.rr-box[data-c="violet"] { --top: #8a5cff; --bot: #6535e6; } .rr-box[data-c="blue"] { --top: #3fb0ff; --bot: #1f84ea; } .rr-box[data-c="orange"] { --top: #ffa63d; --bot: #f47a16; }
.rr-box[data-c="green"] { --top: #4fd870; --bot: #27ab4c; } .rr-box[data-c="pink"] { --top: #ff6f9c; --bot: #ea3a72; } .rr-box[data-c="gold"] { --top: var(--rr-gold); --bot: var(--rr-gold-lo); } .rr-box[data-c="ink"] { --top: #3a2a9c; --bot: #2f2187; }
button.rr-box, a.rr-box { transition: transform 110ms ease-out; }
:is(button, a).rr-box:hover { transform: translateY(-0.14em); } :is(button, a).rr-box:hover::before { filter: brightness(1.1); }
:is(button, a).rr-box:active { transform: translateY(0.26em); } :is(button, a).rr-box:active::before { box-shadow: 0 0.1em 0 var(--rr-ink); }
.rr-type { display: inline-block; font-family: var(--rr-display); font-weight: 400; font-style: normal; text-transform: uppercase; letter-spacing: var(--rr-track); line-height: 1; color: #fff; transform: skewX(var(--rr-slant));
  -webkit-text-stroke: 0.2em var(--rr-ink); paint-order: stroke fill; text-shadow: 0 0.1em 0 var(--rr-ink); white-space: nowrap; }
.rr-box[data-c="gold"] .rr-type, .rr-box:not([data-c]) .rr-type { color: var(--rr-ink); -webkit-text-stroke: 0; text-shadow: none; }
.rr-word { height: 1.9em; width: auto; max-width: 100%; object-fit: contain; user-select: none; }
.rr-ava { flex: none; width: 4.4em; height: 4.4em; display: grid; place-items: center; overflow: hidden; border-radius: 0.45em; border: var(--rr-line) solid var(--rr-ink); transform: skewX(var(--rr-slant)); background: linear-gradient(180deg, #7a52ff 0 54%, #5a33e6 54% 100%); }
.rr-ava img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: skewX(8deg) scale(1.24); }
.rr-ava b { font-family: var(--rr-display); font-weight: 400; font-size: 2.2em; line-height: 1; color: #fff; transform: skewX(8deg); -webkit-text-stroke: 0.14em var(--rr-ink); paint-order: stroke fill; }
.rr-ava[data-who="rio"] { background: linear-gradient(180deg, #4d74ff 0 54%, #2f49d6 54% 100%); } .rr-ava[data-who="ria"] { background: linear-gradient(180deg, #b46bff 0 54%, #8a3fe0 54% 100%); } .rr-ava[data-who="court"] { background: linear-gradient(180deg, #55cc82 0 54%, #2f9e5a 54% 100%); }
.rr-ava[data-who="zen"] { background: linear-gradient(180deg, #55d6c6 0 54%, #2a9d90 54% 100%); } .rr-ava[data-who="luna"] { background: linear-gradient(180deg, #d999f5 0 54%, #a55fd0 54% 100%); } .rr-ava[data-who="rex"] { background: linear-gradient(180deg, #f2d9a6 0 54%, #cfa468 54% 100%); } .rr-ava[data-who="stream"] { background: linear-gradient(180deg, #6fe0d6 0 54%, #2fb3a3 54% 100%); }
/* the Locker's nine and the five older characters, each on its own accent (catalog `accent`) */
.rr-ava[data-who="ace"] { background: linear-gradient(180deg, #7776dd 0 54%, #4a48d2 54% 100%); } .rr-ava[data-who="blitz"] { background: linear-gradient(180deg, #5a8be8 0 54%, #2364e0 54% 100%); } .rr-ava[data-who="brick"] { background: linear-gradient(180deg, #9d6be8 0 54%, #7c3ae0 54% 100%); } .rr-ava[data-who="flip"] { background: linear-gradient(180deg, #f4c855 0 54%, #f0b61c 54% 100%); }
.rr-ava[data-who="rebel"] { background: linear-gradient(180deg, #56bcd6 0 54%, #1da6c8 54% 100%); } .rr-ava[data-who="juno"] { background: linear-gradient(180deg, #ee7baa 0 54%, #e84f8e 54% 100%); } .rr-ava[data-who="mika"] { background: linear-gradient(180deg, #e26565 0 54%, #d93232 54% 100%); } .rr-ava[data-who="pixel"] { background: linear-gradient(180deg, #d2d6ec 0 54%, #c3c8e6 54% 100%); }
.rr-ava[data-who="sol"] { background: linear-gradient(180deg, #e2ca9d 0 54%, #d9b97c 54% 100%); } .rr-ava[data-who="ninja"] { background: linear-gradient(180deg, #e9676c 0 54%, #e2343b 54% 100%); } .rr-ava[data-who="frog"] { background: linear-gradient(180deg, #7bd16b 0 54%, #4fc23a 54% 100%); } .rr-ava[data-who="cyber"] { background: linear-gradient(180deg, #a885f8 0 54%, #8b5cf6 54% 100%); }
.rr-ava[data-who="pinkpop"] { background: linear-gradient(180deg, #f476b7 0 54%, #f0499f 54% 100%); } .rr-ava[data-who="captain"] { background: linear-gradient(180deg, #606fb6 0 54%, #2b3f9e 54% 100%); }
.rr-sub { position: relative; isolation: isolate; display: inline-block; padding: 0.42em 1.1em 0.46em; font-family: var(--rr-display); font-weight: 400; font-size: 1.5em; letter-spacing: var(--rr-track); line-height: 1; text-transform: uppercase; color: #fff; white-space: nowrap; }
.rr-sub::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--rr-ink); border: 0.14em solid var(--rr-ink); border-radius: 0.34em; transform: skewX(var(--rr-slant)); box-shadow: 0 0.2em 0 var(--rr-ink); }

/* ---- the match bar: who is playing, the score in drawn digits, each player's power charge, who serves ---- */
.rr-ui .scoreplate.rr-top { position: absolute; z-index: 3; left: 50%; top: var(--rr-top); transform: translateX(-50%); color: var(--rr-ink); }
.rr-top__in { display: flex; align-items: flex-start; gap: 1.5em; }
.rr-plr { display: flex; align-items: center; gap: 0.9em; height: 5.8em; padding: 0 1.6em 0 0.8em; min-width: 16.5em; cursor: default; }
.rr-plr--r { flex-direction: row-reverse; padding: 0 0.8em 0 1.6em; }
.rr-plr__txt { display: grid; gap: 0.45em; justify-items: start; min-width: 0; } .rr-plr--r .rr-plr__txt { justify-items: end; }
.rr-plr .team { font-size: 1.7em; max-width: 8.2em; overflow: hidden; text-overflow: ellipsis; padding: 0.12em 0.16em; margin: -0.12em -0.16em; transform-origin: 0 50%; }
.rr-plr--r .team { text-align: right; }   /* a name fitted onto two lines (scoreboard fitName) keeps to its plate's outer edge */
.rr-charge { display: flex; align-items: center; gap: 0.5em; } .rr-plr--r .rr-charge { flex-direction: row-reverse; }
.rr-charge .charge-segments { display: flex; gap: 0.36em; } .rr-plr--r .charge-segments { flex-direction: row-reverse; }
.rr-charge .charge-segments i { display: block; width: 1.5em; height: 1.05em; border: 0.16em solid var(--rr-ink); border-radius: 0.22em; background: rgba(25, 18, 67, 0.42); transform: skewX(var(--rr-slant)); transition: background 160ms; }
.rr-charge .charge-segments i.on { background: linear-gradient(180deg, var(--rr-gold) 0 54%, var(--rr-gold-lo) 54% 100%); }
.rr-bolt { width: 1.25em; height: 1.6em; margin: -0.3em 0; overflow: visible; transition: transform 160ms; } .rr-bolt path { fill: rgba(25, 18, 67, 0.42); stroke: var(--rr-ink); stroke-width: 2.6; stroke-linejoin: round; }
.rr-plr[data-power] .rr-bolt { transform: scale(1.5); } .rr-plr[data-power] .rr-bolt path { fill: var(--rr-gold); }
.rr-plr[data-power] .charge-segments i { animation: rr-pulse 0.6s ease-in-out infinite alternate; }
@keyframes rr-pulse { to { filter: brightness(1.25); translate: 0 -0.08em; } }
.rr-serve { position: absolute; top: -0.9em; left: -0.9em; width: 2.3em; height: 2.3em; border-radius: 50%; border: var(--rr-line) solid var(--rr-ink); background: #e6f24a; box-shadow: 0 0.2em 0 var(--rr-ink); overflow: hidden; }
.rr-serve::before, .rr-serve::after { content: ""; position: absolute; width: 100%; height: 100%; border: 0.16em solid #fff; border-radius: 50%; top: 0; } .rr-serve::before { left: -72%; } .rr-serve::after { left: 72%; }
.rr-plr--r .rr-serve { left: auto; right: -0.9em; }
.rr-ready { position: absolute; left: 50%; top: calc(100% + 0.35em); display: flex; flex-direction: column; align-items: center; gap: 0.1em; transform: translateX(-50%) rotate(-3deg); pointer-events: none; }
.rr-ready[hidden] { display: none; }
.rr-ready > img { display: block; width: auto; max-width: none; filter: drop-shadow(0 0.12em 0 rgba(25, 18, 67, 0.3)); }
.rr-ready > img:first-child { height: 0.95em; } .rr-ready > img:last-child { height: 1.9em; }
.rr-score { display: flex; align-items: center; justify-content: center; gap: 0.5em; height: 5.8em; padding: 0 1.5em; cursor: default; }
.rr-score .score-number { position: relative; display: block; height: 4.1em; min-width: 3em; font: 400 1em/1 var(--rr-display); color: #fff; }
.rr-score .score-number > span { display: flex; justify-content: center; height: 100%; } .rr-score .number-previous { position: absolute; inset: 0; }
.rr-score .score-number img { height: 100%; width: auto; margin: 0 -0.25em; }
.rr-score s { width: 1.1em; height: 0.62em; border: 0.16em solid var(--rr-ink); border-radius: 0.18em; background: #fff; transform: skewX(var(--rr-slant)); box-shadow: 0 0.12em 0 var(--rr-ink); }
.rr-tab { position: absolute; left: 50%; bottom: -1.55em; transform: translateX(-50%); padding: 0.26em 0.8em 0.3em; isolation: isolate; font-family: var(--rr-display); font-size: 0.98em; letter-spacing: var(--rr-track); line-height: 1; color: #fff; white-space: nowrap; }
.rr-tab::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--rr-ink); border-radius: 0.3em; transform: skewX(var(--rr-slant)); }
.rr-tab b { color: var(--rr-gold); font-weight: 400; }
.point-celebration { display: none; }   /* the point's call-out says who won it */

/* top right: Motion Bucks and the one menu button (Home's own) */
.rr-right { position: absolute; z-index: 4; right: max(2.3em, env(safe-area-inset-right)); top: var(--rr-top); display: flex; align-items: flex-start; gap: 1.5em; pointer-events: auto; }
.rr-ui .coin-pill.rr-bucks { position: relative; inset: auto; display: flex; align-items: center; gap: 0; height: 4.6em; padding: 0 1.4em 0 3.5em; margin-left: 1.6em; border-radius: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; cursor: default; --mc-size: 5.2em; }
.rr-ui .rr-bucks .mc-icon { display: none; }
.rr-ui .rr-bucks::after { content: ""; position: absolute; left: -1.7em; top: 50%; width: 5.4em; height: 5.4em; margin-top: -2.8em; background: url(coin.webp) center / contain no-repeat; }   /* Home's drawn coin */
.rr-ui .rr-bucks .mc-num { font: 400 2em/1 var(--rr-display); letter-spacing: var(--rr-track); color: #fff; transform: skewX(var(--rr-slant)); -webkit-text-stroke: 0.2em var(--rr-ink); paint-order: stroke fill; text-shadow: 0 0.1em 0 var(--rr-ink); padding: 0.1em; }
.rr-ui .rr-bucks .mc-label { display: none; }
.rr-menu { width: 4.6em; height: 4.6em; display: grid; place-items: center; align-content: center; gap: 0.5em; padding: 0; }
.rr-menu i { display: block; width: 2.6em; height: 0.62em; border-radius: 0.2em; background: #fff; border: 0.16em solid var(--rr-ink); transform: skewX(var(--rr-slant)); box-shadow: 0 0.12em 0 var(--rr-ink); }
@media (max-aspect-ratio: 1/1) { .rr-ui .scoreplate.rr-top { top: calc(var(--rr-top) + 6.6em); } .rr-top__in { gap: 1em; } .rr-plr { min-width: 0; } .rr-plr .team { max-width: 5.6em; } }

/* ---- call-outs: small, and never over the lane between the players, the opponent or the ball's path (the owner, 2026-11-18).
   A point's result (OUT, ACE, MATCH! ...) is a banner just under the scoreboard: the drawn word with its line beside it.
   Everything else (a swing's verdict, a power shot, POWER READY) is a small word low beside the player it is about, off
   to the side of the court: lab.mjs places it each frame from the court's own geometry (placeCallout). ---- */
.rr-ui .callout { position: absolute; z-index: 2; left: 50%; top: calc(var(--rr-top) + 8.6em); display: flex; align-items: center; gap: 0.8em; text-align: center; pointer-events: none; opacity: 0; transform: translate(-50%, 0) scale(0.6); transform-origin: 50% 0; transition: transform 0.16s cubic-bezier(0.2, 1.6, 0.4, 1), opacity 0.14s; }
.rr-ui .callout.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.rr-ui .callout[data-spot="side"] { flex-direction: column; gap: 0.3em; transform: translate(-50%, -50%) rotate(-3deg) scale(0.6); transform-origin: 50% 50%; }
.rr-ui .callout[data-spot="side"].show { transform: translate(-50%, -50%) rotate(-3deg) scale(1); }
.rr-call__art { height: max(2.9em, 28px); width: auto; max-width: 60vw; object-fit: contain; filter: drop-shadow(0 0.2em 0 rgba(25, 18, 67, 0.28)); }
/* beside a player every word is the same modest size: a long one (COMET SMASH!, POWER READY) is scaled down to a verdict's width */
.rr-ui .callout[data-spot="side"] .rr-call__art { height: auto; max-height: max(2.9em, 28px); max-width: min(44vw, max(15em, 150px)); }
.rr-ui .callout[data-spot="side"] > span { font-size: max(0.85em, 9px); }
.rr-ui .callout > b { font: 400 max(2em, 20px)/1 var(--rr-display); letter-spacing: var(--rr-track); text-transform: uppercase; color: #fff; -webkit-text-stroke: 0.2em var(--rr-ink); paint-order: stroke fill; text-shadow: 0 0.1em 0 var(--rr-ink); transform: skewX(var(--rr-slant)); white-space: nowrap; }
.rr-call__lead { display: block; height: max(1.1em, 12px); width: auto; filter: drop-shadow(0 0.15em 0 rgba(25, 18, 67, 0.28)); }
.rr-call__lead[hidden] { display: none; }
.rr-ui .callout[data-art] > b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.rr-ui .callout > span { position: relative; isolation: isolate; padding: 0.4em 0.9em 0.44em; font: 400 max(0.95em, 10px)/1 var(--rr-display); letter-spacing: var(--rr-track); text-transform: uppercase; color: #fff; white-space: nowrap; }
.rr-ui .callout > span:empty { display: none; }
.rr-ui .callout > span::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--rr-ink); border: 0.14em solid var(--rr-ink); border-radius: 0.34em; transform: skewX(var(--rr-slant)); box-shadow: 0 0.2em 0 var(--rr-ink); }
.rr-ui .callout[data-k="mine"] > span { color: var(--rr-ink); } .rr-ui .callout[data-k="mine"] > span::before { background: linear-gradient(180deg, var(--rr-gold) 0 54%, var(--rr-gold-lo) 54% 100%); }
.rr-ui .callout:is([data-k="bad"], [data-k="comet"], [data-k="banana"], [data-k="cloud"]) > span { -webkit-text-stroke: 0.2em var(--rr-ink); paint-order: stroke fill; }
.rr-ui .callout[data-k="bad"] > span::before { background: linear-gradient(180deg, #ff6f9c 0 54%, #ea3a72 54% 100%); }
.rr-ui .callout[data-k="comet"] > span::before { background: linear-gradient(180deg, #ffa63d 0 54%, #f47a16 54% 100%); } .rr-ui .callout[data-k="banana"] > span::before { background: linear-gradient(180deg, #4fd870 0 54%, #27ab4c 54% 100%); } .rr-ui .callout[data-k="cloud"] > span::before { background: linear-gradient(180deg, #3fb0ff 0 54%, #1f84ea 54% 100%); }
@media (max-aspect-ratio: 1/1) { .rr-ui .callout { top: calc(var(--rr-top) + 13.6em); } }
/* stacked (lab.mjs placeInBand): the tag under the word, when the word with its tag beside it has nowhere clear to go */
.rr-ui .callout[data-stack] { flex-direction: column; gap: 0.3em; }

/* the timing cue on the court: a ring the ball slides into, your tag above, one drawn word below (the game places it in px,
   beside its player or over their head: lab.mjs placeCue). Three times p39's 66 px ring (the owner's call, 2026-11-23); on a
   short screen (a phone held sideways) as big as its height allows. Everything inside scales with --cue-size. */
.timing-cue { --cue-size: min(198px, 38vh); position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: var(--cue-size); height: var(--cue-size); box-sizing: border-box; border: calc(var(--cue-size) * 0.07) solid #fff; border-radius: 50%; display: grid; place-items: center; pointer-events: none; font-size: 150%;
  box-shadow: 0 0 0 calc(var(--cue-size) * 0.045) var(--rr-ink, #191243), inset 0 0 0 calc(var(--cue-size) * 0.04) var(--rr-ink, #191243), 0 calc(var(--cue-size) * 0.06) 0 calc(var(--cue-size) * 0.045) var(--rr-ink, #191243), inset 0 0 0 999px rgba(25, 18, 67, 0.22); transition: border-color 0.08s; }
.timing-cue[hidden] { display: none; }
.timing-cue > b { position: absolute; bottom: calc(100% + 16px); isolation: isolate; padding: 0.3em 0.8em 0.34em; font: 400 max(11px, 1.1em)/1 var(--rr-display); letter-spacing: var(--rr-track); color: #fff; -webkit-text-stroke: 0.2em var(--rr-ink); paint-order: stroke fill; }
.timing-cue > b::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #3fb0ff 0 54%, #1f84ea 54% 100%); border: 0.16em solid var(--rr-ink); border-radius: 0.34em; transform: skewX(var(--rr-slant)); box-shadow: 0 0.18em 0 var(--rr-ink); }
.timing-cue.p2 > b::before { background: linear-gradient(180deg, #ff6f9c 0 54%, #ea3a72 54% 100%); }
.timing-cue .timing-label { position: absolute; top: calc(100% + 18px); isolation: isolate; padding: 0.36em 0.9em 0.4em; font: 400 max(11px, 1.15em)/1 var(--rr-display); letter-spacing: var(--rr-track); text-transform: uppercase; white-space: nowrap; color: #fff; }
.timing-cue .timing-label::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--rr-ink); border-radius: 0.34em; transform: skewX(var(--rr-slant)); }
.timing-cue .timing-label[data-art] { top: calc(100% + 14px); width: max(150px, 10em); height: max(27px, 1.9em); padding: 0; font-size: 0; background: center / contain no-repeat; } .timing-cue .timing-label[data-art]::before { display: none; }
.timing-cue .timing-ring { position: absolute; box-sizing: border-box; width: var(--perfect-size, 81px); height: var(--perfect-size, 81px); border: calc(var(--cue-size) * 0.04) solid var(--rr-gold, #ffd23f); background: rgba(255, 210, 63, 0.34); border-radius: 50%; box-shadow: 0 0 0 calc(var(--cue-size) * 0.025) var(--rr-ink, #191243); }
.timing-cue .timing-ball { position: absolute; box-sizing: border-box; width: calc(var(--cue-size) * 0.24); height: calc(var(--cue-size) * 0.24); background: radial-gradient(circle at 35% 32%, #fbffb0 0 18%, #e6f24a 19% 100%); border: calc(var(--cue-size) * 0.04) solid var(--rr-ink, #191243); border-radius: 50%; box-shadow: 0 0 calc(var(--cue-size) * 0.08) rgba(240, 255, 120, 0.85); transform: translateX(var(--ball-x, 0px)); }
.timing-cue[data-window="hit"] { border-color: #4fd870; } .timing-cue[data-window="perfect"] { border-color: var(--rr-gold); } .timing-cue[data-window="late"] { border-color: #ff6f9c; }
.timing-cue[data-window="toss"] { border-style: dashed; border-color: var(--rr-gold); box-shadow: none; filter: drop-shadow(0 2px 0 var(--rr-ink)); }
.timing-cue[data-window="toss"] .timing-ball, .timing-cue[data-window="toss"] .timing-ring, .timing-cue.flash .timing-ball, .timing-cue.flash .timing-ring { display: none; }
/* the swing's verdict (PERFECT, GOOD, EARLY, LATE) flashes in the ring's place. lab.css's .flash (the screen flash) is transparent
   and blends as light, and used to hide this one too. */
.timing-cue.flash { transform: translate(-50%, -50%) scale(1.12); opacity: 1; mix-blend-mode: normal; inset: auto; border-color: transparent; box-shadow: none; }
.timing-cue.flash .timing-label[data-art] { top: 50%; transform: translateY(-50%); width: max(180px, 12em); height: max(34px, 2.4em); }

/* ---- sheets: the dim, the side panel (menu, sound), the leaderboard ---- */
.rr-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(36, 22, 120, 0.62); }
.rr-side { position: fixed; z-index: 71; right: 0; top: 0; bottom: 0; width: min(43em, 94%); display: flex; flex-direction: column; color: #fff; padding: max(2em, env(safe-area-inset-top)) max(2.4em, env(safe-area-inset-right)) 2.2em 7.6em; isolation: isolate; user-select: none; animation: rr-in 220ms cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes rr-in { from { transform: translateX(12%); opacity: 0; } }
.rr-side::before { content: ""; position: absolute; z-index: -1; top: -3%; bottom: -3%; left: 2.2em; right: -60%; background: var(--rr-sheet); border-left: 0.6em solid #fff; box-shadow: -0.5em 0 0 var(--rr-ink); transform: skewX(-4.5deg); transform-origin: 50% 100%; }
.rr-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: 1.5em; } .rr-head .rr-word { height: 3.3em; }
.rr-x { flex: none; width: 3.4em; height: 3.4em; padding: 0; display: grid; place-items: center; cursor: pointer; border-radius: 0.45em; border: var(--rr-line) solid var(--rr-ink); transform: skewX(var(--rr-slant)); background: linear-gradient(180deg, var(--rr-red) 0 54%, var(--rr-red-lo) 54% 100%); box-shadow: 0 0.3em 0 var(--rr-ink); }
.rr-x::before { content: "✕"; font: 900 1.5em/1 Inter, system-ui, sans-serif; color: #fff; transform: skewX(8deg); }
.rr-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rr-back { align-self: flex-start; display: flex; align-items: center; gap: 0.5em; margin: -0.5em 0 1.2em; padding: 0.2em 0; border: 0; background: none; cursor: pointer; font: 600 1.4em/1 var(--rr-text); color: #cfc8ff; }
.rr-back::before { content: ""; width: 0.55em; height: 0.55em; border: solid #cfc8ff; border-width: 0 0 0.16em 0.16em; transform: rotate(45deg); }
.rr-opts { display: grid; gap: 1.25em; }
.rr-opt { display: flex; align-items: center; justify-content: space-between; gap: 1em; height: 4.7em; padding: 0 1.6em; }
.rr-opt .rr-word { height: 2.3em; max-width: 84%; } .rr-opt .rr-type { font-size: 1.35em; }
.rr-opt > i { width: 0.9em; height: 0.9em; border: solid #fff; border-width: 0.32em 0.32em 0 0; transform: rotate(45deg); filter: drop-shadow(0.14em -0.14em 0 var(--rr-ink)); }
.rr-foot { margin-top: auto; display: flex; gap: 1.4em; padding-top: 1.4em; } .rr-foot .rr-opt { flex: 1; justify-content: center; height: 5.2em; } .rr-foot .rr-opt .rr-word { height: 2.7em; max-width: 100%; } .rr-foot .rr-opt[data-c="violet"] { flex: 0 0 11em; }
.rr-row { display: flex; align-items: center; justify-content: space-between; gap: 1em; min-height: 3.6em; } .rr-row > .rr-type { font-size: 1.5em; }
.rr-side .rr-hand { margin-top: 1.8em; }
/* a two-way switch (left / right-handed) */
.rr-seg { position: relative; isolation: isolate; display: inline-flex; padding: 0.3em; gap: 0.2em; }
.rr-seg::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #1c1466; border: var(--rr-line) solid var(--rr-ink); border-radius: 0.5em; transform: skewX(var(--rr-slant)); box-shadow: 0 0.24em 0 var(--rr-ink); }
.rr-seg button { position: relative; isolation: isolate; display: grid; place-items: center; min-width: 5.4em; height: 2.6em; padding: 0 1em; border: 0; background: none; cursor: pointer; font: 400 1.2em/1 var(--rr-display); letter-spacing: var(--rr-track); text-transform: uppercase; color: #a99cf0; white-space: nowrap; }
.rr-seg button[aria-pressed="true"] { color: var(--rr-ink); } .rr-seg button[aria-pressed="true"]::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--rr-gold) 0 54%, var(--rr-gold-lo) 54% 100%); border: 0.14em solid var(--rr-ink); border-radius: 0.34em; transform: skewX(var(--rr-slant)); }
/* Sound: the game's own controls (lab/audio.mjs), dressed as Home's settings */
.rr-sound { flex: 1; min-height: 0; overflow-y: auto; padding: 0.4em 1em 1em 0.6em; margin: 0 -1em 0 -0.6em; }
.rr-ui .sound-settings { position: static; color: #fff; font: inherit; } .rr-ui .sound-settings summary { display: none; }
.rr-ui .sound-card { position: static; width: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; display: grid; gap: 1.5em; }
.rr-ui .sound-card > strong { display: none; }
.rr-ui .sound-card label { display: grid; gap: 0.7em; font: 400 1.5em/1 var(--rr-display); letter-spacing: var(--rr-track); text-transform: uppercase; color: #fff; -webkit-text-stroke: 0.2em var(--rr-ink); paint-order: stroke fill; }
.rr-ui .sound-card label.rr-music { grid-template-columns: 1fr auto; align-items: center; }
.rr-ui .sound-card input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 1em; margin: 0.4em 0 0.3em; font-size: 0.67em; border: 0.3em solid var(--rr-ink); border-radius: 0.6em; background: #5a4aa8; transform: skewX(var(--rr-slant)); box-shadow: 0 0.36em 0 var(--rr-ink); cursor: pointer; accent-color: var(--rr-gold); box-sizing: content-box; }
.rr-ui .sound-card input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 2.8em; height: 3.6em; border: 0.3em solid var(--rr-ink); border-radius: 0.5em; background: linear-gradient(180deg, var(--rr-gold) 0 54%, var(--rr-gold-lo) 54% 100%); box-shadow: 0 0.3em 0 var(--rr-ink); }
.rr-ui .sound-card input[type="range"]::-moz-range-thumb { width: 2.2em; height: 3em; border: 0.3em solid var(--rr-ink); border-radius: 0.5em; background: var(--rr-gold); }
.rr-ui .sound-card select, .rr-ui .sound-card button:not(.rr-switch) { width: 100%; padding: 0.7em 0.9em; font: 600 0.9em/1.1 var(--rr-text); letter-spacing: -0.02em; text-transform: none; -webkit-text-stroke: 0; color: var(--rr-ink); border: 0.2em solid var(--rr-ink); border-radius: 0.5em; background: linear-gradient(180deg, #fff 0 54%, #d3d9ee 54% 100%); box-shadow: 0 0.3em 0 var(--rr-ink); cursor: pointer; }
.rr-ui .sound-card select option { background: #fff; color: var(--rr-ink); }
.rr-ui .audio-status { font: 500 1.2em/1.3 var(--rr-text); color: #ffd59e; }
.rr-ui .musicbtn.rr-switch { position: relative; inset: auto; flex: none; width: 3.6em; height: 1.94em; padding: 0; opacity: 1; font-size: 1em; border: 0.134em solid var(--rr-ink); border-radius: 0.34em; background: linear-gradient(180deg, #4fd870 0 54%, #27ab4c 54% 100%); transform: skewX(var(--rr-slant)); box-shadow: 0 0.16em 0 var(--rr-ink); backdrop-filter: none; cursor: pointer; pointer-events: auto; text-decoration: none; }
.rr-ui .musicbtn.rr-switch::after { content: ""; position: absolute; right: 0.16em; top: 0.16em; width: 1.4em; height: 1.35em; border: 0.107em solid var(--rr-ink); border-radius: 0.23em; background: #fff; transition: right 140ms ease-out; }
.rr-ui .musicbtn.rr-switch.off { background: #5a4aa8; } .rr-ui .musicbtn.rr-switch.off::after { right: calc(100% - 1.56em); }
.rr-ui .boardbar { display: none; }   /* Leaderboard and Submit my score are in the menu */
.rr-ui #motions-review-launcher { display: none !important; }   /* Report a problem is in the menu */
@media (max-aspect-ratio: 1/1) { .rr-side { padding-left: 6em; } }
@media (max-height: 480px) and (min-aspect-ratio: 1/1) { .rr-side { padding-top: 1.3em; padding-bottom: 1.3em; } .rr-head { margin-bottom: 0.9em; } .rr-head .rr-word { height: 2.8em; } .rr-opts { gap: 0.9em; } .rr-opt { height: 4.1em; } .rr-foot .rr-opt { height: 4.4em; } .rr-foot { padding-top: 0.8em; } .rr-side .rr-hand { margin-top: 1em; } .rr-back { margin-bottom: 0.7em; } .rr-ui .sound-card { gap: 0.9em; } }

/* the leaderboard: the shared dialog (weekly-leaderboard.js), as Home's side sheet */
.rr-ui dialog.weekly-board.rally-board { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(50em, 96vw); height: 100dvh; max-height: none; padding: 2em 2.4em 2em 7.6em; border: 0; border-radius: 0; background: none; box-shadow: none; color: #fff; overflow: hidden auto; }
.rr-ui dialog.rally-board::backdrop { background: rgba(36, 22, 120, 0.62); }
.rr-ui dialog.rally-board::before { content: ""; position: fixed; z-index: -1; top: -3%; bottom: -3%; left: calc(100vw - min(50em, 96vw) + 2.2em); right: -60%; background: var(--rr-sheet); border-left: 0.6em solid #fff; box-shadow: -0.5em 0 0 var(--rr-ink); transform: skewX(-4.5deg); transform-origin: 50% 100%; }
.rr-ui .rally-board header { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: 1.2em; }
.rr-ui .rally-board header > div { min-width: 0; height: 3.3em; flex: 1; background: url(words/word-leaderboard-w.webp) 0 50% / contain no-repeat; } .rr-ui .rally-board header > div > * { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.rr-ui .rally-board .wb-close { flex: none; width: 2.27em; height: 2.27em; padding: 0; font: 900 1.5em/1 Inter, system-ui, sans-serif; color: #fff; cursor: pointer; border-radius: 0.3em; border: 0.134em solid var(--rr-ink); transform: skewX(var(--rr-slant)); background: linear-gradient(180deg, var(--rr-red) 0 54%, var(--rr-red-lo) 54% 100%); box-shadow: 0 0.2em 0 var(--rr-ink); }
.rr-ui .rally-board .wb-game, .rr-ui .rally-board .wb-clock > span, .rr-ui .rally-board .wb-refresh { display: none; }
.rr-ui .rally-board .wb-boards { position: relative; isolation: isolate; display: inline-flex; gap: 0.2em; padding: 0.3em; margin: 0 0 1.2em; }
.rr-ui .rally-board .wb-boards::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #1c1466; border: var(--rr-line) solid var(--rr-ink); border-radius: 0.5em; transform: skewX(var(--rr-slant)); box-shadow: 0 0.24em 0 var(--rr-ink); }
.rr-ui .rally-board .wb-boards button { position: relative; isolation: isolate; flex: none; min-width: 6.4em; height: 2.6em; padding: 0 1em; border: 0; border-radius: 0; background: none; cursor: pointer; font: 400 1.2em/1 var(--rr-display); letter-spacing: var(--rr-track); text-transform: uppercase; color: #a99cf0; }
.rr-ui .rally-board .wb-boards [aria-pressed="true"] { color: var(--rr-ink); background: none; } .rr-ui .rally-board .wb-boards [aria-pressed="true"]::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--rr-gold) 0 54%, var(--rr-gold-lo) 54% 100%); border: 0.14em solid var(--rr-ink); border-radius: 0.34em; transform: skewX(var(--rr-slant)); }
.rr-ui .rally-board .wb-clock { display: flex; align-items: baseline; gap: 0.8em; margin: 0 0 1em; padding: 0; border: 0; background: none; } .rr-ui .rally-board .wb-clock strong { font: 400 1.25em/1 var(--rr-display); letter-spacing: var(--rr-track); color: var(--rr-gold); } .rr-ui .rally-board .wb-clock small { font: 500 1.15em/1 var(--rr-text); color: #cfc8ff; }
.rr-ui .rally-board .wb-list-heading { margin: 0 0 0.8em; } .rr-ui .rally-board .wb-list-heading span { font: 400 1.15em/1 var(--rr-display); letter-spacing: var(--rr-track); color: #cfc8ff; }
.rr-ui .rally-board .wb-list { list-style: none; margin: 0; padding: 0 0.6em 0 0.4em; display: grid; gap: 0.7em; }
.rr-ui .rally-board .wb-list li { position: relative; isolation: isolate; display: grid; grid-template-columns: 2.6em 1fr auto; align-items: center; gap: 0.9em; height: 3.7em; padding: 0 1.4em 0 0.9em; border: 0; background: none; }
.rr-ui .rally-board .wb-list li::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 0.5em; border: var(--rr-line) solid var(--rr-ink); transform: skewX(var(--rr-slant)); background: linear-gradient(180deg, #3a2a9c 0 54%, #2f2187 54% 100%); box-shadow: 0 0.26em 0 var(--rr-ink); }
.rr-ui .rally-board .wb-list li b { display: grid; place-items: center; width: 2.3em; height: 2.3em; font: 400 1.1em/1 var(--rr-display); letter-spacing: var(--rr-track); color: #fff; border: 0.16em solid var(--rr-ink); border-radius: 0.3em; background: #1c1466; transform: skewX(var(--rr-slant)); }
.rr-ui .rally-board .wb-list li:nth-child(1) b { background: linear-gradient(180deg, var(--rr-gold) 0 54%, var(--rr-gold-lo) 54% 100%); color: var(--rr-ink); } .rr-ui .rally-board .wb-list li:nth-child(2) b { background: linear-gradient(180deg, #fff 0 54%, #c3cbe6 54% 100%); color: var(--rr-ink); } .rr-ui .rally-board .wb-list li:nth-child(3) b { background: linear-gradient(180deg, #ffb27a 0 54%, #e07f3c 54% 100%); color: var(--rr-ink); }
.rr-ui .rally-board .wb-list li span, .rr-ui .rally-board .wb-list li strong { font: 400 1.35em/1 var(--rr-display); letter-spacing: var(--rr-track); text-transform: uppercase; color: #fff; -webkit-text-stroke: 0.2em var(--rr-ink); paint-order: stroke fill; transform: skewX(var(--rr-slant)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0.1em 0.14em; }
.rr-ui .rally-board .wb-status, .rr-ui .rally-board .wb-empty, .rr-ui .rally-board footer, .rr-ui .rally-board .wb-note { font: 500 1.2em/1.35 var(--rr-text); color: #cfc8ff; } .rr-ui .rally-board .wb-empty span { color: #fff; }
.rr-ui .rally-board footer { margin-top: 1.2em; }
.rr-ui .rally-board form { display: grid; gap: 0.9em; margin: 0 0 1.4em; padding: 1.2em 1.3em 1.4em; border: 0.2em solid var(--rr-ink); border-radius: 0.6em; background: #fff; box-shadow: 0 0.4em 0 var(--rr-ink); color: var(--rr-ink); }
.rr-ui .rally-board form label { display: grid; gap: 0.4em; font: 400 1.05em/1 var(--rr-display); letter-spacing: var(--rr-track); text-transform: uppercase; color: #5a4fa8; } .rr-ui .rally-board .wb-run { font: 400 1.9em/1 var(--rr-display); color: var(--rr-ink); }
.rr-ui .rally-board form input { padding: 0.6em 0.8em; font: 600 1.3em/1.2 var(--rr-text); text-transform: none; color: var(--rr-ink); border: 0.16em solid var(--rr-ink); border-radius: 0.4em; background: #f1eeff; }
.rr-ui .rally-board form .wb-note { color: #5a4fa8; margin: 0; }
.rr-ui .rally-board .wb-submit { justify-self: start; padding: 0.7em 1.4em 0.75em; font: 400 1.3em/1 var(--rr-display); letter-spacing: var(--rr-track); text-transform: uppercase; color: var(--rr-ink); cursor: pointer; border: 0.16em solid var(--rr-ink); border-radius: 0.4em; background: linear-gradient(180deg, var(--rr-gold) 0 54%, var(--rr-gold-lo) 54% 100%); box-shadow: 0 0.26em 0 var(--rr-ink); }
@media (max-aspect-ratio: 1/1) { .rr-ui dialog.weekly-board.rally-board { padding-left: 6em; } }

/* ---- the camera: the step that gets you into frame, then you, small, in the corner ---- */
.rr-ui .campanel.rr-cam { position: fixed; z-index: 6; right: 2.6em; bottom: 2.2em; width: 17em; pointer-events: auto; color: #fff; }
.rr-cam__view { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0.6em; border: 0.26em solid var(--rr-ink); outline: 0.3em solid #fff; outline-offset: -0.5em; transform: skewX(var(--rr-slant)); box-shadow: 0 var(--rr-drop) 0 var(--rr-ink); background: #27306a; }
.rr-cam__view canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transform: skewX(8deg) scale(1.2); }
.rr-cam__you { position: absolute; left: -0.6em; top: -0.9em; font-size: 1.1em; color: var(--rr-ink); } .rr-cam__you::before { background: linear-gradient(180deg, var(--rr-gold) 0 54%, var(--rr-gold-lo) 54% 100%); }
.rr-step { display: none; }
/* developer lines and buttons: only with ?debug=1 or the ` key where developer tools are on (never for players) */
.rr-cam .camstatus, .rr-cam .camrow { display: none; }
.rr-dev .rr-cam .camstatus { display: grid; gap: 2px; margin-top: 0.9em; padding: 6px 8px; border-radius: 6px; background: rgba(25, 18, 67, 0.88); font: 600 11px/1.3 system-ui, sans-serif; letter-spacing: 0; }
.rr-dev .rr-cam .camstatus b { letter-spacing: 0.1em; } .rr-dev .rr-cam .camstatus b.ready { color: var(--rr-gold); } .rr-dev .rr-cam .camstatus b.bad { color: #ff8fb0; } .rr-dev .rr-cam .camstatus span { opacity: 0.8; }
.rr-dev .rr-cam .camrow { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rr-dev .rr-cam .camrow button, .dbg-title button { font: 700 10px/1 system-ui, sans-serif; letter-spacing: 0; padding: 5px 7px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(25, 18, 67, 0.88); color: #fff; cursor: pointer; }
.rr-cam .camrow button.on { background: var(--rr-gold); color: var(--rr-ink); } .camrow button.rec, .dbg-title button.rec { background: #ff5ca8; color: #0b0d12; animation: recblink 1s steps(2) infinite; }
.rr-dev.rr-ui .campanel.rr-cam { width: 22em; }
/* the step: the camera large and centred with one instruction, until you are in frame */
.rr-step__veil { z-index: 5; }
.rr-ui .campanel.rr-cam:is([data-step="look"], [data-step="found"]) { inset: 0; width: auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 4em; padding: 3em 5em 3em 6em; }
.rr-cam:is([data-step="look"], [data-step="found"]) .rr-cam__view { max-height: calc(100dvh - 7em); max-width: calc((100dvh - 7em) * 16 / 9); justify-self: center; border-width: 0.34em; border-radius: 0.9em; outline-width: 0.5em; outline-offset: -0.8em; transform: skewX(-5deg); box-shadow: 0 0.8em 0 var(--rr-ink); }
.rr-cam:is([data-step="look"], [data-step="found"]) .rr-cam__view canvas { transform: skewX(5deg) scale(1.14); }
.rr-cam:is([data-step="look"], [data-step="found"]) .rr-cam__you { display: none; }
.rr-cam:is([data-step="look"], [data-step="found"]) .rr-step { display: grid; justify-items: start; gap: 1.7em; min-width: 0; grid-column: 2; grid-row: 1; }
.rr-cam:is([data-step="look"], [data-step="found"]) .rr-cam__view { grid-column: 1; grid-row: 1; }
.rr-dev .rr-cam:is([data-step="look"], [data-step="found"]) :is(.camstatus, .camrow) { grid-column: 1 / -1; margin: 0; align-self: end; }
.rr-step__title { height: 5.2em; width: auto; max-width: 100%; object-fit: contain; object-position: 0 50%; }
.rr-say { margin: 0; font: 600 2.1em/1.16 var(--rr-text); color: #fff; text-shadow: 0 0.09em 0 var(--rr-ink); max-width: 15em; }
.rr-fill { position: relative; width: 100%; max-width: 30em; height: 2.6em; border: var(--rr-line) solid var(--rr-ink); border-radius: 0.5em; background: #1c1466; transform: skewX(var(--rr-slant)); box-shadow: 0 0.3em 0 var(--rr-ink); overflow: hidden; }
.rr-fill i { position: absolute; inset: 0 auto 0 0; width: 12%; background: linear-gradient(180deg, var(--rr-gold) 0 54%, var(--rr-gold-lo) 54% 100%); border-right: var(--rr-line) solid var(--rr-ink); animation: rr-look 1.6s ease-in-out infinite alternate; }
@keyframes rr-look { to { width: 34%; } }
.rr-cam[data-step="found"] .rr-fill i { animation: none; width: 100%; transition: width 650ms ease-out; border-right: 0; }
.rr-fill b { position: absolute; inset: 0; display: grid; place-items: center; font: 400 1.15em/1 var(--rr-display); letter-spacing: var(--rr-track); text-transform: uppercase; color: #fff; -webkit-text-stroke: 0.22em var(--rr-ink); paint-order: stroke fill; transform: skewX(8deg); }
.rr-step .rr-hand { gap: 1.4em; } .rr-step .rr-hand > .rr-type { font-size: 1.15em; }
.rr-stepping #hud .callout, .rr-stepping #hud .timing-cue { visibility: hidden; }
@media (max-aspect-ratio: 1/1) {
  .rr-ui .campanel.rr-cam { width: 13em; right: 1.6em; bottom: 1.8em; }
  .rr-ui .campanel.rr-cam:is([data-step="look"], [data-step="found"]) { grid-template-columns: 1fr; align-content: center; gap: 3.4em; padding: 3em 2.6em; }
  .rr-cam:is([data-step="look"], [data-step="found"]) .rr-step { grid-column: 1; grid-row: 2; justify-items: center; text-align: center; } .rr-step__title { height: 4.3em; object-position: 50% 50%; }
}
@media (max-height: 480px) and (min-aspect-ratio: 1/1) { .rr-ui .campanel.rr-cam:is([data-step="look"], [data-step="found"]) { padding: 2em 4em; gap: 3em; } .rr-cam:is([data-step="look"], [data-step="found"]) .rr-step { gap: 1.2em; } .rr-step__title { height: 4.4em; } .rr-say { font-size: 1.8em; } }

/* ---- camera blocked: Home's pop-up, a coloured head with the drawn title on a white card ---- */
.rr-ui .start { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 2em; background: rgba(36, 22, 120, 0.62); }
.rr-pop { width: min(50em, 100%); border-radius: 0.7em; background: #fff; border: 0.26em solid var(--rr-ink); box-shadow: 0 0.7em 0 var(--rr-ink); text-align: center; color: var(--rr-ink); }
.rr-pop__head { display: grid; place-items: center; padding: 1.2em 2em 1.1em; border-bottom: 0.26em solid var(--rr-ink); border-radius: 0.45em 0.45em 0 0; background: linear-gradient(180deg, #ff6f9c 0 54%, #ea3a72 54% 100%); }
.rr-pop__head h1 { margin: 0; font-size: 1em; } .rr-pop__head .rr-word { height: 3.1em; }
.rr-pop__body { padding: 2em 2.6em; display: grid; justify-items: center; gap: 1.3em; }
.rr-pop__body p { margin: 0; max-width: 26em; font: 600 1.5em/1.28 var(--rr-text); color: #3a2f86; } .rr-pop__body p.small { font: 500 1.15em/1.3 var(--rr-text); color: #7a70c0; }
.rr-pop .rr-opt { height: 5em; padding: 0 2.6em; justify-content: center; } .rr-pop .rr-opt .rr-type { font-size: 1.8em; } .rr-pop .rr-opt:disabled { opacity: 0.6; cursor: default; }
.rr-camicon { width: 9em; height: 7em; }
.rr-pop__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2em 1.6em; } .rr-pop__acts .rr-opt .rr-word { height: 2.3em; } .rr-pop__acts a.rr-opt { text-decoration: none; padding: 0 2em; }
@media (max-height: 480px) and (min-aspect-ratio: 1/1) { .rr-pop { width: min(58em, 100%); } .rr-pop__head { padding: 0.8em 2em; } .rr-pop__body { padding: 1.2em 2.4em 1.3em; gap: 0.8em; grid-template-columns: auto 1fr; text-align: left; justify-items: start; align-items: center; } .rr-pop__body > .rr-camicon { grid-row: 1 / 3; width: 8em; } .rr-pop__body > p.small { grid-column: 1 / -1; justify-self: center; } }

@media (prefers-reduced-motion: reduce) { .rr-ui .callout, .rr-box, .rr-side, .rr-fill i, .rr-plr[data-power] .charge-segments i, .rr-bolt, .timing-cue { transition: none !important; animation: none !important; } .timing-cue.flash { transform: translate(-50%, -50%); } }

/* small corrections found with the real game running */
.rr-ui #hud .rr-bucks > :not(.mc-num) { display: none !important; }
.rr-ui .rally-board nav { display: none; }   /* one mode (camera vs the computer): no mode picker */
.rr-ui dialog.rally-board::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
.rr-ui .rally-board .wb-list-heading { display: block; } .rr-ui .rally-board .wb-empty { font-size: 1.5em; text-align: left; } .rr-ui .rally-board .wb-empty span { font-size: 0.8em; }
.rr-ui .sound-card > button:not(.rr-switch) { font-size: 1.35em; }
@media (max-aspect-ratio: 1/1) {
  .rr-top__in { gap: 0.7em; } .rr-plr { height: 5em; gap: 0.6em; padding: 0 1.1em 0 0.6em; } .rr-plr--r { padding: 0 0.6em 0 1.1em; } .rr-plr .rr-ava { width: 3.4em; height: 3.4em; } .rr-plr .team { font-size: 1.3em; max-width: 4.6em; }
  .rr-charge .charge-segments i { width: 1.2em; height: 0.9em; } .rr-score { height: 5em; padding: 0 1em; gap: 0.3em; } .rr-score .score-number { height: 3.3em; min-width: 2.4em; }
}

/* The over-the-shoulder camera stands the player in the lower right-centre (lower left-centre for a left-hander, whose view is
   the mirror image), so the camera preview sits in the opposite bottom corner, clear of the player. */
.rr-ui .campanel.rr-cam:not([data-step="look"]):not([data-step="found"]) { right: auto; left: max(2.6em, env(safe-area-inset-left)); }
.rr-ui.rr-lefty .campanel.rr-cam:not([data-step="look"]):not([data-step="found"]) { left: auto; right: max(2.6em, env(safe-area-inset-right)); }
.rr-ui .rr-cam__you { left: auto; right: -0.6em; } .rr-ui.rr-lefty .rr-cam__you { right: auto; left: -0.6em; }

/* the ring's word above the ring with its tag above that, when under the ring is where the player stands (lab.mjs sets data-flip) */
.timing-cue[data-flip] .timing-label { top: auto; bottom: calc(100% + 14px); } .timing-cue[data-flip] > b { bottom: calc(100% + 24px + max(27px, 1.9em)); }
/* p50: the racket-hand switch, drawn (RACKET HAND, LEFT, RIGHT), and player two's beside a P2 tag in a split screen */
.rr-hand__label { display: inline-flex; align-items: center; gap: 0.6em; min-width: 0; } .rr-hand__label .rr-word { height: 2.1em; max-width: 100%; }
.rr-hand__who { flex: none; }
.rr-hand[hidden] { display: none; }
.rr-side .rr-hand + .rr-hand { margin-top: 0.9em; }
.rr-seg button .rr-word { height: 1.35em; width: auto; opacity: 0.55; transition: opacity 0.12s; } .rr-seg button[aria-pressed="true"] .rr-word { opacity: 1; }
.rr-step .rr-hand .rr-hand__label .rr-word { height: 1.8em; }
/* p50: the shot call over the timing cue (FOREHAND, BACKHAND, OVERHEAD, VOLLEY), and the P1/P2 tag moved up over it */
.timing-cue .timing-call { position: absolute; bottom: calc(100% + 12px); height: max(30px, 2.2em); width: auto; max-width: max(220px, 15em); pointer-events: none; filter: drop-shadow(0 2px 0 var(--rr-ink, #191243)); animation: rr-call-in 0.18s ease-out; }
.timing-cue .timing-call[hidden] { display: none; }
.timing-cue[data-call] > b { bottom: calc(100% + 22px + max(30px, 2.2em)); }
.timing-cue.flash .timing-call { display: none; }
.timing-cue[data-flip] .timing-call { bottom: calc(100% + 24px + max(27px, 1.9em)); } .timing-cue[data-flip][data-call] > b { bottom: calc(100% + 34px + max(27px, 1.9em) + max(30px, 2.2em)); }
@keyframes rr-call-in { from { transform: scale(0.7); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .timing-cue .timing-call { animation: none; } }

/* ---- p59: matchmaking after PLAY AGAIN (./queue-ui.mjs): FINDING AN OPPONENT, you VS the other side turning over, OPPONENT FOUND!.
   A modal over the court in the end screen's look: an even dim, one flat sheet with the ink outline and hard drop. */
.rr-queue { position: fixed; inset: 0; z-index: 2147483601; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  font-size: var(--rr-em); font-family: var(--rr-text); letter-spacing: -0.022em; color: #fff; }
.rr-queue__veil { position: absolute; inset: 0; background: rgba(18, 12, 54, 0.62); }
.rr-queue__card { position: relative; isolation: isolate; display: grid; justify-items: center; gap: 1.6em; width: min(46em, 100%); padding: 2.4em 2.6em 2.6em; text-align: center; }
.rr-queue__card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 0.9em; border: 0.24em solid var(--rr-ink); background: var(--rr-sheet); box-shadow: 0 0.55em 0 var(--rr-ink); }
.rr-queue__head { display: grid; place-items: center; min-height: 4.2em; }
.rr-queue__title { grid-area: 1 / 1; height: 4.2em; max-width: 100%; object-fit: contain; }
.rr-queue[data-state="searching"] .rr-queue__title--found, .rr-queue[data-state="found"] .rr-queue__title--search { visibility: hidden; }
.rr-queue[data-state="found"] .rr-queue__title--found { animation: rr-queue-pop 320ms cubic-bezier(.2, 1.6, .4, 1); }
.rr-queue__vs { display: flex; align-items: center; justify-content: center; gap: 2.2em; }
.rr-queue__vs .rr-ava { width: 9em; height: 9em; box-shadow: 0 0.42em 0 var(--rr-ink); }
.rr-queue__vsword { height: 4.6em; width: auto; }
.rr-queue[data-state="searching"] .rr-queue__them img { filter: brightness(0.35) saturate(0.4); }
.rr-queue[data-state="found"] .rr-queue__them { animation: rr-queue-pop 320ms cubic-bezier(.2, 1.6, .4, 1); }
.rr-queue__name { min-height: 2.4em; margin: 0; } .rr-queue__name .rr-type { font-size: 2.2em; }
.rr-queue[data-state="searching"] .rr-queue__name .rr-type { color: var(--rr-gold); }
.rr-queue__time { margin: 0; font: 600 1.45em/1.2 var(--rr-text); color: #cfc8ff; } .rr-queue__time b { font: 400 1.05em/1 var(--rr-display); color: #fff; letter-spacing: var(--rr-track); }
.rr-queue__cancel { height: 4.4em; padding: 0 2.6em; justify-content: center; } .rr-queue__cancel .rr-word { height: 2.1em; }
.rr-queue[data-state="found"] .rr-queue__cancel { display: none; }
.rr-queue :focus-visible { outline: 0.22em solid var(--rr-gold); outline-offset: 0.3em; }
@keyframes rr-queue-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-height: 480px) and (min-aspect-ratio: 1/1) { .rr-queue { --rr-em: clamp(7px, 2.4vh, 12px); } .rr-queue__card { gap: 1.1em; padding: 1.6em 2em 1.8em; } .rr-queue__vs .rr-ava { width: 7.5em; height: 7.5em; } }
@media (prefers-reduced-motion: reduce) { .rr-queue *, .rr-queue *::before { animation: none !important; } }
