/* The referee area (tournament-referee.js, approved previews 248–253). 248 and 249 have the tournament pages' light look
   (white cards, the navy card for the shift); the scorer (250–253) is the live service's dark scorer: dark navy, two big
   halves to tap (navy and optic), the score in short rows, and light sheets from the bottom. Everything here starts with
   .tr- so no other page changes. */

/* ---------- Shared ---------- */

.tr-pr { display: inline-flex; flex: none; }
.tr-pr .tp-av { box-shadow: 0 0 0 2px var(--tp-av-ring); }
.tr-pr .tp-av + .tp-av { margin-left: var(--tr-ov, -8px); }
.tr-vs { font: 600 0.8125rem/1 var(--font-score); letter-spacing: 0.06em; color: #a3adbf; text-transform: uppercase; }
.tr-etile {
  display: inline-grid;
  flex: none;
  place-items: center;
  min-height: 26px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--tp-optic-soft);
  color: var(--tp-brand-ink);
  font: 600 1rem/1 var(--font-score);
  letter-spacing: 0.01em;
}
.tour-page .tp-btn.tr-navy { background: var(--navy); color: #fff; }
.tour-page .tp-btn.tr-off, body.tr-on #tour .tp-btn:disabled { background: #dfe4ec; color: #7c879c; cursor: default; filter: none; }
.tr-cta .tp-btn .tp-num { font-size: min(1.25rem, 56px); }
/* The pill grows with the text (R-D 2: at the largest text "Trọng tài" spilled out of a 30 px pill). */
.tr-role { height: auto; min-height: 30px; padding: 4px 12px; border-radius: 15px; line-height: 1.2; text-align: center; }
.tr-flash { margin: 14px 0 0; padding: 12px 16px; border-radius: 18px; background: #fff4df; color: #8a4f00; font: 600 1rem/1.3 var(--tp-font); }
.tr-wait { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px 16px; text-align: center; color: var(--tp-ink); }
.tr-wait b { font: 600 min(1.125rem, 56px)/1.3 var(--tp-font); }
.tr-wait .tp-ic { color: var(--tp-brand-ink); }
.tr-join .tp-btn { margin-top: 2px; }

/* ---------- 248: the shift, the next match, the shift's other matches ---------- */

.tr-shift { margin-top: 14px; padding: 16px 18px; border-radius: 24px; background: var(--tp-navy-card); color: #fff; }
.tr-shift-k { display: flex; align-items: center; gap: 7px; min-height: 26px; margin: 0; font: 500 0.9375rem/1.2 var(--tp-font); color: rgba(255, 255, 255, 0.75); }
.tr-ok { display: flex; align-items: center; gap: 5px; min-height: 26px; margin-left: auto; padding: 0 10px; border-radius: 13px; background: rgba(22, 128, 77, 0.35); color: #bff0d3; font: 600 0.8125rem/1 var(--tp-font); }
.tr-shift-m { display: flex; align-items: flex-end; gap: 16px; margin-top: 8px; }
.tr-court { display: flex; flex-wrap: wrap; gap: 0 14px; font: 600 min(3.75rem, 90px)/0.8333 var(--font-score); letter-spacing: 0.01em; color: var(--optic); }
/* Two courts held at once: both named, smaller, the hours under them. */
.tr-shift-m.is-many { flex-direction: column; align-items: flex-start; gap: 10px; }
.tr-shift-m.is-many .tr-court { font-size: min(2.75rem, 66px); line-height: 0.9091; }
.tr-shift-t b { display: block; font: 600 min(1.625rem, 56px)/1 var(--font-score); }
.tr-shift-t i { display: block; margin-top: 5px; font: 400 0.875rem/1 var(--tp-font); font-style: normal; color: rgba(255, 255, 255, 0.7); }
.tr-prog { display: flex; align-items: center; gap: 6px; margin-top: 16px; }
.tr-prog i { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); }
.tr-prog i.is-done { background: #2fb36f; }
.tr-prog i.is-next { background: none; box-shadow: inset 0 0 0 1.5px var(--optic); }
.tr-prog b { margin-left: 6px; font: 600 min(1.125rem, 56px)/1 var(--font-score); }
.tr-shift .tr-accept { min-height: 48px; margin-top: 14px; border-radius: 24px; }
.tr-shift.is-none { padding: 14px 18px; background: var(--tp-card); color: var(--tp-muted); }
.tr-shift.is-none .tr-shift-k { color: var(--tp-muted); font-size: 1rem; }

.tr-next { margin-top: 14px; padding: 16px; border-radius: 24px; background: var(--tp-card); }
.tr-next-top { display: flex; align-items: center; gap: 12px; }
.tr-next-top .tr-time { font: 600 min(3rem, 72px)/0.9167 var(--font-score); color: var(--tp-ink); }
/* The next match's court, as large as its time (17/11 test L9). */
.tr-ncourt { display: inline-grid; place-items: center; min-height: 48px; padding: 0 14px; border-radius: 14px; background: var(--navy); color: var(--optic); font: 600 min(2.375rem, 57px)/1 var(--font-score); letter-spacing: 0.01em; }
.tr-next-sub { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.tr-gb { display: inline-grid; flex: none; place-items: center; min-height: 26px; min-width: 26px; padding: 0 6px; border-radius: 8px; background: var(--tp-soft); color: var(--tp-label); font: 700 1rem/1 var(--font-score); }
.tr-code { margin-left: auto; font: 600 1.0625rem/1 var(--font-score); letter-spacing: 0.02em; color: var(--tp-muted); }
.tr-sd { display: flex; align-items: center; gap: 14px; min-height: 72px; }
.tr-nm { min-width: 0; font: 500 1rem/1.25 var(--tp-font); color: var(--tp-ink); }
.tr-nm b { display: block; font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
.tr-vsl { display: flex; align-items: center; gap: 10px; }
.tr-vsl::before, .tr-vsl::after { content: ''; flex: 1; height: 1px; background: var(--tp-hair); }
.tr-vsl .tr-vs { font-size: 0.9375rem; }
.tr-next .tp-btn { min-height: 56px; margin-top: 12px; border-radius: 28px; font-size: min(1.125rem, 56px); }

.tr-later { margin-top: 14px; }
.tr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin-bottom: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: 18px;
  background: var(--tp-card);
  color: var(--tp-ink);
  text-align: left;
  cursor: pointer;
}
.tr-row .tr-time { min-width: 52px; font: 600 min(1.375rem, 56px)/1 var(--font-score); color: var(--tp-ink2); }
.tr-row .tr-pr .tp-av + .tp-av { margin-left: -6px; }
.tr-chev { margin-left: auto; color: var(--tp-dim); }

/* ---------- 249: "Có mặt?" ---------- */

body.tr-nodock .dock, body.tr-nodock .dock-sheet { display: none !important; }
body.tr-nodock { padding-bottom: 0; }
.tr-nodock #tour { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.tr-clock { display: flex; align-items: center; justify-content: center; gap: 22px; height: 132px; margin-top: 14px; border-radius: 24px; background: var(--tp-card); }
.tr-rw { position: relative; width: 108px; height: 108px; }
.tr-ring { display: block; }
.tr-ring-track { stroke: var(--tp-bar); }
.tr-ring-bar { stroke: var(--tp-brand-ink); }
.tr-rv { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tr-rv b { font: 600 min(2.75rem, 66px)/1 var(--font-score); color: var(--tp-ink); }
.tr-rv small { margin-top: -4px; font: 600 1.0625rem/1 var(--font-score); color: var(--tp-muted); }
.tr-lg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 7px; max-width: 160px; font: 500 1rem/1 var(--tp-font); color: var(--tp-muted); }
.tr-lg b { flex-basis: 100%; font: 600 min(2.5rem, 60px)/1 var(--font-score); color: var(--tp-ink); }
.tr-pc { display: flex; min-height: 178px; margin-top: 14px; padding: 14px 8px; border-radius: 24px; background: var(--tp-card); }
.tr-p { position: relative; display: flex; flex: 1; flex-direction: column; align-items: center; gap: 8px; min-width: 0; padding: 0; border: 0; background: none; color: var(--tp-ink); cursor: pointer; }
.tr-ph { position: relative; }
.tr-p:not(.is-here) .tp-av { box-shadow: 0 0 0 3px var(--tp-card), 0 0 0 5px rgba(11, 33, 82, 0.25); }
.tr-badge { position: absolute; right: -4px; bottom: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--up); color: #fff; box-shadow: 0 0 0 3px var(--tp-card); }
.tr-pn { max-width: 100%; font: 500 1rem/1.25 var(--tp-font); white-space: normal; overflow-wrap: anywhere; }
.tr-st { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 14px; border-radius: 16px; font: 600 0.9375rem/1 var(--tp-font); }
.tr-p.is-here .tr-st { background: var(--up-bg); color: var(--up); }
.tr-p:not(.is-here) .tr-st { background: var(--tp-card); color: var(--tp-brand-ink); box-shadow: inset 0 0 0 2px var(--tp-brand-ink); }
.tr-vs2 { margin: 8px 0 -6px; text-align: center; }
.tr-vs2 .tr-vs { font-size: 0.9375rem; }
.tr-cta { position: fixed; z-index: 20; left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; padding: 0 16px; }
.tr-cta .tp-btn { min-height: 56px; border-radius: 28px; font-size: min(1.125rem, 56px); }
.tr-wo { display: block; width: 100%; margin-top: 14px; padding: 4px 0; border: 0; background: none; font: 500 0.9375rem/1.3 var(--tp-font); color: var(--tp-muted); text-align: center; cursor: pointer; }
.tr-wo b { font-weight: 600; color: var(--down); }
.tr-wo:disabled { cursor: default; }
/* Once the late minutes have passed: a real 48 px button with a red outline. */
.tr-wo.is-open { min-height: 48px; padding: 0 16px; border-radius: 24px; background: var(--tp-card); color: var(--down); font-weight: 600; font-size: 1.0625rem; box-shadow: inset 0 0 0 2px var(--down); }
/* "Đang bắt đầu…", "Đang chờ mạng": a small turning ring. */
.tr-spin { display: inline-block; flex: none; width: 18px; height: 18px; margin-right: 10px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -3px; animation: tr-spin 0.8s linear infinite; }
@keyframes tr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tr-spin { animation-duration: 2.4s; } }
body.tr-on #tour .tp-btn.is-busy:disabled { background: var(--optic); color: var(--navy-deep); }
.tr-wo.is-done { font-weight: 600; color: var(--tp-amber-ink); cursor: default; }

/* ---------- 250–253: the scorer, dark ---------- */

body.tr-dark { background: #051132; }
.tr-dk {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(22px + env(safe-area-inset-top)) max(16px, calc((100% - 528px) / 2)) calc(22px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: #051132;
  color: #fff;
  font-family: var(--tp-font);
  color-scheme: dark;
}
.tr-top { display: flex; flex: none; align-items: center; gap: 10px; height: 44px; }
.tr-rb, .tr-cam { display: grid; flex: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer; }
.tr-rb:disabled { opacity: 0.4; }
.tr-pill { display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 0 16px; border-radius: 22px; background: rgba(255, 255, 255, 0.08); font: 600 1rem/1 var(--tp-font); white-space: nowrap; }
.tr-pill > span { white-space: normal; overflow-wrap: anywhere; }
.tr-pill .tp-ic { color: #9aa8c4; }
.tr-setl { margin-left: auto; font: 500 1rem/1 var(--tp-font); color: #9aa8c4; white-space: nowrap; }

.tr-mini { flex: none; overflow: hidden; border-radius: 20px; background: #0c1c44; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.tr-mr { display: flex; align-items: center; min-height: 44px; padding-left: 16px; font: 400 min(1.125rem, 56px)/1 var(--tp-font); }
.tr-mr + .tr-mr { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.tr-sv { flex: none; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%; }
.tr-sv.is-on { background: var(--optic); }
.tr-mn { flex: 1; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.tr-ms { min-width: 30px; text-align: center; font: 600 min(1.25rem, 56px)/1 var(--font-score); color: #9aa8c4; }
.tr-ms.is-last { width: 66px; height: 44px; line-height: 1.6923; font-size: 26px; color: #fff; }
.tr-mr.is-won .tr-ms.is-last { background: var(--optic); color: var(--navy-deep); }
.tr-mg { min-width: 52px; text-align: center; font: 700 min(1.625rem, 56px)/1 var(--font-score); }
.tr-mp { display: grid; place-items: center; width: 66px; height: 44px; background: var(--optic); color: var(--navy-deep); font: 700 26px/1 var(--font-score); }

.tr-halves { display: flex; flex: 1; flex-direction: column; gap: 14px; min-height: 0; margin-top: 4px; }
.tr-big {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 12px;
  border: 0;
  border-radius: 28px;
  font-family: var(--tp-font);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 80ms ease-out;
}
.tr-big:active:not(:disabled) { transform: scale(0.985); }
.tr-big:disabled { cursor: default; }
.tr-big.is-a { background: #112b69; color: #fff; }
.tr-big.is-b { background: var(--optic); color: var(--navy-deep); }
.tr-big .tr-pr .tp-av { box-shadow: 0 0 0 3px #112b69; }
.tr-big.is-b .tr-pr .tp-av { box-shadow: 0 0 0 3px var(--optic); }
.tr-who { max-width: 100%; margin-top: 10px; font: 400 min(1.1875rem, 56px)/1.2 var(--tp-font); white-space: normal; overflow-wrap: anywhere; }
.tr-pt { margin: 4px 0 6px; font: 700 min(min(7rem, 168px), 13vh)/1 var(--font-score); letter-spacing: -0.01em; }
.tr-svc { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: 17px; background: rgba(255, 255, 255, 0.14); font: 400 1rem/1 var(--tp-font); }
.tr-svc i { width: 10px; height: 10px; border-radius: 50%; background: var(--optic); }
.tr-big.is-b .tr-svc { background: rgba(7, 22, 52, 0.1); }
.tr-big.is-b .tr-svc i { background: var(--navy-deep); }

.tr-bar { display: flex; flex: none; align-items: center; height: 66px; padding: 0 8px; border-radius: 33px; background: #0c1c44; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.tr-bar button { display: flex; flex: 1; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 8px; border: 0; border-radius: 25px; background: none; color: #fff; font: 600 1.0625rem/1 var(--tp-font); white-space: nowrap; cursor: pointer; }
.tr-bar button:disabled { opacity: 0.4; cursor: default; }
.tr-bar .tr-end { background: rgba(191, 58, 48, 0.28); color: #ff9a8f; }
.tr-bar .tr-end.is-finish { background: var(--optic); color: var(--navy-deep); }

.tr-lock, .tr-msg, .tr-catch { display: flex; flex: none; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-radius: 16px; font: 600 1rem/1.25 var(--tp-font); }
.tr-lock { background: rgba(191, 58, 48, 0.3); color: #ffb4ab; }
.tr-msg { background: rgba(227, 173, 46, 0.22); color: #ffd98a; }
.tr-net b { margin-left: auto; font-family: var(--font-score); font-size: min(1.25rem, 56px); }
/* Points waiting for the network on each half: "+2". */
.tr-big { position: relative; }
/* A line over the halves (offline, "Đang chờ mạng", "Bấm bù") leaves less height: the names stay whole, the points a
   little smaller (17/11 test: the names were cut in half under "Không gửi được"). */
.tr-big > * { flex-shrink: 0; }
.tr-score:has(.tr-msg, .tr-lock, .tr-catch) .tr-pt { font-size: min(min(5.75rem, 138px), 10vh); }
.tr-score:has(.tr-msg, .tr-lock, .tr-catch) .tr-big .tr-pr .tp-av { width: 52px !important; height: 52px !important; }
.tr-qd { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; min-width: 52px; min-height: 36px; padding: 0 12px; border-radius: 18px; background: #ffd98a; color: #5a3600; font: 700 min(1.5rem, 56px)/1 var(--font-score); }
.tr-catch { padding: 6px 6px 6px 14px; background: var(--optic); color: var(--navy-deep); }
.tr-catch span { flex: 1; }
.tr-x { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(7, 22, 52, 0.12); color: inherit; cursor: pointer; }

/* 250: who serves */
.tr-q { margin: 14px 0 0; text-align: center; font: 700 min(1.625rem, 56px)/1.2308 var(--tp-font); color: #fff; }
.tr-q .tp-num { font-family: inherit; }
.tr-rules { display: flex; flex: none; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tr-chip { display: inline-block; min-height: 32px; padding: 0 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.1); color: #dfe6f5; font: 500 0.9375rem/2.1333 var(--tp-font); white-space: nowrap; }
.tr-pk { display: flex; flex: 0 1 236px; align-items: center; justify-content: space-around; min-height: 0; padding: 0 10px; border-radius: 28px; }
.tr-serve .tr-pk.is-a { margin-top: 6px; background: #112b69; color: #fff; }
.tr-pk.is-b { background: var(--optic); color: var(--navy-deep); }
.tr-o { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font-family: var(--tp-font); cursor: pointer; }
.tr-o:disabled { opacity: 0.4; cursor: default; }
.tr-oph { position: relative; }
.tr-o .tp-av { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35); }
.tr-pk.is-b .tr-o .tp-av { box-shadow: 0 0 0 3px rgba(7, 22, 52, 0.18); }
.tr-o.is-on .tp-av { box-shadow: 0 0 0 4px #112b69, 0 0 0 8px var(--optic); }
.tr-pk.is-b .tr-o.is-on .tp-av { box-shadow: 0 0 0 4px var(--optic), 0 0 0 8px var(--navy-deep); }
.tr-bl { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--optic); color: var(--navy-deep); box-shadow: 0 0 0 3px #112b69; }
.tr-o b { max-width: 150px; font: 500 min(1.125rem, 56px)/1.2 var(--tp-font); white-space: normal; overflow-wrap: anywhere; }
.tr-cta2 { flex: none; margin-top: auto; }
.tr-dk .tp-btn { min-height: 56px; border-radius: 28px; font-size: min(1.125rem, 56px); }

/* "Tạm dừng" and "Xem" over the scorer */
.tr-paused { position: absolute; z-index: 80; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; background: rgba(5, 17, 50, 0.95); }
.tr-paused .tp-ic { color: #ffc65c; }
.tr-paused b { font: 700 min(1.75rem, 56px)/1.2 var(--tp-font); }
.tr-paused span { font: 400 min(1.125rem, 56px)/1.2 var(--tp-font); color: #9aa8c4; }
.tr-paused .tp-btn { max-width: 360px; margin-top: 18px; }
.tr-board { position: absolute; z-index: 95; inset: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 28px; padding: 24px; border: 0; background: #051132; color: #fff; cursor: pointer; }
.tr-bd-r { display: flex; align-items: center; gap: 14px; }
.tr-bd-n { flex: 1; min-width: 0; font: 600 min(1.625rem, 56px)/1.2 var(--tp-font); text-align: left; white-space: normal; overflow-wrap: anywhere; }
.tr-bd-r b { font: 700 min(4rem, 96px)/1 var(--font-score); }
.tr-bd-r em { min-width: 76px; font: 700 min(4rem, 96px)/1 var(--font-score); font-style: normal; color: var(--optic); text-align: right; }

/* ---------- 252, 253: sheets from the bottom ---------- */

.tr-dim { position: absolute; z-index: 85; inset: 0; background: rgba(1, 6, 23, 0.62); }
.tr-sheet {
  position: absolute;
  z-index: 90;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  max-height: calc(100% - 40px);
  margin: 0 auto;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border-radius: 30px 30px 0 0;
  background: var(--tp-bg);
  color: var(--tp-ink);
}
.tr-sheet.is-end { top: calc(58px + env(safe-area-inset-top)); max-height: none; }
.tr-hdl { flex: none; width: 40px; height: 5px; margin: 10px auto 0; border-radius: 3px; background: #c9d0db; }
.tr-sh { display: flex; flex: none; align-items: center; height: 56px; padding: 0 16px; }
.tr-sh b { flex: 1; text-align: center; font: 700 min(1.25rem, 56px)/1 var(--tp-font); }
.tr-sp { width: 44px; flex: none; }
.tr-close { border: 0; background: var(--tp-card); color: var(--tp-ink); box-shadow: 0 1px 3px rgba(7, 22, 52, 0.12); }

.tr-tg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 16px 8px; }
.tr-tile { display: flex; flex-direction: column; align-items: flex-start; height: 150px; padding: 16px; border: 0; border-radius: 22px; background: var(--tp-card); color: var(--tp-ink); text-align: left; cursor: pointer; }
.tr-ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--tp-soft); color: var(--tp-label); }
.tr-tile.is-warn .tr-ico { background: #fff4df; color: #8a4f00; }
.tr-tile b { margin-top: auto; font: 600 min(1.1875rem, 56px)/1 var(--tp-font); }
.tr-tile i { margin-top: 6px; font: 400 0.875rem/1.1 var(--tp-font); font-style: normal; color: var(--tp-muted); white-space: nowrap; }

.tr-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 16px; }
.tr-li { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--tp-card); color: var(--tp-ink); font: 600 1.0625rem/1.2 var(--tp-font); text-align: left; cursor: pointer; }
.tr-li .tp-num { font-family: var(--font-score); font-size: min(1.25rem, 56px); }
.tr-li-n { flex: 1; min-width: 0; font-weight: 400; font-size: 0.9375rem; white-space: normal; overflow-wrap: anywhere; }
.tr-switch { display: flex; align-items: center; justify-content: space-between; min-height: 54px; margin: 10px 16px 0; padding: 0 16px; border: 0; border-radius: 16px; background: var(--tp-card); color: var(--tp-ink); font: 500 1.0625rem/1 var(--tp-font); cursor: pointer; }
.tr-switch i { position: relative; width: 51px; height: 31px; border-radius: 16px; background: #d9dde5; transition: background 120ms; }
.tr-switch i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 120ms; }
.tr-switch[aria-checked="true"] i { background: #34c759; }
.tr-switch[aria-checked="true"] i::after { transform: translateX(20px); }
.tr-how { margin: 0 20px 14px; font: 400 1rem/1.35 var(--tp-font); color: var(--tp-muted); text-align: center; }
.tr-qr { width: 220px; min-height: 220px; margin: 0 auto 8px; padding: 10px; border-radius: 16px; background: #fff; }
.tr-qr svg { display: block; width: 100%; height: auto; }

/* 253 */
.tr-sc { flex: none; margin: 4px 16px 0; padding: 8px 18px; border-radius: 24px; background: var(--tp-card); }
.tr-r { display: flex; align-items: center; gap: 14px; width: 100%; height: 92px; padding: 0; border: 0; background: none; color: inherit; font-family: var(--tp-font); text-align: left; }
button.tr-r { cursor: pointer; }
.tr-r + .tr-r { border-top: 1px solid var(--tp-hair); }
.tr-r .tr-nm { flex: 1; }
.tr-g { font: 600 min(4.125rem, 99px)/1 var(--font-score); color: var(--tp-ink); }
.tr-g.is-sets { font-size: min(2.125rem, 56px); }
.tr-r.is-lo .tr-g { color: #b3bccb; }
.tr-w { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--optic); color: var(--navy-deep); }
.tr-ret { flex: none; min-height: 26px; padding: 0 10px; border-radius: 13px; background: var(--down-bg); color: var(--down); font: 600 0.8125rem/2 var(--tp-font); }
.tr-seg { display: flex; flex: none; height: 50px; margin: 14px 16px 0; padding: 3px; border-radius: 25px; background: var(--tp-seg-track); }
.tr-seg button { flex: 1; min-height: 44px; border: 0; border-radius: 22px; background: none; color: var(--tp-ink2); font: 500 1.0625rem/1 var(--tp-font); cursor: pointer; }
.tr-seg button[aria-checked="true"] { background: var(--tp-seg-on); color: var(--tp-ink); font-weight: 600; box-shadow: var(--tp-seg-shadow); }
.tr-seg button:disabled { color: var(--tp-dim); cursor: default; }
.tr-lab { margin: 22px 20px 10px; font: 600 1rem/1 var(--tp-font); color: var(--tp-muted); }
.tr-ag { display: flex; flex: none; gap: 10px; margin: 0 16px; }
.tr-ag-t { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 112px; border: 0; border-radius: 22px; background: var(--tp-card); color: var(--tp-ink); cursor: pointer; }
.tr-ag-t.is-ok { box-shadow: inset 0 0 0 2px var(--up); }
.tr-ag-t .tr-st { height: 34px; }
.tr-ag-t.is-ok .tr-st { background: var(--up-bg); color: var(--up); }
.tr-ag-t:not(.is-ok) .tr-st { color: var(--tp-brand-ink); box-shadow: inset 0 0 0 2px var(--tp-brand-ink); }
.tr-sheet .tr-lock, .tr-sheet .tr-msg { margin: 14px 16px 0; }
.tr-sheet .tr-msg { background: #fff4df; color: #8a4f00; }
.tr-go { flex: none; margin-top: auto; padding: 18px 16px 0; }
.tr-note { margin: 12px 0 0; text-align: center; font: 500 0.9375rem/1 var(--tp-font); color: var(--tp-muted); }
.tr-note b { font-weight: 600; color: var(--tp-amber-ink); }
.tr-note b.is-ok { color: var(--up); }
/* "Bên nào bỏ cuộc?": the question over the two pairs, each a big button until one is picked. */
.tr-ask { margin: 8px 20px 10px; }
.tr-ask.is-open { color: var(--down); }
.tr-sc.is-pick { padding: 8px; background: none; }
.tr-sc.is-pick .tr-r { height: 88px; padding: 0 14px; border-radius: 20px; background: var(--tp-card); box-shadow: inset 0 0 0 2px var(--tp-brand-ink); }
.tr-sc.is-pick .tr-r + .tr-r { margin-top: 10px; border-top: 0; }
/* "Đã gửi ✓" for a moment before the area comes back. */
.tr-sent { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; margin: 0; border-radius: 28px; background: var(--up-bg); color: var(--up); font: 600 min(1.1875rem, 56px)/1 var(--tp-font); }
.tr-none { margin-top: 10px; padding: 18px 16px; border-radius: 16px; background: var(--tp-card); }

/* Large text (W7): the scorer's bar wraps its buttons; two-column pickers stack. */
html.tp-tight .tr-bar { flex-wrap: wrap; height: auto; gap: 6px; padding: 8px; border-radius: 28px; }
html.tp-tight .tr-bar button { flex: 1 1 40%; white-space: normal; text-align: center; }
html.tp-tight .tr-tg { grid-template-columns: 1fr; }
/* The shift: its court over its hours. */
html.tp-tight .tr-shift-m { flex-direction: column; align-items: flex-start; gap: 8px; }
/* The scorer fills the screen with its two halves to tap: its words grow less there (A3: a fixed-size screen may cap),
   so names, the point and the bar always fit the halves. */
html.tp-tight .tr-score .tr-top { height: auto; min-height: 44px; }
html.tp-tight .tr-score .tr-pill, html.tp-tight .tr-score .tr-setl, html.tp-tight .tr-score .tr-svc { font-size: min(1rem, 20px); }
html.tp-tight .tr-score .tr-mr { font-size: min(1.125rem, 22px); }
html.tp-tight .tr-score .tr-ms { font-size: min(1.25rem, 26px); }
html.tp-tight .tr-score .tr-mg { font-size: min(1.625rem, 30px); }
html.tp-tight .tr-score .tr-who { font-size: min(1.1875rem, 24px); }
html.tp-tight .tr-score .tr-bar button { font-size: min(1.0625rem, 20px); }
html.tp-tight .tr-score .tr-lock, html.tp-tight .tr-score .tr-msg, html.tp-tight .tr-score .tr-catch { font-size: min(1rem, 20px); }
/* On a short or narrow screen at large text the halves take the height their words need (smaller photos and point)
   and the scorer scrolls, rather than letting a name run over the point. */
html.tp-tight .tr-score { overflow-y: auto; }
html.tp-tight .tr-score .tr-halves { flex: none; }
html.tp-tight .tr-score .tr-big { flex: none; min-height: 150px; }
html.tp-tight .tr-score .tr-big .tr-pr .tp-av { width: 40px !important; height: 40px !important; font-size: 17px !important; }
html.tp-tight .tr-score .tr-pt { font-size: min(min(7rem, 168px), 11vh); }
html.tp-tight .tr-score .tr-who { margin-top: 6px; }
html.tp-tight .tr-top { flex-wrap: wrap; row-gap: 6px; height: auto; min-height: 44px; }
html.tp-tight .tr-top .tr-pill { flex: 1 1 9em; }
html.tp-tight .tr-pill > span { overflow-wrap: break-word; }

/* A later match: both pairs by the names people call each other by (R-D 2), wrapping under large text. */
.tr-row-ps { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.tr-row-n { min-width: 0; font: 500 0.9375rem/1.2 var(--tp-font); overflow-wrap: break-word; }
.tr-wait-pair { margin: 12px 0 0; font: 500 1rem/1.3 var(--tp-font); color: var(--tp-muted); text-align: center; }
.tr-row .tr-ncourt { flex: none; padding: 2px 8px; font-size: 0.875rem; }
.tr-lock-back { margin-top: 10px; }
.tr-score .tr-big:disabled { opacity: 0.45; }

/* ---------- 555 (wave 1): the scorer in the live scorer's 421 layout ---------- */
/* The court as seen from the chair (each team on the side it plays from, the ball on the server), one chip over the
   net, a quiet tie-break line, then the two big buttons side by side, as live.tennisvcp.com and the app's own scorer. */
.tr-grow { flex: 1; }
.tr-swap { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: rgba(255, 255, 255, 0.08); color: #fff; font: 500 0.9375rem/1 var(--tp-font); cursor: pointer; }
.tr-cv { position: relative; flex: none; height: clamp(176px, 28dvh, 236px); padding: 48px 16px 14px; border-radius: 24px; background: #081a43; }
.tr-cv-chip { position: absolute; top: 8px; left: 50%; z-index: 3; display: flex; align-items: baseline; gap: 8px; max-width: calc(100% - 24px); height: 34px; padding: 0 14px; transform: translateX(-50%);
  border-radius: 17px; background: #051132; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); white-space: nowrap; overflow: hidden; }
.tr-cv-chip span { font: 500 0.875rem/34px var(--font-score); letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.65); }
.tr-cv-chip .tr-cv-set { color: rgba(255, 255, 255, 0.85); }
.tr-cv-chip .is-tb { color: var(--optic); }
.tr-cv-chip b { font: 500 1.5rem/34px var(--font-score); font-variant-numeric: tabular-nums; }
.tr-cv-box { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: 100%; }
.tr-cv-half { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 0; padding: 0 6px; }
.tr-cv-half.is-a { background: #102868; }
.tr-cv-half.is-b { background: #506d12; }
.tr-cv-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.tr-cv-lines rect, .tr-cv-lines path { fill: none; stroke: #fff; vector-effect: non-scaling-stroke; }
.tr-cv-lines rect { stroke-width: 2; stroke-opacity: 0.6; }
.tr-cv-lines path { stroke-width: 1.6; stroke-opacity: 0.28; }
.tr-cv-net { position: absolute; top: -6px; bottom: -6px; left: 50%; width: 3px; transform: translateX(-50%); background: #fff; }
.tr-cv-pl { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 100%; }
.tr-cv-ph { position: relative; display: block; }
.tr-cv-ph .tp-av { width: 48px !important; height: 48px !important; box-shadow: 0 0 0 2.5px #fff; }
.tr-cv-half.is-b .tr-cv-ph .tp-av { box-shadow: 0 0 0 2.5px var(--optic); }
.tr-cv-half[data-count="1"] .tr-cv-ph .tp-av { width: 64px !important; height: 64px !important; }
.tr-cv-half[data-count="3"] { gap: 3px; }
.tr-cv-half[data-count="3"] .tr-cv-ph .tp-av { width: 30px !important; height: 30px !important; font-size: 13px !important; }
.tr-cv-half[data-count="3"] .tr-cv-nm { font-size: 0.75rem; }
.tr-cv-ball { position: absolute; right: -7px; bottom: -3px; width: 22px; height: 22px; }
.tr-cv-ball circle { fill: var(--optic); stroke: #05102d; stroke-width: 1.6; }
.tr-cv-ball path { fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; }
.tr-cv-nm { max-width: 100%; overflow: hidden; font: 500 0.875rem/1.2 var(--tp-font); text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.tr-cv-change { position: absolute; left: 50%; top: 50%; z-index: 4; display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 22px; transform: translate(-50%, -50%);
  border-radius: 999px; background: var(--optic); color: var(--navy-deep); font: 600 1.0625rem/1 var(--tp-font); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); animation: tr-change 0.35s ease-out; }
@keyframes tr-change { from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); } }
@media (prefers-reduced-motion: reduce) { .tr-cv-change { animation: none; } }
.tr-cv-note { flex: none; min-height: 20px; margin: -4px 0; font: 400 0.875rem/20px var(--tp-font); text-align: center; color: rgba(255, 255, 255, 0.7); }
.tr-cv-note i { font-style: normal; color: var(--optic); }
.tr-lr .tr-halves { display: grid; flex: 1; grid-template-columns: 1fr 1fr; gap: 17px; min-height: 200px; margin-top: 0; }
.tr-lr .tr-big { flex: none; height: 100%; padding: 0; }
.tr-lr .tr-big.is-a { background: #102868; }
.tr-lr .tr-pt { margin: 0; font: 600 min(184px, 42vw, 25dvh)/1 var(--font-score); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.tr-lr .tr-qd { top: 10px; right: 10px; min-width: 44px; }
.tr-score.tr-lr:has(.tr-msg, .tr-lock, .tr-catch) .tr-pt { font-size: min(140px, 34vw, 18dvh); }
/* Large text (the app at 300 %, a browser's 150 %): the court keeps its pictures, words cap; the page scrolls. */
html.tp-tight .tr-cv { height: auto; min-height: 176px; }
html.tp-tight .tr-cv-chip { position: static; transform: none; max-width: 100%; margin: -36px auto 8px; height: auto; flex-wrap: wrap; justify-content: center; white-space: normal; }
html.tp-tight .tr-cv-nm { font-size: min(0.875rem, 16px); }
html.tp-tight .tr-lr .tr-halves { min-height: 180px; }
html.tp-tight .tr-swap span { display: none; }
@media (max-height: 700px) {
  .tr-dk.tr-lr { gap: 8px; }
  .tr-cv { padding-top: 44px; }
  .tr-cv-ph .tp-av { width: 38px !important; height: 38px !important; }
  .tr-cv-half[data-count="1"] .tr-cv-ph .tp-av { width: 52px !important; height: 52px !important; }
}
/* A phone's width: "Đổi bên" keeps its picture only, so the court's pill stays on one line. */
@media (max-width: 440px) {
  .tr-swap { width: 44px; padding: 0; justify-content: center; }
  .tr-swap span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---- W2 score (vcpick v2): pickleball scorer — the ball's holes, the server number, the call over the net ---- */
.tr-cv-ball .tr-cv-hole { fill: #0b1834; stroke: none; opacity: 0.55; }
.tr-cv-sn { position: absolute; left: -8px; bottom: -4px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: #0b1834; color: #fff; font-size: 13px; line-height: 20px; text-align: center; box-sizing: border-box; }
.tr-cv-call { font-size: 1.15em; letter-spacing: 0.02em; }
