/* Boxing's in-fight UI in Home's look (site/next/hub.css is the source of truth; Rally Riot's ui/rally-ui.css is the
   same system): what is 3D stays 3D (the ring, the boxers); 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 box has its
   own bright colour with white lettering on it. Fixed wording is drawn lettering (words/word-*.webp: -w white, -g gold);
   text that changes is Bungee set tight and slanted (.bx-type); sentences are Kanit. Everything is sized in em from
   --bx-em, which follows the screen as Home's does. Markup: ../index.html; painters and the menu: ./boxing-ui.mjs. */
.bx-ui { --bx-ink: #191243; --bx-gold: #ffd23f; --bx-gold-lo: #f7a81d; --bx-red: #ff4d6d; --bx-red-lo: #e02650; --bx-sheet: #2b1f85;
  --bx-slant: -8deg; --bx-line: 0.2em; --bx-drop: 0.42em;
  --bx-display: Bungee, "Titan One", Inter, system-ui, sans-serif; --bx-track: -0.035em; --bx-text: Kanit, Inter, system-ui, sans-serif;
  --bx-em: clamp(8.5px, min(2.1vh, 1.06vw), 17px);
  --bx-top: max(1.5em, env(safe-area-inset-top)); --bx-left: max(2.3em, env(safe-area-inset-left)); --bx-right: max(2.3em, env(safe-area-inset-right)); }
@media (max-aspect-ratio: 1/1) { .bx-ui { --bx-em: clamp(8.5px, 2.35vw, 17px); } }
.bx-ui #hud, .bx-ui .bx-side, .bx-ui .bx-scrim, .bx-ui #campanel, .bx-ui #setup, .bx-ui #split { font-size: var(--bx-em); font-family: var(--bx-text); letter-spacing: -0.022em; -webkit-tap-highlight-color: transparent; }
.bx-ui #hud *, .bx-ui .bx-side *, .bx-ui #campanel *, .bx-ui #setup *, .bx-ui #split * { box-sizing: border-box; }
.bx-ui #hud img, .bx-ui .bx-side img, .bx-ui #setup img, .bx-ui #split img, .bx-ui #campanel img { display: block; user-select: none; -webkit-user-drag: none; }
.bx-ui [hidden] { display: none !important; }
.bx-ui :is(#hud, .bx-side, #campanel, #setup) :focus-visible { outline: 0.22em solid var(--bx-gold); outline-offset: 0.3em; }
.bx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- the drawn box, the changing text, a drawn word, a boxer's icon, a tag ---- */
.bx-box { position: relative; isolation: isolate; --top: #fff; --bot: #d3d9ee; border: 0; background: none; color: inherit; font: inherit; text-decoration: none; }
.bx-box::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 0.5em; border: var(--bx-line) solid var(--bx-ink); transform: skewX(var(--bx-slant));
  background: linear-gradient(180deg, var(--top) 0 54%, var(--bot) 54% 100%); box-shadow: 0 var(--bx-drop) 0 var(--bx-ink); transition: box-shadow 110ms, filter 110ms; }
.bx-box[data-c="violet"] { --top: #8a5cff; --bot: #6535e6; } .bx-box[data-c="blue"] { --top: #3fb0ff; --bot: #1f84ea; } .bx-box[data-c="orange"] { --top: #ffa63d; --bot: #f47a16; }
.bx-box[data-c="green"] { --top: #4fd870; --bot: #27ab4c; } .bx-box[data-c="pink"] { --top: #ff6f9c; --bot: #ea3a72; } .bx-box[data-c="gold"] { --top: var(--bx-gold); --bot: var(--bx-gold-lo); }
/* the corners are the glove colours (style.css --p1 red, the near corner; --p2 blue, the far corner; cast-look.mjs GLOVE_COLOURS) */
.bx-ui .fighter.you { --top: color-mix(in srgb, var(--p1) 52%, #ff5f58); --bot: var(--p1); }
.bx-ui .fighter.cpu { --top: color-mix(in srgb, var(--p2) 52%, #58baff); --bot: var(--p2); }
button.bx-box, a.bx-box { cursor: pointer; pointer-events: auto; transition: transform 110ms ease-out; }
:is(button, a).bx-box:hover { transform: translateY(-0.14em); } :is(button, a).bx-box:hover::before { filter: brightness(1.1); }
:is(button, a).bx-box:active { transform: translateY(0.26em); } :is(button, a).bx-box:active::before { box-shadow: 0 0.1em 0 var(--bx-ink); }
.bx-type { display: inline-block; font-family: var(--bx-display); font-weight: 400; font-style: normal; text-transform: uppercase; letter-spacing: var(--bx-track); line-height: 1; color: #fff; transform: skewX(var(--bx-slant));
  -webkit-text-stroke: 0.2em var(--bx-ink); paint-order: stroke fill; text-shadow: 0 0.1em 0 var(--bx-ink); white-space: nowrap; }
.bx-word { height: 1.9em; width: auto; max-width: 100%; object-fit: contain; }
.bx-art { display: flex; align-items: center; gap: 0.3em; height: 100%; min-width: 0; } .bx-art > img { height: 100%; width: auto; min-width: 0; object-fit: contain; }
.bx-art > .bx-digit + .bx-digit { margin-left: -0.4em; }
.bx-ava { flex: none; width: 4.4em; height: 4.4em; display: grid; place-items: center; overflow: hidden; border-radius: 0.45em; border: var(--bx-line) solid var(--bx-ink); transform: skewX(var(--bx-slant)); background: linear-gradient(180deg, #7a52ff 0 54%, #5a33e6 54% 100%); }
.bx-ava img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform: skewX(8deg) scale(1.24); }
.bx-ava b { font-family: var(--bx-display); font-weight: 400; font-size: 2.2em; line-height: 1; color: #fff; transform: skewX(8deg); -webkit-text-stroke: 0.14em var(--bx-ink); paint-order: stroke fill; }
.bx-ava[data-who="rio"] { background: linear-gradient(180deg, #4d74ff 0 54%, #2f49d6 54% 100%); } .bx-ava[data-who="ria"] { background: linear-gradient(180deg, #b46bff 0 54%, #8a3fe0 54% 100%); } .bx-ava[data-who="court"] { background: linear-gradient(180deg, #55cc82 0 54%, #2f9e5a 54% 100%); }
.bx-ava[data-who="zen"] { background: linear-gradient(180deg, #55d6c6 0 54%, #2a9d90 54% 100%); } .bx-ava[data-who="luna"] { background: linear-gradient(180deg, #d999f5 0 54%, #a55fd0 54% 100%); } .bx-ava[data-who="rex"] { background: linear-gradient(180deg, #f2d9a6 0 54%, #cfa468 54% 100%); } .bx-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`) */
.bx-ava[data-who="ace"] { background: linear-gradient(180deg, #7776dd 0 54%, #4a48d2 54% 100%); } .bx-ava[data-who="blitz"] { background: linear-gradient(180deg, #5a8be8 0 54%, #2364e0 54% 100%); } .bx-ava[data-who="brick"] { background: linear-gradient(180deg, #9d6be8 0 54%, #7c3ae0 54% 100%); } .bx-ava[data-who="flip"] { background: linear-gradient(180deg, #f4c855 0 54%, #f0b61c 54% 100%); }
.bx-ava[data-who="rebel"] { background: linear-gradient(180deg, #56bcd6 0 54%, #1da6c8 54% 100%); } .bx-ava[data-who="juno"] { background: linear-gradient(180deg, #ee7baa 0 54%, #e84f8e 54% 100%); } .bx-ava[data-who="mika"] { background: linear-gradient(180deg, #e26565 0 54%, #d93232 54% 100%); } .bx-ava[data-who="pixel"] { background: linear-gradient(180deg, #d2d6ec 0 54%, #c3c8e6 54% 100%); }
.bx-ava[data-who="sol"] { background: linear-gradient(180deg, #e2ca9d 0 54%, #d9b97c 54% 100%); } .bx-ava[data-who="ninja"] { background: linear-gradient(180deg, #e9676c 0 54%, #e2343b 54% 100%); } .bx-ava[data-who="frog"] { background: linear-gradient(180deg, #7bd16b 0 54%, #4fc23a 54% 100%); } .bx-ava[data-who="cyber"] { background: linear-gradient(180deg, #a885f8 0 54%, #8b5cf6 54% 100%); }
.bx-ava[data-who="pinkpop"] { background: linear-gradient(180deg, #f476b7 0 54%, #f0499f 54% 100%); } .bx-ava[data-who="captain"] { background: linear-gradient(180deg, #606fb6 0 54%, #2b3f9e 54% 100%); }
/* a tag: a small ink (or coloured) slanted box for a line of changing text */
.bx-tag { position: relative; isolation: isolate; display: inline-block; padding: 0.4em 0.9em 0.44em; font: 400 1em/1 var(--bx-display); letter-spacing: var(--bx-track); text-transform: uppercase; color: #fff; white-space: nowrap; }
.bx-tag::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bx-ink); border: 0.14em solid var(--bx-ink); border-radius: 0.34em; transform: skewX(var(--bx-slant)); box-shadow: 0 0.2em 0 var(--bx-ink); }

/* ---- the fight bar: each boxer's plate (icon, name, health), the clock between them in drawn digits with the round under it ---- */
.bx-ui #hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; user-select: none; color: #fff; }
.bx-ui .topbar { position: absolute; z-index: 3; left: 50%; top: var(--bx-top); transform: translateX(-50%); display: flex; align-items: flex-start; gap: 1.5em; color: var(--bx-ink); }
.bx-ui .fighter { display: flex; align-items: center; gap: 0.9em; width: 21em; height: 5.8em; padding: 0 1.5em 0 0.8em; }
.bx-ui .fighter.cpu { flex-direction: row-reverse; padding: 0 0.8em 0 1.5em; }
.bx-plr__txt { flex: 1; min-width: 0; display: grid; gap: 0.5em; justify-items: start; } .fighter.cpu .bx-plr__txt { justify-items: end; }
.bx-ui .fighter .name { display: flex; align-items: center; gap: 0.5em; height: 1.9em; max-width: 100%; min-width: 0; } .bx-ui .fighter.cpu .name { flex-direction: row-reverse; }
.bx-ui .fighter .name .bx-type { font-size: 1.55em; max-width: 9.4em; overflow: hidden; text-overflow: ellipsis; padding: 0.14em 0.18em; margin: -0.14em -0.18em; }
.bx-ui .fighter.cpu .name .bx-type { text-align: right; }   /* a name fitted onto two lines (fitName) keeps to its plate's outer edge */
.bx-coach { position: relative; isolation: isolate; flex: none; display: flex; align-items: center; height: 1.5em; padding: 0.24em 0.5em; } .bx-coach > img { height: 100%; width: auto; }
.bx-coach::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 0.14em solid var(--bx-ink); border-radius: 0.3em; transform: skewX(var(--bx-slant)); background: linear-gradient(180deg, #4fd870 0 54%, #27ab4c 54% 100%); }
.bx-ui .fighter .bar { position: relative; width: 100%; height: 1.3em; border: 0.18em solid var(--bx-ink); border-radius: 0.3em; background: #1c1466; transform: skewX(var(--bx-slant)); overflow: hidden; box-shadow: 0 0.14em 0 var(--bx-ink); }
.bx-ui .fighter .bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; } .bx-ui .fighter.cpu .bar i { left: auto; right: 0; }
.bx-ui .fighter .bar .chip { background: #fff; transition: width 0.5s ease 0.25s; transform: scaleX(0.994); transform-origin: 0 50%; } .bx-ui .fighter.cpu .bar .chip { transform-origin: 100% 50%; }
.bx-ui .fighter .bar .fill { background: linear-gradient(180deg, var(--bx-gold) 0 54%, var(--bx-gold-lo) 54% 100%); border-right: 0.16em solid var(--bx-ink); transition: width 0.12s ease; }
.bx-ui .fighter.cpu .bar .fill { border-right: 0; border-left: 0.16em solid var(--bx-ink); }
.bx-ui .clock { display: flex; align-items: center; justify-content: center; min-width: 11.4em; height: 5.8em; padding: 0 1.4em; }
.bx-ui .clock .time { display: flex; align-items: center; justify-content: center; height: 3.7em; font: 400 1em/1 var(--bx-display); }
.bx-ui .clock .time > img { height: 100%; width: auto; margin: 0 -0.3em; }
.bx-ui .clock .time[data-training] > img { height: 46%; margin: 0; }
.bx-colon { flex: none; display: grid; gap: 0.6em; margin: 0 0.5em 0 0.6em; text-decoration: none; }
.bx-colon::before, .bx-colon::after { content: ""; width: 0.78em; height: 0.74em; border: 0.17em solid var(--bx-ink); border-radius: 0.18em; background: #fff; transform: skewX(var(--bx-slant)); box-shadow: 0 0.13em 0 var(--bx-ink); }
.bx-comma { flex: none; align-self: flex-end; width: 0.24em; height: 0.42em; margin: 0 0.02em 0.02em 0.03em; border: 0.055em solid var(--bx-ink); border-radius: 0.06em; background: #fff; transform: skewX(-22deg); box-shadow: 0 0.04em 0 var(--bx-ink); text-decoration: none; }
.bx-ui .clock:has(.time.low) { --top: #ff6f9c; --bot: #ea3a72; } .bx-ui .clock .time.low { animation: bx-low 1s ease-in-out infinite; }
@keyframes bx-low { 50% { transform: scale(1.1); } }
.bx-ui .clock .round { position: absolute; left: 50%; bottom: -1.75em; transform: translateX(-50%); isolation: isolate; width: max-content; display: flex; align-items: center; height: 2.1em; padding: 0.38em 0.9em 0.42em; white-space: nowrap; font: 400 1em/1 var(--bx-display); color: #fff; }
.bx-ui .clock .round::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bx-ink); border-radius: 0.3em; transform: skewX(var(--bx-slant)); }
.bx-ui .clock .round .bx-art { gap: 0.36em; }

/* top left: the score in drawn digits; under it, the run of hits */
.bx-ui .score { position: absolute; z-index: 3; left: var(--bx-left); top: var(--bx-top); display: flex; align-items: center; justify-content: center; min-width: 9.4em; height: 4.6em; padding: 0 1.2em; margin-left: 0.5em; }
.bx-ui .score b { display: flex; align-items: center; height: 2.7em; font: 400 2.7em/1 var(--bx-display); font-size: 1em; } .bx-ui .score b > img { height: 100%; width: auto; margin: 0 -0.24em; }
.bx-ui .score b > .bx-comma { font-size: 2.7em; margin-left: 0.07em; margin-right: 0.07em; }
.bx-ui .score > span { position: absolute; left: 50%; bottom: -1.5em; transform: translateX(-50%); isolation: isolate; width: max-content; display: flex; align-items: center; height: 1.9em; padding: 0.36em 0.8em 0.4em; font: 400 1em/1 var(--bx-display); color: #fff; }
.bx-ui .score > span::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bx-ink); border-radius: 0.3em; transform: skewX(var(--bx-slant)); }
.bx-ui .combo { position: absolute; z-index: 2; left: calc(var(--bx-left) + 0.6em); top: calc(var(--bx-top) + 8.2em); display: flex; align-items: flex-end; gap: 0.5em; opacity: 0; transform: rotate(-4deg) scale(0.6); transform-origin: 0 50%; transition: transform 0.18s cubic-bezier(0.2, 1.6, 0.4, 1), opacity 0.14s; filter: drop-shadow(0 0.2em 0 rgba(25, 18, 67, 0.28)); }
.bx-ui .combo.show { opacity: 1; transform: rotate(-4deg) scale(1); }
.bx-ui .combo b { display: flex; height: 4.4em; font: 400 1em/1 var(--bx-display); } .bx-ui .combo b > img { height: 100%; width: auto; margin: 0 -0.32em; }
.bx-ui .combo > span { display: flex; height: 2em; margin-bottom: 0.45em; font: 400 1em/1 var(--bx-display); }
.bx-ui .combo.bump b { animation: bx-bump 0.22s cubic-bezier(0.2, 1.6, 0.4, 1); } @keyframes bx-bump { from { transform: scale(1.35); } }

/* top right: the one menu button (Home's own) */
.bx-menu { position: absolute; z-index: 4; right: var(--bx-right); top: var(--bx-top); width: 4.6em; height: 4.6em; display: grid; place-items: center; align-content: center; gap: 0.5em; padding: 0; }
.bx-menu i { display: block; width: 2.6em; height: 0.62em; border-radius: 0.2em; background: #fff; border: 0.16em solid var(--bx-ink); transform: skewX(var(--bx-slant)); box-shadow: 0 0.12em 0 var(--bx-ink); }
.bx-ui body:not(.bx-live) .bx-menu { display: none; }   /* the menu belongs to the fight: not on the camera step, which has its own Back */

/* ---- the big moments (ROUND 1, FIGHT!, KNOCKOUT!, the count): one banner under the fight bar, clear of both boxers ---- */
.bx-ui .banner, .bx-ui .count, .bx-ui .callout[data-spot="top"] { position: absolute; z-index: 2; left: 50%; top: calc(var(--bx-top) + 9em); display: flex; flex-direction: column; align-items: center; gap: 0.7em; text-align: center; pointer-events: none; opacity: 0; transform: translateX(-50%) rotate(-3deg) scale(0.6); transform-origin: 50% 0; transition: transform 0.2s cubic-bezier(0.2, 1.6, 0.4, 1), opacity 0.16s; }
.bx-ui .banner.show, .bx-ui .callout[data-spot="top"].show { opacity: 1; transform: translateX(-50%) rotate(-3deg) scale(1); }
.bx-banner__art, .bx-ui .callout[data-spot="top"] .bx-call__art { display: flex; align-items: center; justify-content: center; gap: 0.9em; height: max(5em, 44px); max-width: 92vw; filter: drop-shadow(0 0.3em 0 rgba(25, 18, 67, 0.3)); }
.bx-banner__art > img, .bx-ui .callout[data-spot="top"] .bx-call__art > img { height: 100%; width: auto; min-width: 0; object-fit: contain; }
.bx-banner__art > .bx-digit { height: 112%; margin-left: -0.5em; } .bx-banner__art > .bx-digit + .bx-digit { margin-left: -1.6em; }
.bx-ui .callout[data-spot="top"] .bx-call__art { height: max(2.9em, 28px); }   /* every call-out is one size, in every Motions game */
.bx-ui .banner > b, .bx-ui .callout > b { font: 400 max(3em, 26px)/1 var(--bx-display); letter-spacing: var(--bx-track); text-transform: uppercase; color: #fff; -webkit-text-stroke: 0.2em var(--bx-ink); paint-order: stroke fill; text-shadow: 0 0.1em 0 var(--bx-ink); transform: skewX(var(--bx-slant)); white-space: nowrap; }
.bx-ui .banner[data-k="gold"] > b, .bx-ui .callout[data-k="gold"] > b { color: var(--bx-gold); }
.bx-ui .banner[data-art] > b, .bx-ui .callout[data-art] > b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.bx-ui .banner > span, .bx-ui .callout > span { position: relative; isolation: isolate; padding: 0.4em 0.9em 0.44em; font: 400 max(1.15em, 11px)/1 var(--bx-display); letter-spacing: var(--bx-track); text-transform: uppercase; color: #fff; white-space: nowrap; }
.bx-ui .banner > span::before, .bx-ui .callout > span::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bx-ink); border: 0.14em solid var(--bx-ink); border-radius: 0.34em; transform: skewX(var(--bx-slant)); box-shadow: 0 0.2em 0 var(--bx-ink); }
.bx-ui .banner > span:empty, .bx-ui .callout > span:empty, .bx-ui .callout[data-spot="top"][data-about="top"] > span { display: none; }   /* KNOCKDOWN! says it: no line under it */
/* a whole sentence under the banner (Story: the coach's tip under ROUND 1): Kanit on a white card, as Home's pop-ups */
.bx-ui .banner > span[data-long] { max-width: min(34em, 88vw); padding: 0.7em 1.2em 0.78em; font: 600 max(1.45em, 13px)/1.22 var(--bx-text); letter-spacing: -0.02em; text-transform: none; white-space: normal; text-wrap: balance; color: var(--bx-ink); }
.bx-ui .banner > span[data-long]::before { background: #fff; transform: none; border-width: 0.16em; border-radius: 0.5em; box-shadow: 0 0.3em 0 var(--bx-ink); }
.bx-ui .count { gap: 0; height: max(8em, 70px); flex-direction: row; justify-content: center; transform: translateX(-50%); filter: drop-shadow(0 0.4em 0 rgba(25, 18, 67, 0.3)); }
.bx-ui .count > img { height: 100%; width: auto; margin: 0 -0.7em; }
.bx-ui .count.show { animation: bx-count 0.7s ease-out forwards; }
.bx-ui body.counting .banner:not(.show), .bx-ui body.counting .callout[data-spot="top"]:not(.show) { transition: none; }   /* the count takes the banner's place at once */
@keyframes bx-count { 0% { opacity: 0; transform: translateX(-50%) scale(1.8); } 18% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 1; transform: translateX(-50%) scale(0.94); } }

/* ---- call-outs: small, beside the boxer they are about, never over a face or a glove. main.mjs places them each frame
   (boxing-ui.mjs placeBeside) from where the two boxers are on screen. ---- */
.bx-ui .callout { position: absolute; z-index: 2; left: 50%; top: 40%; display: flex; flex-direction: column; align-items: center; gap: 0.35em; text-align: center; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) rotate(-3deg) scale(0.6); transform-origin: 50% 50%; transition: transform 0.16s cubic-bezier(0.2, 1.6, 0.4, 1), opacity 0.14s; }
.bx-ui .callout.show { opacity: 1; transform: translate(-50%, -50%) rotate(-3deg) scale(1); }
.bx-ui .callout[data-side="-1"] { transform: translate(-50%, -50%) rotate(3deg) scale(0.6); } .bx-ui .callout[data-side="-1"].show { transform: translate(-50%, -50%) rotate(3deg) scale(1); }
.bx-call__art { display: flex; align-items: center; justify-content: center; gap: 0.5em; filter: drop-shadow(0 0.2em 0 rgba(25, 18, 67, 0.28)); }
/* beside a boxer every word is the same modest size: a long one (PERFECT DODGE, GUARD BROKEN) is scaled down to a punch's width */
.bx-ui .callout[data-spot="side"] .bx-call__art > img { height: auto; width: auto; max-height: max(2.9em, 28px); max-width: min(44vw, max(15em, 150px)); }
.bx-ui .callout[data-spot="side"][data-k="quiet"] .bx-call__art > img { max-height: max(2.3em, 23px); max-width: min(38vw, max(12.5em, 126px)); }
.bx-ui .callout[data-spot="side"] > b { font-size: max(2em, 20px); }
.bx-ui .callout[data-spot="side"] > span { font-size: max(0.92em, 9.5px); }
.bx-call__under { display: flex; align-items: center; justify-content: center; gap: 0.4em; height: max(1.7em, 17px); filter: drop-shadow(0 0.15em 0 rgba(25, 18, 67, 0.28)); } .bx-call__under:empty { display: none; }
.bx-call__under > img { height: 100%; width: auto; } .bx-call__under > .bx-digit { height: 128%; } .bx-call__under > .bx-digit + .bx-digit { margin-left: -0.5em; }
.bx-ui .callout[data-subart] > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.bx-ui .callout[data-k="gold"] > span { color: var(--bx-ink); } .bx-ui .callout[data-k="gold"] > span::before { background: linear-gradient(180deg, var(--bx-gold) 0 54%, var(--bx-gold-lo) 54% 100%); }
.bx-ui .callout[data-k="bad"] > span { -webkit-text-stroke: 0.2em var(--bx-ink); paint-order: stroke fill; } .bx-ui .callout[data-k="bad"] > span::before { background: linear-gradient(180deg, #ff6f9c 0 54%, #ea3a72 54% 100%); }
.bx-ui .callout[data-k="ok"] > span { -webkit-text-stroke: 0.2em var(--bx-ink); paint-order: stroke fill; } .bx-ui .callout[data-k="ok"] > span::before { background: linear-gradient(180deg, #4fd870 0 54%, #27ab4c 54% 100%); }
@media (max-aspect-ratio: 1/1) { .bx-ui .banner, .bx-ui .count, .bx-ui .callout[data-spot="top"] { top: calc(var(--bx-top) + 15.4em); } }

/* ---- the corner: the coach's cue, low in the middle: a green box, the kicker on its tab, the cue in drawn lettering ---- */
.bx-ui .corner { position: absolute; z-index: 2; left: 50%; bottom: max(2.4em, calc(env(safe-area-inset-bottom) + 1.6em)); transform: translate(-50%, 1.2em); display: flex; flex-direction: column; align-items: center; gap: 0.5em; min-width: 20em; max-width: calc(100% - 4em); padding: 1.5em 2.2em 1.1em; opacity: 0; pointer-events: none; transition: transform 0.22s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.2s ease-out; }
.bx-ui .corner.show { opacity: 1; transform: translate(-50%, 0); }
.bx-ui .corner.show ~ .keys, .bx-ui .corner.show ~ .status { visibility: hidden; }
.bx-ui .corner .kicker { position: absolute; left: 1.4em; top: -1.05em; isolation: isolate; display: flex; align-items: center; height: 2.1em; padding: 0.4em 0.9em 0.44em; font: 400 1em/1 var(--bx-display); color: #fff; white-space: nowrap; }
.bx-ui .corner .kicker::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bx-ink); border-radius: 0.3em; transform: skewX(var(--bx-slant)); }
.bx-ui .corner .kicker .bx-type { font-size: 1.05em; -webkit-text-stroke: 0; text-shadow: none; transform: none; }
.bx-ui .corner .line { display: flex; flex-direction: column; align-items: center; gap: 0.4em; min-width: 0; max-width: 100%; }
.bx-ui .corner .line b { display: flex; align-items: center; justify-content: center; height: 2.7em; max-width: 100%; font: 400 1em/1 var(--bx-display); } .bx-ui .corner .line b .bx-type { font-size: 2em; white-space: normal; text-align: center; }
.bx-ui .corner .line i { font: 600 1.45em/1.15 var(--bx-text); font-style: normal; color: #fff; text-shadow: 0 0.08em 0 var(--bx-ink); text-align: center; } .bx-ui .corner .line i:empty { display: none; }

/* ---- the keys (keyboard play): slanted white key caps, their move in white display type ---- */
.bx-ui .keys { position: absolute; z-index: 1; left: 50%; bottom: max(1.7em, calc(env(safe-area-inset-bottom) + 1em)); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9em 1.5em; width: max-content; max-width: min(74em, calc(100% - 3em)); }
.bx-ui .keys span { display: flex; align-items: center; gap: 0.42em; font: 400 1.05em/1 var(--bx-display); letter-spacing: var(--bx-track); text-transform: uppercase; color: #fff; -webkit-text-stroke: 0.24em var(--bx-ink); paint-order: stroke fill; white-space: nowrap; }
.bx-ui .keys b { font-weight: 400; color: var(--bx-gold); margin-right: 0.2em; }
.bx-ui .keys kbd { position: relative; isolation: isolate; display: grid; place-items: center; min-width: 2.05em; height: 2.05em; padding: 0 0.55em; margin: 0 0.12em 0 0; font: 400 0.95em/1 var(--bx-display); letter-spacing: var(--bx-track); color: var(--bx-ink); -webkit-text-stroke: 0; background: none; border-radius: 0; }
.bx-ui .keys kbd::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 0.17em solid var(--bx-ink); border-radius: 0.36em; transform: skewX(var(--bx-slant)); background: linear-gradient(180deg, #fff 0 54%, #d3d9ee 54% 100%); box-shadow: 0 0.2em 0 var(--bx-ink); }
.bx-ui .keys kbd + kbd { margin-left: 0.14em; }
.bx-ui body.cam .keys, .bx-ui body.counting .keys, .bx-ui .keys[hidden] { display: none; }
.bx-ui body:not(.bx-live) :is(.keys, .score, .combo, .topbar) { visibility: hidden; }
.bx-ui:not(.bx-dev) .keys .dev { display: none; }   /* developer keys (the camera toggle, the animation studio) */
@media (max-width: 640px), (max-height: 420px) { .bx-ui .keys { display: none; } }
/* the status line is a developer's (round 1 · break · camera off): never for players */
.bx-ui .status { position: absolute; left: 50%; bottom: 0.3em; transform: translateX(-50%); font: 600 10px/1 system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; } .bx-ui:not(.bx-dev) .status { display: none; }

/* ---- two players on one screen: the divider and each half's tag ---- */
.bx-ui #split { position: fixed; inset: 0; z-index: 2; pointer-events: none; display: none; } .bx-ui body.versus #split { display: block; }
.bx-ui #split i { position: absolute; top: calc(var(--bx-top) + 6.3em); bottom: 0; left: 50%; width: 1em; margin-left: -0.5em; background: #fff; border: solid var(--bx-ink); border-width: 0 0.3em; box-shadow: none; }
.bx-ui #split b { position: absolute; bottom: max(1.8em, env(safe-area-inset-bottom)); isolation: isolate; display: flex; align-items: center; height: 3.1em; padding: 0.62em 1.2em 0.7em; border-radius: 0; background: none; font: 400 1em/1 var(--bx-display); color: #fff; }
.bx-ui #split b::before { content: ""; position: absolute; inset: 0; z-index: -1; border: var(--bx-line) solid var(--bx-ink); border-radius: 0.45em; transform: skewX(var(--bx-slant)); background: linear-gradient(180deg, color-mix(in srgb, var(--p1) 52%, #ff5f58) 0 54%, var(--p1) 54% 100%); box-shadow: 0 0.3em 0 var(--bx-ink); }
.bx-ui #split .p1 { left: var(--bx-left); margin-left: 0.4em; } .bx-ui #split .p2 { right: var(--bx-right); left: auto; } .bx-ui #split .p2::before { background: linear-gradient(180deg, color-mix(in srgb, var(--p2) 52%, #58baff) 0 54%, var(--p2) 54% 100%); }
.bx-ui body.versus .score, .bx-ui body.versus .combo { display: none; }
.bx-ui body.versus:not(.cam) #split b { bottom: max(5.6em, calc(env(safe-area-inset-bottom) + 4.6em)); }   /* keyboard play: above the keys */

/* ---- sheets: the dim and the side panel (the menu) ---- */
.bx-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(36, 22, 120, 0.62); }
.bx-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: bx-in 220ms cubic-bezier(0.2, 0.9, 0.3, 1); }
@keyframes bx-in { from { transform: translateX(12%); opacity: 0; } }
.bx-side::before { content: ""; position: absolute; z-index: -1; top: -3%; bottom: -3%; left: 2.2em; right: -60%; background: var(--bx-sheet); border-left: 0.6em solid #fff; box-shadow: -0.5em 0 0 var(--bx-ink); transform: skewX(-4.5deg); transform-origin: 50% 100%; }
.bx-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: 1.5em; } .bx-head .bx-word { height: 3.3em; }
.bx-x { flex: none; width: 3.4em; height: 3.4em; padding: 0; display: grid; place-items: center; cursor: pointer; border-radius: 0.45em; border: var(--bx-line) solid var(--bx-ink); transform: skewX(var(--bx-slant)); background: linear-gradient(180deg, var(--bx-red) 0 54%, var(--bx-red-lo) 54% 100%); box-shadow: 0 0.3em 0 var(--bx-ink); font-size: 1em; }
.bx-x::before { content: "✕"; font: 900 1.5em/1 Inter, system-ui, sans-serif; color: #fff; transform: skewX(8deg); }
.bx-opts { display: grid; gap: 1.25em; }
.bx-opt { display: flex; align-items: center; justify-content: space-between; gap: 1em; height: 4.7em; padding: 0 1.6em; font-size: 1em; }
.bx-opt .bx-word { height: 2.3em; max-width: 84%; }
.bx-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(--bx-ink)); }
.bx-foot { margin-top: auto; display: flex; gap: 1.4em; padding-top: 1.4em; } .bx-foot .bx-opt { flex: 1; justify-content: center; height: 5.2em; } .bx-foot .bx-opt .bx-word { height: 2.7em; max-width: 100%; } .bx-foot .bx-opt[data-c="violet"] { flex: 0 0 11em; }
/* an on / off switch (Sound): Home's settings switch */
.bx-switch { position: relative; flex: none; width: 5.4em; height: 2.9em; border: 0.2em solid var(--bx-ink); border-radius: 0.5em; background: #1c1466; transform: skewX(var(--bx-slant)); box-shadow: 0 0.24em 0 var(--bx-ink); }
.bx-switch::after { content: ""; position: absolute; left: 0.24em; top: 0.24em; width: 2.1em; height: 2.02em; border: 0.16em solid var(--bx-ink); border-radius: 0.34em; background: #a99cf0; transition: left 140ms ease-out; }
[aria-checked="true"] > .bx-switch { background: linear-gradient(180deg, var(--bx-gold) 0 54%, var(--bx-gold-lo) 54% 100%); } [aria-checked="true"] > .bx-switch::after { left: calc(100% - 2.34em); background: #fff; }
.bx-ui #motions-review-launcher { display: none !important; }   /* Report a problem is in the menu */
@media (max-aspect-ratio: 1/1) { .bx-side { padding-left: 6em; } }
@media (max-height: 480px) and (min-aspect-ratio: 1/1) { .bx-side { padding-top: 1.3em; padding-bottom: 1.3em; } .bx-head { margin-bottom: 0.9em; } .bx-head .bx-word { height: 2.8em; } .bx-opts { gap: 0.9em; } .bx-opt { height: 4.1em; } .bx-foot .bx-opt { height: 4.4em; } .bx-foot { padding-top: 0.8em; } }

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

/* ---- the game's own pop-ups (the sign-in over the results, Story's coach offer): Home's pop-up, a white card with the
   ink outline and the hard drop, its buttons slanted boxes ---- */
.bx-ui .bx-claim, .bx-ui .mrw-sheetcard.sr-coach { width: min(440px, calc(100% - 32px)); padding: 24px 24px 22px; border: 4px solid var(--bx-ink); border-radius: 12px; background: #fff; box-shadow: 0 10px 0 var(--bx-ink); color: var(--bx-ink); font: 500 16px/1.35 var(--bx-text); letter-spacing: -0.02em; }
.bx-ui .bx-claim::backdrop { background: rgba(36, 22, 120, 0.62); -webkit-backdrop-filter: none; backdrop-filter: none; } .bx-ui .mrw-sheet:has(.sr-coach) { background: rgba(36, 22, 120, 0.62); -webkit-backdrop-filter: none; backdrop-filter: none; }
.bx-ui .bx-claim h2, .bx-ui .sr-coach h2 { margin: 0 44px 10px 0; font: 400 25px/1.08 var(--bx-display); font-style: normal; letter-spacing: var(--bx-track); text-transform: uppercase; color: var(--bx-ink); text-wrap: balance; }
.bx-ui .bx-claim-sub, .bx-ui .bx-claim-ok, .bx-ui .sr-coach .mrw-intro { margin: 0 0 14px; font: 600 16px/1.3 var(--bx-text); color: #3a2f86; }
.bx-ui .bx-claim-agree, .bx-ui .bx-claim label { font: 500 14px/1.3 var(--bx-text); color: #5a4fa8; } .bx-ui .bx-claim-agree a { color: #6535e6; font-weight: 700; }
.bx-ui .bx-claim-row input { padding: 10px 12px; border: 3px solid var(--bx-ink); border-radius: 8px; background: #f1eeff; font: 600 16px var(--bx-text); color: var(--bx-ink); }
.bx-ui .bx-claim button, .bx-ui .sr-coach .mrw-btn { font: 400 15px/1 var(--bx-display); letter-spacing: var(--bx-track); text-transform: uppercase; cursor: pointer; }
.bx-ui .bx-claim-solid, .bx-ui .bx-claim-google, .bx-ui .sr-coach .mrw-btn { min-height: 46px; padding: 0 18px; border: 3px solid var(--bx-ink); border-radius: 8px; transform: skewX(var(--bx-slant)); box-shadow: 0 5px 0 var(--bx-ink); color: var(--bx-ink); background: linear-gradient(180deg, var(--bx-gold) 0 54%, var(--bx-gold-lo) 54% 100%); transition: transform 110ms ease-out, box-shadow 110ms; }
.bx-ui .bx-claim-google, .bx-ui .sr-coach .sr-no { background: linear-gradient(180deg, #fff 0 54%, #d3d9ee 54% 100%); } .bx-ui .bx-claim-google { width: calc(100% - 8px); margin: 0 4px; }
.bx-ui :is(.bx-claim-solid, .bx-claim-google, .sr-coach .mrw-btn):active { transform: skewX(var(--bx-slant)) translateY(4px); box-shadow: 0 1px 0 var(--bx-ink); }
.bx-ui .bx-claim-row { gap: 12px; align-items: center; padding-right: 4px; }
.bx-ui .bx-claim-link { margin-top: 10px; padding: 0; border: 0; background: none; font: 600 14px var(--bx-text) !important; letter-spacing: -0.02em; text-transform: none; color: #6535e6; text-decoration: underline; }
.bx-ui .bx-claim-err { color: #e02650; font: 600 14px/1.3 var(--bx-text); }
.bx-ui .bx-claim-x { top: 14px; right: 16px; width: 38px; height: 38px; display: grid; place-items: center; border: 3px solid var(--bx-ink); border-radius: 8px; transform: skewX(var(--bx-slant)); background: linear-gradient(180deg, var(--bx-red) 0 54%, var(--bx-red-lo) 54% 100%); box-shadow: 0 4px 0 var(--bx-ink); color: #fff; font: 900 20px/1 Inter, system-ui, sans-serif !important; }
.bx-ui .sr-coach .sr-coachrow { gap: 14px; margin-top: 14px; padding: 0 6px 6px 0; } .bx-ui .sr-coach .mrw-orb { display: none; } .bx-ui .sr-coach .mrw-btn { gap: 0; }

/* ---- the camera in a fight: you, small, in the bottom-left corner (the near boxer stands right of the middle) ---- */
.bx-ui .campanel { position: fixed; z-index: 4; left: max(2.6em, env(safe-area-inset-left)); right: auto; bottom: max(2.2em, env(safe-area-inset-bottom)); width: 17em; overflow: visible; border: 0; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; pointer-events: auto; transition: width 0.2s ease-out; }
.bx-cam__view { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 0.6em; border: 0.26em solid var(--bx-ink); outline: 0.3em solid #fff; outline-offset: -0.5em; transform: skewX(var(--bx-slant)); box-shadow: 0 var(--bx-drop) 0 var(--bx-ink); background: #27306a; }
.bx-ui .bx-cam__view canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transform: skewX(8deg) scale(1.2); background: none; }
.bx-cam__you { position: absolute; right: -0.6em; top: -1em; isolation: isolate; display: flex; align-items: center; height: 2.1em; padding: 0.4em 0.8em 0.46em; font: 400 1em/1 var(--bx-display); }
.bx-cam__you::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 0.16em solid var(--bx-ink); border-radius: 0.34em; transform: skewX(var(--bx-slant)); background: linear-gradient(180deg, color-mix(in srgb, var(--p1) 52%, #ff5f58) 0 54%, var(--p1) 54% 100%); box-shadow: 0 0.2em 0 var(--bx-ink); }
.bx-ui body.held .campanel { width: min(30em, calc(100vw - 5em)); }
.bx-ui body.versus .campanel { left: 50%; right: auto; transform: translateX(-50%); bottom: max(1.6em, env(safe-area-inset-bottom)); width: min(17em, 30vw); } .bx-ui body.versus .bx-cam__you { display: none; }
/* what the camera needs from the player (step into frame, show your arms): a pink tag under the picture. Everything else on
   these lines is a developer's (the recognised punch, the frame rate, the 1:1 mirror, hide, stop). */
.bx-ui .camstatus { display: block; padding: 0; } .bx-ui .camrow { display: none; } .bx-ui .camstatus span, .bx-ui .campanel pre { display: none; }
.bx-ui .camstatus b { display: none; position: relative; isolation: isolate; width: max-content; max-width: 100%; margin: 0.9em auto 0; padding: 0.42em 0.9em 0.46em; font: 400 1.05em/1 var(--bx-display); letter-spacing: var(--bx-track); color: #fff; -webkit-text-stroke: 0.2em var(--bx-ink); paint-order: stroke fill; white-space: nowrap; }
.bx-ui .camstatus b.bad { display: block; } .bx-ui .camstatus b::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 0.14em solid var(--bx-ink); border-radius: 0.34em; transform: skewX(var(--bx-slant)); background: linear-gradient(180deg, #ff6f9c 0 54%, #ea3a72 54% 100%); box-shadow: 0 0.2em 0 var(--bx-ink); }
.bx-dev .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; }
.bx-dev .camstatus b, .bx-dev .camstatus b.bad { display: block; margin: 0; padding: 0; font: 700 11px/1.3 system-ui, sans-serif; letter-spacing: 0.1em; -webkit-text-stroke: 0; } .bx-dev .camstatus b::before { display: none; } .bx-dev .camstatus b.ready { color: var(--bx-gold); } .bx-dev .camstatus b.bad { color: #ff8fb0; }
.bx-dev .camstatus span { display: block; opacity: 0.8; } .bx-dev .campanel pre:not([hidden]) { display: block; }
.bx-dev .camrow { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; padding: 0; }
.bx-dev .camrow 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; } .bx-dev .camrow button.on { background: var(--bx-gold); color: var(--bx-ink); }
.bx-dev .campanel.mini .bx-cam__view { display: none; }
@media (max-aspect-ratio: 1/1) { .bx-ui .campanel { width: 13em; left: 1.6em; bottom: 1.8em; } }

/* ---- the camera step before the fight: the camera large with your outline in it, one drawn instruction beside it ---- */
.bx-ui .setup { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; padding: 3em 5em 3em 6em; background: rgba(36, 22, 120, 0.62); -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; }
.bx-ui .setup-card { width: 100%; max-width: 104em; max-height: 100%; overflow: visible; padding: 0; border: 0; border-radius: 0; background: none; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: center; gap: 4em; text-align: left; }
.bx-ui .setup-view { --ar: 1.7778; position: relative; justify-self: center; width: min(100%, calc((100dvh - 8em) * var(--ar))); aspect-ratio: var(--ar); margin: 0; overflow: hidden; border-radius: 0.9em; border: 0.34em solid var(--bx-ink); outline: 0.5em solid #fff; outline-offset: -0.8em; box-shadow: 0 0.8em 0 var(--bx-ink); background: #27306a; container-type: inline-size; }
.bx-ui .setup-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bx-ui .setup-side { display: grid; justify-items: start; gap: 1.6em; min-width: 0; }
.bx-ui .setup-head { display: grid; justify-items: start; gap: 1.1em; min-width: 0; max-width: 100%; }
.bx-ui .setup-head .eyebrow { position: relative; isolation: isolate; padding: 0.42em 0.9em 0.46em; font: 400 1.05em/1 var(--bx-display); letter-spacing: var(--bx-track); text-transform: uppercase; color: #fff; opacity: 1; white-space: nowrap; }
.bx-ui .setup-head .eyebrow::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bx-ink); border-radius: 0.34em; transform: skewX(var(--bx-slant)); }
.bx-ui .setup-head h2 { margin: 0; display: flex; align-items: center; height: 4.6em; max-width: 100%; font: 400 1em/1 var(--bx-display); color: #fff; text-shadow: none; }
.bx-ui .setup-head h2:not([data-art]) { height: auto; } .bx-ui .setup-head h2 .bx-type { font-size: 2.5em; white-space: normal; line-height: 1.1; }
.bx-ui .setup-head p { margin: 0; max-width: 17em; font: 600 2em/1.16 var(--bx-text); color: #fff; opacity: 1; text-shadow: 0 0.09em 0 var(--bx-ink); }
.bx-ui .setup .start-row { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 1.3em; margin: 0; }
.bx-ui .setup .start-row button { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; height: 4.8em; padding: 0 1.7em; border: 0; border-radius: 0; background: none; font: 400 1em/1 var(--bx-display); color: #fff; cursor: pointer; transition: transform 110ms ease-out; }
.bx-ui .setup .start-row button::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 0.5em; border: var(--bx-line) solid var(--bx-ink); transform: skewX(var(--bx-slant)); background: linear-gradient(180deg, #3fb0ff 0 54%, #1f84ea 54% 100%); box-shadow: 0 var(--bx-drop) 0 var(--bx-ink); }
.bx-ui .setup #setupBack::before { background: linear-gradient(180deg, #8a5cff 0 54%, #6535e6 54% 100%); } .bx-ui .setup #setupRetry::before { background: linear-gradient(180deg, var(--bx-gold) 0 54%, var(--bx-gold-lo) 54% 100%); }
.bx-ui .setup .start-row button:hover { transform: translateY(-0.14em); } .bx-ui .setup .start-row button:active { transform: translateY(0.26em); } .bx-ui .setup .start-row button:active::before { box-shadow: 0 0.1em 0 var(--bx-ink); }
.bx-ui .setup .start-row button .bx-art { height: 2.3em; } .bx-ui .setup .start-row button .bx-type { font-size: 1.5em; }
.bx-ui .setup .small { margin: 0; font: 500 1.25em/1.3 var(--bx-text); color: #cfc8ff; opacity: 1; }
/* each player's outline tag: who (P1 / P2, two players only) and what to do next */
.bx-ui .sil-tag { position: absolute; bottom: 5%; left: 50%; transform: translateX(-50%); isolation: isolate; display: flex; align-items: center; gap: 0.6em; padding: 0.5em 1em 0.56em; border-radius: 0; background: none; white-space: nowrap; font: 400 clamp(11px, 2.3cqw, 21px)/1 var(--bx-display); letter-spacing: var(--bx-track); text-transform: uppercase; color: var(--bx-ink); }
.bx-ui .sil-tag::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 0.16em solid var(--bx-ink); border-radius: 0.36em; transform: skewX(var(--bx-slant)); background: linear-gradient(180deg, var(--bx-gold) 0 54%, var(--bx-gold-lo) 54% 100%); box-shadow: 0 0.22em 0 var(--bx-ink); }
.bx-ui .sil-tag b { font-weight: 400; letter-spacing: var(--bx-track); color: #fff; -webkit-text-stroke: 0.22em var(--bx-ink); paint-order: stroke fill; } .bx-ui .sil-tag[data-slot="1"] b { color: #fff; }
.bx-ui .setup-view[data-players="2"] .sil-tag { font-size: clamp(8px, 2cqw, 19px); white-space: normal; text-align: center; line-height: 1.05; max-width: 44cqw; }
.bx-ui .sil-tag.ready span { color: var(--bx-ink); } .bx-ui .sil-tag.ready::before { background: linear-gradient(180deg, #4fd870 0 54%, #27ab4c 54% 100%); }
.bx-ui .sil-arrow { color: var(--bx-gold); text-shadow: none; -webkit-text-stroke: 0.14em var(--bx-ink); paint-order: stroke fill; font-family: var(--bx-display); }
.bx-ui .setup-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 2em; font: 600 clamp(14px, 3cqw, 28px)/1.2 var(--bx-text); background: rgba(36, 22, 120, 0.82); text-align: center; text-wrap: balance; color: #fff; }
.bx-ui .setup-msg.bad { color: #ffb3c8; }
@media (max-aspect-ratio: 1/1) {
  .bx-ui .setup { padding: 3em 2.6em; } .bx-ui .setup-card { grid-template-columns: 1fr; gap: 3em; } .bx-ui .setup-side, .bx-ui .setup-head { justify-items: center; text-align: center; } .bx-ui .setup .start-row { justify-content: center; }
  .bx-ui .setup-view { width: min(100%, calc((100dvh - 44em) * var(--ar))); } .bx-ui .setup-head h2 { height: 3.6em; }
}
@media (max-height: 480px) and (min-aspect-ratio: 1/1) { .bx-ui .setup { padding: 2em 4em; } .bx-ui .setup-card { gap: 3em; } .bx-ui .setup-side { gap: 1.1em; } .bx-ui .setup-head { gap: 0.8em; } .bx-ui .setup-head h2 { height: 3.7em; } .bx-ui .setup-head p { font-size: 1.7em; } .bx-ui .setup .start-row button { height: 4.2em; } }

/* ---- phones held upright: the score and the menu on the first row, the fight bar under them ---- */
@media (max-aspect-ratio: 1/1) {
  .bx-ui .topbar { top: calc(var(--bx-top) + 6.4em); gap: 0.7em; } .bx-ui #split i { top: calc(var(--bx-top) + 12em); }
  .bx-ui .fighter { width: 14.6em; height: 5em; gap: 0.55em; padding: 0 1em 0 0.55em; } .bx-ui .fighter.cpu { padding: 0 0.55em 0 1em; } .bx-ui .fighter .bx-ava { width: 3.4em; height: 3.4em; }
  .bx-ui .fighter .name { height: 1.5em; } .bx-ui .fighter .name .bx-type { font-size: 1.2em; max-width: 7.6em; } .bx-ui .fighter .bar { height: 1.15em; }
  .bx-ui .clock { min-width: 9.6em; height: 5em; padding: 0 0.9em; } .bx-ui .clock .time { height: 3em; }
  .bx-ui .combo { top: calc(var(--bx-top) + 15em); } .bx-ui .combo b { height: 3.6em; } .bx-ui .combo > span { height: 1.7em; }
}

@media (prefers-reduced-motion: reduce) { .bx-ui .callout, .bx-ui .banner, .bx-ui .corner, .bx-ui .combo, .bx-box, .bx-side, .bx-ui .clock .time.low, .bx-ui .combo.bump b { transition: none !important; animation: none !important; } .bx-ui .count.show { animation: none; opacity: 1; } }

/* ---- the ending (results/motions-results.js, layout 'hero'): the fight's bar, keys and camera step aside for it ---- */
.bx-ui body:has(> .mxr) :is(#hud, #split, #campanel) { visibility: hidden; }
