/* Boxing Tournament Manager — shared styles (admin + public). Scoped to .btm-app / .btm-pub */
.btm-app, .btm-pub {
  --btm-bg: #f6f7f9; --btm-card: #ffffff; --btm-text: #1d2327; --btm-muted: #646970; --btm-line: #dcdcde;
  --btm-accent: #c8102e; --btm-accent-ink: #ffffff; --btm-red: #c8102e; --btm-blue: #0b4ea2;
  --btm-ok: #1e7f4f; --btm-ok-bg: #e7f5ee; --btm-warn: #8a5a00; --btm-warn-bg: #fff4d6; --btm-err: #b32d2e; --btm-err-bg: #fcebea;
  --btm-chip: #f0f0f1; --btm-win-bg: #eaf6ef; --btm-radius: 8px;
  color: var(--btm-text); font-size: 14px; line-height: 1.45;
}
.btm-auto-theme .btm-app, .btm-auto-theme .btm-pub { --btm-bg: transparent; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btm-auto-theme .btm-app, :root:not([data-theme="light"]) .btm-auto-theme .btm-pub {
    --btm-card: #1e2125; --btm-text: #e8eaed; --btm-muted: #9aa0a6; --btm-line: #3a3f45; --btm-chip: #2a2e33;
    --btm-red: #ff6b7d; --btm-blue: #7fb2ff; --btm-ok: #6fd3a0; --btm-ok-bg: #173a2a; --btm-warn: #ffd27a; --btm-warn-bg: #3a2f12;
    --btm-err: #ff8a80; --btm-err-bg: #3d1d1c; --btm-win-bg: #163327;
  }
}
:root[data-theme="dark"] .btm-auto-theme .btm-app, :root[data-theme="dark"] .btm-auto-theme .btm-pub {
    --btm-card: #1e2125; --btm-text: #e8eaed; --btm-muted: #9aa0a6; --btm-line: #3a3f45; --btm-chip: #2a2e33;
    --btm-red: #ff6b7d; --btm-blue: #7fb2ff; --btm-ok: #6fd3a0; --btm-ok-bg: #173a2a; --btm-warn: #ffd27a; --btm-warn-bg: #3a2f12;
    --btm-err: #ff8a80; --btm-err-bg: #3d1d1c; --btm-win-bg: #163327;
  }
.btm-app *, .btm-pub * { box-sizing: border-box; }
.btm-app { max-width: 1400px; }
.btm-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0; }
.btm-brand { font-weight: 700; font-size: 18px; margin-right: 6px; }
.btm-status { margin-left: auto; color: var(--btm-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 11em; flex: 0 0 11em; text-align: right; cursor: pointer; }
.btm-tsel { min-width: 220px; }
.btm-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--btm-line); margin-bottom: 14px; }
.btm-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 12px; cursor: pointer; font: inherit; color: var(--btm-muted); }
.btm-tabs button.on { color: var(--btm-text); border-bottom-color: var(--btm-accent); font-weight: 600; }
.btm-tabs button:hover { color: var(--btm-text); }
.btm-card { background: var(--btm-card); border: 1px solid var(--btm-line); border-radius: var(--btm-radius); padding: 14px 16px; margin-bottom: 14px; }
.btm-card h2 { font-size: 16px; margin: 0 0 10px; }
.btm-card h3 { font-size: 15px; margin: 0 0 8px; }
.btm-card h3 small, .btm-session h3 small, .btm-class h3 small { font-weight: normal; color: var(--btm-muted); font-size: 12px; }
.btm-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.btm-grid2 > .btm-card { margin-bottom: 0; }
.btm-grid2 + * { margin-top: 14px; }
.btm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; align-items: start; }
.btm-cards > .btm-card { margin: 0; }
.btm-field { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; flex: 1; min-width: 140px; }
.btm-field > span { font-weight: 600; font-size: 12px; }
.btm-field small, .btm-help, .btm-muted { color: var(--btm-muted); font-size: 12px; }
.btm-help { margin: 0 0 10px; }
.btm-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btm-row > input, .btm-row > select { flex: 1; min-width: 120px; margin-bottom: 8px; }
.btm-check { display: flex; gap: 6px; align-items: center; margin: 6px 0; }
.btm-app input[type=text], .btm-app input:not([type]), .btm-app input[type=number], .btm-app input[type=date], .btm-app input[type=time], .btm-app input[type=search], .btm-app input[type=email], .btm-app input[type=tel], .btm-app select {
  border: 1px solid var(--btm-line); border-radius: 4px; padding: 4px 8px; min-height: 30px; background: var(--btm-card); color: var(--btm-text); font: inherit; max-width: 100%;
}
.btm-btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--btm-line); background: var(--btm-card); color: var(--btm-text); border-radius: 4px; padding: 5px 11px; cursor: pointer; font: inherit; font-size: 13px; min-height: 30px; }
.btm-btn:hover:not([disabled]) { border-color: var(--btm-text); }
.btm-btn[disabled] { opacity: .45; cursor: default; }
.btm-btn-primary { background: var(--btm-accent); border-color: var(--btm-accent); color: var(--btm-accent-ink); }
.btm-btn-primary:hover:not([disabled]) { filter: brightness(1.08); border-color: var(--btm-accent); }
.btm-btn-danger { color: var(--btm-err); }
.btm-btn-ghost { background: transparent; }
.btm-btn-link { border: 0; background: none; color: var(--btm-blue); padding: 2px 6px; min-height: 0; }
.btm-btn-small { font-size: 12px; padding: 3px 9px; min-height: 26px; margin-top: 6px; }
.btm-btn-icon { border: 0; background: none; padding: 2px 4px; min-height: 0; font-size: 12px; }
.btm-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.btm-toolbar .btm-field { margin: 0; flex: 0 1 auto; }
.btm-banner { background: var(--btm-chip); border-radius: 6px; padding: 8px 12px; margin: 8px 0; font-size: 13px; }
.btm-banner-ok { background: var(--btm-ok-bg); color: var(--btm-ok); }
.btm-banner-err { background: var(--btm-err-bg); color: var(--btm-err); }
.btm-error { border-color: var(--btm-err); color: var(--btm-err); }
.btm-badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 10px; background: var(--btm-chip); color: var(--btm-muted); font-weight: 600; vertical-align: middle; }
.btm-badge-ok { background: var(--btm-ok-bg); color: var(--btm-ok); }
.btm-badge-warn { background: var(--btm-warn-bg); color: var(--btm-warn); }
.btm-badge-err { background: var(--btm-err-bg); color: var(--btm-err); }
.btm-badge-seed { background: var(--btm-accent); color: var(--btm-accent-ink); }
.btm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.btm-chip { background: var(--btm-chip); padding: 3px 9px; border-radius: 12px; font-size: 12px; }
.btm-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.btm-table th, .btm-table td { border-bottom: 1px solid var(--btm-line); padding: 6px 8px; text-align: left; vertical-align: middle; }
.btm-table th { font-size: 12px; color: var(--btm-muted); font-weight: 600; }
.btm-compact th, .btm-compact td { padding: 4px 6px; }
.btm-narrow { max-width: 360px; }
.btm-scroll { overflow-x: auto; }
.btm-nowrap { white-space: nowrap; }
.btm-dim { opacity: .5; }
.btm-day { border: 1px solid var(--btm-line); border-radius: 6px; padding: 10px; margin-bottom: 10px; }
.btm-day-h { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.btm-w-cls { width: 90px; } .btm-w-wt { width: 72px; } .btm-w-seed { width: 60px; } .btm-w-notes { width: 140px; }
.btm-mini { display: inline-flex; gap: 3px; align-items: center; font-size: 12px; margin-right: 8px; white-space: nowrap; }
.btm-doc { font-size: 11px; background: var(--btm-chip); padding: 1px 5px; border-radius: 3px; text-decoration: none; color: var(--btm-blue); }
.btm-docs { max-width: 180px; line-height: 1.9; }
.btm-ci-checked_in td:first-child { box-shadow: inset 3px 0 0 var(--btm-ok); }
.btm-ci-withdrawn td, .btm-ci-no_show td { opacity: .55; }
.btm-chip.btm-ci-checked_in { background: var(--btm-ok-bg); color: var(--btm-ok); }
.btm-chip.btm-ci-withdrawn, .btm-chip.btm-ci-no_show { background: var(--btm-err-bg); color: var(--btm-err); }
.btm-drawlist { padding-left: 22px; margin: 6px 0; }
.btm-drawlist li { margin-bottom: 6px; }
.btm-pair { display: flex; align-items: stretch; gap: 6px; }
.btm-vs { align-self: center; color: var(--btm-muted); font-size: 11px; }
.btm-slotbtn { flex: 1; text-align: left; border: 1px solid var(--btm-line); background: var(--btm-card); color: var(--btm-text); border-radius: 6px; padding: 5px 8px; cursor: pointer; font: inherit; font-size: 13px; }
.btm-slotbtn.on { outline: 2px solid var(--btm-accent); }
.btm-slotbtn[disabled] { cursor: default; }
.btm-bye { color: var(--btm-muted); font-style: italic; }
.btm-prov { color: var(--btm-muted); font-size: 12px; }
.btm-name { font-weight: 600; }
.btm-tbd { color: var(--btm-muted); font-style: italic; }
.btm-loads { display: flex; gap: 8px; align-items: flex-end; overflow-x: auto; padding: 6px 0; }
.btm-load { text-align: center; min-width: 48px; }
.btm-load-bar { height: 70px; width: 28px; margin: 0 auto; background: var(--btm-chip); border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.btm-load-bar div { width: 100%; background: var(--btm-blue); }
.btm-load-bar div.over { background: var(--btm-err); }
.btm-load-n { font-size: 12px; font-weight: 600; } .btm-load-l { font-size: 11px; color: var(--btm-muted); }
.btm-issues li.btm-error { color: var(--btm-err); } .btm-issues li.btm-warn { color: var(--btm-warn); }
.btm-final-row td { background: var(--btm-warn-bg); }
.btm-tb-row td:nth-child(6), .btm-tb-row td:nth-child(5) { font-style: italic; }
.btm-result-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.btm-spacer { flex: 1; }
.btm-result-body { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; }
.btm-rc { border: 1px solid var(--btm-line); border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.btm-rc.btm-red { border-left: 4px solid var(--btm-red); } .btm-rc.btm-blue { border-left: 4px solid var(--btm-blue); }
.btm-rc.btm-win { background: var(--btm-win-bg); }
.btm-rmeta { display: flex; flex-direction: column; gap: 6px; }
.btm-result.btm-st-done { opacity: .85; }
.btm-note { font-size: 12px; color: var(--btm-warn); background: var(--btm-warn-bg); padding: 4px 8px; border-radius: 4px; margin: 4px 0; }
.btm-welcome { max-width: 640px; }
/* brackets / public */
.btm-class { margin-bottom: 26px; }
.btm-class h3 { font-size: 17px; border-bottom: 2px solid var(--btm-accent); padding-bottom: 4px; }
.btm-sec h4 { margin: 10px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--btm-muted); }
.btm-rounds { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: stretch; }
.btm-round { min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.btm-round-b { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 8px; }
.btm-bout-ph { visibility: hidden; }
.btm-bout-bye { border-style: dashed; }
.btm-bout-bye .btm-bout-h { background: transparent; }
.btm-round-h { font-size: 12px; font-weight: 700; color: var(--btm-muted); }
.btm-bout { border: 1px solid var(--btm-line); border-radius: 6px; background: var(--btm-card); font-size: 13px; overflow: hidden; }
.btm-bout-h { display: flex; justify-content: space-between; font-size: 11px; color: var(--btm-muted); padding: 3px 8px; background: var(--btm-chip); }
.btm-corner { padding: 4px 8px; border-left: 4px solid transparent; }
.btm-corner.btm-red { border-left-color: var(--btm-red); }
.btm-corner.btm-blue { border-left-color: var(--btm-blue); border-top: 1px solid var(--btm-line); }
.btm-corner.btm-win { background: var(--btm-win-bg); font-weight: 600; }
.btm-bout-r { font-size: 11px; padding: 2px 8px; color: var(--btm-muted); border-top: 1px solid var(--btm-line); }
.btm-ifneeded { border-style: dashed; }
.btm-st-not_needed { opacity: .5; }
.btm-standings { max-width: 420px; }
.btm-medals { margin-top: 8px; padding: 8px 10px; background: var(--btm-chip); border-radius: 6px; font-size: 13px; }
.btm-medal { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; color: #222; }
.btm-gold { background: #f2c94c; } .btm-silver { background: #cfd6dd; } .btm-bronze { background: #e0a46b; }
.btm-sched td.btm-win, .btm-sched td.btm-win .btm-name { color: var(--btm-ok); }
.btm-red-h { color: var(--btm-red) !important; } .btm-blue-h { color: var(--btm-blue) !important; }
.btm-session h3 { margin-top: 0; }
.btm-pub { max-width: 100%; }
.btm-pub-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.btm-pub-tabs button { border: 1px solid var(--btm-line); background: var(--btm-card); color: var(--btm-text); padding: 6px 14px; border-radius: 16px; cursor: pointer; font: inherit; }
.btm-pub-tabs button.on { background: var(--btm-accent); border-color: var(--btm-accent); color: var(--btm-accent-ink); }
.btm-pub .btm-session { margin-bottom: 20px; }
.btm-pub .btm-sched { font-size: 13px; }
@media (max-width: 700px) {
  .btm-cards { grid-template-columns: 1fr; }
  .btm-result-body { grid-template-columns: 1fr; }
  .btm-pub .btm-sched th:nth-child(4), .btm-pub .btm-sched td:nth-child(4) { display: none; }
  .btm-pub .btm-sched th, .btm-pub .btm-sched td { padding: 5px 4px; font-size: 12px; }
  .btm-round { min-width: 190px; }
}
@media print {
  .btm-tabs, .btm-top, .btm-toolbar, #adminmenumain, #wpadminbar, #wpfooter { display: none !important; }
  .btm-card { border: 0; padding: 0; }
  .btm-rounds { flex-wrap: wrap; overflow: visible; }
}

.btm-modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 100000; padding: 16px; max-width: none; }
.btm-modal { background: var(--btm-card); color: var(--btm-text); border-radius: 10px; padding: 18px; width: 100%; max-width: 420px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.btm-modal p { margin: 0 0 12px; }
.btm-modal-input { width: 100%; margin-bottom: 12px; border: 1px solid var(--btm-line); border-radius: 4px; padding: 6px 8px; font: inherit; background: var(--btm-card); color: var(--btm-text); }
.btm-modal .btm-toolbar { justify-content: flex-end; margin: 0; }
.btm-btn-dangerfill { background: var(--btm-err); border-color: var(--btm-err); color: #fff; }
.btm-app :focus-visible, .btm-pub :focus-visible { outline: 2px solid var(--btm-blue); outline-offset: 1px; }
.btm-clscard td select { max-width: 150px; }
.btm-clscard .btm-toolbar { margin: 0 0 4px; }

.btm-import h3 { margin: 14px 0 6px; font-size: 14px; }
.btm-maptable td:first-child { width: 32%; }
.btm-maptable select { max-width: 260px; }
.btm-samples { font-size: 12px; word-break: break-word; }
.btm-import details { margin: 8px 0; }
.btm-maptable { table-layout: fixed; }
.btm-maptable th:nth-child(2), .btm-maptable td:nth-child(2) { width: 36%; }
@media (max-width: 700px) { .btm-maptable { table-layout: auto; } .btm-maptable td:first-child { width: auto; } }

.btm-agefmt { margin-top: 8px; }
.btm-agefmt summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.btm-agefmt select { width: 128px; max-width: 128px; }
.btm-agefmt th { white-space: nowrap; }

.btm-chip { display: inline-flex; align-items: center; gap: 4px; }
.btm-chip-warn { background: var(--btm-warn-bg); color: var(--btm-warn); }
.btm-chip-x { border: 0; background: none; color: inherit; opacity: .55; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 2px; }
.btm-chip-x:hover { opacity: 1; color: var(--btm-err); }
label.btm-chip { cursor: pointer; }

.btm-restrict-h { margin-top: 16px !important; }

.btm-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.btm-card-h h2 { margin: 0 !important; }

.btm-roster td:nth-child(3), .btm-roster th:nth-child(3) { width: 60px; text-align: center; }

.btm-lock { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 11px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 12px; border: 1px solid; white-space: nowrap; vertical-align: middle; }
button.btm-lock { cursor: pointer; }
.btm-lock.is-locked { background: #b3261e; border-color: #b3261e; color: #fff; }
.btm-lock.is-unlocked { background: var(--btm-ok-bg); border-color: var(--btm-ok); color: var(--btm-ok); }
button.btm-lock:hover { filter: brightness(1.08); }
.btm-lock svg { flex: none; }

/* draw bracket */
.btm-clscard-wide { grid-column: 1 / -1; }
.btm-bracket { display: flex; gap: 44px; overflow-x: auto; padding: 4px 4px 10px; align-items: stretch; }
.btm-bcol { display: flex; flex-direction: column; flex: none; width: 200px; }
.btm-bcol-h { font-size: 11px; font-weight: 700; color: var(--btm-muted); text-transform: uppercase; letter-spacing: .04em; height: 22px; }
.btm-bcol-body { display: flex; flex-direction: column; flex: 1; }
.btm-bmatch { flex: 1; display: flex; flex-direction: column; position: relative; }
.btm-bslot { flex: 1; display: flex; align-items: center; position: relative; padding: 3px 0; }
.btm-bmatch::after { content: ''; position: absolute; right: -22px; top: 25%; bottom: 25%; width: 21px; border-top: 1.5px solid var(--btm-muted); border-right: 1.5px solid var(--btm-muted); border-bottom: 1.5px solid var(--btm-muted); border-radius: 0 6px 6px 0; opacity: .55; }
.btm-bmatch-last::after { display: none; }
.btm-bcol + .btm-bcol .btm-bslot::before { content: ''; position: absolute; left: -22px; top: 50%; width: 22px; border-top: 1.5px solid var(--btm-muted); opacity: .55; }
.btm-bbox { width: 100%; min-height: 40px; border: 1px solid var(--btm-line); border-radius: 6px; padding: 4px 8px; background: var(--btm-card); color: var(--btm-text); font: inherit; font-size: 12px; text-align: left; display: block; line-height: 1.3; }
.btm-bbox-btn { cursor: pointer; }
.btm-bbox-btn:hover:not([disabled]) { border-color: var(--btm-text); }
.btm-bbox-btn.on { outline: 2px solid var(--btm-accent); outline-offset: 1px; }
.btm-bbox-btn[disabled] { cursor: default; }
.btm-bname { font-weight: 600; }
.btm-bsub { display: block; color: var(--btm-muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btm-bbye { color: var(--btm-muted); font-style: italic; border-style: dashed; display: flex; align-items: center; }
.btm-bpending { color: var(--btm-muted); font-style: italic; display: flex; align-items: center; background: var(--btm-chip); }
.btm-lost { opacity: .5; }
.btm-bcol-champ .btm-bbox { border-color: var(--btm-accent); border-width: 2px; }
.btm-bnum { position: absolute; right: -22px; top: 50%; transform: translate(50%, -50%); z-index: 1; font-size: 10px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--btm-card); border: 1px solid var(--btm-muted); color: var(--btm-text); font-variant-numeric: tabular-nums; }
.btm-bnotes { font-size: 12px; color: var(--btm-muted); display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.btm-rrgrid .btm-c { text-align: center; width: 38px; font-variant-numeric: tabular-nums; }
.btm-rrgrid .btm-rrx { background: var(--btm-chip); }
.btm-rrgrid .btm-bbox { min-width: 180px; }
.btm-rr-W { color: var(--btm-ok); } .btm-rr-L { color: var(--btm-err); }
.btm-cards > .btm-card, .btm-clscard { min-width: 0; }
@media (max-width: 700px) { .btm-bcol { width: 170px; } .btm-bracket { gap: 40px; } }

.btm-agesum { width: auto; min-width: 360px; max-width: 100%; margin-bottom: 12px; }
.btm-agesum th[scope=row] { text-align: left; font-weight: 600; color: var(--btm-text); font-size: 13px; }
.btm-agesum td { text-align: right; font-variant-numeric: tabular-nums; min-width: 64px; }
.btm-agesum thead th:not(:first-child) { text-align: right; }
.btm-agesum tfoot th, .btm-agesum tfoot td { border-top: 2px solid var(--btm-line); border-bottom: 0; }
@media (max-width: 700px) { .btm-agesum { min-width: 0; width: 100%; } }

/* per-ring load */
.btm-app, .btm-pub { --btm-ring1: #0b4ea2; --btm-ring2: #0e8a7e; --btm-ring3: #8a4fbf; --btm-ring4: #c26a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btm-auto-theme .btm-app { --btm-ring1: #7fb2ff; --btm-ring2: #5fd3c4; --btm-ring3: #c9a2f0; --btm-ring4: #ffb35c; } }
:root[data-theme="dark"] .btm-auto-theme .btm-app { --btm-ring1: #7fb2ff; --btm-ring2: #5fd3c4; --btm-ring3: #c9a2f0; --btm-ring4: #ffb35c; }
.btm-ringload-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; margin-top: 6px; }
.btm-ring-key { display: inline-flex; align-items: center; gap: 4px; }
.btm-ring-key i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.btm-ring-c1 { background: var(--btm-ring1) !important; } .btm-ring-c2 { background: var(--btm-ring2) !important; }
.btm-ring-c3 { background: var(--btm-ring3) !important; } .btm-ring-c4 { background: var(--btm-ring4) !important; }
.btm-ring-c1.over, .btm-ring-c2.over, .btm-ring-c3.over, .btm-ring-c4.over { background: var(--btm-err) !important; }
.btm-ringgrp { min-width: 56px; }
.btm-ring-bars, .btm-ring-nums { display: flex; justify-content: center; gap: 3px; }
.btm-ring-bar { width: 14px; height: 54px; margin: 0; }
.btm-ring-n { width: 14px; font-size: 10px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.btm-over-n { color: var(--btm-err); }

.btm-loads .btm-load { width: 64px; min-width: 64px; flex: none; }

/* ring columns on the Schedule tab */
.btm-ringcols { display: grid; gap: 12px; align-items: start; }
.btm-ringcol { min-width: 0; background: var(--btm-chip); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.btm-ringcol-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; padding: 2px 2px 4px; }
.btm-ringcol-h i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.btm-ringcol-empty { margin: 4px 2px; }
.btm-rbout { background: var(--btm-card); border: 1px solid var(--btm-line); border-radius: 6px; padding: 6px 8px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.btm-rbout-final { border-color: var(--btm-warn); box-shadow: inset 3px 0 0 var(--btm-warn); }
.btm-rbout-tb .btm-rbout-cls { font-style: italic; }
.btm-rbout-over { border-color: var(--btm-err); }
.btm-rbout-top { display: flex; align-items: center; gap: 8px; }
.btm-rbout-num { font-weight: 700; min-width: 26px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--btm-chip); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-variant-numeric: tabular-nums; }
.btm-rbout-time { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.btm-rbout-cls { color: var(--btm-muted); font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btm-rbout-c { padding: 1px 0 1px 8px; border-left: 3px solid transparent; }
.btm-rbout-c.btm-red { border-left-color: var(--btm-red); } .btm-rbout-c.btm-blue { border-left-color: var(--btm-blue); }
.btm-rbout-act { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.btm-rbout-act select { font-size: 12px; min-height: 26px; padding: 2px 4px; max-width: 150px; }
.btm-rbout-note { font-size: 11px; }
@media (max-width: 700px) { .btm-ringcols { grid-template-columns: 1fr !important; } }

/* tournament list */
.btm-btn.on { border-color: var(--btm-text); background: var(--btm-chip); }
.btm-count { font-size: 11px; background: var(--btm-chip); border-radius: 9px; padding: 0 6px; font-weight: 700; }
.btm-current { font-weight: 600; font-size: 14px; padding: 0 4px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btm-tgroup { font-size: 13px !important; text-transform: uppercase; letter-spacing: .04em; color: var(--btm-muted); margin: 18px 0 8px !important; }
.btm-tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.btm-tcard { background: var(--btm-card); border: 1px solid var(--btm-line); border-radius: var(--btm-radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.btm-tcard.is-current { border-color: var(--btm-accent); box-shadow: inset 3px 0 0 var(--btm-accent); }
.btm-tcard-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.btm-tcard-h h3 { margin: 0 !important; font-size: 16px !important; text-wrap: balance; }
.btm-tmeta { font-size: 13px; }
.btm-tstats { font-size: 13px; font-variant-numeric: tabular-nums; }
.btm-tcard .btm-chips { margin: 0; }
.btm-tcard-act { margin: 6px 0 0; }

/* public portal */
.btm-portal { display: flex; flex-direction: column; gap: 12px; }
.btm-portal-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btm-portal-pick label { font-weight: 600; }
.btm-portal-pick select, .btm-portal-filters select { border: 1px solid var(--btm-line); border-radius: 4px; padding: 5px 8px; min-height: 34px; background: var(--btm-card); color: var(--btm-text); font: inherit; max-width: 100%; }
.btm-portal-pick select { min-width: min(420px, 100%); }
.btm-portal-h h2 { margin: 0 0 2px; font-size: 22px; }
.btm-portal-filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.btm-portal-filters label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.btm-portal-div { margin-bottom: 26px; }
.btm-portal-div h3 { font-size: 17px; border-bottom: 2px solid var(--btm-accent); padding-bottom: 4px; margin: 0 0 10px; }
.btm-portal-div h3 small { font-weight: normal; color: var(--btm-muted); font-size: 12px; }

.btm-preview-wrap { align-items: stretch; }
.btm-preview { background: var(--btm-bg, #fff); background: var(--btm-card); color: var(--btm-text); border-radius: 10px; width: 100%; max-width: 1280px; max-height: 100%; overflow: auto; padding: 0 18px 18px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.btm-preview-h { position: sticky; top: 0; z-index: 2; background: var(--btm-card); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--btm-line); margin-bottom: 12px; }
.btm-preview-h .btm-muted { flex: 1; font-size: 12px; }
.btm-rrgrid .btm-bbox { width: auto; max-width: 280px; }

/* Public (shortcode) views: only the winner of a decided bout is bold; no green for winners */
.btm-pub .btm-name, .btm-pub .btm-bname { font-weight: 400; }
.btm-pub .btm-win .btm-name, .btm-pub .btm-won .btm-bname { font-weight: 700; }
.btm-pub .btm-sched td.btm-win, .btm-pub .btm-sched td.btm-win .btm-name { color: inherit; }
.btm-pub .btm-corner.btm-win { background: transparent; font-weight: 400; }
.btm-pub .btm-lost { opacity: 1; }
.btm-pub .btm-rr-W, .btm-pub .btm-rr-L { color: inherit; }
.btm-pub .btm-rr-L { font-weight: 400; }

/* Round-robin tie-breaker (Draw tab) */
.btm-tiebox { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--btm-line, #dcdcde); border-radius: 6px; }
.btm-tiebox-warn { border-color: var(--btm-warn, #b26200); }
.btm-tiebox h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.btm-tie-corners { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 6px 0; }
.btm-tie-c { display: flex; flex-direction: column; gap: 2px; font-size: 12px; min-width: 0; flex: 1 1 200px; }
.btm-tie-c select { max-width: 100%; border-left: 4px solid; }
.btm-tie-c.btm-red select { border-left-color: var(--btm-red, #c62828); }
.btm-tie-c.btm-blue select { border-left-color: var(--btm-blue, #1565c0); }
.btm-vs { padding-bottom: 6px; font-weight: 600; }
.btm-tie-banner ul { margin: 4px 0 6px 18px; padding: 0; }

/* EN | FR language switch */
.btm-lang { display: inline-flex; border: 1px solid var(--btm-line); border-radius: 6px; overflow: hidden; flex: none; }
.btm-lang button { border: 0; background: transparent; color: var(--btm-muted); font: inherit; font-size: 12px; font-weight: 600; padding: 4px 9px; cursor: pointer; line-height: 1.4; }
.btm-lang button + button { border-left: 1px solid var(--btm-line); }
.btm-lang button.on { background: var(--btm-accent); color: var(--btm-accent-ink); }
.btm-lang button:focus-visible { outline: 2px solid var(--btm-accent); outline-offset: -2px; }
.btm-lang-top { margin-left: auto; }
.btm-pub-lang { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.btm-lang-top + .btm-status { margin-left: 0; }
.btm-portal-filterbar { display: flex; flex-wrap: wrap; gap: 0 12px; }
.btm-portal-filterbar > .btm-portal-filters { margin-bottom: 10px; }
.btm-pub-inner > .btm-portal-filters label, .btm-portal-filters label { flex-wrap: wrap; }
.btm-pub-inner .btm-portal-filters select { border: 1px solid var(--btm-line); border-radius: 4px; padding: 5px 8px; min-height: 34px; background: var(--btm-card); color: var(--btm-text); font: inherit; max-width: 100%; }

/* Medalists: name, then club · province */
.btm-medalist { display: inline-flex; flex-direction: column; line-height: 1.3; vertical-align: top; }
.btm-medalist + .btm-medalist { margin-top: 6px; }
td > .btm-medalist { display: flex; }
.btm-med-sub { font-size: 12px; color: var(--btm-muted); font-weight: 400; }
.btm-medals { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: flex-start; }
.btm-medal-item { display: inline-flex; align-items: flex-start; gap: 6px; }
.btm-medal-table td { vertical-align: top; } .btm-medal-table td:not(:first-child) { min-width: 150px; }

/* Medal table */
.btm-seg { display: inline-flex; border: 1px solid var(--btm-line); border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.btm-seg button { border: 0; background: var(--btm-card); color: var(--btm-text); font: inherit; font-size: 13px; padding: 6px 12px; cursor: pointer; }
.btm-seg button + button { border-left: 1px solid var(--btm-line); }
.btm-seg button.on { background: var(--btm-accent); color: var(--btm-accent-ink); }
.btm-mt { width: 100%; }
.btm-mt th, .btm-mt td { vertical-align: top; }
.btm-mt .btm-mt-n { text-align: center; width: 64px; font-variant-numeric: tabular-nums; }
.btm-mt .btm-mt-rank { width: 48px; text-align: center; font-weight: 700; }
.btm-mt .btm-mt-total { font-weight: 700; }
.btm-mt tfoot td { font-weight: 700; border-top: 2px solid var(--btm-line); }
.btm-mt-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; padding: 0; }
.btm-mt-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.btm-mt-who summary { cursor: pointer; list-style: none; }
.btm-mt-who summary::-webkit-details-marker { display: none; }
.btm-mt-who summary::before { content: '▸'; display: inline-block; width: 1em; color: var(--btm-muted); }
.btm-mt-who[open] summary::before { content: '▾'; }
.btm-mt-name { font-weight: 600; }
.btm-mt-list { margin: 6px 0 2px 1em; padding: 0; list-style: none; font-size: 13px; }
.btm-mt-list li { margin: 3px 0; }
.btm-mt-note { font-size: 12px; margin-top: 6px; }
@media (max-width: 700px) { .btm-mt .btm-mt-n { width: 40px; } .btm-mt .btm-mt-rank { width: 34px; } }

/* Vacant schedule slots (left by a redrawn division) */
.btm-vacant-row td { color: var(--btm-muted); background: repeating-linear-gradient(135deg, transparent 0 8px, var(--btm-chip) 8px 16px); }
.btm-rbout-vacant { border-style: dashed !important; color: var(--btm-muted); }
.btm-ringcol { display: flex; flex-direction: column; }
.btm-ringcol-h { order: -1; }
.btm-ringcol-empty { order: -1; }
.btm-err-text { color: var(--btm-err); }
.btm-vacant-closed td, .btm-vacant-closed { background: none !important; font-style: normal; }

/* Redraw pending notice (public views) */
.btm-pending { border: 1px solid var(--btm-warn); background: var(--btm-warn-bg); color: var(--btm-text); border-radius: 6px; padding: 8px 12px; margin: 6px 0 10px; font-size: 13px; }
.btm-pending ul { margin: 4px 0 0 18px; padding: 0; }
.btm-pending strong:first-child { color: var(--btm-warn); }
.btm-bb-notes { margin: 6px 0 10px 18px; padding: 0; font-size: 13px; }
.btm-bb-notes li { margin: 3px 0; }
.btm-grid2 > .btm-bb { grid-column: 1 / -1; }
.btm-bb-clubs summary { cursor: pointer; font-weight: 600; margin: 4px 0 8px; }

/* Officials tab */
.btm-in-s { width: 110px; }
.btm-offplan select { max-width: 150px; font-size: 12px; }
.btm-offplan td { vertical-align: middle; }
.btm-coi-coi { background: #f8c9c9 !important; color: #222; }
.btm-coi-club { background: #fbd9b0 !important; color: #222; }
.btm-coi-prov { background: #fff1a8 !important; color: #222; }
span.btm-coi-coi, span.btm-coi-club, span.btm-coi-prov { padding: 1px 6px; border-radius: 4px; }
.btm-offadd textarea { width: 100%; box-sizing: border-box; font: inherit; }
.btm-offadd summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
.btm-rules td:last-child { width: 160px; }
.btm-log { font-size: 12px; color: var(--btm-muted); }

/* Judging statistics */
.btm-offseg { margin-bottom: 12px; }
.btm-statsum { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.btm-statsum > div { background: var(--btm-chip); border-radius: 8px; padding: 8px 14px; min-width: 130px; }
.btm-statsum b { display: block; font-size: 22px; }
.btm-statsum span { font-size: 12px; color: var(--btm-muted); }
.btm-sortbtn { border: 0; background: transparent; font: inherit; font-weight: 600; color: inherit; cursor: pointer; padding: 0; text-align: left; }
.btm-sortbtn.on { color: var(--btm-accent); }
.btm-stat-high td { background: var(--btm-err-bg); }
.btm-errlist summary { cursor: pointer; font-size: 12px; color: var(--btm-muted); }
.btm-errlist ul { margin: 4px 0 0 16px; padding: 0; font-size: 12px; }
.btm-stats td, .btm-stats th { vertical-align: top; }
/* referee / judge assignments ([btm_officials], Officials tab) */
.btm-off-crew { margin: 4px 0 8px; font-size: 14px; }
.btm-off-table td { white-space: nowrap; }
.btm-off-table td.btm-off-me { background: var(--btm-warn-bg); font-weight: 700; }
.btm-off-sum { margin: 6px 0 10px; }
/* officials workload */
.btm-workload .btm-wl-n { text-align: right; font-variant-numeric: tabular-nums; }
.btm-workload .btm-wl-grp { text-align: center; border-bottom: 1px solid var(--btm-line); }
.btm-workload .btm-wl-sep { border-left: 2px solid var(--btm-line); }
.btm-workload tfoot th { border-top: 2px solid var(--btm-line); }
.btm-table.btm-workload { width: auto; }
.btm-workload th, .btm-workload td { padding-left: 14px; padding-right: 14px; }
/* "Download … (PDF)" on the public views */
.btm-pdfbar { display: flex; justify-content: flex-end; margin: 6px 0 10px; }
.btm-pdf { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border: 1px solid var(--btm-line); border-radius: 6px; background: var(--btm-card); color: var(--btm-text); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btm-pdf::before { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 1h2v7.6l2.3-2.3 1.4 1.4L8 12.4 3.3 7.7l1.4-1.4L7 8.6zM2 13h12v2H2z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 1h2v7.6l2.3-2.3 1.4 1.4L8 12.4 3.3 7.7l1.4-1.4L7 8.6zM2 13h12v2H2z'/%3E%3C/svg%3E") center/contain no-repeat; }
.btm-pdf:hover { border-color: var(--btm-accent); color: var(--btm-accent); }
@media print { .btm-pdfbar { display: none; } }
/* judges' scorecard (Results tab) */
.btm-card-sc { border-top: 1px solid var(--btm-line); margin-top: 10px; padding-top: 6px; }
.btm-sc-toggle { border: 0; background: none; font: inherit; font-weight: 600; color: var(--btm-text); cursor: pointer; padding: 4px 0; text-align: left; }
.btm-sc-caret { display: inline-block; width: 1em; }
.btm-sc-body { padding: 6px 0 2px; }
.btm-sc-body .btm-toolbar label { display: inline-flex; align-items: center; gap: 6px; }
.btm-sc-table th input { width: 170px; margin-left: 6px; }
.btm-sc-table td, .btm-sc-table th { vertical-align: middle; }
.btm-sc-pos { display: inline-block; min-width: 1.6em; text-align: center; font-weight: 700; background: var(--btm-chip); border-radius: 4px; }
.btm-sc-cell select { min-width: 72px; font-variant-numeric: tabular-nums; }
.btm-sc-cell.red select { border-color: var(--btm-red); color: var(--btm-red); font-weight: 700; }
.btm-sc-cell.blue select { border-color: var(--btm-blue); color: var(--btm-blue); font-weight: 700; }
.btm-sc-ded { display: block; font-size: 11px; color: var(--btm-muted); }
.btm-sc-tot { font-variant-numeric: tabular-nums; white-space: nowrap; }
.btm-sc-w.red { color: var(--btm-red); font-weight: 700; } .btm-sc-w.blue { color: var(--btm-blue); font-weight: 700; }
.btm-sc-tie { border-color: var(--btm-warn); }
.btm-sc-ev { margin: 8px 0; }
.btm-sc-evrow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 4px 0; }
.btm-sc-c.red { color: var(--btm-red); font-weight: 700; } .btm-sc-c.blue { color: var(--btm-blue); font-weight: 700; }
.btm-sc-dec { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; padding: 8px 10px; background: var(--btm-chip); border-radius: 6px; }
/* judge report */
.btm-jr-row { cursor: pointer; }
.btm-jr-row:hover td { background: var(--btm-chip); }
.btm-jr-pct { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.btm-jr-bar { display: inline-block; width: 90px; height: 8px; background: var(--btm-chip); border-radius: 4px; overflow: hidden; }
.btm-jr-bar i { display: block; height: 100%; background: var(--btm-ok); }
.btm-jr-detail td { background: var(--btm-bg); }
.btm-jr-detail ul { margin: 4px 0 4px 18px; padding: 0; }
.btm-table.btm-jr { width: auto; }
.btm-jr th, .btm-jr td { padding-left: 12px; padding-right: 12px; }
/* withdrawal during the tournament (Schedule tab) */
.btm-wdname { background: none; border: 0; padding: 2px 4px; margin: -2px -4px; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 4px; -webkit-tap-highlight-color: transparent; }
.btm-wdname .btm-name { text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.btm-wdname:hover, .btm-wdname:focus-visible { background: color-mix(in srgb, var(--btm-text) 8%, transparent); outline: none; }
.btm-wdchip { display: inline-block; font-size: 11px; font-weight: 600; line-height: 1; padding: 3px 5px; border: 1px solid var(--btm-line); border-radius: 4px; color: var(--btm-muted, #6b7280); vertical-align: 1px; }
.btm-wdname:hover .btm-wdchip, .btm-wdname:focus-visible .btm-wdchip { border-color: var(--btm-err, #b91c1c); color: var(--btm-err, #b91c1c); }
.btm-ver { font-size: 12px; color: var(--btm-muted, #6b7280); }
.btm-wdname-on .btm-name { text-decoration: line-through; opacity: .7; }
.btm-choose h3 { margin: 0 0 8px; font-size: 1.05em; }
.btm-choose-list { display: grid; gap: 8px; margin-bottom: 12px; }
.btm-choose-opt { display: grid; gap: 3px; text-align: left; padding: 10px 12px; white-space: normal; height: auto; }
.btm-choose-opt span { font-size: .88em; font-weight: 400; opacity: .9; }
/* judge report: averages, ± vs average, overall impact */
.btm-jr-avg { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 10px 0; }
.btm-jr-avg > div { border: 1px solid var(--btm-line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; }
.btm-jr-avg span { font-size: 12px; color: var(--btm-muted, #6b7280); }
.btm-jr-avg b { font-size: 22px; }
.btm-jr-avg small { font-size: 12px; color: var(--btm-muted, #6b7280); }
.btm-jr-diff { font-weight: 600; white-space: nowrap; }
.btm-jr-diff.up { color: var(--btm-ok, #15803d); }
.btm-jr-diff.down { color: var(--btm-err, #b91c1c); }
.btm-jr tfoot td { border-top: 2px solid var(--btm-text); font-weight: 600; }
.btm-jr-cards { flex-wrap: wrap; gap: 6px; }
.btm-jr-judgebtn { font-size: 12px; padding: 3px 9px; min-height: 28px; }
.btm-btn.btm-btn-win-red { background: #c8102e; border-color: #c8102e; color: #fff; }
.btm-btn.btm-btn-win-blue { background: #0b4ea2; border-color: #0b4ea2; color: #fff; }
/* bouts that may not happen (withdrawals) on the Officials tab */
.btm-offplan tr.btm-wdrow > td { background: var(--btm-warn-bg, #fff7e0); }
.btm-offplan tr.btm-wd-walkover > td { background: color-mix(in srgb, var(--btm-warn-bg, #fff7e0) 70%, #e5e5e5); }
.btm-wdtag { margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--btm-warn, #92400e); }
.btm-wdnone { font-style: italic; }
.btm-banner-warn { background: var(--btm-warn-bg, #fff7e0); color: var(--btm-text); border-left: 4px solid var(--btm-warn, #b45309); }
.btm-off-table tr.btm-wdrow > td { background: var(--btm-warn-bg, #fff7e0); }
.btm-jrnames summary { cursor: pointer; } .btm-aliases { margin: 4px 0 0 18px; padding: 0; } .btm-aliases li { margin: 2px 0; }
/* fixed / rolling schedule notice */
.btm-timenote { margin: 6px 0 10px; padding: 6px 10px; border-radius: 6px; font-size: 13px; background: var(--btm-chip); }
.btm-timenote-rolling { background: var(--btm-warn-bg, #fff7e0); border-left: 4px solid var(--btm-warn, #b45309); }
/* change the boxers / add a bout (Schedule tab) */
.btm-modal.btm-boutdlg { max-width: 600px; }
.btm-boutdlg h3 { margin: 0 0 6px; }
.btm-boutdlg .btm-field { display: grid; gap: 3px; margin: 8px 0; }
.btm-boutdlg .btm-field select { width: 100%; }
.btm-boutdlg .btm-field small { color: var(--btm-muted, #6b7280); }
.btm-bd-corners { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btm-bd-red span { color: var(--btm-red); font-weight: 700; }
.btm-bd-blue span { color: var(--btm-blue); font-weight: 700; }
.btm-bd-kind { border: 1px solid var(--btm-line); border-radius: 6px; padding: 6px 10px; margin: 0 0 6px; display: grid; gap: 4px; }
.btm-bd-kind small { color: var(--btm-muted, #6b7280); }
.btm-err-text { color: var(--btm-err); font-weight: 600; }
@media (max-width: 560px) { .btm-bd-corners { grid-template-columns: 1fr; } }
/* "Order": position of the bout in its session — informational, kept as narrow as possible */
.btm-table th.btm-ord, .btm-table td.btm-ord { width: 1%; padding-left: 3px !important; padding-right: 3px !important; font-size: 11px; color: var(--btm-muted, #6b7280); text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.btm-table th.btm-ord { font-weight: 500; }
.btm-rbout-top .btm-ord { font-size: 10px; color: var(--btm-muted, #6b7280); min-width: 1.2em; text-align: right; }
/* change the boxers from the Brackets tab */
.btm-bout-edit { border: 1px solid var(--btm-line); background: var(--btm-card); color: inherit; border-radius: 4px; font-size: 11px; line-height: 1; padding: 2px 5px; margin-left: 4px; cursor: pointer; }
.btm-bout-edit:hover { border-color: var(--btm-accent); color: var(--btm-accent); }
.btm-class h3 .btm-cls-add { margin-left: 8px; vertical-align: 2px; font-weight: normal; }
/* Judge Report: % of rounds sided with the majority, by session */
.btm-jrchart-wrap { overflow-x: auto; }
.btm-jrchart { min-width: 520px; max-width: 900px; display: block; }
.btm-jrchart .g { stroke: var(--btm-line); stroke-width: 1; }
.btm-jrchart .ax { fill: var(--btm-muted, #6b7280); font-size: 11px; }
.btm-jrchart .avg { stroke: #9a9893; stroke-width: 2; stroke-dasharray: 5 4; }
.btm-jrchart .avgdot { fill: #9a9893; }
.btm-jrchart .jl { stroke-width: 2; }
.btm-jrchart .jd { stroke: var(--btm-card, #fff); stroke-width: 2; }
.btm-jrlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.btm-jrlegend label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.btm-jrlegend label i, .btm-jrlegend-avg i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; }
.btm-jrlegend label:not(.on) { color: var(--btm-muted, #6b7280); }
.btm-jrlegend-avg { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--btm-muted, #6b7280); }
.btm-jrlegend-avg i { background: repeating-linear-gradient(90deg, #9a9893 0 5px, transparent 5px 8px); }
/* sponsor logos (Setup tab) */
.btm-upload { position: relative; overflow: hidden; cursor: pointer; }
.btm-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.btm-upload[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btm-sponsor-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 8px 0; }
.btm-sponsor { border: 1px solid var(--btm-line); border-radius: 8px; padding: 8px; display: grid; gap: 6px; }
.btm-sponsor-img { height: 70px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 4px; }
.btm-sponsor-img img { max-height: 64px; max-width: 100%; object-fit: contain; }
.btm-sponsor input { width: 100%; box-sizing: border-box; min-width: 0; }
/* Category filters (Results and Brackets tabs) */
.btm-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.btm-res-sess { margin: 18px 4px 6px; font-size: 15px; }
.btm-bd-others { margin: 4px 0 10px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.btm-bd-others small { color: var(--btm-muted); }
.btm-offreport { margin: 0 0 12px 16px; vertical-align: top; }
.btm-eventlogo-img img { max-height: 70px; max-width: 220px; display: block; border: 1px solid var(--btm-border, #ddd); border-radius: 4px; background: #fff; padding: 4px; }
.btm-sponsor-pr { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.btm-sponsor-pr select { font-size: 12px; }
.btm-sp-matrix td.btm-num, .btm-sp-matrix th.btm-num { text-align: center; }
.btm-sponsor-p1 { border-color: #c8102e !important; }
.btm-dlbar { gap: 8px; flex-wrap: wrap; }
/* Medal column headings: the same Gold / Silver / Bronze labels as the brackets */
.btm-medal .btm-mt-lbl { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.btm-mt-short { display: none; }
.btm-medal-table th .btm-medal, .btm-mt th .btm-medal { font-size: 12px; padding: 2px 9px; }
@media (max-width: 560px) { .btm-mt th .btm-mt-lbl { display: none; } .btm-mt th .btm-mt-short { display: inline; } }
/* ----- Pick the winner (public) ----- */
.btm-pk { max-width: 860px; }
.btm-pk-head h2 { margin: 0 0 2px; }
.btm-pk-acct { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--btm-line, #ddd); border-radius: 10px; background: var(--btm-chip, #f6f7f7); }
.btm-pk-acct label { display: block; margin-bottom: 6px; } .btm-pk-acct small { font-weight: normal; color: var(--btm-muted, #646970); }
.btm-pk-in { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.btm-pk-row { display: flex; gap: 8px; flex-wrap: wrap; } .btm-pk-row input { flex: 1 1 220px; min-width: 0; padding: 8px 10px; font-size: 15px; border: 1px solid #8c8f94; border-radius: 6px; }
.btm-pk-btn { padding: 8px 14px; border: 0; border-radius: 6px; background: #c8102e; color: #fff; font-weight: 700; cursor: pointer; font-size: 14px; }
.btm-pk-btn:disabled { opacity: .6; cursor: progress; }
.btm-pk-err { color: #b32d2e; margin: 6px 0 0; font-weight: 600; } .btm-pk-small { font-size: 12.5px; color: var(--btm-muted, #646970); margin: 6px 0; }
.btm-pk-note { padding: 8px 12px; border-radius: 8px; margin: 8px 0; } .btm-pk-note.ok { background: #edfaef; border: 1px solid #68de7c; } .btm-pk-note.bad { background: #fcf0f1; border: 1px solid #f86368; }
.btm-pk-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 10px 0 4px; } .btm-pk-tools select { max-width: 100%; }
.btm-pk-list { display: grid; gap: 10px; }
.btm-pk-bout { border: 1px solid var(--btm-line, #ddd); border-radius: 10px; padding: 8px 10px; background: var(--btm-bg, #fff); }
.btm-pk-bout.locked { opacity: .92; }
.btm-pk-h { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--btm-muted, #50575e); margin-bottom: 6px; flex-wrap: wrap; }
.btm-pk-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
.btm-pk-vs { align-self: center; font-size: 12px; color: var(--btm-muted, #646970); }
.btm-pk-side { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; padding: 8px 10px; border-radius: 8px; border: 2px solid transparent; background: var(--btm-chip, #f6f7f7); font: inherit; color: inherit; min-height: 52px; }
button.btm-pk-side { cursor: pointer; } button.btm-pk-side:hover { border-color: #8c8f94; }
.btm-pk-red { border-left: 5px solid #c8102e; } .btm-pk-blue { border-left: 5px solid #0b4ea2; }
.btm-pk-side.on.btm-pk-red { border-color: #c8102e; background: #fdecee; } .btm-pk-side.on.btm-pk-blue { border-color: #0b4ea2; background: #e8f0fb; }
.btm-pk-side.won .btm-pk-nm::after { content: " 🏆"; }
.btm-pk-nm { font-weight: 700; } .btm-pk-af { font-size: 12px; color: var(--btm-muted, #646970); }
.btm-pk-mark { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: #1d2327; color: #fff; margin-top: 2px; }
.btm-pk-mark.ok { background: #008a20; } .btm-pk-mark.no { background: #b32d2e; }
.btm-pk-st { font-size: 13px; margin-top: 6px; }
.btm-pk-crowd { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 6px; background: #ddd; } .btm-pk-crowd .r { background: #c8102e; } .btm-pk-crowd .b { background: #0b4ea2; }
.btm-pk-crowdt { font-size: 11.5px; color: var(--btm-muted, #646970); margin-top: 2px; }
.btm-pk-mine { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: #fff8e5; border: 1px solid #f0c33c; }
.btm-pk-lb tr.me td { background: #fff8e5; font-weight: 700; } .btm-pk-lb td.n, .btm-pk-lb th.n { text-align: right; }
@media (max-width: 520px) { .btm-pk-sides { grid-template-columns: 1fr; } .btm-pk-vs { justify-self: center; } }
.btm-pk-note.test { background: #f0f6fc; border: 1px solid #72aee6; }
.btm-danger-link { color: #b32d2e !important; margin-left: 8px; }
/* Sides that cannot be picked (closed, decided, boxers not known, not signed in): plain text, not button-like */
div.btm-pk-side { background: transparent; border: 0; border-left: 3px solid transparent; border-radius: 0; padding: 2px 10px; min-height: 0; cursor: default; }
div.btm-pk-side.btm-pk-red { border-left-color: #c8102e; } div.btm-pk-side.btm-pk-blue { border-left-color: #0b4ea2; }
div.btm-pk-side.on.btm-pk-red, div.btm-pk-side.on.btm-pk-blue { background: transparent; border-top: 0; border-right: 0; border-bottom: 0; }
div.btm-pk-side .btm-pk-nm { font-weight: 600; }
div.btm-pk-side.won .btm-pk-nm { font-weight: 800; }
.btm-pk-bout:not(:has(button.btm-pk-side)) { background: var(--btm-chip, #f6f7f7); }
.btm-pk-bout { background: #fff; }
.btm-pk-bout:not(:has(button.btm-pk-side)) { background: #f6f7f7; }
button.btm-pk-side { background: #fff; border: 1px solid #c3c4c7; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
button.btm-pk-side.btm-pk-red { border-left: 5px solid #c8102e; } button.btm-pk-side.btm-pk-blue { border-left: 5px solid #0b4ea2; }
button.btm-pk-side:hover { border-color: #646970; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
button.btm-pk-side.on.btm-pk-red { border: 2px solid #c8102e; border-left-width: 5px; background: #fdecee; } button.btm-pk-side.on.btm-pk-blue { border: 2px solid #0b4ea2; border-left-width: 5px; background: #e8f0fb; }
/* Bracket tree (Brackets tab, draw sheets, brackets PDF): bout cards joined by lines */
.btm-tree { display: flex; gap: 36px; overflow-x: auto; padding: 2px 4px 10px; align-items: stretch; }
.btm-tcol { display: flex; flex-direction: column; flex: none; width: 236px; }
.btm-tcol > .btm-round-h { height: 20px; }
.btm-tcol-b { flex: 1; display: flex; flex-direction: column; }
.btm-tpair { flex: 1; display: flex; flex-direction: column; position: relative; }
.btm-tcell { flex: 1; display: flex; align-items: center; position: relative; padding: 4px 0; }
.btm-tcell > .btm-bout { width: 100%; }
.btm-tpair::after { content: ''; position: absolute; right: -19px; top: 25%; bottom: 25%; width: 18px; border-top: 1.5px solid var(--btm-muted); border-right: 1.5px solid var(--btm-muted); border-bottom: 1.5px solid var(--btm-muted); border-radius: 0 6px 6px 0; opacity: .55; pointer-events: none; }
.btm-tpair-last::after, .btm-tpair-open::after { display: none; }
.btm-tcol + .btm-tcol .btm-tcell::before { content: ''; position: absolute; left: -18px; top: 50%; width: 18px; border-top: 1.5px solid var(--btm-muted); opacity: .55; }
.btm-tcol + .btm-tcol .btm-tcell-ph::before { display: none; }
.btm-rounds-after { margin-top: 10px; }
@media (max-width: 700px) { .btm-tcol { width: 196px; } .btm-tree { gap: 30px; } }
@media print { .btm-tree { overflow: visible; } }
/* the same colours on the public site as in the app: red / blue corners, the winner shaded */
.btm-pub .btm-bout .btm-corner.btm-win { background: var(--btm-win-bg); }
.btm-pub .btm-bout .btm-corner.btm-win .btm-name { font-weight: 700; }
.btm-rematch ul { margin: 6px 0 0 18px; padding: 0; } .btm-rematch li { margin: 4px 0; } .btm-rematch .btm-btn-small { margin: 0 0 0 6px; }
.btm-bd-rematch .btm-banner { margin: 6px 0; }
/* bout dialog: one corner per line, so long choices ("Loser of Bout 81: NAME · 1 bout · ⚠ already met …") stay readable */
.btm-modal.btm-boutdlg { max-width: 640px; }
.btm-bd-corners { grid-template-columns: 1fr; gap: 2px; }

/* ---------- Daily medical check & weigh-in (tablets and admin) ---------- */
.btm-ci-views { margin-bottom: 12px; }
.btm-med-page { margin: 0; background: var(--btm-bg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--btm-text); }
.btm-med-exam .btm-med-doc { flex-wrap: nowrap; }
.btm-med { max-width: 1280px; margin: 0 auto; padding: 12px; box-sizing: border-box; font-size: 15px; }
.btm-med-center { max-width: 520px; margin: 40px auto; text-align: center; }
.btm-med-center form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.btm-med-center input[type=text] { font-size: 18px; padding: 8px 10px; min-width: 240px; }
.btm-med-err { color: var(--btm-err); }
.btm-med-ok { background: var(--btm-ok-bg); color: var(--btm-ok); padding: 8px 10px; border-radius: 6px; margin: 8px 0; font-weight: 600; }
.btm-med-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.btm-med-role { font-weight: 700; font-size: 18px; color: var(--btm-accent); }
.btm-med-t { color: var(--btm-muted); }
.btm-med-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btm-med-tools select, .btm-med input[type=search] { font-size: 15px; padding: 6px 8px; }
.btm-med-who { font-weight: 600; }
.btm-linkbtn { background: none; border: 0; color: var(--btm-blue); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
.btm-med-grid { display: grid; grid-template-columns: minmax(230px, 340px) 1fr; gap: 12px; align-items: start; }
.btm-med-list input[type=search] { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
.btm-med-list ul { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 170px); overflow: auto; }
.btm-med-list li button { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n d" "s d"; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--btm-line); padding: 10px 6px; cursor: pointer; font: inherit; color: inherit; min-height: 52px; }
.btm-med-list li button.on { background: var(--btm-chip); box-shadow: inset 3px 0 0 var(--btm-accent); }
.btm-med-nm { grid-area: n; font-weight: 600; }
.btm-med-list .btm-med-sub { grid-area: s; }
.btm-med-dots { grid-area: d; display: flex; gap: 4px; align-items: center; }
.btm-med-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--btm-line); background: #fff; display: inline-block; }
.btm-med-dots i.me { outline: 2px solid var(--btm-muted); outline-offset: 1px; }
.btm-med-dots i.done { background: #2fa565; border-color: #2fa565; }
.btm-med-dots i.warn { background: #2fa565; border-color: #e08a00; box-shadow: inset 0 0 0 3px #f4b400; }
.btm-med-dots i.bad { background: var(--btm-err); border-color: var(--btm-err); }
.btm-med-sub { color: var(--btm-muted); font-size: 13px; }
.btm-med-wd { opacity: .55; }
.btm-med-head h2 { margin: 0 0 2px; }
.btm-med-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 10px 0; }
.btm-med-strip > div { border: 1px solid var(--btm-line); border-radius: 6px; padding: 4px 6px; min-height: 38px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.btm-med-strip b { font-size: 12px; line-height: 1.2; overflow-wrap: anywhere; }
.btm-med-strip span { font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.btm-med-cell.done { background: #d6f5dd; }
.btm-med-cell.warn { background: #d6f5dd; color: #8a4b00; font-weight: 600; }
.btm-med-cell.bad { background: #f8d4d4; color: var(--btm-err); font-weight: 600; }
.btm-med-dash td.btm-med-cell { min-width: 90px; }
.btm-med-chip-ready { background: #d6f5dd; }
.btm-med-doc { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--btm-line); flex-wrap: wrap; }
.btm-med-doc a { margin-right: 10px; font-size: 13px; }
.btm-med-info { font-size: 13px; margin-right: 8px; }
.btm-med-info.ok { color: var(--btm-ok); } .btm-med-info.bad { color: var(--btm-err); font-weight: 600; }
.btm-med .btm-seg, .btm-med-detail .btm-seg { margin: 0; }
.btm-med .btm-seg button { padding: 10px 16px; font-size: 15px; min-width: 96px; }
.btm-seg button.on.ok { background: #1e7f4f; color: #fff; }
.btm-seg button.on.bad { background: var(--btm-err); color: #fff; }
.btm-seg-lg button { font-weight: 700; }
.btm-med-lbl { display: block; margin: 10px 0; font-size: 14px; }
.btm-med-lbl textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font: inherit; }
.btm-med-entry { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 10px 0; }
.btm-med-entry label { display: flex; flex-direction: column; font-size: 13px; gap: 2px; }
.btm-med-entry input { font-size: 24px; width: 110px; padding: 6px 8px; }
.btm-med-entry > span { font-size: 28px; padding-bottom: 6px; }
.btm-med-entry .btm-btn { min-height: 46px; }
.btm-med-readings tr.bad td:first-child { color: var(--btm-err); }
.btm-med-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.btm-med-cols h3 { margin-top: 18px; }
.btm-med-decide { display: flex; align-items: center; gap: 12px; margin: 10px 0; flex-wrap: wrap; }
.btm-med-notes { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow: auto; }
.btm-med-notes li { border-left: 3px solid var(--btm-line); padding: 4px 10px; margin: 8px 0; }
.btm-med-note { white-space: normal; }
.btm-med-qr { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-top: 12px; padding: 12px; border: 1px solid var(--btm-line); border-radius: 8px; }
.btm-med-qr svg { width: 240px; height: 240px; }
.btm-med-h { margin: 0 8px 0 0; }
.btm-med-set { display: flex; gap: 16px; flex-wrap: wrap; }
.btm-med-set fieldset { border: 1px solid var(--btm-line); border-radius: 6px; padding: 8px 12px; }
.btm-med-set label { display: block; margin: 6px 0; }
.btm-med-set input[type=number] { width: 70px; }
.btm-med-set textarea { width: 360px; max-width: 100%; }
@media (max-width: 1000px) { .btm-med-cols { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .btm-med-grid { grid-template-columns: 1fr; } .btm-med-list ul { max-height: 40vh; } }

/* medal table adjusted for registrations */
.btm-mt-switches { display: flex; gap: 10px; flex-wrap: wrap; }
.btm-mt-adj .btm-mt-w { width: 84px; }
.btm-mt-adj tr.btm-mt-none td { color: var(--btm-muted); }
@media (max-width: 700px) { .btm-mt-adj .btm-mt-w { width: 56px; font-size: 12px; } }

/* Pick the winner tab in testing mode */
.btm-pub-tabs button.btm-ptab-test { background: repeating-linear-gradient(135deg, #fff4d6 0 8px, #ffe7a3 8px 16px); border: 2px dashed #b7791f; color: #6b4300; font-weight: 700; }
.btm-pub-tabs button.btm-ptab-test.on { background: repeating-linear-gradient(135deg, #b7791f 0 8px, #9a6418 8px 16px); border: 2px dashed #6b4300; color: #fff; }

/* round-robin grid above the bout list (website draw sheets) */
.btm-class .btm-rrgrid { width: auto; min-width: 360px; }
.btm-class .btm-rrgrid td.btm-c, .btm-class .btm-rrgrid th.btm-c { min-width: 38px; }

/* ringside doctors list */
.btm-doctors input { width: 100%; min-width: 110px; box-sizing: border-box; }
.btm-doctors input.btm-doc-addr { min-width: 220px; }
.btm-doctors input.btm-doc-miss { border-color: #d63638; }
.btm-doctors tr.btm-doc-warn td { color: #b32d2e; font-size: 12px; padding-top: 0; border-top: 0; }
.btm-med-nameform { text-align: left; max-width: 420px; margin: 0 auto; }
.btm-med-nameform select, .btm-med-nameform input[type=text] { width: 100%; box-sizing: border-box; font-size: 17px; padding: 6px; margin-top: 4px; }

/* blood pressure number pad */
.btm-kp { max-width: 440px; margin: 10px 0; }
.btm-kp-fields { display: flex; align-items: flex-end; gap: 8px; }
.btm-kp-f { display: flex; flex-direction: column; font-size: 13px; gap: 2px; flex: 1; cursor: pointer; }
.btm-app .btm-kp-f input, .btm-kp-f input { font-size: 30px; font-weight: 700; text-align: center; width: 100%; box-sizing: border-box; padding: 6px 4px; border: 2px solid var(--btm-line); border-radius: 8px; caret-color: transparent; }
.btm-app .btm-kp-f.on input, .btm-kp-f.on input { border-color: var(--btm-blue); box-shadow: 0 0 0 3px rgba(11,78,162,.18); }
.btm-kp-sl { font-size: 32px; padding-bottom: 8px; color: var(--btm-muted); }
.btm-kp-hint { min-height: 22px; font-size: 14px; margin: 6px 0; font-weight: 600; }
.btm-kp-hint .ok { color: var(--btm-ok); } .btm-kp-hint .bad { color: var(--btm-err); }
.btm-kp-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.btm-kp-k { font: inherit; font-size: 30px; font-weight: 600; min-height: 64px; border: 1px solid var(--btm-line); border-radius: 10px; background: #fff; color: var(--btm-text); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.btm-kp-k:active { background: #e6eefb; }
.btm-kp-k.fn { font-size: 20px; background: var(--btm-chip); }
.btm-kp-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btm-kp-actions .btm-kp-go { flex: 1; min-height: 52px; font-size: 17px; }

/* ---- Tablet pages (daily medical check) sized to fit an 8.7" tablet (Lenovo Tab One: 1340 × 800) ---- */
html.btm-tablet .btm-med-page { height: 100dvh; overflow: hidden; }
html.btm-tablet .btm-med { height: 100dvh; max-width: none; display: flex; flex-direction: column; overflow: auto; padding: 8px 10px; }
html.btm-tablet .btm-med-top { flex: none; margin-bottom: 8px; }
html.btm-tablet .btm-med-role { font-size: 16px; }
html.btm-tablet .btm-med-grid { flex: 1; min-height: 0; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: stretch; gap: 10px; }
html.btm-tablet .btm-med-grid > .btm-card { margin: 0; min-height: 0; }
html.btm-tablet .btm-med-list { display: flex; flex-direction: column; padding: 8px; }
html.btm-tablet .btm-med-list ul { flex: 1; min-height: 0; max-height: none; }
html.btm-tablet .btm-med-detail { overflow-y: auto; padding: 10px 12px; -webkit-overflow-scrolling: touch; }
html.btm-tablet .btm-med-cols { gap: 14px; }
html.btm-tablet .btm-kp { margin: 6px 0; }
html.btm-tablet .btm-kp-k { min-height: clamp(46px, 7.6dvh, 66px); font-size: clamp(22px, 3.6dvh, 30px); }
html.btm-tablet .btm-kp-pad { gap: 6px; }
html.btm-tablet .btm-app .btm-kp-f input, html.btm-tablet .btm-kp-f input { font-size: clamp(22px, 4dvh, 30px); padding: 4px; }
html.btm-tablet .btm-kp-actions .btm-kp-go { min-height: clamp(44px, 7dvh, 54px); }
/* held upright: athlete list on top, the selected athlete below */
@media (orientation: portrait) {
  html.btm-tablet .btm-med-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 30%) minmax(0, 1fr); }
  html.btm-tablet .btm-med-list li button { min-height: 44px; padding: 6px; }
  html.btm-tablet .btm-kp-k { min-height: clamp(44px, 6.2dvh, 62px); }
  html.btm-tablet .btm-kp { max-width: none; }
}
@media (orientation: landscape) and (max-height: 700px) {
  html.btm-tablet .btm-med-head h2 { font-size: 18px; }
  html.btm-tablet .btm-med-cols { grid-template-columns: 1fr 1fr; }
}

/* full screen helpers (tablet pages) */
.btm-fs-btn { position: fixed; right: 8px; bottom: 8px; z-index: 50; width: 34px; height: 34px; border-radius: 8px; border: 1px solid #c3c4c7; background: rgba(255,255,255,.85); color: #1d2327; font-size: 18px; line-height: 1; cursor: pointer; opacity: .7; }
.btm-fs-btn.on { opacity: .35; }
.btm-fs-cover { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(20, 24, 30, .78); color: #fff; text-align: center; cursor: pointer; }
.btm-fs-cover-i { font-size: 64px; line-height: 1; }
.btm-fs-cover-t { font-size: 30px; font-weight: 700; margin: 10px 0 6px; }
.btm-fs-cover-s { font-size: 15px; opacity: .85; max-width: 420px; margin: 0 auto; }

/* 📷 scan a new QR code (tablet pages) */
.btm-qr-btn { position: fixed; right: 50px; bottom: 8px; z-index: 50; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid #c3c4c7; background: rgba(255,255,255,.88); color: #1d2327; font: 13px/1 system-ui, sans-serif; cursor: pointer; opacity: .8; }
.btm-qr-modal { position: fixed; inset: 0; z-index: 120; background: rgba(20,24,30,.72); display: flex; align-items: center; justify-content: center; padding: 16px; font-family: system-ui, sans-serif; }
.btm-qr-box { background: #fff; color: #1d2327; border-radius: 12px; padding: 18px 20px; max-width: 520px; width: 100%; box-sizing: border-box; max-height: 100%; overflow: auto; }
.btm-qr-box h3 { margin: 0 0 8px; font-size: 20px; }
.btm-qr-box p { font-size: 15px; line-height: 1.45; margin: 6px 0; }
.btm-qr-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.btm-qr-acts button { font: inherit; font-size: 16px; padding: 10px 16px; border-radius: 8px; border: 1px solid #c3c4c7; background: #f6f7f7; cursor: pointer; min-height: 46px; }
.btm-qr-acts .btm-qr-yes { background: #c8102e; border-color: #c8102e; color: #fff; font-weight: 600; }
.btm-qr-cam { position: relative; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; max-height: 55dvh; margin: 8px auto; }
.btm-qr-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.btm-qr-frame { position: absolute; inset: 18% 22%; border: 3px solid rgba(255,255,255,.9); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.btm-qr-msg.bad { color: #b32d2e; font-weight: 600; }

/* ---------- tablet link icon (green in use · orange problem · red not linked) and battery ---------- */
.btm-link { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; vertical-align: middle; flex: none; }
.btm-link-svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btm-link-green { background: #1e8e3e; }
.btm-link-orange { background: #e37400; animation: btm-link-pulse 1.4s ease-in-out infinite; }
.btm-link-red { background: #c5221f; }
@keyframes btm-link-pulse { 50% { box-shadow: 0 0 0 5px rgba(227, 116, 0, .25); } }
@media (prefers-reduced-motion: reduce) { .btm-link-orange { animation: none; } }
.btm-bat { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; vertical-align: middle; }
.btm-bat svg { width: 24px; height: 12px; }
.btm-bat .o { fill: none; stroke: currentColor; stroke-width: 1.5; }
.btm-bat .t { fill: currentColor; }
.btm-bat .f { fill: currentColor; }
.btm-bat-ok { color: #1e8e3e; } .btm-bat-mid { color: #b06000; } .btm-bat-low { color: #c5221f; font-weight: 700; } .btm-bat-chg { color: #1a73e8; } .btm-bat-na { color: #8c8f94; }
.btm-med-link { display: inline-flex; align-items: center; gap: 6px; }
.btm-med-link .btm-link { width: 22px; height: 22px; } .btm-med-link .btm-link-svg { width: 14px; height: 14px; }
.btm-table .btm-link { width: 20px; height: 20px; } .btm-table .btm-link-svg { width: 13px; height: 13px; }
/* Tablets & battery screen */
.btm-pw .btm-help .btm-link { width: 18px; height: 18px; } .btm-pw .btm-help .btm-link-svg { width: 12px; height: 12px; }
.btm-pw-sum { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 6px 0 10px; font-weight: 600; }
.btm-pw-sum > span { display: inline-flex; align-items: center; gap: 5px; }
.btm-pw-low { color: #c5221f; font-weight: 600; }
.btm-pw-list { display: grid; gap: 6px; }
.btm-pw-row { border: 1px solid var(--btm-line, #dcdcde); border-radius: 8px; background: var(--btm-card, #fff); overflow: hidden; }
.btm-pw-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.btm-pw-head:hover { background: rgba(0, 0, 0, .03); }
.btm-pw-n { flex: 1; min-width: 0; font-weight: 600; }
.btm-pw-n small { display: block; font-weight: 400; color: #646970; font-size: 12px; }
.btm-pw-head .btm-bat { font-size: 14px; } .btm-pw-head .btm-bat svg { width: 30px; height: 15px; }
.btm-pw-c { padding: 0 10px 6px; }
.btm-pw-ch { display: block; max-width: 100%; }
.btm-pw-ch .g { stroke: #e0e0e0; stroke-width: 1; }
.btm-pw-ch .ln { fill: none; stroke: #1a73e8; stroke-width: 2; }
.btm-pw-ch .chg { fill: rgba(26, 115, 232, .12); }
.btm-pw-ch .fl { stroke: #e37400; stroke-width: 2; }
.btm-pw-ch .ax { font-size: 10px; fill: #646970; }
.btm-pw-ch .none { font-size: 12px; }

/* ---------- sanction requests ---------- */
.btm-sx .btm-card-h h2 .btm-badge { vertical-align: middle; margin-left: 6px; }
.btm-sx-target { align-items: flex-end; }
.btm-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--btm-line); border-radius: 8px; padding: 2px; gap: 2px; margin-bottom: 8px; }
.btm-seg button { border: 0; background: none; padding: 6px 12px; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 600; color: var(--btm-muted, #646970); cursor: pointer; }
.btm-seg button.on { background: #c8102e; color: #fff; }
.btm-seg button:disabled { cursor: default; }
.btm-sx-steps { list-style: none; padding: 0; margin: 10px 0 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.btm-sx-steps button { width: 100%; text-align: left; border: 1px solid var(--btm-line); background: var(--btm-card); border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 12px; line-height: 1.3; color: var(--btm-muted, #646970); cursor: pointer; }
.btm-sx-steps button b { display: block; font-size: 12px; }
.btm-sx-steps button.on { border-color: #c8102e; color: #c8102e; background: rgba(200, 16, 46, .06); }
@media (max-width: 640px) { .btm-sx-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.btm-sx-step { margin: 6px 0 16px; }
.btm-sx-step h3 { margin: 16px 0 8px; font-size: 16px; }
.btm-sx-cl { max-width: 72ch; padding-left: 22px; line-height: 1.5; }
.btm-sx-cl li { margin-bottom: 6px; }
.btm-sx-sig { border-top: 1px solid var(--btm-line); padding-top: 10px; margin-top: 10px; }
.btm-sx-q { margin: 8px 0; padding: 8px 12px; border-left: 4px solid #c8102e; background: rgba(0, 0, 0, .03); font-weight: 600; }
.btm-sx-q.b { border-left-color: #1d2327; }
.btm-sx-poster { max-height: 180px; border: 1px solid var(--btm-line); border-radius: 6px; margin: 6px 0; }
.btm-sx-wc { display: grid; gap: 6px; }
.btm-sx-wcr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.btm-sx-wcn { width: 150px; font-weight: 600; font-size: 13px; }
.btm-sx-chip { display: inline-flex; align-items: center; border: 1px solid var(--btm-line); border-radius: 14px; padding: 3px 9px; font-size: 12px; cursor: pointer; user-select: none; }
.btm-sx-chip input { position: absolute; opacity: 0; pointer-events: none; }
.btm-sx-chip.on { background: #c8102e; border-color: #c8102e; color: #fff; }
.btm-sx-foot { border-top: 1px solid var(--btm-line); padding-top: 12px; margin-top: 10px; }
.btm-sx-why { color: var(--btm-err); font-size: 12px; margin-top: 2px; }
.btm-sx-sum { margin: 6px 0 10px; }
.btm-sx-dec { margin: 8px 0; }
.btm-sx-deny { border: 1px solid var(--btm-err); border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.btm-sx-office { border: 2px dashed var(--btm-line); border-radius: 8px; padding: 4px 12px 12px; }
.btm-sx-set { margin-top: 14px; }
.btm-sx-set summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.btm-req { color: var(--btm-err); }
.btm-badge-err { background: var(--btm-err-bg); color: var(--btm-err); }
.btm-grow { flex: 1 1 260px; }

/* ---------- 24-hour pre-bout declarations ---------- */
.btm-pb-days { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.btm-pb-day { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--btm-line); border-radius: 8px; padding: 6px; background: var(--btm-card); }
.btm-pb-day.on { border-color: #c8102e; box-shadow: 0 0 0 1px #c8102e inset; }
.btm-pb-dayb { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: none; font: inherit; font-size: 12px; text-align: left; cursor: pointer; color: inherit; padding: 2px 4px; }
.btm-pb-dayb strong { font-size: 13px; }
.btm-pb-c { text-align: center; white-space: nowrap; }
.btm-pb-c.done { color: var(--btm-ok); font-weight: 700; background: var(--btm-ok-bg); }
.btm-pb-c.na { color: var(--btm-muted); }
.btm-pb-miss { color: var(--btm-err); font-size: 12px; }
.btm-pb-ce { display: grid; gap: 4px; min-width: 220px; }
.btm-pb-ce input, .btm-pb-ce select { font-size: 13px; padding: 4px 6px; }
.btm-pb-qr { max-width: 280px; margin: 0 auto; }
.btm-pb-url { text-align: center; }
.btm-btn-sm { padding: 3px 8px; font-size: 12px; }
.btm-med-cell.warn { background: var(--btm-warn-bg); color: var(--btm-warn); font-size: 12px; }
.btm-med-pb .btm-med-pbl { list-style: none; padding: 0; margin: 4px 0; }
.btm-med-pbl > li { padding: 4px 0; border-bottom: 1px solid var(--btm-line); }
.btm-med-pbl > li.ok { color: var(--btm-ok); }
.btm-med-pbl > li.miss { color: var(--btm-err); }
.btm-med-pbl > li.flag { color: var(--btm-warn); font-weight: 600; }
.btm-med-pbl ul { margin: 4px 0 0 18px; padding: 0; font-weight: 400; color: var(--btm-text); }
/* the boxer's / coach's page */
.btm-pbf-top { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; }
.btm-pbf-top h1 { font-size: 20px; margin: 0; }
.btm-pbf-top .btm-pbf-lang, .btm-pbf-top .btm-lang { margin-left: auto; }
.btm-pbf-logo { width: 44px; height: 44px; border-radius: 10px; background: #c8102e; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.btm-pbf-b h2 { margin: 0 0 2px; }
.btm-pbf-part { border: 1px solid var(--btm-line); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.btm-pbf-ph { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.btm-pbf-ph h3 { margin: 0; font-size: 16px; }
.btm-pbf-qs { padding-left: 20px; margin: 10px 0; }
.btm-pbf-qs li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--btm-line); }
.btm-pbf-qs li > span:first-child { flex: 1 1 260px; }
.btm-pbf-yn { display: inline-flex; gap: 6px; }
.btm-pbf-yn button { min-width: 64px; min-height: 40px; border: 1px solid var(--btm-line); background: var(--btm-card); border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.btm-pbf-yn button.on.ok { background: var(--btm-ok); border-color: var(--btm-ok); color: #fff; }
.btm-pbf-yn button.on.warn { background: #e37400; border-color: #e37400; color: #fff; }
.btm-pbf-ack { align-items: flex-start; padding: 6px 0; line-height: 1.4; }
.btm-pbf-sig { font-style: italic; font-weight: 600; font-size: 16px; }
.btm-bat-left { font-weight: 700; color: #c5221f; margin-left: 2px; }
.btm-tb-low { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; }
td[data-tb-sr] .btm-link { width: 22px; height: 22px; } td[data-tb-sr] .btm-link-svg { width: 14px; height: 14px; }
/* ringside doctor: per-bout medicals */
.btm-med-bout { border: 1px solid var(--btm-line); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; }
.btm-med-bout h3 { margin: 2px 0 8px; }
.btm-med-bk h4 { margin: 4px 0 8px; font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.btm-med-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.btm-med-flag { border: 1px solid var(--btm-line); background: var(--btm-card); color: inherit; border-radius: 16px; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; min-height: 36px; }
.btm-med-flag.on { background: var(--btm-warn-bg); border-color: #e37400; color: var(--btm-warn); font-weight: 600; }
.btm-med-post { flex-wrap: wrap; }
.btm-med-ctx ul { margin: 4px 0 10px; padding-left: 18px; font-size: 14px; }
.btm-med-cell.bad { background: var(--btm-err-bg); color: var(--btm-err); }
.btm-med-paper { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.btm-med-pp { font-size: 12px; white-space: nowrap; }
.btm-pb-c.pending { color: var(--btm-muted); }
.btm-pbf-qr { max-width: 260px; margin: 8px auto; background: #fff; padding: 6px; border-radius: 8px; }
.btm-pbf-qr svg { display: block; width: 100%; height: auto; }
.btm-pbf-qrw { text-align: center; }
.btm-med-auto { font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; max-width: 260px; }
.btm-med-auto.ok { background: var(--btm-ok-bg); color: var(--btm-ok); }
.btm-med-auto.bad { background: var(--btm-warn-bg); color: var(--btm-warn); }

/* ---------- TV overlay settings (Live scoring tab) ---------- */
.btm-ov-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.6fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .btm-ov-grid { grid-template-columns: 1fr; } }
.btm-ov-set h3 { margin: 12px 0 6px; font-size: 14px; }
.btm-ov-set h3:first-child { margin-top: 0; }
.btm-ov-rng { display: flex; align-items: center; gap: 8px; } .btm-ov-rng input { flex: 1; } .btm-ov-rng b { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.btm-ov-pv iframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--btm-line); border-radius: 8px; background: #222; display: block; position: sticky; top: 10px; }
.btm-ov-img { margin-top: 14px; } .btm-ov-img summary { cursor: pointer; font-weight: 600; }
.btm-ov-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.btm-ov-im { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; font-size: 13px; }
.btm-ov-im img, .btm-ov-ph { grid-row: span 2; width: 40px; height: 28px; object-fit: contain; border-radius: 3px; background: var(--btm-line); }
.btm-ov-im input { font-size: 12px; padding: 3px 6px; min-width: 0; }
.btm-ov-wm { border: 1px solid var(--btm-line); border-radius: 8px; padding: 10px 12px; margin: 10px 0; background: var(--btm-soft, rgba(0,0,0,.02)); }
.btm-ov-wm p { margin: 0 0 8px; } .btm-ov-wm p:last-child { margin: 0; }
.btm-ov-im small { font-size: 10px; }
.btm-offmail textarea { font: inherit; width: 100%; box-sizing: border-box; }
.btm-off-email { min-width: 14em; }
.btm-mailcheck { margin-top: 14px; border-top: 1px solid var(--btm-line); padding-top: 10px; }
.btm-mailcheck summary { cursor: pointer; }
.btm-mailcheck input[type=email] { min-width: 18em; }

/* ---- Visual draw (Draw tab › Visual draw): a big-screen view, one category at a time ---- */
.btm-ds { position: fixed; inset: 0; z-index: 100000; background: #0f1419; color: #f2f4f7; overflow: auto; max-width: none;
  --ds-red: #e0243f; --ds-blue: #2f6fe0; --ds-gold: #f2c94c; --ds-card: #1a222b; --ds-line: #2c3743; --ds-muted: #9aa6b2; font-size: 16px; }
.btm-ds-in { min-height: 100%; display: flex; flex-direction: column; padding: 14px 22px 18px; box-sizing: border-box; gap: 10px; }
.btm-ds .btm-btn { background: #24303b; border-color: #3a4856; color: #f2f4f7; }
.btm-ds .btm-btn:hover:not([disabled]) { border-color: #fff; }
.btm-ds .btm-btn-primary { background: var(--btm-accent); border-color: var(--btm-accent); }
.btm-ds select, .btm-ds input { background: #0f1419; color: #f2f4f7; border: 1px solid #3a4856; border-radius: 5px; padding: 5px 8px; font: inherit; font-size: 14px; }
.btm-ds-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btm-ds-title { font-size: 18px; margin-right: 6px; }
.btm-ds-count { color: var(--ds-muted); font-size: 14px; }
.btm-ds-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.btm-ds-head h2 { margin: 0; font-size: clamp(28px, 3.4vw, 54px); letter-spacing: .01em; }
.btm-ds-fmt { color: var(--ds-muted); font-size: clamp(15px, 1.4vw, 22px); }
.btm-ds-msg { min-height: 1.6em; font-size: clamp(18px, 1.8vw, 30px); font-weight: 700; color: var(--ds-gold); }
.btm-ds-body { display: grid; grid-template-columns: minmax(340px, 38%) 1fr; gap: 18px; flex: 1; align-items: start; }
@media (max-width: 900px) { .btm-ds-body { grid-template-columns: 1fr; } }
.btm-ds-list, .btm-ds-struct { background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.btm-ds-struct { overflow: auto; }
.btm-ds-list table { width: 100%; border-collapse: collapse; }
.btm-ds-list th { text-align: left; font-size: 12px; color: var(--ds-muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--ds-line); }
.btm-ds-list td { padding: 6px; border-bottom: 1px solid var(--ds-line); font-size: clamp(14px, 1.15vw, 19px); vertical-align: middle; transition: background .12s, opacity .3s; }
.btm-ds-list td.nm { font-weight: 700; }
.btm-ds-list input[type=number] { width: 4.2em; }
.btm-ds-list select { max-width: 11em; }
.btm-ds-list tr.hl td { background: #3b2f0b; }
.btm-ds-list tr.chosen td { background: #5a4410; color: #fff; }
.btm-ds-list tr.placed td { opacity: .45; }
.btm-ds-list td.over { color: #ff8a80; font-weight: 700; }
.btm-ds-list td.sp { color: var(--ds-gold); font-weight: 700; white-space: nowrap; }
.btm-ds .sd { display: inline-block; font-size: .72em; background: var(--ds-gold); color: #222; border-radius: 4px; padding: 0 5px; vertical-align: middle; }
.btm-ds-note { color: var(--ds-muted); font-size: 13px; margin: 8px 0 0; }
.btm-ds-note.over { color: #ff8a80; }
.btm-ds-struct h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ds-muted); }
.btm-ds-spot, .btm-ds-box { position: relative; border: 2px dashed #3a4856; border-radius: 8px; padding: 6px 10px; min-height: 2.6em; display: flex; flex-direction: column; justify-content: center; background: #121a22; transition: background .12s, border-color .12s, box-shadow .2s; box-sizing: border-box; }
.btm-ds-spot .k { position: absolute; left: -2px; top: -2px; font-size: 11px; font-weight: 700; color: var(--ds-muted); background: #0f1419; border-radius: 0 0 6px 0; padding: 0 5px; }
.btm-ds-spot .n { font-weight: 700; font-size: clamp(13px, 1.05vw, 18px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 14px; }
.btm-ds-spot .n.e { opacity: 0; }
.btm-ds-spot .s { font-size: 12px; color: var(--ds-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 14px; }
.btm-ds-spot.on { border-style: solid; border-color: #5b6b7b; background: #1f2b37; animation: btmDsIn .5s ease; }
.btm-ds-spot.bye { border-style: dotted; opacity: .5; }
.btm-ds-spot.bye .n { font-style: italic; font-weight: 400; color: var(--ds-muted); }
.btm-ds-spot.hl { border-color: var(--ds-gold); background: #3b2f0b; }
.btm-ds-spot.chosen { border: 2px solid var(--ds-gold); box-shadow: 0 0 0 4px rgba(242,201,76,.35); background: #3b2f0b; }
.btm-ds-box { border-style: solid; border-color: #26323e; color: var(--ds-muted); }
.btm-ds-box.adv { color: #f2f4f7; border-color: #5b6b7b; }
.btm-ds-box .n { font-weight: 600; font-size: clamp(12px, .95vw, 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes btmDsIn { from { box-shadow: 0 0 0 6px rgba(242,201,76,.6); } to { box-shadow: 0 0 0 0 rgba(242,201,76,0); } }
/* bracket: one column per round, pairs spread evenly so later rounds sit between their two feeders */
.btm-ds-bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 18px; min-height: calc(var(--rows) * 2.9em + 30px); }
.btm-ds-col { display: flex; flex-direction: column; min-width: 0; }
.btm-ds-colb { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 8px; }
.btm-ds-pair { display: flex; flex-direction: column; gap: 4px; padding-right: 10px; border-right: 2px solid #2c3743; border-radius: 0 6px 6px 0; }
.btm-ds-col:last-child .btm-ds-pair { border-right: 0; }
.btm-ds-pair .btm-ds-spot:first-child, .btm-ds-pair .btm-ds-box:first-child { border-left: 5px solid var(--ds-red); }
.btm-ds-pair .btm-ds-spot:last-child, .btm-ds-pair .btm-ds-box:last-child { border-left: 5px solid var(--ds-blue); }
/* round robin: start positions, then the bouts */
.btm-ds-rr { display: grid; grid-template-columns: minmax(220px, 34%) 1fr; gap: 18px; }
@media (max-width: 700px) { .btm-ds-rr { grid-template-columns: 1fr; } }
.btm-ds-rrpos { display: flex; flex-direction: column; gap: 8px; }
.btm-ds-rrround { margin-bottom: 12px; }
.btm-ds-rrround .rl { display: block; font-size: 12px; color: var(--ds-muted); font-weight: 700; margin-bottom: 4px; }
.btm-ds-rrbout { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 6px; }
.btm-ds-rrbout .c { border-radius: 6px; padding: 6px 10px; background: #121a22; border: 1px dashed #3a4856; color: var(--ds-muted); font-size: clamp(13px, 1.05vw, 18px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btm-ds-rrbout .c.on { color: #fff; font-weight: 700; border-style: solid; }
.btm-ds-rrbout .c.red.on { background: #4a1220; border-color: var(--ds-red); }
.btm-ds-rrbout .c.blue.on { background: #12284d; border-color: var(--ds-blue); }
.btm-ds-rrbout .vs { color: var(--ds-muted); font-size: 13px; }
.btm-ds-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 4px; }
.btm-ds-go { font-size: clamp(16px, 1.4vw, 22px); padding: 10px 26px; min-height: 48px; }
.btm-ds .btm-seg { margin: 0; border-color: #3a4856; }
.btm-ds .btm-seg button { background: #24303b; color: #f2f4f7; }
.btm-ds .btm-seg button.on { background: var(--btm-accent); }
.btm-ds-fly { position: fixed; z-index: 3; pointer-events: none; background: var(--ds-gold); color: #1d1d1d; font-weight: 800; padding: 8px 12px; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition-property: transform, width; transition-timing-function: cubic-bezier(.25,.8,.3,1); font-size: clamp(14px, 1.15vw, 19px); }
@media (prefers-reduced-motion: reduce) { .btm-ds-fly { transition-duration: 1ms !important; } .btm-ds-spot.on { animation: none; } }
.btm-ds .btm-ds-list input, .btm-ds .btm-ds-list select { background: #0f1419; color: #f2f4f7; border: 1px solid #3a4856; min-height: 34px; }
.btm-ds-list { overflow-x: auto; }
.btm-ds-list select { max-width: 9.5em; }
.btm-ds-body { grid-template-columns: minmax(420px, 44%) 1fr; }
@media (max-width: 900px) { .btm-ds-body { grid-template-columns: 1fr; } }
.btm-ds-list td:nth-child(3) { font-size: .85em; }
/* Visual draw: screen language (EN + FR), seed spots, same-province line */
.btm-ds .btm-ds-lang { margin: 0; }
.btm-ds .btm-ds-lang button { background: #1f2b37; color: #e8edf2; }
.btm-ds .btm-ds-lang button.on { background: #f5c542; color: #111; font-weight: 700; }
.btm-ds .bi-fr { display: block; font-size: .72em; opacity: .78; font-weight: inherit; letter-spacing: normal; }
.btm-ds h2 .bi-fr, .btm-ds .btm-ds-title .bi-fr, .btm-ds .vs .bi-fr, .btm-ds .btm-badge .bi-fr, .btm-ds .c .bi-fr { display: inline; font-size: inherit; }
.btm-ds h2 .bi-fr::before, .btm-ds .btm-ds-title .bi-fr::before, .btm-ds .vs .bi-fr::before, .btm-ds .btm-badge .bi-fr::before, .btm-ds .c .bi-fr::before { content: " / "; opacity: .6; }
.btm-ds h2 .bi-fr { font-weight: 400; opacity: .7; }
.btm-ds-msg .bi-fr { font-size: .8em; margin-top: 2px; }
.btm-ds-spot .sl { display: inline-block; font-size: 12px; font-weight: 800; color: #f5c542; border: 1px solid rgba(245, 197, 66, .55); border-radius: 4px; padding: 0 5px; line-height: 1.5; }
.btm-ds-note.btm-ds-mg { color: #9be7a4; font-size: 14px; }
.btm-ds-note.btm-ds-mg.warn { color: #f5c542; }
.btm-ds-how { max-width: 70ch; }
.btm-ds-spot .n.e.sk { opacity: 1; }
.btm-ds-spot.hl .sl, .btm-ds-spot.chosen .sl { background: #f5c542; color: #111; }
.btm-ds th .bi-fr, .btm-ds h4 .bi-fr { font-size: max(.72em, 10px); }
/* Visual draw: the group being drawn, and the next spot in the order */
.btm-ds-list tr.wait td { opacity: .35; }
.btm-ds-list tr.grp td { background: rgba(245, 197, 66, .07); }
.btm-ds-list tr.grp td:first-child { box-shadow: inset 4px 0 0 #f5c542; }
.btm-ds-spot.next { border: 2px solid var(--ds-gold, #f2c94c); background: #2a2410; }
.btm-ds-spot.bye .k { opacity: .7; }
/* Visual draw: expected tie-breaker bouts under the bracket */
.btm-ds-tb { margin-top: 14px; border-top: 1px solid #2a3642; padding-top: 10px; }
.btm-ds-tb h4 { margin: 0 0 8px; }
.btm-ds-tb .btm-ds-rrbout { grid-template-columns: minmax(110px, auto) 1fr auto 1fr; }
.btm-ds-tb .rl { font-size: 12px; font-weight: 700; color: var(--ds-muted); text-transform: uppercase; letter-spacing: .04em; }
.btm-ds-tb .c { white-space: normal; }
.btm-ds-tb .c .who { display: block; color: #e8edf2; font-size: .8em; font-weight: 600; margin-top: 2px; }
.btm-ds-tb .rl .bi-fr { display: block; text-transform: none; }
/* Officials: ring check (multi-ring sessions) */
.btm-ringcheck { margin: 8px 0; padding-left: 18px; }
.btm-ringcheck li { margin: 2px 0; }
.btm-warn-text { color: #b45309; }
.btm-modal .btm-ringcheck { max-height: 50vh; overflow: auto; text-align: left; }
/* Officials › Bout officials: the province flag under each referee / judge */
.btm-offflag { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 11px; color: var(--btm-muted, #666); line-height: 1; }
.btm-offflag img { height: 12px; width: auto; max-width: 22px; border: 1px solid rgba(0,0,0,.15); border-radius: 1px; }
/* Simplified interface switch, new-event mode, sanction card */
.btm-tabs .btm-mode-switch { margin-left: auto; background: none; border: 1px dashed var(--btm-line, #c3c4c7); color: var(--btm-muted, #646970); font-size: 12px; border-radius: 14px; padding: 4px 10px; cursor: pointer; align-self: center; }
.btm-tabs .btm-mode-switch:hover { color: var(--btm-text, #1d2327); border-style: solid; }
.btm-newmode { border: 0; padding: 0; margin: 8px 0 4px; display: grid; gap: 6px; text-align: left; }
.btm-newmode label { display: flex; gap: 6px; align-items: baseline; font-size: 14px; }
.btm-sanctioncard th { width: 210px; text-align: left; font-weight: 600; }

/* ringside doctor: forms and documents in pop-ups; the pre-bout check read-only */
.btm-med-forms { margin: 6px 0 10px; }
.btm-med-ro { background: #f6f7f8; border-radius: 8px; padding: 8px 12px; }
.btm-med-ro p { margin: 4px 0; }
.btm-med-pop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.btm-med-pop-in { background: #fff; color: #1d2327; border-radius: 12px; max-width: 760px; width: 100%; max-height: 90vh; overflow: auto; padding: 16px 20px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.btm-med-pop-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: -16px; background: #fff; padding: 4px 0 8px; }
.btm-med-pop-h h3 { margin: 0; }
.btm-med-qa { padding-left: 18px; } .btm-med-qa li { margin: 6px 0; } .btm-med-qa li.flag { color: #9a4b00; }
.btm-med-popdoc { margin: 10px 0; } .btm-med-popdoc img { display: block; max-width: 100%; margin-top: 6px; border: 1px solid #ddd; }
.btm-med-popdoc iframe { display: block; width: 100%; height: 60vh; margin-top: 6px; border: 1px solid #ddd; }

/* visual draw: an empty spot is as tall as a filled one (no growing); the first round is 1.5 × as wide so names and seed numbers fit */
.btm-ds-spot { box-sizing: border-box; }
.btm-ds-bracket { display: flex; align-items: stretch; }
.btm-ds-bracket > .btm-ds-col { flex: 1 1 0; min-width: 170px; }
.btm-ds-bracket > .btm-ds-col:first-child { flex-grow: 1.5; min-width: 255px; }
.btm-ds .btm-ds-spot.bye .bi-fr { display: inline; font-size: inherit; }
.btm-ds .btm-ds-spot.bye .bi-fr::before { content: " / "; opacity: .6; }

/* Visual draw layout: left column (category, format, status, athletes, buttons) and the bracket from the top, so a
   16-athlete first round and its tie-breakers fit on a 1920 × 1080 screen without scrolling */
.btm-ds-body { align-items: stretch; }
.btm-ds-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.btm-ds-head { flex-direction: column; align-items: flex-start; gap: 2px; }
.btm-ds-head h2 { font-size: clamp(26px, 2.6vw, 46px); color: #f2f4f7; }
.btm-ds .btm-ds-head h2 .bi-fr { opacity: 1; color: #f2f4f7; font-weight: 400; }
.btm-ds-fmt { color: #f2f4f7; font-size: clamp(14px, 1.05vw, 18px); }
.btm-ds-msg { font-size: clamp(15px, 1.15vw, 20px); min-height: 0; }
.btm-ds-foot { padding-top: 0; }
.btm-ds-struct { padding: 8px 10px; }
.btm-ds-struct h4 { margin-bottom: 4px; }
.btm-ds-bracket { min-height: calc(var(--rows) * 2.35em + 24px); }
.btm-ds-spot { padding: 2px 8px; min-height: 0; }
.btm-ds-spot .n { line-height: 1.2; font-size: clamp(13px, .95vw, 17px); }
.btm-ds-spot .s { line-height: 1.15; font-size: 11px; }
.btm-ds-box { padding: 3px 8px; min-height: 2.1em; }
.btm-ds-pair { gap: 3px; }
.btm-ds-colb { gap: 6px; }
.btm-ds-tb { margin-top: 8px; padding-top: 6px; }
.btm-ds-bracket { min-height: calc(var(--rows) * 2.05em + 20px); }
.btm-ds-struct > .btm-ds-note { margin-top: 4px; font-size: 12px; }
.btm-ds-tb h4 { margin: 0 0 4px; }
.btm-ds-tb .btm-ds-rrbout { margin-bottom: 4px; gap: 6px; }
.btm-ds-tb .c { font-size: clamp(12px, .85vw, 15px); padding: 3px 8px; }
.btm-ds-tb .c .who { font-size: .9em; margin-top: 0; }
.btm-ds-in { padding: 10px 18px 10px; gap: 8px; }
.btm-ds-bracket { min-height: calc(var(--rows) * 1.9em + 16px); }
.btm-ds-struct h4 .bi-fr { display: inline; } .btm-ds-struct h4 .bi-fr::before { content: " / "; opacity: .6; }
.btm-ds-list td { padding: 4px 6px; font-size: clamp(13px, 1vw, 17px); }
.btm-ds-list th { padding: 3px 6px; }
.btm-ds .btm-ds-list input, .btm-ds .btm-ds-list select { min-height: 28px; padding: 2px 6px; }
.btm-ds-body { align-items: start; }

/* Sponsor Reads tab */
.btm-sread { border: 1px solid var(--btm-line); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.btm-sread-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.btm-sread-row .btm-field:first-child { flex: 1 1 260px; }
.btm-sread textarea { width: 100%; box-sizing: border-box; }
.btm-sread textarea { font: inherit; padding: 6px 8px; }
