/* Bandeja player app: shared look. Same variable names as the panel's highlights and report pages. */
:root {
  --bg: #f5f5f7; --page: var(--bg); --card: #ffffff; --ink: #111216; --ink-2: #4a4c58; --muted: #6a6f80; --faint: #9197a8;
  --line: rgba(17, 18, 22, .09); --glass: rgba(245, 245, 247, .74); --chip: rgba(17, 18, 22, .06); --wash: rgba(17, 18, 22, .08);
  --chip-on: #111216; --chip-on-ink: #ffffff; --grid: #e6e5df; --axis: #c3c2b7;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 30px -12px rgba(16, 24, 40, .22);
  --accent: #0b8f61; --warn: #b97700; --bad: #c0392b;
  --z0: #0b0b0b; --z1: #6f6e69; --z2: #bdbcb5;
  --p0: #2a78d6; --p1: #eb6834; --p2: #1baf7a; --p3: #d0489f;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0b0e; --card: #15171c; --ink: #f1f2f6; --ink-2: #c3c6d2; --muted: #a0a6b8; --faint: #6c7284;
    --line: rgba(255, 255, 255, .09); --glass: rgba(10, 11, 14, .7); --chip: rgba(255, 255, 255, .08); --wash: rgba(255, 255, 255, .1);
    --chip-on: #f1f2f6; --chip-on-ink: #0a0b0e; --grid: #222428; --axis: #383b44;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 34px -14px rgba(0, 0, 0, .8);
    --accent: #2fd59a; --warn: #fab219; --bad: #ff7b6b;
    --z0: #f2f1ee; --z1: #8f8e88; --z2: #4a4a47;
    --p0: #3987e5; --p1: #d95926; --p2: #199e70; --p3: #c44fb6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0b0e; --card: #15171c; --ink: #f1f2f6; --ink-2: #c3c6d2; --muted: #a0a6b8; --faint: #6c7284;
  --line: rgba(255, 255, 255, .09); --glass: rgba(10, 11, 14, .7); --chip: rgba(255, 255, 255, .08); --wash: rgba(255, 255, 255, .1);
  --chip-on: #f1f2f6; --chip-on-ink: #0a0b0e; --grid: #222428; --axis: #383b44;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 14px 34px -14px rgba(0, 0, 0, .8);
  --accent: #2fd59a; --warn: #fab219; --bad: #ff7b6b;
  --z0: #f2f1ee; --z1: #8f8e88; --z2: #4a4a47;
  --p0: #3987e5; --p1: #d95926; --p2: #199e70; --p3: #c44fb6;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); max-width: 100%; overflow-x: hidden; }
body { font: 15px/1.6 -apple-system, "Segoe UI", Tahoma, "Vazirmatn", sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.hidden { display: none !important; }
.num, .tn { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the B, written by its pen: 48 frames of the brand film in one strip, used as a mask so it takes the text colour */
.bmark { width: 30px; height: 32px; background: var(--ink); flex: none; display: block;
  -webkit-mask: url(/static/b_sprite.png) 0 0 / 1440px 32px no-repeat; mask: url(/static/b_sprite.png) 0 0 / 1440px 32px no-repeat;
  animation: bwrite 1.6s steps(47) .3s both; }
.bmark.big { width: 60px; height: 64px; -webkit-mask-size: 2880px 64px; mask-size: 2880px 64px; animation-name: bwrite2; }
.bmark.still { animation: none; -webkit-mask-position: -1410px 0; mask-position: -1410px 0; }
@keyframes bwrite { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: -1410px 0; mask-position: -1410px 0; } }
@keyframes bwrite2 { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: -2820px 0; mask-position: -2820px 0; } }

/* header */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: var(--glass); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border-bottom: 1px solid var(--line); }
.top .logo { min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.top .t { min-width: 0; flex: 1; }
.top h1 { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--chip); font-size: 14px; font-weight: 600; white-space: nowrap; }
.pill:hover { background: var(--wash); }
.round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--chip-on); color: var(--chip-on-ink); flex: none; }
.round.soft { background: var(--chip); color: var(--ink); }
.menu-wrap { position: relative; }
.menu { position: absolute; inset-inline-end: 0; top: 50px; min-width: 210px; padding: 6px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); z-index: 40; }
.menu a, .menu button { display: flex; width: 100%; min-height: 44px; align-items: center; padding: 0 14px; border-radius: 12px; text-align: start; font-size: 15px; }
.menu a:hover, .menu button:hover { background: var(--chip); }

main { padding: clamp(16px, 3vw, 28px) max(16px, env(safe-area-inset-right)) calc(80px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); max-width: 1100px; margin: 0 auto; }
main.wide { max-width: 1560px; }
main.narrow { max-width: 560px; }
h2.sec { font-size: 20px; margin: 28px 0 10px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* cards, buttons, inputs */
.card { background: var(--card); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--chip-on); color: var(--chip-on-ink); font-weight: 650; font-size: 16px; text-align: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.soft { background: var(--chip); color: var(--ink); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.block { display: flex; width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; font-weight: 560; }
.input { width: 100%; min-height: 52px; padding: 10px 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--bg); font-size: 16px; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--wash); }
.code { text-align: center; letter-spacing: .5em; font-size: 26px; direction: ltr; font-variant-numeric: tabular-nums; }
.msg { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--chip); font-size: 14px; }
.msg.err { background: rgba(192, 57, 43, .12); color: var(--bad); }
.msg.ok { background: rgba(16, 168, 115, .13); color: var(--accent); }
.msg.warn { background: rgba(185, 119, 0, .13); color: var(--warn); }
.test-note { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; border: 1.5px dashed var(--warn); color: var(--warn); font-size: 14px; }
.test-note b { font-size: 22px; letter-spacing: .2em; color: var(--ink); display: block; direction: ltr; text-align: center; }
.link { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

.bar { height: 10px; border-radius: 5px; background: var(--wash); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--ink); transition: width .35s ease; }
.bar.indet > i { width: 35%; animation: indet 1.4s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
[dir="rtl"] .bar.indet > i { animation-direction: reverse; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }

.chipst { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 640; background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.chipst::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chipst.ready { background: rgba(16, 168, 115, .15); color: var(--accent); }
.chipst.processing, .chipst.queued { background: rgba(42, 120, 214, .15); color: var(--p0); }
.chipst.failed { background: rgba(192, 57, 43, .14); color: var(--bad); }
.chipst.ready_to_start { background: rgba(185, 119, 0, .14); color: var(--warn); }

/* home */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gcard { display: block; background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s; }
.gcard:hover { transform: translateY(-2px); }
.gcard .poster { position: relative; aspect-ratio: 16 / 9; background: #0c0d10 center / cover no-repeat; display: grid; place-items: center; }
.gcard .poster .bmark { background: rgba(255, 255, 255, .35); }
.gcard .body { padding: 12px 16px 16px; }
.gcard h3 { margin: 0 0 2px; font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard .meta { display: flex; gap: 10px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.empty { text-align: center; padding: 10vh 8px; }
.empty .bmark { margin: 0 auto; transform: scale(2); margin-bottom: 36px; }
.empty h2 { font-size: 24px; margin: 18px 0 8px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 22px; }

/* upload */
.pick { position: relative; display: grid; place-items: center; gap: 8px; text-align: center; padding: 34px 16px; border: 2px dashed var(--axis); border-radius: 22px; cursor: pointer; min-height: 160px; }
.pick:focus-within { border-color: var(--ink); }
.pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv b { font-weight: 650; }

/* game / calibration */
.stage { position: relative; border-radius: 18px; overflow: hidden; background: #000; touch-action: none; user-select: none; -webkit-user-select: none; direction: ltr; }
.stage img { display: block; width: 100%; height: auto; -webkit-user-drag: none; pointer-events: none; }
.mk { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255, 220, 0, .25); border: 2px solid #ffd400; color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 800; text-shadow: 0 0 3px #000; cursor: grab; touch-action: none; }
.mk::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ffd400; }
.mk span { position: absolute; top: -20px; }
.mk:focus-visible { outline: 3px solid #fff; }
.loupe { position: fixed; z-index: 70; width: 120px; height: 120px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); pointer-events: none; overflow: hidden; background: #000; }
.loupe canvas { width: 100%; height: 100%; display: block; }
.slider { width: 100%; height: 44px; accent-color: var(--ink); margin: 6px 0; }
.court-diagram { width: 100%; max-width: 150px; height: auto; flex: none; direction: ltr; }
.court-diagram .dpt { cursor: pointer; outline: none; }
.court-diagram .dpt:focus-visible .pt { stroke: #ffb400; stroke-width: 1.5; }
.muted.warn { color: #d98a00; font-weight: 600; }
.court-diagram .ln { fill: none; stroke: var(--ink); stroke-width: 1; }
.court-diagram .pt { fill: var(--axis); }
.court-diagram .pt.done { fill: var(--ink); }
.court-diagram .pt.now { fill: #ffb400; }
.court-diagram text { font-size: 7px; fill: var(--bg); text-anchor: middle; font-weight: 800; }
.askrow { display: flex; gap: 14px; align-items: center; }
.askrow .q { font-size: 16px; font-weight: 650; line-height: 1.45; }
.steps { display: flex; gap: 6px; margin: 4px 0 8px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--wash); }
.steps i.on { background: var(--ink); }
.steps i.now { background: #ffb400; }
.prog-big { text-align: center; padding: 24px 8px; }
.prog-big h2 { margin: 18px 0 6px; font-size: 22px; }
.sheet-back { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; background: var(--card); border-radius: 26px 26px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); }
.sheet h2 { margin: 0 0 10px; font-size: 20px; }
@media (min-width: 640px) { .sheet-back { align-items: center; } .sheet { border-radius: 26px; } }
.mem { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--line); }
.mem .ph { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.toast { position: fixed; z-index: 90; inset-inline: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 420px; padding: 12px 16px; border-radius: 16px; background: var(--ink); color: var(--bg); text-align: center; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.toast.on { opacity: 1; }

/* store */
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.pack { position: relative; text-align: center; padding: 22px 12px 16px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); border: 2px solid transparent; min-height: 44px; }
.pack[aria-pressed="true"] { border-color: var(--ink); }
.pack .cr { font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.pack .cl { color: var(--muted); font-size: 13px; }
.pack .pr { font-size: 17px; font-weight: 650; margin-top: 10px; }
.pack s { color: var(--faint); font-size: 13px; display: block; }
.pack .off { display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 999px; background: rgba(16, 168, 115, .15); color: var(--accent); font-size: 12.5px; font-weight: 650; }
.pack .best { position: absolute; top: -10px; inset-inline: 0; margin: 0 auto; width: max-content; padding: 2px 11px; border-radius: 999px; background: var(--chip-on); color: var(--chip-on-ink); font-size: 12px; font-weight: 700; }
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ledger li:last-child { border-bottom: 0; }
.ledger .d { font-size: 12.5px; color: var(--muted); }
.ledger .amt { font-weight: 700; font-size: 17px; white-space: nowrap; direction: ltr; }
.ledger .amt.pos { color: var(--accent); }
.bigbal { font-size: 46px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }

/* highlights wall (ported from the panel) */
.hero { position: relative; border-radius: 24px; overflow: hidden; background: #000; box-shadow: var(--shadow); cursor: pointer; max-height: 72vh; width: 100%; direction: ltr; }
.hero video, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.78) 100%); }
.hero .txt { position: absolute; inset-inline: clamp(16px, 3vw, 40px); bottom: clamp(14px, 3vw, 34px); color: #fff; display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; direction: inherit; }
.hero h2 { margin: 0; font-size: clamp(24px, 4.4vw, 50px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.hero .k { font-size: 12px; font-weight: 650; opacity: .85; margin-bottom: 6px; }
.hero .hstats { display: flex; gap: clamp(14px, 2.4vw, 34px); margin-inline-start: auto; }
.hero .stat b { display: block; font-size: clamp(18px, 2.4vw, 28px); font-weight: 650; line-height: 1.15; }
.hero .stat span { font-size: 12px; opacity: .8; }
.play { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.94); display: grid; place-items: center; flex: none; transition: transform .2s; }
.hero:hover .play { transform: scale(1.07); }
.players { display: flex; gap: 10px; margin: 20px 0 6px; flex-wrap: wrap; }
.pl { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 12px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); border: 1.5px solid transparent; text-align: start; }
.pl.on { border-color: var(--c); }
.pl .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--c); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12.5px; }
.pl .nm { font-weight: 620; font-size: 14px; line-height: 1.2; }
.pl .meta { color: var(--muted); font-size: 12px; }
.bar2 { display: flex; align-items: center; gap: 8px; margin: 20px 0 16px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--chip); font-size: 14px; font-weight: 560; }
.chip.on { background: var(--chip-on); color: var(--chip-on-ink); }
.chip .n { opacity: .55; margin-inline-start: 6px; font-weight: 500; }
.bar2 .count { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.wall { columns: 300px; column-gap: 16px; }
.wcard { position: relative; display: block; width: 100%; margin: 0 0 16px; padding: 0; border-radius: 20px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); break-inside: avoid; text-align: start;
  cursor: pointer; transform: translateZ(0); transition: transform .25s cubic-bezier(.2,.7,.2,1); opacity: 0; animation: rise .5s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.wcard:hover { transform: translateY(-3px) scale(1.012); }
.wcard .media { position: relative; width: 100%; background: #000; direction: ltr; }
.wcard img, .wcard video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wcard video { opacity: 0; transition: opacity .3s; }
.wcard.playing video { opacity: 1; }
.wcard .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 58%, rgba(0,0,0,.72) 100%); pointer-events: none; }
.badge { position: absolute; top: 12px; inset-inline-start: 12px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 650; color: #fff; background: rgba(20,20,24,.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); display: flex; align-items: center; gap: 6px; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, #fff); }
.dur { position: absolute; top: 12px; inset-inline-end: 12px; padding: 4px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(20,20,24,.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.cap { position: absolute; inset-inline: 14px; bottom: 12px; color: #fff; pointer-events: none; direction: ltr; text-align: left; }
.cap b { display: block; font-size: 16px; font-weight: 650; line-height: 1.25; }
.cap span { font-size: 12.5px; opacity: .8; }
.view { position: fixed; inset: 0; z-index: 85; background: rgba(0,0,0,.88); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); display: grid; grid-template-rows: auto 1fr auto auto; color: #fff; animation: fade .2s; padding-top: env(safe-area-inset-top); }
.view .vtop { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.view .vtop .t { flex: 1; min-width: 0; }
.view .vtop b { font-size: 16px; font-weight: 650; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view .vtop span { display: block; font-size: 12.5px; opacity: .7; }
.vbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: 14px; font-weight: 560; }
.view .vstage { position: relative; min-height: 0; display: grid; place-items: center; padding: 0 8px; direction: ltr; }
.view video { max-width: 100%; max-height: 100%; border-radius: 14px; background: #000; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 20px; }
.nav.l { left: 12px; } .nav.r { right: 12px; }
.view .strip { display: flex; gap: 8px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); overflow-x: auto; direction: ltr; }
.view .strip img { height: 54px; border-radius: 8px; opacity: .45; cursor: pointer; flex: none; }
.view .strip img.on { opacity: 1; }
.note { margin-top: 30px; color: var(--muted); font-size: 12.5px; max-width: 760px; }
@media (max-width: 640px) { .wall { columns: 2; column-gap: 10px; } .wcard { margin-bottom: 10px; border-radius: 14px; } .hero { border-radius: 18px; } .hero .hstats { margin-inline-start: 0; } .nav { display: none; } .cap b { font-size: 13.5px; } .badge { top: 8px; inset-inline-start: 8px; } .dur { top: 8px; inset-inline-end: 8px; } }

/* match report (ported from the panel) */
.report section { margin-top: 40px; }
.rhero { position: relative; border-radius: 26px; overflow: hidden; background: #000; color: #fff; display: grid; grid-template-columns: minmax(240px, 5fr) 7fr; align-items: center; min-height: 320px; }
.rhero .l { padding: clamp(22px, 4vw, 46px); }
.kicker { font-size: 13px; font-weight: 650; color: rgba(255,255,255,.7); display: flex; align-items: center; gap: 10px; }
.pt { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.rhero .fig { font-size: clamp(60px, 10vw, 120px); font-weight: 700; letter-spacing: -.04em; line-height: 1; margin: 16px 0 6px; direction: ltr; text-align: start; }
.rhero .figl { font-size: 17px; font-weight: 550; }
.rhero .figs { color: rgba(255,255,255,.65); font-size: 13.5px; margin-top: 4px; }
.rhero .r { padding: 22px clamp(16px, 3vw, 40px); }
.rhero svg { width: 100%; height: auto; display: block; overflow: visible; }
.rhero .cl { fill: none; stroke: #fff; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw var(--d, 1.6s) cubic-bezier(.65,0,.35,1) var(--w, .2s) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.rhero .who { opacity: 0; animation: pop .5s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.rhero .side { fill: rgba(255,255,255,.55); font-size: 4.4px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.tile { background: var(--card); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow); }
.tile .lab { color: var(--ink-2); font-size: 13px; }
.tile .val { font-size: 28px; font-weight: 650; line-height: 1.2; margin-top: 2px; }
.tile .val small { font-size: 14px; font-weight: 550; color: var(--ink-2); margin-inline-start: 4px; }
.tile .hint { color: var(--muted); font-size: 12.5px; }
.sh { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sh h2 { margin: 0; font-size: 21px; font-weight: 680; display: flex; align-items: center; gap: 12px; }
.sh p { margin: 0; color: var(--ink-2); font-size: 14px; flex-basis: 100%; max-width: 760px; }
.conf { font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--axis); color: var(--ink-2); cursor: help; white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card .ct { font-size: 15px; font-weight: 640; margin: 0 0 2px; }
.card .cs { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.report svg { direction: ltr; }
.report svg text { font-family: inherit; }
.plot { direction: ltr; overflow-x: auto; }
.ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.gl { stroke: var(--grid); stroke-width: 1; }
.bl { stroke: var(--axis); stroke-width: 1; }
.pc .ptop { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dotc { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.pc .nm { font-weight: 660; font-size: 16px; }
.pc .meta { color: var(--muted); font-size: 12.5px; }
.court { position: relative; width: 100%; aspect-ratio: 1 / 2; max-width: 190px; margin: 0 auto 14px; direction: ltr; }
.court canvas, .court svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.court .ln { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .85; }
.rows { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; font-size: 14px; }
.rows span { color: var(--ink-2); }
.rows b { font-weight: 620; }
.meter { margin-top: 14px; }
.meter .mt { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
.track { height: 6px; border-radius: 3px; background: var(--wash); overflow: hidden; direction: ltr; }
.track i { display: block; height: 100%; border-radius: 3px; background: var(--ink); }
.flag { display: flex; gap: 6px; align-items: flex-start; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.flag svg { flex: none; margin-top: 3px; color: var(--warn); }
.hb { display: grid; grid-template-columns: minmax(70px, auto) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hb .n, .zr .n { display: flex; align-items: center; gap: 7px; color: var(--ink-2); white-space: nowrap; }
.hb .n .dotc, .zr .n .dotc { width: 9px; height: 9px; }
.hb .b { height: 16px; position: relative; direction: ltr; }
.hb .b i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; min-width: 2px; }
.hb .v { font-weight: 620; }
.low { opacity: .45; }
.seg { display: flex; gap: 2px; height: 8px; direction: ltr; }
.seg i { display: block; height: 100%; border-radius: 4px; min-width: 0; }
.seg.tall { height: 30px; }
.seg.tall i { position: relative; }
.seg.tall i span { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 640; font-style: normal; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin: 0 0 14px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; }
.zr { display: grid; grid-template-columns: minmax(80px, auto) 1fr auto; gap: 12px; align-items: center; font-size: 13.5px; padding: 8px 0; }
.zr .v { color: var(--ink-2); text-align: end; }
.kvg { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; margin-top: 16px; }
.kvg div span { display: block; color: var(--ink-2); font-size: 12.5px; }
.kvg div b { font-size: 21px; font-weight: 650; }
.kvg div b small { font-size: 13px; color: var(--ink-2); font-weight: 550; margin-inline-start: 3px; }
.kvg div em { display: block; font-style: normal; color: var(--muted); font-size: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: end; padding: 9px 10px; border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; white-space: nowrap; }
th { color: var(--muted); font-weight: 560; font-size: 12px; }
th:first-child, td:first-child { text-align: start; }
tr:last-child td { border-bottom: 0; }
td .cellbar { display: inline-block; height: 8px; border-radius: 3px; background: var(--ink); vertical-align: middle; margin-inline-end: 8px; }
.scroll { overflow-x: auto; }
.notes { color: var(--ink-2); font-size: 14px; max-width: 820px; padding-inline-start: 22px; }
.notes li { margin: 6px 0; }
.notes b { color: var(--ink); font-weight: 620; }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 10px 0; min-height: 44px; }
.tip { position: fixed; z-index: 95; pointer-events: none; background: var(--ink); color: var(--bg); padding: 8px 11px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; max-width: 260px; box-shadow: 0 8px 24px rgba(0,0,0,.3); opacity: 0; transition: opacity .1s; }
.tip b { font-weight: 660; font-size: 13.5px; display: block; }
.tip span { opacity: .8; display: block; }
.foot { margin: 60px auto 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) { .rhero { grid-template-columns: 1fr; } .rhero .r { padding: 0 20px 24px; } }
@media (prefers-reduced-motion: reduce) {
  .bmark { animation: none; -webkit-mask-position: -1410px 0; mask-position: -1410px 0; } .bmark.big { -webkit-mask-position: -2820px 0; mask-position: -2820px 0; }
  .wcard { animation: none; opacity: 1; } .rhero .cl { animation: none; stroke-dashoffset: 0; } .rhero .who { animation: none; opacity: 1; } .bar.indet > i { animation: none; }
}
.court-diagram text.lab { fill: var(--muted); font-weight: 500; font-size: 7px; }
.court-diagram .net { stroke: var(--muted); stroke-dasharray: 3 2; }

/* the player's say under a video: thumbs and "slow motion here" */
.vacts { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px 0; flex-wrap: wrap; }
.vbtn.thumb { width: 48px; justify-content: center; padding: 0; }
.vbtn.thumb.on { background: #fff; color: #111; }
.vbtn.slow { background: #fff; color: #111; font-weight: 650; }
.vbtn:disabled { opacity: .5; }
.badge.mine { background: #fff; color: #111; }

/* ---- UI pass of 18 November 2026 ---- */
/* the large still mark must rest on the last frame of ITS strip (it used the small strip's offset and showed half a letter) */
.bmark.big.still { -webkit-mask-position: -2820px 0; mask-position: -2820px 0; }

/* a touch answers at once: every pressable thing dips a little */
.btn, .pill, .round, .chip, .pl, .pack, .vbtn, .gcard, .menu a, .menu button { transition: transform .12s ease, background-color .15s ease, opacity .15s ease; }
.btn:active:not(:disabled), .pill:active, .round:active, .chip:active, .pl:active, .pack:active, .vbtn:active:not(:disabled) { transform: scale(.96); }
.gcard:active { transform: scale(.985); }
.menu { transform-origin: top; animation: menuin .14s ease; }
@keyframes menuin { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.sheet { animation: sheetin .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheetin { from { transform: translateY(24px); opacity: 0; } }
main > * { animation: pagein .28s ease both; }
@keyframes pagein { from { opacity: 0; transform: translateY(6px); } }

/* header: the balance keeps its number and drops the word when space is short, so the page title is never cut */
.pill .coin { width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; opacity: .7; flex: none; }
@media (max-width: 480px) { .top { gap: 8px; } .pill { padding: 0 12px; } .pill .w { display: none; } }
@media (min-width: 481px) { .pill .coin { display: none; } }

/* upload progress: two tidy rows instead of a wrapping line */
.upstats { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin-top: 12px; font-size: 14px; color: var(--ink-2); align-items: baseline; }
.upstats .big { font-size: 17px; font-weight: 650; color: var(--ink); }
.upstats > :nth-child(even) { text-align: end; }
.upstats span:empty::before { content: "\00a0"; }

/* buttons in a row share the width on a phone */
@media (max-width: 520px) { .btn-row .btn { flex: 1 1 0; padding: 0 14px; min-width: max-content; } #b-buy { display: flex; width: 100%; } }

/* store: every pack is laid out the same way whether or not it has a discount */
.pack { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.pack .pr { white-space: nowrap; font-size: clamp(14.5px, 4.1vw, 17px); }
.pack .off { margin-top: 6px; }

/* highlights wall */
.hero .shade { background: linear-gradient(180deg, rgba(0,0,0,0) 28%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.9) 100%); }
[dir="rtl"] .hero .txt, [dir="rtl"] .cap { direction: rtl; text-align: right; }
.wcard .shade { background: linear-gradient(180deg, rgba(0,0,0,.34) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 46%, rgba(0,0,0,.8) 100%); }
.cap b, .cap span { text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.cap span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wall { transition: opacity .15s ease; }
@media (max-width: 640px) {
  .hero { min-height: 300px; }
  .hero .txt { gap: 12px 14px; } .hero .hstats { flex-basis: 100%; justify-content: space-between; }
  .wcard .media { min-height: 138px; }
  .bar2 { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; } .bar2::-webkit-scrollbar { display: none; }
  .bar2 .chip { flex: none; } .bar2 .count { display: none; }
  .players { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 4px 16px 10px; scrollbar-width: none; } .players::-webkit-scrollbar { display: none; } .pl { flex: none; }
}
/* viewer: the video never touches the buttons under it, and the film strip keeps clear of the home bar */
.view .vstage { padding: 4px 8px 8px; }
.view video { max-height: calc(100vh - 236px); max-height: calc(100dvh - 236px); }
.vacts { padding: 8px 16px 2px; }
.view .strip { scrollbar-width: none; } .view .strip::-webkit-scrollbar { display: none; }

/* report */
@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr 1fr; } .tiles .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  th, td { padding: 9px 6px; } td .cellbar { display: none; }
}
.rhero .side { font-size: 5.4px; }

/* court marking */
@media (max-width: 520px) { .court-diagram { max-width: 170px; } }
.card.hidden + .card { margin-top: 0; }
@media (max-width: 520px) { th, td { padding: 8px 4px; font-size: 12.5px; } th { font-size: 11.5px; } }
td .n { display: inline-flex; align-items: center; gap: 7px; }
@media (max-width: 520px) { td:first-child { white-space: normal; line-height: 1.35; } }

/* PWA and recording */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.btn, .round, .chip, .pill, a { touch-action: manipulation; }                       /* no double-tap zoom on controls */
input, select, textarea { font-size: max(16px, 1em); }                              /* iOS zooms into smaller fields */
html.standalone body { overscroll-behavior-y: none; -webkit-touch-callout: none; }  /* on the home screen: no rubber band, no link preview */
html.standalone .top { user-select: none; -webkit-user-select: none; }
.round.back { flex: none; }
[dir="rtl"] .round.back svg { transform: scaleX(-1); }
.a2hs { position: fixed; z-index: 70; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 460px; display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); animation: fade .3s; }
.a2hs .bmark { flex: none; } .a2hs .tx { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.a2hs .tx b { display: block; color: var(--ink); font-size: 14.5px; } .a2hs .tx span { display: block; } .a2hs .tx svg { width: 17px; height: 17px; vertical-align: -3px; }
.a2hs .round { flex: none; width: 36px; height: 36px; min-width: 36px; }

.rec-entry { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 14px 16px; border-radius: 22px; background: var(--chip); color: var(--ink); min-height: 64px; }
.rec-entry i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #e5342b; box-shadow: 0 0 0 4px var(--card), 0 0 0 6px #e5342b; margin-inline: 6px; }
.rec-entry b { display: block; font-size: 16px; font-weight: 650; } .rec-entry small { display: block; color: var(--muted); font-size: 13px; }
.rec-tips { margin: 12px 0 0; padding-inline-start: 20px; color: var(--ink-2); font-size: 14.5px; line-height: 1.7; } .rec-tips li + li { margin-top: 4px; }
html.rec-on, html.rec-on body { overflow: hidden; }
.rec { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.rec-frame { position: relative; width: 100%; height: 100%; overflow: hidden; }
.rec-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; background: #000; }
.rec-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rec-frame svg path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rec-frame svg .sh { stroke: rgba(0, 0, 0, .45); stroke-width: 5; }
.rec-frame svg .ln { stroke: rgba(255, 255, 255, .9); stroke-width: 2; }
.rec-frame svg .ln.net { stroke: #ffd400; stroke-dasharray: 8 6; }
.rec-top { position: absolute; top: 0; inset-inline: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left)); pointer-events: none; }
.rec-top > * { pointer-events: auto; }
.rec-x { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(20, 20, 24, .55); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.rec-x[aria-pressed="false"] { opacity: .55; }
.rec-time { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(20, 20, 24, .55); font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rec-time i { width: 10px; height: 10px; border-radius: 50%; background: #8a8d98; }
.rec.live .rec-time { background: rgba(229, 52, 43, .9); } .rec.live .rec-time i { background: #fff; animation: recblink 1s steps(2) infinite; }
@keyframes recblink { 50% { opacity: .2; } }
.rec-warns { position: absolute; top: calc(64px + env(safe-area-inset-top)); inset-inline: 0; display: grid; justify-items: center; gap: 6px; padding: 0 max(70px, env(safe-area-inset-right)) 0 max(70px, env(safe-area-inset-left)); pointer-events: none; }
.rec-warn { max-width: 520px; padding: 7px 14px; border-radius: 14px; background: rgba(255, 212, 0, .94); color: #15140a; font-size: 14px; font-weight: 620; text-align: center; line-height: 1.45; }
.rec-warn.bad { background: rgba(229, 52, 43, .95); color: #fff; }
.rec-note { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom)); inset-inline: 0; margin: 0 auto; width: max-content; max-width: min(62vw, 520px); padding: 7px 14px; border-radius: 14px;
  background: rgba(20, 20, 24, .6); font-size: 13.5px; text-align: center; line-height: 1.45; pointer-events: none; }
.rec-note:empty, .rec-sent:empty { display: none; }
.rec-ctl { position: absolute; display: grid; justify-items: center; gap: 10px; right: max(16px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); }
.rec-btn { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: transparent; display: grid; place-items: center; padding: 0; }
.rec-btn i { width: 56px; height: 56px; border-radius: 50%; background: #e5342b; transition: all .2s ease; }
.rec.live .rec-btn i { width: 28px; height: 28px; border-radius: 7px; }
.rec-btn:disabled { opacity: .45; }
.rec-sent { order: 2; padding: 4px 10px; border-radius: 10px; background: rgba(20, 20, 24, .6); font-size: 12px; white-space: nowrap; }
@media (orientation: portrait) {
  .rec-ctl { right: 0; left: 0; top: auto; bottom: calc(22px + env(safe-area-inset-bottom)); transform: none; }
  .rec-note { bottom: calc(132px + env(safe-area-inset-bottom)); max-width: 86vw; }
  .rec-warns { padding-inline: 16px; }
}

/* Closed beta: invite code and waitlist */
.invcode { font-size: 30px; font-weight: 700; letter-spacing: .14em; text-align: center; padding: 14px 8px; margin: 10px 0; border: 1.5px dashed var(--line); border-radius: 14px; user-select: all; -webkit-user-select: all; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0 12px; }
